tokentracker-cli 0.24.3 → 0.24.4

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 (34) hide show
  1. package/dashboard/dist/assets/{Card-BbZjsVbp.js → Card-C5P77HSA.js} +1 -1
  2. package/dashboard/dist/assets/{DashboardPage-D-c3ggwu.js → DashboardPage-BmDIVEqD.js} +1 -1
  3. package/dashboard/dist/assets/{DevicePage-CXQozcPu.js → DevicePage-BR0iqEnH.js} +1 -1
  4. package/dashboard/dist/assets/{FadeIn-DS3-rZmS.js → FadeIn-DS1EdnSK.js} +1 -1
  5. package/dashboard/dist/assets/{HeaderGithubStar-B_Yuqgy3.js → HeaderGithubStar-B1bXtzLa.js} +1 -1
  6. package/dashboard/dist/assets/{IpCheckPage-DvlCxm7c.js → IpCheckPage-DYqbDHcj.js} +1 -1
  7. package/dashboard/dist/assets/{LandingPage-Cn-IoNno.js → LandingPage-CDrzg33z.js} +1 -1
  8. package/dashboard/dist/assets/{LeaderboardPage-CbiPJJPx.js → LeaderboardPage-CdE8dhBk.js} +1 -1
  9. package/dashboard/dist/assets/{LeaderboardProfilePage-Bu7B-2jw.js → LeaderboardProfilePage-5hMz6KaV.js} +1 -1
  10. package/dashboard/dist/assets/{LimitsPage-B3rB2mq-.js → LimitsPage-DwXAQxub.js} +1 -1
  11. package/dashboard/dist/assets/{LoginPage-D1zPQFPk.js → LoginPage-jyNw3XdL.js} +1 -1
  12. package/dashboard/dist/assets/{PopoverPopup-nCve1OvO.js → PopoverPopup-D7vJTWph.js} +1 -1
  13. package/dashboard/dist/assets/{ProviderIcon-DG0e09V6.js → ProviderIcon-DzG-9xmE.js} +1 -1
  14. package/dashboard/dist/assets/{SettingsPage-CrNFjpAc.js → SettingsPage-C5Dv25qs.js} +1 -1
  15. package/dashboard/dist/assets/{SkillsPage-BLA6DLai.js → SkillsPage-wl3RJj-l.js} +1 -1
  16. package/dashboard/dist/assets/{WidgetsPage-DKqL5elk.js → WidgetsPage-DRjH3Emk.js} +1 -1
  17. package/dashboard/dist/assets/{WrappedPage-27gR4t07.js → WrappedPage-QI8eoOBi.js} +1 -1
  18. package/dashboard/dist/assets/check-CIkqYG5R.js +1 -0
  19. package/dashboard/dist/assets/{chevron-down-BK0-QwAZ.js → chevron-down-DYcTqEa_.js} +1 -1
  20. package/dashboard/dist/assets/{download-CRxOcuuE.js → download-Bx3IHqEk.js} +1 -1
  21. package/dashboard/dist/assets/{info-BnCcU5DC.js → info--12E1Ss4.js} +1 -1
  22. package/dashboard/dist/assets/{leaderboard-columns-D8bOHQ2L.js → leaderboard-columns-BSN7ezk1.js} +1 -1
  23. package/dashboard/dist/assets/{main-B8I3fQYO.js → main-BcIQOEq-.js} +2 -2
  24. package/dashboard/dist/assets/{use-limits-display-prefs-24Huwh6X.js → use-limits-display-prefs-CzrWmFCp.js} +1 -1
  25. package/dashboard/dist/assets/{use-native-settings-D58BqQED.js → use-native-settings-DdNs1QHP.js} +1 -1
  26. package/dashboard/dist/assets/{use-reduced-motion-D02YRYVH.js → use-reduced-motion-Bq2cqn-e.js} +1 -1
  27. package/dashboard/dist/assets/{use-usage-limits-D5J2sCWb.js → use-usage-limits-oNdrbXVB.js} +1 -1
  28. package/dashboard/dist/assets/{useCurrency-CqZS-EuJ.js → useCurrency-B02Q_emH.js} +1 -1
  29. package/dashboard/dist/index.html +1 -1
  30. package/dashboard/dist/share.html +1 -1
  31. package/package.json +1 -1
  32. package/src/lib/pricing/curated-overrides.json +25 -1
  33. package/src/lib/pricing/seed-snapshot.json +1 -1
  34. package/dashboard/dist/assets/check-CZwZBCWJ.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-D-c3ggwu.js","assets/use-usage-limits-D5J2sCWb.js","assets/useCurrency-CqZS-EuJ.js","assets/info-BnCcU5DC.js","assets/PopoverPopup-nCve1OvO.js","assets/Card-BbZjsVbp.js","assets/use-reduced-motion-D02YRYVH.js","assets/ProviderIcon-DG0e09V6.js","assets/FadeIn-DS3-rZmS.js","assets/LandingPage-Cn-IoNno.js","assets/HeaderGithubStar-B_Yuqgy3.js","assets/LeaderboardPage-CbiPJJPx.js","assets/leaderboard-columns-D8bOHQ2L.js","assets/chevron-down-BK0-QwAZ.js","assets/LeaderboardProfilePage-Bu7B-2jw.js","assets/LimitsPage-B3rB2mq-.js","assets/use-limits-display-prefs-24Huwh6X.js","assets/SettingsPage-CrNFjpAc.js","assets/use-native-settings-D58BqQED.js","assets/check-CZwZBCWJ.js","assets/download-CRxOcuuE.js","assets/SkillsPage-BLA6DLai.js","assets/WidgetsPage-DKqL5elk.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-BmDIVEqD.js","assets/use-usage-limits-oNdrbXVB.js","assets/useCurrency-B02Q_emH.js","assets/info--12E1Ss4.js","assets/PopoverPopup-D7vJTWph.js","assets/Card-C5P77HSA.js","assets/use-reduced-motion-Bq2cqn-e.js","assets/ProviderIcon-DzG-9xmE.js","assets/FadeIn-DS1EdnSK.js","assets/LandingPage-CDrzg33z.js","assets/HeaderGithubStar-B1bXtzLa.js","assets/LeaderboardPage-CdE8dhBk.js","assets/leaderboard-columns-BSN7ezk1.js","assets/chevron-down-DYcTqEa_.js","assets/LeaderboardProfilePage-5hMz6KaV.js","assets/LimitsPage-DwXAQxub.js","assets/use-limits-display-prefs-CzrWmFCp.js","assets/SettingsPage-C5Dv25qs.js","assets/use-native-settings-DdNs1QHP.js","assets/check-CIkqYG5R.js","assets/download-Bx3IHqEk.js","assets/SkillsPage-wl3RJj-l.js","assets/WidgetsPage-DRjH3Emk.js"])))=>i.map(i=>d[i]);
