tokentracker-cli 0.26.0 → 0.26.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.
Files changed (43) hide show
  1. package/dashboard/dist/assets/ActivityHeatmap-BX2q-PW5.js +42 -0
  2. package/dashboard/dist/assets/{Card-Sg0FPI4e.js → Card-CKdycEDk.js} +1 -1
  3. package/dashboard/dist/assets/{DashboardPage-IdI75EjJ.js → DashboardPage-T_BImOGr.js} +1 -1
  4. package/dashboard/dist/assets/{DevicePage-BuyHqTu3.js → DevicePage-DqFrE2fo.js} +1 -1
  5. package/dashboard/dist/assets/{DialogTitle-B0st_3V5.js → DialogTitle-BPUtAz2U.js} +1 -1
  6. package/dashboard/dist/assets/{FadeIn-bxDP-K40.js → FadeIn-ortmqOpl.js} +1 -1
  7. package/dashboard/dist/assets/{HeaderGithubStar-BEHD7rie.js → HeaderGithubStar-Cl4nchsC.js} +1 -1
  8. package/dashboard/dist/assets/{IpCheckPage-C57xLKui.js → IpCheckPage-CxRBCdXW.js} +1 -1
  9. package/dashboard/dist/assets/{LandingPage-COsYhPBM.js → LandingPage-DoIw_oXY.js} +165 -165
  10. package/dashboard/dist/assets/{LeaderboardAvatar-96tM6DY0.js → LeaderboardAvatar-GMFZci05.js} +1 -1
  11. package/dashboard/dist/assets/{LeaderboardPage-BuRxhyKL.js → LeaderboardPage-BzkrPpnp.js} +3 -3
  12. package/dashboard/dist/assets/{LeaderboardProfileModal-BHCcrJjo.js → LeaderboardProfileModal-CAcqZ15e.js} +2 -2
  13. package/dashboard/dist/assets/{LeaderboardProfilePage-SFrFYBLF.js → LeaderboardProfilePage-D7jyFQk5.js} +1 -1
  14. package/dashboard/dist/assets/{LimitsPage-CvN3W5RK.js → LimitsPage-fdq2MG4P.js} +1 -1
  15. package/dashboard/dist/assets/{LocalOnlyNotice-B7WiSJ6k.js → LocalOnlyNotice-XEv4_b68.js} +1 -1
  16. package/dashboard/dist/assets/{LoginPage-31Oiu8B_.js → LoginPage-CJ31pW6G.js} +1 -1
  17. package/dashboard/dist/assets/{PopoverPopup-JofwunzX.js → PopoverPopup-cEzMmw1k.js} +1 -1
  18. package/dashboard/dist/assets/{ProviderIcon-JDw0Drn4.js → ProviderIcon-CkKiJH4q.js} +1 -1
  19. package/dashboard/dist/assets/SettingsPage-D--hzVuV.js +1 -0
  20. package/dashboard/dist/assets/{SkillsPage-Df5UWPX0.js → SkillsPage-BTxPA7dW.js} +1 -1
  21. package/dashboard/dist/assets/{WidgetsPage-BCV3A8Pz.js → WidgetsPage-Bh4zs5u8.js} +1 -1
  22. package/dashboard/dist/assets/{WrappedPage-DhojFfsH.js → WrappedPage-COhqXKs7.js} +1 -1
  23. package/dashboard/dist/assets/{arrow-up-right-BWxw7oTY.js → arrow-up-right-B0tVW8XM.js} +1 -1
  24. package/dashboard/dist/assets/check-Dhwj43_0.js +1 -0
  25. package/dashboard/dist/assets/{chevron-down-CES2R9rt.js → chevron-down-Cz58bkoU.js} +1 -1
  26. package/dashboard/dist/assets/{download-XTaZ-oYR.js → download-Gv8d-j81.js} +1 -1
  27. package/dashboard/dist/assets/{info-B920DcmX.js → info-bDEPb8dB.js} +1 -1
  28. package/dashboard/dist/assets/main-smnMFIqE.css +1 -0
  29. package/dashboard/dist/assets/{main-RGma-IbC.js → main-tm3dyfMf.js} +6 -4
  30. package/dashboard/dist/assets/{use-limits-display-prefs-Ddyh6mLl.js → use-limits-display-prefs-BvHWn0OQ.js} +1 -1
  31. package/dashboard/dist/assets/{use-native-settings-BPHa51-L.js → use-native-settings-CI_YvzEo.js} +1 -1
  32. package/dashboard/dist/assets/{use-reduced-motion-BTcFjxkz.js → use-reduced-motion-pCeztzVC.js} +1 -1
  33. package/dashboard/dist/assets/{use-usage-limits-Bbxgv8dw.js → use-usage-limits-CKWnCeca.js} +1 -1
  34. package/dashboard/dist/assets/{useCurrency-CE5nH0RE.js → useCurrency-DLoIpDjL.js} +1 -1
  35. package/dashboard/dist/index.html +2 -2
  36. package/dashboard/dist/share.html +2 -2
  37. package/package.json +1 -1
  38. package/src/lib/pricing/seed-snapshot.json +1 -1
  39. package/src/lib/rollout.js +1 -1
  40. package/dashboard/dist/assets/ActivityHeatmap-BfxK9hvH.js +0 -42
  41. package/dashboard/dist/assets/SettingsPage-C7FP78_q.js +0 -1
  42. package/dashboard/dist/assets/check-B6GHhpMZ.js +0 -1
  43. package/dashboard/dist/assets/main-DwtQoM3t.css +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-IdI75EjJ.js","assets/use-usage-limits-Bbxgv8dw.js","assets/useCurrency-CE5nH0RE.js","assets/ActivityHeatmap-BfxK9hvH.js","assets/info-B920DcmX.js","assets/DialogTitle-B0st_3V5.js","assets/PopoverPopup-JofwunzX.js","assets/Card-Sg0FPI4e.js","assets/use-reduced-motion-BTcFjxkz.js","assets/ProviderIcon-JDw0Drn4.js","assets/FadeIn-bxDP-K40.js","assets/LandingPage-COsYhPBM.js","assets/HeaderGithubStar-BEHD7rie.js","assets/LeaderboardPage-BuRxhyKL.js","assets/LeaderboardAvatar-96tM6DY0.js","assets/chevron-down-CES2R9rt.js","assets/LeaderboardProfilePage-SFrFYBLF.js","assets/LeaderboardProfileModal-BHCcrJjo.js","assets/arrow-up-right-BWxw7oTY.js","assets/LimitsPage-CvN3W5RK.js","assets/use-limits-display-prefs-Ddyh6mLl.js","assets/LocalOnlyNotice-B7WiSJ6k.js","assets/download-XTaZ-oYR.js","assets/SettingsPage-C7FP78_q.js","assets/use-native-settings-BPHa51-L.js","assets/check-B6GHhpMZ.js","assets/SkillsPage-Df5UWPX0.js","assets/WidgetsPage-BCV3A8Pz.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-T_BImOGr.js","assets/use-usage-limits-CKWnCeca.js","assets/useCurrency-DLoIpDjL.js","assets/ActivityHeatmap-BX2q-PW5.js","assets/info-bDEPb8dB.js","assets/DialogTitle-BPUtAz2U.js","assets/PopoverPopup-cEzMmw1k.js","assets/Card-CKdycEDk.js","assets/use-reduced-motion-pCeztzVC.js","assets/ProviderIcon-CkKiJH4q.js","assets/FadeIn-ortmqOpl.js","assets/LandingPage-DoIw_oXY.js","assets/HeaderGithubStar-Cl4nchsC.js","assets/LeaderboardPage-BzkrPpnp.js","assets/LeaderboardAvatar-GMFZci05.js","assets/chevron-down-Cz58bkoU.js","assets/LeaderboardProfilePage-D7jyFQk5.js","assets/LeaderboardProfileModal-CAcqZ15e.js","assets/arrow-up-right-B0tVW8XM.js","assets/LimitsPage-fdq2MG4P.js","assets/use-limits-display-prefs-BvHWn0OQ.js","assets/LocalOnlyNotice-XEv4_b68.js","assets/download-Gv8d-j81.js","assets/SettingsPage-D--hzVuV.js","assets/use-native-settings-CI_YvzEo.js","assets/check-Dhwj43_0.js","assets/SkillsPage-BTxPA7dW.js","assets/WidgetsPage-Bh4zs5u8.js"])))=>i.map(i=>d[i]);
