tokentracker-cli 0.53.4 → 0.53.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/{ActivityHeatmap-BJ980nAD.js → ActivityHeatmap-BDnWv_yk.js} +1 -1
- package/dashboard/dist/assets/{Card-B6Lf_P1k.js → Card-BO93_Kxp.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-B15gBRRP.js → DashboardPage-DKpPluou.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-CxIy3ahX.js → DevicePage-jYrzCUbu.js} +1 -1
- package/dashboard/dist/assets/{DialogTitle-Cw5xQZ_R.js → DialogTitle-BrGSwxeg.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-DfuANxLc.js → FadeIn-BSo_PxQ6.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-CoQWIKv4.js → HeaderGithubStar-D9sAh-BX.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-SVk0e_8x.js → IpCheckPage-DLohSqBh.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-CPAmE-yI.js → LandingPage-BbKynLBb.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardAvatar-DHTK-O9A.js → LeaderboardAvatar-DSSPRnz1.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-o8abeuhO.js → LeaderboardPage-Mc5WToys.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfileModal-D7dt_DwK.js → LeaderboardProfileModal-Cu-V49yq.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfilePage-CVTBYIoO.js → LeaderboardProfilePage-D1YX_Dk6.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-C-yuMLq4.js → LimitsPage-DDLs1L7d.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-DcKDnOEU.js → LocalOnlyNotice-ihQwdJrn.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-CVD0_gAd.js → LoginPage-Cj2zTsA1.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-uE2yt3Ya.js → PopoverPopup-DOUhtJoZ.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-CkLEg7Xj.js → ResetPasswordPage-DAc6gcOu.js} +1 -1
- package/dashboard/dist/assets/{Select-T_lwTOia.js → Select-yCvK3pvW.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-CBG4W9IV.js → SelectItemText-DwzF1jG5.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-CfVhlxOc.js → SettingsPage-C_vuPbea.js} +1 -1
- package/dashboard/dist/assets/{SkillsPage-BI6ugQVd.js → SkillsPage-k_ibd1uy.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-C0eeE5n9.js → WidgetsPage-B7067wdE.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-M5xKJN8-.js → WrappedPage-B258374V.js} +1 -1
- package/dashboard/dist/assets/{agent-logos-Ce9EWr5X.js → agent-logos-BjjtzyqZ.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-Dm5l83hw.js → arrow-up-right-DR7w_uxq.js} +1 -1
- package/dashboard/dist/assets/{download-Bi2Iqqa-.js → download-C43yXuCW.js} +1 -1
- package/dashboard/dist/assets/{info-DQFlgzy1.js → info-DMP7TCvA.js} +1 -1
- package/dashboard/dist/assets/{main-MlcZt0XW.js → main-DUuYMHNU.js} +2 -2
- package/dashboard/dist/assets/{use-limits-display-prefs-BH_wSPHR.js → use-limits-display-prefs-Ce1InjEO.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-Bpwi96vW.js → use-native-settings-A4jazZ_y.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-DxpPWR_A.js → use-usage-limits-D0EfwqmS.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-B4tP0bFn.js → useCurrency-C1FAJw0m.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-BLDk4uMc.js → useScrollLock-CLpY0l0r.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/commands/sync.js +34 -14
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LimitsPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LimitsPage-DDLs1L7d.js","assets/use-usage-limits-D0EfwqmS.js","assets/use-limits-display-prefs-Ce1InjEO.js","assets/Card-BO93_Kxp.js","assets/FadeIn-BSo_PxQ6.js","assets/LocalOnlyNotice-ihQwdJrn.js","assets/arrow-up-right-DR7w_uxq.js","assets/download-C43yXuCW.js","assets/LeaderboardPage-Mc5WToys.js","assets/Select-yCvK3pvW.js","assets/SelectItemText-DwzF1jG5.js","assets/useScrollLock-CLpY0l0r.js","assets/useCurrency-C1FAJw0m.js","assets/LeaderboardAvatar-DSSPRnz1.js","assets/DashboardPage-DKpPluou.js","assets/ActivityHeatmap-BDnWv_yk.js","assets/info-DMP7TCvA.js","assets/DialogTitle-BrGSwxeg.js","assets/agent-logos-BjjtzyqZ.js","assets/PopoverPopup-DOUhtJoZ.js","assets/LandingPage-BbKynLBb.js","assets/HeaderGithubStar-D9sAh-BX.js","assets/LeaderboardProfilePage-D1YX_Dk6.js","assets/LeaderboardProfileModal-Cu-V49yq.js","assets/SettingsPage-C_vuPbea.js","assets/use-native-settings-A4jazZ_y.js","assets/SkillsPage-k_ibd1uy.js","assets/WidgetsPage-B7067wdE.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function K3(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(a,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>a[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Qk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function q3(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function a(){var i=!1;try{i=this instanceof a}catch{}return i?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 i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}),n}var Rf={exports:{}},nl={},Af={exports:{}},tt={};var jv;function Y3(){if(jv)return tt;jv=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function v(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function P(M,Z,_e){this.props=M,this.context=Z,this.refs=S,this.updater=_e||k}P.prototype.isReactComponent={},P.prototype.setState=function(M,Z){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,Z,"setState")},P.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function L(){}L.prototype=P.prototype;function A(M,Z,_e){this.props=M,this.context=Z,this.refs=S,this.updater=_e||k}var E=A.prototype=new L;E.constructor=A,w(E,P.prototype),E.isPureReactComponent=!0;var R=Array.isArray,j=Object.prototype.hasOwnProperty,W={current:null},F={key:!0,ref:!0,__self:!0,__source:!0};function T(M,Z,_e){var ge,pe={},ve=null,Be=null;if(Z!=null)for(ge in Z.ref!==void 0&&(Be=Z.ref),Z.key!==void 0&&(ve=""+Z.key),Z)j.call(Z,ge)&&!F.hasOwnProperty(ge)&&(pe[ge]=Z[ge]);var Ke=arguments.length-2;if(Ke===1)pe.children=_e;else if(1<Ke){for(var Ne=Array(Ke),At=0;At<Ke;At++)Ne[At]=arguments[At+2];pe.children=Ne}if(M&&M.defaultProps)for(ge in Ke=M.defaultProps,Ke)pe[ge]===void 0&&(pe[ge]=Ke[ge]);return{$$typeof:e,type:M,key:ve,ref:Be,props:pe,_owner:W.current}}function B(M,Z){return{$$typeof:e,type:M.type,key:Z,ref:M.ref,props:M.props,_owner:M._owner}}function V(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ee(M){var Z={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(_e){return Z[_e]})}var se=/\/+/g;function fe(M,Z){return typeof M=="object"&&M!==null&&M.key!=null?ee(""+M.key):Z.toString(36)}function de(M,Z,_e,ge,pe){var ve=typeof M;(ve==="undefined"||ve==="boolean")&&(M=null);var Be=!1;if(M===null)Be=!0;else switch(ve){case"string":case"number":Be=!0;break;case"object":switch(M.$$typeof){case e:case t:Be=!0}}if(Be)return Be=M,pe=pe(Be),M=ge===""?"."+fe(Be,0):ge,R(pe)?(_e="",M!=null&&(_e=M.replace(se,"$&/")+"/"),de(pe,Z,_e,"",function(At){return At})):pe!=null&&(V(pe)&&(pe=B(pe,_e+(!pe.key||Be&&Be.key===pe.key?"":(""+pe.key).replace(se,"$&/")+"/")+M)),Z.push(pe)),1;if(Be=0,ge=ge===""?".":ge+":",R(M))for(var Ke=0;Ke<M.length;Ke++){ve=M[Ke];var Ne=ge+fe(ve,Ke);Be+=de(ve,Z,_e,Ne,pe)}else if(Ne=v(M),typeof Ne=="function")for(M=Ne.call(M),Ke=0;!(ve=M.next()).done;)ve=ve.value,Ne=ge+fe(ve,Ke++),Be+=de(ve,Z,_e,Ne,pe);else if(ve==="object")throw Z=String(M),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return Be}function he(M,Z,_e){if(M==null)return M;var ge=[],pe=0;return de(M,ge,"","",function(ve){return Z.call(_e,ve,pe++)}),ge}function ie(M){if(M._status===-1){var Z=M._result;Z=Z(),Z.then(function(_e){(M._status===0||M._status===-1)&&(M._status=1,M._result=_e)},function(_e){(M._status===0||M._status===-1)&&(M._status=2,M._result=_e)}),M._status===-1&&(M._status=0,M._result=Z)}if(M._status===1)return M._result.default;throw M._result}var X={current:null},q={transition:null},J={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:q,ReactCurrentOwner:W};function H(){throw Error("act(...) is not supported in production builds of React.")}return tt.Children={map:he,forEach:function(M,Z,_e){he(M,function(){Z.apply(this,arguments)},_e)},count:function(M){var Z=0;return he(M,function(){Z++}),Z},toArray:function(M){return he(M,function(Z){return Z})||[]},only:function(M){if(!V(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},tt.Component=P,tt.Fragment=n,tt.Profiler=i,tt.PureComponent=A,tt.StrictMode=a,tt.Suspense=h,tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,tt.act=H,tt.cloneElement=function(M,Z,_e){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ge=w({},M.props),pe=M.key,ve=M.ref,Be=M._owner;if(Z!=null){if(Z.ref!==void 0&&(ve=Z.ref,Be=W.current),Z.key!==void 0&&(pe=""+Z.key),M.type&&M.type.defaultProps)var Ke=M.type.defaultProps;for(Ne in Z)j.call(Z,Ne)&&!F.hasOwnProperty(Ne)&&(ge[Ne]=Z[Ne]===void 0&&Ke!==void 0?Ke[Ne]:Z[Ne])}var Ne=arguments.length-2;if(Ne===1)ge.children=_e;else if(1<Ne){Ke=Array(Ne);for(var At=0;At<Ne;At++)Ke[At]=arguments[At+2];ge.children=Ke}return{$$typeof:e,type:M.type,key:pe,ref:ve,props:ge,_owner:Be}},tt.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:o,_context:M},M.Consumer=M},tt.createElement=T,tt.createFactory=function(M){var Z=T.bind(null,M);return Z.type=M,Z},tt.createRef=function(){return{current:null}},tt.forwardRef=function(M){return{$$typeof:u,render:M}},tt.isValidElement=V,tt.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:ie}},tt.memo=function(M,Z){return{$$typeof:f,type:M,compare:Z===void 0?null:Z}},tt.startTransition=function(M){var Z=q.transition;q.transition={};try{M()}finally{q.transition=Z}},tt.unstable_act=H,tt.useCallback=function(M,Z){return X.current.useCallback(M,Z)},tt.useContext=function(M){return X.current.useContext(M)},tt.useDebugValue=function(){},tt.useDeferredValue=function(M){return X.current.useDeferredValue(M)},tt.useEffect=function(M,Z){return X.current.useEffect(M,Z)},tt.useId=function(){return X.current.useId()},tt.useImperativeHandle=function(M,Z,_e){return X.current.useImperativeHandle(M,Z,_e)},tt.useInsertionEffect=function(M,Z){return X.current.useInsertionEffect(M,Z)},tt.useLayoutEffect=function(M,Z){return X.current.useLayoutEffect(M,Z)},tt.useMemo=function(M,Z){return X.current.useMemo(M,Z)},tt.useReducer=function(M,Z,_e){return X.current.useReducer(M,Z,_e)},tt.useRef=function(M){return X.current.useRef(M)},tt.useState=function(M){return X.current.useState(M)},tt.useSyncExternalStore=function(M,Z,_e){return X.current.useSyncExternalStore(M,Z,_e)},tt.useTransition=function(){return X.current.useTransition()},tt.version="18.3.1",tt}var Uv;function zl(){return Uv||(Uv=1,Af.exports=Y3()),Af.exports}var zv;function Z3(){if(zv)return nl;zv=1;var e=zl(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(u,h,f){var p,g={},v=null,k=null;f!==void 0&&(v=""+f),h.key!==void 0&&(v=""+h.key),h.ref!==void 0&&(k=h.ref);for(p in h)a.call(h,p)&&!o.hasOwnProperty(p)&&(g[p]=h[p]);if(u&&u.defaultProps)for(p in h=u.defaultProps,h)g[p]===void 0&&(g[p]=h[p]);return{$$typeof:t,type:u,key:v,ref:k,props:g,_owner:i.current}}return nl.Fragment=n,nl.jsx=l,nl.jsxs=l,nl}var Fv;function X3(){return Fv||(Fv=1,Rf.exports=Z3()),Rf.exports}var C=X3(),b=zl();const Zs=Qk(b),e1=K3({__proto__:null,default:Zs},[b]);var iu={},Lf={exports:{}},Un={},Df={exports:{}},If={};var Bv;function J3(){return Bv||(Bv=1,(function(e){function t(q,J){var H=q.length;q.push(J);e:for(;0<H;){var M=H-1>>>1,Z=q[M];if(0<i(Z,J))q[M]=J,q[H]=Z,H=M;else break e}}function n(q){return q.length===0?null:q[0]}function a(q){if(q.length===0)return null;var J=q[0],H=q.pop();if(H!==J){q[0]=H;e:for(var M=0,Z=q.length,_e=Z>>>1;M<_e;){var ge=2*(M+1)-1,pe=q[ge],ve=ge+1,Be=q[ve];if(0>i(pe,H))ve<Z&&0>i(Be,pe)?(q[M]=Be,q[ve]=H,M=ve):(q[M]=pe,q[ge]=H,M=ge);else if(ve<Z&&0>i(Be,H))q[M]=Be,q[ve]=H,M=ve;else break e}}return J}function i(q,J){var H=q.sortIndex-J.sortIndex;return H!==0?H:q.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var h=[],f=[],p=1,g=null,v=3,k=!1,w=!1,S=!1,P=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(q){for(var J=n(f);J!==null;){if(J.callback===null)a(f);else if(J.startTime<=q)a(f),J.sortIndex=J.expirationTime,t(h,J);else break;J=n(f)}}function R(q){if(S=!1,E(q),!w)if(n(h)!==null)w=!0,ie(j);else{var J=n(f);J!==null&&X(R,J.startTime-q)}}function j(q,J){w=!1,S&&(S=!1,L(T),T=-1),k=!0;var H=v;try{for(E(J),g=n(h);g!==null&&(!(g.expirationTime>J)||q&&!ee());){var M=g.callback;if(typeof M=="function"){g.callback=null,v=g.priorityLevel;var Z=M(g.expirationTime<=J);J=e.unstable_now(),typeof Z=="function"?g.callback=Z:g===n(h)&&a(h),E(J)}else a(h);g=n(h)}if(g!==null)var _e=!0;else{var ge=n(f);ge!==null&&X(R,ge.startTime-J),_e=!1}return _e}finally{g=null,v=H,k=!1}}var W=!1,F=null,T=-1,B=5,V=-1;function ee(){return!(e.unstable_now()-V<B)}function se(){if(F!==null){var q=e.unstable_now();V=q;var J=!0;try{J=F(!0,q)}finally{J?fe():(W=!1,F=null)}}else W=!1}var fe;if(typeof A=="function")fe=function(){A(se)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,he=de.port2;de.port1.onmessage=se,fe=function(){he.postMessage(null)}}else fe=function(){P(se,0)};function ie(q){F=q,W||(W=!0,fe())}function X(q,J){T=P(function(){q(e.unstable_now())},J)}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(q){q.callback=null},e.unstable_continueExecution=function(){w||k||(w=!0,ie(j))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(q){switch(v){case 1:case 2:case 3:var J=3;break;default:J=v}var H=v;v=J;try{return q()}finally{v=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,J){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var H=v;v=q;try{return J()}finally{v=H}},e.unstable_scheduleCallback=function(q,J,H){var M=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?M+H:M):H=M,q){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=H+Z,q={id:p++,callback:J,priorityLevel:q,startTime:H,expirationTime:Z,sortIndex:-1},H>M?(q.sortIndex=H,t(f,q),n(h)===null&&q===n(f)&&(S?(L(T),T=-1):S=!0,X(R,H-M))):(q.sortIndex=Z,t(h,q),w||k||(w=!0,ie(j))),q},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(q){var J=v;return function(){var H=v;v=J;try{return q.apply(this,arguments)}finally{v=H}}}})(If)),If}var Vv;function Q3(){return Vv||(Vv=1,Df.exports=J3()),Df.exports}var Hv;function eC(){if(Hv)return Un;Hv=1;var e=zl(),t=Q3();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,i={};function o(r,s){l(r,s),l(r+"Capture",s)}function l(r,s){for(i[r]=s,r=0;r<s.length;r++)a.add(s[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]*$/,p={},g={};function v(r){return h.call(g,r)?!0:h.call(p,r)?!1:f.test(r)?g[r]=!0:(p[r]=!0,!1)}function k(r,s,c,d){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:c!==null?!c.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function w(r,s,c,d){if(s===null||typeof s>"u"||k(r,s,c,d))return!0;if(d)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(r,s,c,d,m,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=m,this.mustUseProperty=c,this.propertyName=r,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){P[r]=new S(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];P[s]=new S(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){P[r]=new S(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){P[r]=new S(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){P[r]=new S(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){P[r]=new S(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){P[r]=new S(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){P[r]=new S(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){P[r]=new S(r,5,!1,r.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function A(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 s=r.replace(L,A);P[s]=new S(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(L,A);P[s]=new S(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(L,A);P[s]=new S(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){P[r]=new S(r,1,!1,r.toLowerCase(),null,!1,!1)}),P.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){P[r]=new S(r,1,!1,r.toLowerCase(),null,!0,!0)});function E(r,s,c,d){var m=P.hasOwnProperty(s)?P[s]:null;(m!==null?m.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(w(s,c,m,d)&&(c=null),d||m===null?v(s)&&(c===null?r.removeAttribute(s):r.setAttribute(s,""+c)):m.mustUseProperty?r[m.propertyName]=c===null?m.type===3?!1:"":c:(s=m.attributeName,d=m.attributeNamespace,c===null?r.removeAttribute(s):(m=m.type,c=m===3||m===4&&c===!0?"":""+c,d?r.setAttributeNS(d,s,c):r.setAttribute(s,c))))}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,j=Symbol.for("react.element"),W=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),ee=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),he=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),q=Symbol.iterator;function J(r){return r===null||typeof r!="object"?null:(r=q&&r[q]||r["@@iterator"],typeof r=="function"?r:null)}var H=Object.assign,M;function Z(r){if(M===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
|
|
3
3
|
`+M+r}var _e=!1;function ge(r,s){if(!r||_e)return"";_e=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Y){var d=Y}Reflect.construct(r,[],s)}else{try{s.call()}catch(Y){d=Y}r.call(s.prototype)}else{try{throw Error()}catch(Y){d=Y}r()}}catch(Y){if(Y&&d&&typeof Y.stack=="string"){for(var m=Y.stack.split(`
|
|
4
4
|
`),y=d.stack.split(`
|
|
@@ -1020,4 +1020,4 @@ skills.usage.disclaimer,ui,SkillsPage,SkillDetailPanel,usage_disclaimer,"Counts
|
|
|
1020
1020
|
${R}px !important;
|
|
1021
1021
|
${j}px !important;
|
|
1022
1022
|
}
|
|
1023
|
-
`),()=>{u.current?.removeAttribute("data-motion-pop-id"),F.contains(W)&&F.removeChild(W)}},[t]),C.jsx(VI,{isPresent:t,childRef:u,sizeRef:h,pop:o,children:o===!1?e:b.cloneElement(e,{ref:g})})}const $I=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:i,presenceAffectsLayout:o,mode:l,anchorX:u,anchorY:h,root:f})=>{const p=kg(WI),g=b.useId();let v=!0,k=b.useMemo(()=>(v=!1,{id:g,initial:t,isPresent:n,custom:i,onExitComplete:w=>{p.set(w,!0);for(const S of p.values())if(!S)return;a&&a()},register:w=>(p.set(w,!1),()=>p.delete(w))}),[n,p,a]);return o&&v&&(k={...k}),b.useMemo(()=>{p.forEach((w,S)=>p.set(S,!1))},[n]),b.useEffect(()=>{!n&&!p.size&&a&&a()},[n]),e=C.jsx(HI,{pop:l==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:f,children:e}),C.jsx(Hd.Provider,{value:k,children:e})};function WI(){return new Map}function Hx(e=!0){const t=b.useContext(Hd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:i}=t,o=b.useId();b.useEffect(()=>{if(e)return i(o)},[e]);const l=b.useCallback(()=>e&&a&&a(o),[o,a,e]);return!n&&a?[!1,l]:[!0]}const mu=e=>e.key||"";function lk(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const $x=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:i=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",anchorY:h="top",root:f})=>{const[p,g]=Hx(l),v=b.useMemo(()=>lk(e),[e]),k=l&&!p?[]:v.map(mu),w=b.useRef(!0),S=b.useRef(v),P=kg(()=>new Map),L=b.useRef(new Set),[A,E]=b.useState(v),[R,j]=b.useState(v);y2(()=>{w.current=!1,S.current=v;for(let T=0;T<R.length;T++){const B=mu(R[T]);k.includes(B)?(P.delete(B),L.current.delete(B)):P.get(B)!==!0&&P.set(B,!1)}},[R,k.length,k.join("-")]);const W=[];if(v!==A){let T=[...v];for(let B=0;B<R.length;B++){const V=R[B],ee=mu(V);k.includes(ee)||(T.splice(B,0,V),W.push(V))}return o==="wait"&&W.length&&(T=W),j(lk(T)),E(v),null}const{forceRender:F}=b.useContext(_g);return C.jsx(C.Fragment,{children:R.map(T=>{const B=mu(T),V=l&&!p?!1:v===R||k.includes(B),ee=()=>{if(L.current.has(B))return;if(P.has(B))L.current.add(B),P.set(B,!0);else return;let se=!0;P.forEach(fe=>{fe||(se=!1)}),se&&(F?.(),j(S.current),l&&g?.(),a&&a())};return C.jsx($I,{isPresent:V,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:f,onExitComplete:V?void 0:ee,anchorX:u,anchorY:h,children:T},B)})})},Wx=b.createContext({strict:!1}),ck={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 uk=!1;function GI(){if(uk)return;const e={};for(const t in ck)e[t]={isEnabled:n=>ck[t].some(a=>!!n[a])};bx(e),uk=!0}function Gx(){return GI(),AD()}function KI(e){const t=Gx();for(const n in e)t[n]={...t[n],...e[n]};bx(t)}const qI=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 Sd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qI.has(e)}let Kx=e=>!Sd(e);function YI(e){typeof e=="function"&&(Kx=t=>t.startsWith("on")?!Sd(t):e(t))}try{YI(require("@emotion/is-prop-valid").default)}catch{}function ZI(e,t,n){const a={};for(const i in e)i==="values"&&typeof e.values=="object"||dn(e[i])||(Kx(i)||n===!0&&Sd(i)||!t&&!Sd(i)||e.draggable&&i.startsWith("onDrag"))&&(a[i]=e[i]);return a}const Kd=b.createContext({});function XI(e,t){if(Gd(e)){const{initial:n,animate:a}=e;return{initial:n===!1||Ol(n)?n:void 0,animate:Ol(a)?a:void 0}}return e.inherit!==!1?t:{}}function JI(e){const{initial:t,animate:n}=XI(e,b.useContext(Kd));return b.useMemo(()=>({initial:t,animate:n}),[dk(t),dk(n)])}function dk(e){return Array.isArray(e)?e.join(" "):e}const Kg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qx(e,t,n){for(const a in t)!dn(t[a])&&!Cx(a,n)&&(e[a]=t[a])}function QI({transformTemplate:e},t){return b.useMemo(()=>{const n=Kg();return $g(n,t,e),Object.assign({},n.vars,n.style)},[t])}function eM(e,t){const n=e.style||{},a={};return qx(a,n,e),Object.assign(a,QI(e,t)),a}function tM(e,t){const n={},a=eM(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 Yx=()=>({...Kg(),attrs:{}});function nM(e,t,n,a){const i=b.useMemo(()=>{const o=Yx();return Tx(o,t,Rx(a),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};qx(o,e.style,e),i.style={...o,...i.style}}return i}const aM=["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 qg(e){return typeof e!="string"||e.includes("-")?!1:!!(aM.indexOf(e)>-1||/[A-Z]/u.test(e))}function rM(e,t,n,{latestValues:a},i,o=!1,l){const h=(l??qg(e)?nM:tM)(t,a,i,e),f=ZI(t,typeof e=="string",o),p=e!==b.Fragment?{...f,...h,ref:n}:{},{children:g}=t,v=b.useMemo(()=>dn(g)?g.get():g,[g]);return b.createElement(e,{...p,children:v})}function iM({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,i){return{latestValues:sM(n,a,i,e),renderState:t()}}function sM(e,t,n,a){const i={},o=a(e,{});for(const v in o)i[v]=Wu(o[v]);let{initial:l,animate:u}=e;const h=Gd(e),f=yx(e);t&&f&&!h&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const g=p?u:l;if(g&&typeof g!="boolean"&&!Wd(g)){const v=Array.isArray(g)?g:[g];for(let k=0;k<v.length;k++){const w=Og(e,v[k]);if(w){const{transitionEnd:S,transition:P,...L}=w;for(const A in L){let E=L[A];if(Array.isArray(E)){const R=p?E.length-1:0;E=E[R]}E!==null&&(i[A]=E)}for(const A in S)i[A]=S[A]}}}return i}const Zx=e=>(t,n)=>{const a=b.useContext(Kd),i=b.useContext(Hd),o=()=>iM(e,t,a,i);return n?o():kg(o)},oM=Zx({scrapeMotionValuesFromProps:Wg,createRenderState:Kg}),lM=Zx({scrapeMotionValuesFromProps:Ax,createRenderState:Yx}),cM=Symbol.for("motionComponentSymbol");function uM(e,t,n){const a=b.useRef(n);b.useInsertionEffect(()=>{a.current=n});const i=b.useRef(null);return b.useCallback(o=>{o&&e.onMount?.(o),t&&(o?t.mount(o):t.unmount());const l=a.current;if(typeof l=="function")if(o){const u=l(o);typeof u=="function"&&(i.current=u)}else i.current?(i.current(),i.current=null):l(o);else l&&(l.current=o)},[t])}const Xx=b.createContext({});function Bs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function dM(e,t,n,a,i,o){const{visualElement:l}=b.useContext(Kd),u=b.useContext(Wx),h=b.useContext(Hd),f=b.useContext(Gg),p=f.reducedMotion,g=f.skipAnimations,v=b.useRef(null),k=b.useRef(!1);a=a||u.renderer,!v.current&&a&&(v.current=a(e,{visualState:t,parent:l,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:p,skipAnimations:g,isSVG:o}),k.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const w=v.current,S=b.useContext(Xx);w&&!w.projection&&i&&(w.type==="html"||w.type==="svg")&&hM(v.current,n,i,S);const P=b.useRef(!1);b.useInsertionEffect(()=>{w&&P.current&&w.update(n,h)});const L=n[ix],A=b.useRef(!!L&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(L)&&window.MotionHasOptimisedAnimation?.(L));return y2(()=>{k.current=!0,w&&(P.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),A.current&&w.animationState&&w.animationState.animateChanges())}),b.useEffect(()=>{w&&(!A.current&&w.animationState&&w.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(L)}),A.current=!1),w.enteringChildren=void 0)}),w}function hM(e,t,n,a){const{layoutId:i,layout:o,drag:l,dragConstraints:u,layoutScroll:h,layoutRoot:f,layoutAnchor:p,layoutCrossfade:g}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Jx(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!l||u&&Bs(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:a,crossfade:g,layoutScroll:h,layoutRoot:f,layoutAnchor:p})}function Jx(e){if(e)return e.options.allowProjection!==!1?e.projection:Jx(e.parent)}function op(e,{forwardMotionProps:t=!1,type:n}={},a,i){a&&KI(a);const o=n?n==="svg":qg(e),l=o?lM:oM;function u(f,p){let g;const v={...b.useContext(Gg),...f,layoutId:fM(f)},{isStatic:k}=v,w=JI(f),S=l(f,k);if(!k&&typeof window<"u"){pM();const P=mM(v);g=P.MeasureLayout,w.visualElement=dM(e,S,v,i,P.ProjectionNode,o)}return C.jsxs(Kd.Provider,{value:w,children:[g&&w.visualElement?C.jsx(g,{visualElement:w.visualElement,...v}):null,rM(e,f,uM(S,w.visualElement,p),S,k,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=b.forwardRef(u);return h[cM]=e,h}function fM({layoutId:e}){const t=b.useContext(_g).id;return t&&e!==void 0?t+"-"+e:e}function pM(e,t){b.useContext(Wx).strict}function mM(e){const t=Gx(),{drag:n,layout:a}=t;if(!n&&!a)return{};const i={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function gM(e,t){if(typeof Proxy>"u")return op;const n=new Map,a=(o,l)=>op(o,l,e,t),i=(o,l)=>a(o,l);return new Proxy(i,{get:(o,l)=>l==="create"?a:(n.has(l)||n.set(l,op(l,void 0,e,t)),n.get(l))})}const yM=(e,t)=>t.isSVG??qg(e)?new KD(t):new BD(t,{allowProjection:e!==b.Fragment});class vM extends pi{constructor(t){super(t),t.animationState||(t.animationState=JD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Wd(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 bM=0;class _M extends pi{constructor(){super(...arguments),this.id=bM++,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:l}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const u=Gi(this.node,o,l);if(u){const{transition:h,transitionEnd:f,...p}=u;for(const g in p)this.node.getValue(g)?.jump(p[g])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 kM={animation:{Feature:vM},exit:{Feature:_M}};function Ql(e){return{point:{x:e.pageX,y:e.pageY}}}const wM=e=>t=>zg(t)&&e(t,Ql(t));function Sl(e,t,n,a){return jl(e,t,wM(n),a)}const Qx=({current:e})=>e?e.ownerDocument.defaultView:null,hk=(e,t)=>Math.abs(e-t);function xM(e,t){const n=hk(e.x,t.x),a=hk(e.y,t.y);return Math.sqrt(n**2+a**2)}const fk=new Set(["auto","scroll"]);class eP{constructor(t,n,{transformPagePoint:a,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:l=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=k=>{this.handleScroll(k.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=gu(this.lastRawMoveEventInfo,this.transformPagePoint));const k=lp(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,S=xM(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!S)return;const{point:P}=k,{timestamp:L}=un;this.history.push({...P,timestamp:L});const{onStart:A,onMove:E}=this.handlers;w||(A&&A(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,k)},this.handlePointerMove=(k,w)=>{this.lastMoveEvent=k,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=gu(w,this.transformPagePoint),_t.update(this.updatePoint,!0)},this.handlePointerUp=(k,w)=>{this.end();const{onEnd:S,onSessionEnd:P,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=lp(k.type==="pointercancel"?this.lastMoveEventInfo:gu(w,this.transformPagePoint),this.history);this.startEvent&&S&&S(k,A),P&&P(k,A)},!zg(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=l,this.contextWindow=i||window;const h=Ql(t),f=gu(h,this.transformPagePoint),{point:p}=f,{timestamp:g}=un;this.history=[{...p,timestamp:g}];const{onSessionStart:v}=n;v&&v(t,lp(f,this.history)),this.removeListeners=Zl(Sl(this.contextWindow,"pointermove",this.handlePointerMove),Sl(this.contextWindow,"pointerup",this.handlePointerUp),Sl(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(fk.has(a.overflowX)||fk.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,i=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:i.x-n.x,y:i.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,i),_t.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hi(this.updatePoint)}}function gu(e,t){return t?{point:t(e.point)}:e}function pk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function lp({point:e},t){return{point:e,delta:pk(e,tP(t)),offset:pk(e,PM(t)),velocity:SM(t,.1)}}function PM(e){return e[0]}function tP(e){return e[e.length-1]}function SM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const i=tP(e);for(;n>=0&&(a=e[n],!(i.timestamp-a.timestamp>Yn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&i.timestamp-a.timestamp>Yn(t)*2&&(a=e[1]);const o=oa(i.timestamp-a.timestamp);if(o===0)return{x:0,y:0};const l={x:(i.x-a.x)/o,y:(i.y-a.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function CM(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?bt(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?bt(n,e,a.max):Math.min(e,n)),e}function mk(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 TM(e,{top:t,left:n,bottom:a,right:i}){return{x:mk(e.x,n,i),y:mk(e.y,t,a)}}function gk(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 EM(e,t){return{x:gk(e.x,t.x),y:gk(e.y,t.y)}}function RM(e,t){let n=.5;const a=Tn(e),i=Tn(t);return i>a?n=Ml(t.min,t.max-a,e.min):a>i&&(n=Ml(e.min,e.max-i,t.min)),rr(0,1,n)}function AM(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 km=.35;function LM(e=km){return e===!1?e=0:e===!0&&(e=km),{x:yk(e,"left","right"),y:yk(e,"top","bottom")}}function yk(e,t,n){return{min:vk(e,t),max:vk(e,n)}}function vk(e,t){return typeof e=="number"?e:e[t]||0}const DM=new WeakMap;class IM{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=Qt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=g=>{n&&this.snapToCursor(Ql(g).point),this.stopAnimation()},l=(g,v)=>{const{drag:k,dragPropagation:w,onDragStart:S}=this.getProps();if(k&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=oD(k),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ka(L=>{let A=this.getAxisMotionValue(L).get()||0;if(Ja.test(A)){const{projection:E}=this.visualElement;if(E&&E.layout){const R=E.layout.layoutBox[L];R&&(A=Tn(R)*(parseFloat(A)/100))}}this.originPoint[L]=A}),S&&_t.update(()=>S(g,v),!1,!0),hm(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},u=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v;const{dragPropagation:k,dragDirectionLock:w,onDirectionLock:S,onDrag:P}=this.getProps();if(!k&&!this.openDragLock)return;const{offset:L}=v;if(w&&this.currentDirection===null){this.currentDirection=NM(L),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",v.point,L),this.updateAxis("y",v.point,L),this.visualElement.render(),P&&_t.update(()=>P(g,v),!1,!0)},h=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v,this.stop(g,v),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:g}=this.getProps();(g||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new eP(t,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:a,contextWindow:Qx(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!a)return;const{velocity:l}=i;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&_t.postRender(()=>u(a,i))}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:i}=this.getProps();if(!a||!yu(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(l=CM(l,this.constraints[t],this.elastic[t])),o.set(l)}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,i=this.constraints;t&&Bs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=TM(a.layoutBox,t):this.constraints=!1,this.elastic=LM(n),i!==this.constraints&&!Bs(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&Ka(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=AM(a.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Bs(t))return!1;const a=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const o=ND(a,i.root,this.visualElement.getTransformPagePoint());let l=EM(i.layout.layoutBox,o);if(n){const u=n(DD(l));this.hasMutatedConstraints=!!u,u&&(l=kx(u))}return l}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:i,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},f=Ka(p=>{if(!yu(p,n,this.currentDirection))return;let g=h&&h[p]||{};(l===!0||l===p)&&(g={min:0,max:0});const v=i?200:1e6,k=i?40:1e7,w={type:"inertia",velocity:a?t[p]:0,bounceStiffness:v,bounceDamping:k,timeConstant:750,restDelta:1,restSpeed:10,...o,...g};return this.startAxisValueAnimation(p,w)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return hm(this.visualElement,t),a.start(Ng(t,a,0,n,this.visualElement,!1))}stopAnimation(){Ka(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Ka(n=>{const{drag:a}=this.getProps();if(!yu(n,a,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:u}=i.layout.layoutBox[n],h=o.get()||0;o.set(t[n]-bt(l,u,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!Bs(n)||!a||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ka(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const h=u.get();i[l]=RM({min:h,max:h},this.constraints[l])}});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(),Ka(l=>{if(!yu(l,t,null))return;const u=this.getAxisMotionValue(l),{min:h,max:f}=this.constraints[l];u.set(bt(h,f,i[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;DM.set(this.visualElement,this);const t=this.visualElement.current,n=Sl(t,"pointerdown",f=>{const{drag:p,dragListener:g=!0}=this.getProps(),v=f.target,k=v!==t&&fD(v);p&&g&&!k&&this.start(f)});let a;const i=()=>{const{dragConstraints:f}=this.getProps();Bs(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=MM(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,l=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_t.read(i);const u=jl(window,"resize",()=>this.scalePositionWithinConstraints()),h=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:p})=>{this.isDragging&&p&&(Ka(g=>{const v=this.getAxisMotionValue(g);v&&(this.originPoint[g]+=f[g].translate,v.set(v.get()+f[g].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),h&&h(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:l=km,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:i,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function bk(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function MM(e,t,n){const a=C_(e,bk(n)),i=C_(t,bk(n));return()=>{a(),i()}}function yu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function NM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class OM extends pi{constructor(t){super(t),this.removeGroupControls=ca,this.removeListeners=ca,this.controls=new IM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ca}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 cp=e=>(t,n)=>{e&&_t.update(()=>e(t,n),!1,!0)};class jM extends pi{constructor(){super(...arguments),this.removePointerDownListener=ca}onPointerDown(t){this.session=new eP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Qx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:i}=this.node.getProps();return{onSessionStart:cp(t),onStart:cp(n),onMove:cp(a),onEnd:(o,l)=>{delete this.session,i&&_t.postRender(()=>i(o,l))}}}mount(){this.removePointerDownListener=Sl(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 up=!1;class UM extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:i}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),a&&a.register&&i&&a.register(o),up&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Gu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:i,isPresent:o}=this.props,{projection:l}=a;return l&&(l.isPresent=o,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),up=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||_t.postRender(()=>{const u=l.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(),Ug.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:i}=t;up=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),a&&a.deregister&&a.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nP(e){const[t,n]=Hx(),a=b.useContext(_g);return C.jsx(UM,{...e,layoutGroup:a,switchLayoutGroup:b.useContext(Xx),isPresent:t,safeToRemove:n})}const zM={pan:{Feature:jM},drag:{Feature:OM,ProjectionNode:Vx,MeasureLayout:nP}};function _k(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=a[i];o&&_t.postRender(()=>o(t,Ql(t)))}class FM extends pi{mount(){const{current:t}=this.node;t&&(this.unmount=cD(t,(n,a)=>(_k(this.node,a,"Start"),i=>_k(this.node,i,"End"))))}unmount(){}}class BM extends pi{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=Zl(jl(this.node.current,"focus",()=>this.onFocus()),jl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kk(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 i="onTap"+(n==="End"?"":n),o=a[i];o&&_t.postRender(()=>o(t,Ql(t)))}class VM extends pi{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=mD(t,(i,o)=>(kk(this.node,o,"Start"),(l,{success:u})=>kk(this.node,l,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const wm=new WeakMap,dp=new WeakMap,HM=e=>{const t=wm.get(e.target);t&&t(e)},$M=e=>{e.forEach(HM)};function WM({root:e,...t}){const n=e||document;dp.has(n)||dp.set(n,{});const a=dp.get(n),i=JSON.stringify(t);return a[i]||(a[i]=new IntersectionObserver($M,{root:e,...t})),a[i]}function GM(e,t,n){const a=WM(t);return wm.set(e,n),a.observe(e),()=>{wm.delete(e),a.unobserve(e)}}const KM={some:0,all:1};class qM extends pi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:i="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:a,threshold:typeof i=="number"?i:KM[i]},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:p,onViewportLeave:g}=this.node.getProps(),v=f?p:g;v&&v(h)};this.stopObserver=GM(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(YM(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function YM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ZM={inView:{Feature:qM},tap:{Feature:VM},focus:{Feature:BM},hover:{Feature:FM}},XM={layout:{ProjectionNode:Vx,MeasureLayout:nP}},JM={...kM,...ZM,...zM,...XM},Cl=gM(JM,yM);function QM(){!Hg.current&&vx();const[e]=b.useState(kd.current);return e}function aP(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=aP(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function e9(){for(var e,t,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=aP(e))&&(a&&(a+=" "),a+=t);return a}const t9=(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},n9=(e,t)=>({classGroupId:e,validator:t}),rP=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Cd="-",wk=[],a9="arbitrary..",r9=e=>{const t=s9(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return i9(l);const u=l.split(Cd),h=u[0]===""&&u.length>1?1:0;return iP(u,h,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const h=a[l],f=n[l];return h?f?t9(f,h):h:f||wk}return n[l]||wk}}},iP=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=iP(e,t+1,o);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(Cd):e.slice(t).join(Cd),h=l.length;for(let f=0;f<h;f++){const p=l[f];if(p.validator(u))return p.classGroupId}},i9=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?a9+a:void 0})(),s9=e=>{const{theme:t,classGroups:n}=e;return o9(n,t)},o9=(e,t)=>{const n=rP();for(const a in e){const i=e[a];Yg(i,n,a,t)}return n},Yg=(e,t,n,a)=>{const i=e.length;for(let o=0;o<i;o++){const l=e[o];l9(l,t,n,a)}},l9=(e,t,n,a)=>{if(typeof e=="string"){c9(e,t,n);return}if(typeof e=="function"){u9(e,t,n,a);return}d9(e,t,n,a)},c9=(e,t,n)=>{const a=e===""?t:sP(t,e);a.classGroupId=n},u9=(e,t,n,a)=>{if(h9(e)){Yg(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(n9(n,e))},d9=(e,t,n,a)=>{const i=Object.entries(e),o=i.length;for(let l=0;l<o;l++){const[u,h]=i[l];Yg(h,sP(t,u),n,a)}},sP=(e,t)=>{let n=e;const a=t.split(Cd),i=a.length;for(let o=0;o<i;o++){const l=a[o];let u=n.nextPart.get(l);u||(u=rP(),n.nextPart.set(l,u)),n=u}return n},h9=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,f9=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const i=(o,l)=>{n[o]=l,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=a[o])!==void 0)return i(o,l),l},set(o,l){o in n?n[o]=l:i(o,l)}}},xm="!",xk=":",p9=[],Pk=(e,t,n,a,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:i}),m9=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=i=>{const o=[];let l=0,u=0,h=0,f;const p=i.length;for(let S=0;S<p;S++){const P=i[S];if(l===0&&u===0){if(P===xk){o.push(i.slice(h,S)),h=S+1;continue}if(P==="/"){f=S;continue}}P==="["?l++:P==="]"?l--:P==="("?u++:P===")"&&u--}const g=o.length===0?i:i.slice(h);let v=g,k=!1;g.endsWith(xm)?(v=g.slice(0,-1),k=!0):g.startsWith(xm)&&(v=g.slice(1),k=!0);const w=f&&f>h?f-h:void 0;return Pk(o,k,v,w)};if(t){const i=t+xk,o=a;a=l=>l.startsWith(i)?o(l.slice(i.length)):Pk(p9,!1,l,void 0,!0)}if(n){const i=a;a=o=>n({className:o,parseClassName:i})}return a},g9=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let i=[];for(let o=0;o<n.length;o++){const l=n[o],u=l[0]==="[",h=t.has(l);u||h?(i.length>0&&(i.sort(),a.push(...i),i=[]),a.push(l)):i.push(l)}return i.length>0&&(i.sort(),a.push(...i)),a}},y9=e=>({cache:f9(e.cacheSize),parseClassName:m9(e),sortModifiers:g9(e),postfixLookupClassGroupIds:v9(e),...r9(e)}),v9=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)t[n[a]]=!0;return t},b9=/\s+/,_9=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:l}=t,u=[],h=e.trim().split(b9);let f="";for(let p=h.length-1;p>=0;p-=1){const g=h[p],{isExternal:v,modifiers:k,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:P}=n(g);if(v){f=g+(f.length>0?" "+f:f);continue}let L=!!P,A;if(L){const F=S.substring(0,P);A=a(F);const T=A&&l[A]?a(S):void 0;T&&T!==A&&(A=T,L=!1)}else A=a(S);if(!A){if(!L){f=g+(f.length>0?" "+f:f);continue}if(A=a(S),!A){f=g+(f.length>0?" "+f:f);continue}L=!1}const E=k.length===0?"":k.length===1?k[0]:o(k).join(":"),R=w?E+xm:E,j=R+A;if(u.indexOf(j)>-1)continue;u.push(j);const W=i(A,L);for(let F=0;F<W.length;++F){const T=W[F];u.push(R+T)}f=g+(f.length>0?" "+f:f)}return f},k9=(...e)=>{let t=0,n,a,i="";for(;t<e.length;)(n=e[t++])&&(a=oP(n))&&(i&&(i+=" "),i+=a);return i},oP=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=oP(e[a]))&&(n&&(n+=" "),n+=t);return n},w9=(e,...t)=>{let n,a,i,o;const l=h=>{const f=t.reduce((p,g)=>g(p),e());return n=y9(f),a=n.cache.get,i=n.cache.set,o=u,u(h)},u=h=>{const f=a(h);if(f)return f;const p=_9(h,n);return i(h,p),p};return o=l,(...h)=>o(k9(...h))},x9=[],Jt=e=>{const t=n=>n[e]||x9;return t.isThemeGetter=!0,t},lP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,cP=/^\((?:(\w[\w-]*):)?(.+)\)$/i,P9=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,S9=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,C9=/\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$/,T9=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,E9=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R9=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ti=e=>P9.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),Ha=e=>!!e&&Number.isInteger(Number(e)),hp=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),wr=e=>S9.test(e),uP=()=>!0,A9=e=>C9.test(e)&&!T9.test(e),Zg=()=>!1,L9=e=>E9.test(e),D9=e=>R9.test(e),I9=e=>!we(e)&&!Pe(e),M9=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),N9=e=>mi(e,fP,Zg),we=e=>lP.test(e),Ii=e=>mi(e,pP,A9),Sk=e=>mi(e,H9,Qe),O9=e=>mi(e,gP,uP),j9=e=>mi(e,mP,Zg),Ck=e=>mi(e,dP,Zg),U9=e=>mi(e,hP,D9),vu=e=>mi(e,yP,L9),Pe=e=>cP.test(e),ll=e=>as(e,pP),z9=e=>as(e,mP),Tk=e=>as(e,dP),F9=e=>as(e,fP),B9=e=>as(e,hP),bu=e=>as(e,yP,!0),V9=e=>as(e,gP,!0),mi=(e,t,n)=>{const a=lP.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},as=(e,t,n=!1)=>{const a=cP.exec(e);return a?a[1]?t(a[1]):n:!1},dP=e=>e==="position"||e==="percentage",hP=e=>e==="image"||e==="url",fP=e=>e==="length"||e==="size"||e==="bg-size",pP=e=>e==="length",H9=e=>e==="number",mP=e=>e==="family-name",gP=e=>e==="number"||e==="weight",yP=e=>e==="shadow",$9=()=>{const e=Jt("color"),t=Jt("font"),n=Jt("text"),a=Jt("font-weight"),i=Jt("tracking"),o=Jt("leading"),l=Jt("breakpoint"),u=Jt("container"),h=Jt("spacing"),f=Jt("radius"),p=Jt("shadow"),g=Jt("inset-shadow"),v=Jt("text-shadow"),k=Jt("drop-shadow"),w=Jt("blur"),S=Jt("perspective"),P=Jt("aspect"),L=Jt("ease"),A=Jt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...R(),Pe,we],W=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],T=()=>[Pe,we,h],B=()=>[ti,"full","auto",...T()],V=()=>[Ha,"none","subgrid",Pe,we],ee=()=>["auto",{span:["full",Ha,Pe,we]},Ha,Pe,we],se=()=>[Ha,"auto",Pe,we],fe=()=>["auto","min","max","fr",Pe,we],de=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],ie=()=>["auto",...T()],X=()=>[ti,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],q=()=>[ti,"screen","full","dvw","lvw","svw","min","max","fit",...T()],J=()=>[ti,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],H=()=>[e,Pe,we],M=()=>[...R(),Tk,Ck,{position:[Pe,we]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_e=()=>["auto","cover","contain",F9,N9,{size:[Pe,we]}],ge=()=>[hp,ll,Ii],pe=()=>["","none","full",f,Pe,we],ve=()=>["",Qe,ll,Ii],Be=()=>["solid","dashed","dotted","double"],Ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[Qe,hp,Tk,Ck],At=()=>["","none",w,Pe,we],qt=()=>["none",Qe,Pe,we],on=()=>["none",Qe,Pe,we],ft=()=>[Qe,Pe,we],Ut=()=>[ti,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wr],breakpoint:[wr],color:[uP],container:[wr],"drop-shadow":[wr],ease:["in","out","in-out"],font:[I9],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wr],shadow:[wr],spacing:["px",Qe],text:[wr],"text-shadow":[wr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ti,we,Pe,P]}],container:["container"],"container-type":[{"@container":["","normal","size",Pe,we]}],"container-named":[M9],columns:[{columns:[Qe,we,Pe,u]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:j()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Ha,"auto",Pe,we]}],basis:[{basis:[ti,"full","auto",u,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,ti,"auto","initial","none",we]}],grow:[{grow:["",Qe,Pe,we]}],shrink:[{shrink:["",Qe,Pe,we]}],order:[{order:[Ha,"first","last","none",Pe,we]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":fe()}],"auto-rows":[{"auto-rows":fe()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...de(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...de()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":de()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...J()]}],"min-block-size":[{"min-block":["auto",...J()]}],"max-block-size":[{"max-block":["none",...J()]}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,ll,Ii]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,V9,O9]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hp,we]}],"font-family":[{font:[z9,j9,t]}],"font-features":[{"font-features":[we]}],"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:[i,Pe,we]}],"line-clamp":[{"line-clamp":[Qe,"none",Pe,Sk]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Pe,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Pe,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Be(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",Pe,Ii]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[Qe,"auto",Pe,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[Ha,Pe,we]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe,we]}],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",Pe,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:_e()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ha,Pe,we],radial:["",Pe,we],conic:[Ha,Pe,we]},B9,U9]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:ve()}],"border-w-x":[{"border-x":ve()}],"border-w-y":[{"border-y":ve()}],"border-w-s":[{"border-s":ve()}],"border-w-e":[{"border-e":ve()}],"border-w-bs":[{"border-bs":ve()}],"border-w-be":[{"border-be":ve()}],"border-w-t":[{"border-t":ve()}],"border-w-r":[{"border-r":ve()}],"border-w-b":[{"border-b":ve()}],"border-w-l":[{"border-l":ve()}],"divide-x":[{"divide-x":ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Be(),"hidden","none"]}],"divide-style":[{divide:[...Be(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,Pe,we]}],"outline-w":[{outline:["",Qe,ll,Ii]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",p,bu,vu]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",g,bu,vu]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[Qe,Ii]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ve()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",v,bu,vu]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[Qe,Pe,we]}],"mix-blend":[{"mix-blend":[...Ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ke()}],"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":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[Pe,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:_e()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Pe,we]}],filter:[{filter:["","none",Pe,we]}],blur:[{blur:At()}],brightness:[{brightness:[Qe,Pe,we]}],contrast:[{contrast:[Qe,Pe,we]}],"drop-shadow":[{"drop-shadow":["","none",k,bu,vu]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",Qe,Pe,we]}],"hue-rotate":[{"hue-rotate":[Qe,Pe,we]}],invert:[{invert:["",Qe,Pe,we]}],saturate:[{saturate:[Qe,Pe,we]}],sepia:[{sepia:["",Qe,Pe,we]}],"backdrop-filter":[{"backdrop-filter":["","none",Pe,we]}],"backdrop-blur":[{"backdrop-blur":At()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,Pe,we]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,Pe,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,Pe,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,Pe,we]}],"backdrop-invert":[{"backdrop-invert":["",Qe,Pe,we]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,Pe,we]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,Pe,we]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,Pe,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Pe,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qe,"initial",Pe,we]}],ease:[{ease:["linear","initial",L,Pe,we]}],delay:[{delay:[Qe,Pe,we]}],animate:[{animate:["none",A,Pe,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Pe,we]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:qt()}],"rotate-x":[{"rotate-x":qt()}],"rotate-y":[{"rotate-y":qt()}],"rotate-z":[{"rotate-z":qt()}],scale:[{scale:on()}],"scale-x":[{"scale-x":on()}],"scale-y":[{"scale-y":on()}],"scale-z":[{"scale-z":on()}],"scale-3d":["scale-3d"],skew:[{skew:ft()}],"skew-x":[{"skew-x":ft()}],"skew-y":[{"skew-y":ft()}],transform:[{transform:[Pe,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ut()}],"translate-x":[{"translate-x":Ut()}],"translate-y":[{"translate-y":Ut()}],"translate-z":[{"translate-z":Ut()}],"translate-none":["translate-none"],zoom:[{zoom:[Ha,Pe,we]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Pe,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",Pe,we]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[Qe,ll,Ii,Sk]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},W9=w9($9);function Pt(...e){return W9(e9(e))}const G9=C.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[C.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"}),C.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"}),C.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"}),C.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"})]}),K9=C.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:C.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"})}),q9={google:G9,github:K9},Y9={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function Z9(e){return Y9[e]||String(e||"").replace(/-/g," ")}function X9(e){if(typeof e=="string"&&e.trim())return e.trim();if(e&&typeof e=="object"){if(typeof e.token=="string"&&e.token.trim())return e.token.trim();if(typeof e.otp=="string"&&e.otp.trim())return e.otp.trim()}return""}function J9({title:e,subtitle:t,className:n="",onSuccess:a,hideLogo:i=!1,initialMode:o="signin",tokenFromUrl:l="",initialEmail:u="",initialCode:h=""}){Yl();const{enabled:f,signedIn:p,refreshUser:g,signInWithPassword:v,signUp:k,signInWithOAuth:w,getPublicAuthConfig:S,sendResetPasswordEmail:P,exchangeResetPasswordToken:L,resetPassword:A}=ns(),[E,R]=b.useState(o),[j,W]=b.useState(u),[F,T]=b.useState(""),[B,V]=b.useState(""),[ee,se]=b.useState(""),[fe,de]=b.useState(h),[he,ie]=b.useState(!1),[X,q]=b.useState(null),[J,H]=b.useState(null),[M,Z]=b.useState(!1),[_e,ge]=b.useState(!!(o!=="signin"||u)),[pe,ve]=b.useState(!0),[Be,Ke]=b.useState([]),[Ne,At]=b.useState(8);b.useEffect(()=>{o&&R(o)},[o]),b.useEffect(()=>{u&&W(u)},[u]),b.useEffect(()=>{h&&de(h)},[h]),b.useEffect(()=>{if(!f)return;let qe=!0;return ve(!0),(async()=>{const{data:nt,error:Lt}=await S();if(qe){if(Lt||!nt)Ke(["google","github"]);else{const St=Array.isArray(nt.oAuthProviders)?nt.oAuthProviders:[],Ln=Array.isArray(nt.customOAuthProviders)?nt.customOAuthProviders:[];Ke([...St,...Ln]),typeof nt.passwordMinLength=="number"&&nt.passwordMinLength>0&&At(nt.passwordMinLength)}ve(!1)}})(),()=>{qe=!1}},[f,S]),b.useEffect(()=>{p&&a&&a()},[p,a]);const qt=b.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),on=b.useMemo(()=>typeof window>"u"?"/reset-password":`${window.location.origin}/reset-password`,[]),ft=b.useCallback(async qe=>{q(null),ie(!0);try{const{error:nt}=await w(qe,qt);nt&&q(nt.message||String(nt))}finally{ie(!1)}},[w,qt]);b.useEffect(()=>{if(!f||pe||p||typeof window>"u")return;const qe=window.location.search;if(!qe)return;const nt=new URLSearchParams(qe),Lt=nt.get("native")==="1",St=nt.get("provider");Lt&&St&&[...Be].includes(St)&&ft(St)},[f,pe,p,Be,ft]);const Ut=b.useCallback(async qe=>{qe.preventDefault(),q(null),ie(!0);try{if(E==="signup"){const{data:Lt,error:St}=await k({email:j.trim(),password:F,name:ee.trim()||void 0});if(St){q(St.message||String(St));return}if(Lt?.requireEmailVerification){H(me("login.verify_email_pending")),R("signin");return}await g();return}const{error:nt}=await v({email:j.trim(),password:F});if(nt){q(nt.message||String(nt));return}await g()}finally{ie(!1)}},[E,j,F,ee,k,v,g]),cr=b.useCallback(async qe=>{qe.preventDefault(),q(null),ie(!0);try{const nt=j.trim(),{error:Lt}=await P({email:nt,redirectTo:on});if(Lt){q(Lt.message||String(Lt));return}W(nt),H(me("reset_password.request.sent")),R("reset_confirm")}finally{ie(!1)}},[j,on,P]),Rr=b.useCallback(async qe=>{if(qe.preventDefault(),q(null),F!==B){q(me("reset_password.error.password_mismatch"));return}ie(!0);try{let nt=l;if(!nt){const{data:St,error:Ln}=await L({email:j.trim(),code:fe.trim()});if(Ln){q(Ln.message||String(Ln));return}if(nt=X9(St),!nt){q(me("reset_password.error.missing_token"));return}}const{error:Lt}=await A({newPassword:F,otp:nt});if(Lt){q(Lt.message||String(Lt));return}Z(!0),H(me("reset_password.success"))}finally{ie(!1)}},[fe,B,j,L,F,A,l]);if(!f)return null;const Mt=E==="reset_email"||E==="reset_confirm";return C.jsxs("div",{className:Pt("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",n),children:[Mt&&C.jsxs("button",{type:"button",onClick:()=>{R("signin"),H(null),q(null),Z(!1),T(""),V("")},className:"flex items-center gap-1.5 text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors mb-4 focus:outline-none",children:[C.jsx(bA,{className:"h-3.5 w-3.5"}),me("reset_password.back_to_sign_in")]}),C.jsxs("div",{className:Pt("mb-6",Mt?"text-left":"text-center"),children:[!i&&!Mt&&C.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[C.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),C.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white font-oai tracking-tight",children:me("shared.app_name")})]}),C.jsx("h2",{className:Pt("text-sm font-semibold text-oai-black dark:text-white tracking-tight mb-1",(i||Mt)&&"text-base font-bold md:text-lg"),children:Mt?me("reset_password.title"):e||me("login_modal.subtitle")}),!Mt&&t&&C.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px] mx-auto",children:t}),Mt&&C.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px]",children:J&&E==="reset_confirm"&&!M?J:me("reset_password.subtitle")})]}),J&&(!Mt||M)&&C.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:J}),X&&C.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:X}),E==="reset_email"&&C.jsxs("form",{onSubmit:cr,className:"space-y-3",children:[C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-reset-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("login.field.email")}),C.jsx("input",{id:"card-reset-email",type:"email",autoComplete:"email",required:!0,value:j,onChange:qe=>W(qe.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"})]}),C.jsx("button",{type:"submit",disabled:he,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:me("reset_password.request.submit")})]}),E==="reset_confirm"&&(M?C.jsx("button",{type:"button",onClick:()=>{R("signin"),Z(!1),H(null),q(null),T(""),V("")},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 text-center shadow-sm",children:me("reset_password.success_cta")}):C.jsxs("form",{onSubmit:Rr,className:"space-y-3",children:[!l&&C.jsxs(C.Fragment,{children:[C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-reset-email-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("login.field.email")}),C.jsx("input",{id:"card-reset-email-confirm",type:"email",autoComplete:"email",required:!0,value:j,onChange:qe=>W(qe.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"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-reset-code",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("reset_password.field.code")}),C.jsx("input",{id:"card-reset-code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",required:!0,value:fe,onChange:qe=>de(qe.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"})]})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-reset-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("reset_password.field.new_password")}),C.jsx("input",{id:"card-reset-password",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:F,onChange:qe=>T(qe.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"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-reset-password-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("reset_password.field.confirm_password")}),C.jsx("input",{id:"card-reset-password-confirm",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:B,onChange:qe=>V(qe.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"})]}),C.jsx("button",{type:"submit",disabled:he,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:me("reset_password.reset.submit")})]})),!Mt&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"space-y-2.5 mb-5",children:pe?C.jsxs("div",{className:"space-y-2.5",children:[C.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),C.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):Be.map(qe=>C.jsxs("button",{type:"button",disabled:he,onClick:()=>ft(qe),className:Pt("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:[q9[qe]||null,me("login.oauth.continue",{provider:Z9(qe)})]},qe))}),_e?C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"relative mb-5",children:[C.jsx("div",{className:"absolute inset-0 flex items-center",children:C.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),C.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:C.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:me("login_modal.divider_email")})})]}),C.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:[C.jsx("button",{type:"button",className:Pt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",E==="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:()=>{R("signin"),q(null)},children:me("login.tab.sign_in")}),C.jsx("button",{type:"button",className:Pt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",E==="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:()=>{R("signup"),q(null)},children:me("login.tab.sign_up")})]}),C.jsxs("form",{onSubmit:Ut,className:"space-y-3",children:[E==="signup"&&C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("login.field.name")}),C.jsx("input",{id:"card-name",type:"text",autoComplete:"name",value:ee,onChange:qe=>se(qe.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:me("login.field.name_placeholder")})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("login.field.email")}),C.jsx("input",{id:"card-email",type:"email",autoComplete:"email",required:!0,value:j,onChange:qe=>W(qe.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"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("login.field.password")}),C.jsx("input",{id:"card-password",type:"password",autoComplete:E==="signup"?"new-password":"current-password",required:!0,minLength:E==="signup"?Ne:void 0,value:F,onChange:qe=>T(qe.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"}),E==="signup"&&C.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:me("login.password_hint",{min:String(Ne)})}),E==="signin"&&C.jsx("div",{className:"mt-1 text-right",children:C.jsx("button",{type:"button",onClick:()=>{R("reset_email"),q(null),H(null)},className:"text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white no-underline bg-transparent border-0 p-0 cursor-pointer focus:outline-none",children:me("login.forgot_password")})})]}),C.jsx("button",{type:"submit",disabled:he,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:me(E==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"relative mb-5",children:[C.jsx("div",{className:"absolute inset-0 flex items-center",children:C.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),C.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:C.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:me("login.divider")})})]}),C.jsxs("button",{type:"button",onClick:()=>ge(!0),className:Pt("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:[C.jsx(LA,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),me("login_modal.continue_email")]})]})]})]})}function Q9(){const{isOpen:e,closeLoginModal:t}=g2(),{enabled:n}=ns();return b.useEffect(()=>{if(!e)return;const a=i=>{i.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),n?C.jsx($x,{children:e&&C.jsxs(Cl.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:[C.jsx(Cl.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),C.jsxs(Cl.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 shadow-2xl overflow-hidden",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:a=>a.stopPropagation(),children:[C.jsx("button",{type:"button",onClick:t,className:"absolute right-4 top-4 z-10 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:C.jsx(bg,{className:"h-5 w-5"})}),C.jsx(J9,{onSuccess:t,className:"p-6 bg-transparent"})]})]})}):null}const eN={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},jz="https://tokentracker.statuspage.io/";function tN(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?eN:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||ar()).trim()}function nN(){return ar()}function aN(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 rN=300*1e3,iN=720*60*1e3;function Xg(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function sN(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+iN<=t:!0}async function vP(e,t){const n=ar();if(!Xg(n)||!e)return;const a=n.replace(/\/$/,""),i=uo(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};i&&(o.apikey=i);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:o,body:JSON.stringify({period:"week",source:t})})}catch{}}async function oN(){try{const e=await fetch("/functions/tokentracker-machine-id",{headers:{Accept:"application/json"},cache:"no-store"});if(e.ok){const t=await e.json().catch(()=>null),n=typeof t?.machineId=="string"?t.machineId.trim():null;if(n&&n.length>=8)return n}}catch{}return null}async function lN(e){const t=ar();if(!Xg(t)||!e)return null;const n=t.replace(/\/$/,""),a=uo(),i={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(i.apikey=a);const o=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await oN();if(!l)return null;const u=`Token Tracker (dashboard) #${l.slice(0,8)}`,h=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:i,body:JSON.stringify({device_name:u,platform:o,machine_id:l})});if(!h.ok)return null;const f=await h.json().catch(()=>null),p=typeof f?.token=="string"?f.token:null,g=typeof f?.device_id=="string"?f.device_id:null;return!p||!g?null:{token:p,deviceId:g,issuedAt:typeof f?.created_at=="string"?f.created_at:new Date().toISOString()}}async function Ek(e){const{deviceToken:t,insforgeBaseUrl:n,drain:a}=e,i={deviceToken:t};a===!0&&(i.drain=!0);const o=n||ar();Xg(o)&&(i.insforgeBaseUrl=o.trim());const l=await Kl(),u=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...l},body:JSON.stringify(i)}),h=await u.json().catch(()=>({}));if(!u.ok){const f=typeof h.error=="string"?h.error:`HTTP ${u.status}`;throw new Error(f)}return h}async function Rk(e){const t=await e();if(!t)return null;const n=Lw();if(n&&!sN(n))return n;const a=await lN(t);return a?(cR(a),a):null}async function bP(e,t={}){let n=await e();if(!n)return null;let a=await Rk(async()=>n);if(!a)return n;try{return await Ek({deviceToken:a.token,insforgeBaseUrl:ar(),drain:t.drain===!0}),n}catch(i){if(!Lw()||(Dw(),n=await e(),!n)||(a=await Rk(async()=>n),!a))throw i;return await Ek({deviceToken:a.token,insforgeBaseUrl:ar(),drain:t.drain===!0}),n}}async function cN(e){const t=uR();if(Date.now()-t<rN)return;const n=await bP(e);n&&(Iw(Date.now()),await vP(n,"cloud-sync-auto"))}async function Uz(e){const t=await bP(e,{drain:!0});t&&(Iw(Date.now()),await vP(t,"cloud-sync-now"))}function uN(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function dN(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||uN(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function hN(){const e=zn(),t=ns(),n=b.useRef(!1);b.useEffect(()=>{if(!sd()||!dN(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!od())return;let a=!1;const i=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await cN(()=>t.getAccessToken())}catch(o){console.warn("[tokentracker] cloud usage sync:",o)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(i)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function fN(){const e=b.useContext(p2);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function pN({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function mN(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 gN(e){return e?Bd()?`/api/avatar-proxy?url=${encodeURIComponent(e)}`:e:null}function _u(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 Ak({className:e,variant:t="header",collapsed:n=!1,onAfterAction:a}){Yl();const i=t==="sidebar",{enabled:o,loading:l,signedIn:u,user:h,displayName:f}=ns(),{openLoginModal:p}=g2(),g=so(),v=b.useMemo(()=>mN(h),[h]),k=b.useMemo(()=>gN(v),[v]),[w,S]=Zs.useState(!1);if(Zs.useEffect(()=>{S(!1)},[k]),!o)return null;if(l)return C.jsx("div",{className:Pt("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 i?C.jsxs("button",{type:"button",onClick:()=>{p(),a?.()},className:Pt("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":me("header.auth.sign_in_aria"),title:n?me("header.auth.sign_in_aria"):void 0,children:[C.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:C.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&C.jsx("span",{className:"truncate flex-1 text-left",children:me("header.auth.sign_in_aria")})]}):C.jsx("button",{type:"button",onClick:p,className:Pt("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",e),"aria-label":me("header.auth.sign_in_aria"),children:me("header.auth.sign_in_aria")});const P=()=>{g("/settings"),a?.()};return C.jsx("div",{className:Pt(i?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:C.jsxs("button",{type:"button",onClick:P,className:Pt(i?Pt("flex w-full items-center gap-2 rounded-md px-2 py-1.5 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 transition-colors min-w-0",n&&"justify-center px-0 py-0 h-9 w-9"):"flex items-center gap-2 rounded-md pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":me("header.auth.open_settings"),title:i&&n?f:void 0,children:[i?C.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:k&&!w?C.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",onError:()=>S(!0)}):_u(f)==="?"?C.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:C.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):C.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:_u(f)})}):k&&!w?C.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",onError:()=>S(!0)}):_u(f)==="?"?C.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:C.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):C.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:_u(f)}),i?!n&&C.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}):C.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 Pm="tt.sidebarCollapsed";function _P(){return[{id:"general",label:me("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:kA,label:me("nav.usage")},{id:"limits",to:"/limits",icon:SA,label:me("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:YA,label:me("nav.leaderboard")}]},{id:"tools",label:me("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:RA,label:me("nav.widgets")},{id:"skills",to:"/skills",icon:UA,label:me("nav.skills")},{id:"ip-check",to:"/ip-check",icon:TA,label:me("nav.ip_check")}]},{id:"account",label:me("nav.group.account"),items:[{id:"settings",to:"/settings",icon:$A,label:me("nav.settings")}]}]}function yN(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Pm)==="1"}catch{return!1}}function vN(){const[e,t]=b.useState(yN),n=b.useCallback(()=>{t(a=>{const i=!a;try{typeof window<"u"&&window.localStorage.setItem(Pm,i?"1":"0")}catch{}return i})},[]);return b.useEffect(()=>{if(typeof window>"u")return;const a=i=>{i.key===Pm&&t(i.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function bN(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function _N({label:e,collapsed:t,first:n}){return t?n?null:C.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):C.jsx("div",{className:Pt("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 kN({item:e,collapsed:t,active:n,onClick:a}){const i=e.icon;return C.jsxs(Nd,{to:e.to,onClick:a,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:Pt("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:[C.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:C.jsx(i,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&C.jsx("span",{className:"truncate",children:e.label})]})}function wN({as:e="button",title:t,onClick:n,href:a,children:i,className:o,...l}){const u=Pt("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"?C.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...l,children:i}):C.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...l,children:i})}function xN({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,a]=b.useState(null);return b.useEffect(()=>{if(typeof window>"u")return;const i=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;pN({prefersReducedMotion:i,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]),C.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:Pt("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:[C.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:C.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"})}),C.jsx("span",{children:"Star"}),n!==null&&C.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const PN=[{value:"light",label:"Light",Icon:f2},{value:"dark",label:"Dark",Icon:h2},{value:"system",label:"System",Icon:NA}];function SN({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[i,o]=b.useState(!1),l=b.useRef(null),u=t==="dark"?h2:f2;return b.useEffect(()=>{if(!i)return;const h=p=>{l.current&&!l.current.contains(p.target)&&o(!1)},f=p=>{p.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[i]),C.jsxs("div",{ref:l,className:"relative",children:[C.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":i,"aria-haspopup":"menu",title:"Theme",onClick:()=>o(h=>!h),className:Pt("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:C.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),i&&C.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:PN.map(({value:h,label:f,Icon:p})=>{const g=e===h;return C.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),o(!1)},className:Pt("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",g?"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:[C.jsx(p,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),C.jsx("span",{children:f})]},h)})})]})}function kP({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:i,glassChrome:o=!1}){const u=zn()?.pathname||"/",{theme:h,resolvedTheme:f,setTheme:p}=fN(),{resolvedLocale:g}=Yl(),v=b.useMemo(()=>_P(),[g]);return C.jsxs(C.Fragment,{children:[C.jsx("div",{className:Pt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:a?C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("div",{className:"flex-1 min-w-0",children:C.jsx(Ak,{variant:"sidebar",collapsed:e,onAfterAction:n})}),C.jsx("button",{type:"button",onClick:i,"aria-label":me("nav.close_menu"),title:me("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:C.jsx(bg,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):C.jsx(Ak,{variant:"sidebar",collapsed:e,onAfterAction:n})}),C.jsx("nav",{"aria-label":me("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:v.map((k,w)=>C.jsxs("div",{className:"flex flex-col",children:[C.jsx(_N,{label:k.label,collapsed:e,first:w===0}),C.jsx("div",{className:"flex flex-col gap-0.5",children:k.items.filter(S=>!(S.to==="/widgets"&&mg())).map(S=>C.jsx(kN,{item:S,collapsed:e,active:bN(u,S.to),onClick:n},S.id))})]},k.id))}),C.jsxs("div",{className:Pt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[C.jsx(SN,{theme:h,resolvedTheme:f,onSetTheme:p,glassChrome:o}),C.jsx("div",{className:"flex items-center gap-1.5",children:!e&&C.jsx(xN,{glassChrome:o})})]})]})}function CN({collapsed:e,onToggleCollapsed:t}){const n=b.useMemo(()=>typeof window>"u"?!1:Aa()||Bd(),[]);return C.jsx("aside",{"aria-label":me("nav.aside_label"),className:Pt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:C.jsx(kP,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function TN({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?C.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[C.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),C.jsx("aside",{"aria-label":me("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:C.jsx(kP,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function EN({onOpenDrawer:e}){return C.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:[C.jsx(wN,{title:me("nav.menu"),onClick:e,children:C.jsx(IA,{className:"h-5 w-5","aria-hidden":!0})}),C.jsxs(Nd,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[C.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),C.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),C.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function RN({children:e}){const{collapsed:t,toggle:n}=vN(),[a,i]=b.useState(!1),o=b.useCallback(()=>i(!0),[]),l=b.useCallback(()=>i(!1),[]),u=b.useMemo(()=>typeof window>"u"?!1:Aa()||Bd(),[]);return C.jsxs("div",{className:Pt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",mg()&&"tt-native-glass-shell",u?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[u&&C.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),C.jsxs("div",{className:"flex-1 min-h-0 flex",children:[C.jsx(CN,{collapsed:t,onToggleCollapsed:n}),C.jsx(TN,{open:a,onClose:l}),C.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:C.jsxs("div",{className:Pt("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:[C.jsx(EN,{onOpenDrawer:o}),C.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}function AN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})})}function LN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:C.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"})})}function DN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})})}function IN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})})}function MN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})})}function NN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M4.125 20.149c-2.69 5.959 3.036 7.453 7.26 3.966 1.24 3.91 5.898.993 7.569-2.036 3.682-6.678 2.195-13.49 1.813-14.895-2.617-9.582-15.699-9.592-17.95.049-.526 1.687-.535 3.606-.833 5.598-.15 1.005-.256 1.646-.645 2.703-.223.607-.53 1.147-1.014 2.056-.75 1.412-.434 4.138 3.434 2.724v.001ZM11.895 11.332c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.395.9.395 1.578 0 1.283-.493 2.048-1.319 2.048Zm4.416 0c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.396.9.396 1.578 0 1.283-.494 2.048-1.32 2.048Z"})})}function ON({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function jN({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:[C.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),C.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]})}function UN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})})}function zN({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 60",fill:"none",className:t,"aria-hidden":"true",children:[C.jsx("path",{fill:"currentColor",d:"M37.2114 3.75318C37.6821 3.33106 37.7106 3.31457 38.0558 3.29385C38.6149 3.2531 39.1272 3.52199 39.9989 4.31564C42.0356 6.16652 44.8714 9.97183 46.6346 13.2212L47.3163 14.4819L48.2782 14.9605C49.2072 15.4299 50.7308 16.3923 51.3672 16.9085C51.655 17.1464 51.6956 17.1508 51.9947 17.0344C53.3454 16.5084 55.2803 17.206 56.9869 18.8432C58.5231 20.3155 59.9943 22.8312 60.558 24.9308C60.6403 25.2687 60.7493 25.9952 60.7891 26.5362C60.9177 28.4358 60.3092 29.9532 59.1362 30.64C58.8965 30.7784 58.8801 30.8158 58.8868 31.4132C58.9409 34.2583 58.1741 37.0985 56.6335 39.8679C54.8946 42.9773 51.7981 46.1938 47.6074 49.2243C45.357 50.8619 40.0323 53.964 37.6248 55.0532C31.8578 57.6496 27.2346 58.646 23.2188 58.154C20.8236 57.8638 18.1124 56.9287 16.5082 55.8433C16.086 55.5515 16.0191 55.5329 15.6966 55.6251C13.9793 56.1185 11.73 55.1053 9.81931 52.9844C9.05725 52.1366 7.82714 50.0548 7.42839 48.9409C6.50606 46.3339 6.68976 43.9816 7.91836 42.5767C8.23573 42.2149 8.2453 42.1995 8.17598 41.5912C8.06148 40.5951 8.00971 39.1206 8.06202 38.1692L8.10361 37.2803L6.76977 34.9212C4.70378 31.2451 3.3912 28.1582 2.88489 25.7998C2.61762 24.5066 2.63385 23.9324 2.96214 23.5078C3.16198 23.2515 3.81796 22.9866 4.60785 22.8407C6.59665 22.4917 10.9334 22.8076 15.7581 23.6595L16.259 23.7458L17.3608 22.7713C19.1891 21.1519 20.4038 20.244 22.6429 18.8478C24.9768 17.3876 27.6108 16.1858 30.577 15.2346L31.5295 14.9294L32.0526 13.5561C33.9257 8.61146 35.8437 4.96584 37.2114 3.75318ZM21.5208 29.0919C19.404 30.314 18.3453 30.9251 17.5676 31.6099C14.4179 34.3835 13.2414 38.777 14.5823 42.7537C14.9135 43.7357 15.5247 44.7942 16.7469 46.9111C17.9691 49.0279 18.5801 50.0865 19.2649 50.8643C22.0385 54.014 26.4316 55.1918 30.4084 53.8509C31.3904 53.5198 32.4489 52.9085 34.5657 51.6863L46.7442 44.6551C48.8613 43.4328 49.9205 42.8214 50.6983 42.1365C53.8479 39.363 55.0245 34.9695 53.6835 30.9927C53.3524 30.0107 52.7412 28.9522 51.519 26.8354C50.2968 24.7185 49.6858 23.66 49.0009 22.8822C46.2274 19.7325 41.8342 18.5547 37.8575 19.8956C36.8754 20.2267 35.8163 20.8383 33.6993 22.0606L21.5208 29.0919Z"}),C.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:C.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),C.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:C.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function FN({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:[C.jsx("path",{d:"M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"}),C.jsx("path",{d:"M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"}),C.jsx("path",{d:"M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"})]})}function BN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:t,children:C.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function VN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:C.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:C.jsx("path",{d:"M3.17890888,3.6 L3.17890888,0 L16,0 L16,3.6 L3.17890888,3.6 Z M9.642,7.2 L9.64218223,10.8 L0,10.8 L0,3.6 L16,3.6 L16,7.2 L9.642,7.2 Z M3.17890888,18 L3.178,14.4 L0,14.4 L0,10.8 L16,10.8 L16,18 L3.17890888,18 Z",fillRule:"nonzero"})})})}function HN({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[C.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),C.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),C.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),C.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),C.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),C.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function $N({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[C.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),C.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),C.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}function WN({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[C.jsx("path",{d:"M9 3v2"}),C.jsx("path",{d:"M15 3v2"}),C.jsx("rect",{x:"4",y:"6",width:"16",height:"13",rx:"3"}),C.jsx("circle",{cx:"9",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),C.jsx("circle",{cx:"15",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),C.jsx("path",{d:"M9 16h6"})]})}const GN={CLAUDE:AN,CODEBUDDY:zN,CODEX:LN,COPILOT:UN,CRAFT:VN,CURSOR:DN,DROID:WN,GEMINI:IN,GITHUB:BN,GROK:MN,HERMES:FN,KIMI:jN,KIRO:NN,OPENCODE:ON,OMP:HN,PI:$N},KN={ANTIGRAVITY:"/brand-logos/antigravity.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",GEMINI:"/brand-logos/gemini.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"};function qN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:C.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function YN({provider:e,size:t=16,color:n,className:a=""}){const i=e?.toUpperCase?.()||"",o=KN[i];if(o)return C.jsx("img",{src:o,alt:"",width:t,height:t,className:a,style:{width:t,height:t,objectFit:"contain"},"aria-hidden":!0});const l=GN[i];return l?C.jsx(l,{size:t,className:a}):C.jsx(qN,{size:t,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${a}`})}const wP="tokentracker-skills";async function rs(e){const t=new URL(`/functions/${wP}`,window.location.origin);if(e)for(const[i,o]of Object.entries(e))o!=null&&o!==""&&t.searchParams.set(i,String(o));const n=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),a=await n.json().catch(()=>null);if(!n.ok)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}async function gi(e){const t=await Kl(),n=await fetch(`/functions/${wP}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),a=await n.json().catch(()=>null);if(!n.ok||a?.ok===!1)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}function ZN(){return rs({mode:"installed"})}function zz(e={}){return rs({mode:"discover",...e.force?{force:1}:{}})}function Fz(e,t=0,n=20){return rs({mode:"search",q:e,offset:t,limit:n})}function Bz(){return rs({mode:"repos"})}function Vz(e,t){return gi({action:"install",skill:e,targets:t})}function Hz(e){return gi({action:"uninstall",id:e})}function $z(e){return gi({action:"restore",id:e})}function Wz(e,t){return gi({action:"set_targets",id:e,targets:t})}function Gz(e,t){return gi({action:"import_local",directory:e,targets:t})}function Kz(e,t){return gi({action:"delete_local",directory:e,targets:t||[]})}function qz(e){return gi({action:"add_repo",repo:e})}function Yz(e,t){return gi({action:"remove_repo",owner:e,name:t})}function Zz(e={}){return rs({mode:"popular",...e.force?{force:1}:{}})}function Xz(e={}){return rs({mode:"updates",...e.force?{force:1}:{}})}function Jz(e={}){return rs({mode:"skill_usage",...e.force?{force:1}:{}})}const XN=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function JN(){const e=so(),t=QM(),[n,a]=b.useState(!1),[i,o]=b.useState(""),[l,u]=b.useState(0),[h,f]=b.useState([]),p=b.useRef(null),g=b.useRef(null);b.useEffect(()=>{const E=R=>{(R.metaKey||R.ctrlKey)&&(R.key==="k"||R.key==="K")&&(R.preventDefault(),a(W=>!W))};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]),b.useEffect(()=>{if(!n)return;o(""),u(0);const E=requestAnimationFrame(()=>p.current?.focus());return XN&&!h.length&&ZN().then(R=>f(R?.skills||[])).catch(()=>f([])),()=>cancelAnimationFrame(E)},[n,h.length]);const v=b.useMemo(()=>{const E=_P().flatMap(j=>j.items.map(W=>({kind:"page",id:`page:${W.id}`,label:W.label,sub:me("cmdk.group.pages"),Icon:W.icon,run:()=>e(W.to)}))),R=(h||[]).map(j=>({kind:"skill",id:`skill:${j.id||j.directory}`,label:j.name||j.directory,sub:j.repoOwner&&j.repoName?`${j.repoOwner}/${j.repoName}`:me("cmdk.group.skills"),provider:(j.targets||[])[0]||"claude",run:()=>e(`/skills?skill=${encodeURIComponent(j.directory||j.id)}`)}));return[...E,...R]},[e,h]),k=b.useMemo(()=>{const E=i.trim().toLowerCase();return E?v.filter(R=>R.label.toLowerCase().includes(E)||String(R.sub||"").toLowerCase().includes(E)):v},[v,i]);b.useEffect(()=>{l>=k.length&&u(k.length?k.length-1:0)},[l,k.length]),b.useEffect(()=>{if(!n)return;g.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,n]);const w=b.useCallback(()=>a(!1),[]),S=b.useCallback(E=>{E&&(w(),E.run())},[w]),P=E=>{E.key==="ArrowDown"?(E.preventDefault(),u(R=>Math.min(R+1,Math.max(0,k.length-1)))):E.key==="ArrowUp"?(E.preventDefault(),u(R=>Math.max(R-1,0))):E.key==="Enter"?(E.preventDefault(),S(k[l])):E.key==="Escape"&&(E.preventDefault(),w())},L={duration:t?0:.12},A=t?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return C.jsx($x,{children:n?C.jsxs(Cl.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:t?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:L,children:[C.jsx("button",{type:"button","aria-label":me("cmdk.close"),onClick:w,className:"absolute inset-0 cursor-default bg-oai-black/40"}),C.jsxs(Cl.div,{role:"dialog","aria-modal":"true","aria-label":me("cmdk.open_aria"),initial:t?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:t?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:A,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[C.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[C.jsx(VA,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),C.jsx("input",{ref:p,type:"text",value:i,onChange:E=>{o(E.target.value),u(0)},onKeyDown:P,"aria-label":me("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":k[l]?`cmdk-opt-${l}`:void 0,role:"combobox","aria-expanded":"true",placeholder:me("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),C.jsx("div",{ref:g,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:k.length===0?C.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:me("cmdk.empty")}):k.map((E,R)=>{const j=R===l;return C.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${R}`,"data-cmdk-index":R,"aria-selected":j,onMouseMove:()=>u(R),onClick:()=>S(E),className:Pt("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",j?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[C.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:E.kind==="skill"?C.jsx(YN,{provider:E.provider,size:16}):C.jsx(E.Icon,{className:"h-4 w-4","aria-hidden":!0})}),C.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:E.label}),C.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:E.sub}),j?C.jsx(xA,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},E.id)})})]})]}):null})}const QN=[];function Jg(e){b.useEffect(e,QN)}const Lk={};function yo(e,t){const n=b.useRef(Lk);return n.current===Lk&&(n.current=e(t)),n}function eO(e,t){return function(a,...i){const o=new URL(e);return o.searchParams.set("code",a.toString()),i.forEach(l=>o.searchParams.append("args[]",l)),`${t} error #${a}; visit ${o} for the full message.`}}const vo=eO("https://base-ui.com/production-error","Base UI"),Qg=b.createContext(void 0);function e0(){const e=b.useContext(Qg);if(!e)throw new Error(vo(73));return e}const Sa=(e,t,n,a,i,o,...l)=>{if(l.length>0)throw new Error(vo(1));let u;if(e&&t&&n&&a&&i&&o)u=(h,f,p,g)=>{const v=e(h,f,p,g),k=t(h,f,p,g),w=n(h,f,p,g),S=a(h,f,p,g),P=i(h,f,p,g);return o(v,k,w,S,P,f,p,g)};else if(e&&t&&n&&a&&i)u=(h,f,p,g)=>{const v=e(h,f,p,g),k=t(h,f,p,g),w=n(h,f,p,g),S=a(h,f,p,g);return i(v,k,w,S,f,p,g)};else if(e&&t&&n&&a)u=(h,f,p,g)=>{const v=e(h,f,p,g),k=t(h,f,p,g),w=n(h,f,p,g);return a(v,k,w,f,p,g)};else if(e&&t&&n)u=(h,f,p,g)=>{const v=e(h,f,p,g),k=t(h,f,p,g);return n(v,k,f,p,g)};else if(e&&t)u=(h,f,p,g)=>{const v=e(h,f,p,g);return t(v,f,p,g)};else if(e)u=e;else throw new Error("Missing arguments");return u};var fp={exports:{}},pp={};var Dk;function tO(){if(Dk)return pp;Dk=1;var e=zl();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(g,v){var k=v(),w=a({inst:{value:k,getSnapshot:v}}),S=w[0].inst,P=w[1];return o(function(){S.value=k,S.getSnapshot=v,h(S)&&P({inst:S})},[g,k,v]),i(function(){return h(S)&&P({inst:S}),g(function(){h(S)&&P({inst:S})})},[g]),l(k),k}function h(g){var v=g.getSnapshot;g=g.value;try{var k=v();return!n(g,k)}catch{return!0}}function f(g,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return pp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,pp}var Ik;function xP(){return Ik||(Ik=1,fp.exports=tO()),fp.exports}var nO=xP(),mp={exports:{}},gp={};var Mk;function aO(){if(Mk)return gp;Mk=1;var e=zl(),t=xP();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var a=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,u=e.useMemo,h=e.useDebugValue;return gp.useSyncExternalStoreWithSelector=function(f,p,g,v,k){var w=o(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=u(function(){function L(W){if(!A){if(A=!0,E=W,W=v(W),k!==void 0&&S.hasValue){var F=S.value;if(k(F,W))return R=F}return R=W}if(F=R,a(E,W))return F;var T=v(W);return k!==void 0&&k(F,T)?(E=W,F):(E=W,R=T)}var A=!1,E,R,j=g===void 0?null:g;return[function(){return L(p())},j===null?void 0:function(){return L(j())}]},[p,g,v,k]);var P=i(f,w[0],w[1]);return l(function(){S.hasValue=!0,S.value=P},[P]),h(P),P},gp}var Nk;function rO(){return Nk||(Nk=1,mp.exports=aO()),mp.exports}var iO=rO();const sO=parseInt(b.version,10);function t0(e){return sO>=e}const oO=t0(19),lO=oO?uO:dO;function PP(e,t,n,a,i){return lO(e,t,n,a,i)}function cO(e,t,n,a,i){const o=b.useCallback(()=>t(e.getSnapshot(),n,a,i),[e,t,n,a,i]);return nO.useSyncExternalStore(e.subscribe,o,o)}function uO(e,t,n,a,i){return cO(e,t,n,a,i)}function dO(e,t,n,a,i){return iO.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,a,i))}class hO{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const a of this.listeners){if(n!==this.updateTick)return;a(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,a,i){return PP(this,t,n,a,i)}}const n0={...e1},yp=n0.useInsertionEffect,fO=yp&&yp!==n0.useLayoutEffect?yp:e=>e();function Qi(e){const t=yo(pO).current;return t.next=e,fO(t.effect),t.trampoline}function pO(){const e={next:void 0,callback:mO,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function mO(){}const gO=()=>{},Za=typeof document<"u"?b.useLayoutEffect:gO;function yO(){}const Qz=Object.freeze([]),Vi=Object.freeze({});class vO extends hO{constructor(t,n={},a){super(t),this.context=n,this.selectors=a}useSyncedValue(t,n){b.useDebugValue(t);const a=this;Za(()=>{a.state[t]!==n&&a.set(t,n)},[a,t,n])}useSyncedValueWithCleanup(t,n){const a=this;Za(()=>(a.state[t]!==n&&a.set(t,n),()=>{a.set(t,void 0)}),[a,t,n])}useSyncedValues(t){const n=this,a=Object.values(t);Za(()=>{n.update(t)},[n,...a])}useControlledProp(t,n){b.useDebugValue(t);const a=this,i=n!==void 0;Za(()=>{i&&!Object.is(a.state[t],n)&&a.setState({...a.state,[t]:n})},[a,t,n,i])}select(t,n,a,i){const o=this.selectors[t];return o(this.state,n,a,i)}useState(t,n,a,i){return b.useDebugValue(t),PP(this,this.selectors[t],n,a,i)}useContextCallback(t,n){b.useDebugValue(t);const a=Qi(n??yO);this.context[t]=a}useStateSetter(t){const n=b.useRef(void 0);return n.current===void 0&&(n.current=a=>{this.set(t,a)}),n.current}observe(t,n){let a;typeof t=="function"?a=t:a=this.selectors[t];let i=a(this.state);return n(i,i,this),this.subscribe(o=>{const l=a(o);if(!Object.is(i,l)){const u=i;i=l,n(l,u,this)}})}}function qd(){return typeof window<"u"}function Ia(e){return a0(e)?(e.nodeName||"").toLowerCase():"#document"}function Tr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bO(e){var t;return(t=(a0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function a0(e){return qd()?e instanceof Node||e instanceof Tr(e).Node:!1}function r0(e){return qd()?e instanceof Element||e instanceof Tr(e).Element:!1}function fi(e){return qd()?e instanceof HTMLElement||e instanceof Tr(e).HTMLElement:!1}function Td(e){return!qd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Tr(e).ShadowRoot}function SP(e){const{overflow:t,overflowX:n,overflowY:a,display:i}=Yd(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&i!=="inline"&&i!=="contents"}function eF(e){return/^(table|td|th)$/.test(Ia(e))}function _O(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const kO=/transform|translate|scale|rotate|perspective|filter/,wO=/paint|layout|strict|content/,Mi=e=>!!e&&e!=="none";let vp;function xO(e){const t=r0(e)?Yd(e):e;return Mi(t.transform)||Mi(t.translate)||Mi(t.scale)||Mi(t.rotate)||Mi(t.perspective)||!PO()&&(Mi(t.backdropFilter)||Mi(t.filter))||kO.test(t.willChange||"")||wO.test(t.contain||"")}function tF(e){let t=Sm(e);for(;fi(t)&&!CP(t);){if(xO(t))return t;if(_O(t))return null;t=Sm(t)}return null}function PO(){return vp==null&&(vp=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vp}function CP(e){return/^(html|body|#document)$/.test(Ia(e))}function Yd(e){return Tr(e).getComputedStyle(e)}function nF(e){return r0(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sm(e){if(Ia(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Td(e)&&e.host||bO(e);return Td(t)?t.host:t}function TP(e){const t=Sm(e);return CP(t)?e.ownerDocument?e.ownerDocument.body:e.body:fi(t)&&SP(t)?t:TP(t)}function Ok(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=TP(e),o=i===((a=e.ownerDocument)==null?void 0:a.body),l=Tr(i);if(o){const u=SO(l);return t.concat(l,l.visualViewport||[],SP(i)?i:[],u&&n?Ok(u):[])}else return t.concat(i,Ok(i,[],n))}function SO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function EP(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function La(e){return e?.ownerDocument||document}function Hi(e,t,n,a){return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}const ku=null;class CO{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let i=0;i<n.length;i+=1)n[i]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const wu=new CO;class i0{static create(){return new i0}static request(t){return wu.request(t)}static cancel(t){return wu.cancel(t)}currentId=ku;request(t){this.cancel(),this.currentId=wu.request(()=>{this.currentId=ku,t()})}cancel=()=>{this.currentId!==ku&&(wu.cancel(this.currentId),this.currentId=ku)};disposeEffect=()=>this.cancel}function TO(){const e=yo(i0.create).current;return Jg(e.disposeEffect),e}const cl=0;class Ul{static create(){return new Ul}currentId=cl;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=cl,n()},t)}isStarted(){return this.currentId!==cl}clear=()=>{this.currentId!==cl&&(clearTimeout(this.currentId),this.currentId=cl)};disposeEffect=()=>this.clear}function EO(){const e=yo(Ul.create).current;return Jg(e.disposeEffect),e}let jk=0;function RP(e){return jk+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${jk}`}function bp(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const bo=typeof navigator<"u",_p=AO(),AP=DO(),LP=LO(),aF=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),rF=_p.platform==="MacIntel"&&_p.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(_p.platform),RO=bo&&/apple/i.test(navigator.vendor),Cm=bo&&/android/i.test(AP)||/android/i.test(LP);bo&&AP.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const DP=LP.includes("jsdom/");function AO(){if(!bo)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function LO(){if(!bo)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function DO(){if(!bo)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Uk="data-base-ui-focusable",IP="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",kp="ArrowLeft",wp="ArrowRight",IO="ArrowUp",MO="ArrowDown";function Ys(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Er(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Td(n)){let a=t;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function $i(e){return"composedPath"in e?e.composedPath()[0]:e.target}function iF(e,t){if(!r0(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,a]of t.entries())if(Er(a,n))return!a.hasAttribute("data-trigger-disabled");return!1}function sF(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function oF(e){return e.matches("html,body")}function NO(e){return fi(e)&&e.matches(IP)}function lF(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${IP}`)!=null}function cF(e){return e?e.getAttribute("role")==="combobox"&&NO(e):!1}function Tm(e){if(!e||DP)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function uF(e){return e?e.hasAttribute(Uk)?e:e.querySelector(`[${Uk}]`)||e:null}function xp(e){e.preventDefault(),e.stopPropagation()}function dF(e){return"nativeEvent"in e}function hF(e){return e.pointerType===""&&e.isTrusted?!0:Cm&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fF(e){return DP?!1:!Cm&&e.width===0&&e.height===0||Cm&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function pF(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function mF(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const gF=["top","right","bottom","left"],OO=Math.min,jO=Math.max,yF=Math.round,Pp=Math.floor,vF=e=>({x:e,y:e}),UO={left:"right",right:"left",bottom:"top",top:"bottom"};function bF(e,t,n){return jO(e,OO(t,n))}function _F(e,t){return typeof e=="function"?e(t):e}function MP(e){return e.split("-")[0]}function NP(e){return e.split("-")[1]}function zO(e){return e==="x"?"y":"x"}function FO(e){return e==="y"?"height":"width"}function BO(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function VO(e){return zO(BO(e))}function kF(e,t,n){n===void 0&&(n=!1);const a=NP(e),i=VO(e),o=FO(i);let l=i==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Rm(l)),[l,Rm(l)]}function wF(e){const t=Rm(e);return[Em(e),t,Em(t)]}function Em(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const zk=["left","right"],Fk=["right","left"],HO=["top","bottom"],$O=["bottom","top"];function WO(e,t,n){switch(e){case"top":case"bottom":return n?t?Fk:zk:t?zk:Fk;case"left":case"right":return t?HO:$O;default:return[]}}function xF(e,t,n,a){const i=NP(e);let o=WO(MP(e),n==="start",a);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Em)))),o}function Rm(e){const t=MP(e);return UO[t]+e.slice(t.length)}function GO(e){return{top:0,right:0,bottom:0,left:0,...e}}function PF(e){return typeof e!="number"?GO(e):{top:e,right:e,bottom:e,left:e}}function SF(e){const{x:t,y:n,width:a,height:i}=e;return{width:a,height:i,top:n,left:t,right:t+a,bottom:n+i,x:t,y:n}}function xu(e,t,n){return Math.floor(e/t)!==n}function Bk(e,t){return t<0||t>=e.length}function CF(e,t){return Ea(e.current,{disabledIndices:t})}function TF(e,t){return Ea(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ea(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:a,amount:i=1}={}){let o=t;do o+=n?-i:i;while(o>=0&&o<=e.length-1&&Am(e,o,a));return o}function EF(e,{event:t,orientation:n,loopFocus:a,onLoop:i,rtl:o,cols:l,disabledIndices:u,minIndex:h,maxIndex:f,prevIndex:p,stopEvent:g=!1}){let v=p,k;if(t.key===IO?k="up":t.key===MO&&(k="down"),k){const w=[],S=[];let P=!1,L=0;{let B=null,V=-1;e.forEach((ee,se)=>{if(ee==null)return;L+=1;const fe=ee.closest('[role="row"]');fe&&(P=!0),(fe!==B||V===-1)&&(B=fe,V+=1,w[V]=[]),w[V].push(se),S[se]=V})}let A=!1,E=0;if(P)for(const B of w){const V=B.length;V>E&&(E=V),V!==l&&(A=!0)}const R=A&&L<e.length,j=E||l,W=B=>{if(!A||p===-1)return;const V=S[p];if(V==null)return;const ee=w[V].indexOf(p),se=B==="up"?-1:1;for(let fe=V+se,de=0;de<w.length;de+=1,fe+=se){if(fe<0||fe>=w.length){if(!a||R)return;if(fe=fe<0?w.length-1:0,i){const ie=Math.min(ee,w[fe].length-1),X=w[fe][ie]??w[fe][0],q=i(t,p,X);fe=S[q]??fe}}const he=w[fe];for(let ie=Math.min(ee,he.length-1);ie>=0;ie-=1){const X=he[ie];if(!Am(e,X,u))return X}}},F=B=>{if(!R||p===-1)return;const V=p%j,ee=B==="up"?-j:j,se=f-f%j,fe=Pp(f/j)+1;for(let de=p-V+ee,he=0;he<fe;he+=1,de+=ee){if(de<0||de>f){if(!a)return;de=de<0?se:0}const ie=Math.min(de+j-1,f);for(let X=Math.min(de+V,ie);X>=de;X-=1)if(!Am(e,X,u))return X}};g&&xp(t);const T=W(k)??F(k);if(T!==void 0)v=T;else if(p===-1)v=k==="up"?f:h;else if(v=Ea(e,{startingIndex:p,amount:j,decrement:k==="up",disabledIndices:u}),a){if(k==="up"&&(p-j<h||v<0)){const B=p%j,V=f%j,ee=f-(V-B);V===B?v=f:v=V>B?ee:ee-j,i&&(v=i(t,p,v))}k==="down"&&p+j>f&&(v=Ea(e,{startingIndex:p%j-j,amount:j,disabledIndices:u}),i&&(v=i(t,p,v)))}Bk(e,v)&&(v=p)}if(n==="both"){const w=Pp(p/l);t.key===(o?kp:wp)&&(g&&xp(t),p%l!==l-1?(v=Ea(e,{startingIndex:p,disabledIndices:u}),a&&xu(v,l,w)&&(v=Ea(e,{startingIndex:p-p%l-1,disabledIndices:u}),i&&(v=i(t,p,v)))):a&&(v=Ea(e,{startingIndex:p-p%l-1,disabledIndices:u}),i&&(v=i(t,p,v))),xu(v,l,w)&&(v=p)),t.key===(o?wp:kp)&&(g&&xp(t),p%l!==0?(v=Ea(e,{startingIndex:p,decrement:!0,disabledIndices:u}),a&&xu(v,l,w)&&(v=Ea(e,{startingIndex:p+(l-p%l),decrement:!0,disabledIndices:u}),i&&(v=i(t,p,v)))):a&&(v=Ea(e,{startingIndex:p+(l-p%l),decrement:!0,disabledIndices:u}),i&&(v=i(t,p,v))),xu(v,l,w)&&(v=p));const S=Pp(f/l)===w;Bk(e,v)&&(a&&S?(v=t.key===(o?wp:kp)?f:Ea(e,{startingIndex:p-p%l-1,disabledIndices:u}),i&&(v=i(t,p,v))):v=p)}return v}function RF(e,t,n){const a=[];let i=0;return e.forEach(({width:o,height:l},u)=>{let h=!1;for(;!h;){const f=[];for(let p=0;p<o;p+=1)for(let g=0;g<l;g+=1)f.push(i+p+g*t);i%t+o<=t&&f.every(p=>a[p]==null)?(f.forEach(p=>{a[p]=u}),h=!0):i+=1}}),[...a]}function AF(e,t,n,a,i){if(e===-1)return-1;const o=n.indexOf(e),l=t[e];switch(i){case"tl":return o;case"tr":return l?o+l.width-1:o;case"bl":return l?o+(l.height-1)*a:o;case"br":return n.lastIndexOf(e);default:return-1}}function LF(e,t){return t.flatMap((n,a)=>e.includes(n)?[a]:[])}function Am(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const i=e[t];return i?OP(i)?!n&&(i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"):!0:!1}function KO(e){return e.visibility==="hidden"||e.visibility==="collapse"}function OP(e,t=e?Yd(e):null){return!e||!e.isConnected||!t||KO(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const qO='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function YO(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return Td(n)?n.host:null}function Lm(e){for(const t of Array.from(e.children))if(Ia(t)==="summary")return t;return null}function ZO(e,t){const n=Lm(t);return!!n&&(e===n||Er(n,e))}function jP(e){const t=e?Ia(e):"";return e!=null&&e.matches(qO)&&(t!=="summary"||e.parentElement!=null&&Ia(e.parentElement)==="details"&&Lm(e.parentElement)===e)&&(t!=="details"||Lm(e)==null)&&(t!=="input"||e.type!=="hidden")}function UP(e){if(!jP(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=YO(t)){const n=t!==e,a=Ia(t)==="slot";if(t.hasAttribute("inert")||n&&Ia(t)==="details"&&!t.open&&!ZO(e,t)||t.hasAttribute("hidden")||!a&&!XO(t,n))return!1}return!0}function XO(e,t){const n=Yd(e);return t?n.display!=="none":OP(e,n)}function zP(e){const t=e.tabIndex;if(t<0){const n=Ia(e);if(n==="details"||n==="audio"||n==="video"||fi(e)&&e.isContentEditable)return 0}return t}function Sp(e){if(Ia(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function JO(e,t){const n=Sp(e);if(!n)return!0;const a=t.find(i=>{const o=Sp(i);return o?.name===n.name&&o.form===n.form&&o.checked});return a?a===n:t.find(i=>{const o=Sp(i);return o?.name===n.name&&o.form===n.form})===n}function FP(e){if(fi(e)&&Ia(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return fi(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function BP(e,t){FP(e).forEach(n=>{jP(n)&&t.push(n),BP(n,t)})}function VP(e,t,n){FP(e).forEach(a=>{fi(a)&&a.matches(t)&&n.push(a),VP(a,t,n)})}function DF(e){return UP(e)&&zP(e)>=0}function QO(e){const t=[];return BP(e,t),t.filter(UP)}function s0(e){const t=QO(e);return t.filter(n=>zP(n)>=0&&JO(n,t))}function HP(e,t){const n=s0(e),a=n.length;if(a===0)return;const i=Ys(La(e)),o=n.indexOf(i),l=o===-1?t===1?0:a-1:o+t;return n[l]}function ej(e){return HP(La(e).body,1)||e}function tj(e){return HP(La(e).body,-1)||e}function $P(e,t){if(!e)return null;const n=s0(La(e).body),a=n.length;if(a===0)return null;const i=n.indexOf(e);if(i===-1)return null;const o=(i+t+a)%a;return n[o]}function IF(e){return $P(e,1)}function MF(e){return $P(e,-1)}function Cp(e,t){const n=t||e.currentTarget,a=e.relatedTarget;return!a||!Er(n,a)}function nj(e){s0(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Vk(e){const t=[];VP(e,"[data-tabindex]",t),t.forEach(n=>{const a=n.dataset.tabindex;delete n.dataset.tabindex,a?n.setAttribute("tabindex",a):n.removeAttribute("tabindex")})}function Tp(e){const t=new Map;let n=0,a=0;return e.forEach((i,o)=>{const l=i.transitionStatus==="ending";t.set(i.id,{value:i,domIndex:o,visibleIndex:l?-1:n,offsetY:a}),a+=i.height||0,l||(n+=1)}),t}const Pu=e=>e.toastMetadata,$a={toasts:Sa(e=>e.toasts),isEmpty:Sa(e=>e.toasts.length===0),toast:Sa(Pu,(e,t)=>e.get(t)?.value),toastIndex:Sa(Pu,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:Sa(Pu,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:Sa(Pu,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:Sa(e=>e.hovering),focused:Sa(e=>e.focused),expanded:Sa(e=>e.hovering||e.focused),expandedOrOutOfFocus:Sa(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Sa(e=>e.prevFocusElement)};class aj extends vO{timers=new Map;areTimersPaused=!1;constructor(t){super({...t,toastMetadata:Tp(t.toasts)},{},$a)}setFocused(t){this.set("focused",t)}setHovering(t){this.set("hovering",t)}setIsWindowFocused(t){this.set("isWindowFocused",t)}setPrevFocusElement(t){this.set("prevFocusElement",t)}setViewport=t=>{this.set("viewport",t)};disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t,n={}){const a=$a.toastIndex(this.state,t);if(a===-1)return;const i=this.state.toasts[a];n.skipOnRemove||i?.onRemove?.();const o=[...this.state.toasts];o.splice(a,1),this.setToasts(o)}addToast=t=>{const{timeout:n,limit:a}=this.state,i=t.id||RP("toast");if(t.id){const f=$a.toast(this.state,t.id);if(f)if(f.transitionStatus==="ending")this.removeToast(t.id,{skipOnRemove:!0});else{const{id:p,transitionStatus:g,...v}=t;return this.updateToastInternal(t.id,v,{resetTimer:!0,markUpdated:!0}),t.id}}const o={...t,id:i,updateKey:0,transitionStatus:"starting"},l=[o,...this.state.toasts],u=l.filter(f=>f.transitionStatus!=="ending");if(u.length>a){const f=u.length-a,p=u.slice(-f),g=new Set(p.map(v=>v.id));this.setToasts(l.map(v=>{const k=g.has(v.id);return v.limited!==k?{...v,limited:k}:v}))}else this.setToasts(l.map(f=>f.limited?{...f,limited:!1}:f));const h=o.timeout??n;return o.type!=="loading"&&h>0&&this.scheduleTimer(i,h,()=>this.closeToast(i)),$a.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(t,n)=>{this.updateToastInternal(t,n,{markUpdated:!0})};updateToastInternal=(t,n,a={})=>{const{timeout:i,toasts:o}=this.state,l=$a.toast(this.state,t)??null;if(!l||l.transitionStatus==="ending")return;const u={...l,...n,...a.markUpdated&&{updateKey:(l.updateKey??0)+1}};this.setToasts(o.map(S=>S.id===t?u:S));const h=u.timeout??i,f=l?.timeout??i,p=Object.hasOwn(n,"timeout"),g=u.transitionStatus!=="ending"&&u.type!=="loading"&&h>0,v=this.timers.has(t),k=f!==h,w=l?.type==="loading";if(!g&&v){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t);return}if(g&&(!v||k||p||w||a.resetTimer)){const S=this.timers.get(t);S&&(S.timeout?.clear(),this.timers.delete(t)),this.scheduleTimer(t,h,()=>this.closeToast(t)),$a.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=t=>{const n=t===void 0,{limit:a,toasts:i}=this.state;let o;if(n)o=i,this.timers.forEach(f=>{f.timeout?.clear()}),this.timers.clear();else{const f=$a.toast(this.state,t);if(!f)return;o=[f];const p=this.timers.get(t);p?.timeout&&(p.timeout.clear(),this.timers.delete(t))}let l=0;const u=i.map(f=>{if(n||f.id===t)return{...f,transitionStatus:"ending",height:0};if(f.transitionStatus==="ending")return f;const p=l>=a;return l+=1,f.limited!==p?{...f,limited:p}:f}),h={toasts:u,toastMetadata:Tp(u)};(n||i.length===1)&&(h.hovering=!1,h.focused=!1),this.update(h),o.forEach(f=>{f.transitionStatus!=="ending"&&f.onClose?.()}),this.handleFocusManagement(t)};promiseToast=(t,n)=>{const a=bp(n.loading),i=this.addToast({...a,type:"loading"}),o=t.then(l=>{const u=bp(n.success,l);return this.updateToast(i,{...u,type:"success",timeout:u.timeout}),l}).catch(l=>{const u=bp(n.error,l);return this.updateToast(i,{...u,type:"error",timeout:u.timeout}),Promise.reject(l)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(o),o};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{if(t.timeout){t.timeout.clear();const n=Date.now()-t.start,a=t.delay-n;t.remaining=a>0?a:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,n)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=Ul.create(),t.timeout.start(t.remaining,()=>{this.timers.delete(n),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;const n=$i(t);Er(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,n,a){const i=Date.now(),o=!$a.expandedOrOutOfFocus(this.state),l=o?Ul.create():void 0;l?.start(n,()=>{this.timers.delete(t),a()}),this.timers.set(t,{timeout:l,start:o?i:0,delay:n,remaining:n,callback:a})}setToasts(t){const n={toasts:t,toastMetadata:Tp(t)};t.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(t){const n=Ys(La(this.state.viewport));if(!this.state.viewport||!Er(this.state.viewport,n)||!Tm(n))return;if(t===void 0){this.restoreFocusToPrevElement();return}const a=$a.toasts(this.state),i=$a.toastIndex(this.state,t);let o=null,l=i+1;for(;l<a.length;){if(a[l].transitionStatus!=="ending"){o=a[l];break}l+=1}if(!o)for(l=i-1;l>=0;){if(a[l].transitionStatus!=="ending"){o=a[l];break}l-=1}o?o.ref?.current?.focus():this.restoreFocusToPrevElement()}}const rj=function(t){const{children:n,timeout:a=5e3,limit:i=3,toastManager:o}=t,l=yo(()=>new aj({timeout:a,limit:i,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Jg(l.disposeEffect),b.useEffect(function(){return o?o[" subscribe"](({action:f,options:p})=>{const g=p.id;f==="promise"&&p.promise?l.promiseToast(p.promise,p):f==="update"&&g?l.updateToast(g,p):f==="close"?l.closeToast(g):l.addToast(p)}):void 0},[l,o]),l.useSyncedValues({timeout:a,limit:i}),C.jsx(Qg.Provider,{value:l,children:n})},WP={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},GP={...WP,position:"fixed",top:0,left:0},NF={...WP,position:"absolute"},Tl=b.forwardRef(function(t,n){const[a,i]=b.useState();Za(()=>{RO&&i("button")},[]);const o={tabIndex:0,role:a};return C.jsx("span",{...t,ref:n,style:GP,"aria-hidden":a?void 0:!0,...o,"data-base-ui-focus-guard":""})});function Hk(e,t,n,a){const i=yo(KP).current;return sj(i,e,t,n,a)&&qP(i,[e,t,n,a]),i.callback}function ij(e){const t=yo(KP).current;return oj(t,e)&&qP(t,e),t.callback}function KP(){return{callback:null,cleanup:null,refs:[]}}function sj(e,t,n,a,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==a||e.refs[3]!==i}function oj(e,t){return e.refs.length!==t.length||e.refs.some((n,a)=>n!==t[a])}function qP(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const a=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const l=o(n);typeof l=="function"&&(a[i]=l);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const l=a[i];typeof l=="function"?l():o(null);break}case"object":{o.current=null;break}}}}}}}function $k(e){if(!b.isValidElement(e))return null;const t=e,n=t.props;return(t0(19)?n?.ref:t.ref)??null}function Dm(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function lj(e,t){const n={};for(const a in e){const i=e[a];if(t?.hasOwnProperty(a)){const o=t[a](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${a.toLowerCase()}`]="":i&&(n[`data-${a.toLowerCase()}`]=i.toString())}return n}function cj(e,t){return typeof e=="function"?e(t):e}function uj(e,t){return typeof e=="function"?e(t):e}const o0={};function l0(e,t,n,a,i){if(!n&&!a&&!i&&!e)return Ed(t);let o=Ed(e);return t&&(o=gl(o,t)),n&&(o=gl(o,n)),a&&(o=gl(o,a)),i&&(o=gl(o,i)),o}function dj(e){if(e.length===0)return o0;if(e.length===1)return Ed(e[0]);let t=Ed(e[0]);for(let n=1;n<e.length;n+=1)t=gl(t,e[n]);return t}function Ed(e){return c0(e)?{...ZP(e,o0)}:hj(e)}function gl(e,t){return c0(t)?ZP(t,e):fj(e,t)}function hj(e){const t={...e};for(const n in t){const a=t[n];YP(n,a)&&(t[n]=XP(a))}return t}function fj(e,t){if(!t)return e;for(const n in t){const a=t[n];switch(n){case"style":{e[n]=Dm(e.style,a);break}case"className":{e[n]=JP(e.className,a);break}default:YP(n,a)?e[n]=pj(e[n],a):e[n]=a}}return e}function YP(e,t){const n=e.charCodeAt(0),a=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&a===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function c0(e){return typeof e=="function"}function ZP(e,t){return c0(e)?e(t):e??o0}function pj(e,t){return t?e?(...n)=>{const a=n[0];if(QP(a)){const o=a;Rd(o);const l=t(...n);return o.baseUIHandlerPrevented||e?.(...n),l}const i=t(...n);return e?.(...n),i}:XP(t):e}function XP(e){return e&&((...t)=>{const n=t[0];return QP(n)&&Rd(n),e(...t)})}function Rd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function JP(e,t){return t?e?t+" "+e:t:e}function QP(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ec(e,t,n={}){const a=t.render,i=mj(t,n);if(n.enabled===!1)return null;const o=n.state??Vi;return vj(e,a,i,o)}function mj(e,t={}){const{className:n,style:a,render:i}=e,{state:o=Vi,ref:l,props:u,stateAttributesMapping:h,enabled:f=!0}=t,p=f?cj(n,o):void 0,g=f?uj(a,o):void 0,v=f?lj(o,h):Vi,k=f&&u?gj(u):void 0,w=f?Dm(v,k)??{}:Vi;return typeof document<"u"&&(f?Array.isArray(l)?w.ref=ij([w.ref,$k(i),...l]):w.ref=Hk(w.ref,$k(i),l):Hk(null,null)),f?(p!==void 0&&(w.className=JP(w.className,p)),g!==void 0&&(w.style=Dm(w.style,g)),w):Vi}function gj(e){return Array.isArray(e)?dj(e):l0(void 0,e)}const yj=Symbol.for("react.lazy");function vj(e,t,n,a){if(t){if(typeof t=="function")return t(n,a);const i=l0(n,t.props);i.ref=n.ref;let o=t;return o?.$$typeof===yj&&(o=b.Children.toArray(t)[0]),b.cloneElement(o,i)}if(e&&typeof e=="string")return bj(e,n);throw new Error(vo(8))}function bj(e,t){return e==="button"?b.createElement("button",{type:"button",...t,key:t.key}):e==="img"?b.createElement("img",{alt:"",...t,key:t.key}):b.createElement(e,t)}let _j=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const kj=b.forwardRef(function(t,n){const{render:a,className:i,style:o,children:l,...u}=t,h=e0(),f=EO(),p=b.useRef(!1),g=b.useRef(!1),v=b.useRef(!1),k=h.useState("isEmpty"),w=h.useState("toasts"),S=h.useState("focused"),P=h.useState("expanded"),L=h.useState("prevFocusElement"),A=w[0]?.height??0,E=b.useMemo(()=>w.some(X=>X.transitionStatus==="ending"),[w]),R=b.useMemo(()=>w.filter(X=>X.priority==="high"),[w]);b.useEffect(()=>{const X=h.state.viewport;if(!X)return;function q(H){k||H.key==="F6"&&$i(H)!==X&&(H.preventDefault(),h.setPrevFocusElement(Ys(La(X))),X?.focus({preventScroll:!0}),h.pauseTimers(),h.setFocused(!0))}const J=Tr(X);return Hi(J,"keydown",q)},[h,k]),b.useEffect(()=>{const X=h.state.viewport;if(!X||k)return;const q=Tr(X);function J(M){$i(M)===q&&(h.setIsWindowFocused(!1),h.pauseTimers())}function H(M){if(M.relatedTarget)return;const Z=$i(M),_e=Ys(La(X));(Z===q||!Er(X,Z)||!Tm(_e))&&h.resumeTimers(),f.start(0,()=>h.setIsWindowFocused(!0))}return EP(Hi(q,"blur",J,!0),Hi(q,"focus",H,!0))},[h,f,k]),b.useEffect(()=>{const X=h.state.viewport;if(!X||k)return;const q=La(X);return Hi(q,"pointerdown",h.handleDocumentPointerDown,!0)},[k,h]);function j(X){const q=h.state.viewport;q&&(p.current=!0,X.relatedTarget===q?w[0]?.ref?.current?.focus():h.restoreFocusToPrevElement())}function W(X){X.key==="Tab"&&X.shiftKey&&$i(X.nativeEvent)===h.state.viewport&&(X.preventDefault(),h.restoreFocusToPrevElement(),h.resumeTimers())}function F(){const X=h.state.toasts.some(q=>q.transitionStatus==="ending");!h.state.isWindowFocused||X||v.current||!g.current||(h.resumeTimers(),h.setHovering(!1),g.current=!1)}b.useEffect(F,[E,h]);function T(){h.pauseTimers(),h.setHovering(!0),g.current=!1}function B(){E||v.current?g.current=!0:(h.resumeTimers(),h.setHovering(!1))}function V(X){X.pointerType==="touch"&&(v.current=!0)}function ee(X){X.pointerType==="touch"&&(v.current=!1,F())}function se(){if(p.current){p.current=!1;return}S||Tm(Ys(La(h.state.viewport)))&&(h.setFocused(!0),h.pauseTimers())}function fe(X){!S||Er(h.state.viewport,X.relatedTarget)||(h.setFocused(!1),h.resumeTimers())}const de={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:T,onMouseMove:T,onMouseLeave:B,onFocus:se,onBlur:fe,onKeyDown:W,onClick:se,onPointerDown:V,onPointerUp:ee,onPointerCancel:ee},he={expanded:P},ie=ec("div",t,{ref:[n,h.setViewport],state:he,props:[de,{style:{[_j.frontmostHeight]:A?`${A}px`:void 0}},u,{children:C.jsxs(b.Fragment,{children:[!k&&L&&C.jsx(Tl,{onFocus:j}),l,!k&&L&&C.jsx(Tl,{onFocus:j})]})}]});return C.jsxs(b.Fragment,{children:[!k&&L&&C.jsx(Tl,{onFocus:j}),ie,!S&&R.length>0&&C.jsx("div",{style:GP,children:R.map(X=>C.jsxs("div",{role:"alert","aria-atomic":!0,children:[C.jsx("div",{children:X.title}),C.jsx("div",{children:X.description})]},X.id))})]})});function wj(e){return t0(19)?e:e?"true":void 0}const eS=b.createContext(void 0);function tS(){const e=b.useContext(eS);if(!e)throw new Error(vo(66));return e}let u0=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const xj={[u0.startingStyle]:""},Pj={[u0.endingStyle]:""},Sj={transitionStatus(e){return e==="starting"?xj:e==="ending"?Pj:null}};function Cj(e){return e==null?e:"current"in e?e.current:e}function Tj(e,t=!1,n=!0){const a=TO();return Qi((i,o=null)=>{a.cancel();const l=Cj(e);if(l==null)return;const u=l,h=()=>{oo.flushSync(i)};if(typeof u.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function f(){Promise.all(u.getAnimations().map(p=>p.finished)).then(()=>{o?.aborted||h()}).catch(()=>{if(n){o?.aborted||h();return}const p=u.getAnimations();!o?.aborted&&p.length>0&&p.some(g=>g.pending||g.playState!=="finished")&&f()})}if(t){const p=u0.startingStyle;if(!u.hasAttribute(p)){a.request(f);return}const g=new MutationObserver(()=>{u.hasAttribute(p)||(g.disconnect(),f())});g.observe(u,{attributes:!0,attributeFilter:[p]}),o?.addEventListener("abort",()=>g.disconnect(),{once:!0});return}a.request(f)})}function Ej(e){const{enabled:t=!0,open:n,ref:a,onComplete:i}=e,o=Qi(i),l=Tj(a,n,!1);b.useEffect(()=>{if(!t)return;const u=new AbortController;return l(o,u.signal),()=>{u.abort()}},[t,n,o,l])}let Ni=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const OF=500,jF={style:{transition:"none"}},UF="data-base-ui-click-trigger",Rj="data-base-ui-swipe-ignore",Aj="data-swipe-ignore",Lj=`[${Rj}]`,Dj=`[${Aj}]`,zF={fallbackAxisSide:"none"},FF={fallbackAxisSide:"end"},Ij={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Wk(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function Mj(e){const n=Tr(e).getComputedStyle(e).transform;let a=0,i=0,o=1;if(n&&n!=="none"){const l=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const u=l[1].split(", ").map(parseFloat);u.length===6?(a=u[4],i=u[5],o=Math.sqrt(u[0]*u[0]+u[1]*u[1])):u.length===16&&(a=u[12],i=u[13],o=u[0])}}return{x:a,y:i,scale:o}}const Nj={...Sj,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},ul=40,Oj=10,ni=.5,jj=1,Uj=`${Lj},${Dj}`,zj=b.forwardRef(function(t,n){const{toast:a,render:i,className:o,swipeDirection:l=["down","right"],style:u,...h}=t,f=a.positionerProps?.anchor!==void 0;let p=[];f||(p=Array.isArray(l)?l:[l]);const g=p.length>0,v=e0(),[k,w]=b.useState(void 0),[S,P]=b.useState(!1),[L,A]=b.useState(!1),[E,R]=b.useState(!1),[j,W]=b.useState({x:0,y:0}),[F,T]=b.useState({x:0,y:0,scale:1}),[B,V]=b.useState(),[ee,se]=b.useState(),[fe,de]=b.useState(null),he=b.useRef(null),ie=b.useRef({x:0,y:0}),X=b.useRef({x:0,y:0,scale:1}),q=b.useRef(void 0),J=b.useRef(0),H=b.useRef(!1),M=b.useRef({x:0,y:0}),Z=b.useRef(!1),_e=b.useRef({x:0,y:0}),ge=b.useRef(null),pe=b.useRef(null),ve=v.useState("toastIndex",a.id),Be=v.useState("toastVisibleIndex",a.id),Ke=v.useState("toastOffsetY",a.id),Ne=v.useState("focused"),At=v.useState("expanded");Ej({open:a.transitionStatus!=="ending",ref:he,onComplete(){a.transitionStatus==="ending"&&v.removeToast(a.id)}});const qt=Qi((Ge=!1)=>{const We=he.current;if(!We)return;const dt=We.style.height;We.style.height="auto";const Nt=We.offsetHeight;We.style.height=dt;function kt(){v.updateToastInternal(a.id,{ref:he,height:Nt,...a.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}Ge?oo.flushSync(kt):kt()});Za(qt,[qt]);function on(Ge){_e.current=Ge,W(Ge)}Za(()=>()=>{pe.current?.abort()},[]);function ft(Ge,We){let dt=Ge,Nt=We;return!p.includes("left")&&!p.includes("right")?dt=Ge>0?Ge**ni:-(Math.abs(Ge)**ni):(!p.includes("right")&&Ge>0&&(dt=Ge**ni),!p.includes("left")&&Ge<0&&(dt=-(Math.abs(Ge)**ni))),!p.includes("up")&&!p.includes("down")?Nt=We>0?We**ni:-(Math.abs(We)**ni):(!p.includes("down")&&We>0&&(Nt=We**ni),!p.includes("up")&&We<0&&(Nt=-(Math.abs(We)**ni))),{x:dt,y:Nt}}const Ut=Qi(Ge=>{if(Ge.pointerId!==ge.current)return;ge.current=null,pe.current?.abort(),pe.current=null,P(!1),A(!1),de(null);const We=X.current;if(Ge.type==="pointercancel"||H.current){on({x:We.x,y:We.y}),w(void 0);return}let dt=!1;const Nt=_e.current,kt=Nt.x-We.x,vt=Nt.y-We.y;let pt;for(const pa of p){switch(pa){case"right":kt>ul&&(dt=!0,pt="right");break;case"left":kt<-ul&&(dt=!0,pt="left");break;case"down":vt>ul&&(dt=!0,pt="down");break;case"up":vt<-ul&&(dt=!0,pt="up");break}if(dt)break}dt?(w(pt),R(!0),v.closeToast(a.id)):(on({x:We.x,y:We.y}),w(void 0))});function cr(Ge){if(Ge.button!==0)return;Ge.pointerType==="touch"&&v.pauseTimers();const We=$i(Ge.nativeEvent);if(We?We.closest(`button,a,input,textarea,[role="button"],${Uj}`):!1)return;if(H.current=!1,q.current=void 0,J.current=0,ge.current=Ge.pointerId,ie.current={x:Ge.clientX,y:Ge.clientY},M.current=ie.current,he.current){const kt=Mj(he.current);X.current=kt,T(kt),on({x:kt.x,y:kt.y})}v.setHovering(!0),P(!0),A(!1),de(null),Z.current=!0;const Nt=he.current;if(Nt){pe.current?.abort();const kt=new AbortController;pe.current=kt;const vt=La(Nt);vt.addEventListener("pointerup",Ut,{signal:kt.signal}),vt.addEventListener("pointercancel",Ut,{signal:kt.signal}),Nt.setPointerCapture?.(Ge.pointerId)}}function Rr(Ge){if(Ge.pointerId!==ge.current)return;Ge.preventDefault(),Z.current&&(ie.current={x:Ge.clientX,y:Ge.clientY},Z.current=!1);const{clientY:We,clientX:dt,movementX:Nt,movementY:kt}=Ge;(kt<0&&We>M.current.y||kt>0&&We<M.current.y)&&(M.current={x:M.current.x,y:We}),(Nt<0&&dt>M.current.x||Nt>0&&dt<M.current.x)&&(M.current={x:dt,y:M.current.y});const vt=dt-ie.current.x,pt=We-ie.current.y,pa=We-M.current.y,_o=dt-M.current.x;if(!L&&Math.sqrt(vt*vt+pt*pt)>=jj&&(A(!0),fe===null)){const ma=p.includes("left")||p.includes("right"),yi=p.includes("up")||p.includes("down");if(ma&&yi){const Ar=Math.abs(vt),Bn=Math.abs(pt);de(Ar>Bn?"horizontal":"vertical")}}let en;if(!q.current)fe==="vertical"?pt>0?en="down":pt<0&&(en="up"):fe==="horizontal"?vt>0?en="right":vt<0&&(en="left"):Math.abs(vt)>=Math.abs(pt)?en=vt>0?"right":"left":en=pt>0?"down":"up",en&&p.includes(en)&&(q.current=en,J.current=Wk(en,vt,pt),w(en));else{const Oa=q.current,ma=Wk(Oa,_o,pa);ma>ul?(H.current=!1,w(Oa)):!(p.includes("left")&&p.includes("right"))&&!(p.includes("up")&&p.includes("down"))&&J.current-ma>=Oj&&(H.current=!0)}const ur=ft(vt,pt);let wn=X.current.x,Na=X.current.y;fe==="horizontal"?(p.includes("left")||p.includes("right"))&&(wn+=ur.x):(fe==="vertical"||(p.includes("left")||p.includes("right"))&&(wn+=ur.x),(p.includes("up")||p.includes("down"))&&(Na+=ur.y)),on({x:wn,y:Na})}function Mt(Ge){if(Ge.key==="Escape"){if(!he.current||!Er(he.current,Ys(La(he.current))))return;v.closeToast(a.id)}}b.useEffect(()=>{if(!g)return;const Ge=he.current;if(!Ge)return;function We(dt){Er(Ge,$i(dt))&&dt.preventDefault()}return Hi(Ge,"touchmove",We,{passive:!1})},[g]);function qe(){if(!S&&j.x===F.x&&j.y===F.y&&!E)return{[Ni.swipeMovementX]:"0px",[Ni.swipeMovementY]:"0px"};const Ge=j.x-F.x,We=j.y-F.y;return{transition:S?"none":void 0,transform:S?`translateX(${j.x}px) translateY(${j.y}px) scale(${F.scale})`:void 0,[Ni.swipeMovementX]:`${Ge}px`,[Ni.swipeMovementY]:`${We}px`}}const nt=a.priority==="high",Lt={role:nt?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":B,"aria-describedby":ee,"aria-hidden":nt&&!Ne?!0:void 0,onPointerDown:g?cr:void 0,onPointerMove:g?Rr:void 0,onPointerUp:g?Ut:void 0,onPointerCancel:g?Ut:void 0,onKeyDown:Mt,inert:wj(a.limited),style:{...qe(),[Ni.index]:a.transitionStatus==="ending"?ve:Be,[Ni.offsetY]:`${Ke}px`,[Ni.height]:a.height?`${a.height}px`:void 0}},St=b.useMemo(()=>({rootRef:he,toast:a,titleId:B,setTitleId:V,descriptionId:ee,setDescriptionId:se,swiping:S,swipeDirection:k,recalculateHeight:qt,index:ve,visibleIndex:Be,expanded:At}),[a,B,ee,S,k,qt,ve,Be,At]),Ln={transitionStatus:a.transitionStatus,expanded:At,limited:a.limited||!1,type:a.type,swiping:St.swiping,swipeDirection:St.swipeDirection},is=ec("div",t,{ref:[n,St.rootRef],state:Ln,stateAttributesMapping:Nj,props:[Lt,h]});return C.jsx(eS.Provider,{value:St,children:is})});let Gk=0;function Fj(e,t="mui"){const[n,a]=b.useState(e),i=e||n;return b.useEffect(()=>{n==null&&(Gk+=1,a(`${t}-${Gk}`))},[n,t]),i}const Kk=n0.useId;function nS(e,t){if(Kk!==void 0){const n=Kk();return e??(t?`${t}-${n}`:n)}return Fj(e,t)}const Bj=b.forwardRef(function(t,n){const{render:a,className:i,style:o,id:l,children:u,...h}=t,{toast:f,setTitleId:p}=tS(),g=u??f.title,v=!!g,k=nS(l);Za(()=>{if(v)return p(k),()=>{p(void 0)}},[v,k,p]);const w={type:f.type},S=ec("h2",t,{ref:n,state:w,props:{...h,id:k,children:g}});return v?S:null}),Vj=b.createContext(void 0);function Hj(e=!1){const t=b.useContext(Vj);if(t===void 0&&!e)throw new Error(vo(16));return t}function $j(e){const{focusableWhenDisabled:t,disabled:n,composite:a=!1,tabIndex:i=0,isNativeButton:o}=e,l=a&&t!==!1,u=a&&t===!1;return{props:b.useMemo(()=>{const f={onKeyDown(p){n&&t&&p.key!=="Tab"&&p.preventDefault()}};return a||(f.tabIndex=i,!o&&n&&(f.tabIndex=t?i:-1)),(o&&(t||l)||!o&&n)&&(f["aria-disabled"]=n),o&&(!t||u)&&(f.disabled=n),f},[a,n,t,l,u,o,i])}}function Wj(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:a=0,native:i=!0,composite:o}=e,l=b.useRef(null),u=Hj(!0),h=o??u!==void 0,{props:f}=$j({focusableWhenDisabled:n,disabled:t,composite:h,tabIndex:a,isNativeButton:i}),p=b.useCallback(()=>{const k=l.current;Ep(k)&&h&&t&&f.disabled===void 0&&k.disabled&&(k.disabled=!1)},[t,f.disabled,h]);Za(p,[p]);const g=b.useCallback((k={})=>{const{onClick:w,onMouseDown:S,onKeyUp:P,onKeyDown:L,onPointerDown:A,...E}=k;return l0({onClick(R){if(t){R.preventDefault();return}w?.(R)},onMouseDown(R){t||S?.(R)},onKeyDown(R){if(t||(Rd(R),L?.(R),R.baseUIHandlerPrevented))return;const j=R.target===R.currentTarget,W=R.currentTarget,F=Ep(W),T=!i&&Gj(W),B=j&&(i?F:!T),V=R.key==="Enter",ee=R.key===" ",se=W.getAttribute("role"),fe=se?.startsWith("menuitem")||se==="option"||se==="gridcell";if(j&&h&&ee){if(R.defaultPrevented&&fe)return;R.preventDefault(),T||i&&F?(W.click(),R.preventBaseUIHandler()):B&&(w?.(R),R.preventBaseUIHandler());return}B&&(!i&&(ee||V)&&R.preventDefault(),!i&&V&&w?.(R))},onKeyUp(R){if(!t){if(Rd(R),P?.(R),R.target===R.currentTarget&&i&&h&&Ep(R.currentTarget)&&R.key===" "){R.preventDefault();return}R.baseUIHandlerPrevented||R.target===R.currentTarget&&!i&&!h&&R.key===" "&&w?.(R)}},onPointerDown(R){if(t){R.preventDefault();return}A?.(R)}},i?{type:"button"}:{role:"button"},f,E)},[t,f,h,i]),v=Qi(k=>{l.current=k,p()});return{getButtonProps:g,buttonRef:v}}function Ep(e){return fi(e)&&e.tagName==="BUTTON"}function Gj(e){return!!(e?.tagName==="A"&&e?.href)}const Kj=b.forwardRef(function(t,n){const{render:a,className:i,style:o,disabled:l,nativeButton:u=!0,...h}=t,f=e0(),{toast:p}=tS(),g=f.useState("expanded"),[v,k]=b.useState(!1),{getButtonProps:w,buttonRef:S}=Wj({disabled:l,native:u}),P={type:p.type};return ec("button",t,{ref:[n,S],state:P,props:[{"aria-hidden":!g&&!v,onClick(){f.closeToast(p.id)},onFocus(){k(!0)},onBlur(){k(!1)}},h,w]})}),BF="none",VF="trigger-press",HF="trigger-hover",$F="outside-press",WF="item-press",GF="close-press",qj="focus-out",KF="escape-key",qF="list-navigation",YF="cancel-open",ZF="imperative-action",XF="window-resize";function Yj(e,t,n,a){let i=!1,o=!1;const l=Vi;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...l}}function Zj(e){return`data-base-ui-${e}`}const aS=b.createContext(null),Xj=()=>b.useContext(aS),Jj=Zj("portal");function rS(e={}){const{ref:t,container:n,componentProps:a=Vi,elementProps:i}=e,o=nS(),u=Xj()?.portalNode,[h,f]=b.useState(null),[p,g]=b.useState(null),v=Qi(P=>{P!==null&&g(P)}),k=b.useRef(null);Za(()=>{if(n===null){k.current&&(k.current=null,g(null),f(null));return}if(o==null)return;const P=(n&&(a0(n)?n:n.current))??u??document.body;if(P==null){k.current&&(k.current=null,g(null),f(null));return}k.current!==P&&(k.current=P,g(null),f(P))},[n,u,o]);const w=ec("div",a,{ref:[t,v],props:[{id:o,[Jj]:""},i]});return{portalNode:p,portalSubtree:h&&w?oo.createPortal(w,h):null}}const JF=b.forwardRef(function(t,n){const{render:a,className:i,style:o,children:l,container:u,renderGuards:h,...f}=t,{portalNode:p,portalSubtree:g}=rS({container:u,ref:n,componentProps:t,elementProps:f}),v=b.useRef(null),k=b.useRef(null),w=b.useRef(null),S=b.useRef(null),[P,L]=b.useState(null),A=b.useRef(!1),E=P?.modal,R=P?.open,j=typeof h=="boolean"?h:!!P&&!P.modal&&P.open&&!!p;b.useEffect(()=>{if(!p||E)return;function F(T){p&&T.relatedTarget&&Cp(T)&&(T.type==="focusin"?A.current&&(Vk(p),A.current=!1):(nj(p),A.current=!0))}return EP(Hi(p,"focusin",F,!0),Hi(p,"focusout",F,!0))},[p,E]),b.useEffect(()=>{!p||R!==!1||(Vk(p),A.current=!1)},[R,p]);const W=b.useMemo(()=>({beforeOutsideRef:v,afterOutsideRef:k,beforeInsideRef:w,afterInsideRef:S,portalNode:p,setFocusManagerState:L}),[p]);return C.jsxs(b.Fragment,{children:[g,C.jsxs(aS.Provider,{value:W,children:[j&&p&&C.jsx(Tl,{"data-type":"outside",ref:v,onFocus:F=>{if(Cp(F,p))w.current?.focus();else{const T=P?P.domReference:null;tj(T)?.focus()}}}),j&&p&&C.jsx("span",{"aria-owns":p.id,style:Ij}),p&&oo.createPortal(l,p),j&&p&&C.jsx(Tl,{"data-type":"outside",ref:k,onFocus:F=>{if(Cp(F,p))S.current?.focus();else{const T=P?P.domReference:null;ej(T)?.focus(),P?.closeOnFocusOut&&P?.onOpenChange(!1,Yj(qj,F.nativeEvent))}}})]})]})}),Qj=b.forwardRef(function(t,n){const{children:a,container:i,className:o,render:l,style:u,...h}=t,{portalNode:f,portalSubtree:p}=rS({container:i,ref:n,componentProps:t,elementProps:h});return!p&&!f?null:C.jsxs(b.Fragment,{children:[p,f&&oo.createPortal(a,f)]})}),eU=Qj;function tU(){const e=b.useContext(Qg);if(!e)throw new Error(vo(73));const t=e.useState("toasts");return b.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function nU(){const e=new Set;function t(n){e.forEach(a=>a(n))}return{" subscribe":function(a){return e.add(a),()=>{e.delete(a)}},add(n){const a=n.id||RP("toast"),i={...n,id:a,transitionStatus:"starting"};return t({action:"add",options:i}),a},close(n){t({action:"close",options:{id:n}})},update(n,a){t({action:"update",options:{...a,id:n}})},promise(n,a){let i=n;return t({action:"promise",options:{...a,promise:n,setPromise(o){i=o}}}),i}}}const d0=nU();function QF(e){return d0.add(e)}function aU({children:e}){return C.jsxs(rj,{toastManager:d0,children:[e,C.jsx(eU,{children:C.jsx(kj,{className:"fixed inset-x-0 top-6 z-[100] mx-auto flex w-full max-w-sm flex-col items-center gap-2 px-4 outline-none",children:C.jsx(rU,{})})})]})}function rU(){const{toasts:e}=tU();return e.map(t=>{const n=t.data?.onUndo;return C.jsxs(zj,{toast:t,className:Pt("pointer-events-auto flex w-full items-center gap-3 rounded-xl border border-oai-gray-200 bg-oai-white px-4 py-3 shadow-xl transition-all duration-200 ease-out","data-[starting-style]:-translate-y-3 data-[starting-style]:opacity-0","data-[ending-style]:-translate-y-3 data-[ending-style]:opacity-0","dark:border-oai-gray-800 dark:bg-oai-gray-900"),children:[C.jsx(Bj,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),n?C.jsx("button",{type:"button",onClick:()=>{n(),d0.close(t.id)},className:"shrink-0 rounded-md px-2 py-1 text-xs font-semibold text-oai-gray-600 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:me("shared.action.undo")}):null,C.jsx(Kj,{"aria-label":me("shared.action.dismiss"),className:"-mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-oai-gray-400 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:C.jsx(bg,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},t.id)})}const h0=Object.freeze(["limits","leaderboard"]),iU=Object.freeze({limits:"/limits",leaderboard:"/leaderboard"}),sU=Object.freeze({limits:()=>_n(()=>import("./LimitsPage-C-yuMLq4.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),leaderboard:()=>_n(()=>import("./LeaderboardPage-o8abeuhO.js"),__vite__mapDeps([8,9,10,11,12,13]))}),iS="total",sS=0,qk=20,oU=Object.freeze([10,20,50,100]),lU="tokentracker:leaderboard:pageSize",cU=20,uU=Object.freeze(["dashboard-existing","silent-preload","page-load","manual-refresh"]);let Yk=0,ua;class dU{constructor(t={}){this.limits=null,this.leaderboard=new Map,this.leaderboardMaxEntries=pU(t.leaderboardMaxEntries)}read(t,n){return tc(t),t==="limits"?!this.limits||this.limits.contextKey!==n?null:Ku(this.limits):n?Ku(this.leaderboard.get(n)):null}write(t,n={}){if(t.targetKey==="limits"){this.limits=t;return}this.leaderboard.has(t.contextKey)&&this.leaderboard.delete(t.contextKey),this.leaderboard.set(t.contextKey,t),this.evictLeaderboardEntries(n.activeContextKey||t.contextKey)}evictLeaderboardEntries(t=null){for(;this.leaderboard.size>this.leaderboardMaxEntries;){const n=Array.from(this.leaderboard.keys()).find(a=>a!==t)||this.leaderboard.keys().next().value;this.leaderboard.delete(n)}}snapshot(){return{limits:Ku(this.limits),leaderboard:{maxEntries:this.leaderboardMaxEntries,size:this.leaderboard.size,keys:Array.from(this.leaderboard.keys())}}}}class hU{constructor(t={}){Yk+=1,this.sessionId=`dashboard-preload-${Yk}`,this.createdAt=Date.now(),this.completedAt=null,this.startedAfterMainContentVisible=!1,this.cache=new dU(t),this.targets={limits:Zk("limits"),leaderboard:Zk("leaderboard")}}}function Zk(e){return{key:e,route:iU[e],resourceStatus:"idle",stateStatus:"idle",error:null,resourcePromise:null,resourceModule:null,resourceRequestId:0,statePromise:null,stateRequestId:0,pendingStateContextKey:null}}function fU(e={}){return new hU(e)}function pU(e){const t=Number(e);return!Number.isInteger(t)||t<1?cU:t}ua=fU();function tc(e){if(!h0.includes(e))throw new Error(`Unknown dashboard preload target: ${e}`)}function oS(e){return e?typeof e=="string"?e:e.message||String(e):null}function mU(e,t){return uU.includes(e)?e:t}function gU(e){const t=Number(e);return Number.isFinite(t)?t:Date.now()}function Ku(e){return e?{...e}:null}function Xk(){const e=h0.every(t=>{const n=ua.targets[t];return n.resourceStatus==="fulfilled"||n.resourceStatus==="rejected"});ua.completedAt=e?Date.now():null}function yU(){ua.startedAfterMainContentVisible=!0}function f0(e,t={}){tc(e);const n=Object.entries(t).filter(([,a])=>a!==void 0).sort(([a],[i])=>a.localeCompare(i)).map(([a,i])=>`${a}=${i===null?"null":String(i)}`);return`${e}:${n.join("|")}`}function vU(e,t={}){tc(e);const n=ua.targets[e];if(n.resourceStatus==="fulfilled")return Promise.resolve(n.resourceModule);if(n.resourceStatus==="pending"&&n.resourcePromise)return n.resourcePromise;const a=t.loader||sU[e],i=n.resourceRequestId+1;n.resourceRequestId=i,n.resourceStatus="pending",n.error=null;const o=Promise.resolve().then(()=>a()).then(l=>n.resourceRequestId!==i||n.resourcePromise!==o?null:(n.resourceStatus="fulfilled",n.resourceModule=l,n.error=null,Xk(),l)).catch(l=>(n.resourceRequestId!==i||n.resourcePromise!==o||(n.resourceStatus="rejected",n.error=oS(l),Xk()),null));return n.resourcePromise=o,o}function bU(e={}){const t=e.loaders||{};return Promise.all(h0.map(n=>vU(n,{loader:t[n]})))}function lS(e,t){tc(e);const n=ua.targets[e],a=t?.status||"fulfilled",i={targetKey:e,status:a,data:t?.data??null,error:oS(t?.error),source:mU(t?.source,"silent-preload"),generatedAt:gU(t?.generatedAt),updatedAt:Date.now(),contextKey:t?.contextKey||f0(e,t?.context||{})};return n.stateStatus=a,a==="rejected"||a==="skipped"?n.error=i.error:a==="fulfilled"&&(n.error=null,ua.cache.write(i,{activeContextKey:t?.activeContextKey})),Ku(i)}function cS(e,t){return tc(e),ua.cache.read(e,t)}function eB(e,t={}){return lS("limits",{data:e,source:t.source||"dashboard-existing",contextKey:t.contextKey||uS(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function uS(e={}){return f0("limits",{state:"current",...e})}function tB(e=uS()){return cS("limits",e)}function Im(e,t={}){return lS("leaderboard",{activeContextKey:t.activeContextKey,data:e,source:t.source||"silent-preload",contextKey:t.contextKey||p0(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function _U(e){return cS("leaderboard",e)}function dS(){if(typeof window>"u")return qk;try{const e=window.localStorage.getItem(lU),t=Number(e);if(oU.includes(t))return t}catch{}return qk}function hS(e={}){const t=e.userId;return t!==void 0?t||null:e.cloudUser?.id||null}function fS(e={}){return typeof e.accessMode=="string"&&e.accessMode.trim()?e.accessMode.trim():e.mockEnabled?"mock":e.baseUrl?"cloud":"unavailable"}function p0(e={}){const t=!!e.mockEnabled,n=e.baseUrl??"";return f0("leaderboard",{accessMode:fS({...e,baseUrl:n,mockEnabled:t}),baseUrl:n,mockEnabled:t,offset:e.offset??sS,pageSize:e.pageSize??dS(),period:e.period||iS,userId:hS(e)})}function Su(e,t){const n=ua.targets.leaderboard;return n.stateRequestId+=1,n.statePromise=null,n.pendingStateContextKey=null,Im(null,{contextKey:t,status:"skipped",error:e})}function kU(e={}){const t=ua,n=!!e.mockEnabled,a=e.baseUrl??"",i=fS({...e,baseUrl:a,mockEnabled:n}),o=e.period||iS,l=e.pageSize??dS(),u=e.offset??sS,h=hS(e),f=p0({accessMode:i,baseUrl:a,mockEnabled:n,offset:u,pageSize:l,period:o,userId:h});if(!n&&e.authLoading)return Promise.resolve(Su("auth-loading",f));if(!n&&!e.signedIn&&i!=="public")return Promise.resolve(Su("not-signed-in",f));if(!n&&!a)return Promise.resolve(Su("missing-base-url",f));if(!n&&i==="unavailable")return Promise.resolve(Su("access-unavailable",f));const p=t.targets.leaderboard,g=_U(f);if(g)return Promise.resolve(g);if(p.stateStatus==="pending"&&p.statePromise&&p.pendingStateContextKey===f)return p.statePromise;const v=p.stateRequestId+1;p.stateRequestId=v,p.stateStatus="pending",p.pendingStateContextKey=f,p.error=null;const k=Promise.resolve().then(()=>QR({userId:h,period:o,limit:l,offset:u})).then(w=>ua!==t||p.stateRequestId!==v||p.statePromise!==k?null:(p.pendingStateContextKey=null,Im(w,{contextKey:f}))).catch(w=>(ua!==t||p.stateRequestId!==v||p.statePromise!==k||(p.pendingStateContextKey=null,Im(null,{contextKey:f,status:"rejected",error:w})),null));return p.statePromise=k,k}const wU=typeof window<"u"?window.location.search:"",Jk=new URLSearchParams(wU),Cu=Jk.get("insforge_code")||Jk.get("code")||null,xU=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function PU(){Yl();const{loading:e,signedIn:t}=ns(),n=so(),[a,i]=b.useState("processing"),[o,l]=b.useState(null),u=b.useRef(!1);b.useEffect(()=>{if(!(!Cu||u.current)){if(u.current=!0,xU){l(!1);return}(async()=>{try{const p=await(await fetch("/api/auth-bridge/verifier")).json();l(!!p?.native)}catch{l(!1)}})()}},[]),b.useEffect(()=>{if(o!==!0||!Cu)return;i("redirecting");const f=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(Cu)}`},200);return()=>clearTimeout(f)},[o]),b.useEffect(()=>{if(o!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const f=setTimeout(()=>{t||i("failed")},12e3);return()=>clearTimeout(f)},[o,e,t,n]),b.useEffect(()=>{if(!Cu&&o===null){const f=setTimeout(()=>i("failed"),3e3);return()=>clearTimeout(f)}},[o]);const h=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&o!==!0&&(o===null||o===!1&&e)?C.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):C.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:C.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),C.jsx("p",{className:"text-oai-gray-400 text-sm",children:me("auth.callback.processing")})]}),a==="redirecting"&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:C.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:C.jsx("path",{d:"M20 6 9 17l-5-5"})})}),C.jsx("p",{className:"text-white text-sm font-medium",children:me("auth.callback.success")}),C.jsx("p",{className:"text-oai-gray-500 text-xs",children:me("auth.callback.redirecting")})]}),a==="failed"&&C.jsxs("div",{className:"space-y-3",children:[C.jsx("p",{className:"text-oai-gray-300 text-sm",children:me("auth.callback.failed")}),C.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:me("auth.callback.close")})]})]})})}const SU=b.lazy(()=>_n(()=>import("./DashboardPage-B15gBRRP.js"),__vite__mapDeps([14,1,12,15,16,17,11,3,9,10,18,19,4])).then(e=>({default:e.DashboardPage}))),CU=b.lazy(()=>_n(()=>import("./IpCheckPage-SVk0e_8x.js"),[])),TU=b.lazy(()=>_n(()=>import("./LandingPage-CPAmE-yI.js"),__vite__mapDeps([20,21,18])).then(e=>({default:e.LandingPage}))),EU=b.lazy(()=>_n(()=>import("./LeaderboardPage-o8abeuhO.js"),__vite__mapDeps([8,9,10,11,12,13])).then(e=>({default:e.LeaderboardPage}))),RU=b.lazy(()=>_n(()=>import("./LeaderboardProfilePage-CVTBYIoO.js"),__vite__mapDeps([22,12,21,23,13,15,16,6,11,17,7])).then(e=>({default:e.LeaderboardProfilePage}))),AU=b.lazy(()=>_n(()=>import("./LimitsPage-C-yuMLq4.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(e=>({default:e.LimitsPage}))),LU=b.lazy(()=>_n(()=>import("./LoginPage-CVD0_gAd.js"),[]).then(e=>({default:e.LoginPage}))),DU=b.lazy(()=>_n(()=>import("./ResetPasswordPage-CkLEg7Xj.js"),[]).then(e=>({default:e.ResetPasswordPage}))),IU=b.lazy(()=>_n(()=>import("./DevicePage-CxIy3ahX.js"),[])),MU=b.lazy(()=>_n(()=>import("./WrappedPage-M5xKJN8-.js"),[])),NU=b.lazy(()=>_n(()=>import("./SettingsPage-CfVhlxOc.js"),__vite__mapDeps([24,2,25,3,11,12,9,10,16,7])).then(e=>({default:e.SettingsPage}))),OU=b.lazy(()=>_n(()=>import("./SkillsPage-BI6ugQVd.js"),__vite__mapDeps([26,5,6,7,3,17,11,16,12,19,10])).then(e=>({default:e.SkillsPage}))),jU=b.lazy(()=>_n(()=>import("./WidgetsPage-C0eeE5n9.js"),__vite__mapDeps([27,9,10,11,25,3,4,6,7])).then(e=>({default:e.WidgetsPage})));function UU(){const{resolvedLocale:e}=Yl(),t=zn(),n=ns();hN();const a=b.useRef(!1),i=b.useRef(!1),o=b.useRef(new Set),l=An(),u=b.useMemo(()=>typeof window>"u"?!1:aN(window.location.search),[]),h=t?.pathname||"/",f=new URL(window.location.href),p=f.pathname.replace(/\/+$/,"")||"/",v=p.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,k=f.searchParams.get("token")||null,w=v||k,S=p==="/share"||p==="/share.html"||p.startsWith("/share/"),P=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),L=h.replace(/\/+$/,"")||"/",A=L==="/"||L==="/dashboard",E=L==="/leaderboard",R=L.match(/^\/u\/([^/]+)$/i),j=R?R[1]:null,W=!!(n.enabled&&n.signedIn),F=P||W,T=!1,B=tN(),V=!F&&!l&&!P,ee=l?"mock":n.loading?"unavailable":W?"cloud":F?"local":"unavailable",se=b.useCallback(()=>{if(!a.current||!l&&n.loading||!l&&!F)return;const pe={accessMode:ee,baseUrl:nN(),mockEnabled:l,signedIn:F,authLoading:!!n.loading,userId:W&&n.user?.id||null},ve=p0(pe);o.current.has(ve)||(o.current.add(ve),kU(pe))},[W,n.loading,n.user?.id,ee,l,F]),fe=b.useCallback(()=>{A&&(a.current||(a.current=!0,yU()),i.current||(i.current=!0,bU()),se())},[A,se]);b.useEffect(()=>{se()},[se]);const de=b.useMemo(()=>!n.enabled||!W?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[W,n]);let he=P||l||u?"dashboard":"landing";L==="/landing"&&(he="landing"),L==="/dashboard"&&(he="dashboard"),E&&(he="dashboard"),j&&(he="dashboard");const ie=L==="/limits",X=L==="/settings",q=L==="/skills",J=L==="/widgets",H=L==="/ip-check";(ie||X||q||J||H)&&(he="dashboard");let M=SU;j?M=RU:L==="/leaderboard"?M=EU:ie?M=AU:X?M=NU:q?M=OU:J?M=jU:H&&(M=CU);const Z=!S&&!V&&(L==="/dashboard"||L==="/"||E||ie||X||q||J||H);if(!P&&!W&&!S&&!n.loading&&he==="dashboard"&&!E&&!j&&L!=="/login"&&L!=="/reset-password"&&L!=="/landing"&&L!=="/auth/callback"&&L!=="/auth/native-callback")return C.jsx(V4,{to:"/login",replace:!0});let ge=null;if(L==="/auth/callback"||L==="/auth/native-callback")ge=C.jsx(PU,{});else if(L==="/login")ge=C.jsx(LU,{});else if(L==="/reset-password")ge=C.jsx(DU,{});else if(L==="/device")ge=C.jsx(IU,{});else if(L==="/wrapped")ge=C.jsx(MU,{});else if(he==="landing")ge=C.jsx(TU,{signInUrl:"/login",signUpUrl:"/login"});else{const pe=C.jsx(M,{baseUrl:B,auth:de,signedIn:F,sessionSoftExpired:T,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:S,publicToken:w,userId:j,signInUrl:"/login",signUpUrl:"/login",onMainContentVisible:fe},e);Z?ge=C.jsx(RN,{children:pe}):ge=pe}return C.jsx(JA,{children:C.jsx(tL,{children:C.jsx(aU,{children:C.jsxs(nL,{children:[C.jsx(b.Suspense,{fallback:null,children:ge}),Z?C.jsx(JN,{}):null,C.jsx(Q9,{}),C.jsx(eA,{}),C.jsx(dA,{})]})})})})}const zU=pT([{path:"*",element:C.jsx(UU,{})}]);nC.createRoot(document.getElementById("root")).render(C.jsx(Zs.StrictMode,{children:C.jsx(N8,{children:C.jsx(V8,{children:C.jsx(r8,{children:C.jsx(i8,{children:C.jsx(CT,{router:zU})})})})})}));export{_n as $,Rt as A,Pz as B,lz as C,Rz as D,yz as E,Hw as F,me as G,Ou as H,sz as I,iz as J,Dl as K,Nd as L,XA as M,Nz as N,vz as O,ZU as P,YU as Q,Zs as R,$x as S,fN as T,YN as U,Pt as V,g2 as W,bg as X,ns as Y,mg as Z,J9 as _,ec as a,kl as a$,nz as a0,QR as a1,Yl as a2,aN as a3,si as a4,Mz as a5,mz as a6,oz as a7,bR as a8,XU as a9,Uz as aA,KU as aB,dz as aC,Bd as aD,YA as aE,pN as aF,tB as aG,$A as aH,wz as aI,FU as aJ,aR as aK,_g as aL,sd as aM,Xb as aN,uz as aO,f2 as aP,h2 as aQ,NA as aR,az as aS,no as aT,ud as aU,t2 as aV,n2 as aW,a2 as aX,r2 as aY,FA as aZ,Aa as a_,JU as aa,eB as ab,gz as ac,rz as ad,tz as ae,Ak as af,jz as ag,XL as ah,_t as ai,dn as aj,bd as ak,kg as al,ro as am,Gg as an,y2 as ao,hi as ap,b_ as aq,oo as ar,zn as as,so as at,nN as au,od as av,p0 as aw,_U as ax,Im as ay,oR as az,Yj as b,wj as b$,Iz as b0,Lz as b1,PP as b2,Za as b3,vo as b4,yo as b5,yO as b6,Hk as b7,l0 as b8,Vi as b9,EO as bA,Qi as bB,r0 as bC,La as bD,EP as bE,Hi as bF,$i as bG,lF as bH,iF as bI,Er as bJ,HF as bK,vO as bL,VF as bM,KF as bN,OF as bO,qj as bP,Sa as bQ,ZF as bR,Cp as bS,IF as bT,ej as bU,MF as bV,UF as bW,Tl as bX,JF as bY,FF as bZ,Tj as b_,Tr as ba,NF as bb,GP as bc,BF as bd,Ej as be,Sj as bf,ZN as bg,Bz as bh,zz as bi,Zz as bj,Xz as bk,Jz as bl,VA as bm,Fz as bn,Vz as bo,QF as bp,Hz as bq,Kz as br,$z as bs,Wz as bt,Gz as bu,Yz as bv,qz as bw,pF as bx,Jg as by,Ul as bz,sn as c,jF as c$,fi as c0,B8 as c1,hg as c2,Dz as c3,Az as c4,TO as c5,NO as c6,_F as c7,MP as c8,BO as c9,SP as cA,nF as cB,SO as cC,Pp as cD,PO as cE,nS as cF,uF as cG,cF as cH,Bk as cI,CF as cJ,TF as cK,Ys as cL,xp as cM,qF as cN,RF as cO,Am as cP,EF as cQ,AF as cR,MO as cS,kp as cT,wp as cU,LF as cV,Ea as cW,hF as cX,fF as cY,IO as cZ,OP as c_,Rm as ca,wF as cb,xF as cc,kF as cd,NP as ce,OO as cf,jO as cg,VO as ch,PF as ci,SF as cj,gF as ck,FO as cl,bF as cm,zO as cn,bO as co,Ok as cp,vF as cq,yF as cr,Yd as cs,_O as ct,Sm as cu,CP as cv,eF as cw,xO as cx,tF as cy,Ia as cz,GF as d,rF as d0,Qz as d1,hO as d2,$F as d3,YF as d4,zF as d5,aF as d6,XF as d7,WF as d8,Td as d9,Xj as da,s0 as db,Zj as dc,Cj as dd,tj as de,DF as df,QO as dg,sF as dh,dF as di,oF as dj,mF as dk,i0 as dl,Uk as dm,u0 as dn,fz as dp,pz as dq,hz as dr,ar as ds,QM as e,qU as f,$w as g,fR as h,An as i,C as j,Ez as k,xz as l,Cl as m,ER as n,RR as o,Sz as p,bz as q,b as r,ez as s,cz as t,Wj as u,Cz as v,_z as w,Tz as x,kz as y,QU as z};
|
|
1023
|
+
`),()=>{u.current?.removeAttribute("data-motion-pop-id"),F.contains(W)&&F.removeChild(W)}},[t]),C.jsx(VI,{isPresent:t,childRef:u,sizeRef:h,pop:o,children:o===!1?e:b.cloneElement(e,{ref:g})})}const $I=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:i,presenceAffectsLayout:o,mode:l,anchorX:u,anchorY:h,root:f})=>{const p=kg(WI),g=b.useId();let v=!0,k=b.useMemo(()=>(v=!1,{id:g,initial:t,isPresent:n,custom:i,onExitComplete:w=>{p.set(w,!0);for(const S of p.values())if(!S)return;a&&a()},register:w=>(p.set(w,!1),()=>p.delete(w))}),[n,p,a]);return o&&v&&(k={...k}),b.useMemo(()=>{p.forEach((w,S)=>p.set(S,!1))},[n]),b.useEffect(()=>{!n&&!p.size&&a&&a()},[n]),e=C.jsx(HI,{pop:l==="popLayout",isPresent:n,anchorX:u,anchorY:h,root:f,children:e}),C.jsx(Hd.Provider,{value:k,children:e})};function WI(){return new Map}function Hx(e=!0){const t=b.useContext(Hd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:i}=t,o=b.useId();b.useEffect(()=>{if(e)return i(o)},[e]);const l=b.useCallback(()=>e&&a&&a(o),[o,a,e]);return!n&&a?[!1,l]:[!0]}const mu=e=>e.key||"";function lk(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const $x=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:i=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",anchorY:h="top",root:f})=>{const[p,g]=Hx(l),v=b.useMemo(()=>lk(e),[e]),k=l&&!p?[]:v.map(mu),w=b.useRef(!0),S=b.useRef(v),P=kg(()=>new Map),L=b.useRef(new Set),[A,E]=b.useState(v),[R,j]=b.useState(v);y2(()=>{w.current=!1,S.current=v;for(let T=0;T<R.length;T++){const B=mu(R[T]);k.includes(B)?(P.delete(B),L.current.delete(B)):P.get(B)!==!0&&P.set(B,!1)}},[R,k.length,k.join("-")]);const W=[];if(v!==A){let T=[...v];for(let B=0;B<R.length;B++){const V=R[B],ee=mu(V);k.includes(ee)||(T.splice(B,0,V),W.push(V))}return o==="wait"&&W.length&&(T=W),j(lk(T)),E(v),null}const{forceRender:F}=b.useContext(_g);return C.jsx(C.Fragment,{children:R.map(T=>{const B=mu(T),V=l&&!p?!1:v===R||k.includes(B),ee=()=>{if(L.current.has(B))return;if(P.has(B))L.current.add(B),P.set(B,!0);else return;let se=!0;P.forEach(fe=>{fe||(se=!1)}),se&&(F?.(),j(S.current),l&&g?.(),a&&a())};return C.jsx($I,{isPresent:V,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:f,onExitComplete:V?void 0:ee,anchorX:u,anchorY:h,children:T},B)})})},Wx=b.createContext({strict:!1}),ck={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 uk=!1;function GI(){if(uk)return;const e={};for(const t in ck)e[t]={isEnabled:n=>ck[t].some(a=>!!n[a])};bx(e),uk=!0}function Gx(){return GI(),AD()}function KI(e){const t=Gx();for(const n in e)t[n]={...t[n],...e[n]};bx(t)}const qI=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 Sd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qI.has(e)}let Kx=e=>!Sd(e);function YI(e){typeof e=="function"&&(Kx=t=>t.startsWith("on")?!Sd(t):e(t))}try{YI(require("@emotion/is-prop-valid").default)}catch{}function ZI(e,t,n){const a={};for(const i in e)i==="values"&&typeof e.values=="object"||dn(e[i])||(Kx(i)||n===!0&&Sd(i)||!t&&!Sd(i)||e.draggable&&i.startsWith("onDrag"))&&(a[i]=e[i]);return a}const Kd=b.createContext({});function XI(e,t){if(Gd(e)){const{initial:n,animate:a}=e;return{initial:n===!1||Ol(n)?n:void 0,animate:Ol(a)?a:void 0}}return e.inherit!==!1?t:{}}function JI(e){const{initial:t,animate:n}=XI(e,b.useContext(Kd));return b.useMemo(()=>({initial:t,animate:n}),[dk(t),dk(n)])}function dk(e){return Array.isArray(e)?e.join(" "):e}const Kg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qx(e,t,n){for(const a in t)!dn(t[a])&&!Cx(a,n)&&(e[a]=t[a])}function QI({transformTemplate:e},t){return b.useMemo(()=>{const n=Kg();return $g(n,t,e),Object.assign({},n.vars,n.style)},[t])}function eM(e,t){const n=e.style||{},a={};return qx(a,n,e),Object.assign(a,QI(e,t)),a}function tM(e,t){const n={},a=eM(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 Yx=()=>({...Kg(),attrs:{}});function nM(e,t,n,a){const i=b.useMemo(()=>{const o=Yx();return Tx(o,t,Rx(a),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};qx(o,e.style,e),i.style={...o,...i.style}}return i}const aM=["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 qg(e){return typeof e!="string"||e.includes("-")?!1:!!(aM.indexOf(e)>-1||/[A-Z]/u.test(e))}function rM(e,t,n,{latestValues:a},i,o=!1,l){const h=(l??qg(e)?nM:tM)(t,a,i,e),f=ZI(t,typeof e=="string",o),p=e!==b.Fragment?{...f,...h,ref:n}:{},{children:g}=t,v=b.useMemo(()=>dn(g)?g.get():g,[g]);return b.createElement(e,{...p,children:v})}function iM({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,i){return{latestValues:sM(n,a,i,e),renderState:t()}}function sM(e,t,n,a){const i={},o=a(e,{});for(const v in o)i[v]=Wu(o[v]);let{initial:l,animate:u}=e;const h=Gd(e),f=yx(e);t&&f&&!h&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const g=p?u:l;if(g&&typeof g!="boolean"&&!Wd(g)){const v=Array.isArray(g)?g:[g];for(let k=0;k<v.length;k++){const w=Og(e,v[k]);if(w){const{transitionEnd:S,transition:P,...L}=w;for(const A in L){let E=L[A];if(Array.isArray(E)){const R=p?E.length-1:0;E=E[R]}E!==null&&(i[A]=E)}for(const A in S)i[A]=S[A]}}}return i}const Zx=e=>(t,n)=>{const a=b.useContext(Kd),i=b.useContext(Hd),o=()=>iM(e,t,a,i);return n?o():kg(o)},oM=Zx({scrapeMotionValuesFromProps:Wg,createRenderState:Kg}),lM=Zx({scrapeMotionValuesFromProps:Ax,createRenderState:Yx}),cM=Symbol.for("motionComponentSymbol");function uM(e,t,n){const a=b.useRef(n);b.useInsertionEffect(()=>{a.current=n});const i=b.useRef(null);return b.useCallback(o=>{o&&e.onMount?.(o),t&&(o?t.mount(o):t.unmount());const l=a.current;if(typeof l=="function")if(o){const u=l(o);typeof u=="function"&&(i.current=u)}else i.current?(i.current(),i.current=null):l(o);else l&&(l.current=o)},[t])}const Xx=b.createContext({});function Bs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function dM(e,t,n,a,i,o){const{visualElement:l}=b.useContext(Kd),u=b.useContext(Wx),h=b.useContext(Hd),f=b.useContext(Gg),p=f.reducedMotion,g=f.skipAnimations,v=b.useRef(null),k=b.useRef(!1);a=a||u.renderer,!v.current&&a&&(v.current=a(e,{visualState:t,parent:l,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:p,skipAnimations:g,isSVG:o}),k.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const w=v.current,S=b.useContext(Xx);w&&!w.projection&&i&&(w.type==="html"||w.type==="svg")&&hM(v.current,n,i,S);const P=b.useRef(!1);b.useInsertionEffect(()=>{w&&P.current&&w.update(n,h)});const L=n[ix],A=b.useRef(!!L&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(L)&&window.MotionHasOptimisedAnimation?.(L));return y2(()=>{k.current=!0,w&&(P.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),A.current&&w.animationState&&w.animationState.animateChanges())}),b.useEffect(()=>{w&&(!A.current&&w.animationState&&w.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(L)}),A.current=!1),w.enteringChildren=void 0)}),w}function hM(e,t,n,a){const{layoutId:i,layout:o,drag:l,dragConstraints:u,layoutScroll:h,layoutRoot:f,layoutAnchor:p,layoutCrossfade:g}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Jx(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!l||u&&Bs(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:a,crossfade:g,layoutScroll:h,layoutRoot:f,layoutAnchor:p})}function Jx(e){if(e)return e.options.allowProjection!==!1?e.projection:Jx(e.parent)}function op(e,{forwardMotionProps:t=!1,type:n}={},a,i){a&&KI(a);const o=n?n==="svg":qg(e),l=o?lM:oM;function u(f,p){let g;const v={...b.useContext(Gg),...f,layoutId:fM(f)},{isStatic:k}=v,w=JI(f),S=l(f,k);if(!k&&typeof window<"u"){pM();const P=mM(v);g=P.MeasureLayout,w.visualElement=dM(e,S,v,i,P.ProjectionNode,o)}return C.jsxs(Kd.Provider,{value:w,children:[g&&w.visualElement?C.jsx(g,{visualElement:w.visualElement,...v}):null,rM(e,f,uM(S,w.visualElement,p),S,k,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=b.forwardRef(u);return h[cM]=e,h}function fM({layoutId:e}){const t=b.useContext(_g).id;return t&&e!==void 0?t+"-"+e:e}function pM(e,t){b.useContext(Wx).strict}function mM(e){const t=Gx(),{drag:n,layout:a}=t;if(!n&&!a)return{};const i={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function gM(e,t){if(typeof Proxy>"u")return op;const n=new Map,a=(o,l)=>op(o,l,e,t),i=(o,l)=>a(o,l);return new Proxy(i,{get:(o,l)=>l==="create"?a:(n.has(l)||n.set(l,op(l,void 0,e,t)),n.get(l))})}const yM=(e,t)=>t.isSVG??qg(e)?new KD(t):new BD(t,{allowProjection:e!==b.Fragment});class vM extends pi{constructor(t){super(t),t.animationState||(t.animationState=JD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Wd(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 bM=0;class _M extends pi{constructor(){super(...arguments),this.id=bM++,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:l}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const u=Gi(this.node,o,l);if(u){const{transition:h,transitionEnd:f,...p}=u;for(const g in p)this.node.getValue(g)?.jump(p[g])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 kM={animation:{Feature:vM},exit:{Feature:_M}};function Ql(e){return{point:{x:e.pageX,y:e.pageY}}}const wM=e=>t=>zg(t)&&e(t,Ql(t));function Sl(e,t,n,a){return jl(e,t,wM(n),a)}const Qx=({current:e})=>e?e.ownerDocument.defaultView:null,hk=(e,t)=>Math.abs(e-t);function xM(e,t){const n=hk(e.x,t.x),a=hk(e.y,t.y);return Math.sqrt(n**2+a**2)}const fk=new Set(["auto","scroll"]);class eP{constructor(t,n,{transformPagePoint:a,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:l=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=k=>{this.handleScroll(k.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=gu(this.lastRawMoveEventInfo,this.transformPagePoint));const k=lp(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,S=xM(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!S)return;const{point:P}=k,{timestamp:L}=un;this.history.push({...P,timestamp:L});const{onStart:A,onMove:E}=this.handlers;w||(A&&A(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,k)},this.handlePointerMove=(k,w)=>{this.lastMoveEvent=k,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=gu(w,this.transformPagePoint),_t.update(this.updatePoint,!0)},this.handlePointerUp=(k,w)=>{this.end();const{onEnd:S,onSessionEnd:P,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=lp(k.type==="pointercancel"?this.lastMoveEventInfo:gu(w,this.transformPagePoint),this.history);this.startEvent&&S&&S(k,A),P&&P(k,A)},!zg(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=l,this.contextWindow=i||window;const h=Ql(t),f=gu(h,this.transformPagePoint),{point:p}=f,{timestamp:g}=un;this.history=[{...p,timestamp:g}];const{onSessionStart:v}=n;v&&v(t,lp(f,this.history)),this.removeListeners=Zl(Sl(this.contextWindow,"pointermove",this.handlePointerMove),Sl(this.contextWindow,"pointerup",this.handlePointerUp),Sl(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(fk.has(a.overflowX)||fk.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,i=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:i.x-n.x,y:i.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,i),_t.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hi(this.updatePoint)}}function gu(e,t){return t?{point:t(e.point)}:e}function pk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function lp({point:e},t){return{point:e,delta:pk(e,tP(t)),offset:pk(e,PM(t)),velocity:SM(t,.1)}}function PM(e){return e[0]}function tP(e){return e[e.length-1]}function SM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const i=tP(e);for(;n>=0&&(a=e[n],!(i.timestamp-a.timestamp>Yn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&i.timestamp-a.timestamp>Yn(t)*2&&(a=e[1]);const o=oa(i.timestamp-a.timestamp);if(o===0)return{x:0,y:0};const l={x:(i.x-a.x)/o,y:(i.y-a.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function CM(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?bt(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?bt(n,e,a.max):Math.min(e,n)),e}function mk(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 TM(e,{top:t,left:n,bottom:a,right:i}){return{x:mk(e.x,n,i),y:mk(e.y,t,a)}}function gk(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 EM(e,t){return{x:gk(e.x,t.x),y:gk(e.y,t.y)}}function RM(e,t){let n=.5;const a=Tn(e),i=Tn(t);return i>a?n=Ml(t.min,t.max-a,e.min):a>i&&(n=Ml(e.min,e.max-i,t.min)),rr(0,1,n)}function AM(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 km=.35;function LM(e=km){return e===!1?e=0:e===!0&&(e=km),{x:yk(e,"left","right"),y:yk(e,"top","bottom")}}function yk(e,t,n){return{min:vk(e,t),max:vk(e,n)}}function vk(e,t){return typeof e=="number"?e:e[t]||0}const DM=new WeakMap;class IM{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=Qt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=g=>{n&&this.snapToCursor(Ql(g).point),this.stopAnimation()},l=(g,v)=>{const{drag:k,dragPropagation:w,onDragStart:S}=this.getProps();if(k&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=oD(k),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ka(L=>{let A=this.getAxisMotionValue(L).get()||0;if(Ja.test(A)){const{projection:E}=this.visualElement;if(E&&E.layout){const R=E.layout.layoutBox[L];R&&(A=Tn(R)*(parseFloat(A)/100))}}this.originPoint[L]=A}),S&&_t.update(()=>S(g,v),!1,!0),hm(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},u=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v;const{dragPropagation:k,dragDirectionLock:w,onDirectionLock:S,onDrag:P}=this.getProps();if(!k&&!this.openDragLock)return;const{offset:L}=v;if(w&&this.currentDirection===null){this.currentDirection=NM(L),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",v.point,L),this.updateAxis("y",v.point,L),this.visualElement.render(),P&&_t.update(()=>P(g,v),!1,!0)},h=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v,this.stop(g,v),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:g}=this.getProps();(g||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new eP(t,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:a,contextWindow:Qx(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!a)return;const{velocity:l}=i;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&_t.postRender(()=>u(a,i))}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:i}=this.getProps();if(!a||!yu(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(l=CM(l,this.constraints[t],this.elastic[t])),o.set(l)}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,i=this.constraints;t&&Bs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=TM(a.layoutBox,t):this.constraints=!1,this.elastic=LM(n),i!==this.constraints&&!Bs(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&Ka(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=AM(a.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Bs(t))return!1;const a=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const o=ND(a,i.root,this.visualElement.getTransformPagePoint());let l=EM(i.layout.layoutBox,o);if(n){const u=n(DD(l));this.hasMutatedConstraints=!!u,u&&(l=kx(u))}return l}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:i,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},f=Ka(p=>{if(!yu(p,n,this.currentDirection))return;let g=h&&h[p]||{};(l===!0||l===p)&&(g={min:0,max:0});const v=i?200:1e6,k=i?40:1e7,w={type:"inertia",velocity:a?t[p]:0,bounceStiffness:v,bounceDamping:k,timeConstant:750,restDelta:1,restSpeed:10,...o,...g};return this.startAxisValueAnimation(p,w)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return hm(this.visualElement,t),a.start(Ng(t,a,0,n,this.visualElement,!1))}stopAnimation(){Ka(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Ka(n=>{const{drag:a}=this.getProps();if(!yu(n,a,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:u}=i.layout.layoutBox[n],h=o.get()||0;o.set(t[n]-bt(l,u,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!Bs(n)||!a||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ka(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const h=u.get();i[l]=RM({min:h,max:h},this.constraints[l])}});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(),Ka(l=>{if(!yu(l,t,null))return;const u=this.getAxisMotionValue(l),{min:h,max:f}=this.constraints[l];u.set(bt(h,f,i[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;DM.set(this.visualElement,this);const t=this.visualElement.current,n=Sl(t,"pointerdown",f=>{const{drag:p,dragListener:g=!0}=this.getProps(),v=f.target,k=v!==t&&fD(v);p&&g&&!k&&this.start(f)});let a;const i=()=>{const{dragConstraints:f}=this.getProps();Bs(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=MM(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,l=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_t.read(i);const u=jl(window,"resize",()=>this.scalePositionWithinConstraints()),h=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:p})=>{this.isDragging&&p&&(Ka(g=>{const v=this.getAxisMotionValue(g);v&&(this.originPoint[g]+=f[g].translate,v.set(v.get()+f[g].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),h&&h(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:l=km,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:i,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function bk(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function MM(e,t,n){const a=C_(e,bk(n)),i=C_(t,bk(n));return()=>{a(),i()}}function yu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function NM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class OM extends pi{constructor(t){super(t),this.removeGroupControls=ca,this.removeListeners=ca,this.controls=new IM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ca}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 cp=e=>(t,n)=>{e&&_t.update(()=>e(t,n),!1,!0)};class jM extends pi{constructor(){super(...arguments),this.removePointerDownListener=ca}onPointerDown(t){this.session=new eP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Qx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:i}=this.node.getProps();return{onSessionStart:cp(t),onStart:cp(n),onMove:cp(a),onEnd:(o,l)=>{delete this.session,i&&_t.postRender(()=>i(o,l))}}}mount(){this.removePointerDownListener=Sl(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 up=!1;class UM extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:i}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),a&&a.register&&i&&a.register(o),up&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Gu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:i,isPresent:o}=this.props,{projection:l}=a;return l&&(l.isPresent=o,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),up=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||_t.postRender(()=>{const u=l.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(),Ug.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:i}=t;up=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),a&&a.deregister&&a.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nP(e){const[t,n]=Hx(),a=b.useContext(_g);return C.jsx(UM,{...e,layoutGroup:a,switchLayoutGroup:b.useContext(Xx),isPresent:t,safeToRemove:n})}const zM={pan:{Feature:jM},drag:{Feature:OM,ProjectionNode:Vx,MeasureLayout:nP}};function _k(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=a[i];o&&_t.postRender(()=>o(t,Ql(t)))}class FM extends pi{mount(){const{current:t}=this.node;t&&(this.unmount=cD(t,(n,a)=>(_k(this.node,a,"Start"),i=>_k(this.node,i,"End"))))}unmount(){}}class BM extends pi{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=Zl(jl(this.node.current,"focus",()=>this.onFocus()),jl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kk(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 i="onTap"+(n==="End"?"":n),o=a[i];o&&_t.postRender(()=>o(t,Ql(t)))}class VM extends pi{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=mD(t,(i,o)=>(kk(this.node,o,"Start"),(l,{success:u})=>kk(this.node,l,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const wm=new WeakMap,dp=new WeakMap,HM=e=>{const t=wm.get(e.target);t&&t(e)},$M=e=>{e.forEach(HM)};function WM({root:e,...t}){const n=e||document;dp.has(n)||dp.set(n,{});const a=dp.get(n),i=JSON.stringify(t);return a[i]||(a[i]=new IntersectionObserver($M,{root:e,...t})),a[i]}function GM(e,t,n){const a=WM(t);return wm.set(e,n),a.observe(e),()=>{wm.delete(e),a.unobserve(e)}}const KM={some:0,all:1};class qM extends pi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:i="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:a,threshold:typeof i=="number"?i:KM[i]},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:p,onViewportLeave:g}=this.node.getProps(),v=f?p:g;v&&v(h)};this.stopObserver=GM(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(YM(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function YM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ZM={inView:{Feature:qM},tap:{Feature:VM},focus:{Feature:BM},hover:{Feature:FM}},XM={layout:{ProjectionNode:Vx,MeasureLayout:nP}},JM={...kM,...ZM,...zM,...XM},Cl=gM(JM,yM);function QM(){!Hg.current&&vx();const[e]=b.useState(kd.current);return e}function aP(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=aP(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function e9(){for(var e,t,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=aP(e))&&(a&&(a+=" "),a+=t);return a}const t9=(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},n9=(e,t)=>({classGroupId:e,validator:t}),rP=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Cd="-",wk=[],a9="arbitrary..",r9=e=>{const t=s9(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return i9(l);const u=l.split(Cd),h=u[0]===""&&u.length>1?1:0;return iP(u,h,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const h=a[l],f=n[l];return h?f?t9(f,h):h:f||wk}return n[l]||wk}}},iP=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=iP(e,t+1,o);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(Cd):e.slice(t).join(Cd),h=l.length;for(let f=0;f<h;f++){const p=l[f];if(p.validator(u))return p.classGroupId}},i9=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?a9+a:void 0})(),s9=e=>{const{theme:t,classGroups:n}=e;return o9(n,t)},o9=(e,t)=>{const n=rP();for(const a in e){const i=e[a];Yg(i,n,a,t)}return n},Yg=(e,t,n,a)=>{const i=e.length;for(let o=0;o<i;o++){const l=e[o];l9(l,t,n,a)}},l9=(e,t,n,a)=>{if(typeof e=="string"){c9(e,t,n);return}if(typeof e=="function"){u9(e,t,n,a);return}d9(e,t,n,a)},c9=(e,t,n)=>{const a=e===""?t:sP(t,e);a.classGroupId=n},u9=(e,t,n,a)=>{if(h9(e)){Yg(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(n9(n,e))},d9=(e,t,n,a)=>{const i=Object.entries(e),o=i.length;for(let l=0;l<o;l++){const[u,h]=i[l];Yg(h,sP(t,u),n,a)}},sP=(e,t)=>{let n=e;const a=t.split(Cd),i=a.length;for(let o=0;o<i;o++){const l=a[o];let u=n.nextPart.get(l);u||(u=rP(),n.nextPart.set(l,u)),n=u}return n},h9=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,f9=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const i=(o,l)=>{n[o]=l,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=a[o])!==void 0)return i(o,l),l},set(o,l){o in n?n[o]=l:i(o,l)}}},xm="!",xk=":",p9=[],Pk=(e,t,n,a,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:i}),m9=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=i=>{const o=[];let l=0,u=0,h=0,f;const p=i.length;for(let S=0;S<p;S++){const P=i[S];if(l===0&&u===0){if(P===xk){o.push(i.slice(h,S)),h=S+1;continue}if(P==="/"){f=S;continue}}P==="["?l++:P==="]"?l--:P==="("?u++:P===")"&&u--}const g=o.length===0?i:i.slice(h);let v=g,k=!1;g.endsWith(xm)?(v=g.slice(0,-1),k=!0):g.startsWith(xm)&&(v=g.slice(1),k=!0);const w=f&&f>h?f-h:void 0;return Pk(o,k,v,w)};if(t){const i=t+xk,o=a;a=l=>l.startsWith(i)?o(l.slice(i.length)):Pk(p9,!1,l,void 0,!0)}if(n){const i=a;a=o=>n({className:o,parseClassName:i})}return a},g9=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let i=[];for(let o=0;o<n.length;o++){const l=n[o],u=l[0]==="[",h=t.has(l);u||h?(i.length>0&&(i.sort(),a.push(...i),i=[]),a.push(l)):i.push(l)}return i.length>0&&(i.sort(),a.push(...i)),a}},y9=e=>({cache:f9(e.cacheSize),parseClassName:m9(e),sortModifiers:g9(e),postfixLookupClassGroupIds:v9(e),...r9(e)}),v9=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)t[n[a]]=!0;return t},b9=/\s+/,_9=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:l}=t,u=[],h=e.trim().split(b9);let f="";for(let p=h.length-1;p>=0;p-=1){const g=h[p],{isExternal:v,modifiers:k,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:P}=n(g);if(v){f=g+(f.length>0?" "+f:f);continue}let L=!!P,A;if(L){const F=S.substring(0,P);A=a(F);const T=A&&l[A]?a(S):void 0;T&&T!==A&&(A=T,L=!1)}else A=a(S);if(!A){if(!L){f=g+(f.length>0?" "+f:f);continue}if(A=a(S),!A){f=g+(f.length>0?" "+f:f);continue}L=!1}const E=k.length===0?"":k.length===1?k[0]:o(k).join(":"),R=w?E+xm:E,j=R+A;if(u.indexOf(j)>-1)continue;u.push(j);const W=i(A,L);for(let F=0;F<W.length;++F){const T=W[F];u.push(R+T)}f=g+(f.length>0?" "+f:f)}return f},k9=(...e)=>{let t=0,n,a,i="";for(;t<e.length;)(n=e[t++])&&(a=oP(n))&&(i&&(i+=" "),i+=a);return i},oP=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=oP(e[a]))&&(n&&(n+=" "),n+=t);return n},w9=(e,...t)=>{let n,a,i,o;const l=h=>{const f=t.reduce((p,g)=>g(p),e());return n=y9(f),a=n.cache.get,i=n.cache.set,o=u,u(h)},u=h=>{const f=a(h);if(f)return f;const p=_9(h,n);return i(h,p),p};return o=l,(...h)=>o(k9(...h))},x9=[],Jt=e=>{const t=n=>n[e]||x9;return t.isThemeGetter=!0,t},lP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,cP=/^\((?:(\w[\w-]*):)?(.+)\)$/i,P9=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,S9=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,C9=/\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$/,T9=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,E9=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R9=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ti=e=>P9.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),Ha=e=>!!e&&Number.isInteger(Number(e)),hp=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),wr=e=>S9.test(e),uP=()=>!0,A9=e=>C9.test(e)&&!T9.test(e),Zg=()=>!1,L9=e=>E9.test(e),D9=e=>R9.test(e),I9=e=>!we(e)&&!Pe(e),M9=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),N9=e=>mi(e,fP,Zg),we=e=>lP.test(e),Ii=e=>mi(e,pP,A9),Sk=e=>mi(e,H9,Qe),O9=e=>mi(e,gP,uP),j9=e=>mi(e,mP,Zg),Ck=e=>mi(e,dP,Zg),U9=e=>mi(e,hP,D9),vu=e=>mi(e,yP,L9),Pe=e=>cP.test(e),ll=e=>as(e,pP),z9=e=>as(e,mP),Tk=e=>as(e,dP),F9=e=>as(e,fP),B9=e=>as(e,hP),bu=e=>as(e,yP,!0),V9=e=>as(e,gP,!0),mi=(e,t,n)=>{const a=lP.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},as=(e,t,n=!1)=>{const a=cP.exec(e);return a?a[1]?t(a[1]):n:!1},dP=e=>e==="position"||e==="percentage",hP=e=>e==="image"||e==="url",fP=e=>e==="length"||e==="size"||e==="bg-size",pP=e=>e==="length",H9=e=>e==="number",mP=e=>e==="family-name",gP=e=>e==="number"||e==="weight",yP=e=>e==="shadow",$9=()=>{const e=Jt("color"),t=Jt("font"),n=Jt("text"),a=Jt("font-weight"),i=Jt("tracking"),o=Jt("leading"),l=Jt("breakpoint"),u=Jt("container"),h=Jt("spacing"),f=Jt("radius"),p=Jt("shadow"),g=Jt("inset-shadow"),v=Jt("text-shadow"),k=Jt("drop-shadow"),w=Jt("blur"),S=Jt("perspective"),P=Jt("aspect"),L=Jt("ease"),A=Jt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...R(),Pe,we],W=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],T=()=>[Pe,we,h],B=()=>[ti,"full","auto",...T()],V=()=>[Ha,"none","subgrid",Pe,we],ee=()=>["auto",{span:["full",Ha,Pe,we]},Ha,Pe,we],se=()=>[Ha,"auto",Pe,we],fe=()=>["auto","min","max","fr",Pe,we],de=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],ie=()=>["auto",...T()],X=()=>[ti,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],q=()=>[ti,"screen","full","dvw","lvw","svw","min","max","fit",...T()],J=()=>[ti,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],H=()=>[e,Pe,we],M=()=>[...R(),Tk,Ck,{position:[Pe,we]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_e=()=>["auto","cover","contain",F9,N9,{size:[Pe,we]}],ge=()=>[hp,ll,Ii],pe=()=>["","none","full",f,Pe,we],ve=()=>["",Qe,ll,Ii],Be=()=>["solid","dashed","dotted","double"],Ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[Qe,hp,Tk,Ck],At=()=>["","none",w,Pe,we],qt=()=>["none",Qe,Pe,we],on=()=>["none",Qe,Pe,we],ft=()=>[Qe,Pe,we],Ut=()=>[ti,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wr],breakpoint:[wr],color:[uP],container:[wr],"drop-shadow":[wr],ease:["in","out","in-out"],font:[I9],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wr],shadow:[wr],spacing:["px",Qe],text:[wr],"text-shadow":[wr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ti,we,Pe,P]}],container:["container"],"container-type":[{"@container":["","normal","size",Pe,we]}],"container-named":[M9],columns:[{columns:[Qe,we,Pe,u]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:j()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Ha,"auto",Pe,we]}],basis:[{basis:[ti,"full","auto",u,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,ti,"auto","initial","none",we]}],grow:[{grow:["",Qe,Pe,we]}],shrink:[{shrink:["",Qe,Pe,we]}],order:[{order:[Ha,"first","last","none",Pe,we]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":fe()}],"auto-rows":[{"auto-rows":fe()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...de(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...de()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":de()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...J()]}],"min-block-size":[{"min-block":["auto",...J()]}],"max-block-size":[{"max-block":["none",...J()]}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,ll,Ii]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,V9,O9]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hp,we]}],"font-family":[{font:[z9,j9,t]}],"font-features":[{"font-features":[we]}],"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:[i,Pe,we]}],"line-clamp":[{"line-clamp":[Qe,"none",Pe,Sk]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Pe,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Pe,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Be(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",Pe,Ii]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[Qe,"auto",Pe,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[Ha,Pe,we]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe,we]}],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",Pe,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:_e()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ha,Pe,we],radial:["",Pe,we],conic:[Ha,Pe,we]},B9,U9]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:ve()}],"border-w-x":[{"border-x":ve()}],"border-w-y":[{"border-y":ve()}],"border-w-s":[{"border-s":ve()}],"border-w-e":[{"border-e":ve()}],"border-w-bs":[{"border-bs":ve()}],"border-w-be":[{"border-be":ve()}],"border-w-t":[{"border-t":ve()}],"border-w-r":[{"border-r":ve()}],"border-w-b":[{"border-b":ve()}],"border-w-l":[{"border-l":ve()}],"divide-x":[{"divide-x":ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Be(),"hidden","none"]}],"divide-style":[{divide:[...Be(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,Pe,we]}],"outline-w":[{outline:["",Qe,ll,Ii]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",p,bu,vu]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",g,bu,vu]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[Qe,Ii]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ve()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",v,bu,vu]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[Qe,Pe,we]}],"mix-blend":[{"mix-blend":[...Ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ke()}],"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":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[Pe,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:_e()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Pe,we]}],filter:[{filter:["","none",Pe,we]}],blur:[{blur:At()}],brightness:[{brightness:[Qe,Pe,we]}],contrast:[{contrast:[Qe,Pe,we]}],"drop-shadow":[{"drop-shadow":["","none",k,bu,vu]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",Qe,Pe,we]}],"hue-rotate":[{"hue-rotate":[Qe,Pe,we]}],invert:[{invert:["",Qe,Pe,we]}],saturate:[{saturate:[Qe,Pe,we]}],sepia:[{sepia:["",Qe,Pe,we]}],"backdrop-filter":[{"backdrop-filter":["","none",Pe,we]}],"backdrop-blur":[{"backdrop-blur":At()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,Pe,we]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,Pe,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,Pe,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,Pe,we]}],"backdrop-invert":[{"backdrop-invert":["",Qe,Pe,we]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,Pe,we]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,Pe,we]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,Pe,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Pe,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qe,"initial",Pe,we]}],ease:[{ease:["linear","initial",L,Pe,we]}],delay:[{delay:[Qe,Pe,we]}],animate:[{animate:["none",A,Pe,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Pe,we]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:qt()}],"rotate-x":[{"rotate-x":qt()}],"rotate-y":[{"rotate-y":qt()}],"rotate-z":[{"rotate-z":qt()}],scale:[{scale:on()}],"scale-x":[{"scale-x":on()}],"scale-y":[{"scale-y":on()}],"scale-z":[{"scale-z":on()}],"scale-3d":["scale-3d"],skew:[{skew:ft()}],"skew-x":[{"skew-x":ft()}],"skew-y":[{"skew-y":ft()}],transform:[{transform:[Pe,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ut()}],"translate-x":[{"translate-x":Ut()}],"translate-y":[{"translate-y":Ut()}],"translate-z":[{"translate-z":Ut()}],"translate-none":["translate-none"],zoom:[{zoom:[Ha,Pe,we]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Pe,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",Pe,we]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[Qe,ll,Ii,Sk]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},W9=w9($9);function Pt(...e){return W9(e9(e))}const G9=C.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[C.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"}),C.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"}),C.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"}),C.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"})]}),K9=C.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:C.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"})}),q9={google:G9,github:K9},Y9={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function Z9(e){return Y9[e]||String(e||"").replace(/-/g," ")}function X9(e){if(typeof e=="string"&&e.trim())return e.trim();if(e&&typeof e=="object"){if(typeof e.token=="string"&&e.token.trim())return e.token.trim();if(typeof e.otp=="string"&&e.otp.trim())return e.otp.trim()}return""}function J9({title:e,subtitle:t,className:n="",onSuccess:a,hideLogo:i=!1,initialMode:o="signin",tokenFromUrl:l="",initialEmail:u="",initialCode:h=""}){Yl();const{enabled:f,signedIn:p,refreshUser:g,signInWithPassword:v,signUp:k,signInWithOAuth:w,getPublicAuthConfig:S,sendResetPasswordEmail:P,exchangeResetPasswordToken:L,resetPassword:A}=ns(),[E,R]=b.useState(o),[j,W]=b.useState(u),[F,T]=b.useState(""),[B,V]=b.useState(""),[ee,se]=b.useState(""),[fe,de]=b.useState(h),[he,ie]=b.useState(!1),[X,q]=b.useState(null),[J,H]=b.useState(null),[M,Z]=b.useState(!1),[_e,ge]=b.useState(!!(o!=="signin"||u)),[pe,ve]=b.useState(!0),[Be,Ke]=b.useState([]),[Ne,At]=b.useState(8);b.useEffect(()=>{o&&R(o)},[o]),b.useEffect(()=>{u&&W(u)},[u]),b.useEffect(()=>{h&&de(h)},[h]),b.useEffect(()=>{if(!f)return;let qe=!0;return ve(!0),(async()=>{const{data:nt,error:Lt}=await S();if(qe){if(Lt||!nt)Ke(["google","github"]);else{const St=Array.isArray(nt.oAuthProviders)?nt.oAuthProviders:[],Ln=Array.isArray(nt.customOAuthProviders)?nt.customOAuthProviders:[];Ke([...St,...Ln]),typeof nt.passwordMinLength=="number"&&nt.passwordMinLength>0&&At(nt.passwordMinLength)}ve(!1)}})(),()=>{qe=!1}},[f,S]),b.useEffect(()=>{p&&a&&a()},[p,a]);const qt=b.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),on=b.useMemo(()=>typeof window>"u"?"/reset-password":`${window.location.origin}/reset-password`,[]),ft=b.useCallback(async qe=>{q(null),ie(!0);try{const{error:nt}=await w(qe,qt);nt&&q(nt.message||String(nt))}finally{ie(!1)}},[w,qt]);b.useEffect(()=>{if(!f||pe||p||typeof window>"u")return;const qe=window.location.search;if(!qe)return;const nt=new URLSearchParams(qe),Lt=nt.get("native")==="1",St=nt.get("provider");Lt&&St&&[...Be].includes(St)&&ft(St)},[f,pe,p,Be,ft]);const Ut=b.useCallback(async qe=>{qe.preventDefault(),q(null),ie(!0);try{if(E==="signup"){const{data:Lt,error:St}=await k({email:j.trim(),password:F,name:ee.trim()||void 0});if(St){q(St.message||String(St));return}if(Lt?.requireEmailVerification){H(me("login.verify_email_pending")),R("signin");return}await g();return}const{error:nt}=await v({email:j.trim(),password:F});if(nt){q(nt.message||String(nt));return}await g()}finally{ie(!1)}},[E,j,F,ee,k,v,g]),cr=b.useCallback(async qe=>{qe.preventDefault(),q(null),ie(!0);try{const nt=j.trim(),{error:Lt}=await P({email:nt,redirectTo:on});if(Lt){q(Lt.message||String(Lt));return}W(nt),H(me("reset_password.request.sent")),R("reset_confirm")}finally{ie(!1)}},[j,on,P]),Rr=b.useCallback(async qe=>{if(qe.preventDefault(),q(null),F!==B){q(me("reset_password.error.password_mismatch"));return}ie(!0);try{let nt=l;if(!nt){const{data:St,error:Ln}=await L({email:j.trim(),code:fe.trim()});if(Ln){q(Ln.message||String(Ln));return}if(nt=X9(St),!nt){q(me("reset_password.error.missing_token"));return}}const{error:Lt}=await A({newPassword:F,otp:nt});if(Lt){q(Lt.message||String(Lt));return}Z(!0),H(me("reset_password.success"))}finally{ie(!1)}},[fe,B,j,L,F,A,l]);if(!f)return null;const Mt=E==="reset_email"||E==="reset_confirm";return C.jsxs("div",{className:Pt("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",n),children:[Mt&&C.jsxs("button",{type:"button",onClick:()=>{R("signin"),H(null),q(null),Z(!1),T(""),V("")},className:"flex items-center gap-1.5 text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors mb-4 focus:outline-none",children:[C.jsx(bA,{className:"h-3.5 w-3.5"}),me("reset_password.back_to_sign_in")]}),C.jsxs("div",{className:Pt("mb-6",Mt?"text-left":"text-center"),children:[!i&&!Mt&&C.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[C.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),C.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white font-oai tracking-tight",children:me("shared.app_name")})]}),C.jsx("h2",{className:Pt("text-sm font-semibold text-oai-black dark:text-white tracking-tight mb-1",(i||Mt)&&"text-base font-bold md:text-lg"),children:Mt?me("reset_password.title"):e||me("login_modal.subtitle")}),!Mt&&t&&C.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px] mx-auto",children:t}),Mt&&C.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px]",children:J&&E==="reset_confirm"&&!M?J:me("reset_password.subtitle")})]}),J&&(!Mt||M)&&C.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:J}),X&&C.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:X}),E==="reset_email"&&C.jsxs("form",{onSubmit:cr,className:"space-y-3",children:[C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-reset-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("login.field.email")}),C.jsx("input",{id:"card-reset-email",type:"email",autoComplete:"email",required:!0,value:j,onChange:qe=>W(qe.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"})]}),C.jsx("button",{type:"submit",disabled:he,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:me("reset_password.request.submit")})]}),E==="reset_confirm"&&(M?C.jsx("button",{type:"button",onClick:()=>{R("signin"),Z(!1),H(null),q(null),T(""),V("")},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 text-center shadow-sm",children:me("reset_password.success_cta")}):C.jsxs("form",{onSubmit:Rr,className:"space-y-3",children:[!l&&C.jsxs(C.Fragment,{children:[C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-reset-email-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("login.field.email")}),C.jsx("input",{id:"card-reset-email-confirm",type:"email",autoComplete:"email",required:!0,value:j,onChange:qe=>W(qe.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"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-reset-code",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("reset_password.field.code")}),C.jsx("input",{id:"card-reset-code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",required:!0,value:fe,onChange:qe=>de(qe.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"})]})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-reset-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("reset_password.field.new_password")}),C.jsx("input",{id:"card-reset-password",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:F,onChange:qe=>T(qe.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"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-reset-password-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("reset_password.field.confirm_password")}),C.jsx("input",{id:"card-reset-password-confirm",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:B,onChange:qe=>V(qe.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"})]}),C.jsx("button",{type:"submit",disabled:he,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:me("reset_password.reset.submit")})]})),!Mt&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"space-y-2.5 mb-5",children:pe?C.jsxs("div",{className:"space-y-2.5",children:[C.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),C.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):Be.map(qe=>C.jsxs("button",{type:"button",disabled:he,onClick:()=>ft(qe),className:Pt("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:[q9[qe]||null,me("login.oauth.continue",{provider:Z9(qe)})]},qe))}),_e?C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"relative mb-5",children:[C.jsx("div",{className:"absolute inset-0 flex items-center",children:C.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),C.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:C.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:me("login_modal.divider_email")})})]}),C.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:[C.jsx("button",{type:"button",className:Pt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",E==="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:()=>{R("signin"),q(null)},children:me("login.tab.sign_in")}),C.jsx("button",{type:"button",className:Pt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",E==="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:()=>{R("signup"),q(null)},children:me("login.tab.sign_up")})]}),C.jsxs("form",{onSubmit:Ut,className:"space-y-3",children:[E==="signup"&&C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("login.field.name")}),C.jsx("input",{id:"card-name",type:"text",autoComplete:"name",value:ee,onChange:qe=>se(qe.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:me("login.field.name_placeholder")})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("login.field.email")}),C.jsx("input",{id:"card-email",type:"email",autoComplete:"email",required:!0,value:j,onChange:qe=>W(qe.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"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"card-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:me("login.field.password")}),C.jsx("input",{id:"card-password",type:"password",autoComplete:E==="signup"?"new-password":"current-password",required:!0,minLength:E==="signup"?Ne:void 0,value:F,onChange:qe=>T(qe.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"}),E==="signup"&&C.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:me("login.password_hint",{min:String(Ne)})}),E==="signin"&&C.jsx("div",{className:"mt-1 text-right",children:C.jsx("button",{type:"button",onClick:()=>{R("reset_email"),q(null),H(null)},className:"text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white no-underline bg-transparent border-0 p-0 cursor-pointer focus:outline-none",children:me("login.forgot_password")})})]}),C.jsx("button",{type:"submit",disabled:he,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:me(E==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"relative mb-5",children:[C.jsx("div",{className:"absolute inset-0 flex items-center",children:C.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),C.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:C.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:me("login.divider")})})]}),C.jsxs("button",{type:"button",onClick:()=>ge(!0),className:Pt("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:[C.jsx(LA,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),me("login_modal.continue_email")]})]})]})]})}function Q9(){const{isOpen:e,closeLoginModal:t}=g2(),{enabled:n}=ns();return b.useEffect(()=>{if(!e)return;const a=i=>{i.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),n?C.jsx($x,{children:e&&C.jsxs(Cl.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:[C.jsx(Cl.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),C.jsxs(Cl.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 shadow-2xl overflow-hidden",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:a=>a.stopPropagation(),children:[C.jsx("button",{type:"button",onClick:t,className:"absolute right-4 top-4 z-10 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:C.jsx(bg,{className:"h-5 w-5"})}),C.jsx(J9,{onSuccess:t,className:"p-6 bg-transparent"})]})]})}):null}const eN={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},jz="https://tokentracker.statuspage.io/";function tN(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?eN:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||ar()).trim()}function nN(){return ar()}function aN(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 rN=300*1e3,iN=720*60*1e3;function Xg(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function sN(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+iN<=t:!0}async function vP(e,t){const n=ar();if(!Xg(n)||!e)return;const a=n.replace(/\/$/,""),i=uo(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};i&&(o.apikey=i);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:o,body:JSON.stringify({period:"week",source:t})})}catch{}}async function oN(){try{const e=await fetch("/functions/tokentracker-machine-id",{headers:{Accept:"application/json"},cache:"no-store"});if(e.ok){const t=await e.json().catch(()=>null),n=typeof t?.machineId=="string"?t.machineId.trim():null;if(n&&n.length>=8)return n}}catch{}return null}async function lN(e){const t=ar();if(!Xg(t)||!e)return null;const n=t.replace(/\/$/,""),a=uo(),i={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(i.apikey=a);const o=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await oN();if(!l)return null;const u=`Token Tracker (dashboard) #${l.slice(0,8)}`,h=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:i,body:JSON.stringify({device_name:u,platform:o,machine_id:l})});if(!h.ok)return null;const f=await h.json().catch(()=>null),p=typeof f?.token=="string"?f.token:null,g=typeof f?.device_id=="string"?f.device_id:null;return!p||!g?null:{token:p,deviceId:g,issuedAt:typeof f?.created_at=="string"?f.created_at:new Date().toISOString()}}async function Ek(e){const{deviceToken:t,insforgeBaseUrl:n,drain:a}=e,i={deviceToken:t};a===!0&&(i.drain=!0);const o=n||ar();Xg(o)&&(i.insforgeBaseUrl=o.trim());const l=await Kl(),u=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...l},body:JSON.stringify(i)}),h=await u.json().catch(()=>({}));if(!u.ok){const f=typeof h.error=="string"?h.error:`HTTP ${u.status}`;throw new Error(f)}return h}async function Rk(e){const t=await e();if(!t)return null;const n=Lw();if(n&&!sN(n))return n;const a=await lN(t);return a?(cR(a),a):null}async function bP(e,t={}){let n=await e();if(!n)return null;let a=await Rk(async()=>n);if(!a)return n;try{return await Ek({deviceToken:a.token,insforgeBaseUrl:ar(),drain:t.drain===!0}),n}catch(i){if(!Lw()||(Dw(),n=await e(),!n)||(a=await Rk(async()=>n),!a))throw i;return await Ek({deviceToken:a.token,insforgeBaseUrl:ar(),drain:t.drain===!0}),n}}async function cN(e){const t=uR();if(Date.now()-t<rN)return;const n=await bP(e);n&&(Iw(Date.now()),await vP(n,"cloud-sync-auto"))}async function Uz(e){const t=await bP(e,{drain:!0});t&&(Iw(Date.now()),await vP(t,"cloud-sync-now"))}function uN(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function dN(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||uN(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function hN(){const e=zn(),t=ns(),n=b.useRef(!1);b.useEffect(()=>{if(!sd()||!dN(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!od())return;let a=!1;const i=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await cN(()=>t.getAccessToken())}catch(o){console.warn("[tokentracker] cloud usage sync:",o)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(i)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function fN(){const e=b.useContext(p2);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function pN({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function mN(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 gN(e){return e?Bd()?`/api/avatar-proxy?url=${encodeURIComponent(e)}`:e:null}function _u(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 Ak({className:e,variant:t="header",collapsed:n=!1,onAfterAction:a}){Yl();const i=t==="sidebar",{enabled:o,loading:l,signedIn:u,user:h,displayName:f}=ns(),{openLoginModal:p}=g2(),g=so(),v=b.useMemo(()=>mN(h),[h]),k=b.useMemo(()=>gN(v),[v]),[w,S]=Zs.useState(!1);if(Zs.useEffect(()=>{S(!1)},[k]),!o)return null;if(l)return C.jsx("div",{className:Pt("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 i?C.jsxs("button",{type:"button",onClick:()=>{p(),a?.()},className:Pt("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":me("header.auth.sign_in_aria"),title:n?me("header.auth.sign_in_aria"):void 0,children:[C.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:C.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&C.jsx("span",{className:"truncate flex-1 text-left",children:me("header.auth.sign_in_aria")})]}):C.jsx("button",{type:"button",onClick:p,className:Pt("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",e),"aria-label":me("header.auth.sign_in_aria"),children:me("header.auth.sign_in_aria")});const P=()=>{g("/settings"),a?.()};return C.jsx("div",{className:Pt(i?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:C.jsxs("button",{type:"button",onClick:P,className:Pt(i?Pt("flex w-full items-center gap-2 rounded-md px-2 py-1.5 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 transition-colors min-w-0",n&&"justify-center px-0 py-0 h-9 w-9"):"flex items-center gap-2 rounded-md pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":me("header.auth.open_settings"),title:i&&n?f:void 0,children:[i?C.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:k&&!w?C.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",onError:()=>S(!0)}):_u(f)==="?"?C.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:C.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):C.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:_u(f)})}):k&&!w?C.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",onError:()=>S(!0)}):_u(f)==="?"?C.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:C.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):C.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:_u(f)}),i?!n&&C.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}):C.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 Pm="tt.sidebarCollapsed";function _P(){return[{id:"general",label:me("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:kA,label:me("nav.usage")},{id:"limits",to:"/limits",icon:SA,label:me("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:YA,label:me("nav.leaderboard")}]},{id:"tools",label:me("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:RA,label:me("nav.widgets")},{id:"skills",to:"/skills",icon:UA,label:me("nav.skills")},{id:"ip-check",to:"/ip-check",icon:TA,label:me("nav.ip_check")}]},{id:"account",label:me("nav.group.account"),items:[{id:"settings",to:"/settings",icon:$A,label:me("nav.settings")}]}]}function yN(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Pm)==="1"}catch{return!1}}function vN(){const[e,t]=b.useState(yN),n=b.useCallback(()=>{t(a=>{const i=!a;try{typeof window<"u"&&window.localStorage.setItem(Pm,i?"1":"0")}catch{}return i})},[]);return b.useEffect(()=>{if(typeof window>"u")return;const a=i=>{i.key===Pm&&t(i.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function bN(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function _N({label:e,collapsed:t,first:n}){return t?n?null:C.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):C.jsx("div",{className:Pt("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 kN({item:e,collapsed:t,active:n,onClick:a}){const i=e.icon;return C.jsxs(Nd,{to:e.to,onClick:a,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:Pt("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:[C.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:C.jsx(i,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&C.jsx("span",{className:"truncate",children:e.label})]})}function wN({as:e="button",title:t,onClick:n,href:a,children:i,className:o,...l}){const u=Pt("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"?C.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...l,children:i}):C.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...l,children:i})}function xN({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,a]=b.useState(null);return b.useEffect(()=>{if(typeof window>"u")return;const i=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;pN({prefersReducedMotion:i,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]),C.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:Pt("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:[C.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:C.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"})}),C.jsx("span",{children:"Star"}),n!==null&&C.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const PN=[{value:"light",label:"Light",Icon:f2},{value:"dark",label:"Dark",Icon:h2},{value:"system",label:"System",Icon:NA}];function SN({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[i,o]=b.useState(!1),l=b.useRef(null),u=t==="dark"?h2:f2;return b.useEffect(()=>{if(!i)return;const h=p=>{l.current&&!l.current.contains(p.target)&&o(!1)},f=p=>{p.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[i]),C.jsxs("div",{ref:l,className:"relative",children:[C.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":i,"aria-haspopup":"menu",title:"Theme",onClick:()=>o(h=>!h),className:Pt("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:C.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),i&&C.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:PN.map(({value:h,label:f,Icon:p})=>{const g=e===h;return C.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(h),o(!1)},className:Pt("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",g?"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:[C.jsx(p,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),C.jsx("span",{children:f})]},h)})})]})}function kP({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:i,glassChrome:o=!1}){const u=zn()?.pathname||"/",{theme:h,resolvedTheme:f,setTheme:p}=fN(),{resolvedLocale:g}=Yl(),v=b.useMemo(()=>_P(),[g]);return C.jsxs(C.Fragment,{children:[C.jsx("div",{className:Pt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:a?C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("div",{className:"flex-1 min-w-0",children:C.jsx(Ak,{variant:"sidebar",collapsed:e,onAfterAction:n})}),C.jsx("button",{type:"button",onClick:i,"aria-label":me("nav.close_menu"),title:me("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:C.jsx(bg,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):C.jsx(Ak,{variant:"sidebar",collapsed:e,onAfterAction:n})}),C.jsx("nav",{"aria-label":me("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:v.map((k,w)=>C.jsxs("div",{className:"flex flex-col",children:[C.jsx(_N,{label:k.label,collapsed:e,first:w===0}),C.jsx("div",{className:"flex flex-col gap-0.5",children:k.items.filter(S=>!(S.to==="/widgets"&&mg())).map(S=>C.jsx(kN,{item:S,collapsed:e,active:bN(u,S.to),onClick:n},S.id))})]},k.id))}),C.jsxs("div",{className:Pt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[C.jsx(SN,{theme:h,resolvedTheme:f,onSetTheme:p,glassChrome:o}),C.jsx("div",{className:"flex items-center gap-1.5",children:!e&&C.jsx(xN,{glassChrome:o})})]})]})}function CN({collapsed:e,onToggleCollapsed:t}){const n=b.useMemo(()=>typeof window>"u"?!1:Aa()||Bd(),[]);return C.jsx("aside",{"aria-label":me("nav.aside_label"),className:Pt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:C.jsx(kP,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function TN({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?C.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[C.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),C.jsx("aside",{"aria-label":me("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:C.jsx(kP,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function EN({onOpenDrawer:e}){return C.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:[C.jsx(wN,{title:me("nav.menu"),onClick:e,children:C.jsx(IA,{className:"h-5 w-5","aria-hidden":!0})}),C.jsxs(Nd,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[C.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),C.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),C.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function RN({children:e}){const{collapsed:t,toggle:n}=vN(),[a,i]=b.useState(!1),o=b.useCallback(()=>i(!0),[]),l=b.useCallback(()=>i(!1),[]),u=b.useMemo(()=>typeof window>"u"?!1:Aa()||Bd(),[]);return C.jsxs("div",{className:Pt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",mg()&&"tt-native-glass-shell",u?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[u&&C.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),C.jsxs("div",{className:"flex-1 min-h-0 flex",children:[C.jsx(CN,{collapsed:t,onToggleCollapsed:n}),C.jsx(TN,{open:a,onClose:l}),C.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:C.jsxs("div",{className:Pt("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:[C.jsx(EN,{onOpenDrawer:o}),C.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}function AN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})})}function LN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:C.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"})})}function DN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})})}function IN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})})}function MN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})})}function NN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M4.125 20.149c-2.69 5.959 3.036 7.453 7.26 3.966 1.24 3.91 5.898.993 7.569-2.036 3.682-6.678 2.195-13.49 1.813-14.895-2.617-9.582-15.699-9.592-17.95.049-.526 1.687-.535 3.606-.833 5.598-.15 1.005-.256 1.646-.645 2.703-.223.607-.53 1.147-1.014 2.056-.75 1.412-.434 4.138 3.434 2.724v.001ZM11.895 11.332c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.395.9.395 1.578 0 1.283-.493 2.048-1.319 2.048Zm4.416 0c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.396.9.396 1.578 0 1.283-.494 2.048-1.32 2.048Z"})})}function ON({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function jN({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:[C.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),C.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]})}function UN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:C.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})})}function zN({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 60",fill:"none",className:t,"aria-hidden":"true",children:[C.jsx("path",{fill:"currentColor",d:"M37.2114 3.75318C37.6821 3.33106 37.7106 3.31457 38.0558 3.29385C38.6149 3.2531 39.1272 3.52199 39.9989 4.31564C42.0356 6.16652 44.8714 9.97183 46.6346 13.2212L47.3163 14.4819L48.2782 14.9605C49.2072 15.4299 50.7308 16.3923 51.3672 16.9085C51.655 17.1464 51.6956 17.1508 51.9947 17.0344C53.3454 16.5084 55.2803 17.206 56.9869 18.8432C58.5231 20.3155 59.9943 22.8312 60.558 24.9308C60.6403 25.2687 60.7493 25.9952 60.7891 26.5362C60.9177 28.4358 60.3092 29.9532 59.1362 30.64C58.8965 30.7784 58.8801 30.8158 58.8868 31.4132C58.9409 34.2583 58.1741 37.0985 56.6335 39.8679C54.8946 42.9773 51.7981 46.1938 47.6074 49.2243C45.357 50.8619 40.0323 53.964 37.6248 55.0532C31.8578 57.6496 27.2346 58.646 23.2188 58.154C20.8236 57.8638 18.1124 56.9287 16.5082 55.8433C16.086 55.5515 16.0191 55.5329 15.6966 55.6251C13.9793 56.1185 11.73 55.1053 9.81931 52.9844C9.05725 52.1366 7.82714 50.0548 7.42839 48.9409C6.50606 46.3339 6.68976 43.9816 7.91836 42.5767C8.23573 42.2149 8.2453 42.1995 8.17598 41.5912C8.06148 40.5951 8.00971 39.1206 8.06202 38.1692L8.10361 37.2803L6.76977 34.9212C4.70378 31.2451 3.3912 28.1582 2.88489 25.7998C2.61762 24.5066 2.63385 23.9324 2.96214 23.5078C3.16198 23.2515 3.81796 22.9866 4.60785 22.8407C6.59665 22.4917 10.9334 22.8076 15.7581 23.6595L16.259 23.7458L17.3608 22.7713C19.1891 21.1519 20.4038 20.244 22.6429 18.8478C24.9768 17.3876 27.6108 16.1858 30.577 15.2346L31.5295 14.9294L32.0526 13.5561C33.9257 8.61146 35.8437 4.96584 37.2114 3.75318ZM21.5208 29.0919C19.404 30.314 18.3453 30.9251 17.5676 31.6099C14.4179 34.3835 13.2414 38.777 14.5823 42.7537C14.9135 43.7357 15.5247 44.7942 16.7469 46.9111C17.9691 49.0279 18.5801 50.0865 19.2649 50.8643C22.0385 54.014 26.4316 55.1918 30.4084 53.8509C31.3904 53.5198 32.4489 52.9085 34.5657 51.6863L46.7442 44.6551C48.8613 43.4328 49.9205 42.8214 50.6983 42.1365C53.8479 39.363 55.0245 34.9695 53.6835 30.9927C53.3524 30.0107 52.7412 28.9522 51.519 26.8354C50.2968 24.7185 49.6858 23.66 49.0009 22.8822C46.2274 19.7325 41.8342 18.5547 37.8575 19.8956C36.8754 20.2267 35.8163 20.8383 33.6993 22.0606L21.5208 29.0919Z"}),C.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:C.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),C.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:C.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function FN({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:[C.jsx("path",{d:"M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"}),C.jsx("path",{d:"M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"}),C.jsx("path",{d:"M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"})]})}function BN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:t,children:C.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function VN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:C.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:C.jsx("path",{d:"M3.17890888,3.6 L3.17890888,0 L16,0 L16,3.6 L3.17890888,3.6 Z M9.642,7.2 L9.64218223,10.8 L0,10.8 L0,3.6 L16,3.6 L16,7.2 L9.642,7.2 Z M3.17890888,18 L3.178,14.4 L0,14.4 L0,10.8 L16,10.8 L16,18 L3.17890888,18 Z",fillRule:"nonzero"})})})}function HN({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[C.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),C.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),C.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),C.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),C.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),C.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function $N({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[C.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),C.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),C.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}function WN({size:e=16,className:t=""}){return C.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[C.jsx("path",{d:"M9 3v2"}),C.jsx("path",{d:"M15 3v2"}),C.jsx("rect",{x:"4",y:"6",width:"16",height:"13",rx:"3"}),C.jsx("circle",{cx:"9",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),C.jsx("circle",{cx:"15",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),C.jsx("path",{d:"M9 16h6"})]})}const GN={CLAUDE:AN,CODEBUDDY:zN,CODEX:LN,COPILOT:UN,CRAFT:VN,CURSOR:DN,DROID:WN,GEMINI:IN,GITHUB:BN,GROK:MN,HERMES:FN,KIMI:jN,KIRO:NN,OPENCODE:ON,OMP:HN,PI:$N},KN={ANTIGRAVITY:"/brand-logos/antigravity.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",GEMINI:"/brand-logos/gemini.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"};function qN({size:e=16,className:t=""}){return C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:C.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function YN({provider:e,size:t=16,color:n,className:a=""}){const i=e?.toUpperCase?.()||"",o=KN[i];if(o)return C.jsx("img",{src:o,alt:"",width:t,height:t,className:a,style:{width:t,height:t,objectFit:"contain"},"aria-hidden":!0});const l=GN[i];return l?C.jsx(l,{size:t,className:a}):C.jsx(qN,{size:t,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${a}`})}const wP="tokentracker-skills";async function rs(e){const t=new URL(`/functions/${wP}`,window.location.origin);if(e)for(const[i,o]of Object.entries(e))o!=null&&o!==""&&t.searchParams.set(i,String(o));const n=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),a=await n.json().catch(()=>null);if(!n.ok)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}async function gi(e){const t=await Kl(),n=await fetch(`/functions/${wP}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),a=await n.json().catch(()=>null);if(!n.ok||a?.ok===!1)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}function ZN(){return rs({mode:"installed"})}function zz(e={}){return rs({mode:"discover",...e.force?{force:1}:{}})}function Fz(e,t=0,n=20){return rs({mode:"search",q:e,offset:t,limit:n})}function Bz(){return rs({mode:"repos"})}function Vz(e,t){return gi({action:"install",skill:e,targets:t})}function Hz(e){return gi({action:"uninstall",id:e})}function $z(e){return gi({action:"restore",id:e})}function Wz(e,t){return gi({action:"set_targets",id:e,targets:t})}function Gz(e,t){return gi({action:"import_local",directory:e,targets:t})}function Kz(e,t){return gi({action:"delete_local",directory:e,targets:t||[]})}function qz(e){return gi({action:"add_repo",repo:e})}function Yz(e,t){return gi({action:"remove_repo",owner:e,name:t})}function Zz(e={}){return rs({mode:"popular",...e.force?{force:1}:{}})}function Xz(e={}){return rs({mode:"updates",...e.force?{force:1}:{}})}function Jz(e={}){return rs({mode:"skill_usage",...e.force?{force:1}:{}})}const XN=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function JN(){const e=so(),t=QM(),[n,a]=b.useState(!1),[i,o]=b.useState(""),[l,u]=b.useState(0),[h,f]=b.useState([]),p=b.useRef(null),g=b.useRef(null);b.useEffect(()=>{const E=R=>{(R.metaKey||R.ctrlKey)&&(R.key==="k"||R.key==="K")&&(R.preventDefault(),a(W=>!W))};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]),b.useEffect(()=>{if(!n)return;o(""),u(0);const E=requestAnimationFrame(()=>p.current?.focus());return XN&&!h.length&&ZN().then(R=>f(R?.skills||[])).catch(()=>f([])),()=>cancelAnimationFrame(E)},[n,h.length]);const v=b.useMemo(()=>{const E=_P().flatMap(j=>j.items.map(W=>({kind:"page",id:`page:${W.id}`,label:W.label,sub:me("cmdk.group.pages"),Icon:W.icon,run:()=>e(W.to)}))),R=(h||[]).map(j=>({kind:"skill",id:`skill:${j.id||j.directory}`,label:j.name||j.directory,sub:j.repoOwner&&j.repoName?`${j.repoOwner}/${j.repoName}`:me("cmdk.group.skills"),provider:(j.targets||[])[0]||"claude",run:()=>e(`/skills?skill=${encodeURIComponent(j.directory||j.id)}`)}));return[...E,...R]},[e,h]),k=b.useMemo(()=>{const E=i.trim().toLowerCase();return E?v.filter(R=>R.label.toLowerCase().includes(E)||String(R.sub||"").toLowerCase().includes(E)):v},[v,i]);b.useEffect(()=>{l>=k.length&&u(k.length?k.length-1:0)},[l,k.length]),b.useEffect(()=>{if(!n)return;g.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,n]);const w=b.useCallback(()=>a(!1),[]),S=b.useCallback(E=>{E&&(w(),E.run())},[w]),P=E=>{E.key==="ArrowDown"?(E.preventDefault(),u(R=>Math.min(R+1,Math.max(0,k.length-1)))):E.key==="ArrowUp"?(E.preventDefault(),u(R=>Math.max(R-1,0))):E.key==="Enter"?(E.preventDefault(),S(k[l])):E.key==="Escape"&&(E.preventDefault(),w())},L={duration:t?0:.12},A=t?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return C.jsx($x,{children:n?C.jsxs(Cl.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:t?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:L,children:[C.jsx("button",{type:"button","aria-label":me("cmdk.close"),onClick:w,className:"absolute inset-0 cursor-default bg-oai-black/40"}),C.jsxs(Cl.div,{role:"dialog","aria-modal":"true","aria-label":me("cmdk.open_aria"),initial:t?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:t?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:A,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[C.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[C.jsx(VA,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),C.jsx("input",{ref:p,type:"text",value:i,onChange:E=>{o(E.target.value),u(0)},onKeyDown:P,"aria-label":me("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":k[l]?`cmdk-opt-${l}`:void 0,role:"combobox","aria-expanded":"true",placeholder:me("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),C.jsx("div",{ref:g,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:k.length===0?C.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:me("cmdk.empty")}):k.map((E,R)=>{const j=R===l;return C.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${R}`,"data-cmdk-index":R,"aria-selected":j,onMouseMove:()=>u(R),onClick:()=>S(E),className:Pt("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",j?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[C.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:E.kind==="skill"?C.jsx(YN,{provider:E.provider,size:16}):C.jsx(E.Icon,{className:"h-4 w-4","aria-hidden":!0})}),C.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:E.label}),C.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:E.sub}),j?C.jsx(xA,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},E.id)})})]})]}):null})}const QN=[];function Jg(e){b.useEffect(e,QN)}const Lk={};function yo(e,t){const n=b.useRef(Lk);return n.current===Lk&&(n.current=e(t)),n}function eO(e,t){return function(a,...i){const o=new URL(e);return o.searchParams.set("code",a.toString()),i.forEach(l=>o.searchParams.append("args[]",l)),`${t} error #${a}; visit ${o} for the full message.`}}const vo=eO("https://base-ui.com/production-error","Base UI"),Qg=b.createContext(void 0);function e0(){const e=b.useContext(Qg);if(!e)throw new Error(vo(73));return e}const Sa=(e,t,n,a,i,o,...l)=>{if(l.length>0)throw new Error(vo(1));let u;if(e&&t&&n&&a&&i&&o)u=(h,f,p,g)=>{const v=e(h,f,p,g),k=t(h,f,p,g),w=n(h,f,p,g),S=a(h,f,p,g),P=i(h,f,p,g);return o(v,k,w,S,P,f,p,g)};else if(e&&t&&n&&a&&i)u=(h,f,p,g)=>{const v=e(h,f,p,g),k=t(h,f,p,g),w=n(h,f,p,g),S=a(h,f,p,g);return i(v,k,w,S,f,p,g)};else if(e&&t&&n&&a)u=(h,f,p,g)=>{const v=e(h,f,p,g),k=t(h,f,p,g),w=n(h,f,p,g);return a(v,k,w,f,p,g)};else if(e&&t&&n)u=(h,f,p,g)=>{const v=e(h,f,p,g),k=t(h,f,p,g);return n(v,k,f,p,g)};else if(e&&t)u=(h,f,p,g)=>{const v=e(h,f,p,g);return t(v,f,p,g)};else if(e)u=e;else throw new Error("Missing arguments");return u};var fp={exports:{}},pp={};var Dk;function tO(){if(Dk)return pp;Dk=1;var e=zl();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(g,v){var k=v(),w=a({inst:{value:k,getSnapshot:v}}),S=w[0].inst,P=w[1];return o(function(){S.value=k,S.getSnapshot=v,h(S)&&P({inst:S})},[g,k,v]),i(function(){return h(S)&&P({inst:S}),g(function(){h(S)&&P({inst:S})})},[g]),l(k),k}function h(g){var v=g.getSnapshot;g=g.value;try{var k=v();return!n(g,k)}catch{return!0}}function f(g,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return pp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,pp}var Ik;function xP(){return Ik||(Ik=1,fp.exports=tO()),fp.exports}var nO=xP(),mp={exports:{}},gp={};var Mk;function aO(){if(Mk)return gp;Mk=1;var e=zl(),t=xP();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var a=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,u=e.useMemo,h=e.useDebugValue;return gp.useSyncExternalStoreWithSelector=function(f,p,g,v,k){var w=o(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=u(function(){function L(W){if(!A){if(A=!0,E=W,W=v(W),k!==void 0&&S.hasValue){var F=S.value;if(k(F,W))return R=F}return R=W}if(F=R,a(E,W))return F;var T=v(W);return k!==void 0&&k(F,T)?(E=W,F):(E=W,R=T)}var A=!1,E,R,j=g===void 0?null:g;return[function(){return L(p())},j===null?void 0:function(){return L(j())}]},[p,g,v,k]);var P=i(f,w[0],w[1]);return l(function(){S.hasValue=!0,S.value=P},[P]),h(P),P},gp}var Nk;function rO(){return Nk||(Nk=1,mp.exports=aO()),mp.exports}var iO=rO();const sO=parseInt(b.version,10);function t0(e){return sO>=e}const oO=t0(19),lO=oO?uO:dO;function PP(e,t,n,a,i){return lO(e,t,n,a,i)}function cO(e,t,n,a,i){const o=b.useCallback(()=>t(e.getSnapshot(),n,a,i),[e,t,n,a,i]);return nO.useSyncExternalStore(e.subscribe,o,o)}function uO(e,t,n,a,i){return cO(e,t,n,a,i)}function dO(e,t,n,a,i){return iO.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,a,i))}class hO{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const a of this.listeners){if(n!==this.updateTick)return;a(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,a,i){return PP(this,t,n,a,i)}}const n0={...e1},yp=n0.useInsertionEffect,fO=yp&&yp!==n0.useLayoutEffect?yp:e=>e();function Qi(e){const t=yo(pO).current;return t.next=e,fO(t.effect),t.trampoline}function pO(){const e={next:void 0,callback:mO,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function mO(){}const gO=()=>{},Za=typeof document<"u"?b.useLayoutEffect:gO;function yO(){}const Qz=Object.freeze([]),Vi=Object.freeze({});class vO extends hO{constructor(t,n={},a){super(t),this.context=n,this.selectors=a}useSyncedValue(t,n){b.useDebugValue(t);const a=this;Za(()=>{a.state[t]!==n&&a.set(t,n)},[a,t,n])}useSyncedValueWithCleanup(t,n){const a=this;Za(()=>(a.state[t]!==n&&a.set(t,n),()=>{a.set(t,void 0)}),[a,t,n])}useSyncedValues(t){const n=this,a=Object.values(t);Za(()=>{n.update(t)},[n,...a])}useControlledProp(t,n){b.useDebugValue(t);const a=this,i=n!==void 0;Za(()=>{i&&!Object.is(a.state[t],n)&&a.setState({...a.state,[t]:n})},[a,t,n,i])}select(t,n,a,i){const o=this.selectors[t];return o(this.state,n,a,i)}useState(t,n,a,i){return b.useDebugValue(t),PP(this,this.selectors[t],n,a,i)}useContextCallback(t,n){b.useDebugValue(t);const a=Qi(n??yO);this.context[t]=a}useStateSetter(t){const n=b.useRef(void 0);return n.current===void 0&&(n.current=a=>{this.set(t,a)}),n.current}observe(t,n){let a;typeof t=="function"?a=t:a=this.selectors[t];let i=a(this.state);return n(i,i,this),this.subscribe(o=>{const l=a(o);if(!Object.is(i,l)){const u=i;i=l,n(l,u,this)}})}}function qd(){return typeof window<"u"}function Ia(e){return a0(e)?(e.nodeName||"").toLowerCase():"#document"}function Tr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bO(e){var t;return(t=(a0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function a0(e){return qd()?e instanceof Node||e instanceof Tr(e).Node:!1}function r0(e){return qd()?e instanceof Element||e instanceof Tr(e).Element:!1}function fi(e){return qd()?e instanceof HTMLElement||e instanceof Tr(e).HTMLElement:!1}function Td(e){return!qd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Tr(e).ShadowRoot}function SP(e){const{overflow:t,overflowX:n,overflowY:a,display:i}=Yd(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&i!=="inline"&&i!=="contents"}function eF(e){return/^(table|td|th)$/.test(Ia(e))}function _O(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const kO=/transform|translate|scale|rotate|perspective|filter/,wO=/paint|layout|strict|content/,Mi=e=>!!e&&e!=="none";let vp;function xO(e){const t=r0(e)?Yd(e):e;return Mi(t.transform)||Mi(t.translate)||Mi(t.scale)||Mi(t.rotate)||Mi(t.perspective)||!PO()&&(Mi(t.backdropFilter)||Mi(t.filter))||kO.test(t.willChange||"")||wO.test(t.contain||"")}function tF(e){let t=Sm(e);for(;fi(t)&&!CP(t);){if(xO(t))return t;if(_O(t))return null;t=Sm(t)}return null}function PO(){return vp==null&&(vp=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vp}function CP(e){return/^(html|body|#document)$/.test(Ia(e))}function Yd(e){return Tr(e).getComputedStyle(e)}function nF(e){return r0(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sm(e){if(Ia(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Td(e)&&e.host||bO(e);return Td(t)?t.host:t}function TP(e){const t=Sm(e);return CP(t)?e.ownerDocument?e.ownerDocument.body:e.body:fi(t)&&SP(t)?t:TP(t)}function Ok(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=TP(e),o=i===((a=e.ownerDocument)==null?void 0:a.body),l=Tr(i);if(o){const u=SO(l);return t.concat(l,l.visualViewport||[],SP(i)?i:[],u&&n?Ok(u):[])}else return t.concat(i,Ok(i,[],n))}function SO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function EP(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function La(e){return e?.ownerDocument||document}function Hi(e,t,n,a){return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}const ku=null;class CO{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let i=0;i<n.length;i+=1)n[i]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const wu=new CO;class i0{static create(){return new i0}static request(t){return wu.request(t)}static cancel(t){return wu.cancel(t)}currentId=ku;request(t){this.cancel(),this.currentId=wu.request(()=>{this.currentId=ku,t()})}cancel=()=>{this.currentId!==ku&&(wu.cancel(this.currentId),this.currentId=ku)};disposeEffect=()=>this.cancel}function TO(){const e=yo(i0.create).current;return Jg(e.disposeEffect),e}const cl=0;class Ul{static create(){return new Ul}currentId=cl;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=cl,n()},t)}isStarted(){return this.currentId!==cl}clear=()=>{this.currentId!==cl&&(clearTimeout(this.currentId),this.currentId=cl)};disposeEffect=()=>this.clear}function EO(){const e=yo(Ul.create).current;return Jg(e.disposeEffect),e}let jk=0;function RP(e){return jk+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${jk}`}function bp(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const bo=typeof navigator<"u",_p=AO(),AP=DO(),LP=LO(),aF=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),rF=_p.platform==="MacIntel"&&_p.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(_p.platform),RO=bo&&/apple/i.test(navigator.vendor),Cm=bo&&/android/i.test(AP)||/android/i.test(LP);bo&&AP.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const DP=LP.includes("jsdom/");function AO(){if(!bo)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function LO(){if(!bo)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function DO(){if(!bo)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Uk="data-base-ui-focusable",IP="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",kp="ArrowLeft",wp="ArrowRight",IO="ArrowUp",MO="ArrowDown";function Ys(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Er(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Td(n)){let a=t;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function $i(e){return"composedPath"in e?e.composedPath()[0]:e.target}function iF(e,t){if(!r0(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,a]of t.entries())if(Er(a,n))return!a.hasAttribute("data-trigger-disabled");return!1}function sF(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function oF(e){return e.matches("html,body")}function NO(e){return fi(e)&&e.matches(IP)}function lF(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${IP}`)!=null}function cF(e){return e?e.getAttribute("role")==="combobox"&&NO(e):!1}function Tm(e){if(!e||DP)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function uF(e){return e?e.hasAttribute(Uk)?e:e.querySelector(`[${Uk}]`)||e:null}function xp(e){e.preventDefault(),e.stopPropagation()}function dF(e){return"nativeEvent"in e}function hF(e){return e.pointerType===""&&e.isTrusted?!0:Cm&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fF(e){return DP?!1:!Cm&&e.width===0&&e.height===0||Cm&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function pF(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function mF(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const gF=["top","right","bottom","left"],OO=Math.min,jO=Math.max,yF=Math.round,Pp=Math.floor,vF=e=>({x:e,y:e}),UO={left:"right",right:"left",bottom:"top",top:"bottom"};function bF(e,t,n){return jO(e,OO(t,n))}function _F(e,t){return typeof e=="function"?e(t):e}function MP(e){return e.split("-")[0]}function NP(e){return e.split("-")[1]}function zO(e){return e==="x"?"y":"x"}function FO(e){return e==="y"?"height":"width"}function BO(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function VO(e){return zO(BO(e))}function kF(e,t,n){n===void 0&&(n=!1);const a=NP(e),i=VO(e),o=FO(i);let l=i==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Rm(l)),[l,Rm(l)]}function wF(e){const t=Rm(e);return[Em(e),t,Em(t)]}function Em(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const zk=["left","right"],Fk=["right","left"],HO=["top","bottom"],$O=["bottom","top"];function WO(e,t,n){switch(e){case"top":case"bottom":return n?t?Fk:zk:t?zk:Fk;case"left":case"right":return t?HO:$O;default:return[]}}function xF(e,t,n,a){const i=NP(e);let o=WO(MP(e),n==="start",a);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Em)))),o}function Rm(e){const t=MP(e);return UO[t]+e.slice(t.length)}function GO(e){return{top:0,right:0,bottom:0,left:0,...e}}function PF(e){return typeof e!="number"?GO(e):{top:e,right:e,bottom:e,left:e}}function SF(e){const{x:t,y:n,width:a,height:i}=e;return{width:a,height:i,top:n,left:t,right:t+a,bottom:n+i,x:t,y:n}}function xu(e,t,n){return Math.floor(e/t)!==n}function Bk(e,t){return t<0||t>=e.length}function CF(e,t){return Ea(e.current,{disabledIndices:t})}function TF(e,t){return Ea(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ea(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:a,amount:i=1}={}){let o=t;do o+=n?-i:i;while(o>=0&&o<=e.length-1&&Am(e,o,a));return o}function EF(e,{event:t,orientation:n,loopFocus:a,onLoop:i,rtl:o,cols:l,disabledIndices:u,minIndex:h,maxIndex:f,prevIndex:p,stopEvent:g=!1}){let v=p,k;if(t.key===IO?k="up":t.key===MO&&(k="down"),k){const w=[],S=[];let P=!1,L=0;{let B=null,V=-1;e.forEach((ee,se)=>{if(ee==null)return;L+=1;const fe=ee.closest('[role="row"]');fe&&(P=!0),(fe!==B||V===-1)&&(B=fe,V+=1,w[V]=[]),w[V].push(se),S[se]=V})}let A=!1,E=0;if(P)for(const B of w){const V=B.length;V>E&&(E=V),V!==l&&(A=!0)}const R=A&&L<e.length,j=E||l,W=B=>{if(!A||p===-1)return;const V=S[p];if(V==null)return;const ee=w[V].indexOf(p),se=B==="up"?-1:1;for(let fe=V+se,de=0;de<w.length;de+=1,fe+=se){if(fe<0||fe>=w.length){if(!a||R)return;if(fe=fe<0?w.length-1:0,i){const ie=Math.min(ee,w[fe].length-1),X=w[fe][ie]??w[fe][0],q=i(t,p,X);fe=S[q]??fe}}const he=w[fe];for(let ie=Math.min(ee,he.length-1);ie>=0;ie-=1){const X=he[ie];if(!Am(e,X,u))return X}}},F=B=>{if(!R||p===-1)return;const V=p%j,ee=B==="up"?-j:j,se=f-f%j,fe=Pp(f/j)+1;for(let de=p-V+ee,he=0;he<fe;he+=1,de+=ee){if(de<0||de>f){if(!a)return;de=de<0?se:0}const ie=Math.min(de+j-1,f);for(let X=Math.min(de+V,ie);X>=de;X-=1)if(!Am(e,X,u))return X}};g&&xp(t);const T=W(k)??F(k);if(T!==void 0)v=T;else if(p===-1)v=k==="up"?f:h;else if(v=Ea(e,{startingIndex:p,amount:j,decrement:k==="up",disabledIndices:u}),a){if(k==="up"&&(p-j<h||v<0)){const B=p%j,V=f%j,ee=f-(V-B);V===B?v=f:v=V>B?ee:ee-j,i&&(v=i(t,p,v))}k==="down"&&p+j>f&&(v=Ea(e,{startingIndex:p%j-j,amount:j,disabledIndices:u}),i&&(v=i(t,p,v)))}Bk(e,v)&&(v=p)}if(n==="both"){const w=Pp(p/l);t.key===(o?kp:wp)&&(g&&xp(t),p%l!==l-1?(v=Ea(e,{startingIndex:p,disabledIndices:u}),a&&xu(v,l,w)&&(v=Ea(e,{startingIndex:p-p%l-1,disabledIndices:u}),i&&(v=i(t,p,v)))):a&&(v=Ea(e,{startingIndex:p-p%l-1,disabledIndices:u}),i&&(v=i(t,p,v))),xu(v,l,w)&&(v=p)),t.key===(o?wp:kp)&&(g&&xp(t),p%l!==0?(v=Ea(e,{startingIndex:p,decrement:!0,disabledIndices:u}),a&&xu(v,l,w)&&(v=Ea(e,{startingIndex:p+(l-p%l),decrement:!0,disabledIndices:u}),i&&(v=i(t,p,v)))):a&&(v=Ea(e,{startingIndex:p+(l-p%l),decrement:!0,disabledIndices:u}),i&&(v=i(t,p,v))),xu(v,l,w)&&(v=p));const S=Pp(f/l)===w;Bk(e,v)&&(a&&S?(v=t.key===(o?wp:kp)?f:Ea(e,{startingIndex:p-p%l-1,disabledIndices:u}),i&&(v=i(t,p,v))):v=p)}return v}function RF(e,t,n){const a=[];let i=0;return e.forEach(({width:o,height:l},u)=>{let h=!1;for(;!h;){const f=[];for(let p=0;p<o;p+=1)for(let g=0;g<l;g+=1)f.push(i+p+g*t);i%t+o<=t&&f.every(p=>a[p]==null)?(f.forEach(p=>{a[p]=u}),h=!0):i+=1}}),[...a]}function AF(e,t,n,a,i){if(e===-1)return-1;const o=n.indexOf(e),l=t[e];switch(i){case"tl":return o;case"tr":return l?o+l.width-1:o;case"bl":return l?o+(l.height-1)*a:o;case"br":return n.lastIndexOf(e);default:return-1}}function LF(e,t){return t.flatMap((n,a)=>e.includes(n)?[a]:[])}function Am(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const i=e[t];return i?OP(i)?!n&&(i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"):!0:!1}function KO(e){return e.visibility==="hidden"||e.visibility==="collapse"}function OP(e,t=e?Yd(e):null){return!e||!e.isConnected||!t||KO(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const qO='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function YO(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return Td(n)?n.host:null}function Lm(e){for(const t of Array.from(e.children))if(Ia(t)==="summary")return t;return null}function ZO(e,t){const n=Lm(t);return!!n&&(e===n||Er(n,e))}function jP(e){const t=e?Ia(e):"";return e!=null&&e.matches(qO)&&(t!=="summary"||e.parentElement!=null&&Ia(e.parentElement)==="details"&&Lm(e.parentElement)===e)&&(t!=="details"||Lm(e)==null)&&(t!=="input"||e.type!=="hidden")}function UP(e){if(!jP(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=YO(t)){const n=t!==e,a=Ia(t)==="slot";if(t.hasAttribute("inert")||n&&Ia(t)==="details"&&!t.open&&!ZO(e,t)||t.hasAttribute("hidden")||!a&&!XO(t,n))return!1}return!0}function XO(e,t){const n=Yd(e);return t?n.display!=="none":OP(e,n)}function zP(e){const t=e.tabIndex;if(t<0){const n=Ia(e);if(n==="details"||n==="audio"||n==="video"||fi(e)&&e.isContentEditable)return 0}return t}function Sp(e){if(Ia(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function JO(e,t){const n=Sp(e);if(!n)return!0;const a=t.find(i=>{const o=Sp(i);return o?.name===n.name&&o.form===n.form&&o.checked});return a?a===n:t.find(i=>{const o=Sp(i);return o?.name===n.name&&o.form===n.form})===n}function FP(e){if(fi(e)&&Ia(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return fi(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function BP(e,t){FP(e).forEach(n=>{jP(n)&&t.push(n),BP(n,t)})}function VP(e,t,n){FP(e).forEach(a=>{fi(a)&&a.matches(t)&&n.push(a),VP(a,t,n)})}function DF(e){return UP(e)&&zP(e)>=0}function QO(e){const t=[];return BP(e,t),t.filter(UP)}function s0(e){const t=QO(e);return t.filter(n=>zP(n)>=0&&JO(n,t))}function HP(e,t){const n=s0(e),a=n.length;if(a===0)return;const i=Ys(La(e)),o=n.indexOf(i),l=o===-1?t===1?0:a-1:o+t;return n[l]}function ej(e){return HP(La(e).body,1)||e}function tj(e){return HP(La(e).body,-1)||e}function $P(e,t){if(!e)return null;const n=s0(La(e).body),a=n.length;if(a===0)return null;const i=n.indexOf(e);if(i===-1)return null;const o=(i+t+a)%a;return n[o]}function IF(e){return $P(e,1)}function MF(e){return $P(e,-1)}function Cp(e,t){const n=t||e.currentTarget,a=e.relatedTarget;return!a||!Er(n,a)}function nj(e){s0(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Vk(e){const t=[];VP(e,"[data-tabindex]",t),t.forEach(n=>{const a=n.dataset.tabindex;delete n.dataset.tabindex,a?n.setAttribute("tabindex",a):n.removeAttribute("tabindex")})}function Tp(e){const t=new Map;let n=0,a=0;return e.forEach((i,o)=>{const l=i.transitionStatus==="ending";t.set(i.id,{value:i,domIndex:o,visibleIndex:l?-1:n,offsetY:a}),a+=i.height||0,l||(n+=1)}),t}const Pu=e=>e.toastMetadata,$a={toasts:Sa(e=>e.toasts),isEmpty:Sa(e=>e.toasts.length===0),toast:Sa(Pu,(e,t)=>e.get(t)?.value),toastIndex:Sa(Pu,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:Sa(Pu,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:Sa(Pu,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:Sa(e=>e.hovering),focused:Sa(e=>e.focused),expanded:Sa(e=>e.hovering||e.focused),expandedOrOutOfFocus:Sa(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Sa(e=>e.prevFocusElement)};class aj extends vO{timers=new Map;areTimersPaused=!1;constructor(t){super({...t,toastMetadata:Tp(t.toasts)},{},$a)}setFocused(t){this.set("focused",t)}setHovering(t){this.set("hovering",t)}setIsWindowFocused(t){this.set("isWindowFocused",t)}setPrevFocusElement(t){this.set("prevFocusElement",t)}setViewport=t=>{this.set("viewport",t)};disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t,n={}){const a=$a.toastIndex(this.state,t);if(a===-1)return;const i=this.state.toasts[a];n.skipOnRemove||i?.onRemove?.();const o=[...this.state.toasts];o.splice(a,1),this.setToasts(o)}addToast=t=>{const{timeout:n,limit:a}=this.state,i=t.id||RP("toast");if(t.id){const f=$a.toast(this.state,t.id);if(f)if(f.transitionStatus==="ending")this.removeToast(t.id,{skipOnRemove:!0});else{const{id:p,transitionStatus:g,...v}=t;return this.updateToastInternal(t.id,v,{resetTimer:!0,markUpdated:!0}),t.id}}const o={...t,id:i,updateKey:0,transitionStatus:"starting"},l=[o,...this.state.toasts],u=l.filter(f=>f.transitionStatus!=="ending");if(u.length>a){const f=u.length-a,p=u.slice(-f),g=new Set(p.map(v=>v.id));this.setToasts(l.map(v=>{const k=g.has(v.id);return v.limited!==k?{...v,limited:k}:v}))}else this.setToasts(l.map(f=>f.limited?{...f,limited:!1}:f));const h=o.timeout??n;return o.type!=="loading"&&h>0&&this.scheduleTimer(i,h,()=>this.closeToast(i)),$a.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(t,n)=>{this.updateToastInternal(t,n,{markUpdated:!0})};updateToastInternal=(t,n,a={})=>{const{timeout:i,toasts:o}=this.state,l=$a.toast(this.state,t)??null;if(!l||l.transitionStatus==="ending")return;const u={...l,...n,...a.markUpdated&&{updateKey:(l.updateKey??0)+1}};this.setToasts(o.map(S=>S.id===t?u:S));const h=u.timeout??i,f=l?.timeout??i,p=Object.hasOwn(n,"timeout"),g=u.transitionStatus!=="ending"&&u.type!=="loading"&&h>0,v=this.timers.has(t),k=f!==h,w=l?.type==="loading";if(!g&&v){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t);return}if(g&&(!v||k||p||w||a.resetTimer)){const S=this.timers.get(t);S&&(S.timeout?.clear(),this.timers.delete(t)),this.scheduleTimer(t,h,()=>this.closeToast(t)),$a.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=t=>{const n=t===void 0,{limit:a,toasts:i}=this.state;let o;if(n)o=i,this.timers.forEach(f=>{f.timeout?.clear()}),this.timers.clear();else{const f=$a.toast(this.state,t);if(!f)return;o=[f];const p=this.timers.get(t);p?.timeout&&(p.timeout.clear(),this.timers.delete(t))}let l=0;const u=i.map(f=>{if(n||f.id===t)return{...f,transitionStatus:"ending",height:0};if(f.transitionStatus==="ending")return f;const p=l>=a;return l+=1,f.limited!==p?{...f,limited:p}:f}),h={toasts:u,toastMetadata:Tp(u)};(n||i.length===1)&&(h.hovering=!1,h.focused=!1),this.update(h),o.forEach(f=>{f.transitionStatus!=="ending"&&f.onClose?.()}),this.handleFocusManagement(t)};promiseToast=(t,n)=>{const a=bp(n.loading),i=this.addToast({...a,type:"loading"}),o=t.then(l=>{const u=bp(n.success,l);return this.updateToast(i,{...u,type:"success",timeout:u.timeout}),l}).catch(l=>{const u=bp(n.error,l);return this.updateToast(i,{...u,type:"error",timeout:u.timeout}),Promise.reject(l)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(o),o};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{if(t.timeout){t.timeout.clear();const n=Date.now()-t.start,a=t.delay-n;t.remaining=a>0?a:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,n)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=Ul.create(),t.timeout.start(t.remaining,()=>{this.timers.delete(n),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;const n=$i(t);Er(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,n,a){const i=Date.now(),o=!$a.expandedOrOutOfFocus(this.state),l=o?Ul.create():void 0;l?.start(n,()=>{this.timers.delete(t),a()}),this.timers.set(t,{timeout:l,start:o?i:0,delay:n,remaining:n,callback:a})}setToasts(t){const n={toasts:t,toastMetadata:Tp(t)};t.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(t){const n=Ys(La(this.state.viewport));if(!this.state.viewport||!Er(this.state.viewport,n)||!Tm(n))return;if(t===void 0){this.restoreFocusToPrevElement();return}const a=$a.toasts(this.state),i=$a.toastIndex(this.state,t);let o=null,l=i+1;for(;l<a.length;){if(a[l].transitionStatus!=="ending"){o=a[l];break}l+=1}if(!o)for(l=i-1;l>=0;){if(a[l].transitionStatus!=="ending"){o=a[l];break}l-=1}o?o.ref?.current?.focus():this.restoreFocusToPrevElement()}}const rj=function(t){const{children:n,timeout:a=5e3,limit:i=3,toastManager:o}=t,l=yo(()=>new aj({timeout:a,limit:i,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Jg(l.disposeEffect),b.useEffect(function(){return o?o[" subscribe"](({action:f,options:p})=>{const g=p.id;f==="promise"&&p.promise?l.promiseToast(p.promise,p):f==="update"&&g?l.updateToast(g,p):f==="close"?l.closeToast(g):l.addToast(p)}):void 0},[l,o]),l.useSyncedValues({timeout:a,limit:i}),C.jsx(Qg.Provider,{value:l,children:n})},WP={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},GP={...WP,position:"fixed",top:0,left:0},NF={...WP,position:"absolute"},Tl=b.forwardRef(function(t,n){const[a,i]=b.useState();Za(()=>{RO&&i("button")},[]);const o={tabIndex:0,role:a};return C.jsx("span",{...t,ref:n,style:GP,"aria-hidden":a?void 0:!0,...o,"data-base-ui-focus-guard":""})});function Hk(e,t,n,a){const i=yo(KP).current;return sj(i,e,t,n,a)&&qP(i,[e,t,n,a]),i.callback}function ij(e){const t=yo(KP).current;return oj(t,e)&&qP(t,e),t.callback}function KP(){return{callback:null,cleanup:null,refs:[]}}function sj(e,t,n,a,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==a||e.refs[3]!==i}function oj(e,t){return e.refs.length!==t.length||e.refs.some((n,a)=>n!==t[a])}function qP(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const a=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const l=o(n);typeof l=="function"&&(a[i]=l);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const l=a[i];typeof l=="function"?l():o(null);break}case"object":{o.current=null;break}}}}}}}function $k(e){if(!b.isValidElement(e))return null;const t=e,n=t.props;return(t0(19)?n?.ref:t.ref)??null}function Dm(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function lj(e,t){const n={};for(const a in e){const i=e[a];if(t?.hasOwnProperty(a)){const o=t[a](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${a.toLowerCase()}`]="":i&&(n[`data-${a.toLowerCase()}`]=i.toString())}return n}function cj(e,t){return typeof e=="function"?e(t):e}function uj(e,t){return typeof e=="function"?e(t):e}const o0={};function l0(e,t,n,a,i){if(!n&&!a&&!i&&!e)return Ed(t);let o=Ed(e);return t&&(o=gl(o,t)),n&&(o=gl(o,n)),a&&(o=gl(o,a)),i&&(o=gl(o,i)),o}function dj(e){if(e.length===0)return o0;if(e.length===1)return Ed(e[0]);let t=Ed(e[0]);for(let n=1;n<e.length;n+=1)t=gl(t,e[n]);return t}function Ed(e){return c0(e)?{...ZP(e,o0)}:hj(e)}function gl(e,t){return c0(t)?ZP(t,e):fj(e,t)}function hj(e){const t={...e};for(const n in t){const a=t[n];YP(n,a)&&(t[n]=XP(a))}return t}function fj(e,t){if(!t)return e;for(const n in t){const a=t[n];switch(n){case"style":{e[n]=Dm(e.style,a);break}case"className":{e[n]=JP(e.className,a);break}default:YP(n,a)?e[n]=pj(e[n],a):e[n]=a}}return e}function YP(e,t){const n=e.charCodeAt(0),a=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&a===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function c0(e){return typeof e=="function"}function ZP(e,t){return c0(e)?e(t):e??o0}function pj(e,t){return t?e?(...n)=>{const a=n[0];if(QP(a)){const o=a;Rd(o);const l=t(...n);return o.baseUIHandlerPrevented||e?.(...n),l}const i=t(...n);return e?.(...n),i}:XP(t):e}function XP(e){return e&&((...t)=>{const n=t[0];return QP(n)&&Rd(n),e(...t)})}function Rd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function JP(e,t){return t?e?t+" "+e:t:e}function QP(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ec(e,t,n={}){const a=t.render,i=mj(t,n);if(n.enabled===!1)return null;const o=n.state??Vi;return vj(e,a,i,o)}function mj(e,t={}){const{className:n,style:a,render:i}=e,{state:o=Vi,ref:l,props:u,stateAttributesMapping:h,enabled:f=!0}=t,p=f?cj(n,o):void 0,g=f?uj(a,o):void 0,v=f?lj(o,h):Vi,k=f&&u?gj(u):void 0,w=f?Dm(v,k)??{}:Vi;return typeof document<"u"&&(f?Array.isArray(l)?w.ref=ij([w.ref,$k(i),...l]):w.ref=Hk(w.ref,$k(i),l):Hk(null,null)),f?(p!==void 0&&(w.className=JP(w.className,p)),g!==void 0&&(w.style=Dm(w.style,g)),w):Vi}function gj(e){return Array.isArray(e)?dj(e):l0(void 0,e)}const yj=Symbol.for("react.lazy");function vj(e,t,n,a){if(t){if(typeof t=="function")return t(n,a);const i=l0(n,t.props);i.ref=n.ref;let o=t;return o?.$$typeof===yj&&(o=b.Children.toArray(t)[0]),b.cloneElement(o,i)}if(e&&typeof e=="string")return bj(e,n);throw new Error(vo(8))}function bj(e,t){return e==="button"?b.createElement("button",{type:"button",...t,key:t.key}):e==="img"?b.createElement("img",{alt:"",...t,key:t.key}):b.createElement(e,t)}let _j=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const kj=b.forwardRef(function(t,n){const{render:a,className:i,style:o,children:l,...u}=t,h=e0(),f=EO(),p=b.useRef(!1),g=b.useRef(!1),v=b.useRef(!1),k=h.useState("isEmpty"),w=h.useState("toasts"),S=h.useState("focused"),P=h.useState("expanded"),L=h.useState("prevFocusElement"),A=w[0]?.height??0,E=b.useMemo(()=>w.some(X=>X.transitionStatus==="ending"),[w]),R=b.useMemo(()=>w.filter(X=>X.priority==="high"),[w]);b.useEffect(()=>{const X=h.state.viewport;if(!X)return;function q(H){k||H.key==="F6"&&$i(H)!==X&&(H.preventDefault(),h.setPrevFocusElement(Ys(La(X))),X?.focus({preventScroll:!0}),h.pauseTimers(),h.setFocused(!0))}const J=Tr(X);return Hi(J,"keydown",q)},[h,k]),b.useEffect(()=>{const X=h.state.viewport;if(!X||k)return;const q=Tr(X);function J(M){$i(M)===q&&(h.setIsWindowFocused(!1),h.pauseTimers())}function H(M){if(M.relatedTarget)return;const Z=$i(M),_e=Ys(La(X));(Z===q||!Er(X,Z)||!Tm(_e))&&h.resumeTimers(),f.start(0,()=>h.setIsWindowFocused(!0))}return EP(Hi(q,"blur",J,!0),Hi(q,"focus",H,!0))},[h,f,k]),b.useEffect(()=>{const X=h.state.viewport;if(!X||k)return;const q=La(X);return Hi(q,"pointerdown",h.handleDocumentPointerDown,!0)},[k,h]);function j(X){const q=h.state.viewport;q&&(p.current=!0,X.relatedTarget===q?w[0]?.ref?.current?.focus():h.restoreFocusToPrevElement())}function W(X){X.key==="Tab"&&X.shiftKey&&$i(X.nativeEvent)===h.state.viewport&&(X.preventDefault(),h.restoreFocusToPrevElement(),h.resumeTimers())}function F(){const X=h.state.toasts.some(q=>q.transitionStatus==="ending");!h.state.isWindowFocused||X||v.current||!g.current||(h.resumeTimers(),h.setHovering(!1),g.current=!1)}b.useEffect(F,[E,h]);function T(){h.pauseTimers(),h.setHovering(!0),g.current=!1}function B(){E||v.current?g.current=!0:(h.resumeTimers(),h.setHovering(!1))}function V(X){X.pointerType==="touch"&&(v.current=!0)}function ee(X){X.pointerType==="touch"&&(v.current=!1,F())}function se(){if(p.current){p.current=!1;return}S||Tm(Ys(La(h.state.viewport)))&&(h.setFocused(!0),h.pauseTimers())}function fe(X){!S||Er(h.state.viewport,X.relatedTarget)||(h.setFocused(!1),h.resumeTimers())}const de={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:T,onMouseMove:T,onMouseLeave:B,onFocus:se,onBlur:fe,onKeyDown:W,onClick:se,onPointerDown:V,onPointerUp:ee,onPointerCancel:ee},he={expanded:P},ie=ec("div",t,{ref:[n,h.setViewport],state:he,props:[de,{style:{[_j.frontmostHeight]:A?`${A}px`:void 0}},u,{children:C.jsxs(b.Fragment,{children:[!k&&L&&C.jsx(Tl,{onFocus:j}),l,!k&&L&&C.jsx(Tl,{onFocus:j})]})}]});return C.jsxs(b.Fragment,{children:[!k&&L&&C.jsx(Tl,{onFocus:j}),ie,!S&&R.length>0&&C.jsx("div",{style:GP,children:R.map(X=>C.jsxs("div",{role:"alert","aria-atomic":!0,children:[C.jsx("div",{children:X.title}),C.jsx("div",{children:X.description})]},X.id))})]})});function wj(e){return t0(19)?e:e?"true":void 0}const eS=b.createContext(void 0);function tS(){const e=b.useContext(eS);if(!e)throw new Error(vo(66));return e}let u0=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const xj={[u0.startingStyle]:""},Pj={[u0.endingStyle]:""},Sj={transitionStatus(e){return e==="starting"?xj:e==="ending"?Pj:null}};function Cj(e){return e==null?e:"current"in e?e.current:e}function Tj(e,t=!1,n=!0){const a=TO();return Qi((i,o=null)=>{a.cancel();const l=Cj(e);if(l==null)return;const u=l,h=()=>{oo.flushSync(i)};if(typeof u.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function f(){Promise.all(u.getAnimations().map(p=>p.finished)).then(()=>{o?.aborted||h()}).catch(()=>{if(n){o?.aborted||h();return}const p=u.getAnimations();!o?.aborted&&p.length>0&&p.some(g=>g.pending||g.playState!=="finished")&&f()})}if(t){const p=u0.startingStyle;if(!u.hasAttribute(p)){a.request(f);return}const g=new MutationObserver(()=>{u.hasAttribute(p)||(g.disconnect(),f())});g.observe(u,{attributes:!0,attributeFilter:[p]}),o?.addEventListener("abort",()=>g.disconnect(),{once:!0});return}a.request(f)})}function Ej(e){const{enabled:t=!0,open:n,ref:a,onComplete:i}=e,o=Qi(i),l=Tj(a,n,!1);b.useEffect(()=>{if(!t)return;const u=new AbortController;return l(o,u.signal),()=>{u.abort()}},[t,n,o,l])}let Ni=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const OF=500,jF={style:{transition:"none"}},UF="data-base-ui-click-trigger",Rj="data-base-ui-swipe-ignore",Aj="data-swipe-ignore",Lj=`[${Rj}]`,Dj=`[${Aj}]`,zF={fallbackAxisSide:"none"},FF={fallbackAxisSide:"end"},Ij={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Wk(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function Mj(e){const n=Tr(e).getComputedStyle(e).transform;let a=0,i=0,o=1;if(n&&n!=="none"){const l=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const u=l[1].split(", ").map(parseFloat);u.length===6?(a=u[4],i=u[5],o=Math.sqrt(u[0]*u[0]+u[1]*u[1])):u.length===16&&(a=u[12],i=u[13],o=u[0])}}return{x:a,y:i,scale:o}}const Nj={...Sj,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},ul=40,Oj=10,ni=.5,jj=1,Uj=`${Lj},${Dj}`,zj=b.forwardRef(function(t,n){const{toast:a,render:i,className:o,swipeDirection:l=["down","right"],style:u,...h}=t,f=a.positionerProps?.anchor!==void 0;let p=[];f||(p=Array.isArray(l)?l:[l]);const g=p.length>0,v=e0(),[k,w]=b.useState(void 0),[S,P]=b.useState(!1),[L,A]=b.useState(!1),[E,R]=b.useState(!1),[j,W]=b.useState({x:0,y:0}),[F,T]=b.useState({x:0,y:0,scale:1}),[B,V]=b.useState(),[ee,se]=b.useState(),[fe,de]=b.useState(null),he=b.useRef(null),ie=b.useRef({x:0,y:0}),X=b.useRef({x:0,y:0,scale:1}),q=b.useRef(void 0),J=b.useRef(0),H=b.useRef(!1),M=b.useRef({x:0,y:0}),Z=b.useRef(!1),_e=b.useRef({x:0,y:0}),ge=b.useRef(null),pe=b.useRef(null),ve=v.useState("toastIndex",a.id),Be=v.useState("toastVisibleIndex",a.id),Ke=v.useState("toastOffsetY",a.id),Ne=v.useState("focused"),At=v.useState("expanded");Ej({open:a.transitionStatus!=="ending",ref:he,onComplete(){a.transitionStatus==="ending"&&v.removeToast(a.id)}});const qt=Qi((Ge=!1)=>{const We=he.current;if(!We)return;const dt=We.style.height;We.style.height="auto";const Nt=We.offsetHeight;We.style.height=dt;function kt(){v.updateToastInternal(a.id,{ref:he,height:Nt,...a.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}Ge?oo.flushSync(kt):kt()});Za(qt,[qt]);function on(Ge){_e.current=Ge,W(Ge)}Za(()=>()=>{pe.current?.abort()},[]);function ft(Ge,We){let dt=Ge,Nt=We;return!p.includes("left")&&!p.includes("right")?dt=Ge>0?Ge**ni:-(Math.abs(Ge)**ni):(!p.includes("right")&&Ge>0&&(dt=Ge**ni),!p.includes("left")&&Ge<0&&(dt=-(Math.abs(Ge)**ni))),!p.includes("up")&&!p.includes("down")?Nt=We>0?We**ni:-(Math.abs(We)**ni):(!p.includes("down")&&We>0&&(Nt=We**ni),!p.includes("up")&&We<0&&(Nt=-(Math.abs(We)**ni))),{x:dt,y:Nt}}const Ut=Qi(Ge=>{if(Ge.pointerId!==ge.current)return;ge.current=null,pe.current?.abort(),pe.current=null,P(!1),A(!1),de(null);const We=X.current;if(Ge.type==="pointercancel"||H.current){on({x:We.x,y:We.y}),w(void 0);return}let dt=!1;const Nt=_e.current,kt=Nt.x-We.x,vt=Nt.y-We.y;let pt;for(const pa of p){switch(pa){case"right":kt>ul&&(dt=!0,pt="right");break;case"left":kt<-ul&&(dt=!0,pt="left");break;case"down":vt>ul&&(dt=!0,pt="down");break;case"up":vt<-ul&&(dt=!0,pt="up");break}if(dt)break}dt?(w(pt),R(!0),v.closeToast(a.id)):(on({x:We.x,y:We.y}),w(void 0))});function cr(Ge){if(Ge.button!==0)return;Ge.pointerType==="touch"&&v.pauseTimers();const We=$i(Ge.nativeEvent);if(We?We.closest(`button,a,input,textarea,[role="button"],${Uj}`):!1)return;if(H.current=!1,q.current=void 0,J.current=0,ge.current=Ge.pointerId,ie.current={x:Ge.clientX,y:Ge.clientY},M.current=ie.current,he.current){const kt=Mj(he.current);X.current=kt,T(kt),on({x:kt.x,y:kt.y})}v.setHovering(!0),P(!0),A(!1),de(null),Z.current=!0;const Nt=he.current;if(Nt){pe.current?.abort();const kt=new AbortController;pe.current=kt;const vt=La(Nt);vt.addEventListener("pointerup",Ut,{signal:kt.signal}),vt.addEventListener("pointercancel",Ut,{signal:kt.signal}),Nt.setPointerCapture?.(Ge.pointerId)}}function Rr(Ge){if(Ge.pointerId!==ge.current)return;Ge.preventDefault(),Z.current&&(ie.current={x:Ge.clientX,y:Ge.clientY},Z.current=!1);const{clientY:We,clientX:dt,movementX:Nt,movementY:kt}=Ge;(kt<0&&We>M.current.y||kt>0&&We<M.current.y)&&(M.current={x:M.current.x,y:We}),(Nt<0&&dt>M.current.x||Nt>0&&dt<M.current.x)&&(M.current={x:dt,y:M.current.y});const vt=dt-ie.current.x,pt=We-ie.current.y,pa=We-M.current.y,_o=dt-M.current.x;if(!L&&Math.sqrt(vt*vt+pt*pt)>=jj&&(A(!0),fe===null)){const ma=p.includes("left")||p.includes("right"),yi=p.includes("up")||p.includes("down");if(ma&&yi){const Ar=Math.abs(vt),Bn=Math.abs(pt);de(Ar>Bn?"horizontal":"vertical")}}let en;if(!q.current)fe==="vertical"?pt>0?en="down":pt<0&&(en="up"):fe==="horizontal"?vt>0?en="right":vt<0&&(en="left"):Math.abs(vt)>=Math.abs(pt)?en=vt>0?"right":"left":en=pt>0?"down":"up",en&&p.includes(en)&&(q.current=en,J.current=Wk(en,vt,pt),w(en));else{const Oa=q.current,ma=Wk(Oa,_o,pa);ma>ul?(H.current=!1,w(Oa)):!(p.includes("left")&&p.includes("right"))&&!(p.includes("up")&&p.includes("down"))&&J.current-ma>=Oj&&(H.current=!0)}const ur=ft(vt,pt);let wn=X.current.x,Na=X.current.y;fe==="horizontal"?(p.includes("left")||p.includes("right"))&&(wn+=ur.x):(fe==="vertical"||(p.includes("left")||p.includes("right"))&&(wn+=ur.x),(p.includes("up")||p.includes("down"))&&(Na+=ur.y)),on({x:wn,y:Na})}function Mt(Ge){if(Ge.key==="Escape"){if(!he.current||!Er(he.current,Ys(La(he.current))))return;v.closeToast(a.id)}}b.useEffect(()=>{if(!g)return;const Ge=he.current;if(!Ge)return;function We(dt){Er(Ge,$i(dt))&&dt.preventDefault()}return Hi(Ge,"touchmove",We,{passive:!1})},[g]);function qe(){if(!S&&j.x===F.x&&j.y===F.y&&!E)return{[Ni.swipeMovementX]:"0px",[Ni.swipeMovementY]:"0px"};const Ge=j.x-F.x,We=j.y-F.y;return{transition:S?"none":void 0,transform:S?`translateX(${j.x}px) translateY(${j.y}px) scale(${F.scale})`:void 0,[Ni.swipeMovementX]:`${Ge}px`,[Ni.swipeMovementY]:`${We}px`}}const nt=a.priority==="high",Lt={role:nt?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":B,"aria-describedby":ee,"aria-hidden":nt&&!Ne?!0:void 0,onPointerDown:g?cr:void 0,onPointerMove:g?Rr:void 0,onPointerUp:g?Ut:void 0,onPointerCancel:g?Ut:void 0,onKeyDown:Mt,inert:wj(a.limited),style:{...qe(),[Ni.index]:a.transitionStatus==="ending"?ve:Be,[Ni.offsetY]:`${Ke}px`,[Ni.height]:a.height?`${a.height}px`:void 0}},St=b.useMemo(()=>({rootRef:he,toast:a,titleId:B,setTitleId:V,descriptionId:ee,setDescriptionId:se,swiping:S,swipeDirection:k,recalculateHeight:qt,index:ve,visibleIndex:Be,expanded:At}),[a,B,ee,S,k,qt,ve,Be,At]),Ln={transitionStatus:a.transitionStatus,expanded:At,limited:a.limited||!1,type:a.type,swiping:St.swiping,swipeDirection:St.swipeDirection},is=ec("div",t,{ref:[n,St.rootRef],state:Ln,stateAttributesMapping:Nj,props:[Lt,h]});return C.jsx(eS.Provider,{value:St,children:is})});let Gk=0;function Fj(e,t="mui"){const[n,a]=b.useState(e),i=e||n;return b.useEffect(()=>{n==null&&(Gk+=1,a(`${t}-${Gk}`))},[n,t]),i}const Kk=n0.useId;function nS(e,t){if(Kk!==void 0){const n=Kk();return e??(t?`${t}-${n}`:n)}return Fj(e,t)}const Bj=b.forwardRef(function(t,n){const{render:a,className:i,style:o,id:l,children:u,...h}=t,{toast:f,setTitleId:p}=tS(),g=u??f.title,v=!!g,k=nS(l);Za(()=>{if(v)return p(k),()=>{p(void 0)}},[v,k,p]);const w={type:f.type},S=ec("h2",t,{ref:n,state:w,props:{...h,id:k,children:g}});return v?S:null}),Vj=b.createContext(void 0);function Hj(e=!1){const t=b.useContext(Vj);if(t===void 0&&!e)throw new Error(vo(16));return t}function $j(e){const{focusableWhenDisabled:t,disabled:n,composite:a=!1,tabIndex:i=0,isNativeButton:o}=e,l=a&&t!==!1,u=a&&t===!1;return{props:b.useMemo(()=>{const f={onKeyDown(p){n&&t&&p.key!=="Tab"&&p.preventDefault()}};return a||(f.tabIndex=i,!o&&n&&(f.tabIndex=t?i:-1)),(o&&(t||l)||!o&&n)&&(f["aria-disabled"]=n),o&&(!t||u)&&(f.disabled=n),f},[a,n,t,l,u,o,i])}}function Wj(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:a=0,native:i=!0,composite:o}=e,l=b.useRef(null),u=Hj(!0),h=o??u!==void 0,{props:f}=$j({focusableWhenDisabled:n,disabled:t,composite:h,tabIndex:a,isNativeButton:i}),p=b.useCallback(()=>{const k=l.current;Ep(k)&&h&&t&&f.disabled===void 0&&k.disabled&&(k.disabled=!1)},[t,f.disabled,h]);Za(p,[p]);const g=b.useCallback((k={})=>{const{onClick:w,onMouseDown:S,onKeyUp:P,onKeyDown:L,onPointerDown:A,...E}=k;return l0({onClick(R){if(t){R.preventDefault();return}w?.(R)},onMouseDown(R){t||S?.(R)},onKeyDown(R){if(t||(Rd(R),L?.(R),R.baseUIHandlerPrevented))return;const j=R.target===R.currentTarget,W=R.currentTarget,F=Ep(W),T=!i&&Gj(W),B=j&&(i?F:!T),V=R.key==="Enter",ee=R.key===" ",se=W.getAttribute("role"),fe=se?.startsWith("menuitem")||se==="option"||se==="gridcell";if(j&&h&&ee){if(R.defaultPrevented&&fe)return;R.preventDefault(),T||i&&F?(W.click(),R.preventBaseUIHandler()):B&&(w?.(R),R.preventBaseUIHandler());return}B&&(!i&&(ee||V)&&R.preventDefault(),!i&&V&&w?.(R))},onKeyUp(R){if(!t){if(Rd(R),P?.(R),R.target===R.currentTarget&&i&&h&&Ep(R.currentTarget)&&R.key===" "){R.preventDefault();return}R.baseUIHandlerPrevented||R.target===R.currentTarget&&!i&&!h&&R.key===" "&&w?.(R)}},onPointerDown(R){if(t){R.preventDefault();return}A?.(R)}},i?{type:"button"}:{role:"button"},f,E)},[t,f,h,i]),v=Qi(k=>{l.current=k,p()});return{getButtonProps:g,buttonRef:v}}function Ep(e){return fi(e)&&e.tagName==="BUTTON"}function Gj(e){return!!(e?.tagName==="A"&&e?.href)}const Kj=b.forwardRef(function(t,n){const{render:a,className:i,style:o,disabled:l,nativeButton:u=!0,...h}=t,f=e0(),{toast:p}=tS(),g=f.useState("expanded"),[v,k]=b.useState(!1),{getButtonProps:w,buttonRef:S}=Wj({disabled:l,native:u}),P={type:p.type};return ec("button",t,{ref:[n,S],state:P,props:[{"aria-hidden":!g&&!v,onClick(){f.closeToast(p.id)},onFocus(){k(!0)},onBlur(){k(!1)}},h,w]})}),BF="none",VF="trigger-press",HF="trigger-hover",$F="outside-press",WF="item-press",GF="close-press",qj="focus-out",KF="escape-key",qF="list-navigation",YF="cancel-open",ZF="imperative-action",XF="window-resize";function Yj(e,t,n,a){let i=!1,o=!1;const l=Vi;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...l}}function Zj(e){return`data-base-ui-${e}`}const aS=b.createContext(null),Xj=()=>b.useContext(aS),Jj=Zj("portal");function rS(e={}){const{ref:t,container:n,componentProps:a=Vi,elementProps:i}=e,o=nS(),u=Xj()?.portalNode,[h,f]=b.useState(null),[p,g]=b.useState(null),v=Qi(P=>{P!==null&&g(P)}),k=b.useRef(null);Za(()=>{if(n===null){k.current&&(k.current=null,g(null),f(null));return}if(o==null)return;const P=(n&&(a0(n)?n:n.current))??u??document.body;if(P==null){k.current&&(k.current=null,g(null),f(null));return}k.current!==P&&(k.current=P,g(null),f(P))},[n,u,o]);const w=ec("div",a,{ref:[t,v],props:[{id:o,[Jj]:""},i]});return{portalNode:p,portalSubtree:h&&w?oo.createPortal(w,h):null}}const JF=b.forwardRef(function(t,n){const{render:a,className:i,style:o,children:l,container:u,renderGuards:h,...f}=t,{portalNode:p,portalSubtree:g}=rS({container:u,ref:n,componentProps:t,elementProps:f}),v=b.useRef(null),k=b.useRef(null),w=b.useRef(null),S=b.useRef(null),[P,L]=b.useState(null),A=b.useRef(!1),E=P?.modal,R=P?.open,j=typeof h=="boolean"?h:!!P&&!P.modal&&P.open&&!!p;b.useEffect(()=>{if(!p||E)return;function F(T){p&&T.relatedTarget&&Cp(T)&&(T.type==="focusin"?A.current&&(Vk(p),A.current=!1):(nj(p),A.current=!0))}return EP(Hi(p,"focusin",F,!0),Hi(p,"focusout",F,!0))},[p,E]),b.useEffect(()=>{!p||R!==!1||(Vk(p),A.current=!1)},[R,p]);const W=b.useMemo(()=>({beforeOutsideRef:v,afterOutsideRef:k,beforeInsideRef:w,afterInsideRef:S,portalNode:p,setFocusManagerState:L}),[p]);return C.jsxs(b.Fragment,{children:[g,C.jsxs(aS.Provider,{value:W,children:[j&&p&&C.jsx(Tl,{"data-type":"outside",ref:v,onFocus:F=>{if(Cp(F,p))w.current?.focus();else{const T=P?P.domReference:null;tj(T)?.focus()}}}),j&&p&&C.jsx("span",{"aria-owns":p.id,style:Ij}),p&&oo.createPortal(l,p),j&&p&&C.jsx(Tl,{"data-type":"outside",ref:k,onFocus:F=>{if(Cp(F,p))S.current?.focus();else{const T=P?P.domReference:null;ej(T)?.focus(),P?.closeOnFocusOut&&P?.onOpenChange(!1,Yj(qj,F.nativeEvent))}}})]})]})}),Qj=b.forwardRef(function(t,n){const{children:a,container:i,className:o,render:l,style:u,...h}=t,{portalNode:f,portalSubtree:p}=rS({container:i,ref:n,componentProps:t,elementProps:h});return!p&&!f?null:C.jsxs(b.Fragment,{children:[p,f&&oo.createPortal(a,f)]})}),eU=Qj;function tU(){const e=b.useContext(Qg);if(!e)throw new Error(vo(73));const t=e.useState("toasts");return b.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function nU(){const e=new Set;function t(n){e.forEach(a=>a(n))}return{" subscribe":function(a){return e.add(a),()=>{e.delete(a)}},add(n){const a=n.id||RP("toast"),i={...n,id:a,transitionStatus:"starting"};return t({action:"add",options:i}),a},close(n){t({action:"close",options:{id:n}})},update(n,a){t({action:"update",options:{...a,id:n}})},promise(n,a){let i=n;return t({action:"promise",options:{...a,promise:n,setPromise(o){i=o}}}),i}}}const d0=nU();function QF(e){return d0.add(e)}function aU({children:e}){return C.jsxs(rj,{toastManager:d0,children:[e,C.jsx(eU,{children:C.jsx(kj,{className:"fixed inset-x-0 top-6 z-[100] mx-auto flex w-full max-w-sm flex-col items-center gap-2 px-4 outline-none",children:C.jsx(rU,{})})})]})}function rU(){const{toasts:e}=tU();return e.map(t=>{const n=t.data?.onUndo;return C.jsxs(zj,{toast:t,className:Pt("pointer-events-auto flex w-full items-center gap-3 rounded-xl border border-oai-gray-200 bg-oai-white px-4 py-3 shadow-xl transition-all duration-200 ease-out","data-[starting-style]:-translate-y-3 data-[starting-style]:opacity-0","data-[ending-style]:-translate-y-3 data-[ending-style]:opacity-0","dark:border-oai-gray-800 dark:bg-oai-gray-900"),children:[C.jsx(Bj,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),n?C.jsx("button",{type:"button",onClick:()=>{n(),d0.close(t.id)},className:"shrink-0 rounded-md px-2 py-1 text-xs font-semibold text-oai-gray-600 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:me("shared.action.undo")}):null,C.jsx(Kj,{"aria-label":me("shared.action.dismiss"),className:"-mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-oai-gray-400 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:C.jsx(bg,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},t.id)})}const h0=Object.freeze(["limits","leaderboard"]),iU=Object.freeze({limits:"/limits",leaderboard:"/leaderboard"}),sU=Object.freeze({limits:()=>_n(()=>import("./LimitsPage-DDLs1L7d.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),leaderboard:()=>_n(()=>import("./LeaderboardPage-Mc5WToys.js"),__vite__mapDeps([8,9,10,11,12,13]))}),iS="total",sS=0,qk=20,oU=Object.freeze([10,20,50,100]),lU="tokentracker:leaderboard:pageSize",cU=20,uU=Object.freeze(["dashboard-existing","silent-preload","page-load","manual-refresh"]);let Yk=0,ua;class dU{constructor(t={}){this.limits=null,this.leaderboard=new Map,this.leaderboardMaxEntries=pU(t.leaderboardMaxEntries)}read(t,n){return tc(t),t==="limits"?!this.limits||this.limits.contextKey!==n?null:Ku(this.limits):n?Ku(this.leaderboard.get(n)):null}write(t,n={}){if(t.targetKey==="limits"){this.limits=t;return}this.leaderboard.has(t.contextKey)&&this.leaderboard.delete(t.contextKey),this.leaderboard.set(t.contextKey,t),this.evictLeaderboardEntries(n.activeContextKey||t.contextKey)}evictLeaderboardEntries(t=null){for(;this.leaderboard.size>this.leaderboardMaxEntries;){const n=Array.from(this.leaderboard.keys()).find(a=>a!==t)||this.leaderboard.keys().next().value;this.leaderboard.delete(n)}}snapshot(){return{limits:Ku(this.limits),leaderboard:{maxEntries:this.leaderboardMaxEntries,size:this.leaderboard.size,keys:Array.from(this.leaderboard.keys())}}}}class hU{constructor(t={}){Yk+=1,this.sessionId=`dashboard-preload-${Yk}`,this.createdAt=Date.now(),this.completedAt=null,this.startedAfterMainContentVisible=!1,this.cache=new dU(t),this.targets={limits:Zk("limits"),leaderboard:Zk("leaderboard")}}}function Zk(e){return{key:e,route:iU[e],resourceStatus:"idle",stateStatus:"idle",error:null,resourcePromise:null,resourceModule:null,resourceRequestId:0,statePromise:null,stateRequestId:0,pendingStateContextKey:null}}function fU(e={}){return new hU(e)}function pU(e){const t=Number(e);return!Number.isInteger(t)||t<1?cU:t}ua=fU();function tc(e){if(!h0.includes(e))throw new Error(`Unknown dashboard preload target: ${e}`)}function oS(e){return e?typeof e=="string"?e:e.message||String(e):null}function mU(e,t){return uU.includes(e)?e:t}function gU(e){const t=Number(e);return Number.isFinite(t)?t:Date.now()}function Ku(e){return e?{...e}:null}function Xk(){const e=h0.every(t=>{const n=ua.targets[t];return n.resourceStatus==="fulfilled"||n.resourceStatus==="rejected"});ua.completedAt=e?Date.now():null}function yU(){ua.startedAfterMainContentVisible=!0}function f0(e,t={}){tc(e);const n=Object.entries(t).filter(([,a])=>a!==void 0).sort(([a],[i])=>a.localeCompare(i)).map(([a,i])=>`${a}=${i===null?"null":String(i)}`);return`${e}:${n.join("|")}`}function vU(e,t={}){tc(e);const n=ua.targets[e];if(n.resourceStatus==="fulfilled")return Promise.resolve(n.resourceModule);if(n.resourceStatus==="pending"&&n.resourcePromise)return n.resourcePromise;const a=t.loader||sU[e],i=n.resourceRequestId+1;n.resourceRequestId=i,n.resourceStatus="pending",n.error=null;const o=Promise.resolve().then(()=>a()).then(l=>n.resourceRequestId!==i||n.resourcePromise!==o?null:(n.resourceStatus="fulfilled",n.resourceModule=l,n.error=null,Xk(),l)).catch(l=>(n.resourceRequestId!==i||n.resourcePromise!==o||(n.resourceStatus="rejected",n.error=oS(l),Xk()),null));return n.resourcePromise=o,o}function bU(e={}){const t=e.loaders||{};return Promise.all(h0.map(n=>vU(n,{loader:t[n]})))}function lS(e,t){tc(e);const n=ua.targets[e],a=t?.status||"fulfilled",i={targetKey:e,status:a,data:t?.data??null,error:oS(t?.error),source:mU(t?.source,"silent-preload"),generatedAt:gU(t?.generatedAt),updatedAt:Date.now(),contextKey:t?.contextKey||f0(e,t?.context||{})};return n.stateStatus=a,a==="rejected"||a==="skipped"?n.error=i.error:a==="fulfilled"&&(n.error=null,ua.cache.write(i,{activeContextKey:t?.activeContextKey})),Ku(i)}function cS(e,t){return tc(e),ua.cache.read(e,t)}function eB(e,t={}){return lS("limits",{data:e,source:t.source||"dashboard-existing",contextKey:t.contextKey||uS(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function uS(e={}){return f0("limits",{state:"current",...e})}function tB(e=uS()){return cS("limits",e)}function Im(e,t={}){return lS("leaderboard",{activeContextKey:t.activeContextKey,data:e,source:t.source||"silent-preload",contextKey:t.contextKey||p0(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function _U(e){return cS("leaderboard",e)}function dS(){if(typeof window>"u")return qk;try{const e=window.localStorage.getItem(lU),t=Number(e);if(oU.includes(t))return t}catch{}return qk}function hS(e={}){const t=e.userId;return t!==void 0?t||null:e.cloudUser?.id||null}function fS(e={}){return typeof e.accessMode=="string"&&e.accessMode.trim()?e.accessMode.trim():e.mockEnabled?"mock":e.baseUrl?"cloud":"unavailable"}function p0(e={}){const t=!!e.mockEnabled,n=e.baseUrl??"";return f0("leaderboard",{accessMode:fS({...e,baseUrl:n,mockEnabled:t}),baseUrl:n,mockEnabled:t,offset:e.offset??sS,pageSize:e.pageSize??dS(),period:e.period||iS,userId:hS(e)})}function Su(e,t){const n=ua.targets.leaderboard;return n.stateRequestId+=1,n.statePromise=null,n.pendingStateContextKey=null,Im(null,{contextKey:t,status:"skipped",error:e})}function kU(e={}){const t=ua,n=!!e.mockEnabled,a=e.baseUrl??"",i=fS({...e,baseUrl:a,mockEnabled:n}),o=e.period||iS,l=e.pageSize??dS(),u=e.offset??sS,h=hS(e),f=p0({accessMode:i,baseUrl:a,mockEnabled:n,offset:u,pageSize:l,period:o,userId:h});if(!n&&e.authLoading)return Promise.resolve(Su("auth-loading",f));if(!n&&!e.signedIn&&i!=="public")return Promise.resolve(Su("not-signed-in",f));if(!n&&!a)return Promise.resolve(Su("missing-base-url",f));if(!n&&i==="unavailable")return Promise.resolve(Su("access-unavailable",f));const p=t.targets.leaderboard,g=_U(f);if(g)return Promise.resolve(g);if(p.stateStatus==="pending"&&p.statePromise&&p.pendingStateContextKey===f)return p.statePromise;const v=p.stateRequestId+1;p.stateRequestId=v,p.stateStatus="pending",p.pendingStateContextKey=f,p.error=null;const k=Promise.resolve().then(()=>QR({userId:h,period:o,limit:l,offset:u})).then(w=>ua!==t||p.stateRequestId!==v||p.statePromise!==k?null:(p.pendingStateContextKey=null,Im(w,{contextKey:f}))).catch(w=>(ua!==t||p.stateRequestId!==v||p.statePromise!==k||(p.pendingStateContextKey=null,Im(null,{contextKey:f,status:"rejected",error:w})),null));return p.statePromise=k,k}const wU=typeof window<"u"?window.location.search:"",Jk=new URLSearchParams(wU),Cu=Jk.get("insforge_code")||Jk.get("code")||null,xU=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function PU(){Yl();const{loading:e,signedIn:t}=ns(),n=so(),[a,i]=b.useState("processing"),[o,l]=b.useState(null),u=b.useRef(!1);b.useEffect(()=>{if(!(!Cu||u.current)){if(u.current=!0,xU){l(!1);return}(async()=>{try{const p=await(await fetch("/api/auth-bridge/verifier")).json();l(!!p?.native)}catch{l(!1)}})()}},[]),b.useEffect(()=>{if(o!==!0||!Cu)return;i("redirecting");const f=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(Cu)}`},200);return()=>clearTimeout(f)},[o]),b.useEffect(()=>{if(o!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const f=setTimeout(()=>{t||i("failed")},12e3);return()=>clearTimeout(f)},[o,e,t,n]),b.useEffect(()=>{if(!Cu&&o===null){const f=setTimeout(()=>i("failed"),3e3);return()=>clearTimeout(f)}},[o]);const h=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&o!==!0&&(o===null||o===!1&&e)?C.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):C.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:C.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),C.jsx("p",{className:"text-oai-gray-400 text-sm",children:me("auth.callback.processing")})]}),a==="redirecting"&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:C.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:C.jsx("path",{d:"M20 6 9 17l-5-5"})})}),C.jsx("p",{className:"text-white text-sm font-medium",children:me("auth.callback.success")}),C.jsx("p",{className:"text-oai-gray-500 text-xs",children:me("auth.callback.redirecting")})]}),a==="failed"&&C.jsxs("div",{className:"space-y-3",children:[C.jsx("p",{className:"text-oai-gray-300 text-sm",children:me("auth.callback.failed")}),C.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:me("auth.callback.close")})]})]})})}const SU=b.lazy(()=>_n(()=>import("./DashboardPage-DKpPluou.js"),__vite__mapDeps([14,1,12,15,16,17,11,3,9,10,18,19,4])).then(e=>({default:e.DashboardPage}))),CU=b.lazy(()=>_n(()=>import("./IpCheckPage-DLohSqBh.js"),[])),TU=b.lazy(()=>_n(()=>import("./LandingPage-BbKynLBb.js"),__vite__mapDeps([20,21,18])).then(e=>({default:e.LandingPage}))),EU=b.lazy(()=>_n(()=>import("./LeaderboardPage-Mc5WToys.js"),__vite__mapDeps([8,9,10,11,12,13])).then(e=>({default:e.LeaderboardPage}))),RU=b.lazy(()=>_n(()=>import("./LeaderboardProfilePage-D1YX_Dk6.js"),__vite__mapDeps([22,12,21,23,13,15,16,6,11,17,7])).then(e=>({default:e.LeaderboardProfilePage}))),AU=b.lazy(()=>_n(()=>import("./LimitsPage-DDLs1L7d.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(e=>({default:e.LimitsPage}))),LU=b.lazy(()=>_n(()=>import("./LoginPage-Cj2zTsA1.js"),[]).then(e=>({default:e.LoginPage}))),DU=b.lazy(()=>_n(()=>import("./ResetPasswordPage-DAc6gcOu.js"),[]).then(e=>({default:e.ResetPasswordPage}))),IU=b.lazy(()=>_n(()=>import("./DevicePage-jYrzCUbu.js"),[])),MU=b.lazy(()=>_n(()=>import("./WrappedPage-B258374V.js"),[])),NU=b.lazy(()=>_n(()=>import("./SettingsPage-C_vuPbea.js"),__vite__mapDeps([24,2,25,3,11,12,9,10,16,7])).then(e=>({default:e.SettingsPage}))),OU=b.lazy(()=>_n(()=>import("./SkillsPage-k_ibd1uy.js"),__vite__mapDeps([26,5,6,7,3,17,11,16,12,19,10])).then(e=>({default:e.SkillsPage}))),jU=b.lazy(()=>_n(()=>import("./WidgetsPage-B7067wdE.js"),__vite__mapDeps([27,9,10,11,25,3,4,6,7])).then(e=>({default:e.WidgetsPage})));function UU(){const{resolvedLocale:e}=Yl(),t=zn(),n=ns();hN();const a=b.useRef(!1),i=b.useRef(!1),o=b.useRef(new Set),l=An(),u=b.useMemo(()=>typeof window>"u"?!1:aN(window.location.search),[]),h=t?.pathname||"/",f=new URL(window.location.href),p=f.pathname.replace(/\/+$/,"")||"/",v=p.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,k=f.searchParams.get("token")||null,w=v||k,S=p==="/share"||p==="/share.html"||p.startsWith("/share/"),P=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),L=h.replace(/\/+$/,"")||"/",A=L==="/"||L==="/dashboard",E=L==="/leaderboard",R=L.match(/^\/u\/([^/]+)$/i),j=R?R[1]:null,W=!!(n.enabled&&n.signedIn),F=P||W,T=!1,B=tN(),V=!F&&!l&&!P,ee=l?"mock":n.loading?"unavailable":W?"cloud":F?"local":"unavailable",se=b.useCallback(()=>{if(!a.current||!l&&n.loading||!l&&!F)return;const pe={accessMode:ee,baseUrl:nN(),mockEnabled:l,signedIn:F,authLoading:!!n.loading,userId:W&&n.user?.id||null},ve=p0(pe);o.current.has(ve)||(o.current.add(ve),kU(pe))},[W,n.loading,n.user?.id,ee,l,F]),fe=b.useCallback(()=>{A&&(a.current||(a.current=!0,yU()),i.current||(i.current=!0,bU()),se())},[A,se]);b.useEffect(()=>{se()},[se]);const de=b.useMemo(()=>!n.enabled||!W?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[W,n]);let he=P||l||u?"dashboard":"landing";L==="/landing"&&(he="landing"),L==="/dashboard"&&(he="dashboard"),E&&(he="dashboard"),j&&(he="dashboard");const ie=L==="/limits",X=L==="/settings",q=L==="/skills",J=L==="/widgets",H=L==="/ip-check";(ie||X||q||J||H)&&(he="dashboard");let M=SU;j?M=RU:L==="/leaderboard"?M=EU:ie?M=AU:X?M=NU:q?M=OU:J?M=jU:H&&(M=CU);const Z=!S&&!V&&(L==="/dashboard"||L==="/"||E||ie||X||q||J||H);if(!P&&!W&&!S&&!n.loading&&he==="dashboard"&&!E&&!j&&L!=="/login"&&L!=="/reset-password"&&L!=="/landing"&&L!=="/auth/callback"&&L!=="/auth/native-callback")return C.jsx(V4,{to:"/login",replace:!0});let ge=null;if(L==="/auth/callback"||L==="/auth/native-callback")ge=C.jsx(PU,{});else if(L==="/login")ge=C.jsx(LU,{});else if(L==="/reset-password")ge=C.jsx(DU,{});else if(L==="/device")ge=C.jsx(IU,{});else if(L==="/wrapped")ge=C.jsx(MU,{});else if(he==="landing")ge=C.jsx(TU,{signInUrl:"/login",signUpUrl:"/login"});else{const pe=C.jsx(M,{baseUrl:B,auth:de,signedIn:F,sessionSoftExpired:T,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:S,publicToken:w,userId:j,signInUrl:"/login",signUpUrl:"/login",onMainContentVisible:fe},e);Z?ge=C.jsx(RN,{children:pe}):ge=pe}return C.jsx(JA,{children:C.jsx(tL,{children:C.jsx(aU,{children:C.jsxs(nL,{children:[C.jsx(b.Suspense,{fallback:null,children:ge}),Z?C.jsx(JN,{}):null,C.jsx(Q9,{}),C.jsx(eA,{}),C.jsx(dA,{})]})})})})}const zU=pT([{path:"*",element:C.jsx(UU,{})}]);nC.createRoot(document.getElementById("root")).render(C.jsx(Zs.StrictMode,{children:C.jsx(N8,{children:C.jsx(V8,{children:C.jsx(r8,{children:C.jsx(i8,{children:C.jsx(CT,{router:zU})})})})})}));export{_n as $,Rt as A,Pz as B,lz as C,Rz as D,yz as E,Hw as F,me as G,Ou as H,sz as I,iz as J,Dl as K,Nd as L,XA as M,Nz as N,vz as O,ZU as P,YU as Q,Zs as R,$x as S,fN as T,YN as U,Pt as V,g2 as W,bg as X,ns as Y,mg as Z,J9 as _,ec as a,kl as a$,nz as a0,QR as a1,Yl as a2,aN as a3,si as a4,Mz as a5,mz as a6,oz as a7,bR as a8,XU as a9,Uz as aA,KU as aB,dz as aC,Bd as aD,YA as aE,pN as aF,tB as aG,$A as aH,wz as aI,FU as aJ,aR as aK,_g as aL,sd as aM,Xb as aN,uz as aO,f2 as aP,h2 as aQ,NA as aR,az as aS,no as aT,ud as aU,t2 as aV,n2 as aW,a2 as aX,r2 as aY,FA as aZ,Aa as a_,JU as aa,eB as ab,gz as ac,rz as ad,tz as ae,Ak as af,jz as ag,XL as ah,_t as ai,dn as aj,bd as ak,kg as al,ro as am,Gg as an,y2 as ao,hi as ap,b_ as aq,oo as ar,zn as as,so as at,nN as au,od as av,p0 as aw,_U as ax,Im as ay,oR as az,Yj as b,wj as b$,Iz as b0,Lz as b1,PP as b2,Za as b3,vo as b4,yo as b5,yO as b6,Hk as b7,l0 as b8,Vi as b9,EO as bA,Qi as bB,r0 as bC,La as bD,EP as bE,Hi as bF,$i as bG,lF as bH,iF as bI,Er as bJ,HF as bK,vO as bL,VF as bM,KF as bN,OF as bO,qj as bP,Sa as bQ,ZF as bR,Cp as bS,IF as bT,ej as bU,MF as bV,UF as bW,Tl as bX,JF as bY,FF as bZ,Tj as b_,Tr as ba,NF as bb,GP as bc,BF as bd,Ej as be,Sj as bf,ZN as bg,Bz as bh,zz as bi,Zz as bj,Xz as bk,Jz as bl,VA as bm,Fz as bn,Vz as bo,QF as bp,Hz as bq,Kz as br,$z as bs,Wz as bt,Gz as bu,Yz as bv,qz as bw,pF as bx,Jg as by,Ul as bz,sn as c,jF as c$,fi as c0,B8 as c1,hg as c2,Dz as c3,Az as c4,TO as c5,NO as c6,_F as c7,MP as c8,BO as c9,SP as cA,nF as cB,SO as cC,Pp as cD,PO as cE,nS as cF,uF as cG,cF as cH,Bk as cI,CF as cJ,TF as cK,Ys as cL,xp as cM,qF as cN,RF as cO,Am as cP,EF as cQ,AF as cR,MO as cS,kp as cT,wp as cU,LF as cV,Ea as cW,hF as cX,fF as cY,IO as cZ,OP as c_,Rm as ca,wF as cb,xF as cc,kF as cd,NP as ce,OO as cf,jO as cg,VO as ch,PF as ci,SF as cj,gF as ck,FO as cl,bF as cm,zO as cn,bO as co,Ok as cp,vF as cq,yF as cr,Yd as cs,_O as ct,Sm as cu,CP as cv,eF as cw,xO as cx,tF as cy,Ia as cz,GF as d,rF as d0,Qz as d1,hO as d2,$F as d3,YF as d4,zF as d5,aF as d6,XF as d7,WF as d8,Td as d9,Xj as da,s0 as db,Zj as dc,Cj as dd,tj as de,DF as df,QO as dg,sF as dh,dF as di,oF as dj,mF as dk,i0 as dl,Uk as dm,u0 as dn,fz as dp,pz as dq,hz as dr,ar as ds,QM as e,qU as f,$w as g,fR as h,An as i,C as j,Ez as k,xz as l,Cl as m,ER as n,RR as o,Sz as p,bz as q,b as r,ez as s,cz as t,Wj as u,Cz as v,_z as w,Tz as x,kz as y,QU as z};
|