2
2
  function bS(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(a,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>a[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function R_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wS(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function a(){var s=!1;try{s=this instanceof a}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),n}var ph={exports:{}},lo={},mh={exports:{}},Ze={};var Ny;function xS(){if(Ny)return Ze;Ny=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),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 R(I,q,xe){this.props=I,this.context=q,this.refs=C,this.updater=xe||w}var L=R.prototype=new D;L.constructor=R,x(L,S.prototype),L.isPureReactComponent=!0;var j=Array.isArray,G=Object.prototype.hasOwnProperty,K={current:null},H={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)&&!H.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:K.current}}function Z(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 me(I){var q={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(xe){return q[xe]})}var oe=/\/+/g;function Ae(I,q){return typeof I=="object"&&I!==null&&I.key!=null?me(""+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,j(Pe)?(xe="",I!=null&&(xe=I.replace(oe,"$&/")+"/"),fe(Pe,q,xe,"",function(jt){return jt})):Pe!=null&&(X(Pe)&&(Pe=Z(Pe,xe+(!Pe.key||Ge&&Ge.key===Pe.key?"":(""+Pe.key).replace(oe,"$&/")+"/")+I)),q.push(Pe)),1;if(Ge=0,Re=Re===""?".":Re+":",j(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 ue(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 le(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 Me={current:null},W={transition:null},Y={ReactCurrentDispatcher:Me,ReactCurrentBatchConfig:W,ReactCurrentOwner:K};function $(){throw Error("act(...) is not supported in production builds of React.")}return Ze.Children={map:ue,forEach:function(I,q,xe){ue(I,function(){q.apply(this,arguments)},xe)},count:function(I){var q=0;return ue(I,function(){q++}),q},toArray:function(I){return ue(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=s,Ze.PureComponent=R,Ze.StrictMode=a,Ze.Suspense=h,Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,Ze.act=$,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=K.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)&&!H.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:o,_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:le}},Ze.memo=function(I,q){return{$$typeof:f,type:I,compare:q===void 0?null:q}},Ze.startTransition=function(I){var q=W.transition;W.transition={};try{I()}finally{W.transition=q}},Ze.unstable_act=$,Ze.useCallback=function(I,q){return Me.current.useCallback(I,q)},Ze.useContext=function(I){return Me.current.useContext(I)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(I){return Me.current.useDeferredValue(I)},Ze.useEffect=function(I,q){return Me.current.useEffect(I,q)},Ze.useId=function(){return Me.current.useId()},Ze.useImperativeHandle=function(I,q,xe){return Me.current.useImperativeHandle(I,q,xe)},Ze.useInsertionEffect=function(I,q){return Me.current.useInsertionEffect(I,q)},Ze.useLayoutEffect=function(I,q){return Me.current.useLayoutEffect(I,q)},Ze.useMemo=function(I,q){return Me.current.useMemo(I,q)},Ze.useReducer=function(I,q,xe){return Me.current.useReducer(I,q,xe)},Ze.useRef=function(I){return Me.current.useRef(I)},Ze.useState=function(I){return Me.current.useState(I)},Ze.useSyncExternalStore=function(I,q,xe){return Me.current.useSyncExternalStore(I,q,xe)},Ze.useTransition=function(){return Me.current.useTransition()},Ze.version="18.3.1",Ze}var Oy;function Zf(){return Oy||(Oy=1,mh.exports=xS()),mh.exports}var jy;function PS(){if(jy)return lo;jy=1;var e=Zf(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function 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)&&!o.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:s.current}}return lo.Fragment=n,lo.jsx=c,lo.jsxs=c,lo}var Uy;function SS(){return Uy||(Uy=1,ph.exports=PS()),ph.exports}var O=SS(),b=Zf();const Xf=R_(b),CS=bS({__proto__:null,default:Xf},[b]);var lc={},gh={exports:{}},yn={},yh={exports:{}},vh={};var By;function TS(){return By||(By=1,(function(e){function t(W,Y){var $=W.length;W.push(Y);e:for(;0<$;){var I=$-1>>>1,q=W[I];if(0<s(q,Y))W[I]=Y,W[$]=q,$=I;else break e}}function n(W){return W.length===0?null:W[0]}function a(W){if(W.length===0)return null;var Y=W[0],$=W.pop();if($!==Y){W[0]=$;e:for(var I=0,q=W.length,xe=q>>>1;I<xe;){var Re=2*(I+1)-1,Pe=W[Re],Te=Re+1,Ge=W[Te];if(0>s(Pe,$))Te<q&&0>s(Ge,Pe)?(W[I]=Ge,W[Te]=$,I=Te):(W[I]=Pe,W[Re]=$,I=Re);else if(Te<q&&0>s(Ge,$))W[I]=Ge,W[Te]=$,I=Te;else break e}}return Y}function s(W,Y){var $=W.sortIndex-Y.sortIndex;return $!==0?$:W.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var 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,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(W){for(var Y=n(f);Y!==null;){if(Y.callback===null)a(f);else if(Y.startTime<=W)a(f),Y.sortIndex=Y.expirationTime,t(h,Y);else break;Y=n(f)}}function j(W){if(C=!1,L(W),!x)if(n(h)!==null)x=!0,le(G);else{var Y=n(f);Y!==null&&Me(j,Y.startTime-W)}}function G(W,Y){x=!1,C&&(C=!1,D(P),P=-1),w=!0;var $=k;try{for(L(Y),y=n(h);y!==null&&(!(y.expirationTime>Y)||W&&!me());){var I=y.callback;if(typeof I=="function"){y.callback=null,k=y.priorityLevel;var q=I(y.expirationTime<=Y);Y=e.unstable_now(),typeof q=="function"?y.callback=q:y===n(h)&&a(h),L(Y)}else a(h);y=n(h)}if(y!==null)var xe=!0;else{var Re=n(f);Re!==null&&Me(j,Re.startTime-Y),xe=!1}return xe}finally{y=null,k=$,w=!1}}var K=!1,H=null,P=-1,Z=5,X=-1;function me(){return!(e.unstable_now()-X<Z)}function oe(){if(H!==null){var W=e.unstable_now();X=W;var Y=!0;try{Y=H(!0,W)}finally{Y?Ae():(K=!1,H=null)}}else K=!1}var Ae;if(typeof R=="function")Ae=function(){R(oe)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ue=fe.port2;fe.port1.onmessage=oe,Ae=function(){ue.postMessage(null)}}else Ae=function(){S(oe,0)};function le(W){H=W,K||(K=!0,Ae())}function Me(W,Y){P=S(function(){W(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){x||w||(x=!0,le(G))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(W){switch(k){case 1:case 2:case 3:var Y=3;break;default:Y=k}var $=k;k=Y;try{return W()}finally{k=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,Y){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var $=k;k=W;try{return Y()}finally{k=$}},e.unstable_scheduleCallback=function(W,Y,$){var I=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?I+$:I):$=I,W){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=$+q,W={id:m++,callback:Y,priorityLevel:W,startTime:$,expirationTime:q,sortIndex:-1},$>I?(W.sortIndex=$,t(f,W),n(h)===null&&W===n(f)&&(C?(D(P),P=-1):C=!0,Me(j,$-I))):(W.sortIndex=q,t(h,W),x||w||(x=!0,le(G))),W},e.unstable_shouldYield=me,e.unstable_wrapCallback=function(W){var Y=k;return function(){var $=k;k=Y;try{return W.apply(this,arguments)}finally{k=$}}}})(vh)),vh}var Fy;function ES(){return Fy||(Fy=1,yh.exports=TS()),yh.exports}var Vy;function AS(){if(Vy)return yn;Vy=1;var e=Zf(),t=ES();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,l=1;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function o(r,i){c(r,i),c(r+"Capture",i)}function c(r,i){for(s[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 R(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,R);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,R);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,R);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 L(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 j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=Symbol.for("react.element"),K=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),me=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),Ae=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ue=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),Me=Symbol.for("react.offscreen"),W=Symbol.iterator;function Y(r){return r===null||typeof r!="object"?null:(r=W&&r[W]||r["@@iterator"],typeof r=="function"?r:null)}var $=Object.assign,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(z){var d=z}Reflect.construct(r,[],i)}else{try{i.call()}catch(z){d=z}r.call(i.prototype)}else{try{throw Error()}catch(z){d=z}r()}}catch(z){if(z&&d&&typeof z.stack=="string"){for(var p=z.stack.split(`
4
4
  `),g=d.stack.split(`
@@ -810,4 +810,4 @@ ipcheck.region.VE,ui,IpCheckPage,IpCheckPage,region_ve,"Venezuela",,active
810
810
  ${R}px !important;
811
811
  ${L}px !important;
812
812
  }
813
- `),()=>{u.current?.removeAttribute("data-motion-pop-id"),G.contains(j)&&G.removeChild(j)}},[t]),O.jsx(eO,{isPresent:t,childRef:u,sizeRef:h,pop:o,children:o===!1?e:b.cloneElement(e,{ref:y})})}const nO=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:s,presenceAffectsLayout:o,mode:c,anchorX:u,anchorY:h,root:f})=>{const m=Np(rO),y=b.useId();let k=!0,w=b.useMemo(()=>(k=!1,{id:y,initial:t,isPresent:n,custom:s,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 o&&k&&(w={...w}),b.useMemo(()=>{m.forEach((x,C)=>m.set(C,!1))},[n]),b.useEffect(()=>{!n&&!m.size&&a&&a()},[n]),e=O.jsx(tO,{pop:c==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:f,children:e}),O.jsx(Au.Provider,{value:w,children:e})};function rO(){return new Map}function cx(e=!0){const t=b.useContext(Au);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:s}=t,o=b.useId();b.useEffect(()=>{if(e)return s(o)},[e]);const c=b.useCallback(()=>e&&a&&a(o),[o,a,e]);return!n&&a?[!1,c]:[!0]}const vc=e=>e.key||"";function i_(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const aO=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:s=!0,mode:o="sync",propagate:c=!1,anchorX:u="left",anchorY:h="top",root:f})=>{const[m,y]=cx(c),k=b.useMemo(()=>i_(e),[e]),w=c&&!m?[]:k.map(vc),x=b.useRef(!0),C=b.useRef(k),S=Np(()=>new Map),D=b.useRef(new Set),[R,L]=b.useState(k),[j,G]=b.useState(k);O0(()=>{x.current=!1,C.current=k;for(let P=0;P<j.length;P++){const Z=vc(j[P]);w.includes(Z)?(S.delete(Z),D.current.delete(Z)):S.get(Z)!==!0&&S.set(Z,!1)}},[j,w.length,w.join("-")]);const K=[];if(k!==R){let P=[...k];for(let Z=0;Z<j.length;Z++){const X=j[Z],me=vc(X);w.includes(me)||(P.splice(Z,0,X),K.push(X))}return o==="wait"&&K.length&&(P=K),G(i_(P)),L(k),null}const{forceRender:H}=b.useContext(Ip);return O.jsx(O.Fragment,{children:j.map(P=>{const Z=vc(P),X=c&&!m?!1:k===j||w.includes(Z),me=()=>{if(D.current.has(Z))return;if(S.has(Z))D.current.add(Z),S.set(Z,!0);else return;let oe=!0;S.forEach(Ae=>{Ae||(oe=!1)}),oe&&(H?.(),G(C.current),c&&y?.(),a&&a())};return O.jsx(nO,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:f,onExitComplete:X?void 0:me,anchorX:u,anchorY:h,children:P},Z)})})},ux=b.createContext({strict:!1}),s_={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 o_=!1;function iO(){if(o_)return;const e={};for(const t in s_)e[t]={isEnabled:n=>s_[t].some(a=>!!n[a])};Bw(e),o_=!0}function dx(){return iO(),z2()}function sO(e){const t=dx();for(const n in e)t[n]={...t[n],...e[n]};Bw(t)}const oO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function mu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||oO.has(e)}let hx=e=>!mu(e);function lO(e){typeof e=="function"&&(hx=t=>t.startsWith("on")?!mu(t):e(t))}try{lO(require("@emotion/is-prop-valid").default)}catch{}function cO(e,t,n){const a={};for(const s in e)s==="values"&&typeof e.values=="object"||Gt(e[s])||(hx(s)||n===!0&&mu(s)||!t&&!mu(s)||e.draggable&&s.startsWith("onDrag"))&&(a[s]=e[s]);return a}const Mu=b.createContext({});function uO(e,t){if(Du(e)){const{initial:n,animate:a}=e;return{initial:n===!1||Uo(n)?n:void 0,animate:Uo(a)?a:void 0}}return e.inherit!==!1?t:{}}function dO(e){const{initial:t,animate:n}=uO(e,b.useContext(Mu));return b.useMemo(()=>({initial:t,animate:n}),[l_(t),l_(n)])}function l_(e){return Array.isArray(e)?e.join(" "):e}const om=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function fx(e,t,n){for(const a in t)!Gt(t[a])&&!Kw(a,n)&&(e[a]=t[a])}function hO({transformTemplate:e},t){return b.useMemo(()=>{const n=om();return am(n,t,e),Object.assign({},n.vars,n.style)},[t])}function fO(e,t){const n=e.style||{},a={};return fx(a,n,e),Object.assign(a,hO(e,t)),a}function pO(e,t){const n={},a=fO(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 px=()=>({...om(),attrs:{}});function mO(e,t,n,a){const s=b.useMemo(()=>{const o=px();return Gw(o,t,Yw(a),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};fx(o,e.style,e),s.style={...o,...s.style}}return s}const gO=["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 lm(e){return typeof e!="string"||e.includes("-")?!1:!!(gO.indexOf(e)>-1||/[A-Z]/u.test(e))}function yO(e,t,n,{latestValues:a},s,o=!1,c){const h=(c??lm(e)?mO:pO)(t,a,s,e),f=cO(t,typeof e=="string",o),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 vO({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,s){return{latestValues:kO(n,a,s,e),renderState:t()}}function kO(e,t,n,a){const s={},o=a(e,{});for(const k in o)s[k]=Vc(o[k]);let{initial:c,animate:u}=e;const h=Du(e),f=jw(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"&&!Lu(y)){const k=Array.isArray(y)?y:[y];for(let w=0;w<k.length;w++){const x=Zp(e,k[w]);if(x){const{transitionEnd:C,transition:S,...D}=x;for(const R in D){let L=D[R];if(Array.isArray(L)){const j=m?L.length-1:0;L=L[j]}L!==null&&(s[R]=L)}for(const R in C)s[R]=C[R]}}}return s}const mx=e=>(t,n)=>{const a=b.useContext(Mu),s=b.useContext(Au),o=()=>vO(e,t,a,s);return n?o():Np(o)},_O=mx({scrapeMotionValuesFromProps:im,createRenderState:om}),bO=mx({scrapeMotionValuesFromProps:Zw,createRenderState:px}),wO=Symbol.for("motionComponentSymbol");function xO(e,t,n){const a=b.useRef(n);b.useInsertionEffect(()=>{a.current=n});const s=b.useRef(null);return b.useCallback(o=>{o&&e.onMount?.(o);const c=a.current;if(typeof c=="function")if(o){const u=c(o);typeof u=="function"&&(s.current=u)}else s.current?(s.current(),s.current=null):c(o);else c&&(c.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const gx=b.createContext({});function ts(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function PO(e,t,n,a,s,o){const{visualElement:c}=b.useContext(Mu),u=b.useContext(ux),h=b.useContext(Au),f=b.useContext(sm),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:o}),w.current&&k.current&&(k.current.manuallyAnimateOnMount=!0));const x=k.current,C=b.useContext(gx);x&&!x.projection&&s&&(x.type==="html"||x.type==="svg")&&SO(k.current,n,s,C);const S=b.useRef(!1);b.useInsertionEffect(()=>{x&&S.current&&x.update(n,h)});const D=n[Pw],R=b.useRef(!!D&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(D)&&window.MotionHasOptimisedAnimation?.(D));return O0(()=>{w.current=!0,x&&(S.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),R.current&&x.animationState&&x.animationState.animateChanges())}),b.useEffect(()=>{x&&(!R.current&&x.animationState&&x.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(D)}),R.current=!1),x.enteringChildren=void 0)}),x}function SO(e,t,n,a){const{layoutId:s,layout:o,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:yx(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!c||u&&ts(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:h,layoutRoot:f,layoutAnchor:m})}function yx(e){if(e)return e.options.allowProjection!==!1?e.projection:yx(e.parent)}function Gh(e,{forwardMotionProps:t=!1,type:n}={},a,s){a&&sO(a);const o=n?n==="svg":lm(e),c=o?bO:_O;function u(f,m){let y;const k={...b.useContext(sm),...f,layoutId:CO(f)},{isStatic:w}=k,x=dO(f),C=c(f,w);if(!w&&typeof window<"u"){TO();const S=EO(k);y=S.MeasureLayout,x.visualElement=PO(e,C,k,s,S.ProjectionNode,o)}return O.jsxs(Mu.Provider,{value:x,children:[y&&x.visualElement?O.jsx(y,{visualElement:x.visualElement,...k}):null,yO(e,f,xO(C,x.visualElement,m),C,w,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=b.forwardRef(u);return h[wO]=e,h}function CO({layoutId:e}){const t=b.useContext(Ip).id;return t&&e!==void 0?t+"-"+e:e}function TO(e,t){b.useContext(ux).strict}function EO(e){const t=dx(),{drag:n,layout:a}=t;if(!n&&!a)return{};const s={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function AO(e,t){if(typeof Proxy>"u")return Gh;const n=new Map,a=(o,c)=>Gh(o,c,e,t),s=(o,c)=>a(o,c);return new Proxy(s,{get:(o,c)=>c==="create"?a:(n.has(c)||n.set(c,Gh(c,void 0,e,t)),n.get(c))})}const RO=(e,t)=>t.isSVG??lm(e)?new iN(t):new J2(t,{allowProjection:e!==b.Fragment});class LO extends Oa{constructor(t){super(t),t.animationState||(t.animationState=uN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Lu(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 DO=0;class MO extends Oa{constructor(){super(...arguments),this.id=DO++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;if(t&&a===!1){if(this.isExitComplete){const{initial:o,custom:c}=this.node.getProps();if(typeof o=="string"){const u=si(this.node,o,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 s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const IO={animation:{Feature:LO},exit:{Feature:MO}};function el(e){return{point:{x:e.pageX,y:e.pageY}}}const NO=e=>t=>em(t)&&e(t,el(t));function Ao(e,t,n,a){return Bo(e,t,NO(n),a)}const vx=({current:e})=>e?e.ownerDocument.defaultView:null,c_=(e,t)=>Math.abs(e-t);function OO(e,t){const n=c_(e.x,t.x),a=c_(e.y,t.y);return Math.sqrt(n**2+a**2)}const u_=new Set(["auto","scroll"]);class kx{constructor(t,n,{transformPagePoint:a,contextWindow:s=window,dragSnapToOrigin:o=!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=kc(this.lastRawMoveEventInfo,this.transformPagePoint));const w=qh(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,C=OO(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:R,onMove:L}=this.handlers;x||(R&&R(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),L&&L(this.lastMoveEvent,w)},this.handlePointerMove=(w,x)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=kc(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 R=qh(w.type==="pointercancel"?this.lastMoveEventInfo:kc(x,this.transformPagePoint),this.history);this.startEvent&&C&&C(w,R),S&&S(w,R)},!em(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=c,this.contextWindow=s||window;const h=el(t),f=kc(h,this.transformPagePoint),{point:m}=f,{timestamp:y}=Kt;this.history=[{...m,timestamp:y}];const{onSessionStart:k}=n;k&&k(t,qh(f,this.history)),this.removeListeners=Xo(Ao(this.contextWindow,"pointermove",this.handlePointerMove),Ao(this.contextWindow,"pointerup",this.handlePointerUp),Ao(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(u_.has(a.overflowX)||u_.has(a.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const a=t===window,s=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),dt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ia(this.updatePoint)}}function kc(e,t){return t?{point:t(e.point)}:e}function d_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qh({point:e},t){return{point:e,delta:d_(e,_x(t)),offset:d_(e,jO(t)),velocity:UO(t,.1)}}function jO(e){return e[0]}function _x(e){return e[e.length-1]}function UO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const s=_x(e);for(;n>=0&&(a=e[n],!(s.timestamp-a.timestamp>Pn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&s.timestamp-a.timestamp>Pn(t)*2&&(a=e[1]);const o=On(s.timestamp-a.timestamp);if(o===0)return{x:0,y:0};const c={x:(s.x-a.x)/o,y:(s.y-a.y)/o};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function BO(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 h_(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 FO(e,{top:t,left:n,bottom:a,right:s}){return{x:h_(e.x,n,s),y:h_(e.y,t,a)}}function f_(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 VO(e,t){return{x:f_(e.x,t.x),y:f_(e.y,t.y)}}function zO(e,t){let n=.5;const a=ln(e),s=ln(t);return s>a?n=Oo(t.min,t.max-a,e.min):a>s&&(n=Oo(e.min,e.max-s,t.min)),xr(0,1,n)}function $O(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 Kf=.35;function HO(e=Kf){return e===!1?e=0:e===!0&&(e=Kf),{x:p_(e,"left","right"),y:p_(e,"top","bottom")}}function p_(e,t,n){return{min:m_(e,t),max:m_(e,n)}}function m_(e,t){return typeof e=="number"?e:e[t]||0}const WO=new WeakMap;class KO{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:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=y=>{n&&this.snapToCursor(el(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=v2(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 R=this.getAxisMotionValue(D).get()||0;if(vr.test(R)){const{projection:L}=this.visualElement;if(L&&L.layout){const j=L.layout.layoutBox[D];j&&(R=ln(j)*(parseFloat(R)/100))}}this.originPoint[D]=R}),C&&dt.update(()=>C(y,k),!1,!0),jf(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 kx(t,{onSessionStart:o,onStart:c,onMove:u,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:a,contextWindow:vx(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!a)return;const{velocity:c}=s;this.startAnimation(c);const{onDragEnd:u}=this.getProps();u&&dt.postRender(()=>u(a,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,a){const{drag:s}=this.getProps();if(!a||!_c(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let c=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(c=BO(c,this.constraints[t],this.elastic[t])),o.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,s=this.constraints;t&&ts(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=FO(a.layoutBox,t):this.constraints=!1,this.elastic=HO(n),s!==this.constraints&&!ts(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&pr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=$O(a.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ts(t))return!1;const a=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=G2(a,s.root,this.visualElement.getTransformPagePoint());let c=VO(s.layout.layoutBox,o);if(n){const u=n(H2(c));this.hasMutatedConstraints=!!u,u&&(c=Vw(u))}return c}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:s,dragTransition:o,dragSnapToOrigin:c,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},f=pr(m=>{if(!_c(m,n,this.currentDirection))return;let y=h&&h[m]||{};(c===!0||c===m)&&(y={min:0,max:0});const k=s?200:1e6,w=s?40:1e7,x={type:"inertia",velocity:a?t[m]:0,bounceStiffness:k,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...o,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return jf(this.visualElement,t),a.start(Yp(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(),s=a[n];return s||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){pr(n=>{const{drag:a}=this.getProps();if(!_c(n,a,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:c,max:u}=s.layout.layoutBox[n],h=o.get()||0;o.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(!ts(n)||!a||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};pr(c=>{const u=this.getAxisMotionValue(c);if(u&&this.constraints!==!1){const h=u.get();s[c]=zO({min:h,max:h},this.constraints[c])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),pr(c=>{if(!_c(c,t,null))return;const u=this.getAxisMotionValue(c),{min:h,max:f}=this.constraints[c];u.set(vt(h,f,s[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;WO.set(this.visualElement,this);const t=this.visualElement.current,n=Ao(t,"pointerdown",f=>{const{drag:m,dragListener:y=!0}=this.getProps(),k=f.target,w=k!==t&&P2(k);m&&y&&!w&&this.start(f)});let a;const s=()=>{const{dragConstraints:f}=this.getProps();ts(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=GO(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,c=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),dt.read(s);const u=Bo(window,"resize",()=>this.scalePositionWithinConstraints()),h=o.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:s=!1,dragConstraints:o=!1,dragElastic:c=Kf,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:s,dragConstraints:o,dragElastic:c,dragMomentum:u}}}function g_(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function GO(e,t,n){const a=xk(e,g_(n)),s=xk(t,g_(n));return()=>{a(),s()}}function _c(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 YO extends Oa{constructor(t){super(t),this.removeGroupControls=jn,this.removeListeners=jn,this.controls=new KO(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 Yh=e=>(t,n)=>{e&&dt.update(()=>e(t,n),!1,!0)};class ZO extends Oa{constructor(){super(...arguments),this.removePointerDownListener=jn}onPointerDown(t){this.session=new kx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:s}=this.node.getProps();return{onSessionStart:Yh(t),onStart:Yh(n),onMove:Yh(a),onEnd:(o,c)=>{delete this.session,s&&dt.postRender(()=>s(o,c))}}}mount(){this.removePointerDownListener=Ao(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 Zh=!1;class XO extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),a&&a.register&&s&&a.register(o),Zh&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),zc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:s,isPresent:o}=this.props,{projection:c}=a;return c&&(c.isPresent=o,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),Zh=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?c.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?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(),Jp.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:s}=t;Zh=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),a&&a.deregister&&a.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function bx(e){const[t,n]=cx(),a=b.useContext(Ip);return O.jsx(XO,{...e,layoutGroup:a,switchLayoutGroup:b.useContext(gx),isPresent:t,safeToRemove:n})}const QO={pan:{Feature:ZO},drag:{Feature:YO,ProjectionNode:lx,MeasureLayout:bx}};function y_(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=a[s];o&&dt.postRender(()=>o(t,el(t)))}class JO extends Oa{mount(){const{current:t}=this.node;t&&(this.unmount=_2(t,(n,a)=>(y_(this.node,a,"Start"),s=>y_(this.node,s,"End"))))}unmount(){}}class e3 extends Oa{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=Xo(Bo(this.node.current,"focus",()=>this.onFocus()),Bo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function v_(e,t,n){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=a[s];o&&dt.postRender(()=>o(t,el(t)))}class t3 extends Oa{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=C2(t,(s,o)=>(v_(this.node,o,"Start"),(c,{success:u})=>v_(this.node,c,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const Gf=new WeakMap,Xh=new WeakMap,n3=e=>{const t=Gf.get(e.target);t&&t(e)},r3=e=>{e.forEach(n3)};function a3({root:e,...t}){const n=e||document;Xh.has(n)||Xh.set(n,{});const a=Xh.get(n),s=JSON.stringify(t);return a[s]||(a[s]=new IntersectionObserver(r3,{root:e,...t})),a[s]}function i3(e,t,n){const a=a3(t);return Gf.set(e,n),a.observe(e),()=>{Gf.delete(e),a.unobserve(e)}}const s3={some:0,all:1};class o3 extends Oa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:s="some",once:o}=t,c={root:n?n.current:void 0,rootMargin:a,threshold:typeof s=="number"?s:s3[s]},u=h=>{const{isIntersecting:f}=h;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),k=f?m:y;k&&k(h)};this.stopObserver=i3(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(l3(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function l3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const c3={inView:{Feature:o3},tap:{Feature:t3},focus:{Feature:e3},hover:{Feature:JO}},u3={layout:{ProjectionNode:lx,MeasureLayout:bx}},d3={...IO,...c3,...QO,...u3},Qh=AO(d3,RO);function wx(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=wx(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function h3(){for(var e,t,n=0,a="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=wx(e))&&(a&&(a+=" "),a+=t);return a}const f3=(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},p3=(e,t)=>({classGroupId:e,validator:t}),xx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),gu="-",k_=[],m3="arbitrary..",g3=e=>{const t=v3(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return y3(c);const u=c.split(gu),h=u[0]===""&&u.length>1?1:0;return Px(u,h,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const h=a[c],f=n[c];return h?f?f3(f,h):h:f||k_}return n[c]||k_}}},Px=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],o=n.nextPart.get(s);if(o){const f=Px(e,t+1,o);if(f)return f}const c=n.validators;if(c===null)return;const u=t===0?e.join(gu):e.slice(t).join(gu),h=c.length;for(let f=0;f<h;f++){const m=c[f];if(m.validator(u))return m.classGroupId}},y3=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?m3+a:void 0})(),v3=e=>{const{theme:t,classGroups:n}=e;return k3(n,t)},k3=(e,t)=>{const n=xx();for(const a in e){const s=e[a];cm(s,n,a,t)}return n},cm=(e,t,n,a)=>{const s=e.length;for(let o=0;o<s;o++){const c=e[o];_3(c,t,n,a)}},_3=(e,t,n,a)=>{if(typeof e=="string"){b3(e,t,n);return}if(typeof e=="function"){w3(e,t,n,a);return}x3(e,t,n,a)},b3=(e,t,n)=>{const a=e===""?t:Sx(t,e);a.classGroupId=n},w3=(e,t,n,a)=>{if(P3(e)){cm(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(p3(n,e))},x3=(e,t,n,a)=>{const s=Object.entries(e),o=s.length;for(let c=0;c<o;c++){const[u,h]=s[c];cm(h,Sx(t,u),n,a)}},Sx=(e,t)=>{let n=e;const a=t.split(gu),s=a.length;for(let o=0;o<s;o++){const c=a[o];let u=n.nextPart.get(c);u||(u=xx(),n.nextPart.set(c,u)),n=u}return n},P3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,S3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const s=(o,c)=>{n[o]=c,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(o){let c=n[o];if(c!==void 0)return c;if((c=a[o])!==void 0)return s(o,c),c},set(o,c){o in n?n[o]=c:s(o,c)}}},qf="!",__=":",C3=[],b_=(e,t,n,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:s}),T3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=s=>{const o=[];let c=0,u=0,h=0,f;const m=s.length;for(let C=0;C<m;C++){const S=s[C];if(c===0&&u===0){if(S===__){o.push(s.slice(h,C)),h=C+1;continue}if(S==="/"){f=C;continue}}S==="["?c++:S==="]"?c--:S==="("?u++:S===")"&&u--}const y=o.length===0?s:s.slice(h);let k=y,w=!1;y.endsWith(qf)?(k=y.slice(0,-1),w=!0):y.startsWith(qf)&&(k=y.slice(1),w=!0);const x=f&&f>h?f-h:void 0;return b_(o,w,k,x)};if(t){const s=t+__,o=a;a=c=>c.startsWith(s)?o(c.slice(s.length)):b_(C3,!1,c,void 0,!0)}if(n){const s=a;a=o=>n({className:o,parseClassName:s})}return a},E3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let s=[];for(let o=0;o<n.length;o++){const c=n[o],u=c[0]==="[",h=t.has(c);u||h?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(c)):s.push(c)}return s.length>0&&(s.sort(),a.push(...s)),a}},A3=e=>({cache:S3(e.cacheSize),parseClassName:T3(e),sortModifiers:E3(e),...g3(e)}),R3=/\s+/,L3=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:o}=t,c=[],u=e.trim().split(R3);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 R=k.length===0?"":k.length===1?k[0]:o(k).join(":"),L=w?R+qf:R,j=L+D;if(c.indexOf(j)>-1)continue;c.push(j);const G=s(D,S);for(let K=0;K<G.length;++K){const H=G[K];c.push(L+H)}h=m+(h.length>0?" "+h:h)}return h},D3=(...e)=>{let t=0,n,a,s="";for(;t<e.length;)(n=e[t++])&&(a=Cx(n))&&(s&&(s+=" "),s+=a);return s},Cx=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=Cx(e[a]))&&(n&&(n+=" "),n+=t);return n},M3=(e,...t)=>{let n,a,s,o;const c=h=>{const f=t.reduce((m,y)=>y(m),e());return n=A3(f),a=n.cache.get,s=n.cache.set,o=u,u(h)},u=h=>{const f=a(h);if(f)return f;const m=L3(h,n);return s(h,m),m};return o=c,(...h)=>o(D3(...h))},I3=[],Nt=e=>{const t=n=>n[e]||I3;return t.isThemeGetter=!0,t},Tx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ex=/^\((?:(\w[\w-]*):)?(.+)\)$/i,N3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,O3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j3=/\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$/,U3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,B3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,F3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wa=e=>N3.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),xa=e=>!!e&&Number.isInteger(Number(e)),Jh=e=>e.endsWith("%")&&qe(e.slice(0,-1)),Fr=e=>O3.test(e),Ax=()=>!0,V3=e=>j3.test(e)&&!U3.test(e),um=()=>!1,z3=e=>B3.test(e),$3=e=>F3.test(e),H3=e=>!ke(e)&&!be(e),W3=e=>ja(e,Dx,um),ke=e=>Tx.test(e),Ja=e=>ja(e,Mx,V3),w_=e=>ja(e,J3,qe),K3=e=>ja(e,Nx,Ax),G3=e=>ja(e,Ix,um),x_=e=>ja(e,Rx,um),q3=e=>ja(e,Lx,$3),bc=e=>ja(e,Ox,z3),be=e=>Ex.test(e),mo=e=>gi(e,Mx),Y3=e=>gi(e,Ix),P_=e=>gi(e,Rx),Z3=e=>gi(e,Dx),X3=e=>gi(e,Lx),wc=e=>gi(e,Ox,!0),Q3=e=>gi(e,Nx,!0),ja=(e,t,n)=>{const a=Tx.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},gi=(e,t,n=!1)=>{const a=Ex.exec(e);return a?a[1]?t(a[1]):n:!1},Rx=e=>e==="position"||e==="percentage",Lx=e=>e==="image"||e==="url",Dx=e=>e==="length"||e==="size"||e==="bg-size",Mx=e=>e==="length",J3=e=>e==="number",Ix=e=>e==="family-name",Nx=e=>e==="number"||e==="weight",Ox=e=>e==="shadow",ej=()=>{const e=Nt("color"),t=Nt("font"),n=Nt("text"),a=Nt("font-weight"),s=Nt("tracking"),o=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"),R=Nt("animate"),L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],G=()=>[...j(),be,ke],K=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],P=()=>[be,ke,h],Z=()=>[wa,"full","auto",...P()],X=()=>[xa,"none","subgrid",be,ke],me=()=>["auto",{span:["full",xa,be,ke]},xa,be,ke],oe=()=>[xa,"auto",be,ke],Ae=()=>["auto","min","max","fr",be,ke],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ue=()=>["start","end","center","stretch","center-safe","end-safe"],le=()=>["auto",...P()],Me=()=>[wa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],W=()=>[wa,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Y=()=>[wa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],$=()=>[e,be,ke],I=()=>[...j(),P_,x_,{position:[be,ke]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",Z3,W3,{size:[be,ke]}],Re=()=>[Jh,mo,Ja],Pe=()=>["","none","full",f,be,ke],Te=()=>["",qe,mo,Ja],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,Jh,P_,x_],jt=()=>["","none",x,be,ke],Hn=()=>["none",qe,be,ke],Cr=()=>["none",qe,be,ke],pt=()=>[qe,be,ke],en=()=>[wa,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fr],breakpoint:[Fr],color:[Ax],container:[Fr],"drop-shadow":[Fr],ease:["in","out","in-out"],font:[H3],"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",wa,ke,be,S]}],container:["container"],columns:[{columns:[qe,ke,be,u]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[xa,"auto",be,ke]}],basis:[{basis:[wa,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,wa,"auto","initial","none",ke]}],grow:[{grow:["",qe,be,ke]}],shrink:[{shrink:["",qe,be,ke]}],order:[{order:[xa,"first","last","none",be,ke]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:me()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:me()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],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:le()}],mx:[{mx:le()}],my:[{my:le()}],ms:[{ms:le()}],me:[{me:le()}],mbs:[{mbs:le()}],mbe:[{mbe:le()}],mt:[{mt:le()}],mr:[{mr:le()}],mb:[{mb:le()}],ml:[{ml:le()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Me()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[u,"screen",...Me()]}],"min-w":[{"min-w":[u,"screen","none",...Me()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Me()]}],h:[{h:["screen","lh",...Me()]}],"min-h":[{"min-h":["screen","lh","none",...Me()]}],"max-h":[{"max-h":["screen","lh",...Me()]}],"font-size":[{text:["base",n,mo,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Q3,K3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jh,ke]}],"font-family":[{font:[Y3,G3,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:[s,be,ke]}],"line-clamp":[{"line-clamp":[qe,"none",be,w_]}],leading:[{leading:[o,...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:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",be,Ja]}],"text-decoration-color":[{decoration:$()}],"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"]},xa,be,ke],radial:["",be,ke],conic:[xa,be,ke]},X3,q3]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Re()}],"gradient-via-pos":[{via:Re()}],"gradient-to-pos":[{to:Re()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded: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:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...Ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,be,ke]}],"outline-w":[{outline:["",qe,mo,Ja]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",m,wc,bc]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",y,wc,bc]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[qe,Ja]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":Te()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",k,wc,bc]}],"text-shadow-color":[{"text-shadow":$()}],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":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":Ue()}],"mask-image-t-to-pos":[{"mask-t-to":Ue()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":Ue()}],"mask-image-r-to-pos":[{"mask-r-to":Ue()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":Ue()}],"mask-image-b-to-pos":[{"mask-b-to":Ue()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":Ue()}],"mask-image-l-to-pos":[{"mask-l-to":Ue()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":Ue()}],"mask-image-x-to-pos":[{"mask-x-to":Ue()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":Ue()}],"mask-image-y-to-pos":[{"mask-y-to":Ue()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[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":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[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":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask: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,wc,bc]}],"drop-shadow-color":[{"drop-shadow":$()}],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",R,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:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",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",...$()]}],"stroke-w":[{stroke:[qe,mo,Ja,w_]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},tj=M3(ej);function Tt(...e){return tj(h3(e))}const nj=O.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[O.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"}),O.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"}),O.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"}),O.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"})]}),rj=O.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:O.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"})}),aj={google:nj,github:rj},ij={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function sj(e){return ij[e]||String(e||"").replace(/-/g," ")}function oj(){Zo();const{isOpen:e,closeLoginModal:t}=N0(),{enabled:n,signedIn:a,refreshUser:s,signInWithPassword:o,signUp:c,signInWithOAuth:u,getPublicAuthConfig:h}=qo(),[f,m]=b.useState("signin"),[y,k]=b.useState(""),[w,x]=b.useState(""),[C,S]=b.useState(""),[D,R]=b.useState(!1),[L,j]=b.useState(null),[G,K]=b.useState(null),[H,P]=b.useState(!1),[Z,X]=b.useState(!0),[me,oe]=b.useState([]),[Ae,fe]=b.useState(8);b.useEffect(()=>{e&&(j(null),K(null),m("signin"),k(""),x(""),S(""),P(!1))},[e]),b.useEffect(()=>{if(!e||!n){X(!1);return}let W=!0;return(async()=>{const{data:Y,error:$}=await h();if(W){if($||!Y)oe(["google","github"]);else{const I=Array.isArray(Y.oAuthProviders)?Y.oAuthProviders:[],q=Array.isArray(Y.customOAuthProviders)?Y.customOAuthProviders:[];oe([...I,...q]),typeof Y.passwordMinLength=="number"&&Y.passwordMinLength>0&&fe(Y.passwordMinLength)}X(!1)}})(),()=>{W=!1}},[e,n,h]),b.useEffect(()=>{e&&a&&t()},[e,a,t]);const ue=b.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),le=b.useCallback(async W=>{j(null),R(!0);try{const{error:Y}=await u(W,ue);Y&&j(Y.message||String(Y))}finally{R(!1)}},[u,ue]),Me=b.useCallback(async W=>{W.preventDefault(),j(null),R(!0);try{if(f==="signup"){const{data:$,error:I}=await c({email:y.trim(),password:w,name:C.trim()||void 0});if(I){j(I.message||String(I));return}if($?.requireEmailVerification){K(Fe("login.verify_email_pending")),m("signin");return}await s();return}const{error:Y}=await o({email:y.trim(),password:w});if(Y){j(Y.message||String(Y));return}await s()}finally{R(!1)}},[f,y,w,C,c,o,s]);return b.useEffect(()=>{if(!e)return;const W=Y=>{Y.key==="Escape"&&t()};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[e,t]),n?O.jsx(aO,{children:e&&O.jsxs(Qh.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:[O.jsx(Qh.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60 ",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),O.jsxs(Qh.div,{className:"relative w-full max-w-[420px] rounded-2xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 p-6 shadow-2xl",initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.2},onClick:W=>W.stopPropagation(),children:[O.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:O.jsx(D0,{className:"h-5 w-5"})}),O.jsxs("div",{className:"text-center mb-6",children:[O.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[O.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),O.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white",children:"Token Tracker"})]}),O.jsx("p",{className:"text-sm text-oai-gray-500",children:Fe("login_modal.subtitle")})]}),G&&O.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}),L&&O.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400",role:"alert",children:L}),O.jsx("div",{className:"space-y-2.5 mb-5",children:Z?O.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900 animate-pulse"}):me.map(W=>O.jsxs("button",{type:"button",disabled:D,onClick:()=>le(W),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:[aj[W]||null,Fe("login.oauth.continue",{provider:sj(W)})]},W))}),H?O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"relative mb-5",children:[O.jsx("div",{className:"absolute inset-0 flex items-center",children:O.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),O.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:O.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")})})]}),O.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:[O.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"),j(null)},children:Fe("login.tab.sign_in")}),O.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"),j(null)},children:Fe("login.tab.sign_up")})]}),O.jsxs("form",{onSubmit:Me,className:"space-y-3",children:[f==="signup"&&O.jsxs("div",{children:[O.jsx("label",{htmlFor:"modal-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.name")}),O.jsx("input",{id:"modal-name",type:"text",autoComplete:"name",value:C,onChange:W=>S(W.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:Fe("login.field.name_placeholder")})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"modal-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.email")}),O.jsx("input",{id:"modal-email",type:"email",autoComplete:"email",required:!0,value:y,onChange:W=>k(W.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"modal-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.password")}),O.jsx("input",{id:"modal-password",type:"password",autoComplete:f==="signup"?"new-password":"current-password",required:!0,minLength:f==="signup"?Ae:void 0,value:w,onChange:W=>x(W.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),f==="signup"&&O.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login.password_hint",{min:String(Ae)})})]}),O.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")})]})]}):O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"relative mb-5",children:[O.jsx("div",{className:"absolute inset-0 flex items-center",children:O.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),O.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:O.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")})})]}),O.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:[O.jsx($D,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Fe("login_modal.continue_email")]})]})]})]})}):null}const lj={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"};function cj(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?lj:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||"").trim()}function V4(){return fi()}function uj(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 dj=300*1e3,hj=720*60*1e3;function dm(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function fj(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+hj<=t:!0}async function jx(e,t){const n=fi();if(!dm(n)||!e)return;const a=n.replace(/\/$/,""),s=Cu(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};s&&(o.apikey=s);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:o,body:JSON.stringify({period:"week",source:t})})}catch{}}async function pj(e){const t=fi();if(!dm(t)||!e)return null;const n=t.replace(/\/$/,""),a=Cu(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(s.apikey=a);const o=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",c=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:s,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:o})});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 S_(e){const{deviceToken:t,insforgeBaseUrl:n}=e,a={deviceToken:t},s=n||fi();dm(s)&&(a.insforgeBaseUrl=s.trim());const o=await Rp(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...o},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 C_(e){const t=await e();if(!t)return null;const n=t0();if(n&&!fj(n))return n;const a=await pj(t);return a?(OR(a),a):null}async function Ux(e){let t=await e();if(!t)return null;let n=await C_(async()=>t);if(!n)return t;try{return await S_({deviceToken:n.token,insforgeBaseUrl:fi()}),t}catch(a){if(!t0()||(n0(),t=await e(),!t)||(n=await C_(async()=>t),!n))throw a;return await S_({deviceToken:n.token,insforgeBaseUrl:fi()}),t}}async function mj(e){const t=jR();if(Date.now()-t<dj)return;const n=await Ux(e);n&&(r0(Date.now()),await jx(n,"cloud-sync-auto"))}async function z4(e){const t=await Ux(e);t&&(r0(Date.now()),await jx(t,"cloud-sync-now"))}function gj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function yj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||gj(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function vj(){const e=Fn(),t=qo(),n=b.useRef(!1);b.useEffect(()=>{if(!IR()||!yj(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!NR())return;let a=!1;const s=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await mj(()=>t.getAccessToken())}catch(o){console.warn("[tokentracker] cloud usage sync:",o)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(s)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function kj(){const e=b.useContext(M0);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function _j({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function bj(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 T_(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 E_({className:e,variant:t="header",collapsed:n=!1,onAfterAction:a}){Zo();const s=t==="sidebar",{enabled:o,loading:c,signedIn:u,user:h,displayName:f}=qo(),{openLoginModal:m}=N0(),y=ku(),k=b.useMemo(()=>bj(h),[h]);if(!o)return null;if(c)return O.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 s?O.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:[O.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:O.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&O.jsx("span",{className:"truncate flex-1 text-left",children:Fe("header.auth.sign_in_aria")})]}):O.jsx("button",{type:"button",onClick:m,className:Tt("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-full px-5 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",e),"aria-label":Fe("header.auth.sign_in_aria"),children:Fe("header.auth.sign_in_aria")});const w=()=>{y("/settings"),a?.()};return O.jsx("div",{className:Tt(s?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:O.jsxs("button",{type:"button",onClick:w,className:Tt(s?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-full pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":Fe("header.auth.open_settings"),title:s&&n?f:void 0,children:[s?O.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:k?O.jsx("img",{src:k,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"}):O.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:T_(f)})}):k?O.jsx("img",{src:k,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"}):O.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:T_(f)}),s?!n&&O.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}):O.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 Yf="tt.sidebarCollapsed";function wj(){return[{id:"general",label:Fe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:ND,label:Fe("nav.usage")},{id:"limits",to:"/limits",icon:jD,label:Fe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:iM,label:Fe("nav.leaderboard")}]},{id:"tools",label:Fe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:VD,label:Fe("nav.widgets")},{id:"skills",to:"/skills",icon:ZD,label:Fe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:BD,label:Fe("nav.ip_check")}]},{id:"account",label:Fe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:eM,label:Fe("nav.settings")}]}]}function xj(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Yf)==="1"}catch{return!1}}function Pj(){const[e,t]=b.useState(xj),n=b.useCallback(()=>{t(a=>{const s=!a;try{typeof window<"u"&&window.localStorage.setItem(Yf,s?"1":"0")}catch{}return s})},[]);return b.useEffect(()=>{if(typeof window>"u")return;const a=s=>{s.key===Yf&&t(s.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function Sj(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function Cj({label:e,collapsed:t,first:n}){return t?n?null:O.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):O.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 Tj({item:e,collapsed:t,active:n,onClick:a}){const s=e.icon;return O.jsxs(bu,{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:[O.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:O.jsx(s,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&O.jsx("span",{className:"truncate",children:e.label})]})}function Ej({as:e="button",title:t,onClick:n,href:a,children:s,className:o,...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",o);return e==="a"?O.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...c,children:s}):O.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...c,children:s})}function Aj({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,a]=b.useState(null);return b.useEffect(()=>{if(typeof window>"u")return;const s=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;_j({prefersReducedMotion:s,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(o=>o.json()).then(o=>{o&&typeof o.stargazers_count=="number"&&a(o.stargazers_count)}).catch(()=>{})},[e]),O.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:[O.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:O.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"})}),O.jsx("span",{children:"Star"}),n!==null&&O.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const Rj=[{value:"light",label:"Light",Icon:L0},{value:"dark",label:"Dark",Icon:R0},{value:"system",label:"System",Icon:GD}];function Lj({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[s,o]=b.useState(!1),c=b.useRef(null),u=t==="dark"?R0:L0;return b.useEffect(()=>{if(!s)return;const h=m=>{c.current&&!c.current.contains(m.target)&&o(!1)},f=m=>{m.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[s]),O.jsxs("div",{ref:c,className:"relative",children:[O.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":s,"aria-haspopup":"menu",title:"Theme",onClick:()=>o(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:O.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),s&&O.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:Rj.map(({value:h,label:f,Icon:m})=>{const y=e===h;return O.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),o(!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:[O.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),O.jsx("span",{children:f})]},h)})})]})}function Bx({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:s,glassChrome:o=!1}){const u=Fn()?.pathname||"/",{theme:h,resolvedTheme:f,setTheme:m}=kj(),{resolvedLocale:y}=Zo(),k=b.useMemo(()=>wj(),[y]);return O.jsxs(O.Fragment,{children:[O.jsx("div",{className:Tt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:a?O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("div",{className:"flex-1 min-w-0",children:O.jsx(E_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),O.jsx("button",{type:"button",onClick:s,"aria-label":Fe("nav.close_menu"),title:Fe("nav.close_menu"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-oai-gray-500 dark:text-oai-gray-500 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-gray-900 dark:hover:text-oai-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:O.jsx(D0,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):O.jsx(E_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),O.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)=>O.jsxs("div",{className:"flex flex-col",children:[O.jsx(Cj,{label:w.label,collapsed:e,first:x===0}),O.jsx("div",{className:"flex flex-col gap-0.5",children:w.items.map(C=>O.jsx(Tj,{item:C,collapsed:e,active:Sj(u,C.to),onClick:n},C.id))})]},w.id))}),O.jsxs("div",{className:Tt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[O.jsx(Lj,{theme:h,resolvedTheme:f,onSetTheme:m,glassChrome:o}),O.jsx("div",{className:"flex items-center gap-1.5",children:!e&&O.jsx(Aj,{glassChrome:o})})]})]})}function Dj({collapsed:e,onToggleCollapsed:t}){const n=b.useMemo(()=>typeof window>"u"?!1:ar()||x0(),[]);return O.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:O.jsx(Bx,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function Mj({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?O.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[O.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),O.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:O.jsx(Bx,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function Ij({onOpenDrawer:e}){return O.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:[O.jsx(Ej,{title:Fe("nav.menu"),onClick:e,children:O.jsx(WD,{className:"h-5 w-5","aria-hidden":!0})}),O.jsxs(bu,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[O.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),O.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),O.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function Nj({children:e}){const{collapsed:t,toggle:n}=Pj(),[a,s]=b.useState(!1),o=b.useCallback(()=>s(!0),[]),c=b.useCallback(()=>s(!1),[]),u=b.useMemo(()=>typeof window>"u"?!1:ar()||x0(),[]);return O.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&&O.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),O.jsxs("div",{className:"flex-1 min-h-0 flex",children:[O.jsx(Dj,{collapsed:t,onToggleCollapsed:n}),O.jsx(Mj,{open:a,onClose:c}),O.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:O.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:[O.jsx(Ij,{onOpenDrawer:o}),O.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}const Oj=typeof window<"u"?window.location.search:"",A_=new URLSearchParams(Oj),xc=A_.get("insforge_code")||A_.get("code")||null;function jj(){Zo();const{loading:e,signedIn:t}=qo(),n=ku(),[a,s]=b.useState("processing"),[o,c]=b.useState(null),u=b.useRef(!1);b.useEffect(()=>{!xc||u.current||(u.current=!0,(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();c(!!m?.native)}catch{c(!1)}})())},[]),b.useEffect(()=>{if(o!==!0||!xc)return;s("redirecting");const f=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(xc)}`},200);return()=>clearTimeout(f)},[o]),b.useEffect(()=>{if(o!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const f=setTimeout(()=>{t||s("failed")},5e3);return()=>clearTimeout(f)},[o,e,t,n]),b.useEffect(()=>{if(!xc&&o===null){const f=setTimeout(()=>s("failed"),3e3);return()=>clearTimeout(f)}},[o]);const h=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&o!==!0&&(o===null||o===!1&&e)?O.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):O.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:O.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),O.jsx("p",{className:"text-oai-gray-400 text-sm",children:Fe("auth.callback.processing")})]}),a==="redirecting"&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:O.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:O.jsx("path",{d:"M20 6 9 17l-5-5"})})}),O.jsx("p",{className:"text-white text-sm font-medium",children:Fe("auth.callback.success")}),O.jsx("p",{className:"text-oai-gray-500 text-xs",children:Fe("auth.callback.redirecting")})]}),a==="failed"&&O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-oai-gray-300 text-sm",children:Fe("auth.callback.failed")}),O.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 Uj=b.lazy(()=>$n(()=>import("./DashboardPage-D-c3ggwu.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.DashboardPage}))),Bj=b.lazy(()=>$n(()=>import("./IpCheckPage-DvlCxm7c.js"),[])),Fj=b.lazy(()=>$n(()=>import("./LandingPage-Cn-IoNno.js"),__vite__mapDeps([9,10,6])).then(e=>({default:e.LandingPage}))),Vj=b.lazy(()=>$n(()=>import("./LeaderboardPage-CbiPJJPx.js"),__vite__mapDeps([11,7,2,12,13])).then(e=>({default:e.LeaderboardPage}))),zj=b.lazy(()=>$n(()=>import("./LeaderboardProfilePage-Bu7B-2jw.js"),__vite__mapDeps([14,10,12])).then(e=>({default:e.LeaderboardProfilePage}))),$j=b.lazy(()=>$n(()=>import("./LimitsPage-B3rB2mq-.js"),__vite__mapDeps([15,1,16,5,8,6])).then(e=>({default:e.LimitsPage}))),Hj=b.lazy(()=>$n(()=>import("./LoginPage-D1zPQFPk.js"),[]).then(e=>({default:e.LoginPage}))),Wj=b.lazy(()=>$n(()=>import("./DevicePage-CXQozcPu.js"),[])),Kj=b.lazy(()=>$n(()=>import("./WrappedPage-27gR4t07.js"),[])),Gj=b.lazy(()=>$n(()=>import("./SettingsPage-CrNFjpAc.js"),__vite__mapDeps([17,16,18,5,19,2,13,3,20])).then(e=>({default:e.SettingsPage}))),qj=b.lazy(()=>$n(()=>import("./SkillsPage-BLA6DLai.js"),__vite__mapDeps([21,5,4,3,7,19,6,13,20])).then(e=>({default:e.SkillsPage}))),Yj=b.lazy(()=>$n(()=>import("./WidgetsPage-DKqL5elk.js"),__vite__mapDeps([22,18,5,8,6,20,13])).then(e=>({default:e.WidgetsPage})));function Zj(){const{resolvedLocale:e}=Zo(),t=Fn(),n=qo();vj();const a=Sn(),s=b.useMemo(()=>typeof window>"u"?!1:uj(window.location.search),[]),o=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=o.replace(/\/+$/,"")||"/",C=x.match(/^\/leaderboard\/u\/([^/]+)$/i),S=C?C[1]:null,D=x==="/leaderboard"||!!S,R=!!(n.enabled&&n.signedIn),L=w||R,j=!1,G=cj(),K=b.useMemo(()=>!n.enabled||!R?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[R,n]);let H=w||a||s?"dashboard":"landing";x==="/landing"&&(H="landing"),x==="/dashboard"&&(H="dashboard"),D&&(H="dashboard");const P=x==="/limits",Z=x==="/settings",X=x==="/skills",me=x==="/widgets",oe=x==="/ip-check";(P||Z||X||me||oe)&&(H="dashboard");let Ae=Uj;S?Ae=zj:x==="/leaderboard"?Ae=Vj:P?Ae=$j:Z?Ae=Gj:X?Ae=qj:me?Ae=Yj:oe&&(Ae=Bj);const ue=!k&&(x==="/dashboard"||x==="/"||x==="/leaderboard"||P||Z||X||me||oe);let le=null;if(x==="/auth/callback"||x==="/auth/native-callback")le=O.jsx(jj,{});else if(x==="/login")le=O.jsx(Hj,{});else if(x==="/device")le=O.jsx(Wj,{});else if(x==="/wrapped")le=O.jsx(Kj,{});else if(H==="landing")le=O.jsx(Fj,{signInUrl:"/login",signUpUrl:"/login"});else{const Me=O.jsx(Ae,{baseUrl:G,auth:K,signedIn:L,sessionSoftExpired:j,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:k,publicToken:y,userId:S,signInUrl:"/login",signUpUrl:"/login"},e);ue?le=O.jsx(Nj,{children:Me}):le=Me}return O.jsx(lM,{children:O.jsx(dM,{children:O.jsxs(hM,{children:[O.jsx(b.Suspense,{fallback:null,children:le}),O.jsx(oj,{}),O.jsx(gD,{}),O.jsx(TD,{})]})})})}const Xj=$1([{path:"*",element:O.jsx(Zj,{})}]);LS.createRoot(document.getElementById("root")).render(O.jsx(Xf.StrictMode,{children:O.jsx(YL,{children:O.jsx(nD,{children:O.jsx(CL,{children:O.jsx(nT,{router:Xj})})})})}));export{T4 as $,f0 as A,Fe as B,O as C,kj as D,k4 as E,v4 as F,Qh as G,Dc as H,Io as I,du as J,oM as K,bu as L,sm as M,R4 as N,c4 as O,l4 as P,aO as Q,Xf as R,N0 as S,qo as T,m4 as U,x4 as V,Zo as W,D0 as X,uj as Y,Ea as Z,$n as _,Gt as a,_4 as a0,GR as a1,u4 as a2,d4 as a3,E4 as a4,y4 as a5,p4 as a6,Tt as a7,E_ as a8,tT as a9,tD as aA,Tp as aB,Rp as aC,CS as aD,Zf as aE,U4 as aF,ar as aG,x0 as aH,O4 as aI,B4 as aJ,j4 as aK,So as aL,Uw as aM,V2 as aN,Vf as aO,Fn as aa,ku as ab,V4 as ac,NR as ad,i4 as ae,z4 as af,s4 as ag,S4 as ah,C4 as ai,_j as aj,eM as ak,I4 as al,Qj as am,DR as an,Ip as ao,IR as ap,qv as aq,P4 as ar,L0 as as,R0 as at,GD as au,ps as av,nu as aw,Lp as ax,g4 as ay,QD as az,O0 as b,dn as c,Ia as d,yk as e,dt as f,p0 as g,Sn as h,lI as i,o4 as j,VR as k,N4 as l,gs as m,nL as n,rL as o,L4 as p,f4 as q,b as r,w4 as s,D4 as t,Np as u,M4 as v,h4 as w,yt as x,b4 as y,A4 as z};
813
+ `),()=>{u.current?.removeAttribute("data-motion-pop-id"),G.contains(j)&&G.removeChild(j)}},[t]),O.jsx(eO,{isPresent:t,childRef:u,sizeRef:h,pop:o,children:o===!1?e:b.cloneElement(e,{ref:y})})}const nO=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:s,presenceAffectsLayout:o,mode:c,anchorX:u,anchorY:h,root:f})=>{const m=Np(rO),y=b.useId();let k=!0,w=b.useMemo(()=>(k=!1,{id:y,initial:t,isPresent:n,custom:s,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 o&&k&&(w={...w}),b.useMemo(()=>{m.forEach((x,C)=>m.set(C,!1))},[n]),b.useEffect(()=>{!n&&!m.size&&a&&a()},[n]),e=O.jsx(tO,{pop:c==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:f,children:e}),O.jsx(Au.Provider,{value:w,children:e})};function rO(){return new Map}function cx(e=!0){const t=b.useContext(Au);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:s}=t,o=b.useId();b.useEffect(()=>{if(e)return s(o)},[e]);const c=b.useCallback(()=>e&&a&&a(o),[o,a,e]);return!n&&a?[!1,c]:[!0]}const vc=e=>e.key||"";function i_(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const aO=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:s=!0,mode:o="sync",propagate:c=!1,anchorX:u="left",anchorY:h="top",root:f})=>{const[m,y]=cx(c),k=b.useMemo(()=>i_(e),[e]),w=c&&!m?[]:k.map(vc),x=b.useRef(!0),C=b.useRef(k),S=Np(()=>new Map),D=b.useRef(new Set),[R,L]=b.useState(k),[j,G]=b.useState(k);O0(()=>{x.current=!1,C.current=k;for(let P=0;P<j.length;P++){const Z=vc(j[P]);w.includes(Z)?(S.delete(Z),D.current.delete(Z)):S.get(Z)!==!0&&S.set(Z,!1)}},[j,w.length,w.join("-")]);const K=[];if(k!==R){let P=[...k];for(let Z=0;Z<j.length;Z++){const X=j[Z],me=vc(X);w.includes(me)||(P.splice(Z,0,X),K.push(X))}return o==="wait"&&K.length&&(P=K),G(i_(P)),L(k),null}const{forceRender:H}=b.useContext(Ip);return O.jsx(O.Fragment,{children:j.map(P=>{const Z=vc(P),X=c&&!m?!1:k===j||w.includes(Z),me=()=>{if(D.current.has(Z))return;if(S.has(Z))D.current.add(Z),S.set(Z,!0);else return;let oe=!0;S.forEach(Ae=>{Ae||(oe=!1)}),oe&&(H?.(),G(C.current),c&&y?.(),a&&a())};return O.jsx(nO,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:f,onExitComplete:X?void 0:me,anchorX:u,anchorY:h,children:P},Z)})})},ux=b.createContext({strict:!1}),s_={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 o_=!1;function iO(){if(o_)return;const e={};for(const t in s_)e[t]={isEnabled:n=>s_[t].some(a=>!!n[a])};Bw(e),o_=!0}function dx(){return iO(),z2()}function sO(e){const t=dx();for(const n in e)t[n]={...t[n],...e[n]};Bw(t)}const oO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function mu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||oO.has(e)}let hx=e=>!mu(e);function lO(e){typeof e=="function"&&(hx=t=>t.startsWith("on")?!mu(t):e(t))}try{lO(require("@emotion/is-prop-valid").default)}catch{}function cO(e,t,n){const a={};for(const s in e)s==="values"&&typeof e.values=="object"||Gt(e[s])||(hx(s)||n===!0&&mu(s)||!t&&!mu(s)||e.draggable&&s.startsWith("onDrag"))&&(a[s]=e[s]);return a}const Mu=b.createContext({});function uO(e,t){if(Du(e)){const{initial:n,animate:a}=e;return{initial:n===!1||Uo(n)?n:void 0,animate:Uo(a)?a:void 0}}return e.inherit!==!1?t:{}}function dO(e){const{initial:t,animate:n}=uO(e,b.useContext(Mu));return b.useMemo(()=>({initial:t,animate:n}),[l_(t),l_(n)])}function l_(e){return Array.isArray(e)?e.join(" "):e}const om=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function fx(e,t,n){for(const a in t)!Gt(t[a])&&!Kw(a,n)&&(e[a]=t[a])}function hO({transformTemplate:e},t){return b.useMemo(()=>{const n=om();return am(n,t,e),Object.assign({},n.vars,n.style)},[t])}function fO(e,t){const n=e.style||{},a={};return fx(a,n,e),Object.assign(a,hO(e,t)),a}function pO(e,t){const n={},a=fO(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 px=()=>({...om(),attrs:{}});function mO(e,t,n,a){const s=b.useMemo(()=>{const o=px();return Gw(o,t,Yw(a),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};fx(o,e.style,e),s.style={...o,...s.style}}return s}const gO=["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 lm(e){return typeof e!="string"||e.includes("-")?!1:!!(gO.indexOf(e)>-1||/[A-Z]/u.test(e))}function yO(e,t,n,{latestValues:a},s,o=!1,c){const h=(c??lm(e)?mO:pO)(t,a,s,e),f=cO(t,typeof e=="string",o),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 vO({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,s){return{latestValues:kO(n,a,s,e),renderState:t()}}function kO(e,t,n,a){const s={},o=a(e,{});for(const k in o)s[k]=Vc(o[k]);let{initial:c,animate:u}=e;const h=Du(e),f=jw(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"&&!Lu(y)){const k=Array.isArray(y)?y:[y];for(let w=0;w<k.length;w++){const x=Zp(e,k[w]);if(x){const{transitionEnd:C,transition:S,...D}=x;for(const R in D){let L=D[R];if(Array.isArray(L)){const j=m?L.length-1:0;L=L[j]}L!==null&&(s[R]=L)}for(const R in C)s[R]=C[R]}}}return s}const mx=e=>(t,n)=>{const a=b.useContext(Mu),s=b.useContext(Au),o=()=>vO(e,t,a,s);return n?o():Np(o)},_O=mx({scrapeMotionValuesFromProps:im,createRenderState:om}),bO=mx({scrapeMotionValuesFromProps:Zw,createRenderState:px}),wO=Symbol.for("motionComponentSymbol");function xO(e,t,n){const a=b.useRef(n);b.useInsertionEffect(()=>{a.current=n});const s=b.useRef(null);return b.useCallback(o=>{o&&e.onMount?.(o);const c=a.current;if(typeof c=="function")if(o){const u=c(o);typeof u=="function"&&(s.current=u)}else s.current?(s.current(),s.current=null):c(o);else c&&(c.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const gx=b.createContext({});function ts(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function PO(e,t,n,a,s,o){const{visualElement:c}=b.useContext(Mu),u=b.useContext(ux),h=b.useContext(Au),f=b.useContext(sm),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:o}),w.current&&k.current&&(k.current.manuallyAnimateOnMount=!0));const x=k.current,C=b.useContext(gx);x&&!x.projection&&s&&(x.type==="html"||x.type==="svg")&&SO(k.current,n,s,C);const S=b.useRef(!1);b.useInsertionEffect(()=>{x&&S.current&&x.update(n,h)});const D=n[Pw],R=b.useRef(!!D&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(D)&&window.MotionHasOptimisedAnimation?.(D));return O0(()=>{w.current=!0,x&&(S.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),R.current&&x.animationState&&x.animationState.animateChanges())}),b.useEffect(()=>{x&&(!R.current&&x.animationState&&x.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(D)}),R.current=!1),x.enteringChildren=void 0)}),x}function SO(e,t,n,a){const{layoutId:s,layout:o,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:yx(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!c||u&&ts(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:h,layoutRoot:f,layoutAnchor:m})}function yx(e){if(e)return e.options.allowProjection!==!1?e.projection:yx(e.parent)}function Gh(e,{forwardMotionProps:t=!1,type:n}={},a,s){a&&sO(a);const o=n?n==="svg":lm(e),c=o?bO:_O;function u(f,m){let y;const k={...b.useContext(sm),...f,layoutId:CO(f)},{isStatic:w}=k,x=dO(f),C=c(f,w);if(!w&&typeof window<"u"){TO();const S=EO(k);y=S.MeasureLayout,x.visualElement=PO(e,C,k,s,S.ProjectionNode,o)}return O.jsxs(Mu.Provider,{value:x,children:[y&&x.visualElement?O.jsx(y,{visualElement:x.visualElement,...k}):null,yO(e,f,xO(C,x.visualElement,m),C,w,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=b.forwardRef(u);return h[wO]=e,h}function CO({layoutId:e}){const t=b.useContext(Ip).id;return t&&e!==void 0?t+"-"+e:e}function TO(e,t){b.useContext(ux).strict}function EO(e){const t=dx(),{drag:n,layout:a}=t;if(!n&&!a)return{};const s={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function AO(e,t){if(typeof Proxy>"u")return Gh;const n=new Map,a=(o,c)=>Gh(o,c,e,t),s=(o,c)=>a(o,c);return new Proxy(s,{get:(o,c)=>c==="create"?a:(n.has(c)||n.set(c,Gh(c,void 0,e,t)),n.get(c))})}const RO=(e,t)=>t.isSVG??lm(e)?new iN(t):new J2(t,{allowProjection:e!==b.Fragment});class LO extends Oa{constructor(t){super(t),t.animationState||(t.animationState=uN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Lu(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 DO=0;class MO extends Oa{constructor(){super(...arguments),this.id=DO++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;if(t&&a===!1){if(this.isExitComplete){const{initial:o,custom:c}=this.node.getProps();if(typeof o=="string"){const u=si(this.node,o,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 s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const IO={animation:{Feature:LO},exit:{Feature:MO}};function el(e){return{point:{x:e.pageX,y:e.pageY}}}const NO=e=>t=>em(t)&&e(t,el(t));function Ao(e,t,n,a){return Bo(e,t,NO(n),a)}const vx=({current:e})=>e?e.ownerDocument.defaultView:null,c_=(e,t)=>Math.abs(e-t);function OO(e,t){const n=c_(e.x,t.x),a=c_(e.y,t.y);return Math.sqrt(n**2+a**2)}const u_=new Set(["auto","scroll"]);class kx{constructor(t,n,{transformPagePoint:a,contextWindow:s=window,dragSnapToOrigin:o=!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=kc(this.lastRawMoveEventInfo,this.transformPagePoint));const w=qh(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,C=OO(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:R,onMove:L}=this.handlers;x||(R&&R(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),L&&L(this.lastMoveEvent,w)},this.handlePointerMove=(w,x)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=kc(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 R=qh(w.type==="pointercancel"?this.lastMoveEventInfo:kc(x,this.transformPagePoint),this.history);this.startEvent&&C&&C(w,R),S&&S(w,R)},!em(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=c,this.contextWindow=s||window;const h=el(t),f=kc(h,this.transformPagePoint),{point:m}=f,{timestamp:y}=Kt;this.history=[{...m,timestamp:y}];const{onSessionStart:k}=n;k&&k(t,qh(f,this.history)),this.removeListeners=Xo(Ao(this.contextWindow,"pointermove",this.handlePointerMove),Ao(this.contextWindow,"pointerup",this.handlePointerUp),Ao(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(u_.has(a.overflowX)||u_.has(a.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const a=t===window,s=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),dt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ia(this.updatePoint)}}function kc(e,t){return t?{point:t(e.point)}:e}function d_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qh({point:e},t){return{point:e,delta:d_(e,_x(t)),offset:d_(e,jO(t)),velocity:UO(t,.1)}}function jO(e){return e[0]}function _x(e){return e[e.length-1]}function UO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const s=_x(e);for(;n>=0&&(a=e[n],!(s.timestamp-a.timestamp>Pn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&s.timestamp-a.timestamp>Pn(t)*2&&(a=e[1]);const o=On(s.timestamp-a.timestamp);if(o===0)return{x:0,y:0};const c={x:(s.x-a.x)/o,y:(s.y-a.y)/o};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function BO(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 h_(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 FO(e,{top:t,left:n,bottom:a,right:s}){return{x:h_(e.x,n,s),y:h_(e.y,t,a)}}function f_(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 VO(e,t){return{x:f_(e.x,t.x),y:f_(e.y,t.y)}}function zO(e,t){let n=.5;const a=ln(e),s=ln(t);return s>a?n=Oo(t.min,t.max-a,e.min):a>s&&(n=Oo(e.min,e.max-s,t.min)),xr(0,1,n)}function $O(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 Kf=.35;function HO(e=Kf){return e===!1?e=0:e===!0&&(e=Kf),{x:p_(e,"left","right"),y:p_(e,"top","bottom")}}function p_(e,t,n){return{min:m_(e,t),max:m_(e,n)}}function m_(e,t){return typeof e=="number"?e:e[t]||0}const WO=new WeakMap;class KO{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:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=y=>{n&&this.snapToCursor(el(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=v2(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 R=this.getAxisMotionValue(D).get()||0;if(vr.test(R)){const{projection:L}=this.visualElement;if(L&&L.layout){const j=L.layout.layoutBox[D];j&&(R=ln(j)*(parseFloat(R)/100))}}this.originPoint[D]=R}),C&&dt.update(()=>C(y,k),!1,!0),jf(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 kx(t,{onSessionStart:o,onStart:c,onMove:u,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:a,contextWindow:vx(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!a)return;const{velocity:c}=s;this.startAnimation(c);const{onDragEnd:u}=this.getProps();u&&dt.postRender(()=>u(a,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,a){const{drag:s}=this.getProps();if(!a||!_c(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let c=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(c=BO(c,this.constraints[t],this.elastic[t])),o.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,s=this.constraints;t&&ts(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=FO(a.layoutBox,t):this.constraints=!1,this.elastic=HO(n),s!==this.constraints&&!ts(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&pr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=$O(a.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ts(t))return!1;const a=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=G2(a,s.root,this.visualElement.getTransformPagePoint());let c=VO(s.layout.layoutBox,o);if(n){const u=n(H2(c));this.hasMutatedConstraints=!!u,u&&(c=Vw(u))}return c}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:s,dragTransition:o,dragSnapToOrigin:c,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},f=pr(m=>{if(!_c(m,n,this.currentDirection))return;let y=h&&h[m]||{};(c===!0||c===m)&&(y={min:0,max:0});const k=s?200:1e6,w=s?40:1e7,x={type:"inertia",velocity:a?t[m]:0,bounceStiffness:k,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...o,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return jf(this.visualElement,t),a.start(Yp(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(),s=a[n];return s||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){pr(n=>{const{drag:a}=this.getProps();if(!_c(n,a,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:c,max:u}=s.layout.layoutBox[n],h=o.get()||0;o.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(!ts(n)||!a||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};pr(c=>{const u=this.getAxisMotionValue(c);if(u&&this.constraints!==!1){const h=u.get();s[c]=zO({min:h,max:h},this.constraints[c])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),pr(c=>{if(!_c(c,t,null))return;const u=this.getAxisMotionValue(c),{min:h,max:f}=this.constraints[c];u.set(vt(h,f,s[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;WO.set(this.visualElement,this);const t=this.visualElement.current,n=Ao(t,"pointerdown",f=>{const{drag:m,dragListener:y=!0}=this.getProps(),k=f.target,w=k!==t&&P2(k);m&&y&&!w&&this.start(f)});let a;const s=()=>{const{dragConstraints:f}=this.getProps();ts(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=GO(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,c=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),dt.read(s);const u=Bo(window,"resize",()=>this.scalePositionWithinConstraints()),h=o.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:s=!1,dragConstraints:o=!1,dragElastic:c=Kf,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:s,dragConstraints:o,dragElastic:c,dragMomentum:u}}}function g_(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function GO(e,t,n){const a=xk(e,g_(n)),s=xk(t,g_(n));return()=>{a(),s()}}function _c(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 YO extends Oa{constructor(t){super(t),this.removeGroupControls=jn,this.removeListeners=jn,this.controls=new KO(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 Yh=e=>(t,n)=>{e&&dt.update(()=>e(t,n),!1,!0)};class ZO extends Oa{constructor(){super(...arguments),this.removePointerDownListener=jn}onPointerDown(t){this.session=new kx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:s}=this.node.getProps();return{onSessionStart:Yh(t),onStart:Yh(n),onMove:Yh(a),onEnd:(o,c)=>{delete this.session,s&&dt.postRender(()=>s(o,c))}}}mount(){this.removePointerDownListener=Ao(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 Zh=!1;class XO extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),a&&a.register&&s&&a.register(o),Zh&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),zc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:s,isPresent:o}=this.props,{projection:c}=a;return c&&(c.isPresent=o,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),Zh=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?c.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?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(),Jp.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:s}=t;Zh=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),a&&a.deregister&&a.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function bx(e){const[t,n]=cx(),a=b.useContext(Ip);return O.jsx(XO,{...e,layoutGroup:a,switchLayoutGroup:b.useContext(gx),isPresent:t,safeToRemove:n})}const QO={pan:{Feature:ZO},drag:{Feature:YO,ProjectionNode:lx,MeasureLayout:bx}};function y_(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=a[s];o&&dt.postRender(()=>o(t,el(t)))}class JO extends Oa{mount(){const{current:t}=this.node;t&&(this.unmount=_2(t,(n,a)=>(y_(this.node,a,"Start"),s=>y_(this.node,s,"End"))))}unmount(){}}class e3 extends Oa{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=Xo(Bo(this.node.current,"focus",()=>this.onFocus()),Bo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function v_(e,t,n){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=a[s];o&&dt.postRender(()=>o(t,el(t)))}class t3 extends Oa{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=C2(t,(s,o)=>(v_(this.node,o,"Start"),(c,{success:u})=>v_(this.node,c,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const Gf=new WeakMap,Xh=new WeakMap,n3=e=>{const t=Gf.get(e.target);t&&t(e)},r3=e=>{e.forEach(n3)};function a3({root:e,...t}){const n=e||document;Xh.has(n)||Xh.set(n,{});const a=Xh.get(n),s=JSON.stringify(t);return a[s]||(a[s]=new IntersectionObserver(r3,{root:e,...t})),a[s]}function i3(e,t,n){const a=a3(t);return Gf.set(e,n),a.observe(e),()=>{Gf.delete(e),a.unobserve(e)}}const s3={some:0,all:1};class o3 extends Oa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:s="some",once:o}=t,c={root:n?n.current:void 0,rootMargin:a,threshold:typeof s=="number"?s:s3[s]},u=h=>{const{isIntersecting:f}=h;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),k=f?m:y;k&&k(h)};this.stopObserver=i3(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(l3(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function l3({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const c3={inView:{Feature:o3},tap:{Feature:t3},focus:{Feature:e3},hover:{Feature:JO}},u3={layout:{ProjectionNode:lx,MeasureLayout:bx}},d3={...IO,...c3,...QO,...u3},Qh=AO(d3,RO);function wx(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=wx(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function h3(){for(var e,t,n=0,a="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=wx(e))&&(a&&(a+=" "),a+=t);return a}const f3=(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},p3=(e,t)=>({classGroupId:e,validator:t}),xx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),gu="-",k_=[],m3="arbitrary..",g3=e=>{const t=v3(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return y3(c);const u=c.split(gu),h=u[0]===""&&u.length>1?1:0;return Px(u,h,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const h=a[c],f=n[c];return h?f?f3(f,h):h:f||k_}return n[c]||k_}}},Px=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],o=n.nextPart.get(s);if(o){const f=Px(e,t+1,o);if(f)return f}const c=n.validators;if(c===null)return;const u=t===0?e.join(gu):e.slice(t).join(gu),h=c.length;for(let f=0;f<h;f++){const m=c[f];if(m.validator(u))return m.classGroupId}},y3=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?m3+a:void 0})(),v3=e=>{const{theme:t,classGroups:n}=e;return k3(n,t)},k3=(e,t)=>{const n=xx();for(const a in e){const s=e[a];cm(s,n,a,t)}return n},cm=(e,t,n,a)=>{const s=e.length;for(let o=0;o<s;o++){const c=e[o];_3(c,t,n,a)}},_3=(e,t,n,a)=>{if(typeof e=="string"){b3(e,t,n);return}if(typeof e=="function"){w3(e,t,n,a);return}x3(e,t,n,a)},b3=(e,t,n)=>{const a=e===""?t:Sx(t,e);a.classGroupId=n},w3=(e,t,n,a)=>{if(P3(e)){cm(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(p3(n,e))},x3=(e,t,n,a)=>{const s=Object.entries(e),o=s.length;for(let c=0;c<o;c++){const[u,h]=s[c];cm(h,Sx(t,u),n,a)}},Sx=(e,t)=>{let n=e;const a=t.split(gu),s=a.length;for(let o=0;o<s;o++){const c=a[o];let u=n.nextPart.get(c);u||(u=xx(),n.nextPart.set(c,u)),n=u}return n},P3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,S3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const s=(o,c)=>{n[o]=c,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(o){let c=n[o];if(c!==void 0)return c;if((c=a[o])!==void 0)return s(o,c),c},set(o,c){o in n?n[o]=c:s(o,c)}}},qf="!",__=":",C3=[],b_=(e,t,n,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:s}),T3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=s=>{const o=[];let c=0,u=0,h=0,f;const m=s.length;for(let C=0;C<m;C++){const S=s[C];if(c===0&&u===0){if(S===__){o.push(s.slice(h,C)),h=C+1;continue}if(S==="/"){f=C;continue}}S==="["?c++:S==="]"?c--:S==="("?u++:S===")"&&u--}const y=o.length===0?s:s.slice(h);let k=y,w=!1;y.endsWith(qf)?(k=y.slice(0,-1),w=!0):y.startsWith(qf)&&(k=y.slice(1),w=!0);const x=f&&f>h?f-h:void 0;return b_(o,w,k,x)};if(t){const s=t+__,o=a;a=c=>c.startsWith(s)?o(c.slice(s.length)):b_(C3,!1,c,void 0,!0)}if(n){const s=a;a=o=>n({className:o,parseClassName:s})}return a},E3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let s=[];for(let o=0;o<n.length;o++){const c=n[o],u=c[0]==="[",h=t.has(c);u||h?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(c)):s.push(c)}return s.length>0&&(s.sort(),a.push(...s)),a}},A3=e=>({cache:S3(e.cacheSize),parseClassName:T3(e),sortModifiers:E3(e),...g3(e)}),R3=/\s+/,L3=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:o}=t,c=[],u=e.trim().split(R3);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 R=k.length===0?"":k.length===1?k[0]:o(k).join(":"),L=w?R+qf:R,j=L+D;if(c.indexOf(j)>-1)continue;c.push(j);const G=s(D,S);for(let K=0;K<G.length;++K){const H=G[K];c.push(L+H)}h=m+(h.length>0?" "+h:h)}return h},D3=(...e)=>{let t=0,n,a,s="";for(;t<e.length;)(n=e[t++])&&(a=Cx(n))&&(s&&(s+=" "),s+=a);return s},Cx=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=Cx(e[a]))&&(n&&(n+=" "),n+=t);return n},M3=(e,...t)=>{let n,a,s,o;const c=h=>{const f=t.reduce((m,y)=>y(m),e());return n=A3(f),a=n.cache.get,s=n.cache.set,o=u,u(h)},u=h=>{const f=a(h);if(f)return f;const m=L3(h,n);return s(h,m),m};return o=c,(...h)=>o(D3(...h))},I3=[],Nt=e=>{const t=n=>n[e]||I3;return t.isThemeGetter=!0,t},Tx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ex=/^\((?:(\w[\w-]*):)?(.+)\)$/i,N3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,O3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j3=/\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$/,U3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,B3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,F3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wa=e=>N3.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),xa=e=>!!e&&Number.isInteger(Number(e)),Jh=e=>e.endsWith("%")&&qe(e.slice(0,-1)),Fr=e=>O3.test(e),Ax=()=>!0,V3=e=>j3.test(e)&&!U3.test(e),um=()=>!1,z3=e=>B3.test(e),$3=e=>F3.test(e),H3=e=>!ke(e)&&!be(e),W3=e=>ja(e,Dx,um),ke=e=>Tx.test(e),Ja=e=>ja(e,Mx,V3),w_=e=>ja(e,J3,qe),K3=e=>ja(e,Nx,Ax),G3=e=>ja(e,Ix,um),x_=e=>ja(e,Rx,um),q3=e=>ja(e,Lx,$3),bc=e=>ja(e,Ox,z3),be=e=>Ex.test(e),mo=e=>gi(e,Mx),Y3=e=>gi(e,Ix),P_=e=>gi(e,Rx),Z3=e=>gi(e,Dx),X3=e=>gi(e,Lx),wc=e=>gi(e,Ox,!0),Q3=e=>gi(e,Nx,!0),ja=(e,t,n)=>{const a=Tx.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},gi=(e,t,n=!1)=>{const a=Ex.exec(e);return a?a[1]?t(a[1]):n:!1},Rx=e=>e==="position"||e==="percentage",Lx=e=>e==="image"||e==="url",Dx=e=>e==="length"||e==="size"||e==="bg-size",Mx=e=>e==="length",J3=e=>e==="number",Ix=e=>e==="family-name",Nx=e=>e==="number"||e==="weight",Ox=e=>e==="shadow",ej=()=>{const e=Nt("color"),t=Nt("font"),n=Nt("text"),a=Nt("font-weight"),s=Nt("tracking"),o=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"),R=Nt("animate"),L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],G=()=>[...j(),be,ke],K=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],P=()=>[be,ke,h],Z=()=>[wa,"full","auto",...P()],X=()=>[xa,"none","subgrid",be,ke],me=()=>["auto",{span:["full",xa,be,ke]},xa,be,ke],oe=()=>[xa,"auto",be,ke],Ae=()=>["auto","min","max","fr",be,ke],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ue=()=>["start","end","center","stretch","center-safe","end-safe"],le=()=>["auto",...P()],Me=()=>[wa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],W=()=>[wa,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Y=()=>[wa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],$=()=>[e,be,ke],I=()=>[...j(),P_,x_,{position:[be,ke]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",Z3,W3,{size:[be,ke]}],Re=()=>[Jh,mo,Ja],Pe=()=>["","none","full",f,be,ke],Te=()=>["",qe,mo,Ja],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,Jh,P_,x_],jt=()=>["","none",x,be,ke],Hn=()=>["none",qe,be,ke],Cr=()=>["none",qe,be,ke],pt=()=>[qe,be,ke],en=()=>[wa,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fr],breakpoint:[Fr],color:[Ax],container:[Fr],"drop-shadow":[Fr],ease:["in","out","in-out"],font:[H3],"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",wa,ke,be,S]}],container:["container"],columns:[{columns:[qe,ke,be,u]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[xa,"auto",be,ke]}],basis:[{basis:[wa,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,wa,"auto","initial","none",ke]}],grow:[{grow:["",qe,be,ke]}],shrink:[{shrink:["",qe,be,ke]}],order:[{order:[xa,"first","last","none",be,ke]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:me()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:me()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],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:le()}],mx:[{mx:le()}],my:[{my:le()}],ms:[{ms:le()}],me:[{me:le()}],mbs:[{mbs:le()}],mbe:[{mbe:le()}],mt:[{mt:le()}],mr:[{mr:le()}],mb:[{mb:le()}],ml:[{ml:le()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Me()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[u,"screen",...Me()]}],"min-w":[{"min-w":[u,"screen","none",...Me()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Me()]}],h:[{h:["screen","lh",...Me()]}],"min-h":[{"min-h":["screen","lh","none",...Me()]}],"max-h":[{"max-h":["screen","lh",...Me()]}],"font-size":[{text:["base",n,mo,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Q3,K3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jh,ke]}],"font-family":[{font:[Y3,G3,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:[s,be,ke]}],"line-clamp":[{"line-clamp":[qe,"none",be,w_]}],leading:[{leading:[o,...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:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",be,Ja]}],"text-decoration-color":[{decoration:$()}],"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"]},xa,be,ke],radial:["",be,ke],conic:[xa,be,ke]},X3,q3]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Re()}],"gradient-via-pos":[{via:Re()}],"gradient-to-pos":[{to:Re()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded: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:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...Ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,be,ke]}],"outline-w":[{outline:["",qe,mo,Ja]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",m,wc,bc]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",y,wc,bc]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[qe,Ja]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":Te()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",k,wc,bc]}],"text-shadow-color":[{"text-shadow":$()}],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":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":Ue()}],"mask-image-t-to-pos":[{"mask-t-to":Ue()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":Ue()}],"mask-image-r-to-pos":[{"mask-r-to":Ue()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":Ue()}],"mask-image-b-to-pos":[{"mask-b-to":Ue()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":Ue()}],"mask-image-l-to-pos":[{"mask-l-to":Ue()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":Ue()}],"mask-image-x-to-pos":[{"mask-x-to":Ue()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":Ue()}],"mask-image-y-to-pos":[{"mask-y-to":Ue()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[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":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[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":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask: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,wc,bc]}],"drop-shadow-color":[{"drop-shadow":$()}],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",R,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:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",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",...$()]}],"stroke-w":[{stroke:[qe,mo,Ja,w_]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},tj=M3(ej);function Tt(...e){return tj(h3(e))}const nj=O.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[O.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"}),O.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"}),O.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"}),O.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"})]}),rj=O.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:O.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"})}),aj={google:nj,github:rj},ij={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function sj(e){return ij[e]||String(e||"").replace(/-/g," ")}function oj(){Zo();const{isOpen:e,closeLoginModal:t}=N0(),{enabled:n,signedIn:a,refreshUser:s,signInWithPassword:o,signUp:c,signInWithOAuth:u,getPublicAuthConfig:h}=qo(),[f,m]=b.useState("signin"),[y,k]=b.useState(""),[w,x]=b.useState(""),[C,S]=b.useState(""),[D,R]=b.useState(!1),[L,j]=b.useState(null),[G,K]=b.useState(null),[H,P]=b.useState(!1),[Z,X]=b.useState(!0),[me,oe]=b.useState([]),[Ae,fe]=b.useState(8);b.useEffect(()=>{e&&(j(null),K(null),m("signin"),k(""),x(""),S(""),P(!1))},[e]),b.useEffect(()=>{if(!e||!n){X(!1);return}let W=!0;return(async()=>{const{data:Y,error:$}=await h();if(W){if($||!Y)oe(["google","github"]);else{const I=Array.isArray(Y.oAuthProviders)?Y.oAuthProviders:[],q=Array.isArray(Y.customOAuthProviders)?Y.customOAuthProviders:[];oe([...I,...q]),typeof Y.passwordMinLength=="number"&&Y.passwordMinLength>0&&fe(Y.passwordMinLength)}X(!1)}})(),()=>{W=!1}},[e,n,h]),b.useEffect(()=>{e&&a&&t()},[e,a,t]);const ue=b.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),le=b.useCallback(async W=>{j(null),R(!0);try{const{error:Y}=await u(W,ue);Y&&j(Y.message||String(Y))}finally{R(!1)}},[u,ue]),Me=b.useCallback(async W=>{W.preventDefault(),j(null),R(!0);try{if(f==="signup"){const{data:$,error:I}=await c({email:y.trim(),password:w,name:C.trim()||void 0});if(I){j(I.message||String(I));return}if($?.requireEmailVerification){K(Fe("login.verify_email_pending")),m("signin");return}await s();return}const{error:Y}=await o({email:y.trim(),password:w});if(Y){j(Y.message||String(Y));return}await s()}finally{R(!1)}},[f,y,w,C,c,o,s]);return b.useEffect(()=>{if(!e)return;const W=Y=>{Y.key==="Escape"&&t()};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[e,t]),n?O.jsx(aO,{children:e&&O.jsxs(Qh.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:[O.jsx(Qh.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60 ",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),O.jsxs(Qh.div,{className:"relative w-full max-w-[420px] rounded-2xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 p-6 shadow-2xl",initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.2},onClick:W=>W.stopPropagation(),children:[O.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:O.jsx(D0,{className:"h-5 w-5"})}),O.jsxs("div",{className:"text-center mb-6",children:[O.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[O.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),O.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white",children:"Token Tracker"})]}),O.jsx("p",{className:"text-sm text-oai-gray-500",children:Fe("login_modal.subtitle")})]}),G&&O.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}),L&&O.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400",role:"alert",children:L}),O.jsx("div",{className:"space-y-2.5 mb-5",children:Z?O.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900 animate-pulse"}):me.map(W=>O.jsxs("button",{type:"button",disabled:D,onClick:()=>le(W),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:[aj[W]||null,Fe("login.oauth.continue",{provider:sj(W)})]},W))}),H?O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"relative mb-5",children:[O.jsx("div",{className:"absolute inset-0 flex items-center",children:O.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),O.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:O.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")})})]}),O.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:[O.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"),j(null)},children:Fe("login.tab.sign_in")}),O.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"),j(null)},children:Fe("login.tab.sign_up")})]}),O.jsxs("form",{onSubmit:Me,className:"space-y-3",children:[f==="signup"&&O.jsxs("div",{children:[O.jsx("label",{htmlFor:"modal-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.name")}),O.jsx("input",{id:"modal-name",type:"text",autoComplete:"name",value:C,onChange:W=>S(W.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:Fe("login.field.name_placeholder")})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"modal-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.email")}),O.jsx("input",{id:"modal-email",type:"email",autoComplete:"email",required:!0,value:y,onChange:W=>k(W.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),O.jsxs("div",{children:[O.jsx("label",{htmlFor:"modal-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Fe("login.field.password")}),O.jsx("input",{id:"modal-password",type:"password",autoComplete:f==="signup"?"new-password":"current-password",required:!0,minLength:f==="signup"?Ae:void 0,value:w,onChange:W=>x(W.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),f==="signup"&&O.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Fe("login.password_hint",{min:String(Ae)})})]}),O.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")})]})]}):O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"relative mb-5",children:[O.jsx("div",{className:"absolute inset-0 flex items-center",children:O.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),O.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:O.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")})})]}),O.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:[O.jsx($D,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Fe("login_modal.continue_email")]})]})]})]})}):null}const lj={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"};function cj(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?lj:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||"").trim()}function V4(){return fi()}function uj(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 dj=300*1e3,hj=720*60*1e3;function dm(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function fj(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+hj<=t:!0}async function jx(e,t){const n=fi();if(!dm(n)||!e)return;const a=n.replace(/\/$/,""),s=Cu(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};s&&(o.apikey=s);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:o,body:JSON.stringify({period:"week",source:t})})}catch{}}async function pj(e){const t=fi();if(!dm(t)||!e)return null;const n=t.replace(/\/$/,""),a=Cu(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(s.apikey=a);const o=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",c=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:s,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:o})});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 S_(e){const{deviceToken:t,insforgeBaseUrl:n}=e,a={deviceToken:t},s=n||fi();dm(s)&&(a.insforgeBaseUrl=s.trim());const o=await Rp(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...o},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 C_(e){const t=await e();if(!t)return null;const n=t0();if(n&&!fj(n))return n;const a=await pj(t);return a?(OR(a),a):null}async function Ux(e){let t=await e();if(!t)return null;let n=await C_(async()=>t);if(!n)return t;try{return await S_({deviceToken:n.token,insforgeBaseUrl:fi()}),t}catch(a){if(!t0()||(n0(),t=await e(),!t)||(n=await C_(async()=>t),!n))throw a;return await S_({deviceToken:n.token,insforgeBaseUrl:fi()}),t}}async function mj(e){const t=jR();if(Date.now()-t<dj)return;const n=await Ux(e);n&&(r0(Date.now()),await jx(n,"cloud-sync-auto"))}async function z4(e){const t=await Ux(e);t&&(r0(Date.now()),await jx(t,"cloud-sync-now"))}function gj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function yj(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||gj(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function vj(){const e=Fn(),t=qo(),n=b.useRef(!1);b.useEffect(()=>{if(!IR()||!yj(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!NR())return;let a=!1;const s=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await mj(()=>t.getAccessToken())}catch(o){console.warn("[tokentracker] cloud usage sync:",o)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(s)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function kj(){const e=b.useContext(M0);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function _j({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function bj(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 T_(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 E_({className:e,variant:t="header",collapsed:n=!1,onAfterAction:a}){Zo();const s=t==="sidebar",{enabled:o,loading:c,signedIn:u,user:h,displayName:f}=qo(),{openLoginModal:m}=N0(),y=ku(),k=b.useMemo(()=>bj(h),[h]);if(!o)return null;if(c)return O.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 s?O.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:[O.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:O.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&O.jsx("span",{className:"truncate flex-1 text-left",children:Fe("header.auth.sign_in_aria")})]}):O.jsx("button",{type:"button",onClick:m,className:Tt("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-full px-5 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",e),"aria-label":Fe("header.auth.sign_in_aria"),children:Fe("header.auth.sign_in_aria")});const w=()=>{y("/settings"),a?.()};return O.jsx("div",{className:Tt(s?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:O.jsxs("button",{type:"button",onClick:w,className:Tt(s?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-full pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":Fe("header.auth.open_settings"),title:s&&n?f:void 0,children:[s?O.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:k?O.jsx("img",{src:k,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"}):O.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:T_(f)})}):k?O.jsx("img",{src:k,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"}):O.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:T_(f)}),s?!n&&O.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}):O.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 Yf="tt.sidebarCollapsed";function wj(){return[{id:"general",label:Fe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:ND,label:Fe("nav.usage")},{id:"limits",to:"/limits",icon:jD,label:Fe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:iM,label:Fe("nav.leaderboard")}]},{id:"tools",label:Fe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:VD,label:Fe("nav.widgets")},{id:"skills",to:"/skills",icon:ZD,label:Fe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:BD,label:Fe("nav.ip_check")}]},{id:"account",label:Fe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:eM,label:Fe("nav.settings")}]}]}function xj(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Yf)==="1"}catch{return!1}}function Pj(){const[e,t]=b.useState(xj),n=b.useCallback(()=>{t(a=>{const s=!a;try{typeof window<"u"&&window.localStorage.setItem(Yf,s?"1":"0")}catch{}return s})},[]);return b.useEffect(()=>{if(typeof window>"u")return;const a=s=>{s.key===Yf&&t(s.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function Sj(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function Cj({label:e,collapsed:t,first:n}){return t?n?null:O.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):O.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 Tj({item:e,collapsed:t,active:n,onClick:a}){const s=e.icon;return O.jsxs(bu,{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:[O.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:O.jsx(s,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&O.jsx("span",{className:"truncate",children:e.label})]})}function Ej({as:e="button",title:t,onClick:n,href:a,children:s,className:o,...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",o);return e==="a"?O.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...c,children:s}):O.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...c,children:s})}function Aj({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,a]=b.useState(null);return b.useEffect(()=>{if(typeof window>"u")return;const s=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;_j({prefersReducedMotion:s,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(o=>o.json()).then(o=>{o&&typeof o.stargazers_count=="number"&&a(o.stargazers_count)}).catch(()=>{})},[e]),O.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:[O.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:O.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"})}),O.jsx("span",{children:"Star"}),n!==null&&O.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const Rj=[{value:"light",label:"Light",Icon:L0},{value:"dark",label:"Dark",Icon:R0},{value:"system",label:"System",Icon:GD}];function Lj({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[s,o]=b.useState(!1),c=b.useRef(null),u=t==="dark"?R0:L0;return b.useEffect(()=>{if(!s)return;const h=m=>{c.current&&!c.current.contains(m.target)&&o(!1)},f=m=>{m.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[s]),O.jsxs("div",{ref:c,className:"relative",children:[O.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":s,"aria-haspopup":"menu",title:"Theme",onClick:()=>o(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:O.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),s&&O.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:Rj.map(({value:h,label:f,Icon:m})=>{const y=e===h;return O.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),o(!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:[O.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),O.jsx("span",{children:f})]},h)})})]})}function Bx({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:s,glassChrome:o=!1}){const u=Fn()?.pathname||"/",{theme:h,resolvedTheme:f,setTheme:m}=kj(),{resolvedLocale:y}=Zo(),k=b.useMemo(()=>wj(),[y]);return O.jsxs(O.Fragment,{children:[O.jsx("div",{className:Tt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:a?O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("div",{className:"flex-1 min-w-0",children:O.jsx(E_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),O.jsx("button",{type:"button",onClick:s,"aria-label":Fe("nav.close_menu"),title:Fe("nav.close_menu"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-oai-gray-500 dark:text-oai-gray-500 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-gray-900 dark:hover:text-oai-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:O.jsx(D0,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):O.jsx(E_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),O.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)=>O.jsxs("div",{className:"flex flex-col",children:[O.jsx(Cj,{label:w.label,collapsed:e,first:x===0}),O.jsx("div",{className:"flex flex-col gap-0.5",children:w.items.map(C=>O.jsx(Tj,{item:C,collapsed:e,active:Sj(u,C.to),onClick:n},C.id))})]},w.id))}),O.jsxs("div",{className:Tt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[O.jsx(Lj,{theme:h,resolvedTheme:f,onSetTheme:m,glassChrome:o}),O.jsx("div",{className:"flex items-center gap-1.5",children:!e&&O.jsx(Aj,{glassChrome:o})})]})]})}function Dj({collapsed:e,onToggleCollapsed:t}){const n=b.useMemo(()=>typeof window>"u"?!1:ar()||x0(),[]);return O.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:O.jsx(Bx,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function Mj({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?O.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[O.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),O.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:O.jsx(Bx,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function Ij({onOpenDrawer:e}){return O.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:[O.jsx(Ej,{title:Fe("nav.menu"),onClick:e,children:O.jsx(WD,{className:"h-5 w-5","aria-hidden":!0})}),O.jsxs(bu,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[O.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),O.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),O.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function Nj({children:e}){const{collapsed:t,toggle:n}=Pj(),[a,s]=b.useState(!1),o=b.useCallback(()=>s(!0),[]),c=b.useCallback(()=>s(!1),[]),u=b.useMemo(()=>typeof window>"u"?!1:ar()||x0(),[]);return O.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&&O.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),O.jsxs("div",{className:"flex-1 min-h-0 flex",children:[O.jsx(Dj,{collapsed:t,onToggleCollapsed:n}),O.jsx(Mj,{open:a,onClose:c}),O.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:O.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:[O.jsx(Ij,{onOpenDrawer:o}),O.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}const Oj=typeof window<"u"?window.location.search:"",A_=new URLSearchParams(Oj),xc=A_.get("insforge_code")||A_.get("code")||null;function jj(){Zo();const{loading:e,signedIn:t}=qo(),n=ku(),[a,s]=b.useState("processing"),[o,c]=b.useState(null),u=b.useRef(!1);b.useEffect(()=>{!xc||u.current||(u.current=!0,(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();c(!!m?.native)}catch{c(!1)}})())},[]),b.useEffect(()=>{if(o!==!0||!xc)return;s("redirecting");const f=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(xc)}`},200);return()=>clearTimeout(f)},[o]),b.useEffect(()=>{if(o!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const f=setTimeout(()=>{t||s("failed")},5e3);return()=>clearTimeout(f)},[o,e,t,n]),b.useEffect(()=>{if(!xc&&o===null){const f=setTimeout(()=>s("failed"),3e3);return()=>clearTimeout(f)}},[o]);const h=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&o!==!0&&(o===null||o===!1&&e)?O.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):O.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:O.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),O.jsx("p",{className:"text-oai-gray-400 text-sm",children:Fe("auth.callback.processing")})]}),a==="redirecting"&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:O.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:O.jsx("path",{d:"M20 6 9 17l-5-5"})})}),O.jsx("p",{className:"text-white text-sm font-medium",children:Fe("auth.callback.success")}),O.jsx("p",{className:"text-oai-gray-500 text-xs",children:Fe("auth.callback.redirecting")})]}),a==="failed"&&O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-oai-gray-300 text-sm",children:Fe("auth.callback.failed")}),O.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 Uj=b.lazy(()=>$n(()=>import("./DashboardPage-BmDIVEqD.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.DashboardPage}))),Bj=b.lazy(()=>$n(()=>import("./IpCheckPage-DYqbDHcj.js"),[])),Fj=b.lazy(()=>$n(()=>import("./LandingPage-CDrzg33z.js"),__vite__mapDeps([9,10,6])).then(e=>({default:e.LandingPage}))),Vj=b.lazy(()=>$n(()=>import("./LeaderboardPage-CdE8dhBk.js"),__vite__mapDeps([11,7,2,12,13])).then(e=>({default:e.LeaderboardPage}))),zj=b.lazy(()=>$n(()=>import("./LeaderboardProfilePage-5hMz6KaV.js"),__vite__mapDeps([14,10,12])).then(e=>({default:e.LeaderboardProfilePage}))),$j=b.lazy(()=>$n(()=>import("./LimitsPage-DwXAQxub.js"),__vite__mapDeps([15,1,16,5,8,6])).then(e=>({default:e.LimitsPage}))),Hj=b.lazy(()=>$n(()=>import("./LoginPage-jyNw3XdL.js"),[]).then(e=>({default:e.LoginPage}))),Wj=b.lazy(()=>$n(()=>import("./DevicePage-BR0iqEnH.js"),[])),Kj=b.lazy(()=>$n(()=>import("./WrappedPage-QI8eoOBi.js"),[])),Gj=b.lazy(()=>$n(()=>import("./SettingsPage-C5Dv25qs.js"),__vite__mapDeps([17,16,18,5,19,2,13,3,20])).then(e=>({default:e.SettingsPage}))),qj=b.lazy(()=>$n(()=>import("./SkillsPage-wl3RJj-l.js"),__vite__mapDeps([21,5,4,3,7,19,6,13,20])).then(e=>({default:e.SkillsPage}))),Yj=b.lazy(()=>$n(()=>import("./WidgetsPage-DRjH3Emk.js"),__vite__mapDeps([22,18,5,8,6,20,13])).then(e=>({default:e.WidgetsPage})));function Zj(){const{resolvedLocale:e}=Zo(),t=Fn(),n=qo();vj();const a=Sn(),s=b.useMemo(()=>typeof window>"u"?!1:uj(window.location.search),[]),o=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=o.replace(/\/+$/,"")||"/",C=x.match(/^\/leaderboard\/u\/([^/]+)$/i),S=C?C[1]:null,D=x==="/leaderboard"||!!S,R=!!(n.enabled&&n.signedIn),L=w||R,j=!1,G=cj(),K=b.useMemo(()=>!n.enabled||!R?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[R,n]);let H=w||a||s?"dashboard":"landing";x==="/landing"&&(H="landing"),x==="/dashboard"&&(H="dashboard"),D&&(H="dashboard");const P=x==="/limits",Z=x==="/settings",X=x==="/skills",me=x==="/widgets",oe=x==="/ip-check";(P||Z||X||me||oe)&&(H="dashboard");let Ae=Uj;S?Ae=zj:x==="/leaderboard"?Ae=Vj:P?Ae=$j:Z?Ae=Gj:X?Ae=qj:me?Ae=Yj:oe&&(Ae=Bj);const ue=!k&&(x==="/dashboard"||x==="/"||x==="/leaderboard"||P||Z||X||me||oe);let le=null;if(x==="/auth/callback"||x==="/auth/native-callback")le=O.jsx(jj,{});else if(x==="/login")le=O.jsx(Hj,{});else if(x==="/device")le=O.jsx(Wj,{});else if(x==="/wrapped")le=O.jsx(Kj,{});else if(H==="landing")le=O.jsx(Fj,{signInUrl:"/login",signUpUrl:"/login"});else{const Me=O.jsx(Ae,{baseUrl:G,auth:K,signedIn:L,sessionSoftExpired:j,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:k,publicToken:y,userId:S,signInUrl:"/login",signUpUrl:"/login"},e);ue?le=O.jsx(Nj,{children:Me}):le=Me}return O.jsx(lM,{children:O.jsx(dM,{children:O.jsxs(hM,{children:[O.jsx(b.Suspense,{fallback:null,children:le}),O.jsx(oj,{}),O.jsx(gD,{}),O.jsx(TD,{})]})})})}const Xj=$1([{path:"*",element:O.jsx(Zj,{})}]);LS.createRoot(document.getElementById("root")).render(O.jsx(Xf.StrictMode,{children:O.jsx(YL,{children:O.jsx(nD,{children:O.jsx(CL,{children:O.jsx(nT,{router:Xj})})})})}));export{T4 as $,f0 as A,Fe as B,O as C,kj as D,k4 as E,v4 as F,Qh as G,Dc as H,Io as I,du as J,oM as K,bu as L,sm as M,R4 as N,c4 as O,l4 as P,aO as Q,Xf as R,N0 as S,qo as T,m4 as U,x4 as V,Zo as W,D0 as X,uj as Y,Ea as Z,$n as _,Gt as a,_4 as a0,GR as a1,u4 as a2,d4 as a3,E4 as a4,y4 as a5,p4 as a6,Tt as a7,E_ as a8,tT as a9,tD as aA,Tp as aB,Rp as aC,CS as aD,Zf as aE,U4 as aF,ar as aG,x0 as aH,O4 as aI,B4 as aJ,j4 as aK,So as aL,Uw as aM,V2 as aN,Vf as aO,Fn as aa,ku as ab,V4 as ac,NR as ad,i4 as ae,z4 as af,s4 as ag,S4 as ah,C4 as ai,_j as aj,eM as ak,I4 as al,Qj as am,DR as an,Ip as ao,IR as ap,qv as aq,P4 as ar,L0 as as,R0 as at,GD as au,ps as av,nu as aw,Lp as ax,g4 as ay,QD as az,O0 as b,dn as c,Ia as d,yk as e,dt as f,p0 as g,Sn as h,lI as i,o4 as j,VR as k,N4 as l,gs as m,nL as n,rL as o,L4 as p,f4 as q,b as r,w4 as s,D4 as t,Np as u,M4 as v,h4 as w,yt as x,b4 as y,A4 as z};