2
2
  function xS(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(a,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>a[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function L_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function PS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function a(){var o=!1;try{o=this instanceof a}catch{}return o?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 o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}),n}var gh={exports:{}},cs={},yh={exports:{}},Ze={};var jy;function SS(){if(jy)return Ze;jy=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function k(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,C={};function S(I,q,xe){this.props=I,this.context=q,this.refs=C,this.updater=xe||w}S.prototype.isReactComponent={},S.prototype.setState=function(I,q){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,q,"setState")},S.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function D(){}D.prototype=S.prototype;function L(I,q,xe){this.props=I,this.context=q,this.refs=C,this.updater=xe||w}var R=L.prototype=new D;R.constructor=L,x(R,S.prototype),R.isPureReactComponent=!0;var O=Array.isArray,G=Object.prototype.hasOwnProperty,W={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function P(I,q,xe){var Re,Pe={},Te=null,Ge=null;if(q!=null)for(Re in q.ref!==void 0&&(Ge=q.ref),q.key!==void 0&&(Te=""+q.key),q)G.call(q,Re)&&!z.hasOwnProperty(Re)&&(Pe[Re]=q[Re]);var Qe=arguments.length-2;if(Qe===1)Pe.children=xe;else if(1<Qe){for(var Ue=Array(Qe),jt=0;jt<Qe;jt++)Ue[jt]=arguments[jt+2];Pe.children=Ue}if(I&&I.defaultProps)for(Re in Qe=I.defaultProps,Qe)Pe[Re]===void 0&&(Pe[Re]=Qe[Re]);return{$$typeof:e,type:I,key:Te,ref:Ge,props:Pe,_owner:W.current}}function Y(I,q){return{$$typeof:e,type:I.type,key:q,ref:I.ref,props:I.props,_owner:I._owner}}function X(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function ue(I){var q={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(xe){return q[xe]})}var se=/\/+/g;function Ae(I,q){return typeof I=="object"&&I!==null&&I.key!=null?ue(""+I.key):q.toString(36)}function fe(I,q,xe,Re,Pe){var Te=typeof I;(Te==="undefined"||Te==="boolean")&&(I=null);var Ge=!1;if(I===null)Ge=!0;else switch(Te){case"string":case"number":Ge=!0;break;case"object":switch(I.$$typeof){case e:case t:Ge=!0}}if(Ge)return Ge=I,Pe=Pe(Ge),I=Re===""?"."+Ae(Ge,0):Re,O(Pe)?(xe="",I!=null&&(xe=I.replace(se,"$&/")+"/"),fe(Pe,q,xe,"",function(jt){return jt})):Pe!=null&&(X(Pe)&&(Pe=Y(Pe,xe+(!Pe.key||Ge&&Ge.key===Pe.key?"":(""+Pe.key).replace(se,"$&/")+"/")+I)),q.push(Pe)),1;if(Ge=0,Re=Re===""?".":Re+":",O(I))for(var Qe=0;Qe<I.length;Qe++){Te=I[Qe];var Ue=Re+Ae(Te,Qe);Ge+=fe(Te,q,xe,Ue,Pe)}else if(Ue=k(I),typeof Ue=="function")for(I=Ue.call(I),Qe=0;!(Te=I.next()).done;)Te=Te.value,Ue=Re+Ae(Te,Qe++),Ge+=fe(Te,q,xe,Ue,Pe);else if(Te==="object")throw q=String(I),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return Ge}function le(I,q,xe){if(I==null)return I;var Re=[],Pe=0;return fe(I,Re,"","",function(Te){return q.call(xe,Te,Pe++)}),Re}function pe(I){if(I._status===-1){var q=I._result;q=q(),q.then(function(xe){(I._status===0||I._status===-1)&&(I._status=1,I._result=xe)},function(xe){(I._status===0||I._status===-1)&&(I._status=2,I._result=xe)}),I._status===-1&&(I._status=0,I._result=q)}if(I._status===1)return I._result.default;throw I._result}var Ne={current:null},K={transition:null},Z={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:K,ReactCurrentOwner:W};function H(){throw Error("act(...) is not supported in production builds of React.")}return Ze.Children={map:le,forEach:function(I,q,xe){le(I,function(){q.apply(this,arguments)},xe)},count:function(I){var q=0;return le(I,function(){q++}),q},toArray:function(I){return le(I,function(q){return q})||[]},only:function(I){if(!X(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Ze.Component=S,Ze.Fragment=n,Ze.Profiler=o,Ze.PureComponent=L,Ze.StrictMode=a,Ze.Suspense=h,Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Ze.act=H,Ze.cloneElement=function(I,q,xe){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var Re=x({},I.props),Pe=I.key,Te=I.ref,Ge=I._owner;if(q!=null){if(q.ref!==void 0&&(Te=q.ref,Ge=W.current),q.key!==void 0&&(Pe=""+q.key),I.type&&I.type.defaultProps)var Qe=I.type.defaultProps;for(Ue in q)G.call(q,Ue)&&!z.hasOwnProperty(Ue)&&(Re[Ue]=q[Ue]===void 0&&Qe!==void 0?Qe[Ue]:q[Ue])}var Ue=arguments.length-2;if(Ue===1)Re.children=xe;else if(1<Ue){Qe=Array(Ue);for(var jt=0;jt<Ue;jt++)Qe[jt]=arguments[jt+2];Re.children=Qe}return{$$typeof:e,type:I.type,key:Pe,ref:Te,props:Re,_owner:Ge}},Ze.createContext=function(I){return I={$$typeof:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:s,_context:I},I.Consumer=I},Ze.createElement=P,Ze.createFactory=function(I){var q=P.bind(null,I);return q.type=I,q},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(I){return{$$typeof:u,render:I}},Ze.isValidElement=X,Ze.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:pe}},Ze.memo=function(I,q){return{$$typeof:f,type:I,compare:q===void 0?null:q}},Ze.startTransition=function(I){var q=K.transition;K.transition={};try{I()}finally{K.transition=q}},Ze.unstable_act=H,Ze.useCallback=function(I,q){return Ne.current.useCallback(I,q)},Ze.useContext=function(I){return Ne.current.useContext(I)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(I){return Ne.current.useDeferredValue(I)},Ze.useEffect=function(I,q){return Ne.current.useEffect(I,q)},Ze.useId=function(){return Ne.current.useId()},Ze.useImperativeHandle=function(I,q,xe){return Ne.current.useImperativeHandle(I,q,xe)},Ze.useInsertionEffect=function(I,q){return Ne.current.useInsertionEffect(I,q)},Ze.useLayoutEffect=function(I,q){return Ne.current.useLayoutEffect(I,q)},Ze.useMemo=function(I,q){return Ne.current.useMemo(I,q)},Ze.useReducer=function(I,q,xe){return Ne.current.useReducer(I,q,xe)},Ze.useRef=function(I){return Ne.current.useRef(I)},Ze.useState=function(I){return Ne.current.useState(I)},Ze.useSyncExternalStore=function(I,q,xe){return Ne.current.useSyncExternalStore(I,q,xe)},Ze.useTransition=function(){return Ne.current.useTransition()},Ze.version="18.3.1",Ze}var Uy;function Qf(){return Uy||(Uy=1,yh.exports=SS()),yh.exports}var By;function CS(){if(By)return cs;By=1;var e=Qf(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(u,h,f){var m,y={},k=null,w=null;f!==void 0&&(k=""+f),h.key!==void 0&&(k=""+h.key),h.ref!==void 0&&(w=h.ref);for(m in h)a.call(h,m)&&!s.hasOwnProperty(m)&&(y[m]=h[m]);if(u&&u.defaultProps)for(m in h=u.defaultProps,h)y[m]===void 0&&(y[m]=h[m]);return{$$typeof:t,type:u,key:k,ref:w,props:y,_owner:o.current}}return cs.Fragment=n,cs.jsx=c,cs.jsxs=c,cs}var Fy;function TS(){return Fy||(Fy=1,gh.exports=CS()),gh.exports}var N=TS(),b=Qf();const Rs=L_(b),ES=xS({__proto__:null,default:Rs},[b]);var uc={},vh={exports:{}},yn={},kh={exports:{}},_h={};var Vy;function AS(){return Vy||(Vy=1,(function(e){function t(K,Z){var H=K.length;K.push(Z);e:for(;0<H;){var I=H-1>>>1,q=K[I];if(0<o(q,Z))K[I]=Z,K[H]=q,H=I;else break e}}function n(K){return K.length===0?null:K[0]}function a(K){if(K.length===0)return null;var Z=K[0],H=K.pop();if(H!==Z){K[0]=H;e:for(var I=0,q=K.length,xe=q>>>1;I<xe;){var Re=2*(I+1)-1,Pe=K[Re],Te=Re+1,Ge=K[Te];if(0>o(Pe,H))Te<q&&0>o(Ge,Pe)?(K[I]=Ge,K[Te]=H,I=Te):(K[I]=Pe,K[Re]=H,I=Re);else if(Te<q&&0>o(Ge,H))K[I]=Ge,K[Te]=H,I=Te;else break e}}return Z}function o(K,Z){var H=K.sortIndex-Z.sortIndex;return H!==0?H:K.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var h=[],f=[],m=1,y=null,k=3,w=!1,x=!1,C=!1,S=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(K){for(var Z=n(f);Z!==null;){if(Z.callback===null)a(f);else if(Z.startTime<=K)a(f),Z.sortIndex=Z.expirationTime,t(h,Z);else break;Z=n(f)}}function O(K){if(C=!1,R(K),!x)if(n(h)!==null)x=!0,pe(G);else{var Z=n(f);Z!==null&&Ne(O,Z.startTime-K)}}function G(K,Z){x=!1,C&&(C=!1,D(P),P=-1),w=!0;var H=k;try{for(R(Z),y=n(h);y!==null&&(!(y.expirationTime>Z)||K&&!ue());){var I=y.callback;if(typeof I=="function"){y.callback=null,k=y.priorityLevel;var q=I(y.expirationTime<=Z);Z=e.unstable_now(),typeof q=="function"?y.callback=q:y===n(h)&&a(h),R(Z)}else a(h);y=n(h)}if(y!==null)var xe=!0;else{var Re=n(f);Re!==null&&Ne(O,Re.startTime-Z),xe=!1}return xe}finally{y=null,k=H,w=!1}}var W=!1,z=null,P=-1,Y=5,X=-1;function ue(){return!(e.unstable_now()-X<Y)}function se(){if(z!==null){var K=e.unstable_now();X=K;var Z=!0;try{Z=z(!0,K)}finally{Z?Ae():(W=!1,z=null)}}else W=!1}var Ae;if(typeof L=="function")Ae=function(){L(se)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,le=fe.port2;fe.port1.onmessage=se,Ae=function(){le.postMessage(null)}}else Ae=function(){S(se,0)};function pe(K){z=K,W||(W=!0,Ae())}function Ne(K,Z){P=S(function(){K(e.unstable_now())},Z)}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(K){K.callback=null},e.unstable_continueExecution=function(){x||w||(x=!0,pe(G))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(K){switch(k){case 1:case 2:case 3:var Z=3;break;default:Z=k}var H=k;k=Z;try{return K()}finally{k=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,Z){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var H=k;k=K;try{return Z()}finally{k=H}},e.unstable_scheduleCallback=function(K,Z,H){var I=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?I+H:I):H=I,K){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=H+q,K={id:m++,callback:Z,priorityLevel:K,startTime:H,expirationTime:q,sortIndex:-1},H>I?(K.sortIndex=H,t(f,K),n(h)===null&&K===n(f)&&(C?(D(P),P=-1):C=!0,Ne(O,H-I))):(K.sortIndex=q,t(h,K),x||w||(x=!0,pe(G))),K},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(K){var Z=k;return function(){var H=k;k=Z;try{return K.apply(this,arguments)}finally{k=H}}}})(_h)),_h}var zy;function RS(){return zy||(zy=1,kh.exports=AS()),kh.exports}var $y;function LS(){if($y)return yn;$y=1;var e=Qf(),t=RS();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,o={};function s(r,i){c(r,i),c(r+"Capture",i)}function c(r,i){for(o[r]=i,r=0;r<i.length;r++)a.add(i[r])}var u=!(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 k(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 x(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 C(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 S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){S[r]=new C(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];S[i]=new C(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){S[r]=new C(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){S[r]=new C(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){S[r]=new C(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){S[r]=new C(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){S[r]=new C(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){S[r]=new C(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){S[r]=new C(r,5,!1,r.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function L(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(D,L);S[i]=new C(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(D,L);S[i]=new C(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(D,L);S[i]=new C(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){S[r]=new C(r,1,!1,r.toLowerCase(),null,!1,!1)}),S.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){S[r]=new C(r,1,!1,r.toLowerCase(),null,!0,!0)});function R(r,i,l,d){var p=S.hasOwnProperty(i)?S[i]:null;(p!==null?p.type!==0:d||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(x(i,l,p,d)&&(l=null),d||p===null?k(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 O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=Symbol.for("react.element"),W=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),ue=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),Ne=Symbol.for("react.offscreen"),K=Symbol.iterator;function Z(r){return r===null||typeof r!="object"?null:(r=K&&r[K]||r["@@iterator"],typeof r=="function"?r:null)}var H=Object.assign,I;function q(r){if(I===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);I=i&&i[1]||""}return`
3
3
  `+I+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($){var d=$}Reflect.construct(r,[],i)}else{try{i.call()}catch($){d=$}r.call(i.prototype)}else{try{throw Error()}catch($){d=$}r()}}catch($){if($&&d&&typeof $.stack=="string"){for(var p=$.stack.split(`
4
4
  `),g=d.stack.split(`
@@ -127,7 +127,8 @@ landing.v2.compare.without.p1,landing,LandingPage,MarketingLanding,without_p1,"S
127
127
  landing.v2.compare.without.p2,landing,LandingPage,MarketingLanding,without_p2,"Blind to token consumption",,active
128
128
  landing.v2.compare.without.p3,landing,LandingPage,MarketingLanding,without_p3,"Unexpected API bills",,active
129
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
130
+ landing.v2.nav.status,landing,LandingPage,MarketingLanding,nav_status,"Status",,active
131
+ landing.v2.nav.github,landing,LandingPage,MarketingLanding,nav_github,"GitHub",,active
131
132
  landing.v2.models.agent.codex,landing,LandingPage,MarketingLanding,agent_codex,"CODEX",,active
132
133
  landing.v2.models.agent.claude_code,landing,LandingPage,MarketingLanding,agent_claude_code,"CLAUDE CODE",,active
133
134
  landing.v2.models.agent.cursor,landing,LandingPage,MarketingLanding,agent_cursor,"CURSOR",,active
@@ -427,6 +428,7 @@ settings.menubar.syncNowHint,ui,SettingsPage,SettingsPage,mb_sync_now_hint,"Trig
427
428
  settings.menubar.syncing,ui,SettingsPage,SettingsPage,mb_syncing,"Syncing…",,active
428
429
  settings.menubar.updates,ui,SettingsPage,SettingsPage,mb_updates,"Updates",,active
429
430
  settings.menubar.checkUpdates,ui,SettingsPage,SettingsPage,mb_check_updates,"Check for updates",,active
431
+ settings.footer.statusPage,ui,SettingsPage,NativeAppFooter,status_page,"System status",,active
430
432
  menubar.slot.primary,ui,WidgetsPage,MenuBarDisplayCard,slot_primary,"Primary slot",,active
431
433
  menubar.slot.secondary,ui,WidgetsPage,MenuBarDisplayCard,slot_secondary,"Secondary slot",,active
432
434
  menubar.native_only,ui,WidgetsPage,MenuBarDisplayCard,native_only,"Open TokenTrackerBar for macOS to edit the live menu bar display.",,active
@@ -830,7 +832,7 @@ local_only.title,dashboard,LocalOnlyNotice,LocalOnlyNotice,title,"Available in t
830
832
  local_only.body,dashboard,LocalOnlyNotice,LocalOnlyNotice,body,"This page reads data from your own machine, so it only works in the Mac app or the CLI dashboard.",,active
831
833
  local_only.open_app,dashboard,LocalOnlyNotice,LocalOnlyNotice,open_app,"Open in Mac app",,active
832
834
  local_only.download,dashboard,LocalOnlyNotice,LocalOnlyNotice,download,"Get the Mac app",,active
833
- `,DL={"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":"简体中文","settings.appearance.currency.label":"货币","settings.appearance.currency.hint":"选择用量成本的显示币种。","settings.appearance.currency.opt.usd":"美元 ($)","settings.appearance.currency.opt.eur":"欧元 (€)","settings.appearance.currency.opt.gbp":"英镑 (£)","settings.appearance.currency.opt.cny":"人民币 (¥)","settings.appearance.currency.opt.jpy":"日元 (¥)","settings.appearance.currency.opt.hkd":"港币 (HK$)","settings.appearance.currency.rate_source.default":"内置默认汇率","settings.appearance.currency.rate_source.fetched":"数据源:open.er-api.com","settings.appearance.currency.rate_updated":"更新于 {{when}}","settings.appearance.currency.rate_never":"尚未刷新"},ML={"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":"💤 养精蓄锐。在不写代码的日子里,灵感也在悄悄生长。","ipcheck.page.title":"Claude IP 检测","ipcheck.page.subtitle":"查看当前访问 Claude 的出口 IP、纯净度、地理与风险信号,识别可能影响登录或触发风控的因素。","ipcheck.mask.toggle":"隐藏 IP","ipcheck.ipv6.warn":"当前为 IPv6 环境,不建议用 IPv6 访问 Claude Code,部分检测结果可能不完整。","ipcheck.ip.cn":"中国出口 IPv4","ipcheck.ip.cloudflare":"Cloudflare 出口","ipcheck.ip.claude":"Claude 出口","ipcheck.ip.failed":"获取失败","ipcheck.ip.loading":"加载中...","ipcheck.trust.title":"信任评分","ipcheck.trust.subtitle":"Claude 风控视角下的 IP 纯净度","ipcheck.trust.no_data":"无数据","ipcheck.trust.no_ip":"未获取到 Claude 出口 IP,无法评分","ipcheck.trust.no_score":"该 IP 暂无评分数据","ipcheck.trust.gauge.low":"0 高危","ipcheck.trust.gauge.high":"100 可信","ipcheck.trust.label.pristine":"极度纯净","ipcheck.trust.label.clean":"纯净","ipcheck.trust.label.good":"良好","ipcheck.trust.label.neutral":"中性","ipcheck.trust.label.suspicious":"可疑","ipcheck.trust.label.unreachable":"不可访问","ipcheck.trust.text.excellent":"该 IP 信誉极好","ipcheck.trust.text.great":"该 IP 信誉优异","ipcheck.trust.text.minor":"该 IP 存在轻微风险","ipcheck.trust.text.moderate":"该 IP 存在一定风险","ipcheck.trust.text.severe":"该 IP 风险极高","ipcheck.trust.text.restricted":"处于不可访问区域,Claude 会严格风控","ipcheck.trust.region_warn.title":"Claude 出口 IP 位于 {{region}}","ipcheck.trust.region_warn.body":"不建议登录 Claude,容易触发封号风控。","ipcheck.trust.region_support":"Claude 支持地区","ipcheck.trust.region.accessible":"可访问","ipcheck.common.unknown":"未知","ipcheck.props.title":"IP 属性","ipcheck.props.region":"地区","ipcheck.props.city":"城市","ipcheck.props.type":"类型","ipcheck.props.asn":"ASN","ipcheck.props.org":"运营商","ipcheck.props.residential":"家庭住宅","ipcheck.props.datacenter":"机房","ipcheck.security.title":"安全检测","ipcheck.security.vpn":"VPN","ipcheck.security.proxy":"代理 (Proxy)","ipcheck.security.tor":"Tor","ipcheck.security.crawler":"机器人 (Crawler)","ipcheck.security.abuser":"滥用记录","ipcheck.security.proxy_flag":"代理","ipcheck.security.crawler_yes":"是","ipcheck.security.crawler_no":"否","ipcheck.security.abuser_yes":"有记录","ipcheck.security.abuser_no":"无记录","ipcheck.security.clean":"未检测到","ipcheck.avail.title":"Claude 可用性","ipcheck.avail.tooltip":"Claude 服务器在美国,从亚洲访问延迟超过 100ms 属于正常情况。","ipcheck.avail.refresh":"刷新","ipcheck.avail.svc_row":"服务状态","ipcheck.avail.latency.normal":"正常","ipcheck.avail.latency.good":"良好","ipcheck.avail.latency.slow":"较慢","ipcheck.avail.latency.unreachable":"不可访问","ipcheck.avail.svc.none":"全部正常","ipcheck.avail.svc.minor":"轻微故障","ipcheck.avail.svc.major":"重大故障","ipcheck.avail.svc.critical":"严重故障","ipcheck.avail.svc.maintenance":"维护中","ipcheck.avail.svc.other":"服务异常","ipcheck.dns.title":"DNS 泄露检测","ipcheck.dns.status":"状态","ipcheck.dns.outlet":"DNS 出口","ipcheck.dns.outlet_ip":"DNS 出口 IP","ipcheck.dns.isp":"服务商","ipcheck.dns.leaked":"可能泄露","ipcheck.dns.no_leak":"未检测到泄露","ipcheck.dns.encrypted":"DNS 加密或未暴露","ipcheck.dns.cn_tag":"中国 DNS","ipcheck.udp.title":"WebRTC UDP 泄露","ipcheck.udp.status":"状态","ipcheck.udp.outlet":"UDP 出口","ipcheck.udp.outlet_ip":"UDP 出口 IP","ipcheck.udp.origin":"归属地","ipcheck.udp.disabled":"WebRTC 已禁用","ipcheck.udp.no_leak":"未检测到泄露","ipcheck.udp.leaked":"可能泄露","ipcheck.udp.anomaly":"异常","ipcheck.device.title":"设备信息","ipcheck.device.tz":"时区","ipcheck.device.lang":"语言","ipcheck.device.os":"操作系统 / 浏览器","ipcheck.device.touch":"触屏","ipcheck.device.net":"网络类型","ipcheck.device.dnt":"Do Not Track","ipcheck.device.webgl_render":"WebGL 渲染器","ipcheck.device.canvas_fp":"Canvas 指纹","ipcheck.device.webgl_fp":"WebGL 指纹","ipcheck.device.match":"一致","ipcheck.device.mismatch":"不一致","ipcheck.device.local":"本地","ipcheck.device.estimate_suffix":"(估算)","ipcheck.device.diff_equal":"偏移略有差异","ipcheck.device.diff_ahead":"Claude 快 {{h}} 小时","ipcheck.device.diff_behind":"Claude 慢 {{h}} 小时","ipcheck.device.lang_expected":"Claude 出口常用","ipcheck.device.touch_yes":"是","ipcheck.device.touch_no":"否","ipcheck.device.dnt_on":"已开启","ipcheck.device.dnt_off":"已关闭","ipcheck.device.dnt_unset":"未设置","ipcheck.device.net_unsupported":"不支持检测","ipcheck.device.unsupported":"不支持","ipcheck.history.title":"Claude 出口 IP 历史","ipcheck.history.subtitle":"仅本地存储于浏览器,最多保留 6 条","ipcheck.history.clear":"清除","ipcheck.history.empty":"暂无历史记录","ipcheck.history.current":"当前","ipcheck.region.CN":"中国大陆","ipcheck.region.HK":"香港","ipcheck.region.MO":"澳门","ipcheck.region.RU":"俄罗斯","ipcheck.region.KP":"朝鲜","ipcheck.region.IR":"伊朗","ipcheck.region.SY":"叙利亚","ipcheck.region.CU":"古巴","ipcheck.region.BY":"白俄罗斯","ipcheck.region.VE":"委内瑞拉","leaderboard.profile_modal.close":"关闭","leaderboard.profile_modal.loading":"正在加载用户资料…","leaderboard.profile_modal.error":"加载用户资料失败。","leaderboard.profile_modal.empty":"这个用户的资料未公开。","leaderboard.profile_modal.row_aria":"查看 {{name}} 的资料","leaderboard.profile_modal.rank":"#{{rank}}","leaderboard.profile.hero.rank_label":"排名","leaderboard.profile_modal.hero.total_tokens":"总 Token","leaderboard.profile_modal.hero.total_cost":"总花费","leaderboard.profile_modal.hero.github":"GitHub 主页","leaderboard.profile_modal.stat.total_cost":"总花费","leaderboard.profile_modal.stat.total_tokens":"总 Token","leaderboard.profile_modal.stat.active_days":"活跃天数","leaderboard.profile_modal.stat.avg_per_day":"日均花费","leaderboard.profile_modal.streak.current":"当前连续","leaderboard.profile_modal.streak.longest":"最长连续","leaderboard.profile_modal.streak.days":"{{count}} 天","leaderboard.profile_modal.best_day.title":"最佳日","leaderboard.profile_modal.best_day.none":"—","leaderboard.profile_modal.models.count":"使用了 {{count}} 个模型","leaderboard.profile_modal.models.favorite":"最爱模型","leaderboard.profile_modal.models.none":"暂无模型记录","leaderboard.profile_modal.heatmap.title":"活跃度(最近 365 天)","leaderboard.profile_modal.providers.title":"按 Provider 分布","leaderboard.profile_modal.providers.none":"本周期无使用数据。","leaderboard.profile_modal.view_full":"查看完整主页","local_only.title":"请在客户端内使用","local_only.body":"这个页面读取的是你本机上的数据,所以只能在 Mac app 或命令行 dashboard 里查看。","local_only.open_app":"在 Mac app 内打开","local_only.download":"下载 Mac app"},IL={"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":"Dashboard","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":"热门模型"},w0="tokentracker-locale",mo="system",iu="en",Dp="zh-CN";function x0(e){return typeof e!="string"?iu:/^zh(?:[-_]|$)/i.test(e.trim())?Dp:iu}function Ru(e){return e===mo?mo:x0(e)}function NL(){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 ou(e,t=NL()){const n=Ru(e);if(n!==mo)return n;const a=t.map(o=>typeof o=="string"?o.trim():"").find(o=>o.length>0);return a&&/^zh(?:[-_]|$)/i.test(a)?Dp:iu}function Mp(){return Ru(xs(w0)||mo)}function OL(e){return Ps(w0,Ru(e))}const jL=["key","module","page","component","slot","text"],UL={[Dp]:{...DL,...ML,...IL}};let Oh=null,P0=ou(Mp());function BL(e){const t=[];let n=[],a="",o=!1;for(let s=0;s<e.length;s+=1){const c=e[s];if(o){c==='"'?e[s+1]==='"'?(a+='"',s+=1):o=!1:a+=c;continue}if(c==='"'){o=!0;continue}if(c===","){n.push(a),a="";continue}if(c===`
835
+ `,DL={"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":"检查更新","settings.footer.statusPage":"系统状态","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":"简体中文","settings.appearance.currency.label":"货币","settings.appearance.currency.hint":"选择用量成本的显示币种。","settings.appearance.currency.opt.usd":"美元 ($)","settings.appearance.currency.opt.eur":"欧元 (€)","settings.appearance.currency.opt.gbp":"英镑 (£)","settings.appearance.currency.opt.cny":"人民币 (¥)","settings.appearance.currency.opt.jpy":"日元 (¥)","settings.appearance.currency.opt.hkd":"港币 (HK$)","settings.appearance.currency.rate_source.default":"内置默认汇率","settings.appearance.currency.rate_source.fetched":"数据源:open.er-api.com","settings.appearance.currency.rate_updated":"更新于 {{when}}","settings.appearance.currency.rate_never":"尚未刷新"},ML={"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":"💤 养精蓄锐。在不写代码的日子里,灵感也在悄悄生长。","ipcheck.page.title":"Claude IP 检测","ipcheck.page.subtitle":"查看当前访问 Claude 的出口 IP、纯净度、地理与风险信号,识别可能影响登录或触发风控的因素。","ipcheck.mask.toggle":"隐藏 IP","ipcheck.ipv6.warn":"当前为 IPv6 环境,不建议用 IPv6 访问 Claude Code,部分检测结果可能不完整。","ipcheck.ip.cn":"中国出口 IPv4","ipcheck.ip.cloudflare":"Cloudflare 出口","ipcheck.ip.claude":"Claude 出口","ipcheck.ip.failed":"获取失败","ipcheck.ip.loading":"加载中...","ipcheck.trust.title":"信任评分","ipcheck.trust.subtitle":"Claude 风控视角下的 IP 纯净度","ipcheck.trust.no_data":"无数据","ipcheck.trust.no_ip":"未获取到 Claude 出口 IP,无法评分","ipcheck.trust.no_score":"该 IP 暂无评分数据","ipcheck.trust.gauge.low":"0 高危","ipcheck.trust.gauge.high":"100 可信","ipcheck.trust.label.pristine":"极度纯净","ipcheck.trust.label.clean":"纯净","ipcheck.trust.label.good":"良好","ipcheck.trust.label.neutral":"中性","ipcheck.trust.label.suspicious":"可疑","ipcheck.trust.label.unreachable":"不可访问","ipcheck.trust.text.excellent":"该 IP 信誉极好","ipcheck.trust.text.great":"该 IP 信誉优异","ipcheck.trust.text.minor":"该 IP 存在轻微风险","ipcheck.trust.text.moderate":"该 IP 存在一定风险","ipcheck.trust.text.severe":"该 IP 风险极高","ipcheck.trust.text.restricted":"处于不可访问区域,Claude 会严格风控","ipcheck.trust.region_warn.title":"Claude 出口 IP 位于 {{region}}","ipcheck.trust.region_warn.body":"不建议登录 Claude,容易触发封号风控。","ipcheck.trust.region_support":"Claude 支持地区","ipcheck.trust.region.accessible":"可访问","ipcheck.common.unknown":"未知","ipcheck.props.title":"IP 属性","ipcheck.props.region":"地区","ipcheck.props.city":"城市","ipcheck.props.type":"类型","ipcheck.props.asn":"ASN","ipcheck.props.org":"运营商","ipcheck.props.residential":"家庭住宅","ipcheck.props.datacenter":"机房","ipcheck.security.title":"安全检测","ipcheck.security.vpn":"VPN","ipcheck.security.proxy":"代理 (Proxy)","ipcheck.security.tor":"Tor","ipcheck.security.crawler":"机器人 (Crawler)","ipcheck.security.abuser":"滥用记录","ipcheck.security.proxy_flag":"代理","ipcheck.security.crawler_yes":"是","ipcheck.security.crawler_no":"否","ipcheck.security.abuser_yes":"有记录","ipcheck.security.abuser_no":"无记录","ipcheck.security.clean":"未检测到","ipcheck.avail.title":"Claude 可用性","ipcheck.avail.tooltip":"Claude 服务器在美国,从亚洲访问延迟超过 100ms 属于正常情况。","ipcheck.avail.refresh":"刷新","ipcheck.avail.svc_row":"服务状态","ipcheck.avail.latency.normal":"正常","ipcheck.avail.latency.good":"良好","ipcheck.avail.latency.slow":"较慢","ipcheck.avail.latency.unreachable":"不可访问","ipcheck.avail.svc.none":"全部正常","ipcheck.avail.svc.minor":"轻微故障","ipcheck.avail.svc.major":"重大故障","ipcheck.avail.svc.critical":"严重故障","ipcheck.avail.svc.maintenance":"维护中","ipcheck.avail.svc.other":"服务异常","ipcheck.dns.title":"DNS 泄露检测","ipcheck.dns.status":"状态","ipcheck.dns.outlet":"DNS 出口","ipcheck.dns.outlet_ip":"DNS 出口 IP","ipcheck.dns.isp":"服务商","ipcheck.dns.leaked":"可能泄露","ipcheck.dns.no_leak":"未检测到泄露","ipcheck.dns.encrypted":"DNS 加密或未暴露","ipcheck.dns.cn_tag":"中国 DNS","ipcheck.udp.title":"WebRTC UDP 泄露","ipcheck.udp.status":"状态","ipcheck.udp.outlet":"UDP 出口","ipcheck.udp.outlet_ip":"UDP 出口 IP","ipcheck.udp.origin":"归属地","ipcheck.udp.disabled":"WebRTC 已禁用","ipcheck.udp.no_leak":"未检测到泄露","ipcheck.udp.leaked":"可能泄露","ipcheck.udp.anomaly":"异常","ipcheck.device.title":"设备信息","ipcheck.device.tz":"时区","ipcheck.device.lang":"语言","ipcheck.device.os":"操作系统 / 浏览器","ipcheck.device.touch":"触屏","ipcheck.device.net":"网络类型","ipcheck.device.dnt":"Do Not Track","ipcheck.device.webgl_render":"WebGL 渲染器","ipcheck.device.canvas_fp":"Canvas 指纹","ipcheck.device.webgl_fp":"WebGL 指纹","ipcheck.device.match":"一致","ipcheck.device.mismatch":"不一致","ipcheck.device.local":"本地","ipcheck.device.estimate_suffix":"(估算)","ipcheck.device.diff_equal":"偏移略有差异","ipcheck.device.diff_ahead":"Claude 快 {{h}} 小时","ipcheck.device.diff_behind":"Claude 慢 {{h}} 小时","ipcheck.device.lang_expected":"Claude 出口常用","ipcheck.device.touch_yes":"是","ipcheck.device.touch_no":"否","ipcheck.device.dnt_on":"已开启","ipcheck.device.dnt_off":"已关闭","ipcheck.device.dnt_unset":"未设置","ipcheck.device.net_unsupported":"不支持检测","ipcheck.device.unsupported":"不支持","ipcheck.history.title":"Claude 出口 IP 历史","ipcheck.history.subtitle":"仅本地存储于浏览器,最多保留 6 条","ipcheck.history.clear":"清除","ipcheck.history.empty":"暂无历史记录","ipcheck.history.current":"当前","ipcheck.region.CN":"中国大陆","ipcheck.region.HK":"香港","ipcheck.region.MO":"澳门","ipcheck.region.RU":"俄罗斯","ipcheck.region.KP":"朝鲜","ipcheck.region.IR":"伊朗","ipcheck.region.SY":"叙利亚","ipcheck.region.CU":"古巴","ipcheck.region.BY":"白俄罗斯","ipcheck.region.VE":"委内瑞拉","leaderboard.profile_modal.close":"关闭","leaderboard.profile_modal.loading":"正在加载用户资料…","leaderboard.profile_modal.error":"加载用户资料失败。","leaderboard.profile_modal.empty":"这个用户的资料未公开。","leaderboard.profile_modal.row_aria":"查看 {{name}} 的资料","leaderboard.profile_modal.rank":"#{{rank}}","leaderboard.profile.hero.rank_label":"排名","leaderboard.profile_modal.hero.total_tokens":"总 Token","leaderboard.profile_modal.hero.total_cost":"总花费","leaderboard.profile_modal.hero.github":"GitHub 主页","leaderboard.profile_modal.stat.total_cost":"总花费","leaderboard.profile_modal.stat.total_tokens":"总 Token","leaderboard.profile_modal.stat.active_days":"活跃天数","leaderboard.profile_modal.stat.avg_per_day":"日均花费","leaderboard.profile_modal.streak.current":"当前连续","leaderboard.profile_modal.streak.longest":"最长连续","leaderboard.profile_modal.streak.days":"{{count}} 天","leaderboard.profile_modal.best_day.title":"最佳日","leaderboard.profile_modal.best_day.none":"—","leaderboard.profile_modal.models.count":"使用了 {{count}} 个模型","leaderboard.profile_modal.models.favorite":"最爱模型","leaderboard.profile_modal.models.none":"暂无模型记录","leaderboard.profile_modal.heatmap.title":"活跃度(最近 365 天)","leaderboard.profile_modal.providers.title":"按 Provider 分布","leaderboard.profile_modal.providers.none":"本周期无使用数据。","leaderboard.profile_modal.view_full":"查看完整主页","local_only.title":"请在客户端内使用","local_only.body":"这个页面读取的是你本机上的数据,所以只能在 Mac app 或命令行 dashboard 里查看。","local_only.open_app":"在 Mac app 内打开","local_only.download":"下载 Mac app"},IL={"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.status":"状态","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":"Dashboard","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":"热门模型"},w0="tokentracker-locale",mo="system",iu="en",Dp="zh-CN";function x0(e){return typeof e!="string"?iu:/^zh(?:[-_]|$)/i.test(e.trim())?Dp:iu}function Ru(e){return e===mo?mo:x0(e)}function NL(){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 ou(e,t=NL()){const n=Ru(e);if(n!==mo)return n;const a=t.map(o=>typeof o=="string"?o.trim():"").find(o=>o.length>0);return a&&/^zh(?:[-_]|$)/i.test(a)?Dp:iu}function Mp(){return Ru(xs(w0)||mo)}function OL(e){return Ps(w0,Ru(e))}const jL=["key","module","page","component","slot","text"],UL={[Dp]:{...DL,...ML,...IL}};let Oh=null,P0=ou(Mp());function BL(e){const t=[];let n=[],a="",o=!1;for(let s=0;s<e.length;s+=1){const c=e[s];if(o){c==='"'?e[s+1]==='"'?(a+='"',s+=1):o=!1:a+=c;continue}if(c==='"'){o=!0;continue}if(c===","){n.push(a),a="";continue}if(c===`
834
836
  `){n.push(a),a="",n.every(u=>u.trim()==="")||t.push(n),n=[];continue}c!=="\r"&&(a+=c)}return n.push(a),n.every(s=>s.trim()==="")||t.push(n),t}function FL(e){const t=BL(e);if(!t.length)return{map:new Map,rows:[]};const n=t[0].map(u=>String(u).trim());if(jL.filter(u=>!n.includes(u)).length)return{map:new Map,rows:[]};const o=Object.fromEntries(n.map((u,h)=>[u,h])),s=[],c=new Map;return t.slice(1).forEach((u,h)=>{const f={key:String(u[o.key]||"").trim(),module:String(u[o.module]||"").trim(),page:String(u[o.page]||"").trim(),component:String(u[o.component]||"").trim(),slot:String(u[o.slot]||"").trim(),text:String(u[o.text]??"").trim()};f.key&&(c.has(f.key),c.set(f.key,f),s.push(f))}),{map:c,rows:s}}function VL(){return Oh||(Oh=FL(LL)),Oh}function zL(){return UL[P0]||{}}function $L(e){const t=zL()[String(e)];return typeof t=="string"&&t.trim()?t:null}function HL(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,`
835
837
  `)}function KL(e,t){return $L(t)||e?.text||t}function GL(e){P0=x0(e)}function Fe(e,t){const a=VL().map.get(e);return HL(WL(KL(a,e)),t)}const Qv="tokentracker_native_app";let S0=null;const Pf=new Set;typeof window<"u"&&window.addEventListener("native:systemAppearanceChanged",e=>{const t=e?.detail?.isDark;if(typeof t=="boolean"){S0=t;try{const n=document.documentElement;t?n.classList.add("dark"):n.classList.remove("dark")}catch{}Pf.forEach(n=>{try{n(t)}catch{}})}});function Jv(){return S0}function qL(e){return Pf.add(e),()=>Pf.delete(e)}function Ip(){if(typeof window>"u")return!1;try{if(new URLSearchParams(window.location.search).get("app")==="1"){try{window.localStorage.setItem(Qv,"1")}catch{}return!0}return window.localStorage.getItem(Qv)==="1"}catch{return!1}}function ar(){return typeof window>"u"?!1:!!window.webkit?.messageHandlers?.nativeBridge}function C0(){return typeof window>"u"?null:window.webkit?.messageHandlers?.nativeBridge??null}function z4(){return!!C0()}function Xs(e){const t=C0();if(!t)return!1;try{return t.postMessage(e),!0}catch(n){return console.warn("[tokentracker] nativeBridge post failed:",n),!1}}function $4(){return Xs({type:"getSettings"})}function Ss(e,t){return Xs({type:"setSetting",key:e,value:t})}function H4(e){return Xs({type:"action",name:e})}function YL(){return Xs({type:"getSystemAppearance"})}function ZL(e,t){if(!ar())return;Xs({type:"setChromeAppearance",isDark:e==="dark",theme:t??"system"})}function W4(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 T0=b.createContext(null);function XL(){return ou(Mp())}function QL(e){typeof document>"u"||(document.documentElement.lang=e)}function ek(e,t){GL(e),t(n=>n===e?n:e)}function JL({children:e}){const[t,n]=b.useState(Mp),[a,o]=b.useState(XL);b.useLayoutEffect(()=>{QL(a)},[a]),b.useLayoutEffect(()=>{ar()&&Ss("locale",t)},[t]),b.useLayoutEffect(()=>{if(t!==mo||typeof window>"u")return;const u=()=>ek(ou(mo),o);return window.addEventListener("languagechange",u),()=>window.removeEventListener("languagechange",u)},[t]);const s=b.useCallback(u=>{const h=Ru(u);ek(ou(h),o),n(h),OL(h),ar()&&Ss("locale",h)},[]),c=b.useMemo(()=>({locale:t,setLocale:s,resolvedLocale:a}),[t,a,s]);return N.jsx(T0.Provider,{value:c,children:e})}const eD="https://open.er-api.com/v6/latest/USD",tD=1440*60*1e3,nD=5e3;function rD(e,t=tD,n=Date.now()){return!e||!Number.isFinite(e)?!0:n-e>t}async function aD(e={}){const{timeoutMs:t=nD,fetchImpl:n,url:a=eD,codes:o=Tp}=e,s=n??(typeof fetch<"u"?fetch:null);if(!s)throw new Error("fetch is not available");const c=typeof AbortController<"u"?new AbortController:null,u=c?setTimeout(()=>c.abort(),t):null;try{const h=await s(a,c?{signal:c.signal}:void 0);if(!h||!h.ok)throw new Error(`exchange rate fetch failed: ${h?.status??"no-response"}`);const m=(await h.json())?.rates;if(!m||typeof m!="object")throw new Error("exchange rate response missing rates");const y={USD:1};for(const k of o){if(k==="USD")continue;const w=m[k];ru(w)&&(y[k]=w)}if(Object.keys(y).length<=1)throw new Error("no supported currency rates in response");return{rates:y,fetchedAt:Date.now()}}finally{u&&clearTimeout(u)}}const iD=b.createContext(null);function tk(e,t,n){ar()&&(Ss("currency",e),Ss("currencySymbol",n),ru(t)&&Ss("exchangeRate",t))}function oD({children:e}){const[t,n]=b.useState(XR),a=b.useMemo(()=>eL(),[]),[o,s]=b.useState(a.rates),[c,u]=b.useState(a.source),[h,f]=b.useState(a.fetchedAt),m=b.useRef(!1),y=b.useRef(!1),k=b.useCallback((L,R,O)=>{s(L),u(R),f(O),tL({rates:L,source:R,fetchedAt:O})},[]),w=b.useCallback(async()=>{if(!m.current){m.current=!0;try{const{rates:L,fetchedAt:R}=await aD();k({...Ep,...L},"fetched",R)}catch{}finally{m.current=!1}}},[k]),x=b.useCallback(L=>{const R=Ap(L);n(R),QR(R);const O=Mh(o,R),G=Nc(R);tk(R,O,G)},[o]);b.useEffect(()=>{y.current||t!==Ns&&rD(h)&&(y.current=!0,w())},[t,h,w]),b.useEffect(()=>{const L=Mh(o,t),R=Nc(t);tk(t,L,R)},[t,o]);const C=b.useMemo(()=>Mh(o,t),[o,t]),S=b.useMemo(()=>Nc(t),[t]),D=b.useMemo(()=>({currency:t,rate:C,symbol:S,rates:o,rateSource:c,rateFetchedAt:h,setCurrency:x}),[t,C,S,o,c,h,x]);return N.jsx(iD.Provider,{value:D,children:e})}const sD="modulepreload",lD=function(e){return"/"+e},nk={},$n=function(t,n,a){let o=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 c=document.querySelector("meta[property=csp-nonce]"),u=c?.nonce||c?.getAttribute("nonce");o=h(n.map(f=>{if(f=lD(f),f in nk)return;nk[f]=!0;const m=f.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${y}`))return;const k=document.createElement("link");if(k.rel=m?"stylesheet":sD,m||(k.as="script"),k.crossOrigin="",k.href=f,u&&k.setAttribute("nonce",u),document.head.appendChild(k),m)return new Promise((w,x)=>{k.addEventListener("load",w),k.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&s(u.reason);return t().catch(s)})};var su={},cD=()=>{window.va||(window.va=function(...t){window.vaq||(window.vaq=[]),window.vaq.push(t)})},uD="@vercel/analytics",dD="2.0.1";function E0(){return typeof window<"u"}function A0(){try{const e="production"}catch{}return"production"}function hD(e="auto"){if(e==="auto"){window.vam=A0();return}window.vam=e}function fD(){return(E0()?window.vam:A0())||"production"}function Np(){return fD()==="development"}function pD(e){return e.scriptSrc?ro(e.scriptSrc):Np()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?ro(`${e.basePath}/insights/script.js`):"/_vercel/insights/script.js"}function mD(e,t){var n;let a=e;if(t)try{a={...(n=JSON.parse(t))==null?void 0:n.analytics,...e}}catch{}hD(a.mode);const o={sdkn:uD+(a.framework?`/${a.framework}`:""),sdkv:dD};return a.disableAutoTrack&&(o.disableAutoTrack="1"),a.viewEndpoint&&(o.viewEndpoint=ro(a.viewEndpoint)),a.eventEndpoint&&(o.eventEndpoint=ro(a.eventEndpoint)),a.sessionEndpoint&&(o.sessionEndpoint=ro(a.sessionEndpoint)),Np()&&a.debug===!1&&(o.debug="false"),a.dsn&&(o.dsn=a.dsn),a.endpoint?o.endpoint=a.endpoint:a.basePath&&(o.endpoint=ro(`${a.basePath}/insights`)),{beforeSend:a.beforeSend,src:pD(a),dataset:o}}function ro(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function gD(e={debug:!0},t){var n;if(!E0())return;const{beforeSend:a,src:o,dataset:s}=mD(e,t);if(cD(),a&&((n=window.va)==null||n.call(window,"beforeSend",a)),document.head.querySelector(`script[src*="${o}"]`))return;const c=document.createElement("script");c.src=o;for(const[u,h]of Object.entries(s))c.dataset[u]=h;c.defer=!0,c.onerror=()=>{const u=Np()?"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 ${o}. ${u}`)},document.head.appendChild(c)}function yD({route:e,path:t}){var n;(n=window.va)==null||n.call(window,"pageview",{route:e,path:t})}function vD(){if(!(typeof process>"u"||typeof su>"u"))return su.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function kD(){if(!(typeof process>"u"||typeof su>"u"))return su.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function _D(e){return b.useEffect(()=>{var t;e.beforeSend&&((t=window.va)==null||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),b.useEffect(()=>{gD({framework:e.framework||"react",basePath:e.basePath??vD(),...e.route!==void 0&&{disableAutoTrack:!0},...e},e.configString??kD())},[]),b.useEffect(()=>{e.route&&e.path&&yD({route:e.route,path:e.path})},[e.route,e.path]),null}var lu={},bD=()=>{window.si||(window.si=function(...t){window.siq=window.siq||[],window.siq.push(t)})},wD="@vercel/speed-insights",xD="2.0.0";function PD(){return typeof window<"u"}function SD(){try{const e="production"}catch{}return"production"}function R0(){return SD()==="development"}function CD(e){return e.scriptSrc?cu(e.scriptSrc):R0()?"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?cu(`${e.basePath}/speed-insights/script.js`):"/_vercel/speed-insights/script.js"}function TD(e,t){var n;let a=e;if(t)try{a={...(n=JSON.parse(t))==null?void 0:n.speedInsights,...e}}catch{}const o={sdkn:wD+(a.framework?`/${a.framework}`:""),sdkv:xD};return a.sampleRate&&(o.sampleRate=a.sampleRate.toString()),a.route&&(o.route=a.route),R0()&&a.debug===!1&&(o.debug="false"),a.dsn&&(o.dsn=a.dsn),a.endpoint?o.endpoint=cu(a.endpoint):a.basePath&&(o.endpoint=cu(`${a.basePath}/speed-insights/vitals`)),{src:CD(a),beforeSend:a.beforeSend,dataset:o}}function cu(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function ED(e={},t){var n;if(!PD()||e.route===null)return null;bD();const{beforeSend:a,src:o,dataset:s}=TD(e,t);if(document.head.querySelector(`script[src*="${o}"]`))return null;a&&((n=window.si)==null||n.call(window,"beforeSend",a));const c=document.createElement("script");c.src=o,c.defer=!0;for(const[u,h]of Object.entries(s))c.dataset[u]=h;return c.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${o}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(c),{setRoute:u=>{c.dataset.route=u??void 0}}}function AD(){if(!(typeof process>"u"||typeof lu>"u"))return lu.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function RD(){if(!(typeof process>"u"||typeof lu>"u"))return lu.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function LD(e){b.useEffect(()=>{var n;e.beforeSend&&((n=window.si)==null||n.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);const t=b.useRef(null);return b.useEffect(()=>{if(!t.current){const n=ED({framework:e.framework??"react",basePath:e.basePath??AD(),...e},e.configString??RD());n&&(t.current=n.setRoute)}},[e]),b.useEffect(()=>{t.current&&e.route&&t.current(e.route)},[e.route]),null}const L0=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();const DD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const MD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase());const rk=e=>{const t=MD(e);return t.charAt(0).toUpperCase()+t.slice(1)};var jh={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 ID=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},ND=b.createContext({}),OD=()=>b.useContext(ND),jD=b.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:a,className:o="",children:s,iconNode:c,...u},h)=>{const{size:f=24,strokeWidth:m=2,absoluteStrokeWidth:y=!1,color:k="currentColor",className:w=""}=OD()??{},x=a??y?Number(n??m)*24/Number(t??f):n??m;return b.createElement("svg",{ref:h,...jh,width:t??f??jh.width,height:t??f??jh.height,stroke:e??k,strokeWidth:x,className:L0("lucide",w,o),...!s&&!ID(u)&&{"aria-hidden":"true"},...u},[...c.map(([C,S])=>b.createElement(C,S)),...Array.isArray(s)?s:[s]])});const dn=(e,t)=>{const n=b.forwardRef(({className:a,...o},s)=>b.createElement(jD,{ref:s,iconNode:t,className:L0(`lucide-${DD(rk(e))}`,`lucide-${e}`,a),...o}));return n.displayName=rk(e),n};const UD=[["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"}]],BD=dn("chart-column",UD);const FD=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],VD=dn("gauge",FD);const zD=[["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"}]],$D=dn("globe",zD);const HD=[["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"}]],WD=dn("layout-grid",HD);const KD=[["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"}]],GD=dn("mail",KD);const qD=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],YD=dn("menu",qD);const ZD=[["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"}]],XD=dn("monitor",ZD);const QD=[["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"}]],D0=dn("moon",QD);const JD=[["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"}]],eM=dn("puzzle",JD);const tM=[["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"}]],nM=dn("refresh-cw",tM);const rM=[["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"}]],aM=dn("settings",rM);const iM=[["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"}]],M0=dn("sun",iM);const oM=[["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"}]],sM=dn("triangle-alert",oM);const lM=[["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"}]],cM=dn("trophy",lM);const uM=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],I0=dn("x",uM);function dM({children:e,variant:t="primary",size:n="md",onClick:a,disabled:o=!1,className:s="",as:c="button",...u}){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=o?"cursor-not-allowed opacity-60":"cursor-pointer",k=`${h} ${f[t]} ${m[n]} ${y} ${s}`;return N.jsx(c,{className:k,onClick:a,disabled:o,...u,children:e})}class hM extends Rs.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 N.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:N.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:[N.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:N.jsx(sM,{className:"h-5 w-5","aria-hidden":!0})}),N.jsx("div",{className:"mt-4 text-xs font-medium uppercase text-oai-gray-500 dark:text-oai-gray-400",children:Fe("error.boundary.title")}),N.jsx("h1",{className:"mt-2 text-xl font-semibold text-oai-black dark:text-white",children:Fe("error.boundary.subtitle")}),N.jsx("p",{className:"mt-2 text-sm text-oai-gray-500 dark:text-oai-gray-400",children:Fe("error.boundary.hint")}),N.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}),N.jsxs(dM,{type:"button",size:"md",onClick:this.handleReload,className:"mt-5",children:[N.jsx(nM,{className:"mr-2 h-4 w-4","aria-hidden":!0}),Fe("error.boundary.action.reload")]})]})})}}function Qs(){const e=b.useContext(T0);if(e===null)throw new Error("useLocale must be used within a LocaleProvider");return e}const Sf="tokentracker-theme",N0=b.createContext(null);function fM(){if(typeof window>"u")return"system";try{const e=localStorage.getItem(Sf);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function yc(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function pM(e){if(typeof document>"u")return;const t=document.documentElement;e==="dark"?t.classList.add("dark"):t.classList.remove("dark")}function mM({children:e}){const[t,n]=b.useState(fM),[a,o]=b.useState(()=>{if(t!=="system")return t;if(ar()){const f=Jv();if(typeof f=="boolean")return f?"dark":"light"}return yc()}),s=b.useRef(t);b.useEffect(()=>{s.current=t},[t]),b.useEffect(()=>{pM(a)},[a]),b.useLayoutEffect(()=>{if(t==="system"){if(ar()){const f=Jv();o(typeof f=="boolean"?f?"dark":"light":yc()),YL();return}o(yc())}else o(t)},[t]),b.useEffect(()=>ar()?qL(m=>{s.current==="system"&&o(m?"dark":"light")}):void 0,[]),b.useEffect(()=>{if(typeof window>"u"||t!=="system"||ar())return;const f=window.matchMedia("(prefers-color-scheme: dark)"),m=y=>{const k=y.matches?"dark":"light";o(k)};return f.addEventListener?(f.addEventListener("change",m),()=>f.removeEventListener("change",m)):(f.addListener(m),()=>f.removeListener(m))},[t]),b.useEffect(()=>{const f=t==="system"&&!ar()?yc():a;ZL(f,t)},[a,t]);const c=b.useCallback(f=>{if(n(f),typeof window<"u")try{localStorage.setItem(Sf,f)}catch{}},[]),u=b.useCallback(()=>{c(f=>{const m=f==="dark"?"light":"dark";if(typeof window<"u")try{localStorage.setItem(Sf,m)}catch{}return m})},[]),h=b.useMemo(()=>({theme:t,setTheme:c,toggleTheme:u,resolvedTheme:a}),[t,c,u,a]);return N.jsx(N0.Provider,{value:h,children:e})}const O0=b.createContext({isOpen:!1,openLoginModal:()=>{},closeLoginModal:()=>{}});function gM({children:e}){const[t,n]=b.useState(!1),a=b.useCallback(()=>n(!0),[]),o=b.useCallback(()=>n(!1),[]);return N.jsx(O0.Provider,{value:{isOpen:t,openLoginModal:a,closeLoginModal:o},children:e})}function j0(){return b.useContext(O0)}const Op=b.createContext({});function jp(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const yM=typeof window<"u",U0=yM?b.useLayoutEffect:b.useEffect,Lu=b.createContext(null);function Up(e,t){e.indexOf(t)===-1&&e.push(t)}function uu(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 Bp=()=>{};const Ia={},B0=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function F0(e){return typeof e=="object"&&e!==null}const V0=e=>/^0[^.\s]+$/u.test(e);function z0(e){let t;return()=>(t===void 0&&(t=e()),t)}const jn=e=>e,vM=(e,t)=>n=>t(e(n)),Js=(...e)=>e.reduce(vM),js=(e,t,n)=>{const a=t-e;return a===0?1:(n-e)/a};class Fp{constructor(){this.subscriptions=[]}add(t){return Up(this.subscriptions,t),()=>uu(this.subscriptions,t)}notify(t,n,a){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,a);else for(let s=0;s<o;s++){const c=this.subscriptions[s];c&&c(t,n,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Pn=e=>e*1e3,On=e=>e/1e3;function $0(e,t){return t?e*(1e3/t):0}const H0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,kM=1e-7,_M=12;function bM(e,t,n,a,o){let s,c,u=0;do c=t+(n-t)/2,s=H0(c,a,o)-e,s>0?n=c:t=c;while(Math.abs(s)>kM&&++u<_M);return c}function el(e,t,n,a){if(e===t&&n===a)return jn;const o=s=>bM(s,0,1,e,n);return s=>s===0||s===1?s:H0(o(s),t,a)}const W0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,K0=e=>t=>1-e(1-t),G0=el(.33,1.53,.69,.99),Vp=K0(G0),q0=W0(Vp),Y0=e=>e>=1?1:(e*=2)<1?.5*Vp(e):.5*(2-Math.pow(2,-10*(e-1))),zp=e=>1-Math.sin(Math.acos(e)),Z0=K0(zp),X0=W0(zp),wM=el(.42,0,1,1),xM=el(0,0,.58,1),Q0=el(.42,0,.58,1),PM=e=>Array.isArray(e)&&typeof e[0]!="number",J0=e=>Array.isArray(e)&&typeof e[0]=="number",SM={linear:jn,easeIn:wM,easeInOut:Q0,easeOut:xM,circIn:zp,circInOut:X0,circOut:Z0,backIn:Vp,backInOut:q0,backOut:G0,anticipate:Y0},CM=e=>typeof e=="string",ak=e=>{if(J0(e)){Bp(e.length===4);const[t,n,a,o]=e;return el(t,n,a,o)}else if(CM(e))return SM[e];return e},vc=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function TM(e,t){let n=new Set,a=new Set,o=!1,s=!1;const c=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function h(m){c.has(m)&&(f.schedule(m),e()),m(u)}const f={schedule:(m,y=!1,k=!1)=>{const x=k&&o?n:a;return y&&c.add(m),x.add(m),m},cancel:m=>{a.delete(m),c.delete(m)},process:m=>{if(u=m,o){s=!0;return}o=!0;const y=n;n=a,a=y,n.forEach(h),n.clear(),o=!1,s&&(s=!1,f.process(m))}};return f}const EM=40;function ew(e,t){let n=!1,a=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,c=vc.reduce((R,O)=>(R[O]=TM(s),R),{}),{setup:u,read:h,resolveKeyframes:f,preUpdate:m,update:y,preRender:k,render:w,postRender:x}=c,C=()=>{const R=Ia.useManualTiming,O=R?o.timestamp:performance.now();n=!1,R||(o.delta=a?1e3/60:Math.max(Math.min(O-o.timestamp,EM),1)),o.timestamp=O,o.isProcessing=!0,u.process(o),h.process(o),f.process(o),m.process(o),y.process(o),k.process(o),w.process(o),x.process(o),o.isProcessing=!1,n&&t&&(a=!1,e(C))},S=()=>{n=!0,a=!0,o.isProcessing||e(C)};return{schedule:vc.reduce((R,O)=>{const G=c[O];return R[O]=(W,z=!1,P=!1)=>(n||S(),G.schedule(W,z,P)),R},{}),cancel:R=>{for(let O=0;O<vc.length;O++)c[vc[O]].cancel(R)},state:o,steps:c}}const{schedule:dt,cancel:Na,state:Kt,steps:Uh}=ew(typeof requestAnimationFrame<"u"?requestAnimationFrame:jn,!0);let jc;function AM(){jc=void 0}const sn={now:()=>(jc===void 0&&sn.set(Kt.isProcessing||Ia.useManualTiming?Kt.timestamp:performance.now()),jc),set:e=>{jc=e,queueMicrotask(AM)}},tw=e=>t=>typeof t=="string"&&t.startsWith(e),nw=tw("--"),RM=tw("var(--"),$p=e=>RM(e)?LM.test(e.split("/*")[0].trim()):!1,LM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ik(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const _o={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Us={..._o,transform:e=>xr(0,1,e)},kc={..._o,default:1},Cs=e=>Math.round(e*1e5)/1e5,Hp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function DM(e){return e==null}const MM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Wp=(e,t)=>n=>!!(typeof n=="string"&&MM.test(n)&&n.startsWith(e)||t&&!DM(n)&&Object.prototype.hasOwnProperty.call(n,t)),rw=(e,t,n)=>a=>{if(typeof a!="string")return a;const[o,s,c,u]=a.match(Hp);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(c),alpha:u!==void 0?parseFloat(u):1}},IM=e=>xr(0,255,e),Bh={..._o,transform:e=>Math.round(IM(e))},ai={test:Wp("rgb","red"),parse:rw("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:a=1})=>"rgba("+Bh.transform(e)+", "+Bh.transform(t)+", "+Bh.transform(n)+", "+Cs(Us.transform(a))+")"};function NM(e){let t="",n="",a="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),a=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),a=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,a+=a,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(a,16),alpha:o?parseInt(o,16)/255:1}}const Cf={test:Wp("#"),parse:NM,transform:ai.transform},tl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sa=tl("deg"),vr=tl("%"),_e=tl("px"),OM=tl("vh"),jM=tl("vw"),ok={...vr,parse:e=>vr.parse(e)/100,transform:e=>vr.transform(e*100)},ao={test:Wp("hsl","hue"),parse:rw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:a=1})=>"hsla("+Math.round(e)+", "+vr.transform(Cs(t))+", "+vr.transform(Cs(n))+", "+Cs(Us.transform(a))+")"},Lt={test:e=>ai.test(e)||Cf.test(e)||ao.test(e),parse:e=>ai.test(e)?ai.parse(e):ao.test(e)?ao.parse(e):Cf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ai.transform(e):ao.transform(e),getAnimatableNone:e=>{const t=Lt.parse(e);return t.alpha=0,Lt.transform(t)}},UM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function BM(e){return isNaN(e)&&typeof e=="string"&&(e.match(Hp)?.length||0)+(e.match(UM)?.length||0)>0}const aw="number",iw="color",FM="var",VM="var(",sk="${}",zM=/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 go(e){const t=e.toString(),n=[],a={color:[],number:[],var:[]},o=[];let s=0;const u=t.replace(zM,h=>(Lt.test(h)?(a.color.push(s),o.push(iw),n.push(Lt.parse(h))):h.startsWith(VM)?(a.var.push(s),o.push(FM),n.push(h)):(a.number.push(s),o.push(aw),n.push(parseFloat(h))),++s,sk)).split(sk);return{values:n,split:u,indexes:a,types:o}}function $M(e){return go(e).values}function ow({split:e,types:t}){const n=e.length;return a=>{let o="";for(let s=0;s<n;s++)if(o+=e[s],a[s]!==void 0){const c=t[s];c===aw?o+=Cs(a[s]):c===iw?o+=Lt.transform(a[s]):o+=a[s]}return o}}function HM(e){return ow(go(e))}const WM=e=>typeof e=="number"?0:Lt.test(e)?Lt.getAnimatableNone(e):e,KM=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:WM(e);function GM(e){const t=go(e);return ow(t)(t.values.map((a,o)=>KM(a,t.split[o])))}const or={test:BM,parse:$M,createTransformer:HM,getAnimatableNone:GM};function Fh(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 qM({hue:e,saturation:t,lightness:n,alpha:a}){e/=360,t/=100,n/=100;let o=0,s=0,c=0;if(!t)o=s=c=n;else{const u=n<.5?n*(1+t):n+t-n*t,h=2*n-u;o=Fh(h,u,e+1/3),s=Fh(h,u,e),c=Fh(h,u,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(c*255),alpha:a}}function du(e,t){return n=>n>0?t:e}const vt=(e,t,n)=>e+(t-e)*n,Vh=(e,t,n)=>{const a=e*e,o=n*(t*t-a)+a;return o<0?0:Math.sqrt(o)},YM=[Cf,ai,ao],ZM=e=>YM.find(t=>t.test(e));function lk(e){const t=ZM(e);if(!t)return!1;let n=t.parse(e);return t===ao&&(n=qM(n)),n}const ck=(e,t)=>{const n=lk(e),a=lk(t);if(!n||!a)return du(e,t);const o={...n};return s=>(o.red=Vh(n.red,a.red,s),o.green=Vh(n.green,a.green,s),o.blue=Vh(n.blue,a.blue,s),o.alpha=vt(n.alpha,a.alpha,s),ai.transform(o))},Tf=new Set(["none","hidden"]);function XM(e,t){return Tf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function QM(e,t){return n=>vt(e,t,n)}function Kp(e){return typeof e=="number"?QM:typeof e=="string"?$p(e)?du:Lt.test(e)?ck:t2:Array.isArray(e)?sw:typeof e=="object"?Lt.test(e)?ck:JM:du}function sw(e,t){const n=[...e],a=n.length,o=e.map((s,c)=>Kp(s)(s,t[c]));return s=>{for(let c=0;c<a;c++)n[c]=o[c](s);return n}}function JM(e,t){const n={...e,...t},a={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(a[o]=Kp(e[o])(e[o],t[o]));return o=>{for(const s in a)n[s]=a[s](o);return n}}function e2(e,t){const n=[],a={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],c=e.indexes[s][a[s]],u=e.values[c]??0;n[o]=u,a[s]++}return n}const t2=(e,t)=>{const n=or.createTransformer(t),a=go(e),o=go(t);return a.indexes.var.length===o.indexes.var.length&&a.indexes.color.length===o.indexes.color.length&&a.indexes.number.length>=o.indexes.number.length?Tf.has(e)&&!o.values.length||Tf.has(t)&&!a.values.length?XM(e,t):Js(sw(e2(a,o),o.values),n):du(e,t)};function lw(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?vt(e,t,n):Kp(e)(e,t)}const n2=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>dt.update(t,n),stop:()=>Na(t),now:()=>Kt.isProcessing?Kt.timestamp:sn.now()}},cw=(e,t,n=10)=>{let a="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)a+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${a.substring(0,a.length-2)})`},hu=2e4;function Gp(e){let t=0;const n=50;let a=e.next(t);for(;!a.done&&t<hu;)t+=n,a=e.next(t);return t>=hu?1/0:t}function r2(e,t=100,n){const a=n({...e,keyframes:[0,t]}),o=Math.min(Gp(a),hu);return{type:"keyframes",ease:s=>a.next(o*s).value/t,duration:On(o)}}const Pt={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 Ef(e,t){return e*Math.sqrt(1-t*t)}const a2=12;function i2(e,t,n){let a=n;for(let o=1;o<a2;o++)a=a-e(a)/t(a);return a}const zh=.001;function o2({duration:e=Pt.duration,bounce:t=Pt.bounce,velocity:n=Pt.velocity,mass:a=Pt.mass}){let o,s,c=1-t;c=xr(Pt.minDamping,Pt.maxDamping,c),e=xr(Pt.minDuration,Pt.maxDuration,On(e)),c<1?(o=f=>{const m=f*c,y=m*e,k=m-n,w=Ef(f,c),x=Math.exp(-y);return zh-k/w*x},s=f=>{const y=f*c*e,k=y*n+n,w=Math.pow(c,2)*Math.pow(f,2)*e,x=Math.exp(-y),C=Ef(Math.pow(f,2),c);return(-o(f)+zh>0?-1:1)*((k-w)*x)/C}):(o=f=>{const m=Math.exp(-f*e),y=(f-n)*e+1;return-zh+m*y},s=f=>{const m=Math.exp(-f*e),y=(n-f)*(e*e);return m*y});const u=5/e,h=i2(o,s,u);if(e=Pn(e),isNaN(h))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:e};{const f=Math.pow(h,2)*a;return{stiffness:f,damping:c*2*Math.sqrt(a*f),duration:e}}}const s2=["duration","bounce"],l2=["stiffness","damping","mass"];function uk(e,t){return t.some(n=>e[n]!==void 0)}function c2(e){let t={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...e};if(!uk(e,l2)&&uk(e,s2))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,a=2*Math.PI/(n*1.2),o=a*a,s=2*xr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Pt.mass,stiffness:o,damping:s}}else{const n=o2({...e,velocity:0});t={...t,...n,mass:Pt.mass},t.isResolvedFromDuration=!0}return t}function fu(e=Pt.visualDuration,t=Pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:a,restDelta:o}=n;const s=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],u={done:!1,value:s},{stiffness:h,damping:f,mass:m,duration:y,velocity:k,isResolvedFromDuration:w}=c2({...n,velocity:-On(n.velocity||0)}),x=k||0,C=f/(2*Math.sqrt(h*m)),S=c-s,D=On(Math.sqrt(h/m)),L=Math.abs(S)<5;a||(a=L?Pt.restSpeed.granular:Pt.restSpeed.default),o||(o=L?Pt.restDelta.granular:Pt.restDelta.default);let R,O,G,W,z,P;if(C<1)G=Ef(D,C),W=(x+C*D*S)/G,R=X=>{const ue=Math.exp(-C*D*X);return c-ue*(W*Math.sin(G*X)+S*Math.cos(G*X))},z=C*D*W+S*G,P=C*D*S-W*G,O=X=>Math.exp(-C*D*X)*(z*Math.sin(G*X)+P*Math.cos(G*X));else if(C===1){R=ue=>c-Math.exp(-D*ue)*(S+(x+D*S)*ue);const X=x+D*S;O=ue=>Math.exp(-D*ue)*(D*X*ue-x)}else{const X=D*Math.sqrt(C*C-1);R=fe=>{const le=Math.exp(-C*D*fe),pe=Math.min(X*fe,300);return c-le*((x+C*D*S)*Math.sinh(pe)+X*S*Math.cosh(pe))/X};const ue=(x+C*D*S)/X,se=C*D*ue-S*X,Ae=C*D*S-ue*X;O=fe=>{const le=Math.exp(-C*D*fe),pe=Math.min(X*fe,300);return le*(se*Math.sinh(pe)+Ae*Math.cosh(pe))}}const Y={calculatedDuration:w&&y||null,velocity:X=>Pn(O(X)),next:X=>{if(!w&&C<1){const se=Math.exp(-C*D*X),Ae=Math.sin(G*X),fe=Math.cos(G*X),le=c-se*(W*Ae+S*fe),pe=Pn(se*(z*Ae+P*fe));return u.done=Math.abs(pe)<=a&&Math.abs(c-le)<=o,u.value=u.done?c:le,u}const ue=R(X);if(w)u.done=X>=y;else{const se=Pn(O(X));u.done=Math.abs(se)<=a&&Math.abs(c-ue)<=o}return u.value=u.done?c:ue,u},toString:()=>{const X=Math.min(Gp(Y),hu),ue=cw(se=>Y.next(X*se).value,X,30);return X+"ms "+ue},toTransition:()=>{}};return Y}fu.applyToOptions=e=>{const t=r2(e,100,fu);return e.ease=t.ease,e.duration=Pn(t.duration),e.type="keyframes",e};const u2=5;function uw(e,t,n){const a=Math.max(t-u2,0);return $0(n-e(a),t-a)}function Af({keyframes:e,velocity:t=0,power:n=.8,timeConstant:a=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:c,min:u,max:h,restDelta:f=.5,restSpeed:m}){const y=e[0],k={done:!1,value:y},w=P=>u!==void 0&&P<u||h!==void 0&&P>h,x=P=>u===void 0?h:h===void 0||Math.abs(u-P)<Math.abs(h-P)?u:h;let C=n*t;const S=y+C,D=c===void 0?S:c(S);D!==S&&(C=D-y);const L=P=>-C*Math.exp(-P/a),R=P=>D+L(P),O=P=>{const Y=L(P),X=R(P);k.done=Math.abs(Y)<=f,k.value=k.done?D:X};let G,W;const z=P=>{w(k.value)&&(G=P,W=fu({keyframes:[k.value,x(k.value)],velocity:uw(R,P,k.value),damping:o,stiffness:s,restDelta:f,restSpeed:m}))};return z(0),{calculatedDuration:null,next:P=>{let Y=!1;return!W&&G===void 0&&(Y=!0,O(P),z(P)),G!==void 0&&P>=G?W.next(P-G):(!Y&&O(P),k)}}}function d2(e,t,n){const a=[],o=n||Ia.mix||lw,s=e.length-1;for(let c=0;c<s;c++){let u=o(e[c],e[c+1]);if(t){const h=Array.isArray(t)?t[c]||jn:t;u=Js(h,u)}a.push(u)}return a}function h2(e,t,{clamp:n=!0,ease:a,mixer:o}={}){const s=e.length;if(Bp(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=d2(t,a,o),h=u.length,f=m=>{if(c&&m<e[0])return t[0];let y=0;if(h>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const k=js(e[y],e[y+1],m);return u[y](k)};return n?m=>f(xr(e[0],e[s-1],m)):f}function f2(e,t){const n=e[e.length-1];for(let a=1;a<=t;a++){const o=js(0,t,a);e.push(vt(n,1,o))}}function p2(e){const t=[0];return f2(t,e.length-1),t}function m2(e,t){return e.map(n=>n*t)}function g2(e,t){return e.map(()=>t||Q0).splice(0,e.length-1)}function Ts({duration:e=300,keyframes:t,times:n,ease:a="easeInOut"}){const o=PM(a)?a.map(ak):ak(a),s={done:!1,value:t[0]},c=m2(n&&n.length===t.length?n:p2(t),e),u=h2(c,t,{ease:Array.isArray(o)?o:g2(t,o)});return{calculatedDuration:e,next:h=>(s.value=u(h),s.done=h>=e,s)}}const y2=e=>e!==null;function Du(e,{repeat:t,repeatType:n="loop"},a,o=1){const s=e.filter(y2),u=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!u||a===void 0?s[u]:a}const v2={decay:Af,inertia:Af,tween:Ts,keyframes:Ts,spring:fu};function dw(e){typeof e.type=="string"&&(e.type=v2[e.type])}class qp{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 k2=e=>e/100;class pu extends qp{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!==sn.now()&&this.tick(sn.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;dw(t);const{type:n=Ts,repeat:a=0,repeatDelay:o=0,repeatType:s,velocity:c=0}=t;let{keyframes:u}=t;const h=n||Ts;h!==Ts&&typeof u[0]!="number"&&(this.mixKeyframes=Js(k2,lw(u[0],u[1])),u=[0,100]);const f=h({...t,keyframes:u});s==="mirror"&&(this.mirroredGenerator=h({...t,keyframes:[...u].reverse(),velocity:-c})),f.calculatedDuration===null&&(f.calculatedDuration=Gp(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+o,this.totalDuration=this.resolvedDuration*(a+1)-o,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:o,mixKeyframes:s,mirroredGenerator:c,resolvedDuration:u,calculatedDuration:h}=this;if(this.startTime===null)return a.next(0);const{delay:f=0,keyframes:m,repeat:y,repeatType:k,repeatDelay:w,type:x,onUpdate:C,finalKeyframe:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const D=this.currentTime-f*(this.playbackSpeed>=0?1:-1),L=this.playbackSpeed>=0?D<0:D>o;this.currentTime=Math.max(D,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let R=this.currentTime,O=a;if(y){const P=Math.min(this.currentTime,o)/u;let Y=Math.floor(P),X=P%1;!X&&P>=1&&(X=1),X===1&&Y--,Y=Math.min(Y,y+1),Y%2&&(k==="reverse"?(X=1-X,w&&(X-=w/u)):k==="mirror"&&(O=c)),R=xr(0,1,X)*u}let G;L?(this.delayState.value=m[0],G=this.delayState):G=O.next(R),s&&!L&&(G.value=s(G.value));let{done:W}=G;!L&&h!==null&&(W=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&W);return z&&x!==Af&&(G.value=Du(m,this.options,S,this.speed)),C&&C(G.value),z&&this.finish(),G}then(t,n){return this.finished.then(t,n)}get duration(){return On(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+On(t)}get time(){return On(this.currentTime)}set time(t){t=Pn(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 uw(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(sn.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=On(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=n2,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),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(sn.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 _2(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ii=e=>e*180/Math.PI,Rf=e=>{const t=ii(Math.atan2(e[1],e[0]));return Lf(t)},b2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Rf,rotateZ:Rf,skewX:e=>ii(Math.atan(e[1])),skewY:e=>ii(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Lf=e=>(e=e%360,e<0&&(e+=360),e),dk=Rf,hk=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),fk=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),w2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hk,scaleY:fk,scale:e=>(hk(e)+fk(e))/2,rotateX:e=>Lf(ii(Math.atan2(e[6],e[5]))),rotateY:e=>Lf(ii(Math.atan2(-e[2],e[0]))),rotateZ:dk,rotate:dk,skewX:e=>ii(Math.atan(e[4])),skewY:e=>ii(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Df(e){return e.includes("scale")?1:0}function Mf(e,t){if(!e||e==="none")return Df(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let a,o;if(n)a=w2,o=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);a=b2,o=u}if(!o)return Df(t);const s=a[t],c=o[1].split(",").map(P2);return typeof s=="function"?s(c):c[s]}const x2=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Mf(n,t)};function P2(e){return parseFloat(e.trim())}const bo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wo=new Set(bo),pk=e=>e===_o||e===_e,S2=new Set(["x","y","z"]),C2=bo.filter(e=>!S2.has(e));function T2(e){const t=[];return C2.forEach(n=>{const a=e.getValue(n);a!==void 0&&(t.push([n,a.get()]),a.set(n.startsWith("scale")?1:0))}),t}const La={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:a})=>{const o=e.max-e.min;return a==="border-box"?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:a})=>{const o=e.max-e.min;return a==="border-box"?o:o-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})=>Mf(t,"x"),y:(e,{transform:t})=>Mf(t,"y")};La.translateX=La.x;La.translateY=La.y;const oi=new Set;let If=!1,Nf=!1,Of=!1;function hw(){if(Nf){const e=Array.from(oi).filter(a=>a.needsMeasurement),t=new Set(e.map(a=>a.element)),n=new Map;t.forEach(a=>{const o=T2(a);o.length&&(n.set(a,o),a.render())}),e.forEach(a=>a.measureInitialState()),t.forEach(a=>{a.render();const o=n.get(a);o&&o.forEach(([s,c])=>{a.getValue(s)?.set(c)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}Nf=!1,If=!1,oi.forEach(e=>e.complete(Of)),oi.clear()}function fw(){oi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Nf=!0)})}function E2(){Of=!0,fw(),hw(),Of=!1}class Yp{constructor(t,n,a,o,s,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=a,this.motionValue=o,this.element=s,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(oi.add(this),If||(If=!0,dt.read(fw),dt.resolveKeyframes(hw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:a,motionValue:o}=this;if(t[0]===null){const s=o?.get(),c=t[t.length-1];if(s!==void 0)t[0]=s;else if(a&&n){const u=a.readValue(n,c);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=c),o&&s===void 0&&o.set(t[0])}_2(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),oi.delete(this)}cancel(){this.state==="scheduled"&&(oi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const A2=e=>e.startsWith("--");function pw(e,t,n){A2(t)?e.style.setProperty(t,n):e.style[t]=n}const R2={};function mw(e,t){const n=z0(e);return()=>R2[t]??n()}const L2=mw(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),gw=mw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_s=([e,t,n,a])=>`cubic-bezier(${e}, ${t}, ${n}, ${a})`,mk={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_s([0,.65,.55,1]),circOut:_s([.55,0,1,.45]),backIn:_s([.31,.01,.66,-.59]),backOut:_s([.33,1.53,.69,.99])};function yw(e,t){if(e)return typeof e=="function"?gw()?cw(e,t):"ease-out":J0(e)?_s(e):Array.isArray(e)?e.map(n=>yw(n,t)||mk.easeOut):mk[e]}function D2(e,t,n,{delay:a=0,duration:o=300,repeat:s=0,repeatType:c="loop",ease:u="easeOut",times:h}={},f=void 0){const m={[t]:n};h&&(m.offset=h);const y=yw(u,o);Array.isArray(y)&&(m.easing=y);const k={delay:a,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:s+1,direction:c==="reverse"?"alternate":"normal"};return f&&(k.pseudoElement=f),e.animate(m,k)}function vw(e){return typeof e=="function"&&"applyToOptions"in e}function M2({type:e,...t}){return vw(e)&&gw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class kw extends qp{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:a,keyframes:o,pseudoElement:s,allowFlatten:c=!1,finalKeyframe:u,onComplete:h}=t;this.isPseudoElement=!!s,this.allowFlatten=c,this.options=t,Bp(typeof t.type!="string");const f=M2(t);this.animation=D2(n,a,o,f,s),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const m=Du(o,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(m),pw(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 On(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+On(t)}get time(){return On(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Pn(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:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&L2()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),a&&(this.animation.rangeEnd=a),jn):o(this)}}const _w={anticipate:Y0,backInOut:q0,circInOut:X0};function I2(e){return e in _w}function N2(e){typeof e.ease=="string"&&I2(e.ease)&&(e.ease=_w[e.ease])}const $h=10;class O2 extends kw{constructor(t){N2(t),dw(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:o,element:s,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new pu({...c,autoplay:!1}),h=Math.max($h,sn.now()-this.startTime),f=xr(0,$h,h-$h),m=u.sample(h).value,{name:y}=this.options;s&&y&&pw(s,y,m),n.setWithVelocity(u.sample(Math.max(0,h-f)).value,m,f),u.stop()}}const gk=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(or.test(e)||e==="0")&&!e.startsWith("url("));function j2(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 U2(e,t,n,a){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],c=gk(o,t),u=gk(s,t);return!c||!u?!1:j2(e)||(n==="spring"||vw(n))&&a}function jf(e){e.duration=0,e.type="keyframes"}const bw=new Set(["opacity","clipPath","filter","transform"]),B2=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function F2(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&B2.test(e[t]))return!0;return!1}const V2=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),z2=z0(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function $2(e){const{motionValue:t,name:n,repeatDelay:a,repeatType:o,damping:s,type:c,keyframes:u}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:m}=t.owner.getProps();return z2()&&n&&(bw.has(n)||V2.has(n)&&F2(u))&&(n!=="transform"||!m)&&!f&&!a&&o!=="mirror"&&s!==0&&c!=="inertia"}const H2=40;class W2 extends qp{constructor({autoplay:t=!0,delay:n=0,type:a="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:c="loop",keyframes:u,name:h,motionValue:f,element:m,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=sn.now();const k={autoplay:t,delay:n,type:a,repeat:o,repeatDelay:s,repeatType:c,name:h,motionValue:f,element:m,...y},w=m?.KeyframeResolver||Yp;this.keyframeResolver=new w(u,(x,C,S)=>this.onKeyframesResolved(x,C,k,!S),h,f,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,a,o){this.keyframeResolver=void 0;const{name:s,type:c,velocity:u,delay:h,isHandoff:f,onUpdate:m}=a;this.resolvedAt=sn.now();let y=!0;U2(t,s,c,u)||(y=!1,(Ia.instantAnimations||!h)&&m?.(Du(t,a,n)),t[0]=t[t.length-1],jf(a),a.repeat=0);const w={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>H2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...a,keyframes:t},x=y&&!f&&$2(w),C=w.motionValue?.owner?.current;let S;if(x)try{S=new O2({...w,element:C})}catch{S=new pu(w)}else S=new pu(w);S.finished.then(()=>{this.notifyFinished()}).catch(jn),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}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(),E2()),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 ww(e,t,n,a=0,o=1){const s=Array.from(e).sort((f,m)=>f.sortNodePosition(m)).indexOf(t),c=e.size,u=(c-1)*a;return typeof n=="function"?n(s,c):o===1?s*a:u-s*a}const K2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function G2(e){const t=K2.exec(e);if(!t)return[,];const[,n,a,o]=t;return[`--${n??a}`,o]}function xw(e,t,n=1){const[a,o]=G2(e);if(!a)return;const s=window.getComputedStyle(t).getPropertyValue(a);if(s){const c=s.trim();return B0(c)?parseFloat(c):c}return $p(o)?xw(o,t,n+1):o}const q2={type:"spring",stiffness:500,damping:25,restSpeed:10},Y2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Z2={type:"keyframes",duration:.8},X2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Q2=(e,{keyframes:t})=>t.length>2?Z2:wo.has(e)?e.startsWith("scale")?Y2(t[1]):q2:X2;function Pw(e,t){if(e?.inherit&&t){const{inherit:n,...a}=e;return{...t,...a}}return e}function Zp(e,t){const n=e?.[t]??e?.default??e;return n!==e?Pw(n,e):n}const J2=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function eI(e){for(const t in e)if(!J2.has(t))return!0;return!1}const Xp=(e,t,n,a={},o,s)=>c=>{const u=Zp(a,e)||{},h=u.delay||a.delay||0;let{elapsed:f=0}=a;f=f-Pn(h);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-f,onUpdate:k=>{t.set(k),u.onUpdate&&u.onUpdate(k)},onComplete:()=>{c(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:s?void 0:o};eI(u)||Object.assign(m,Q2(e,m)),m.duration&&(m.duration=Pn(m.duration)),m.repeatDelay&&(m.repeatDelay=Pn(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(jf(m),m.delay===0&&(y=!0)),(Ia.instantAnimations||Ia.skipAnimations||o?.shouldSkipAnimations)&&(y=!0,jf(m),m.delay=0),m.allowFlatten=!u.type&&!u.ease,y&&!s&&t.get()!==void 0){const k=Du(m.keyframes,u);if(k!==void 0){dt.update(()=>{m.onUpdate(k),m.onComplete()});return}}return u.isSync?new pu(m):new W2(m)};function yk(e){const t=[{},{}];return e?.values.forEach((n,a)=>{t[0][a]=n.get(),t[1][a]=n.getVelocity()}),t}function Qp(e,t,n,a){if(typeof t=="function"){const[o,s]=yk(a);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=yk(a);t=t(n!==void 0?n:e.custom,o,s)}return t}function si(e,t,n){const a=e.getProps();return Qp(a,t,n!==void 0?n:a.custom,e)}const Sw=new Set(["width","height","top","left","right","bottom",...bo]),vk=30,tI=e=>!isNaN(parseFloat(e)),kk={current:void 0};class nI{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=a=>{const o=sn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=sn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tI(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 Fp);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 kk.current&&kk.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=sn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vk)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vk);return $0(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 yo(e,t){return new nI(e,t)}const Uf=e=>Array.isArray(e);function rI(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yo(n))}function aI(e){return Uf(e)?e[e.length-1]||0:e}function iI(e,t){const n=si(e,t);let{transitionEnd:a={},transition:o={},...s}=n||{};s={...s,...a};for(const c in s){const u=aI(s[c]);rI(e,c,u)}}const Gt=e=>!!(e&&e.getVelocity);function oI(e){return!!(Gt(e)&&e.add)}function Bf(e,t){const n=e.getValue("willChange");if(oI(n))return n.add(t);if(!n&&Ia.WillChange){const a=new Ia.WillChange("auto");e.addValue("willChange",a),a.add(t)}}function Jp(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const sI="framerAppearId",Cw="data-"+Jp(sI);function Tw(e){return e.props[Cw]}function lI({protectedKeys:e,needsAnimating:t},n){const a=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,a}function Ew(e,t,{delay:n=0,transitionOverride:a,type:o}={}){let{transition:s,transitionEnd:c,...u}=t;const h=e.getDefaultTransition();s=s?Pw(s,h):h;const f=s?.reduceMotion;a&&(s=a);const m=[],y=o&&e.animationState&&e.animationState.getState()[o];for(const k in u){const w=e.getValue(k,e.latestValues[k]??null),x=u[k];if(x===void 0||y&&lI(y,k))continue;const C={delay:n,...Zp(s||{},k)},S=w.get();if(S!==void 0&&!w.isAnimating()&&!Array.isArray(x)&&x===S&&!C.velocity){dt.update(()=>w.set(x));continue}let D=!1;if(window.MotionHandoffAnimation){const O=Tw(e);if(O){const G=window.MotionHandoffAnimation(O,k,dt);G!==null&&(C.startTime=G,D=!0)}}Bf(e,k);const L=f??e.shouldReduceMotion;w.start(Xp(k,w,x,L&&Sw.has(k)?{type:!1}:C,e,D));const R=w.animation;R&&m.push(R)}if(c){const k=()=>dt.update(()=>{c&&iI(e,c)});m.length?Promise.all(m).then(k):k()}return m}function Ff(e,t,n={}){const a=si(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(o=n.transitionOverride);const s=a?()=>Promise.all(Ew(e,a,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:f=0,staggerChildren:m,staggerDirection:y}=o;return cI(e,t,h,f,m,y,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[h,f]=u==="beforeChildren"?[s,c]:[c,s];return h().then(()=>f())}else return Promise.all([s(),c(n.delay)])}function cI(e,t,n=0,a=0,o=0,s=1,c){const u=[];for(const h of e.variantChildren)h.notify("AnimationStart",t),u.push(Ff(h,t,{...c,delay:n+(typeof a=="function"?0:a)+ww(e.variantChildren,h,a,o,s)}).then(()=>h.notify("AnimationComplete",t)));return Promise.all(u)}function uI(e,t,n={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){const o=t.map(s=>Ff(e,s,n));a=Promise.all(o)}else if(typeof t=="string")a=Ff(e,t,n);else{const o=typeof t=="function"?si(e,t,n.custom):t;a=Promise.all(Ew(e,o,n))}return a.then(()=>{e.notify("AnimationComplete",t)})}const dI={test:e=>e==="auto",parse:e=>e},Aw=e=>t=>t.test(e),Rw=[_o,_e,vr,Sa,jM,OM,dI],_k=e=>Rw.find(Aw(e));function hI(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||V0(e):!0}const fI=new Set(["brightness","contrast","saturate","opacity"]);function pI(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[a]=n.match(Hp)||[];if(!a)return e;const o=n.replace(a,"");let s=fI.has(t)?1:0;return a!==n&&(s*=100),t+"("+s+o+")"}const mI=/\b([a-z-]*)\(.*?\)/gu,Vf={...or,getAnimatableNone:e=>{const t=e.match(mI);return t?t.map(pI).join(" "):e}},zf={...or,getAnimatableNone:e=>{const t=or.parse(e);return or.createTransformer(e)(t.map(a=>typeof a=="number"?0:typeof a=="object"?{...a,alpha:1}:a))}},bk={..._o,transform:Math.round},gI={rotate:Sa,rotateX:Sa,rotateY:Sa,rotateZ:Sa,scale:kc,scaleX:kc,scaleY:kc,scaleZ:kc,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:Us,originX:ok,originY:ok,originZ:_e},em={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,...gI,zIndex:bk,fillOpacity:Us,strokeOpacity:Us,numOctaves:bk},yI={...em,color:Lt,backgroundColor:Lt,outlineColor:Lt,fill:Lt,stroke:Lt,borderColor:Lt,borderTopColor:Lt,borderRightColor:Lt,borderBottomColor:Lt,borderLeftColor:Lt,filter:Vf,WebkitFilter:Vf,mask:zf,WebkitMask:zf},Lw=e=>yI[e],vI=new Set([Vf,zf]);function Dw(e,t){let n=Lw(e);return vI.has(n)||(n=or),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const kI=new Set(["auto","none","0"]);function _I(e,t,n){let a=0,o;for(;a<e.length&&!o;){const s=e[a];typeof s=="string"&&!kI.has(s)&&go(s).values.length&&(o=e[a]),a++}if(o&&n)for(const s of t)e[s]=Dw(n,o)}class bI extends Yp{constructor(t,n,a,o,s){super(t,n,a,o,s,!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(),$p(y))){const k=xw(y,n.current);k!==void 0&&(t[m]=k),m===t.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!Sw.has(a)||t.length!==2)return;const[o,s]=t,c=_k(o),u=_k(s),h=ik(o),f=ik(s);if(h!==f&&La[a]){this.needsMeasurement=!0;return}if(c!==u)if(pk(c)&&pk(u))for(let m=0;m<t.length;m++){const y=t[m];typeof y=="string"&&(t[m]=parseFloat(y))}else La[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,a=[];for(let o=0;o<t.length;o++)(t[o]===null||hI(t[o]))&&a.push(o);a.length&&_I(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=La[a](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(a,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:a}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=a.length-1,c=a[s];a[s]=La[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([u,h])=>{t.getValue(u).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 o=n?.[e]??a.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(a=>a!=null)}const Iw=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Uc(e){return F0(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:tm}=ew(queueMicrotask,!1),nr={x:!1,y:!1};function Nw(){return nr.x||nr.y}function wI(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 Ow(e,t){const n=Mw(e),a=new AbortController,o={passive:!0,...t,signal:a.signal};return[n,o,()=>a.abort()]}function xI(e){return!(e.pointerType==="touch"||Nw())}function PI(e,t,n={}){const[a,o,s]=Ow(e,n);return a.forEach(c=>{let u=!1,h=!1,f;const m=()=>{c.removeEventListener("pointerleave",x)},y=S=>{f&&(f(S),f=void 0),m()},k=S=>{u=!1,window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k),h&&(h=!1,y(S))},w=()=>{u=!0,window.addEventListener("pointerup",k,o),window.addEventListener("pointercancel",k,o)},x=S=>{if(S.pointerType!=="touch"){if(u){h=!0;return}y(S)}},C=S=>{if(!xI(S))return;h=!1;const D=t(c,S);typeof D=="function"&&(f=D,c.addEventListener("pointerleave",x,o))};c.addEventListener("pointerenter",C,o),c.addEventListener("pointerdown",w,o)}),s}const jw=(e,t)=>t?e===t?!0:jw(e,t.parentElement):!1,nm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,SI=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function CI(e){return SI.has(e.tagName)||e.isContentEditable===!0}const TI=new Set(["INPUT","SELECT","TEXTAREA"]);function EI(e){return TI.has(e.tagName)||e.isContentEditable===!0}const Bc=new WeakSet;function wk(e){return t=>{t.key==="Enter"&&e(t)}}function Hh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const AI=(e,t)=>{const n=e.currentTarget;if(!n)return;const a=wk(()=>{if(Bc.has(n))return;Hh(n,"down");const o=wk(()=>{Hh(n,"up")}),s=()=>Hh(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",a,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",a),t)};function xk(e){return nm(e)&&!Nw()}const Pk=new WeakSet;function RI(e,t,n={}){const[a,o,s]=Ow(e,n),c=u=>{const h=u.currentTarget;if(!xk(u)||Pk.has(u))return;Bc.add(h),n.stopPropagation&&Pk.add(u);const f=t(h,u),m=(w,x)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",k),Bc.has(h)&&Bc.delete(h),xk(w)&&typeof f=="function"&&f(w,{success:x})},y=w=>{m(w,h===window||h===document||n.useGlobalTarget||jw(h,w.target))},k=w=>{m(w,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",k,o)};return a.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",c,o),Uc(u)&&(u.addEventListener("focus",f=>AI(f,o)),!CI(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),s}function rm(e){return F0(e)&&"ownerSVGElement"in e}const Fc=new WeakMap;let Vc;const Uw=(e,t,n)=>(a,o)=>o&&o[0]?o[0][e+"Size"]:rm(a)&&"getBBox"in a?a.getBBox()[t]:a[n],LI=Uw("inline","width","offsetWidth"),DI=Uw("block","height","offsetHeight");function MI({target:e,borderBoxSize:t}){Fc.get(e)?.forEach(n=>{n(e,{get width(){return LI(e,t)},get height(){return DI(e,t)}})})}function II(e){e.forEach(MI)}function NI(){typeof ResizeObserver>"u"||(Vc=new ResizeObserver(II))}function OI(e,t){Vc||NI();const n=Mw(e);return n.forEach(a=>{let o=Fc.get(a);o||(o=new Set,Fc.set(a,o)),o.add(t),Vc?.observe(a)}),()=>{n.forEach(a=>{const o=Fc.get(a);o?.delete(t),o?.size||Vc?.unobserve(a)})}}const zc=new Set;let io;function jI(){io=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};zc.forEach(t=>t(e))},window.addEventListener("resize",io)}function UI(e){return zc.add(e),io||jI(),()=>{zc.delete(e),!zc.size&&typeof io=="function"&&(window.removeEventListener("resize",io),io=void 0)}}function Sk(e,t){return typeof e=="function"?UI(e):OI(e,t)}function BI(e){return rm(e)&&e.tagName==="svg"}const FI=[...Rw,Lt,or],VI=e=>FI.find(Aw(e)),Ck=()=>({translate:0,scale:1,origin:0,originPoint:0}),oo=()=>({x:Ck(),y:Ck()}),Tk=()=>({min:0,max:0}),Ot=()=>({x:Tk(),y:Tk()}),zI=new WeakMap;function Mu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Bs(e){return typeof e=="string"||Array.isArray(e)}const am=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],im=["initial",...am];function Iu(e){return Mu(e.animate)||im.some(t=>Bs(e[t]))}function Bw(e){return!!(Iu(e)||e.variants)}function $I(e,t,n){for(const a in t){const o=t[a],s=n[a];if(Gt(o))e.addValue(a,o);else if(Gt(s))e.addValue(a,yo(o,{owner:e}));else if(s!==o)if(e.hasValue(a)){const c=e.getValue(a);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(a);e.addValue(a,yo(c!==void 0?c:o,{owner:e}))}}for(const a in n)t[a]===void 0&&e.removeValue(a);return t}const $f={current:null},Fw={current:!1},HI=typeof window<"u";function WI(){if(Fw.current=!0,!!HI)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$f.current=e.matches;e.addEventListener("change",t),t()}else $f.current=!1}const Ek=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let mu={};function Vw(e){mu=e}function KI(){return mu}class GI{scrapeMotionValuesFromProps(t,n,a){return{}}constructor({parent:t,props:n,presenceContext:a,reducedMotionConfig:o,skipAnimations:s,blockInitialAnimation:c,visualState:u},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=Yp,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=sn.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,dt.render(this.render,!1,!0))};const{latestValues:f,renderState:m}=u;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=o,this.skipAnimationsConfig=s,this.options=h,this.blockInitialAnimation=!!c,this.isControllingVariants=Iu(n),this.isVariantNode=Bw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:y,...k}=this.scrapeMotionValuesFromProps(n,{},this);for(const w in k){const x=k[w];f[w]!==void 0&&Gt(x)&&x.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,zI.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:(Fw.current||WI(),this.shouldReduceMotion=$f.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&&bw.has(t)&&this.current instanceof HTMLElement){const{factory:c,keyframes:u,times:h,ease:f,duration:m}=n.accelerate,y=new kw({element:this.current,name:t,keyframes:u,times:h,ease:f,duration:Pn(m)}),k=c(y);this.valueSubscriptions.set(t,()=>{k(),y.cancel()});return}const a=wo.has(t);a&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&dt.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),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 mu){const n=mu[t];if(!n)continue;const{isEnabled:a,Feature:o}=n;if(!this.features[t]&&o&&a(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ot()}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<Ek.length;a++){const o=Ek[a];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,c=t[s];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=$I(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=yo(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"&&(B0(a)||V0(a))?a=parseFloat(a):!VI(a)&&or.test(n)&&(a=Dw(t,n)),this.setBaseTarget(t,Gt(a)?a.get():a)),Gt(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 s=Qp(this.props,n,this.presenceContext?.custom);s&&(a=s[t])}if(n&&a!==void 0)return a;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Gt(o)?o:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){tm.render(this.render)}}class zw extends GI{constructor(){super(...arguments),this.KeyframeResolver=bI}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;Gt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ja{constructor(t){this.isMounted=!1,this.node=t}update(){}}function $w({top:e,left:t,right:n,bottom:a}){return{x:{min:t,max:n},y:{min:e,max:a}}}function qI({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function YI(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 Wh(e){return e===void 0||e===1}function Hf({scale:e,scaleX:t,scaleY:n}){return!Wh(e)||!Wh(t)||!Wh(n)}function ti(e){return Hf(e)||Hw(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Hw(e){return Ak(e.x)||Ak(e.y)}function Ak(e){return e&&e!=="0%"}function gu(e,t,n){const a=e-n,o=t*a;return n+o}function Rk(e,t,n,a,o){return o!==void 0&&(e=gu(e,o,a)),gu(e,n,a)+t}function Wf(e,t=0,n=1,a,o){e.min=Rk(e.min,t,n,a,o),e.max=Rk(e.max,t,n,a,o)}function Ww(e,{x:t,y:n}){Wf(e.x,t.translate,t.scale,t.originPoint),Wf(e.y,n.translate,n.scale,n.originPoint)}const Lk=.999999999999,Dk=1.0000000000001;function ZI(e,t,n,a=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,c;for(let u=0;u<o;u++){s=n[u],c=s.projectionDelta;const{visualElement:h}=s.options;h&&h.props.style&&h.props.style.display==="contents"||(a&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(mr(e.x,-s.scroll.offset.x),mr(e.y,-s.scroll.offset.y)),c&&(t.x*=c.x.scale,t.y*=c.y.scale,Ww(e,c)),a&&ti(s.latestValues)&&$c(e,s.latestValues,s.layout?.layoutBox))}t.x<Dk&&t.x>Lk&&(t.x=1),t.y<Dk&&t.y>Lk&&(t.y=1)}function mr(e,t){e.min+=t,e.max+=t}function Mk(e,t,n,a,o=.5){const s=vt(e.min,e.max,o);Wf(e,t,n,s,a)}function Ik(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function $c(e,t,n){const a=n??e;Mk(e.x,Ik(t.x,a.x),t.scaleX,t.scale,t.originX),Mk(e.y,Ik(t.y,a.y),t.scaleY,t.scale,t.originY)}function Kw(e,t){return $w(YI(e.getBoundingClientRect(),t))}function XI(e,t,n){const a=Kw(e,n),{scroll:o}=t;return o&&(mr(a.x,o.offset.x),mr(a.y,o.offset.y)),a}const QI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},JI=bo.length;function eN(e,t,n){let a="",o=!0;for(let s=0;s<JI;s++){const c=bo[s],u=e[c];if(u===void 0)continue;let h=!0;if(typeof u=="number")h=u===(c.startsWith("scale")?1:0);else{const f=parseFloat(u);h=c.startsWith("scale")?f===1:f===0}if(!h||n){const f=Iw(u,em[c]);if(!h){o=!1;const m=QI[c]||c;a+=`${m}(${f}) `}n&&(t[c]=f)}}return a=a.trim(),n?a=n(t,o?"":a):o&&(a="none"),a}function om(e,t,n){const{style:a,vars:o,transformOrigin:s}=e;let c=!1,u=!1;for(const h in t){const f=t[h];if(wo.has(h)){c=!0;continue}else if(nw(h)){o[h]=f;continue}else{const m=Iw(f,em[h]);h.startsWith("origin")?(u=!0,s[h]=m):a[h]=m}}if(t.transform||(c||n?a.transform=eN(t,e.transform,n):a.transform&&(a.transform="none")),u){const{originX:h="50%",originY:f="50%",originZ:m=0}=s;a.transformOrigin=`${h} ${f} ${m}`}}function Gw(e,{style:t,vars:n},a,o){const s=e.style;let c;for(c in t)s[c]=t[c];o?.applyProjectionStyles(s,a);for(c in n)s.setProperty(c,n[c])}function Nk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ps={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(_e.test(e))e=parseFloat(e);else return e;const n=Nk(e,t.target.x),a=Nk(e,t.target.y);return`${n}% ${a}%`}},tN={correct:(e,{treeScale:t,projectionDelta:n})=>{const a=e,o=or.parse(e);if(o.length>5)return a;const s=or.createTransformer(e),c=typeof o[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;o[0+c]/=u,o[1+c]/=h;const f=vt(u,h,.5);return typeof o[2+c]=="number"&&(o[2+c]/=f),typeof o[3+c]=="number"&&(o[3+c]/=f),s(o)}},Kf={borderRadius:{...ps,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ps,borderTopRightRadius:ps,borderBottomLeftRadius:ps,borderBottomRightRadius:ps,boxShadow:tN};function qw(e,{layout:t,layoutId:n}){return wo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Kf[e]||e==="opacity")}function sm(e,t,n){const a=e.style,o=t?.style,s={};if(!a)return s;for(const c in a)(Gt(a[c])||o&&Gt(o[c])||qw(c,e)||n?.getValue(c)?.liveStyle!==void 0)&&(s[c]=a[c]);return s}function nN(e){return window.getComputedStyle(e)}class rN extends zw{constructor(){super(...arguments),this.type="html",this.renderInstance=Gw}readValueFromInstance(t,n){if(wo.has(n))return this.projection?.isProjecting?Df(n):x2(t,n);{const a=nN(t),o=(nw(n)?a.getPropertyValue(n):a[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Kw(t,n)}build(t,n,a){om(t,n,a.transformTemplate)}scrapeMotionValuesFromProps(t,n,a){return sm(t,n,a)}}const aN={offset:"stroke-dashoffset",array:"stroke-dasharray"},iN={offset:"strokeDashoffset",array:"strokeDasharray"};function oN(e,t,n=1,a=0,o=!0){e.pathLength=1;const s=o?aN:iN;e[s.offset]=`${-a}`,e[s.array]=`${t} ${n}`}const sN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Yw(e,{attrX:t,attrY:n,attrScale:a,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...u},h,f,m){if(om(e,u,f),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:k}=e;y.transform&&(k.transform=y.transform,delete y.transform),(k.transform||y.transformOrigin)&&(k.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),k.transform&&(k.transformBox=m?.transformBox??"fill-box",delete y.transformBox);for(const w of sN)y[w]!==void 0&&(k[w]=y[w],delete y[w]);t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),a!==void 0&&(y.scale=a),o!==void 0&&oN(y,o,s,c,!1)}const Zw=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"]),Xw=e=>typeof e=="string"&&e.toLowerCase()==="svg";function lN(e,t,n,a){Gw(e,t,void 0,a);for(const o in t.attrs)e.setAttribute(Zw.has(o)?o:Jp(o),t.attrs[o])}function Qw(e,t,n){const a=sm(e,t,n);for(const o in e)if(Gt(e[o])||Gt(t[o])){const s=bo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;a[s]=e[o]}return a}class cN extends zw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ot}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(wo.has(n)){const a=Lw(n);return a&&a.default||0}return n=Zw.has(n)?n:Jp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,a){return Qw(t,n,a)}build(t,n,a){Yw(t,n,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(t,n,a,o){lN(t,n,a,o)}mount(t){this.isSVGTag=Xw(t.tagName),super.mount(t)}}const uN=im.length;function Jw(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Jw(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uN;n++){const a=im[n],o=e.props[a];(Bs(o)||o===!1)&&(t[a]=o)}return t}function ex(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 dN=[...am].reverse(),hN=am.length;function fN(e){return t=>Promise.all(t.map(({animation:n,options:a})=>uI(e,n,a)))}function pN(e){let t=fN(e),n=Ok(),a=!0,o=!1;const s=f=>(m,y)=>{const k=si(e,y,f==="exit"?e.presenceContext?.custom:void 0);if(k){const{transition:w,transitionEnd:x,...C}=k;m={...m,...C,...x}}return m};function c(f){t=f(e)}function u(f){const{props:m}=e,y=Jw(e.parent)||{},k=[],w=new Set;let x={},C=1/0;for(let D=0;D<hN;D++){const L=dN[D],R=n[L],O=m[L]!==void 0?m[L]:y[L],G=Bs(O),W=L===f?R.isActive:null;W===!1&&(C=D);let z=O===y[L]&&O!==m[L]&&G;if(z&&(a||o)&&e.manuallyAnimateOnMount&&(z=!1),R.protectedKeys={...x},!R.isActive&&W===null||!O&&!R.prevProp||Mu(O)||typeof O=="boolean")continue;if(L==="exit"&&R.isActive&&W!==!0){R.prevResolvedValues&&(x={...x,...R.prevResolvedValues});continue}const P=mN(R.prevProp,O);let Y=P||L===f&&R.isActive&&!z&&G||D>C&&G,X=!1;const ue=Array.isArray(O)?O:[O];let se=ue.reduce(s(L),{});W===!1&&(se={});const{prevResolvedValues:Ae={}}=R,fe={...Ae,...se},le=K=>{Y=!0,w.has(K)&&(X=!0,w.delete(K)),R.needsAnimating[K]=!0;const Z=e.getValue(K);Z&&(Z.liveStyle=!1)};for(const K in fe){const Z=se[K],H=Ae[K];if(x.hasOwnProperty(K))continue;let I=!1;Uf(Z)&&Uf(H)?I=!ex(Z,H):I=Z!==H,I?Z!=null?le(K):w.add(K):Z!==void 0&&w.has(K)?le(K):R.protectedKeys[K]=!0}R.prevProp=O,R.prevResolvedValues=se,R.isActive&&(x={...x,...se}),(a||o)&&e.blockInitialAnimation&&(Y=!1);const pe=z&&P;Y&&(!pe||X)&&k.push(...ue.map(K=>{const Z={type:L};if(typeof K=="string"&&(a||o)&&!pe&&e.manuallyAnimateOnMount&&e.parent){const{parent:H}=e,I=si(H,K);if(H.enteringChildren&&I){const{delayChildren:q}=I.transition||{};Z.delay=ww(H.enteringChildren,e,q)}}return{animation:K,options:Z}}))}if(w.size){const D={};if(typeof m.initial!="boolean"){const L=si(e,Array.isArray(m.initial)?m.initial[0]:m.initial);L&&L.transition&&(D.transition=L.transition)}w.forEach(L=>{const R=e.getBaseTarget(L),O=e.getValue(L);O&&(O.liveStyle=!0),D[L]=R??null}),k.push({animation:D})}let S=!!k.length;return a&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(S=!1),a=!1,o=!1,S?t(k):Promise.resolve()}function h(f,m){if(n[f].isActive===m)return Promise.resolve();e.variantChildren?.forEach(k=>k.animationState?.setActive(f,m)),n[f].isActive=m;const y=u(f);for(const k in n)n[k].protectedKeys={};return y}return{animateChanges:u,setActive:h,setAnimateFunction:c,getState:()=>n,reset:()=>{n=Ok(),o=!0}}}function mN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ex(t,e):!1}function Ja(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ok(){return{animate:Ja(!0),whileInView:Ja(),whileHover:Ja(),whileTap:Ja(),whileDrag:Ja(),whileFocus:Ja(),exit:Ja()}}function Gf(e,t){e.min=t.min,e.max=t.max}function tr(e,t){Gf(e.x,t.x),Gf(e.y,t.y)}function jk(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const tx=1e-4,gN=1-tx,yN=1+tx,nx=.01,vN=0-nx,kN=0+nx;function ln(e){return e.max-e.min}function _N(e,t,n){return Math.abs(e-t)<=n}function Uk(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>=gN&&e.scale<=yN||isNaN(e.scale))&&(e.scale=1),(e.translate>=vN&&e.translate<=kN||isNaN(e.translate))&&(e.translate=0)}function Es(e,t,n,a){Uk(e.x,t.x,n.x,a?a.originX:void 0),Uk(e.y,t.y,n.y,a?a.originY:void 0)}function Bk(e,t,n,a=0){const o=a?vt(n.min,n.max,a):n.min;e.min=o+t.min,e.max=e.min+ln(t)}function bN(e,t,n,a){Bk(e.x,t.x,n.x,a?.x),Bk(e.y,t.y,n.y,a?.y)}function Fk(e,t,n,a=0){const o=a?vt(n.min,n.max,a):n.min;e.min=t.min-o,e.max=e.min+ln(t)}function yu(e,t,n,a){Fk(e.x,t.x,n.x,a?.x),Fk(e.y,t.y,n.y,a?.y)}function Vk(e,t,n,a,o){return e-=t,e=gu(e,1/n,a),o!==void 0&&(e=gu(e,1/o,a)),e}function wN(e,t=0,n=1,a=.5,o,s=e,c=e){if(vr.test(t)&&(t=parseFloat(t),t=vt(c.min,c.max,t/100)-c.min),typeof t!="number")return;let u=vt(s.min,s.max,a);e===s&&(u-=t),e.min=Vk(e.min,t,n,u,o),e.max=Vk(e.max,t,n,u,o)}function zk(e,t,[n,a,o],s,c){wN(e,t[n],t[a],t[o],t.scale,s,c)}const xN=["x","scaleX","originX"],PN=["y","scaleY","originY"];function $k(e,t,n,a){zk(e.x,t,xN,n?n.x:void 0,a?a.x:void 0),zk(e.y,t,PN,n?n.y:void 0,a?a.y:void 0)}function Hk(e){return e.translate===0&&e.scale===1}function rx(e){return Hk(e.x)&&Hk(e.y)}function Wk(e,t){return e.min===t.min&&e.max===t.max}function SN(e,t){return Wk(e.x,t.x)&&Wk(e.y,t.y)}function Kk(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ax(e,t){return Kk(e.x,t.x)&&Kk(e.y,t.y)}function Gk(e){return ln(e.x)/ln(e.y)}function qk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function pr(e){return[e("x"),e("y")]}function CN(e,t,n){let a="";const o=e.x.translate/t.x,s=e.y.translate/t.y,c=n?.z||0;if((o||s||c)&&(a=`translate3d(${o}px, ${s}px, ${c}px) `),(t.x!==1||t.y!==1)&&(a+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:m,rotateX:y,rotateY:k,skewX:w,skewY:x}=n;f&&(a=`perspective(${f}px) ${a}`),m&&(a+=`rotate(${m}deg) `),y&&(a+=`rotateX(${y}deg) `),k&&(a+=`rotateY(${k}deg) `),w&&(a+=`skewX(${w}deg) `),x&&(a+=`skewY(${x}deg) `)}const u=e.x.scale*t.x,h=e.y.scale*t.y;return(u!==1||h!==1)&&(a+=`scale(${u}, ${h})`),a||"none"}const ix=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],TN=ix.length,Yk=e=>typeof e=="string"?parseFloat(e):e,Zk=e=>typeof e=="number"||_e.test(e);function EN(e,t,n,a,o,s){o?(e.opacity=vt(0,n.opacity??1,AN(a)),e.opacityExit=vt(t.opacity??1,0,RN(a))):s&&(e.opacity=vt(t.opacity??1,n.opacity??1,a));for(let c=0;c<TN;c++){const u=ix[c];let h=Xk(t,u),f=Xk(n,u);if(h===void 0&&f===void 0)continue;h||(h=0),f||(f=0),h===0||f===0||Zk(h)===Zk(f)?(e[u]=Math.max(vt(Yk(h),Yk(f),a),0),(vr.test(f)||vr.test(h))&&(e[u]+="%")):e[u]=f}(t.rotate||n.rotate)&&(e.rotate=vt(t.rotate||0,n.rotate||0,a))}function Xk(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const AN=ox(0,.5,Z0),RN=ox(.5,.95,jn);function ox(e,t,n){return a=>a<e?0:a>t?1:n(js(e,t,a))}function LN(e,t,n){const a=Gt(e)?e:yo(e);return a.start(Xp("",a,t,n)),a.animation}function Fs(e,t,n,a={passive:!0}){return e.addEventListener(t,n,a),()=>e.removeEventListener(t,n)}const DN=(e,t)=>e.depth-t.depth;class MN{constructor(){this.children=[],this.isDirty=!1}add(t){Up(this.children,t),this.isDirty=!0}remove(t){uu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(DN),this.isDirty=!1,this.children.forEach(t)}}function IN(e,t){const n=sn.now(),a=({timestamp:o})=>{const s=o-n;s>=t&&(Na(a),e(s-t))};return dt.setup(a,!0),()=>Na(a)}function Hc(e){return Gt(e)?e.get():e}class NN{constructor(){this.members=[]}add(t){Up(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 o=a.instance;(!o||o.isConnected===!1)&&!a.snapshot&&(uu(this.members,a),a.unmount())}t.scheduleRender()}remove(t){if(uu(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:o}=a.options,{layoutDependency:s}=t.options;(o===void 0||o!==s)&&(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 Wc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Kh=["","X","Y","Z"],ON=1e3;let jN=0;function Gh(e,t,n,a){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),a&&(a[e]=0))}function sx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Tw(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",dt,!(o||s))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&sx(a)}function lx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:a,resetTransform:o}){return class{constructor(c={},u=t?.()){this.id=jN++,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(FN),this.nodes.forEach(KN),this.nodes.forEach(GN),this.nodes.forEach(VN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new MN)}addEventListener(c,u){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new Fp),this.eventHandlers.get(c).add(u)}notifyListeners(c,...u){const h=this.eventHandlers.get(c);h&&h.notify(...u)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=rm(c)&&!BI(c),this.instance=c;const{layoutId:u,layout:h,visualElement:f}=this.options;if(f&&!f.current&&f.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||u)&&(this.isLayoutDirty=!0),e){let m,y=0;const k=()=>this.root.updateBlockedByResize=!1;dt.read(()=>{y=window.innerWidth}),e(c,()=>{const w=window.innerWidth;w!==y&&(y=w,this.root.updateBlockedByResize=!0,m&&m(),m=IN(k,250),Wc.hasAnimatedSinceResize&&(Wc.hasAnimatedSinceResize=!1,this.nodes.forEach(e_)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&f&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:k,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||QN,{onLayoutAnimationStart:C,onLayoutAnimationComplete:S}=f.getProps(),D=!this.targetLayout||!ax(this.targetLayout,w),L=!y&&k;if(this.options.layoutRoot||this.resumeFrom||L||y&&(D||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const R={...Zp(x,"layout"),onPlay:C,onComplete:S};(f.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R),this.setAnimationOrigin(m,L)}else y||e_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.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(qN),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sx(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:u,layout:h}=this.options;if(u===void 0&&!h)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),c&&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($N),this.nodes.forEach(Qk);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Jk);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(HN),this.nodes.forEach(WN),this.nodes.forEach(UN),this.nodes.forEach(BN)):this.nodes.forEach(Jk),this.clearAllSnapshots();const u=sn.now();Kt.delta=xr(0,1e3/60,u-Kt.timestamp),Kt.timestamp=u,Kt.isProcessing=!0,Uh.update.process(Kt),Uh.preRender.process(Kt),Uh.render.process(Kt),Kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,tm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zN),this.sharedNodes.forEach(YN)}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 c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ot()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(u=!1),u&&this.instance){const h=a(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:h,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!rx(this.projectionDelta),h=this.getTransformTemplate(),f=h?h(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;c&&this.instance&&(u||ti(this.latestValues)||m)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const u=this.measurePageBox();let h=this.removeElementScroll(u);return c&&(h=this.removeTransform(h)),JN(h),{animationId:this.root.animationId,measuredBox:u,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return Ot();const u=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(eO))){const{scroll:f}=this.root;f&&(mr(u.x,f.offset.x),mr(u.y,f.offset.y))}return u}removeElementScroll(c){const u=Ot();if(tr(u,c),this.scroll?.wasRoot)return u;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(u,c),mr(u.x,m.offset.x),mr(u.y,m.offset.y))}return u}applyTransform(c,u=!1,h){const f=h||Ot();tr(f,c);for(let m=0;m<this.path.length;m++){const y=this.path[m];!u&&y.options.layoutScroll&&y.scroll&&y!==y.root&&(mr(f.x,-y.scroll.offset.x),mr(f.y,-y.scroll.offset.y)),ti(y.latestValues)&&$c(f,y.latestValues,y.layout?.layoutBox)}return ti(this.latestValues)&&$c(f,this.latestValues,this.layout?.layoutBox),f}removeTransform(c){const u=Ot();tr(u,c);for(let h=0;h<this.path.length;h++){const f=this.path[h];if(!ti(f.latestValues))continue;let m;f.instance&&(Hf(f.latestValues)&&f.updateSnapshot(),m=Ot(),tr(m,f.measurePageBox())),$k(u,f.latestValues,f.snapshot?.layoutBox,m)}return ti(this.latestValues)&&$k(u,this.latestValues),u}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.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(c=!1){const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==u;if(!(c||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 k=this.getClosestProjectingParent();k&&this.linkedParentVersion!==k.layoutVersion&&!k.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&k&&k.layout?this.createRelativeTarget(k,this.layout.layoutBox,k.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ot(),this.targetWithTransforms=Ot()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),bN(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),Ww(this.target,this.targetDelta)):tr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&k&&!!k.resumingFrom==!!this.resumingFrom&&!k.options.layoutScroll&&k.target&&this.animationProgress!==1?this.createRelativeTarget(k,this.target,k.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Hf(this.parent.latestValues)||Hw(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,u,h){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ot(),this.relativeTargetOrigin=Ot(),yu(this.relativeTargetOrigin,u,h,this.options.layoutAnchor||void 0),tr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),u=!!this.resumingFrom||this!==c;let h=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(h=!1),u&&(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,k=this.treeScale.y;ZI(this.layoutCorrected,this.treeScale,this.path,u),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Ot());const{target:w}=c;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(jk(this.prevProjectionDelta.x,this.projectionDelta.x),jk(this.prevProjectionDelta.y,this.projectionDelta.y)),Es(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==k||!qk(this.projectionDelta.x,this.prevProjectionDelta.x)||!qk(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=oo(),this.projectionDelta=oo(),this.projectionDeltaWithTransform=oo()}setAnimationOrigin(c,u=!1){const h=this.snapshot,f=h?h.latestValues:{},m={...this.latestValues},y=oo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const k=Ot(),w=h?h.source:void 0,x=this.layout?this.layout.source:void 0,C=w!==x,S=this.getStack(),D=!S||S.members.length<=1,L=!!(C&&!D&&this.options.crossfade===!0&&!this.path.some(XN));this.animationProgress=0;let R;this.mixTargetDelta=O=>{const G=O/1e3;t_(y.x,c.x,G),t_(y.y,c.y,G),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(yu(k,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ZN(this.relativeTarget,this.relativeTargetOrigin,k,G),R&&SN(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Ot()),tr(R,this.relativeTarget)),C&&(this.animationValues=m,EN(m,f,this.latestValues,G,L,D)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=G},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Na(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dt.update(()=>{Wc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=yo(0)),this.motionValue.jump(0,!1),this.currentAnimation=LN(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),c.onUpdate&&c.onUpdate(u)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ON),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:u,target:h,layout:f,latestValues:m}=c;if(!(!u||!h||!f)){if(this!==c&&this.layout&&f&&cx(this.options.animationType,this.layout.layoutBox,f.layoutBox)){h=this.target||Ot();const y=ln(this.layout.layoutBox.x);h.x.min=c.target.x.min,h.x.max=h.x.min+y;const k=ln(this.layout.layoutBox.y);h.y.min=c.target.y.min,h.y.max=h.y.min+k}tr(u,h),$c(u,m),Es(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(c,u){this.sharedNodes.has(c)||this.sharedNodes.set(c,new NN),this.sharedNodes.get(c).add(u);const f=u.options.initialPromotionConfig;u.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(u):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:u,preserveFollowOpacity:h}={}){const f=this.getStack();f&&f.promote(this,h),c&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let u=!1;const{latestValues:h}=c;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(u=!0),!u)return;const f={};h.z&&Gh("z",c,f,this.animationValues);for(let m=0;m<Kh.length;m++)Gh(`rotate${Kh[m]}`,c,f,this.animationValues),Gh(`skew${Kh[m]}`,c,f,this.animationValues);c.render();for(const m in f)c.setStaticValue(m,f[m]),this.animationValues&&(this.animationValues[m]=f[m]);c.scheduleRender()}applyProjectionStyles(c,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=Hc(u?.pointerEvents)||"",c.transform=h?h(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=Hc(u?.pointerEvents)||""),this.hasProjected&&!ti(this.latestValues)&&(c.transform=h?h({},""):"none",this.hasProjected=!1);return}c.visibility="";const m=f.animationValues||f.latestValues;this.applyTransformsToTarget();let y=CN(this.projectionDeltaWithTransform,this.treeScale,m);h&&(y=h(m,y)),c.transform=y;const{x:k,y:w}=this.projectionDelta;c.transformOrigin=`${k.origin*100}% ${w.origin*100}% 0`,f.animationValues?c.opacity=f===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:c.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const x in Kf){if(m[x]===void 0)continue;const{correct:C,applyTo:S,isCSSVariable:D}=Kf[x],L=y==="none"?m[x]:C(m[x],f);if(S){const R=S.length;for(let O=0;O<R;O++)c[S[O]]=L}else D?this.options.visualElement.renderState.vars[x]=L:c[x]=L}this.options.layoutId&&(c.pointerEvents=f===this?Hc(u?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(Qk),this.root.sharedNodes.clear()}}}function UN(e){e.updateLayout()}function BN(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:o}=e.options,s=t.source!==e.layout.source;if(o==="size")pr(m=>{const y=s?t.measuredBox[m]:t.layoutBox[m],k=ln(y);y.min=n[m].min,y.max=y.min+k});else if(o==="x"||o==="y"){const m=o==="x"?"y":"x";Gf(s?t.measuredBox[m]:t.layoutBox[m],n[m])}else cx(o,t.layoutBox,n)&&pr(m=>{const y=s?t.measuredBox[m]:t.layoutBox[m],k=ln(n[m]);y.max=y.min+k,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+k)});const c=oo();Es(c,n,t.layoutBox);const u=oo();s?Es(u,e.applyTransform(a,!0),t.measuredBox):Es(u,n,t.layoutBox);const h=!rx(c);let f=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:y,layout:k}=m;if(y&&k){const w=e.options.layoutAnchor||void 0,x=Ot();yu(x,t.layoutBox,y.layoutBox,w);const C=Ot();yu(C,n,k.layoutBox,w),ax(x,C)||(f=!0),m.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=x,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:u,layoutDelta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function FN(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 VN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zN(e){e.clearSnapshot()}function Qk(e){e.clearMeasurements()}function $N(e){e.isLayoutDirty=!0,e.updateLayout()}function Jk(e){e.isLayoutDirty=!1}function HN(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function WN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function e_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function KN(e){e.resolveTargetDelta()}function GN(e){e.calcProjection()}function qN(e){e.resetSkewAndRotation()}function YN(e){e.removeLeadSnapshot()}function t_(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 n_(e,t,n,a){e.min=vt(t.min,n.min,a),e.max=vt(t.max,n.max,a)}function ZN(e,t,n,a){n_(e.x,t.x,n.x,a),n_(e.y,t.y,n.y,a)}function XN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const QN={duration:.45,ease:[.4,0,.1,1]},r_=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),a_=r_("applewebkit/")&&!r_("chrome/")?Math.round:jn;function i_(e){e.min=a_(e.min),e.max=a_(e.max)}function JN(e){i_(e.x),i_(e.y)}function cx(e,t,n){return e==="position"||e==="preserve-aspect"&&!_N(Gk(t),Gk(n),.2)}function eO(e){return e!==e.root&&e.scroll?.wasRoot}const tO=lx({attachResizeListener:(e,t)=>Fs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),qh={current:void 0},ux=lx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qh.current){const e=new tO({});e.mount(window),e.setOptions({layoutScroll:!0}),qh.current=e}return qh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),lm=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function o_(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nO(...e){return t=>{let n=!1;const a=e.map(o=>{const s=o_(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<a.length;o++){const s=a[o];typeof s=="function"?s():o_(e[o],null)}}}}function rO(...e){return b.useCallback(nO(...e),e)}class aO extends b.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Uc(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const a=n.offsetParent,o=Uc(a)&&a.offsetWidth||0,s=Uc(a)&&a.offsetHeight||0,c=getComputedStyle(n),u=this.props.sizeRef.current;u.height=parseFloat(c.height),u.width=parseFloat(c.width),u.top=n.offsetTop,u.left=n.offsetLeft,u.right=o-u.width-u.left,u.bottom=s-u.height-u.top}return null}componentDidUpdate(){}render(){return this.props.children}}function iO({children:e,isPresent:t,anchorX:n,anchorY:a,root:o,pop:s}){const c=b.useId(),u=b.useRef(null),h=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:f}=b.useContext(lm),m=e.props?.ref??e?.ref,y=rO(u,m);return b.useInsertionEffect(()=>{const{width:k,height:w,top:x,left:C,right:S,bottom:D}=h.current;if(t||s===!1||!u.current||!k||!w)return;const L=n==="left"?`left: ${C}`:`right: ${S}`,R=a==="bottom"?`bottom: ${D}`:`top: ${x}`;u.current.dataset.motionPopId=c;const O=document.createElement("style");f&&(O.nonce=f);const G=o??document.head;return G.appendChild(O),O.sheet&&O.sheet.insertRule(`
836
838
  [data-motion-pop-id="${c}"] {
@@ -840,4 +842,4 @@ local_only.download,dashboard,LocalOnlyNotice,LocalOnlyNotice,download,"Get the
840
842
  ${L}px !important;
841
843
  ${R}px !important;
842
844
  }
843
- `),()=>{u.current?.removeAttribute("data-motion-pop-id"),G.contains(O)&&G.removeChild(O)}},[t]),N.jsx(aO,{isPresent:t,childRef:u,sizeRef:h,pop:s,children:s===!1?e:b.cloneElement(e,{ref:y})})}const oO=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:o,presenceAffectsLayout:s,mode:c,anchorX:u,anchorY:h,root:f})=>{const m=jp(sO),y=b.useId();let k=!0,w=b.useMemo(()=>(k=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:x=>{m.set(x,!0);for(const C of m.values())if(!C)return;a&&a()},register:x=>(m.set(x,!1),()=>m.delete(x))}),[n,m,a]);return s&&k&&(w={...w}),b.useMemo(()=>{m.forEach((x,C)=>m.set(C,!1))},[n]),b.useEffect(()=>{!n&&!m.size&&a&&a()},[n]),e=N.jsx(iO,{pop:c==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:f,children:e}),N.jsx(Lu.Provider,{value:w,children:e})};function sO(){return new Map}function dx(e=!0){const t=b.useContext(Lu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:o}=t,s=b.useId();b.useEffect(()=>{if(e)return o(s)},[e]);const c=b.useCallback(()=>e&&a&&a(s),[s,a,e]);return!n&&a?[!1,c]:[!0]}const _c=e=>e.key||"";function s_(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const lO=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s="sync",propagate:c=!1,anchorX:u="left",anchorY:h="top",root:f})=>{const[m,y]=dx(c),k=b.useMemo(()=>s_(e),[e]),w=c&&!m?[]:k.map(_c),x=b.useRef(!0),C=b.useRef(k),S=jp(()=>new Map),D=b.useRef(new Set),[L,R]=b.useState(k),[O,G]=b.useState(k);U0(()=>{x.current=!1,C.current=k;for(let P=0;P<O.length;P++){const Y=_c(O[P]);w.includes(Y)?(S.delete(Y),D.current.delete(Y)):S.get(Y)!==!0&&S.set(Y,!1)}},[O,w.length,w.join("-")]);const W=[];if(k!==L){let P=[...k];for(let Y=0;Y<O.length;Y++){const X=O[Y],ue=_c(X);w.includes(ue)||(P.splice(Y,0,X),W.push(X))}return s==="wait"&&W.length&&(P=W),G(s_(P)),R(k),null}const{forceRender:z}=b.useContext(Op);return N.jsx(N.Fragment,{children:O.map(P=>{const Y=_c(P),X=c&&!m?!1:k===O||w.includes(Y),ue=()=>{if(D.current.has(Y))return;if(S.has(Y))D.current.add(Y),S.set(Y,!0);else return;let se=!0;S.forEach(Ae=>{Ae||(se=!1)}),se&&(z?.(),G(C.current),c&&y?.(),a&&a())};return N.jsx(oO,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:f,onExitComplete:X?void 0:ue,anchorX:u,anchorY:h,children:P},Y)})})},hx=b.createContext({strict:!1}),l_={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 c_=!1;function cO(){if(c_)return;const e={};for(const t in l_)e[t]={isEnabled:n=>l_[t].some(a=>!!n[a])};Vw(e),c_=!0}function fx(){return cO(),KI()}function uO(e){const t=fx();for(const n in e)t[n]={...t[n],...e[n]};Vw(t)}const dO=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 vu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||dO.has(e)}let px=e=>!vu(e);function hO(e){typeof e=="function"&&(px=t=>t.startsWith("on")?!vu(t):e(t))}try{hO(require("@emotion/is-prop-valid").default)}catch{}function fO(e,t,n){const a={};for(const o in e)o==="values"&&typeof e.values=="object"||Gt(e[o])||(px(o)||n===!0&&vu(o)||!t&&!vu(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}const Nu=b.createContext({});function pO(e,t){if(Iu(e)){const{initial:n,animate:a}=e;return{initial:n===!1||Bs(n)?n:void 0,animate:Bs(a)?a:void 0}}return e.inherit!==!1?t:{}}function mO(e){const{initial:t,animate:n}=pO(e,b.useContext(Nu));return b.useMemo(()=>({initial:t,animate:n}),[u_(t),u_(n)])}function u_(e){return Array.isArray(e)?e.join(" "):e}const cm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mx(e,t,n){for(const a in t)!Gt(t[a])&&!qw(a,n)&&(e[a]=t[a])}function gO({transformTemplate:e},t){return b.useMemo(()=>{const n=cm();return om(n,t,e),Object.assign({},n.vars,n.style)},[t])}function yO(e,t){const n=e.style||{},a={};return mx(a,n,e),Object.assign(a,gO(e,t)),a}function vO(e,t){const n={},a=yO(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 gx=()=>({...cm(),attrs:{}});function kO(e,t,n,a){const o=b.useMemo(()=>{const s=gx();return Yw(s,t,Xw(a),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};mx(s,e.style,e),o.style={...s,...o.style}}return o}const _O=["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 um(e){return typeof e!="string"||e.includes("-")?!1:!!(_O.indexOf(e)>-1||/[A-Z]/u.test(e))}function bO(e,t,n,{latestValues:a},o,s=!1,c){const h=(c??um(e)?kO:vO)(t,a,o,e),f=fO(t,typeof e=="string",s),m=e!==b.Fragment?{...f,...h,ref:n}:{},{children:y}=t,k=b.useMemo(()=>Gt(y)?y.get():y,[y]);return b.createElement(e,{...m,children:k})}function wO({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,o){return{latestValues:xO(n,a,o,e),renderState:t()}}function xO(e,t,n,a){const o={},s=a(e,{});for(const k in s)o[k]=Hc(s[k]);let{initial:c,animate:u}=e;const h=Iu(e),f=Bw(e);t&&f&&!h&&e.inherit!==!1&&(c===void 0&&(c=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const y=m?u:c;if(y&&typeof y!="boolean"&&!Mu(y)){const k=Array.isArray(y)?y:[y];for(let w=0;w<k.length;w++){const x=Qp(e,k[w]);if(x){const{transitionEnd:C,transition:S,...D}=x;for(const L in D){let R=D[L];if(Array.isArray(R)){const O=m?R.length-1:0;R=R[O]}R!==null&&(o[L]=R)}for(const L in C)o[L]=C[L]}}}return o}const yx=e=>(t,n)=>{const a=b.useContext(Nu),o=b.useContext(Lu),s=()=>wO(e,t,a,o);return n?s():jp(s)},PO=yx({scrapeMotionValuesFromProps:sm,createRenderState:cm}),SO=yx({scrapeMotionValuesFromProps:Qw,createRenderState:gx}),CO=Symbol.for("motionComponentSymbol");function TO(e,t,n){const a=b.useRef(n);b.useInsertionEffect(()=>{a.current=n});const o=b.useRef(null);return b.useCallback(s=>{s&&e.onMount?.(s);const c=a.current;if(typeof c=="function")if(s){const u=c(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):c(s);else c&&(c.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const vx=b.createContext({});function to(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function EO(e,t,n,a,o,s){const{visualElement:c}=b.useContext(Nu),u=b.useContext(hx),h=b.useContext(Lu),f=b.useContext(lm),m=f.reducedMotion,y=f.skipAnimations,k=b.useRef(null),w=b.useRef(!1);a=a||u.renderer,!k.current&&a&&(k.current=a(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:s}),w.current&&k.current&&(k.current.manuallyAnimateOnMount=!0));const x=k.current,C=b.useContext(vx);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&AO(k.current,n,o,C);const S=b.useRef(!1);b.useInsertionEffect(()=>{x&&S.current&&x.update(n,h)});const D=n[Cw],L=b.useRef(!!D&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(D)&&window.MotionHasOptimisedAnimation?.(D));return U0(()=>{w.current=!0,x&&(S.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),L.current&&x.animationState&&x.animationState.animateChanges())}),b.useEffect(()=>{x&&(!L.current&&x.animationState&&x.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(D)}),L.current=!1),x.enteringChildren=void 0)}),x}function AO(e,t,n,a){const{layoutId:o,layout:s,drag:c,dragConstraints:u,layoutScroll:h,layoutRoot:f,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:kx(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!c||u&&to(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:h,layoutRoot:f,layoutAnchor:m})}function kx(e){if(e)return e.options.allowProjection!==!1?e.projection:kx(e.parent)}function Yh(e,{forwardMotionProps:t=!1,type:n}={},a,o){a&&uO(a);const s=n?n==="svg":um(e),c=s?SO:PO;function u(f,m){let y;const k={...b.useContext(lm),...f,layoutId:RO(f)},{isStatic:w}=k,x=mO(f),C=c(f,w);if(!w&&typeof window<"u"){LO();const S=DO(k);y=S.MeasureLayout,x.visualElement=EO(e,C,k,o,S.ProjectionNode,s)}return N.jsxs(Nu.Provider,{value:x,children:[y&&x.visualElement?N.jsx(y,{visualElement:x.visualElement,...k}):null,bO(e,f,TO(C,x.visualElement,m),C,w,t,s)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=b.forwardRef(u);return h[CO]=e,h}function RO({layoutId:e}){const t=b.useContext(Op).id;return t&&e!==void 0?t+"-"+e:e}function LO(e,t){b.useContext(hx).strict}function DO(e){const t=fx(),{drag:n,layout:a}=t;if(!n&&!a)return{};const o={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function MO(e,t){if(typeof Proxy>"u")return Yh;const n=new Map,a=(s,c)=>Yh(s,c,e,t),o=(s,c)=>a(s,c);return new Proxy(o,{get:(s,c)=>c==="create"?a:(n.has(c)||n.set(c,Yh(c,void 0,e,t)),n.get(c))})}const IO=(e,t)=>t.isSVG??um(e)?new cN(t):new rN(t,{allowProjection:e!==b.Fragment});class NO extends ja{constructor(t){super(t),t.animationState||(t.animationState=pN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Mu(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 OO=0;class jO extends ja{constructor(){super(...arguments),this.id=OO++,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:s,custom:c}=this.node.getProps();if(typeof s=="string"){const u=si(this.node,s,c);if(u){const{transition:h,transitionEnd:f,...m}=u;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 o=this.node.animationState.setActive("exit",!t);n&&!t&&o.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 UO={animation:{Feature:NO},exit:{Feature:jO}};function nl(e){return{point:{x:e.pageX,y:e.pageY}}}const BO=e=>t=>nm(t)&&e(t,nl(t));function As(e,t,n,a){return Fs(e,t,BO(n),a)}const _x=({current:e})=>e?e.ownerDocument.defaultView:null,d_=(e,t)=>Math.abs(e-t);function FO(e,t){const n=d_(e.x,t.x),a=d_(e.y,t.y);return Math.sqrt(n**2+a**2)}const h_=new Set(["auto","scroll"]);class bx{constructor(t,n,{transformPagePoint:a,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:c=3,element:u}={}){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=bc(this.lastRawMoveEventInfo,this.transformPagePoint));const w=Zh(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,C=FO(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!C)return;const{point:S}=w,{timestamp:D}=Kt;this.history.push({...S,timestamp:D});const{onStart:L,onMove:R}=this.handlers;x||(L&&L(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,w)},this.handlePointerMove=(w,x)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=bc(x,this.transformPagePoint),dt.update(this.updatePoint,!0)},this.handlePointerUp=(w,x)=>{this.end();const{onEnd:C,onSessionEnd:S,resumeAnimation:D}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&D&&D(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const L=Zh(w.type==="pointercancel"?this.lastMoveEventInfo:bc(x,this.transformPagePoint),this.history);this.startEvent&&C&&C(w,L),S&&S(w,L)},!nm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=c,this.contextWindow=o||window;const h=nl(t),f=bc(h,this.transformPagePoint),{point:m}=f,{timestamp:y}=Kt;this.history=[{...m,timestamp:y}];const{onSessionStart:k}=n;k&&k(t,Zh(f,this.history)),this.removeListeners=Js(As(this.contextWindow,"pointermove",this.handlePointerMove),As(this.contextWindow,"pointerup",this.handlePointerUp),As(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(h_.has(a.overflowX)||h_.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,o=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),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 bc(e,t){return t?{point:t(e.point)}:e}function f_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zh({point:e},t){return{point:e,delta:f_(e,wx(t)),offset:f_(e,VO(t)),velocity:zO(t,.1)}}function VO(e){return e[0]}function wx(e){return e[e.length-1]}function zO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const o=wx(e);for(;n>=0&&(a=e[n],!(o.timestamp-a.timestamp>Pn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&o.timestamp-a.timestamp>Pn(t)*2&&(a=e[1]);const s=On(o.timestamp-a.timestamp);if(s===0)return{x:0,y:0};const c={x:(o.x-a.x)/s,y:(o.y-a.y)/s};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function $O(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 p_(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 HO(e,{top:t,left:n,bottom:a,right:o}){return{x:p_(e.x,n,o),y:p_(e.y,t,a)}}function m_(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 WO(e,t){return{x:m_(e.x,t.x),y:m_(e.y,t.y)}}function KO(e,t){let n=.5;const a=ln(e),o=ln(t);return o>a?n=js(t.min,t.max-a,e.min):a>o&&(n=js(e.min,e.max-o,t.min)),xr(0,1,n)}function GO(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 qf=.35;function qO(e=qf){return e===!1?e=0:e===!0&&(e=qf),{x:g_(e,"left","right"),y:g_(e,"top","bottom")}}function g_(e,t,n){return{min:y_(e,t),max:y_(e,n)}}function y_(e,t){return typeof e=="number"?e:e[t]||0}const YO=new WeakMap;class ZO{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=Ot(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=y=>{n&&this.snapToCursor(nl(y).point),this.stopAnimation()},c=(y,k)=>{const{drag:w,dragPropagation:x,onDragStart:C}=this.getProps();if(w&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wI(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=k,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pr(D=>{let L=this.getAxisMotionValue(D).get()||0;if(vr.test(L)){const{projection:R}=this.visualElement;if(R&&R.layout){const O=R.layout.layoutBox[D];O&&(L=ln(O)*(parseFloat(L)/100))}}this.originPoint[D]=L}),C&&dt.update(()=>C(y,k),!1,!0),Bf(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},u=(y,k)=>{this.latestPointerEvent=y,this.latestPanInfo=k;const{dragPropagation:w,dragDirectionLock:x,onDirectionLock:C,onDrag:S}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:D}=k;if(x&&this.currentDirection===null){this.currentDirection=QO(D),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",k.point,D),this.updateAxis("y",k.point,D),this.visualElement.render(),S&&dt.update(()=>S(y,k),!1,!0)},h=(y,k)=>{this.latestPointerEvent=y,this.latestPanInfo=k,this.stop(y,k),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 bx(t,{onSessionStart:s,onStart:c,onMove:u,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:a,contextWindow:_x(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!a)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:u}=this.getProps();u&&dt.postRender(()=>u(a,o))}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:o}=this.getProps();if(!a||!wc(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let c=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(c=$O(c,this.constraints[t],this.elastic[t])),s.set(c)}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,o=this.constraints;t&&to(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=HO(a.layoutBox,t):this.constraints=!1,this.elastic=qO(n),o!==this.constraints&&!to(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&pr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=GO(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!to(t))return!1;const a=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=XI(a,o.root,this.visualElement.getTransformPagePoint());let c=WO(o.layout.layoutBox,s);if(n){const u=n(qI(c));this.hasMutatedConstraints=!!u,u&&(c=$w(u))}return c}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:o,dragTransition:s,dragSnapToOrigin:c,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},f=pr(m=>{if(!wc(m,n,this.currentDirection))return;let y=h&&h[m]||{};(c===!0||c===m)&&(y={min:0,max:0});const k=o?200:1e6,w=o?40:1e7,x={type:"inertia",velocity:a?t[m]:0,bounceStiffness:k,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...s,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return Bf(this.visualElement,t),a.start(Xp(t,a,0,n,this.visualElement,!1))}stopAnimation(){pr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),o=a[n];return o||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){pr(n=>{const{drag:a}=this.getProps();if(!wc(n,a,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:u}=o.layout.layoutBox[n],h=s.get()||0;s.set(t[n]-vt(c,u,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!to(n)||!a||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};pr(c=>{const u=this.getAxisMotionValue(c);if(u&&this.constraints!==!1){const h=u.get();o[c]=KO({min:h,max:h},this.constraints[c])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),pr(c=>{if(!wc(c,t,null))return;const u=this.getAxisMotionValue(c),{min:h,max:f}=this.constraints[c];u.set(vt(h,f,o[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;YO.set(this.visualElement,this);const t=this.visualElement.current,n=As(t,"pointerdown",f=>{const{drag:m,dragListener:y=!0}=this.getProps(),k=f.target,w=k!==t&&EI(k);m&&y&&!w&&this.start(f)});let a;const o=()=>{const{dragConstraints:f}=this.getProps();to(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=XO(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,c=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),dt.read(o);const u=Fs(window,"resize",()=>this.scalePositionWithinConstraints()),h=s.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:m})=>{this.isDragging&&m&&(pr(y=>{const k=this.getAxisMotionValue(y);k&&(this.originPoint[y]+=f[y].translate,k.set(k.get()+f[y].translate))}),this.visualElement.render())}));return()=>{u(),n(),c(),h&&h(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:c=qf,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:o,dragConstraints:s,dragElastic:c,dragMomentum:u}}}function v_(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function XO(e,t,n){const a=Sk(e,v_(n)),o=Sk(t,v_(n));return()=>{a(),o()}}function wc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function QO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class JO extends ja{constructor(t){super(t),this.removeGroupControls=jn,this.removeListeners=jn,this.controls=new ZO(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 Xh=e=>(t,n)=>{e&&dt.update(()=>e(t,n),!1,!0)};class e3 extends ja{constructor(){super(...arguments),this.removePointerDownListener=jn}onPointerDown(t){this.session=new bx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_x(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:Xh(t),onStart:Xh(n),onMove:Xh(a),onEnd:(s,c)=>{delete this.session,o&&dt.postRender(()=>o(s,c))}}}mount(){this.removePointerDownListener=As(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 Qh=!1;class t3 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),a&&a.register&&o&&a.register(s),Qh&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Wc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:o,isPresent:s}=this.props,{projection:c}=a;return c&&(c.isPresent=s,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),Qh=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?c.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?c.promote():c.relegate()||dt.postRender(()=>{const u=c.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:a}=t;a&&(a.options.layoutAnchor=n,a.root.didUpdate(),tm.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:o}=t;Qh=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),a&&a.deregister&&a.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function xx(e){const[t,n]=dx(),a=b.useContext(Op);return N.jsx(t3,{...e,layoutGroup:a,switchLayoutGroup:b.useContext(vx),isPresent:t,safeToRemove:n})}const n3={pan:{Feature:e3},drag:{Feature:JO,ProjectionNode:ux,MeasureLayout:xx}};function k_(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=a[o];s&&dt.postRender(()=>s(t,nl(t)))}class r3 extends ja{mount(){const{current:t}=this.node;t&&(this.unmount=PI(t,(n,a)=>(k_(this.node,a,"Start"),o=>k_(this.node,o,"End"))))}unmount(){}}class a3 extends ja{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=Js(Fs(this.node.current,"focus",()=>this.onFocus()),Fs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function __(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 o="onTap"+(n==="End"?"":n),s=a[o];s&&dt.postRender(()=>s(t,nl(t)))}class i3 extends ja{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=RI(t,(o,s)=>(__(this.node,s,"Start"),(c,{success:u})=>__(this.node,c,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const Yf=new WeakMap,Jh=new WeakMap,o3=e=>{const t=Yf.get(e.target);t&&t(e)},s3=e=>{e.forEach(o3)};function l3({root:e,...t}){const n=e||document;Jh.has(n)||Jh.set(n,{});const a=Jh.get(n),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(s3,{root:e,...t})),a[o]}function c3(e,t,n){const a=l3(t);return Yf.set(e,n),a.observe(e),()=>{Yf.delete(e),a.unobserve(e)}}const u3={some:0,all:1};class d3 extends ja{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:o="some",once:s}=t,c={root:n?n.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:u3[o]},u=h=>{const{isIntersecting:f}=h;if(this.isInView===f||(this.isInView=f,s&&!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(),k=f?m:y;k&&k(h)};this.stopObserver=c3(this.node.current,c,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(h3(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function h3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const f3={inView:{Feature:d3},tap:{Feature:i3},focus:{Feature:a3},hover:{Feature:r3}},p3={layout:{ProjectionNode:ux,MeasureLayout:xx}},m3={...UO,...f3,...n3,...p3},ef=MO(m3,IO);function Px(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Px(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function g3(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Px(e))&&(a&&(a+=" "),a+=t);return a}const y3=(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},v3=(e,t)=>({classGroupId:e,validator:t}),Sx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ku="-",b_=[],k3="arbitrary..",_3=e=>{const t=w3(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return b3(c);const u=c.split(ku),h=u[0]===""&&u.length>1?1:0;return Cx(u,h,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const h=a[c],f=n[c];return h?f?y3(f,h):h:f||b_}return n[c]||b_}}},Cx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const f=Cx(e,t+1,s);if(f)return f}const c=n.validators;if(c===null)return;const u=t===0?e.join(ku):e.slice(t).join(ku),h=c.length;for(let f=0;f<h;f++){const m=c[f];if(m.validator(u))return m.classGroupId}},b3=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?k3+a:void 0})(),w3=e=>{const{theme:t,classGroups:n}=e;return x3(n,t)},x3=(e,t)=>{const n=Sx();for(const a in e){const o=e[a];dm(o,n,a,t)}return n},dm=(e,t,n,a)=>{const o=e.length;for(let s=0;s<o;s++){const c=e[s];P3(c,t,n,a)}},P3=(e,t,n,a)=>{if(typeof e=="string"){S3(e,t,n);return}if(typeof e=="function"){C3(e,t,n,a);return}T3(e,t,n,a)},S3=(e,t,n)=>{const a=e===""?t:Tx(t,e);a.classGroupId=n},C3=(e,t,n,a)=>{if(E3(e)){dm(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(v3(n,e))},T3=(e,t,n,a)=>{const o=Object.entries(e),s=o.length;for(let c=0;c<s;c++){const[u,h]=o[c];dm(h,Tx(t,u),n,a)}},Tx=(e,t)=>{let n=e;const a=t.split(ku),o=a.length;for(let s=0;s<o;s++){const c=a[s];let u=n.nextPart.get(c);u||(u=Sx(),n.nextPart.set(c,u)),n=u}return n},E3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,A3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(s,c)=>{n[s]=c,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(s){let c=n[s];if(c!==void 0)return c;if((c=a[s])!==void 0)return o(s,c),c},set(s,c){s in n?n[s]=c:o(s,c)}}},Zf="!",w_=":",R3=[],x_=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),L3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const s=[];let c=0,u=0,h=0,f;const m=o.length;for(let C=0;C<m;C++){const S=o[C];if(c===0&&u===0){if(S===w_){s.push(o.slice(h,C)),h=C+1;continue}if(S==="/"){f=C;continue}}S==="["?c++:S==="]"?c--:S==="("?u++:S===")"&&u--}const y=s.length===0?o:o.slice(h);let k=y,w=!1;y.endsWith(Zf)?(k=y.slice(0,-1),w=!0):y.startsWith(Zf)&&(k=y.slice(1),w=!0);const x=f&&f>h?f-h:void 0;return x_(s,w,k,x)};if(t){const o=t+w_,s=a;a=c=>c.startsWith(o)?s(c.slice(o.length)):x_(R3,!1,c,void 0,!0)}if(n){const o=a;a=s=>n({className:s,parseClassName:o})}return a},D3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let s=0;s<n.length;s++){const c=n[s],u=c[0]==="[",h=t.has(c);u||h?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(c)):o.push(c)}return o.length>0&&(o.sort(),a.push(...o)),a}},M3=e=>({cache:A3(e.cacheSize),parseClassName:L3(e),sortModifiers:D3(e),..._3(e)}),I3=/\s+/,N3=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:s}=t,c=[],u=e.trim().split(I3);let h="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:y,modifiers:k,hasImportantModifier:w,baseClassName:x,maybePostfixModifierPosition:C}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let S=!!C,D=a(S?x.substring(0,C):x);if(!D){if(!S){h=m+(h.length>0?" "+h:h);continue}if(D=a(x),!D){h=m+(h.length>0?" "+h:h);continue}S=!1}const L=k.length===0?"":k.length===1?k[0]:s(k).join(":"),R=w?L+Zf:L,O=R+D;if(c.indexOf(O)>-1)continue;c.push(O);const G=o(D,S);for(let W=0;W<G.length;++W){const z=G[W];c.push(R+z)}h=m+(h.length>0?" "+h:h)}return h},O3=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=Ex(n))&&(o&&(o+=" "),o+=a);return o},Ex=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=Ex(e[a]))&&(n&&(n+=" "),n+=t);return n},j3=(e,...t)=>{let n,a,o,s;const c=h=>{const f=t.reduce((m,y)=>y(m),e());return n=M3(f),a=n.cache.get,o=n.cache.set,s=u,u(h)},u=h=>{const f=a(h);if(f)return f;const m=N3(h,n);return o(h,m),m};return s=c,(...h)=>s(O3(...h))},U3=[],Nt=e=>{const t=n=>n[e]||U3;return t.isThemeGetter=!0,t},Ax=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,B3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,F3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V3=/\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$/,z3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xa=e=>B3.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Pa=e=>!!e&&Number.isInteger(Number(e)),tf=e=>e.endsWith("%")&&qe(e.slice(0,-1)),Fr=e=>F3.test(e),Lx=()=>!0,W3=e=>V3.test(e)&&!z3.test(e),hm=()=>!1,K3=e=>$3.test(e),G3=e=>H3.test(e),q3=e=>!ke(e)&&!be(e),Y3=e=>Ua(e,Ix,hm),ke=e=>Ax.test(e),ei=e=>Ua(e,Nx,W3),P_=e=>Ua(e,rj,qe),Z3=e=>Ua(e,jx,Lx),X3=e=>Ua(e,Ox,hm),S_=e=>Ua(e,Dx,hm),Q3=e=>Ua(e,Mx,G3),xc=e=>Ua(e,Ux,K3),be=e=>Rx.test(e),ms=e=>gi(e,Nx),J3=e=>gi(e,Ox),C_=e=>gi(e,Dx),ej=e=>gi(e,Ix),tj=e=>gi(e,Mx),Pc=e=>gi(e,Ux,!0),nj=e=>gi(e,jx,!0),Ua=(e,t,n)=>{const a=Ax.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},gi=(e,t,n=!1)=>{const a=Rx.exec(e);return a?a[1]?t(a[1]):n:!1},Dx=e=>e==="position"||e==="percentage",Mx=e=>e==="image"||e==="url",Ix=e=>e==="length"||e==="size"||e==="bg-size",Nx=e=>e==="length",rj=e=>e==="number",Ox=e=>e==="family-name",jx=e=>e==="number"||e==="weight",Ux=e=>e==="shadow",aj=()=>{const e=Nt("color"),t=Nt("font"),n=Nt("text"),a=Nt("font-weight"),o=Nt("tracking"),s=Nt("leading"),c=Nt("breakpoint"),u=Nt("container"),h=Nt("spacing"),f=Nt("radius"),m=Nt("shadow"),y=Nt("inset-shadow"),k=Nt("text-shadow"),w=Nt("drop-shadow"),x=Nt("blur"),C=Nt("perspective"),S=Nt("aspect"),D=Nt("ease"),L=Nt("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],G=()=>[...O(),be,ke],W=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],P=()=>[be,ke,h],Y=()=>[xa,"full","auto",...P()],X=()=>[Pa,"none","subgrid",be,ke],ue=()=>["auto",{span:["full",Pa,be,ke]},Pa,be,ke],se=()=>[Pa,"auto",be,ke],Ae=()=>["auto","min","max","fr",be,ke],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],pe=()=>["auto",...P()],Ne=()=>[xa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],K=()=>[xa,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Z=()=>[xa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],H=()=>[e,be,ke],I=()=>[...O(),C_,S_,{position:[be,ke]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",ej,Y3,{size:[be,ke]}],Re=()=>[tf,ms,ei],Pe=()=>["","none","full",f,be,ke],Te=()=>["",qe,ms,ei],Ge=()=>["solid","dashed","dotted","double"],Qe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ue=()=>[qe,tf,C_,S_],jt=()=>["","none",x,be,ke],Hn=()=>["none",qe,be,ke],Cr=()=>["none",qe,be,ke],pt=()=>[qe,be,ke],en=()=>[xa,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fr],breakpoint:[Fr],color:[Lx],container:[Fr],"drop-shadow":[Fr],ease:["in","out","in-out"],font:[q3],"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",qe],text:[Fr],"text-shadow":[Fr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xa,ke,be,S]}],container:["container"],columns:[{columns:[qe,ke,be,u]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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:G()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Pa,"auto",be,ke]}],basis:[{basis:[xa,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,xa,"auto","initial","none",ke]}],grow:[{grow:["",qe,be,ke]}],shrink:[{shrink:["",qe,be,ke]}],order:[{order:[Pa,"first","last","none",be,ke]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:ue()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:ue()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:pe()}],mx:[{mx:pe()}],my:[{my:pe()}],ms:[{ms:pe()}],me:[{me:pe()}],mbs:[{mbs:pe()}],mbe:[{mbe:pe()}],mt:[{mt:pe()}],mr:[{mr:pe()}],mb:[{mb:pe()}],ml:[{ml:pe()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ne()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[u,"screen",...Ne()]}],"min-w":[{"min-w":[u,"screen","none",...Ne()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Ne()]}],h:[{h:["screen","lh",...Ne()]}],"min-h":[{"min-h":["screen","lh","none",...Ne()]}],"max-h":[{"max-h":["screen","lh",...Ne()]}],"font-size":[{text:["base",n,ms,ei]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,nj,Z3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tf,ke]}],"font-family":[{font:[J3,X3,t]}],"font-features":[{"font-features":[ke]}],"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:[o,be,ke]}],"line-clamp":[{"line-clamp":[qe,"none",be,P_]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",be,ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",be,ei]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[qe,"auto",be,ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ke]}],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",be,ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pa,be,ke],radial:["",be,ke],conic:[Pa,be,ke]},tj,Q3]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:Re()}],"gradient-via-pos":[{via:Re()}],"gradient-to-pos":[{to:Re()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:Pe()}],"rounded-s":[{"rounded-s":Pe()}],"rounded-e":[{"rounded-e":Pe()}],"rounded-t":[{"rounded-t":Pe()}],"rounded-r":[{"rounded-r":Pe()}],"rounded-b":[{"rounded-b":Pe()}],"rounded-l":[{"rounded-l":Pe()}],"rounded-ss":[{"rounded-ss":Pe()}],"rounded-se":[{"rounded-se":Pe()}],"rounded-ee":[{"rounded-ee":Pe()}],"rounded-es":[{"rounded-es":Pe()}],"rounded-tl":[{"rounded-tl":Pe()}],"rounded-tr":[{"rounded-tr":Pe()}],"rounded-br":[{"rounded-br":Pe()}],"rounded-bl":[{"rounded-bl":Pe()}],"border-w":[{border:Te()}],"border-w-x":[{"border-x":Te()}],"border-w-y":[{"border-y":Te()}],"border-w-s":[{"border-s":Te()}],"border-w-e":[{"border-e":Te()}],"border-w-bs":[{"border-bs":Te()}],"border-w-be":[{"border-be":Te()}],"border-w-t":[{"border-t":Te()}],"border-w-r":[{"border-r":Te()}],"border-w-b":[{"border-b":Te()}],"border-w-l":[{"border-l":Te()}],"divide-x":[{"divide-x":Te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ge(),"hidden","none"]}],"divide-style":[{divide:[...Ge(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,be,ke]}],"outline-w":[{outline:["",qe,ms,ei]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",m,Pc,xc]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",y,Pc,xc]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[qe,ei]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":Te()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",k,Pc,xc]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[qe,be,ke]}],"mix-blend":[{"mix-blend":[...Qe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Qe()}],"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":[qe]}],"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":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"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":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"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":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"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":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"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":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"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":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"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":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[be,ke]}],"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":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"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":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ke]}],filter:[{filter:["","none",be,ke]}],blur:[{blur:jt()}],brightness:[{brightness:[qe,be,ke]}],contrast:[{contrast:[qe,be,ke]}],"drop-shadow":[{"drop-shadow":["","none",w,Pc,xc]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",qe,be,ke]}],"hue-rotate":[{"hue-rotate":[qe,be,ke]}],invert:[{invert:["",qe,be,ke]}],saturate:[{saturate:[qe,be,ke]}],sepia:[{sepia:["",qe,be,ke]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ke]}],"backdrop-blur":[{"backdrop-blur":jt()}],"backdrop-brightness":[{"backdrop-brightness":[qe,be,ke]}],"backdrop-contrast":[{"backdrop-contrast":[qe,be,ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,be,ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,be,ke]}],"backdrop-invert":[{"backdrop-invert":["",qe,be,ke]}],"backdrop-opacity":[{"backdrop-opacity":[qe,be,ke]}],"backdrop-saturate":[{"backdrop-saturate":[qe,be,ke]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,be,ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",be,ke]}],ease:[{ease:["linear","initial",D,be,ke]}],delay:[{delay:[qe,be,ke]}],animate:[{animate:["none",L,be,ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,be,ke]}],"perspective-origin":[{"perspective-origin":G()}],rotate:[{rotate:Hn()}],"rotate-x":[{"rotate-x":Hn()}],"rotate-y":[{"rotate-y":Hn()}],"rotate-z":[{"rotate-z":Hn()}],scale:[{scale:Cr()}],"scale-x":[{"scale-x":Cr()}],"scale-y":[{"scale-y":Cr()}],"scale-z":[{"scale-z":Cr()}],"scale-3d":["scale-3d"],skew:[{skew:pt()}],"skew-x":[{"skew-x":pt()}],"skew-y":[{"skew-y":pt()}],transform:[{transform:[be,ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:G()}],"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:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",be,ke]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",be,ke]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[qe,ms,ei,P_]}],stroke:[{stroke:["none",...H()]}],"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"]}},ij=j3(aj);function Tt(...e){return ij(g3(e))}const oj=N.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[N.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"}),N.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"}),N.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"}),N.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"})]}),sj=N.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:N.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"})}),lj={google:oj,github:sj},cj={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function uj(e){return cj[e]||String(e||"").replace(/-/g," ")}function dj(){Qs();const{isOpen:e,closeLoginModal:t}=j0(),{enabled:n,signedIn:a,refreshUser:o,signInWithPassword:s,signUp:c,signInWithOAuth:u,getPublicAuthConfig:h}=Zs(),[f,m]=b.useState("signin"),[y,k]=b.useState(""),[w,x]=b.useState(""),[C,S]=b.useState(""),[D,L]=b.useState(!1),[R,O]=b.useState(null),[G,W]=b.useState(null),[z,P]=b.useState(!1),[Y,X]=b.useState(!0),[ue,se]=b.useState([]),[Ae,fe]=b.useState(8);b.useEffect(()=>{e&&(O(null),W(null),m("signin"),k(""),x(""),S(""),P(!1))},[e]),b.useEffect(()=>{if(!e||!n||ue.length>0)return;let K=!0;return X(!0),(async()=>{const{data:Z,error:H}=await h();if(K){if(H||!Z)se(["google","github"]);else{const I=Array.isArray(Z.oAuthProviders)?Z.oAuthProviders:[],q=Array.isArray(Z.customOAuthProviders)?Z.customOAuthProviders:[];se([...I,...q]),typeof Z.passwordMinLength=="number"&&Z.passwordMinLength>0&&fe(Z.passwordMinLength)}X(!1)}})(),()=>{K=!1}},[e,n,h,ue.length]),b.useEffect(()=>{e&&a&&t()},[e,a,t]);const le=b.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),pe=b.useCallback(async K=>{O(null),L(!0);try{const{error:Z}=await u(K,le);Z&&O(Z.message||String(Z))}finally{L(!1)}},[u,le]),Ne=b.useCallback(async K=>{K.preventDefault(),O(null),L(!0);try{if(f==="signup"){const{data:H,error:I}=await c({email:y.trim(),password:w,name:C.trim()||void 0});if(I){O(I.message||String(I));return}if(H?.requireEmailVerification){W(Fe("login.verify_email_pending")),m("signin");return}await o();return}const{error:Z}=await s({email:y.trim(),password:w});if(Z){O(Z.message||String(Z));return}await o()}finally{L(!1)}},[f,y,w,C,c,s,o]);return b.useEffect(()=>{if(!e)return;const K=Z=>{Z.key==="Escape"&&t()};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[e,t]),n?N.jsx(lO,{children:e&&N.jsxs(ef.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:[N.jsx(ef.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60 ",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),N.jsxs(ef.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:K=>K.stopPropagation(),children:[N.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:N.jsx(I0,{className:"h-5 w-5"})}),N.jsxs("div",{className:"text-center mb-6",children:[N.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[N.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),N.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white",children:"Token Tracker"})]}),N.jsx("p",{className:"text-sm text-oai-gray-500",children:Fe("login_modal.subtitle")})]}),G&&N.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:G}),R&&N.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400",role:"alert",children:R}),N.jsx("div",{className:"space-y-2.5 mb-5",children:Y?N.jsxs("div",{className:"space-y-2.5",children:[N.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),N.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):ue.map(K=>N.jsxs("button",{type:"button",disabled:D,onClick:()=>pe(K),className:Tt("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:[lj[K]||null,Fe("login.oauth.continue",{provider:uj(K)})]},K))}),z?N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"relative mb-5",children:[N.jsx("div",{className:"absolute inset-0 flex items-center",children:N.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),N.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:N.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")})})]}),N.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:[N.jsx("button",{type:"button",className:Tt("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"),O(null)},children:Fe("login.tab.sign_in")}),N.jsx("button",{type:"button",className:Tt("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"),O(null)},children:Fe("login.tab.sign_up")})]}),N.jsxs("form",{onSubmit:Ne,className:"space-y-3",children:[f==="signup"&&N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.name")}),N.jsx("input",{id:"modal-name",type:"text",autoComplete:"name",value:C,onChange:K=>S(K.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")})]}),N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.email")}),N.jsx("input",{id:"modal-email",type:"email",autoComplete:"email",required:!0,value:y,onChange:K=>k(K.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"})]}),N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.password")}),N.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:K=>x(K.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"&&N.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login.password_hint",{min:String(Ae)})})]}),N.jsx("button",{type:"submit",disabled:D,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")})]})]}):N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"relative mb-5",children:[N.jsx("div",{className:"absolute inset-0 flex items-center",children:N.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),N.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:N.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")})})]}),N.jsxs("button",{type:"button",onClick:()=>P(!0),className:Tt("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:[N.jsx(GD,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Fe("login_modal.continue_email")]})]})]})]})}):null}const hj={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"};function fj(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?hj:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||Wr()).trim()}function G4(){return Wr()}function pj(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 mj=300*1e3,gj=720*60*1e3;function fm(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function yj(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+gj<=t:!0}async function Bx(e,t){const n=Wr();if(!fm(n)||!e)return;const a=n.replace(/\/$/,""),o=Ks(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};o&&(s.apikey=o);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:t})})}catch{}}async function vj(e){const t=Wr();if(!fm(t)||!e)return null;const n=t.replace(/\/$/,""),a=Ks(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(o.apikey=a);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",c=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:o,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:s})});if(!c.ok)return null;const u=await c.json().catch(()=>null),h=typeof u?.token=="string"?u.token:null,f=typeof u?.device_id=="string"?u.device_id:null;return!h||!f?null:{token:h,deviceId:f,issuedAt:typeof u?.created_at=="string"?u.created_at:new Date().toISOString()}}async function T_(e){const{deviceToken:t,insforgeBaseUrl:n}=e,a={deviceToken:t},o=n||Wr();fm(o)&&(a.insforgeBaseUrl=o.trim());const s=await Lp(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...s},body:JSON.stringify(a)}),u=await c.json().catch(()=>({}));if(!c.ok){const h=typeof u.error=="string"?u.error:`HTTP ${c.status}`;throw new Error(h)}return u}async function E_(e){const t=await e();if(!t)return null;const n=r0();if(n&&!yj(n))return n;const a=await vj(t);return a?(BR(a),a):null}async function Fx(e){let t=await e();if(!t)return null;let n=await E_(async()=>t);if(!n)return t;try{return await T_({deviceToken:n.token,insforgeBaseUrl:Wr()}),t}catch(a){if(!r0()||(a0(),t=await e(),!t)||(n=await E_(async()=>t),!n))throw a;return await T_({deviceToken:n.token,insforgeBaseUrl:Wr()}),t}}async function kj(e){const t=FR();if(Date.now()-t<mj)return;const n=await Fx(e);n&&(i0(Date.now()),await Bx(n,"cloud-sync-auto"))}async function q4(e){const t=await Fx(e);t&&(i0(Date.now()),await Bx(t,"cloud-sync-now"))}function _j(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function bj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||_j(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function wj(){const e=Fn(),t=Zs(),n=b.useRef(!1);b.useEffect(()=>{if(!jR()||!bj(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!UR())return;let a=!1;const o=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await kj(()=>t.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(o)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function xj(){const e=b.useContext(N0);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function Pj({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function Sj(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 Cj(e){return e?Ip()?`/api/avatar-proxy?url=${encodeURIComponent(e)}`:e:null}function Sc(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 A_({className:e,variant:t="header",collapsed:n=!1,onAfterAction:a}){Qs();const o=t==="sidebar",{enabled:s,loading:c,signedIn:u,user:h,displayName:f}=Zs(),{openLoginModal:m}=j0(),y=wu(),k=b.useMemo(()=>Sj(h),[h]),w=b.useMemo(()=>Cj(k),[k]),[x,C]=Rs.useState(!1);if(Rs.useEffect(()=>{C(!1)},[w]),!s)return null;if(c)return N.jsx("div",{className:Tt("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",e),"aria-hidden":!0});if(!u)return o?N.jsxs("button",{type:"button",onClick:()=>{m(),a?.()},className:Tt("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:[N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:N.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&N.jsx("span",{className:"truncate flex-1 text-left",children:Fe("header.auth.sign_in_aria")})]}):N.jsx("button",{type:"button",onClick:m,className:Tt("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4 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 S=()=>{y("/settings"),a?.()};return N.jsx("div",{className:Tt(o?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:N.jsxs("button",{type:"button",onClick:S,className:Tt(o?Tt("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-md 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:o&&n?f:void 0,children:[o?N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:w&&!x?N.jsx("img",{src:w,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",onError:()=>C(!0)}):Sc(f)==="?"?N.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:N.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):N.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:Sc(f)})}):w&&!x?N.jsx("img",{src:w,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",onError:()=>C(!0)}):Sc(f)==="?"?N.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:N.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):N.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:Sc(f)}),o?!n&&N.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}):N.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 Xf="tt.sidebarCollapsed";function Tj(){return[{id:"general",label:Fe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:BD,label:Fe("nav.usage")},{id:"limits",to:"/limits",icon:VD,label:Fe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:cM,label:Fe("nav.leaderboard")}]},{id:"tools",label:Fe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:WD,label:Fe("nav.widgets")},{id:"skills",to:"/skills",icon:eM,label:Fe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:$D,label:Fe("nav.ip_check")}]},{id:"account",label:Fe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:aM,label:Fe("nav.settings")}]}]}function Ej(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Xf)==="1"}catch{return!1}}function Aj(){const[e,t]=b.useState(Ej),n=b.useCallback(()=>{t(a=>{const o=!a;try{typeof window<"u"&&window.localStorage.setItem(Xf,o?"1":"0")}catch{}return o})},[]);return b.useEffect(()=>{if(typeof window>"u")return;const a=o=>{o.key===Xf&&t(o.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function Rj(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function Lj({label:e,collapsed:t,first:n}){return t?n?null:N.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):N.jsx("div",{className:Tt("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 Dj({item:e,collapsed:t,active:n,onClick:a}){const o=e.icon;return N.jsxs(Pu,{to:e.to,onClick:a,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:Tt("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:[N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:N.jsx(o,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&N.jsx("span",{className:"truncate",children:e.label})]})}function Mj({as:e="button",title:t,onClick:n,href:a,children:o,className:s,...c}){const u=Tt("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",s);return e==="a"?N.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...c,children:o}):N.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...c,children:o})}function Ij({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,a]=b.useState(null);return b.useEffect(()=>{if(typeof window>"u")return;const o=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;Pj({prefersReducedMotion:o,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&a(s.stargazers_count)}).catch(()=>{})},[e]),N.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:Tt("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:[N.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:N.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"})}),N.jsx("span",{children:"Star"}),n!==null&&N.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const Nj=[{value:"light",label:"Light",Icon:M0},{value:"dark",label:"Dark",Icon:D0},{value:"system",label:"System",Icon:XD}];function Oj({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[o,s]=b.useState(!1),c=b.useRef(null),u=t==="dark"?D0:M0;return b.useEffect(()=>{if(!o)return;const h=m=>{c.current&&!c.current.contains(m.target)&&s(!1)},f=m=>{m.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[o]),N.jsxs("div",{ref:c,className:"relative",children:[N.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":o,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(h=>!h),className:Tt("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:N.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),o&&N.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:Nj.map(({value:h,label:f,Icon:m})=>{const y=e===h;return N.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),s(!1)},className:Tt("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:[N.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),N.jsx("span",{children:f})]},h)})})]})}function Vx({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:o,glassChrome:s=!1}){const u=Fn()?.pathname||"/",{theme:h,resolvedTheme:f,setTheme:m}=xj(),{resolvedLocale:y}=Qs(),k=b.useMemo(()=>Tj(),[y]);return N.jsxs(N.Fragment,{children:[N.jsx("div",{className:Tt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:a?N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx("div",{className:"flex-1 min-w-0",children:N.jsx(A_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),N.jsx("button",{type:"button",onClick:o,"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:N.jsx(I0,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):N.jsx(A_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),N.jsx("nav",{"aria-label":Fe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:k.map((w,x)=>N.jsxs("div",{className:"flex flex-col",children:[N.jsx(Lj,{label:w.label,collapsed:e,first:x===0}),N.jsx("div",{className:"flex flex-col gap-0.5",children:w.items.map(C=>N.jsx(Dj,{item:C,collapsed:e,active:Rj(u,C.to),onClick:n},C.id))})]},w.id))}),N.jsxs("div",{className:Tt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[N.jsx(Oj,{theme:h,resolvedTheme:f,onSetTheme:m,glassChrome:s}),N.jsx("div",{className:"flex items-center gap-1.5",children:!e&&N.jsx(Ij,{glassChrome:s})})]})]})}function jj({collapsed:e,onToggleCollapsed:t}){const n=b.useMemo(()=>typeof window>"u"?!1:ar()||Ip(),[]);return N.jsx("aside",{"aria-label":Fe("nav.aside_label"),className:Tt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:N.jsx(Vx,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function Uj({open:e,onClose:t}){return b.useEffect(()=>{if(!e)return;const n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),b.useEffect(()=>{if(!e)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e]),e?N.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[N.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),N.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:N.jsx(Vx,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function Bj({onOpenDrawer:e}){return N.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:[N.jsx(Mj,{title:Fe("nav.menu"),onClick:e,children:N.jsx(YD,{className:"h-5 w-5","aria-hidden":!0})}),N.jsxs(Pu,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[N.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),N.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),N.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function Fj({children:e}){const{collapsed:t,toggle:n}=Aj(),[a,o]=b.useState(!1),s=b.useCallback(()=>o(!0),[]),c=b.useCallback(()=>o(!1),[]),u=b.useMemo(()=>typeof window>"u"?!1:ar()||Ip(),[]);return N.jsxs("div",{className:Tt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",u?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[u&&N.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),N.jsxs("div",{className:"flex-1 min-h-0 flex",children:[N.jsx(jj,{collapsed:t,onToggleCollapsed:n}),N.jsx(Uj,{open:a,onClose:c}),N.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:N.jsxs("div",{className:Tt("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",u?"tt-native-main-card":"rounded-2xl",!u&&"shadow-sm"),children:[N.jsx(Bj,{onOpenDrawer:s}),N.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}const Vj=typeof window<"u"?window.location.search:"",R_=new URLSearchParams(Vj),Cc=R_.get("insforge_code")||R_.get("code")||null,zj=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function $j(){Qs();const{loading:e,signedIn:t}=Zs(),n=wu(),[a,o]=b.useState("processing"),[s,c]=b.useState(null),u=b.useRef(!1);b.useEffect(()=>{if(!(!Cc||u.current)){if(u.current=!0,zj){c(!1);return}(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();c(!!m?.native)}catch{c(!1)}})()}},[]),b.useEffect(()=>{if(s!==!0||!Cc)return;o("redirecting");const f=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(Cc)}`},200);return()=>clearTimeout(f)},[s]),b.useEffect(()=>{if(s!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const f=setTimeout(()=>{t||o("failed")},12e3);return()=>clearTimeout(f)},[s,e,t,n]),b.useEffect(()=>{if(!Cc&&s===null){const f=setTimeout(()=>o("failed"),3e3);return()=>clearTimeout(f)}},[s]);const h=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&s!==!0&&(s===null||s===!1&&e)?N.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):N.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:N.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),N.jsx("p",{className:"text-oai-gray-400 text-sm",children:Fe("auth.callback.processing")})]}),a==="redirecting"&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:N.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:N.jsx("path",{d:"M20 6 9 17l-5-5"})})}),N.jsx("p",{className:"text-white text-sm font-medium",children:Fe("auth.callback.success")}),N.jsx("p",{className:"text-oai-gray-500 text-xs",children:Fe("auth.callback.redirecting")})]}),a==="failed"&&N.jsxs("div",{className:"space-y-3",children:[N.jsx("p",{className:"text-oai-gray-300 text-sm",children:Fe("auth.callback.failed")}),N.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=b.lazy(()=>$n(()=>import("./DashboardPage-IdI75EjJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.DashboardPage}))),Wj=b.lazy(()=>$n(()=>import("./IpCheckPage-C57xLKui.js"),[])),Kj=b.lazy(()=>$n(()=>import("./LandingPage-COsYhPBM.js"),__vite__mapDeps([11,12,8])).then(e=>({default:e.LandingPage}))),Gj=b.lazy(()=>$n(()=>import("./LeaderboardPage-BuRxhyKL.js"),__vite__mapDeps([13,9,2,14,15])).then(e=>({default:e.LeaderboardPage}))),qj=b.lazy(()=>$n(()=>import("./LeaderboardProfilePage-SFrFYBLF.js"),__vite__mapDeps([16,2,12,17,14,9,3,4,18,5])).then(e=>({default:e.LeaderboardProfilePage}))),Yj=b.lazy(()=>$n(()=>import("./LimitsPage-CvN3W5RK.js"),__vite__mapDeps([19,1,20,7,10,8,21,18,22])).then(e=>({default:e.LimitsPage}))),Zj=b.lazy(()=>$n(()=>import("./LoginPage-31Oiu8B_.js"),[]).then(e=>({default:e.LoginPage}))),Xj=b.lazy(()=>$n(()=>import("./DevicePage-BuyHqTu3.js"),[])),Qj=b.lazy(()=>$n(()=>import("./WrappedPage-DhojFfsH.js"),[])),Jj=b.lazy(()=>$n(()=>import("./SettingsPage-C7FP78_q.js"),__vite__mapDeps([23,20,24,7,25,2,15,4,22])).then(e=>({default:e.SettingsPage}))),e4=b.lazy(()=>$n(()=>import("./SkillsPage-Df5UWPX0.js"),__vite__mapDeps([26,21,18,22,7,5,4,9,25,6,8,15])).then(e=>({default:e.SkillsPage}))),t4=b.lazy(()=>$n(()=>import("./WidgetsPage-BCV3A8Pz.js"),__vite__mapDeps([27,24,7,10,8,18,22,15])).then(e=>({default:e.WidgetsPage})));function n4(){const{resolvedLocale:e}=Qs(),t=Fn(),n=Zs();wj();const a=Sn(),o=b.useMemo(()=>typeof window>"u"?!1:pj(window.location.search),[]),s=t?.pathname||"/",c=new URL(window.location.href),u=c.pathname.replace(/\/+$/,"")||"/",f=u.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,m=c.searchParams.get("token")||null,y=f||m,k=u==="/share"||u==="/share.html"||u.startsWith("/share/"),w=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),x=s.replace(/\/+$/,"")||"/",C=x==="/leaderboard",S=x.match(/^\/u\/([^/]+)$/i),D=S?S[1]:null,L=!!(n.enabled&&n.signedIn),R=w||L,O=!1,G=fj(),W=b.useMemo(()=>!n.enabled||!L?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[L,n]);let z=w||a||o?"dashboard":"landing";x==="/landing"&&(z="landing"),x==="/dashboard"&&(z="dashboard"),C&&(z="dashboard"),D&&(z="dashboard");const P=x==="/limits",Y=x==="/settings",X=x==="/skills",ue=x==="/widgets",se=x==="/ip-check";(P||Y||X||ue||se)&&(z="dashboard");let Ae=Hj;D?Ae=qj:x==="/leaderboard"?Ae=Gj:P?Ae=Yj:Y?Ae=Jj:X?Ae=e4:ue?Ae=t4:se&&(Ae=Wj);const fe=!k&&(x==="/dashboard"||x==="/"||C||P||Y||X||ue||se);let le=null;if(x==="/auth/callback"||x==="/auth/native-callback")le=N.jsx($j,{});else if(x==="/login")le=N.jsx(Zj,{});else if(x==="/device")le=N.jsx(Xj,{});else if(x==="/wrapped")le=N.jsx(Qj,{});else if(z==="landing")le=N.jsx(Kj,{signInUrl:"/login",signUpUrl:"/login"});else{const pe=N.jsx(Ae,{baseUrl:G,auth:W,signedIn:R,sessionSoftExpired:O,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:k,publicToken:y,userId:D,signInUrl:"/login",signUpUrl:"/login"},e);fe?le=N.jsx(Fj,{children:pe}):le=pe}return N.jsx(hM,{children:N.jsx(mM,{children:N.jsxs(gM,{children:[N.jsx(b.Suspense,{fallback:null,children:le}),N.jsx(dj,{}),N.jsx(_D,{}),N.jsx(LD,{})]})})})}const r4=W1([{path:"*",element:N.jsx(n4,{})}]);MS.createRoot(document.getElementById("root")).render(N.jsx(Rs.StrictMode,{children:N.jsx(JL,{children:N.jsx(oD,{children:N.jsx(RL,{children:N.jsx(aT,{router:r4})})})})}));export{Aa as $,g0 as A,Fe as B,N as C,ef as D,Nc as E,S4 as F,P4 as G,Ns as H,dM as I,pu as J,O4 as K,Pu as L,lm as M,m4 as N,p4 as O,lO as P,xj as Q,Rs as R,Tt as S,j0 as T,Zs as U,b4 as V,A4 as W,I0 as X,Qs as Y,pj as Z,$n as _,Gt as a,M4 as a0,C4 as a1,YR as a2,g4 as a3,y4 as a4,I4 as a5,x4 as a6,_4 as a7,A_ as a8,rT as a9,iD as aA,Ep as aB,Lp as aC,H4 as aD,ar as aE,Ip as aF,z4 as aG,W4 as aH,$4 as aI,Ss as aJ,Fw as aK,WI as aL,$f as aM,D4 as aN,ES as aO,Qf as aP,Fn as aa,wu as ab,G4 as ac,UR as ad,d4 as ae,q4 as af,h4 as ag,L4 as ah,cM as ai,Pj as aj,aM as ak,F4 as al,a4 as am,NR as an,Op as ao,jR as ap,Zv as aq,R4 as ar,M0 as as,D0 as at,XD as au,mo as av,iu as aw,Dp as ax,w4 as ay,nM as az,U0 as b,dn as c,Na as d,kk as e,dt as f,y0 as g,Sn as h,h2 as i,f4 as j,$R as k,V4 as l,yo as m,aL as n,iL as o,j4 as p,k4 as q,b as r,E4 as s,U4 as t,jp as u,B4 as v,v4 as w,yt as x,T4 as y,N4 as z};
845
+ `),()=>{u.current?.removeAttribute("data-motion-pop-id"),G.contains(O)&&G.removeChild(O)}},[t]),N.jsx(aO,{isPresent:t,childRef:u,sizeRef:h,pop:s,children:s===!1?e:b.cloneElement(e,{ref:y})})}const oO=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:o,presenceAffectsLayout:s,mode:c,anchorX:u,anchorY:h,root:f})=>{const m=jp(sO),y=b.useId();let k=!0,w=b.useMemo(()=>(k=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:x=>{m.set(x,!0);for(const C of m.values())if(!C)return;a&&a()},register:x=>(m.set(x,!1),()=>m.delete(x))}),[n,m,a]);return s&&k&&(w={...w}),b.useMemo(()=>{m.forEach((x,C)=>m.set(C,!1))},[n]),b.useEffect(()=>{!n&&!m.size&&a&&a()},[n]),e=N.jsx(iO,{pop:c==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:f,children:e}),N.jsx(Lu.Provider,{value:w,children:e})};function sO(){return new Map}function dx(e=!0){const t=b.useContext(Lu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:o}=t,s=b.useId();b.useEffect(()=>{if(e)return o(s)},[e]);const c=b.useCallback(()=>e&&a&&a(s),[s,a,e]);return!n&&a?[!1,c]:[!0]}const _c=e=>e.key||"";function s_(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const lO=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s="sync",propagate:c=!1,anchorX:u="left",anchorY:h="top",root:f})=>{const[m,y]=dx(c),k=b.useMemo(()=>s_(e),[e]),w=c&&!m?[]:k.map(_c),x=b.useRef(!0),C=b.useRef(k),S=jp(()=>new Map),D=b.useRef(new Set),[L,R]=b.useState(k),[O,G]=b.useState(k);U0(()=>{x.current=!1,C.current=k;for(let P=0;P<O.length;P++){const Y=_c(O[P]);w.includes(Y)?(S.delete(Y),D.current.delete(Y)):S.get(Y)!==!0&&S.set(Y,!1)}},[O,w.length,w.join("-")]);const W=[];if(k!==L){let P=[...k];for(let Y=0;Y<O.length;Y++){const X=O[Y],ue=_c(X);w.includes(ue)||(P.splice(Y,0,X),W.push(X))}return s==="wait"&&W.length&&(P=W),G(s_(P)),R(k),null}const{forceRender:z}=b.useContext(Op);return N.jsx(N.Fragment,{children:O.map(P=>{const Y=_c(P),X=c&&!m?!1:k===O||w.includes(Y),ue=()=>{if(D.current.has(Y))return;if(S.has(Y))D.current.add(Y),S.set(Y,!0);else return;let se=!0;S.forEach(Ae=>{Ae||(se=!1)}),se&&(z?.(),G(C.current),c&&y?.(),a&&a())};return N.jsx(oO,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:f,onExitComplete:X?void 0:ue,anchorX:u,anchorY:h,children:P},Y)})})},hx=b.createContext({strict:!1}),l_={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 c_=!1;function cO(){if(c_)return;const e={};for(const t in l_)e[t]={isEnabled:n=>l_[t].some(a=>!!n[a])};Vw(e),c_=!0}function fx(){return cO(),KI()}function uO(e){const t=fx();for(const n in e)t[n]={...t[n],...e[n]};Vw(t)}const dO=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 vu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||dO.has(e)}let px=e=>!vu(e);function hO(e){typeof e=="function"&&(px=t=>t.startsWith("on")?!vu(t):e(t))}try{hO(require("@emotion/is-prop-valid").default)}catch{}function fO(e,t,n){const a={};for(const o in e)o==="values"&&typeof e.values=="object"||Gt(e[o])||(px(o)||n===!0&&vu(o)||!t&&!vu(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}const Nu=b.createContext({});function pO(e,t){if(Iu(e)){const{initial:n,animate:a}=e;return{initial:n===!1||Bs(n)?n:void 0,animate:Bs(a)?a:void 0}}return e.inherit!==!1?t:{}}function mO(e){const{initial:t,animate:n}=pO(e,b.useContext(Nu));return b.useMemo(()=>({initial:t,animate:n}),[u_(t),u_(n)])}function u_(e){return Array.isArray(e)?e.join(" "):e}const cm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mx(e,t,n){for(const a in t)!Gt(t[a])&&!qw(a,n)&&(e[a]=t[a])}function gO({transformTemplate:e},t){return b.useMemo(()=>{const n=cm();return om(n,t,e),Object.assign({},n.vars,n.style)},[t])}function yO(e,t){const n=e.style||{},a={};return mx(a,n,e),Object.assign(a,gO(e,t)),a}function vO(e,t){const n={},a=yO(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 gx=()=>({...cm(),attrs:{}});function kO(e,t,n,a){const o=b.useMemo(()=>{const s=gx();return Yw(s,t,Xw(a),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};mx(s,e.style,e),o.style={...s,...o.style}}return o}const _O=["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 um(e){return typeof e!="string"||e.includes("-")?!1:!!(_O.indexOf(e)>-1||/[A-Z]/u.test(e))}function bO(e,t,n,{latestValues:a},o,s=!1,c){const h=(c??um(e)?kO:vO)(t,a,o,e),f=fO(t,typeof e=="string",s),m=e!==b.Fragment?{...f,...h,ref:n}:{},{children:y}=t,k=b.useMemo(()=>Gt(y)?y.get():y,[y]);return b.createElement(e,{...m,children:k})}function wO({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,o){return{latestValues:xO(n,a,o,e),renderState:t()}}function xO(e,t,n,a){const o={},s=a(e,{});for(const k in s)o[k]=Hc(s[k]);let{initial:c,animate:u}=e;const h=Iu(e),f=Bw(e);t&&f&&!h&&e.inherit!==!1&&(c===void 0&&(c=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const y=m?u:c;if(y&&typeof y!="boolean"&&!Mu(y)){const k=Array.isArray(y)?y:[y];for(let w=0;w<k.length;w++){const x=Qp(e,k[w]);if(x){const{transitionEnd:C,transition:S,...D}=x;for(const L in D){let R=D[L];if(Array.isArray(R)){const O=m?R.length-1:0;R=R[O]}R!==null&&(o[L]=R)}for(const L in C)o[L]=C[L]}}}return o}const yx=e=>(t,n)=>{const a=b.useContext(Nu),o=b.useContext(Lu),s=()=>wO(e,t,a,o);return n?s():jp(s)},PO=yx({scrapeMotionValuesFromProps:sm,createRenderState:cm}),SO=yx({scrapeMotionValuesFromProps:Qw,createRenderState:gx}),CO=Symbol.for("motionComponentSymbol");function TO(e,t,n){const a=b.useRef(n);b.useInsertionEffect(()=>{a.current=n});const o=b.useRef(null);return b.useCallback(s=>{s&&e.onMount?.(s);const c=a.current;if(typeof c=="function")if(s){const u=c(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):c(s);else c&&(c.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const vx=b.createContext({});function to(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function EO(e,t,n,a,o,s){const{visualElement:c}=b.useContext(Nu),u=b.useContext(hx),h=b.useContext(Lu),f=b.useContext(lm),m=f.reducedMotion,y=f.skipAnimations,k=b.useRef(null),w=b.useRef(!1);a=a||u.renderer,!k.current&&a&&(k.current=a(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:s}),w.current&&k.current&&(k.current.manuallyAnimateOnMount=!0));const x=k.current,C=b.useContext(vx);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&AO(k.current,n,o,C);const S=b.useRef(!1);b.useInsertionEffect(()=>{x&&S.current&&x.update(n,h)});const D=n[Cw],L=b.useRef(!!D&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(D)&&window.MotionHasOptimisedAnimation?.(D));return U0(()=>{w.current=!0,x&&(S.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),L.current&&x.animationState&&x.animationState.animateChanges())}),b.useEffect(()=>{x&&(!L.current&&x.animationState&&x.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(D)}),L.current=!1),x.enteringChildren=void 0)}),x}function AO(e,t,n,a){const{layoutId:o,layout:s,drag:c,dragConstraints:u,layoutScroll:h,layoutRoot:f,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:kx(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!c||u&&to(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:h,layoutRoot:f,layoutAnchor:m})}function kx(e){if(e)return e.options.allowProjection!==!1?e.projection:kx(e.parent)}function Yh(e,{forwardMotionProps:t=!1,type:n}={},a,o){a&&uO(a);const s=n?n==="svg":um(e),c=s?SO:PO;function u(f,m){let y;const k={...b.useContext(lm),...f,layoutId:RO(f)},{isStatic:w}=k,x=mO(f),C=c(f,w);if(!w&&typeof window<"u"){LO();const S=DO(k);y=S.MeasureLayout,x.visualElement=EO(e,C,k,o,S.ProjectionNode,s)}return N.jsxs(Nu.Provider,{value:x,children:[y&&x.visualElement?N.jsx(y,{visualElement:x.visualElement,...k}):null,bO(e,f,TO(C,x.visualElement,m),C,w,t,s)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=b.forwardRef(u);return h[CO]=e,h}function RO({layoutId:e}){const t=b.useContext(Op).id;return t&&e!==void 0?t+"-"+e:e}function LO(e,t){b.useContext(hx).strict}function DO(e){const t=fx(),{drag:n,layout:a}=t;if(!n&&!a)return{};const o={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function MO(e,t){if(typeof Proxy>"u")return Yh;const n=new Map,a=(s,c)=>Yh(s,c,e,t),o=(s,c)=>a(s,c);return new Proxy(o,{get:(s,c)=>c==="create"?a:(n.has(c)||n.set(c,Yh(c,void 0,e,t)),n.get(c))})}const IO=(e,t)=>t.isSVG??um(e)?new cN(t):new rN(t,{allowProjection:e!==b.Fragment});class NO extends ja{constructor(t){super(t),t.animationState||(t.animationState=pN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Mu(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 OO=0;class jO extends ja{constructor(){super(...arguments),this.id=OO++,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:s,custom:c}=this.node.getProps();if(typeof s=="string"){const u=si(this.node,s,c);if(u){const{transition:h,transitionEnd:f,...m}=u;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 o=this.node.animationState.setActive("exit",!t);n&&!t&&o.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 UO={animation:{Feature:NO},exit:{Feature:jO}};function nl(e){return{point:{x:e.pageX,y:e.pageY}}}const BO=e=>t=>nm(t)&&e(t,nl(t));function As(e,t,n,a){return Fs(e,t,BO(n),a)}const _x=({current:e})=>e?e.ownerDocument.defaultView:null,d_=(e,t)=>Math.abs(e-t);function FO(e,t){const n=d_(e.x,t.x),a=d_(e.y,t.y);return Math.sqrt(n**2+a**2)}const h_=new Set(["auto","scroll"]);class bx{constructor(t,n,{transformPagePoint:a,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:c=3,element:u}={}){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=bc(this.lastRawMoveEventInfo,this.transformPagePoint));const w=Zh(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,C=FO(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!C)return;const{point:S}=w,{timestamp:D}=Kt;this.history.push({...S,timestamp:D});const{onStart:L,onMove:R}=this.handlers;x||(L&&L(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,w)},this.handlePointerMove=(w,x)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=bc(x,this.transformPagePoint),dt.update(this.updatePoint,!0)},this.handlePointerUp=(w,x)=>{this.end();const{onEnd:C,onSessionEnd:S,resumeAnimation:D}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&D&&D(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const L=Zh(w.type==="pointercancel"?this.lastMoveEventInfo:bc(x,this.transformPagePoint),this.history);this.startEvent&&C&&C(w,L),S&&S(w,L)},!nm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=c,this.contextWindow=o||window;const h=nl(t),f=bc(h,this.transformPagePoint),{point:m}=f,{timestamp:y}=Kt;this.history=[{...m,timestamp:y}];const{onSessionStart:k}=n;k&&k(t,Zh(f,this.history)),this.removeListeners=Js(As(this.contextWindow,"pointermove",this.handlePointerMove),As(this.contextWindow,"pointerup",this.handlePointerUp),As(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(h_.has(a.overflowX)||h_.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,o=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),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 bc(e,t){return t?{point:t(e.point)}:e}function f_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zh({point:e},t){return{point:e,delta:f_(e,wx(t)),offset:f_(e,VO(t)),velocity:zO(t,.1)}}function VO(e){return e[0]}function wx(e){return e[e.length-1]}function zO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const o=wx(e);for(;n>=0&&(a=e[n],!(o.timestamp-a.timestamp>Pn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&o.timestamp-a.timestamp>Pn(t)*2&&(a=e[1]);const s=On(o.timestamp-a.timestamp);if(s===0)return{x:0,y:0};const c={x:(o.x-a.x)/s,y:(o.y-a.y)/s};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function $O(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 p_(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 HO(e,{top:t,left:n,bottom:a,right:o}){return{x:p_(e.x,n,o),y:p_(e.y,t,a)}}function m_(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 WO(e,t){return{x:m_(e.x,t.x),y:m_(e.y,t.y)}}function KO(e,t){let n=.5;const a=ln(e),o=ln(t);return o>a?n=js(t.min,t.max-a,e.min):a>o&&(n=js(e.min,e.max-o,t.min)),xr(0,1,n)}function GO(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 qf=.35;function qO(e=qf){return e===!1?e=0:e===!0&&(e=qf),{x:g_(e,"left","right"),y:g_(e,"top","bottom")}}function g_(e,t,n){return{min:y_(e,t),max:y_(e,n)}}function y_(e,t){return typeof e=="number"?e:e[t]||0}const YO=new WeakMap;class ZO{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=Ot(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=y=>{n&&this.snapToCursor(nl(y).point),this.stopAnimation()},c=(y,k)=>{const{drag:w,dragPropagation:x,onDragStart:C}=this.getProps();if(w&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wI(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=k,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pr(D=>{let L=this.getAxisMotionValue(D).get()||0;if(vr.test(L)){const{projection:R}=this.visualElement;if(R&&R.layout){const O=R.layout.layoutBox[D];O&&(L=ln(O)*(parseFloat(L)/100))}}this.originPoint[D]=L}),C&&dt.update(()=>C(y,k),!1,!0),Bf(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},u=(y,k)=>{this.latestPointerEvent=y,this.latestPanInfo=k;const{dragPropagation:w,dragDirectionLock:x,onDirectionLock:C,onDrag:S}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:D}=k;if(x&&this.currentDirection===null){this.currentDirection=QO(D),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",k.point,D),this.updateAxis("y",k.point,D),this.visualElement.render(),S&&dt.update(()=>S(y,k),!1,!0)},h=(y,k)=>{this.latestPointerEvent=y,this.latestPanInfo=k,this.stop(y,k),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 bx(t,{onSessionStart:s,onStart:c,onMove:u,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:a,contextWindow:_x(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!a)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:u}=this.getProps();u&&dt.postRender(()=>u(a,o))}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:o}=this.getProps();if(!a||!wc(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let c=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(c=$O(c,this.constraints[t],this.elastic[t])),s.set(c)}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,o=this.constraints;t&&to(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=HO(a.layoutBox,t):this.constraints=!1,this.elastic=qO(n),o!==this.constraints&&!to(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&pr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=GO(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!to(t))return!1;const a=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=XI(a,o.root,this.visualElement.getTransformPagePoint());let c=WO(o.layout.layoutBox,s);if(n){const u=n(qI(c));this.hasMutatedConstraints=!!u,u&&(c=$w(u))}return c}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:o,dragTransition:s,dragSnapToOrigin:c,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},f=pr(m=>{if(!wc(m,n,this.currentDirection))return;let y=h&&h[m]||{};(c===!0||c===m)&&(y={min:0,max:0});const k=o?200:1e6,w=o?40:1e7,x={type:"inertia",velocity:a?t[m]:0,bounceStiffness:k,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...s,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return Bf(this.visualElement,t),a.start(Xp(t,a,0,n,this.visualElement,!1))}stopAnimation(){pr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),o=a[n];return o||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){pr(n=>{const{drag:a}=this.getProps();if(!wc(n,a,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:u}=o.layout.layoutBox[n],h=s.get()||0;s.set(t[n]-vt(c,u,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!to(n)||!a||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};pr(c=>{const u=this.getAxisMotionValue(c);if(u&&this.constraints!==!1){const h=u.get();o[c]=KO({min:h,max:h},this.constraints[c])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),pr(c=>{if(!wc(c,t,null))return;const u=this.getAxisMotionValue(c),{min:h,max:f}=this.constraints[c];u.set(vt(h,f,o[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;YO.set(this.visualElement,this);const t=this.visualElement.current,n=As(t,"pointerdown",f=>{const{drag:m,dragListener:y=!0}=this.getProps(),k=f.target,w=k!==t&&EI(k);m&&y&&!w&&this.start(f)});let a;const o=()=>{const{dragConstraints:f}=this.getProps();to(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=XO(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,c=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),dt.read(o);const u=Fs(window,"resize",()=>this.scalePositionWithinConstraints()),h=s.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:m})=>{this.isDragging&&m&&(pr(y=>{const k=this.getAxisMotionValue(y);k&&(this.originPoint[y]+=f[y].translate,k.set(k.get()+f[y].translate))}),this.visualElement.render())}));return()=>{u(),n(),c(),h&&h(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:c=qf,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:o,dragConstraints:s,dragElastic:c,dragMomentum:u}}}function v_(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function XO(e,t,n){const a=Sk(e,v_(n)),o=Sk(t,v_(n));return()=>{a(),o()}}function wc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function QO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class JO extends ja{constructor(t){super(t),this.removeGroupControls=jn,this.removeListeners=jn,this.controls=new ZO(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 Xh=e=>(t,n)=>{e&&dt.update(()=>e(t,n),!1,!0)};class e3 extends ja{constructor(){super(...arguments),this.removePointerDownListener=jn}onPointerDown(t){this.session=new bx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_x(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:Xh(t),onStart:Xh(n),onMove:Xh(a),onEnd:(s,c)=>{delete this.session,o&&dt.postRender(()=>o(s,c))}}}mount(){this.removePointerDownListener=As(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 Qh=!1;class t3 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),a&&a.register&&o&&a.register(s),Qh&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Wc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:o,isPresent:s}=this.props,{projection:c}=a;return c&&(c.isPresent=s,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),Qh=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?c.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?c.promote():c.relegate()||dt.postRender(()=>{const u=c.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:a}=t;a&&(a.options.layoutAnchor=n,a.root.didUpdate(),tm.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:o}=t;Qh=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),a&&a.deregister&&a.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function xx(e){const[t,n]=dx(),a=b.useContext(Op);return N.jsx(t3,{...e,layoutGroup:a,switchLayoutGroup:b.useContext(vx),isPresent:t,safeToRemove:n})}const n3={pan:{Feature:e3},drag:{Feature:JO,ProjectionNode:ux,MeasureLayout:xx}};function k_(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=a[o];s&&dt.postRender(()=>s(t,nl(t)))}class r3 extends ja{mount(){const{current:t}=this.node;t&&(this.unmount=PI(t,(n,a)=>(k_(this.node,a,"Start"),o=>k_(this.node,o,"End"))))}unmount(){}}class a3 extends ja{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=Js(Fs(this.node.current,"focus",()=>this.onFocus()),Fs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function __(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 o="onTap"+(n==="End"?"":n),s=a[o];s&&dt.postRender(()=>s(t,nl(t)))}class i3 extends ja{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=RI(t,(o,s)=>(__(this.node,s,"Start"),(c,{success:u})=>__(this.node,c,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const Yf=new WeakMap,Jh=new WeakMap,o3=e=>{const t=Yf.get(e.target);t&&t(e)},s3=e=>{e.forEach(o3)};function l3({root:e,...t}){const n=e||document;Jh.has(n)||Jh.set(n,{});const a=Jh.get(n),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(s3,{root:e,...t})),a[o]}function c3(e,t,n){const a=l3(t);return Yf.set(e,n),a.observe(e),()=>{Yf.delete(e),a.unobserve(e)}}const u3={some:0,all:1};class d3 extends ja{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:o="some",once:s}=t,c={root:n?n.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:u3[o]},u=h=>{const{isIntersecting:f}=h;if(this.isInView===f||(this.isInView=f,s&&!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(),k=f?m:y;k&&k(h)};this.stopObserver=c3(this.node.current,c,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(h3(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function h3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const f3={inView:{Feature:d3},tap:{Feature:i3},focus:{Feature:a3},hover:{Feature:r3}},p3={layout:{ProjectionNode:ux,MeasureLayout:xx}},m3={...UO,...f3,...n3,...p3},ef=MO(m3,IO);function Px(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Px(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function g3(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Px(e))&&(a&&(a+=" "),a+=t);return a}const y3=(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},v3=(e,t)=>({classGroupId:e,validator:t}),Sx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ku="-",b_=[],k3="arbitrary..",_3=e=>{const t=w3(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return b3(c);const u=c.split(ku),h=u[0]===""&&u.length>1?1:0;return Cx(u,h,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const h=a[c],f=n[c];return h?f?y3(f,h):h:f||b_}return n[c]||b_}}},Cx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const f=Cx(e,t+1,s);if(f)return f}const c=n.validators;if(c===null)return;const u=t===0?e.join(ku):e.slice(t).join(ku),h=c.length;for(let f=0;f<h;f++){const m=c[f];if(m.validator(u))return m.classGroupId}},b3=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?k3+a:void 0})(),w3=e=>{const{theme:t,classGroups:n}=e;return x3(n,t)},x3=(e,t)=>{const n=Sx();for(const a in e){const o=e[a];dm(o,n,a,t)}return n},dm=(e,t,n,a)=>{const o=e.length;for(let s=0;s<o;s++){const c=e[s];P3(c,t,n,a)}},P3=(e,t,n,a)=>{if(typeof e=="string"){S3(e,t,n);return}if(typeof e=="function"){C3(e,t,n,a);return}T3(e,t,n,a)},S3=(e,t,n)=>{const a=e===""?t:Tx(t,e);a.classGroupId=n},C3=(e,t,n,a)=>{if(E3(e)){dm(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(v3(n,e))},T3=(e,t,n,a)=>{const o=Object.entries(e),s=o.length;for(let c=0;c<s;c++){const[u,h]=o[c];dm(h,Tx(t,u),n,a)}},Tx=(e,t)=>{let n=e;const a=t.split(ku),o=a.length;for(let s=0;s<o;s++){const c=a[s];let u=n.nextPart.get(c);u||(u=Sx(),n.nextPart.set(c,u)),n=u}return n},E3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,A3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(s,c)=>{n[s]=c,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(s){let c=n[s];if(c!==void 0)return c;if((c=a[s])!==void 0)return o(s,c),c},set(s,c){s in n?n[s]=c:o(s,c)}}},Zf="!",w_=":",R3=[],x_=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),L3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const s=[];let c=0,u=0,h=0,f;const m=o.length;for(let C=0;C<m;C++){const S=o[C];if(c===0&&u===0){if(S===w_){s.push(o.slice(h,C)),h=C+1;continue}if(S==="/"){f=C;continue}}S==="["?c++:S==="]"?c--:S==="("?u++:S===")"&&u--}const y=s.length===0?o:o.slice(h);let k=y,w=!1;y.endsWith(Zf)?(k=y.slice(0,-1),w=!0):y.startsWith(Zf)&&(k=y.slice(1),w=!0);const x=f&&f>h?f-h:void 0;return x_(s,w,k,x)};if(t){const o=t+w_,s=a;a=c=>c.startsWith(o)?s(c.slice(o.length)):x_(R3,!1,c,void 0,!0)}if(n){const o=a;a=s=>n({className:s,parseClassName:o})}return a},D3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let s=0;s<n.length;s++){const c=n[s],u=c[0]==="[",h=t.has(c);u||h?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(c)):o.push(c)}return o.length>0&&(o.sort(),a.push(...o)),a}},M3=e=>({cache:A3(e.cacheSize),parseClassName:L3(e),sortModifiers:D3(e),..._3(e)}),I3=/\s+/,N3=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:s}=t,c=[],u=e.trim().split(I3);let h="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:y,modifiers:k,hasImportantModifier:w,baseClassName:x,maybePostfixModifierPosition:C}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let S=!!C,D=a(S?x.substring(0,C):x);if(!D){if(!S){h=m+(h.length>0?" "+h:h);continue}if(D=a(x),!D){h=m+(h.length>0?" "+h:h);continue}S=!1}const L=k.length===0?"":k.length===1?k[0]:s(k).join(":"),R=w?L+Zf:L,O=R+D;if(c.indexOf(O)>-1)continue;c.push(O);const G=o(D,S);for(let W=0;W<G.length;++W){const z=G[W];c.push(R+z)}h=m+(h.length>0?" "+h:h)}return h},O3=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=Ex(n))&&(o&&(o+=" "),o+=a);return o},Ex=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=Ex(e[a]))&&(n&&(n+=" "),n+=t);return n},j3=(e,...t)=>{let n,a,o,s;const c=h=>{const f=t.reduce((m,y)=>y(m),e());return n=M3(f),a=n.cache.get,o=n.cache.set,s=u,u(h)},u=h=>{const f=a(h);if(f)return f;const m=N3(h,n);return o(h,m),m};return s=c,(...h)=>s(O3(...h))},U3=[],Nt=e=>{const t=n=>n[e]||U3;return t.isThemeGetter=!0,t},Ax=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,B3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,F3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V3=/\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$/,z3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xa=e=>B3.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Pa=e=>!!e&&Number.isInteger(Number(e)),tf=e=>e.endsWith("%")&&qe(e.slice(0,-1)),Fr=e=>F3.test(e),Lx=()=>!0,W3=e=>V3.test(e)&&!z3.test(e),hm=()=>!1,K3=e=>$3.test(e),G3=e=>H3.test(e),q3=e=>!ke(e)&&!be(e),Y3=e=>Ua(e,Ix,hm),ke=e=>Ax.test(e),ei=e=>Ua(e,Nx,W3),P_=e=>Ua(e,rj,qe),Z3=e=>Ua(e,jx,Lx),X3=e=>Ua(e,Ox,hm),S_=e=>Ua(e,Dx,hm),Q3=e=>Ua(e,Mx,G3),xc=e=>Ua(e,Ux,K3),be=e=>Rx.test(e),ms=e=>gi(e,Nx),J3=e=>gi(e,Ox),C_=e=>gi(e,Dx),ej=e=>gi(e,Ix),tj=e=>gi(e,Mx),Pc=e=>gi(e,Ux,!0),nj=e=>gi(e,jx,!0),Ua=(e,t,n)=>{const a=Ax.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},gi=(e,t,n=!1)=>{const a=Rx.exec(e);return a?a[1]?t(a[1]):n:!1},Dx=e=>e==="position"||e==="percentage",Mx=e=>e==="image"||e==="url",Ix=e=>e==="length"||e==="size"||e==="bg-size",Nx=e=>e==="length",rj=e=>e==="number",Ox=e=>e==="family-name",jx=e=>e==="number"||e==="weight",Ux=e=>e==="shadow",aj=()=>{const e=Nt("color"),t=Nt("font"),n=Nt("text"),a=Nt("font-weight"),o=Nt("tracking"),s=Nt("leading"),c=Nt("breakpoint"),u=Nt("container"),h=Nt("spacing"),f=Nt("radius"),m=Nt("shadow"),y=Nt("inset-shadow"),k=Nt("text-shadow"),w=Nt("drop-shadow"),x=Nt("blur"),C=Nt("perspective"),S=Nt("aspect"),D=Nt("ease"),L=Nt("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],G=()=>[...O(),be,ke],W=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],P=()=>[be,ke,h],Y=()=>[xa,"full","auto",...P()],X=()=>[Pa,"none","subgrid",be,ke],ue=()=>["auto",{span:["full",Pa,be,ke]},Pa,be,ke],se=()=>[Pa,"auto",be,ke],Ae=()=>["auto","min","max","fr",be,ke],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],pe=()=>["auto",...P()],Ne=()=>[xa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],K=()=>[xa,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Z=()=>[xa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],H=()=>[e,be,ke],I=()=>[...O(),C_,S_,{position:[be,ke]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",ej,Y3,{size:[be,ke]}],Re=()=>[tf,ms,ei],Pe=()=>["","none","full",f,be,ke],Te=()=>["",qe,ms,ei],Ge=()=>["solid","dashed","dotted","double"],Qe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ue=()=>[qe,tf,C_,S_],jt=()=>["","none",x,be,ke],Hn=()=>["none",qe,be,ke],Cr=()=>["none",qe,be,ke],pt=()=>[qe,be,ke],en=()=>[xa,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fr],breakpoint:[Fr],color:[Lx],container:[Fr],"drop-shadow":[Fr],ease:["in","out","in-out"],font:[q3],"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",qe],text:[Fr],"text-shadow":[Fr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xa,ke,be,S]}],container:["container"],columns:[{columns:[qe,ke,be,u]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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:G()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Pa,"auto",be,ke]}],basis:[{basis:[xa,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,xa,"auto","initial","none",ke]}],grow:[{grow:["",qe,be,ke]}],shrink:[{shrink:["",qe,be,ke]}],order:[{order:[Pa,"first","last","none",be,ke]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:ue()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:ue()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:pe()}],mx:[{mx:pe()}],my:[{my:pe()}],ms:[{ms:pe()}],me:[{me:pe()}],mbs:[{mbs:pe()}],mbe:[{mbe:pe()}],mt:[{mt:pe()}],mr:[{mr:pe()}],mb:[{mb:pe()}],ml:[{ml:pe()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ne()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[u,"screen",...Ne()]}],"min-w":[{"min-w":[u,"screen","none",...Ne()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Ne()]}],h:[{h:["screen","lh",...Ne()]}],"min-h":[{"min-h":["screen","lh","none",...Ne()]}],"max-h":[{"max-h":["screen","lh",...Ne()]}],"font-size":[{text:["base",n,ms,ei]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,nj,Z3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tf,ke]}],"font-family":[{font:[J3,X3,t]}],"font-features":[{"font-features":[ke]}],"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:[o,be,ke]}],"line-clamp":[{"line-clamp":[qe,"none",be,P_]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",be,ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",be,ei]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[qe,"auto",be,ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ke]}],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",be,ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pa,be,ke],radial:["",be,ke],conic:[Pa,be,ke]},tj,Q3]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:Re()}],"gradient-via-pos":[{via:Re()}],"gradient-to-pos":[{to:Re()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:Pe()}],"rounded-s":[{"rounded-s":Pe()}],"rounded-e":[{"rounded-e":Pe()}],"rounded-t":[{"rounded-t":Pe()}],"rounded-r":[{"rounded-r":Pe()}],"rounded-b":[{"rounded-b":Pe()}],"rounded-l":[{"rounded-l":Pe()}],"rounded-ss":[{"rounded-ss":Pe()}],"rounded-se":[{"rounded-se":Pe()}],"rounded-ee":[{"rounded-ee":Pe()}],"rounded-es":[{"rounded-es":Pe()}],"rounded-tl":[{"rounded-tl":Pe()}],"rounded-tr":[{"rounded-tr":Pe()}],"rounded-br":[{"rounded-br":Pe()}],"rounded-bl":[{"rounded-bl":Pe()}],"border-w":[{border:Te()}],"border-w-x":[{"border-x":Te()}],"border-w-y":[{"border-y":Te()}],"border-w-s":[{"border-s":Te()}],"border-w-e":[{"border-e":Te()}],"border-w-bs":[{"border-bs":Te()}],"border-w-be":[{"border-be":Te()}],"border-w-t":[{"border-t":Te()}],"border-w-r":[{"border-r":Te()}],"border-w-b":[{"border-b":Te()}],"border-w-l":[{"border-l":Te()}],"divide-x":[{"divide-x":Te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ge(),"hidden","none"]}],"divide-style":[{divide:[...Ge(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,be,ke]}],"outline-w":[{outline:["",qe,ms,ei]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",m,Pc,xc]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",y,Pc,xc]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[qe,ei]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":Te()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",k,Pc,xc]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[qe,be,ke]}],"mix-blend":[{"mix-blend":[...Qe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Qe()}],"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":[qe]}],"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":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"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":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"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":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"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":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"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":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"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":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"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":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[be,ke]}],"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":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"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":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ke]}],filter:[{filter:["","none",be,ke]}],blur:[{blur:jt()}],brightness:[{brightness:[qe,be,ke]}],contrast:[{contrast:[qe,be,ke]}],"drop-shadow":[{"drop-shadow":["","none",w,Pc,xc]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",qe,be,ke]}],"hue-rotate":[{"hue-rotate":[qe,be,ke]}],invert:[{invert:["",qe,be,ke]}],saturate:[{saturate:[qe,be,ke]}],sepia:[{sepia:["",qe,be,ke]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ke]}],"backdrop-blur":[{"backdrop-blur":jt()}],"backdrop-brightness":[{"backdrop-brightness":[qe,be,ke]}],"backdrop-contrast":[{"backdrop-contrast":[qe,be,ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,be,ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,be,ke]}],"backdrop-invert":[{"backdrop-invert":["",qe,be,ke]}],"backdrop-opacity":[{"backdrop-opacity":[qe,be,ke]}],"backdrop-saturate":[{"backdrop-saturate":[qe,be,ke]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,be,ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",be,ke]}],ease:[{ease:["linear","initial",D,be,ke]}],delay:[{delay:[qe,be,ke]}],animate:[{animate:["none",L,be,ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,be,ke]}],"perspective-origin":[{"perspective-origin":G()}],rotate:[{rotate:Hn()}],"rotate-x":[{"rotate-x":Hn()}],"rotate-y":[{"rotate-y":Hn()}],"rotate-z":[{"rotate-z":Hn()}],scale:[{scale:Cr()}],"scale-x":[{"scale-x":Cr()}],"scale-y":[{"scale-y":Cr()}],"scale-z":[{"scale-z":Cr()}],"scale-3d":["scale-3d"],skew:[{skew:pt()}],"skew-x":[{"skew-x":pt()}],"skew-y":[{"skew-y":pt()}],transform:[{transform:[be,ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:G()}],"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:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",be,ke]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",be,ke]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[qe,ms,ei,P_]}],stroke:[{stroke:["none",...H()]}],"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"]}},ij=j3(aj);function Tt(...e){return ij(g3(e))}const oj=N.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[N.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"}),N.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"}),N.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"}),N.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"})]}),sj=N.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:N.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"})}),lj={google:oj,github:sj},cj={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function uj(e){return cj[e]||String(e||"").replace(/-/g," ")}function dj(){Qs();const{isOpen:e,closeLoginModal:t}=j0(),{enabled:n,signedIn:a,refreshUser:o,signInWithPassword:s,signUp:c,signInWithOAuth:u,getPublicAuthConfig:h}=Zs(),[f,m]=b.useState("signin"),[y,k]=b.useState(""),[w,x]=b.useState(""),[C,S]=b.useState(""),[D,L]=b.useState(!1),[R,O]=b.useState(null),[G,W]=b.useState(null),[z,P]=b.useState(!1),[Y,X]=b.useState(!0),[ue,se]=b.useState([]),[Ae,fe]=b.useState(8);b.useEffect(()=>{e&&(O(null),W(null),m("signin"),k(""),x(""),S(""),P(!1))},[e]),b.useEffect(()=>{if(!e||!n||ue.length>0)return;let K=!0;return X(!0),(async()=>{const{data:Z,error:H}=await h();if(K){if(H||!Z)se(["google","github"]);else{const I=Array.isArray(Z.oAuthProviders)?Z.oAuthProviders:[],q=Array.isArray(Z.customOAuthProviders)?Z.customOAuthProviders:[];se([...I,...q]),typeof Z.passwordMinLength=="number"&&Z.passwordMinLength>0&&fe(Z.passwordMinLength)}X(!1)}})(),()=>{K=!1}},[e,n,h,ue.length]),b.useEffect(()=>{e&&a&&t()},[e,a,t]);const le=b.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),pe=b.useCallback(async K=>{O(null),L(!0);try{const{error:Z}=await u(K,le);Z&&O(Z.message||String(Z))}finally{L(!1)}},[u,le]),Ne=b.useCallback(async K=>{K.preventDefault(),O(null),L(!0);try{if(f==="signup"){const{data:H,error:I}=await c({email:y.trim(),password:w,name:C.trim()||void 0});if(I){O(I.message||String(I));return}if(H?.requireEmailVerification){W(Fe("login.verify_email_pending")),m("signin");return}await o();return}const{error:Z}=await s({email:y.trim(),password:w});if(Z){O(Z.message||String(Z));return}await o()}finally{L(!1)}},[f,y,w,C,c,s,o]);return b.useEffect(()=>{if(!e)return;const K=Z=>{Z.key==="Escape"&&t()};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[e,t]),n?N.jsx(lO,{children:e&&N.jsxs(ef.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:[N.jsx(ef.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60 ",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),N.jsxs(ef.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:K=>K.stopPropagation(),children:[N.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:N.jsx(I0,{className:"h-5 w-5"})}),N.jsxs("div",{className:"text-center mb-6",children:[N.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[N.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),N.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white",children:"Token Tracker"})]}),N.jsx("p",{className:"text-sm text-oai-gray-500",children:Fe("login_modal.subtitle")})]}),G&&N.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:G}),R&&N.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400",role:"alert",children:R}),N.jsx("div",{className:"space-y-2.5 mb-5",children:Y?N.jsxs("div",{className:"space-y-2.5",children:[N.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),N.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):ue.map(K=>N.jsxs("button",{type:"button",disabled:D,onClick:()=>pe(K),className:Tt("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:[lj[K]||null,Fe("login.oauth.continue",{provider:uj(K)})]},K))}),z?N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"relative mb-5",children:[N.jsx("div",{className:"absolute inset-0 flex items-center",children:N.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),N.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:N.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")})})]}),N.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:[N.jsx("button",{type:"button",className:Tt("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"),O(null)},children:Fe("login.tab.sign_in")}),N.jsx("button",{type:"button",className:Tt("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"),O(null)},children:Fe("login.tab.sign_up")})]}),N.jsxs("form",{onSubmit:Ne,className:"space-y-3",children:[f==="signup"&&N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.name")}),N.jsx("input",{id:"modal-name",type:"text",autoComplete:"name",value:C,onChange:K=>S(K.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")})]}),N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.email")}),N.jsx("input",{id:"modal-email",type:"email",autoComplete:"email",required:!0,value:y,onChange:K=>k(K.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"})]}),N.jsxs("div",{children:[N.jsx("label",{htmlFor:"modal-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.password")}),N.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:K=>x(K.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"&&N.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login.password_hint",{min:String(Ae)})})]}),N.jsx("button",{type:"submit",disabled:D,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")})]})]}):N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"relative mb-5",children:[N.jsx("div",{className:"absolute inset-0 flex items-center",children:N.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),N.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:N.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")})})]}),N.jsxs("button",{type:"button",onClick:()=>P(!0),className:Tt("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:[N.jsx(GD,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Fe("login_modal.continue_email")]})]})]})]})}):null}const hj={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},G4="https://tokentracker.statuspage.io/";function fj(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?hj:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||Wr()).trim()}function q4(){return Wr()}function pj(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 mj=300*1e3,gj=720*60*1e3;function fm(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function yj(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+gj<=t:!0}async function Bx(e,t){const n=Wr();if(!fm(n)||!e)return;const a=n.replace(/\/$/,""),o=Ks(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};o&&(s.apikey=o);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:t})})}catch{}}async function vj(e){const t=Wr();if(!fm(t)||!e)return null;const n=t.replace(/\/$/,""),a=Ks(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(o.apikey=a);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",c=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:o,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:s})});if(!c.ok)return null;const u=await c.json().catch(()=>null),h=typeof u?.token=="string"?u.token:null,f=typeof u?.device_id=="string"?u.device_id:null;return!h||!f?null:{token:h,deviceId:f,issuedAt:typeof u?.created_at=="string"?u.created_at:new Date().toISOString()}}async function T_(e){const{deviceToken:t,insforgeBaseUrl:n}=e,a={deviceToken:t},o=n||Wr();fm(o)&&(a.insforgeBaseUrl=o.trim());const s=await Lp(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...s},body:JSON.stringify(a)}),u=await c.json().catch(()=>({}));if(!c.ok){const h=typeof u.error=="string"?u.error:`HTTP ${c.status}`;throw new Error(h)}return u}async function E_(e){const t=await e();if(!t)return null;const n=r0();if(n&&!yj(n))return n;const a=await vj(t);return a?(BR(a),a):null}async function Fx(e){let t=await e();if(!t)return null;let n=await E_(async()=>t);if(!n)return t;try{return await T_({deviceToken:n.token,insforgeBaseUrl:Wr()}),t}catch(a){if(!r0()||(a0(),t=await e(),!t)||(n=await E_(async()=>t),!n))throw a;return await T_({deviceToken:n.token,insforgeBaseUrl:Wr()}),t}}async function kj(e){const t=FR();if(Date.now()-t<mj)return;const n=await Fx(e);n&&(i0(Date.now()),await Bx(n,"cloud-sync-auto"))}async function Y4(e){const t=await Fx(e);t&&(i0(Date.now()),await Bx(t,"cloud-sync-now"))}function _j(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function bj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||_j(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function wj(){const e=Fn(),t=Zs(),n=b.useRef(!1);b.useEffect(()=>{if(!jR()||!bj(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!UR())return;let a=!1;const o=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await kj(()=>t.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(o)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function xj(){const e=b.useContext(N0);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function Pj({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function Sj(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 Cj(e){return e?Ip()?`/api/avatar-proxy?url=${encodeURIComponent(e)}`:e:null}function Sc(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 A_({className:e,variant:t="header",collapsed:n=!1,onAfterAction:a}){Qs();const o=t==="sidebar",{enabled:s,loading:c,signedIn:u,user:h,displayName:f}=Zs(),{openLoginModal:m}=j0(),y=wu(),k=b.useMemo(()=>Sj(h),[h]),w=b.useMemo(()=>Cj(k),[k]),[x,C]=Rs.useState(!1);if(Rs.useEffect(()=>{C(!1)},[w]),!s)return null;if(c)return N.jsx("div",{className:Tt("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",e),"aria-hidden":!0});if(!u)return o?N.jsxs("button",{type:"button",onClick:()=>{m(),a?.()},className:Tt("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:[N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:N.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&N.jsx("span",{className:"truncate flex-1 text-left",children:Fe("header.auth.sign_in_aria")})]}):N.jsx("button",{type:"button",onClick:m,className:Tt("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4 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 S=()=>{y("/settings"),a?.()};return N.jsx("div",{className:Tt(o?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:N.jsxs("button",{type:"button",onClick:S,className:Tt(o?Tt("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-md 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:o&&n?f:void 0,children:[o?N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:w&&!x?N.jsx("img",{src:w,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",onError:()=>C(!0)}):Sc(f)==="?"?N.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:N.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):N.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:Sc(f)})}):w&&!x?N.jsx("img",{src:w,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",onError:()=>C(!0)}):Sc(f)==="?"?N.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:N.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):N.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:Sc(f)}),o?!n&&N.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}):N.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 Xf="tt.sidebarCollapsed";function Tj(){return[{id:"general",label:Fe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:BD,label:Fe("nav.usage")},{id:"limits",to:"/limits",icon:VD,label:Fe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:cM,label:Fe("nav.leaderboard")}]},{id:"tools",label:Fe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:WD,label:Fe("nav.widgets")},{id:"skills",to:"/skills",icon:eM,label:Fe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:$D,label:Fe("nav.ip_check")}]},{id:"account",label:Fe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:aM,label:Fe("nav.settings")}]}]}function Ej(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Xf)==="1"}catch{return!1}}function Aj(){const[e,t]=b.useState(Ej),n=b.useCallback(()=>{t(a=>{const o=!a;try{typeof window<"u"&&window.localStorage.setItem(Xf,o?"1":"0")}catch{}return o})},[]);return b.useEffect(()=>{if(typeof window>"u")return;const a=o=>{o.key===Xf&&t(o.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function Rj(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function Lj({label:e,collapsed:t,first:n}){return t?n?null:N.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):N.jsx("div",{className:Tt("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 Dj({item:e,collapsed:t,active:n,onClick:a}){const o=e.icon;return N.jsxs(Pu,{to:e.to,onClick:a,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:Tt("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:[N.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:N.jsx(o,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&N.jsx("span",{className:"truncate",children:e.label})]})}function Mj({as:e="button",title:t,onClick:n,href:a,children:o,className:s,...c}){const u=Tt("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",s);return e==="a"?N.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...c,children:o}):N.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...c,children:o})}function Ij({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,a]=b.useState(null);return b.useEffect(()=>{if(typeof window>"u")return;const o=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;Pj({prefersReducedMotion:o,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&a(s.stargazers_count)}).catch(()=>{})},[e]),N.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:Tt("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:[N.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:N.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"})}),N.jsx("span",{children:"Star"}),n!==null&&N.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const Nj=[{value:"light",label:"Light",Icon:M0},{value:"dark",label:"Dark",Icon:D0},{value:"system",label:"System",Icon:XD}];function Oj({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[o,s]=b.useState(!1),c=b.useRef(null),u=t==="dark"?D0:M0;return b.useEffect(()=>{if(!o)return;const h=m=>{c.current&&!c.current.contains(m.target)&&s(!1)},f=m=>{m.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[o]),N.jsxs("div",{ref:c,className:"relative",children:[N.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":o,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(h=>!h),className:Tt("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:N.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),o&&N.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:Nj.map(({value:h,label:f,Icon:m})=>{const y=e===h;return N.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),s(!1)},className:Tt("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:[N.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),N.jsx("span",{children:f})]},h)})})]})}function Vx({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:o,glassChrome:s=!1}){const u=Fn()?.pathname||"/",{theme:h,resolvedTheme:f,setTheme:m}=xj(),{resolvedLocale:y}=Qs(),k=b.useMemo(()=>Tj(),[y]);return N.jsxs(N.Fragment,{children:[N.jsx("div",{className:Tt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:a?N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx("div",{className:"flex-1 min-w-0",children:N.jsx(A_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),N.jsx("button",{type:"button",onClick:o,"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:N.jsx(I0,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):N.jsx(A_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),N.jsx("nav",{"aria-label":Fe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:k.map((w,x)=>N.jsxs("div",{className:"flex flex-col",children:[N.jsx(Lj,{label:w.label,collapsed:e,first:x===0}),N.jsx("div",{className:"flex flex-col gap-0.5",children:w.items.map(C=>N.jsx(Dj,{item:C,collapsed:e,active:Rj(u,C.to),onClick:n},C.id))})]},w.id))}),N.jsxs("div",{className:Tt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[N.jsx(Oj,{theme:h,resolvedTheme:f,onSetTheme:m,glassChrome:s}),N.jsx("div",{className:"flex items-center gap-1.5",children:!e&&N.jsx(Ij,{glassChrome:s})})]})]})}function jj({collapsed:e,onToggleCollapsed:t}){const n=b.useMemo(()=>typeof window>"u"?!1:ar()||Ip(),[]);return N.jsx("aside",{"aria-label":Fe("nav.aside_label"),className:Tt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:N.jsx(Vx,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function Uj({open:e,onClose:t}){return b.useEffect(()=>{if(!e)return;const n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),b.useEffect(()=>{if(!e)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e]),e?N.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[N.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),N.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:N.jsx(Vx,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function Bj({onOpenDrawer:e}){return N.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:[N.jsx(Mj,{title:Fe("nav.menu"),onClick:e,children:N.jsx(YD,{className:"h-5 w-5","aria-hidden":!0})}),N.jsxs(Pu,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[N.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),N.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),N.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function Fj({children:e}){const{collapsed:t,toggle:n}=Aj(),[a,o]=b.useState(!1),s=b.useCallback(()=>o(!0),[]),c=b.useCallback(()=>o(!1),[]),u=b.useMemo(()=>typeof window>"u"?!1:ar()||Ip(),[]);return N.jsxs("div",{className:Tt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",u?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[u&&N.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),N.jsxs("div",{className:"flex-1 min-h-0 flex",children:[N.jsx(jj,{collapsed:t,onToggleCollapsed:n}),N.jsx(Uj,{open:a,onClose:c}),N.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:N.jsxs("div",{className:Tt("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",u?"tt-native-main-card":"rounded-2xl",!u&&"shadow-sm"),children:[N.jsx(Bj,{onOpenDrawer:s}),N.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}const Vj=typeof window<"u"?window.location.search:"",R_=new URLSearchParams(Vj),Cc=R_.get("insforge_code")||R_.get("code")||null,zj=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function $j(){Qs();const{loading:e,signedIn:t}=Zs(),n=wu(),[a,o]=b.useState("processing"),[s,c]=b.useState(null),u=b.useRef(!1);b.useEffect(()=>{if(!(!Cc||u.current)){if(u.current=!0,zj){c(!1);return}(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();c(!!m?.native)}catch{c(!1)}})()}},[]),b.useEffect(()=>{if(s!==!0||!Cc)return;o("redirecting");const f=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(Cc)}`},200);return()=>clearTimeout(f)},[s]),b.useEffect(()=>{if(s!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const f=setTimeout(()=>{t||o("failed")},12e3);return()=>clearTimeout(f)},[s,e,t,n]),b.useEffect(()=>{if(!Cc&&s===null){const f=setTimeout(()=>o("failed"),3e3);return()=>clearTimeout(f)}},[s]);const h=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&s!==!0&&(s===null||s===!1&&e)?N.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):N.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:N.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),N.jsx("p",{className:"text-oai-gray-400 text-sm",children:Fe("auth.callback.processing")})]}),a==="redirecting"&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:N.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:N.jsx("path",{d:"M20 6 9 17l-5-5"})})}),N.jsx("p",{className:"text-white text-sm font-medium",children:Fe("auth.callback.success")}),N.jsx("p",{className:"text-oai-gray-500 text-xs",children:Fe("auth.callback.redirecting")})]}),a==="failed"&&N.jsxs("div",{className:"space-y-3",children:[N.jsx("p",{className:"text-oai-gray-300 text-sm",children:Fe("auth.callback.failed")}),N.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=b.lazy(()=>$n(()=>import("./DashboardPage-T_BImOGr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.DashboardPage}))),Wj=b.lazy(()=>$n(()=>import("./IpCheckPage-CxRBCdXW.js"),[])),Kj=b.lazy(()=>$n(()=>import("./LandingPage-DoIw_oXY.js"),__vite__mapDeps([11,12,8])).then(e=>({default:e.LandingPage}))),Gj=b.lazy(()=>$n(()=>import("./LeaderboardPage-BzkrPpnp.js"),__vite__mapDeps([13,9,2,14,15])).then(e=>({default:e.LeaderboardPage}))),qj=b.lazy(()=>$n(()=>import("./LeaderboardProfilePage-D7jyFQk5.js"),__vite__mapDeps([16,2,12,17,14,9,3,4,18,5])).then(e=>({default:e.LeaderboardProfilePage}))),Yj=b.lazy(()=>$n(()=>import("./LimitsPage-fdq2MG4P.js"),__vite__mapDeps([19,1,20,7,10,8,21,18,22])).then(e=>({default:e.LimitsPage}))),Zj=b.lazy(()=>$n(()=>import("./LoginPage-CJ31pW6G.js"),[]).then(e=>({default:e.LoginPage}))),Xj=b.lazy(()=>$n(()=>import("./DevicePage-DqFrE2fo.js"),[])),Qj=b.lazy(()=>$n(()=>import("./WrappedPage-COhqXKs7.js"),[])),Jj=b.lazy(()=>$n(()=>import("./SettingsPage-D--hzVuV.js"),__vite__mapDeps([23,20,24,7,25,2,15,4,22])).then(e=>({default:e.SettingsPage}))),e4=b.lazy(()=>$n(()=>import("./SkillsPage-BTxPA7dW.js"),__vite__mapDeps([26,21,18,22,7,5,4,9,25,6,8,15])).then(e=>({default:e.SkillsPage}))),t4=b.lazy(()=>$n(()=>import("./WidgetsPage-Bh4zs5u8.js"),__vite__mapDeps([27,24,7,10,8,18,22,15])).then(e=>({default:e.WidgetsPage})));function n4(){const{resolvedLocale:e}=Qs(),t=Fn(),n=Zs();wj();const a=Sn(),o=b.useMemo(()=>typeof window>"u"?!1:pj(window.location.search),[]),s=t?.pathname||"/",c=new URL(window.location.href),u=c.pathname.replace(/\/+$/,"")||"/",f=u.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,m=c.searchParams.get("token")||null,y=f||m,k=u==="/share"||u==="/share.html"||u.startsWith("/share/"),w=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),x=s.replace(/\/+$/,"")||"/",C=x==="/leaderboard",S=x.match(/^\/u\/([^/]+)$/i),D=S?S[1]:null,L=!!(n.enabled&&n.signedIn),R=w||L,O=!1,G=fj(),W=b.useMemo(()=>!n.enabled||!L?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[L,n]);let z=w||a||o?"dashboard":"landing";x==="/landing"&&(z="landing"),x==="/dashboard"&&(z="dashboard"),C&&(z="dashboard"),D&&(z="dashboard");const P=x==="/limits",Y=x==="/settings",X=x==="/skills",ue=x==="/widgets",se=x==="/ip-check";(P||Y||X||ue||se)&&(z="dashboard");let Ae=Hj;D?Ae=qj:x==="/leaderboard"?Ae=Gj:P?Ae=Yj:Y?Ae=Jj:X?Ae=e4:ue?Ae=t4:se&&(Ae=Wj);const fe=!k&&(x==="/dashboard"||x==="/"||C||P||Y||X||ue||se);let le=null;if(x==="/auth/callback"||x==="/auth/native-callback")le=N.jsx($j,{});else if(x==="/login")le=N.jsx(Zj,{});else if(x==="/device")le=N.jsx(Xj,{});else if(x==="/wrapped")le=N.jsx(Qj,{});else if(z==="landing")le=N.jsx(Kj,{signInUrl:"/login",signUpUrl:"/login"});else{const pe=N.jsx(Ae,{baseUrl:G,auth:W,signedIn:R,sessionSoftExpired:O,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:k,publicToken:y,userId:D,signInUrl:"/login",signUpUrl:"/login"},e);fe?le=N.jsx(Fj,{children:pe}):le=pe}return N.jsx(hM,{children:N.jsx(mM,{children:N.jsxs(gM,{children:[N.jsx(b.Suspense,{fallback:null,children:le}),N.jsx(dj,{}),N.jsx(_D,{}),N.jsx(LD,{})]})})})}const r4=W1([{path:"*",element:N.jsx(n4,{})}]);MS.createRoot(document.getElementById("root")).render(N.jsx(Rs.StrictMode,{children:N.jsx(JL,{children:N.jsx(oD,{children:N.jsx(RL,{children:N.jsx(aT,{router:r4})})})})}));export{Aa as $,g0 as A,Fe as B,N as C,ef as D,Nc as E,S4 as F,P4 as G,Ns as H,dM as I,pu as J,O4 as K,Pu as L,lm as M,m4 as N,p4 as O,lO as P,xj as Q,Rs as R,Tt as S,j0 as T,Zs as U,b4 as V,A4 as W,I0 as X,Qs as Y,pj as Z,$n as _,Gt as a,M4 as a0,C4 as a1,YR as a2,g4 as a3,y4 as a4,I4 as a5,x4 as a6,_4 as a7,A_ as a8,G4 as a9,nM as aA,iD as aB,Ep as aC,Lp as aD,H4 as aE,ar as aF,Ip as aG,z4 as aH,W4 as aI,$4 as aJ,Ss as aK,Fw as aL,WI as aM,$f as aN,D4 as aO,ES as aP,Qf as aQ,rT as aa,Fn as ab,wu as ac,q4 as ad,UR as ae,d4 as af,Y4 as ag,h4 as ah,L4 as ai,cM as aj,Pj as ak,aM as al,F4 as am,a4 as an,NR as ao,Op as ap,jR as aq,Zv as ar,R4 as as,M0 as at,D0 as au,XD as av,mo as aw,iu as ax,Dp as ay,w4 as az,U0 as b,dn as c,Na as d,kk as e,dt as f,y0 as g,Sn as h,h2 as i,f4 as j,$R as k,V4 as l,yo as m,aL as n,iL as o,j4 as p,k4 as q,b as r,E4 as s,U4 as t,jp as u,B4 as v,v4 as w,yt as x,T4 as y,N4 as z};