tokentracker-cli 0.31.0 → 0.31.1
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-D8lXQtTi.js → ActivityHeatmap-BjiEMIl2.js} +1 -1
- package/dashboard/dist/assets/{Card-CzL-eInd.js → Card-Nlgzr57Q.js} +1 -1
- package/dashboard/dist/assets/DashboardPage-z7rLj1gX.js +19 -0
- package/dashboard/dist/assets/{DevicePage-XTngLOwj.js → DevicePage-B1NhBt9Q.js} +1 -1
- package/dashboard/dist/assets/{DialogTitle-Csg36lAf.js → DialogTitle-CEBn-oBo.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-Db32waF2.js → FadeIn-Dbk47nhk.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-DliHDaOa.js → HeaderGithubStar-B0OAKXVw.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-F5CeRlub.js → IpCheckPage-C0wQLtdK.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-2_sEF9mN.js → LandingPage-DWSbmVip.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardAvatar-C9VP8195.js → LeaderboardAvatar-CLMnffKE.js} +1 -1
- package/dashboard/dist/assets/LeaderboardPage-CZvefN8H.js +6 -0
- package/dashboard/dist/assets/{LeaderboardProfileModal-BGDd6bjd.js → LeaderboardProfileModal-DasxA8Lo.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfilePage-CuGbG8_n.js → LeaderboardProfilePage-DJJ7l3Ix.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-DlcSiBHP.js → LimitsPage-xUmhxOqT.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-BNFZWAB2.js → LocalOnlyNotice-B3uM29rj.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-UkyGRtTz.js → LoginPage-BejL6eIO.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-Bg0LqxYF.js → PopoverPopup-V6vxWbIV.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-D3gNWvI6.js → SettingsPage-DossFM4s.js} +1 -1
- package/dashboard/dist/assets/{SkillsPage-ChO2jmQM.js → SkillsPage-COwiRUo1.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-BzPEEeI3.js → WidgetsPage-CtkM_RQn.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-DpP5X0ug.js → WrappedPage-BpXrsSoG.js} +1 -1
- package/dashboard/dist/assets/{agent-logos-BgjfCDVs.js → agent-logos-D6Jmq7E1.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-BTb5Q4za.js → arrow-up-right-BS0sCPTz.js} +1 -1
- package/dashboard/dist/assets/check-DKwh5hl-.js +1 -0
- package/dashboard/dist/assets/{chevron-down-DaLDjB50.js → chevron-down-DyiXbuAL.js} +1 -1
- package/dashboard/dist/assets/{download-B3izgOD2.js → download-CqDWRO99.js} +1 -1
- package/dashboard/dist/assets/{info-D9m3SBry.js → info-DMW1GFmI.js} +1 -1
- package/dashboard/dist/assets/main-CjFrTufR.css +1 -0
- package/dashboard/dist/assets/{main-y2PTR9Ni.js → main-uqC1VAKB.js} +2 -2
- package/dashboard/dist/assets/{use-limits-display-prefs--sTkiVYR.js → use-limits-display-prefs-C04zvO7N.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-CI8nzpC4.js → use-native-settings-BvFr6zgZ.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-DHoQOqOL.js → use-usage-limits-5fwy0xeB.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-DyV36y25.js → useCurrency-vRzRfd7L.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist/share.html +2 -2
- package/package.json +1 -1
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/dashboard/dist/assets/DashboardPage-CsR8XWxj.js +0 -19
- package/dashboard/dist/assets/LeaderboardPage-Za_4Qq0N.js +0 -6
- package/dashboard/dist/assets/check-L6OoQyFg.js +0 -1
- package/dashboard/dist/assets/main-CvZdsRCc.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-z7rLj1gX.js","assets/use-usage-limits-5fwy0xeB.js","assets/useCurrency-vRzRfd7L.js","assets/ActivityHeatmap-BjiEMIl2.js","assets/info-DMW1GFmI.js","assets/DialogTitle-CEBn-oBo.js","assets/Card-Nlgzr57Q.js","assets/agent-logos-D6Jmq7E1.js","assets/PopoverPopup-V6vxWbIV.js","assets/FadeIn-Dbk47nhk.js","assets/LandingPage-DWSbmVip.js","assets/HeaderGithubStar-B0OAKXVw.js","assets/LeaderboardPage-CZvefN8H.js","assets/LeaderboardAvatar-CLMnffKE.js","assets/chevron-down-DyiXbuAL.js","assets/LeaderboardProfilePage-DJJ7l3Ix.js","assets/LeaderboardProfileModal-DasxA8Lo.js","assets/arrow-up-right-BS0sCPTz.js","assets/check-DKwh5hl-.js","assets/LimitsPage-xUmhxOqT.js","assets/use-limits-display-prefs-C04zvO7N.js","assets/LocalOnlyNotice-B3uM29rj.js","assets/download-CqDWRO99.js","assets/SettingsPage-DossFM4s.js","assets/use-native-settings-BvFr6zgZ.js","assets/SkillsPage-COwiRUo1.js","assets/WidgetsPage-CtkM_RQn.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function wC(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(a,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function K_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xC(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function a(){var o=!1;try{o=this instanceof a}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}),n}var Qh={exports:{}},Rs={},Jh={exports:{}},Je={};var Vv;function PC(){if(Vv)return Je;Vv=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function C(I,W,me){this.props=I,this.context=W,this.refs=S,this.updater=me||_}C.prototype.isReactComponent={},C.prototype.setState=function(I,W){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,W,"setState")},C.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function L(){}L.prototype=C.prototype;function M(I,W,me){this.props=I,this.context=W,this.refs=S,this.updater=me||_}var E=M.prototype=new L;E.constructor=M,x(E,C.prototype),E.isPureReactComponent=!0;var A=Array.isArray,B=Object.prototype.hasOwnProperty,z={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function P(I,W,me){var pe,ye={},xe=null,Fe=null;if(W!=null)for(pe in W.ref!==void 0&&(Fe=W.ref),W.key!==void 0&&(xe=""+W.key),W)B.call(W,pe)&&!H.hasOwnProperty(pe)&&(ye[pe]=W[pe]);var Ye=arguments.length-2;if(Ye===1)ye.children=me;else if(1<Ye){for(var je=Array(Ye),Rt=0;Rt<Ye;Rt++)je[Rt]=arguments[Rt+2];ye.children=je}if(I&&I.defaultProps)for(pe in Ye=I.defaultProps,Ye)ye[pe]===void 0&&(ye[pe]=Ye[pe]);return{$$typeof:e,type:I,key:xe,ref:Fe,props:ye,_owner:z.current}}function Z(I,W){return{$$typeof:e,type:I.type,key:W,ref:I.ref,props:I.props,_owner:I._owner}}function X(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function fe(I){var W={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(me){return W[me]})}var he=/\/+/g;function Q(I,W){return typeof I=="object"&&I!==null&&I.key!=null?fe(""+I.key):W.toString(36)}function J(I,W,me,pe,ye){var xe=typeof I;(xe==="undefined"||xe==="boolean")&&(I=null);var Fe=!1;if(I===null)Fe=!0;else switch(xe){case"string":case"number":Fe=!0;break;case"object":switch(I.$$typeof){case e:case t:Fe=!0}}if(Fe)return Fe=I,ye=ye(Fe),I=pe===""?"."+Q(Fe,0):pe,A(ye)?(me="",I!=null&&(me=I.replace(he,"$&/")+"/"),J(ye,W,me,"",function(Rt){return Rt})):ye!=null&&(X(ye)&&(ye=Z(ye,me+(!ye.key||Fe&&Fe.key===ye.key?"":(""+ye.key).replace(he,"$&/")+"/")+I)),W.push(ye)),1;if(Fe=0,pe=pe===""?".":pe+":",A(I))for(var Ye=0;Ye<I.length;Ye++){xe=I[Ye];var je=pe+Q(xe,Ye);Fe+=J(xe,W,me,je,ye)}else if(je=v(I),typeof je=="function")for(I=je.call(I),Ye=0;!(xe=I.next()).done;)xe=xe.value,je=pe+Q(xe,Ye++),Fe+=J(xe,W,me,je,ye);else if(xe==="object")throw W=String(I),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return Fe}function te(I,W,me){if(I==null)return I;var pe=[],ye=0;return J(I,pe,"","",function(xe){return W.call(me,xe,ye++)}),pe}function ee(I){if(I._status===-1){var W=I._result;W=W(),W.then(function(me){(I._status===0||I._status===-1)&&(I._status=1,I._result=me)},function(me){(I._status===0||I._status===-1)&&(I._status=2,I._result=me)}),I._status===-1&&(I._status=0,I._result=W)}if(I._status===1)return I._result.default;throw I._result}var se={current:null},F={transition:null},Y={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:F,ReactCurrentOwner:z};function V(){throw Error("act(...) is not supported in production builds of React.")}return Je.Children={map:te,forEach:function(I,W,me){te(I,function(){W.apply(this,arguments)},me)},count:function(I){var W=0;return te(I,function(){W++}),W},toArray:function(I){return te(I,function(W){return W})||[]},only:function(I){if(!X(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Je.Component=C,Je.Fragment=n,Je.Profiler=o,Je.PureComponent=M,Je.StrictMode=a,Je.Suspense=f,Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,Je.act=V,Je.cloneElement=function(I,W,me){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var pe=x({},I.props),ye=I.key,xe=I.ref,Fe=I._owner;if(W!=null){if(W.ref!==void 0&&(xe=W.ref,Fe=z.current),W.key!==void 0&&(ye=""+W.key),I.type&&I.type.defaultProps)var Ye=I.type.defaultProps;for(je in W)B.call(W,je)&&!H.hasOwnProperty(je)&&(pe[je]=W[je]===void 0&&Ye!==void 0?Ye[je]:W[je])}var je=arguments.length-2;if(je===1)pe.children=me;else if(1<je){Ye=Array(je);for(var Rt=0;Rt<je;Rt++)Ye[Rt]=arguments[Rt+2];pe.children=Ye}return{$$typeof:e,type:I.type,key:ye,ref:xe,props:pe,_owner:Fe}},Je.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:s,_context:I},I.Consumer=I},Je.createElement=P,Je.createFactory=function(I){var W=P.bind(null,I);return W.type=I,W},Je.createRef=function(){return{current:null}},Je.forwardRef=function(I){return{$$typeof:u,render:I}},Je.isValidElement=X,Je.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:ee}},Je.memo=function(I,W){return{$$typeof:h,type:I,compare:W===void 0?null:W}},Je.startTransition=function(I){var W=F.transition;F.transition={};try{I()}finally{F.transition=W}},Je.unstable_act=V,Je.useCallback=function(I,W){return se.current.useCallback(I,W)},Je.useContext=function(I){return se.current.useContext(I)},Je.useDebugValue=function(){},Je.useDeferredValue=function(I){return se.current.useDeferredValue(I)},Je.useEffect=function(I,W){return se.current.useEffect(I,W)},Je.useId=function(){return se.current.useId()},Je.useImperativeHandle=function(I,W,me){return se.current.useImperativeHandle(I,W,me)},Je.useInsertionEffect=function(I,W){return se.current.useInsertionEffect(I,W)},Je.useLayoutEffect=function(I,W){return se.current.useLayoutEffect(I,W)},Je.useMemo=function(I,W){return se.current.useMemo(I,W)},Je.useReducer=function(I,W,me){return se.current.useReducer(I,W,me)},Je.useRef=function(I){return se.current.useRef(I)},Je.useState=function(I){return se.current.useState(I)},Je.useSyncExternalStore=function(I,W,me){return se.current.useSyncExternalStore(I,W,me)},Je.useTransition=function(){return se.current.useTransition()},Je.version="18.3.1",Je}var $v;function Kp(){return $v||($v=1,Jh.exports=PC()),Jh.exports}var Hv;function SC(){if(Hv)return Rs;Hv=1;var e=Kp(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(u,f,h){var m,y={},v=null,_=null;h!==void 0&&(v=""+h),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(_=f.ref);for(m in f)a.call(f,m)&&!s.hasOwnProperty(m)&&(y[m]=f[m]);if(u&&u.defaultProps)for(m in f=u.defaultProps,f)y[m]===void 0&&(y[m]=f[m]);return{$$typeof:t,type:u,key:v,ref:_,props:y,_owner:o.current}}return Rs.Fragment=n,Rs.jsx=l,Rs.jsxs=l,Rs}var Wv;function CC(){return Wv||(Wv=1,Qh.exports=SC()),Qh.exports}var T=CC(),k=Kp();const al=K_(k),qp=wC({__proto__:null,default:al},[k]);var jc={},ef={exports:{}},En={},tf={exports:{}},nf={};var Gv;function TC(){return Gv||(Gv=1,(function(e){function t(F,Y){var V=F.length;F.push(Y);e:for(;0<V;){var I=V-1>>>1,W=F[I];if(0<o(W,Y))F[I]=Y,F[V]=W,V=I;else break e}}function n(F){return F.length===0?null:F[0]}function a(F){if(F.length===0)return null;var Y=F[0],V=F.pop();if(V!==Y){F[0]=V;e:for(var I=0,W=F.length,me=W>>>1;I<me;){var pe=2*(I+1)-1,ye=F[pe],xe=pe+1,Fe=F[xe];if(0>o(ye,V))xe<W&&0>o(Fe,ye)?(F[I]=Fe,F[xe]=V,I=xe):(F[I]=ye,F[pe]=V,I=pe);else if(xe<W&&0>o(Fe,V))F[I]=Fe,F[xe]=V,I=xe;else break e}}return Y}function o(F,Y){var V=F.sortIndex-Y.sortIndex;return V!==0?V:F.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var f=[],h=[],m=1,y=null,v=3,_=!1,x=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,M=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(F){for(var Y=n(h);Y!==null;){if(Y.callback===null)a(h);else if(Y.startTime<=F)a(h),Y.sortIndex=Y.expirationTime,t(f,Y);else break;Y=n(h)}}function A(F){if(S=!1,E(F),!x)if(n(f)!==null)x=!0,ee(B);else{var Y=n(h);Y!==null&&se(A,Y.startTime-F)}}function B(F,Y){x=!1,S&&(S=!1,L(P),P=-1),_=!0;var V=v;try{for(E(Y),y=n(f);y!==null&&(!(y.expirationTime>Y)||F&&!fe());){var I=y.callback;if(typeof I=="function"){y.callback=null,v=y.priorityLevel;var W=I(y.expirationTime<=Y);Y=e.unstable_now(),typeof W=="function"?y.callback=W:y===n(f)&&a(f),E(Y)}else a(f);y=n(f)}if(y!==null)var me=!0;else{var pe=n(h);pe!==null&&se(A,pe.startTime-Y),me=!1}return me}finally{y=null,v=V,_=!1}}var z=!1,H=null,P=-1,Z=5,X=-1;function fe(){return!(e.unstable_now()-X<Z)}function he(){if(H!==null){var F=e.unstable_now();X=F;var Y=!0;try{Y=H(!0,F)}finally{Y?Q():(z=!1,H=null)}}else z=!1}var Q;if(typeof M=="function")Q=function(){M(he)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,te=J.port2;J.port1.onmessage=he,Q=function(){te.postMessage(null)}}else Q=function(){C(he,0)};function ee(F){H=F,z||(z=!0,Q())}function se(F,Y){P=C(function(){F(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_continueExecution=function(){x||_||(x=!0,ee(B))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(F){switch(v){case 1:case 2:case 3:var Y=3;break;default:Y=v}var V=v;v=Y;try{return F()}finally{v=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,Y){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var V=v;v=F;try{return Y()}finally{v=V}},e.unstable_scheduleCallback=function(F,Y,V){var I=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?I+V:I):V=I,F){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=V+W,F={id:m++,callback:Y,priorityLevel:F,startTime:V,expirationTime:W,sortIndex:-1},V>I?(F.sortIndex=V,t(h,F),n(f)===null&&F===n(h)&&(S?(L(P),P=-1):S=!0,se(A,V-I))):(F.sortIndex=W,t(f,F),x||_||(x=!0,ee(B))),F},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(F){var Y=v;return function(){var V=v;v=Y;try{return F.apply(this,arguments)}finally{v=V}}}})(nf)),nf}var Kv;function EC(){return Kv||(Kv=1,tf.exports=TC()),tf.exports}var qv;function AC(){if(qv)return En;qv=1;var e=Kp(),t=EC();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,c=1;c<arguments.length;c++)i+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,o={};function s(r,i){l(r,i),l(r+"Capture",i)}function l(r,i){for(o[r]=i,r=0;r<i.length;r++)a.add(i[r])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},y={};function v(r){return f.call(y,r)?!0:f.call(m,r)?!1:h.test(r)?y[r]=!0:(m[r]=!0,!1)}function _(r,i,c,d){if(c!==null&&c.type===0)return!1;switch(typeof i){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 x(r,i,c,d){if(i===null||typeof i>"u"||_(r,i,c,d))return!0;if(d)return!1;if(c!==null)switch(c.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function S(r,i,c,d,p,g,w){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=d,this.attributeNamespace=p,this.mustUseProperty=c,this.propertyName=r,this.type=i,this.sanitizeURL=g,this.removeEmptyString=w}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){C[r]=new S(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];C[i]=new S(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){C[r]=new S(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){C[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){C[r]=new S(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){C[r]=new S(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){C[r]=new S(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){C[r]=new S(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){C[r]=new S(r,5,!1,r.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function M(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(L,M);C[i]=new S(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(L,M);C[i]=new S(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(L,M);C[i]=new S(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){C[r]=new S(r,1,!1,r.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){C[r]=new S(r,1,!1,r.toLowerCase(),null,!0,!0)});function E(r,i,c,d){var p=C.hasOwnProperty(i)?C[i]:null;(p!==null?p.type!==0:d||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(x(i,c,p,d)&&(c=null),d||p===null?v(i)&&(c===null?r.removeAttribute(i):r.setAttribute(i,""+c)):p.mustUseProperty?r[p.propertyName]=c===null?p.type===3?!1:"":c:(i=p.attributeName,d=p.attributeNamespace,c===null?r.removeAttribute(i):(p=p.type,c=p===3||p===4&&c===!0?"":""+c,d?r.setAttributeNS(d,i,c):r.setAttribute(i,c))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),z=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),fe=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),F=Symbol.iterator;function Y(r){return r===null||typeof r!="object"?null:(r=F&&r[F]||r["@@iterator"],typeof r=="function"?r:null)}var V=Object.assign,I;function W(r){if(I===void 0)try{throw Error()}catch(c){var i=c.stack.trim().match(/\n( *(at )?)/);I=i&&i[1]||""}return`
|
|
3
3
|
`+I+r}var me=!1;function pe(r,i){if(!r||me)return"";me=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(q){var d=q}Reflect.construct(r,[],i)}else{try{i.call()}catch(q){d=q}r.call(i.prototype)}else{try{throw Error()}catch(q){d=q}r()}}catch(q){if(q&&d&&typeof q.stack=="string"){for(var p=q.stack.split(`
|
|
4
4
|
`),g=d.stack.split(`
|
|
@@ -956,4 +956,4 @@ skills.usage.disclaimer,ui,SkillsPage,SkillDetailPanel,usage_disclaimer,"Counts
|
|
|
956
956
|
${M}px !important;
|
|
957
957
|
${E}px !important;
|
|
958
958
|
}
|
|
959
|
-
`),()=>{u.current?.removeAttribute("data-motion-pop-id"),B.contains(A)&&B.removeChild(A)}},[t]),T.jsx(pN,{isPresent:t,childRef:u,sizeRef:f,pop:s,children:s===!1?e:k.cloneElement(e,{ref:y})})}const gN=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:o,presenceAffectsLayout:s,mode:l,anchorX:u,anchorY:f,root:h})=>{const m=Lm(yN),y=k.useId();let v=!0,_=k.useMemo(()=>(v=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:x=>{m.set(x,!0);for(const S of m.values())if(!S)return;a&&a()},register:x=>(m.set(x,!1),()=>m.delete(x))}),[n,m,a]);return s&&v&&(_={..._}),k.useMemo(()=>{m.forEach((x,S)=>m.set(S,!1))},[n]),k.useEffect(()=>{!n&&!m.size&&a&&a()},[n]),e=T.jsx(mN,{pop:l==="popLayout",isPresent:n,anchorX:u,anchorY:f,root:h,children:e}),T.jsx(dd.Provider,{value:_,children:e})};function yN(){return new Map}function L1(e=!0){const t=k.useContext(dd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:o}=t,s=k.useId();k.useEffect(()=>{if(e)return o(s)},[e]);const l=k.useCallback(()=>e&&a&&a(s),[s,a,e]);return!n&&a?[!1,l]:[!0]}const Kc=e=>e.key||"";function h_(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const I1=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s="sync",propagate:l=!1,anchorX:u="left",anchorY:f="top",root:h})=>{const[m,y]=L1(l),v=k.useMemo(()=>h_(e),[e]),_=l&&!m?[]:v.map(Kc),x=k.useRef(!0),S=k.useRef(v),C=Lm(()=>new Map),L=k.useRef(new Set),[M,E]=k.useState(v),[A,B]=k.useState(v);ix(()=>{x.current=!1,S.current=v;for(let P=0;P<A.length;P++){const Z=Kc(A[P]);_.includes(Z)?(C.delete(Z),L.current.delete(Z)):C.get(Z)!==!0&&C.set(Z,!1)}},[A,_.length,_.join("-")]);const z=[];if(v!==M){let P=[...v];for(let Z=0;Z<A.length;Z++){const X=A[Z],fe=Kc(X);_.includes(fe)||(P.splice(Z,0,X),z.push(X))}return s==="wait"&&z.length&&(P=z),B(h_(P)),E(v),null}const{forceRender:H}=k.useContext(Dm);return T.jsx(T.Fragment,{children:A.map(P=>{const Z=Kc(P),X=l&&!m?!1:v===A||_.includes(Z),fe=()=>{if(L.current.has(Z))return;if(C.has(Z))L.current.add(Z),C.set(Z,!0);else return;let he=!0;C.forEach(Q=>{Q||(he=!1)}),he&&(H?.(),B(S.current),l&&y?.(),a&&a())};return T.jsx(gN,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:h,onExitComplete:X?void 0:fe,anchorX:u,anchorY:f,children:P},Z)})})},M1=k.createContext({strict:!1}),f_={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 p_=!1;function vN(){if(p_)return;const e={};for(const t in f_)e[t]={isEnabled:n=>f_[t].some(a=>!!n[a])};l1(e),p_=!0}function N1(){return vN(),n5()}function bN(e){const t=N1();for(const n in e)t[n]={...t[n],...e[n]};l1(t)}const kN=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 qu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||kN.has(e)}let O1=e=>!qu(e);function _N(e){typeof e=="function"&&(O1=t=>t.startsWith("on")?!qu(t):e(t))}try{_N(require("@emotion/is-prop-valid").default)}catch{}function wN(e,t,n){const a={};for(const o in e)o==="values"&&typeof e.values=="object"||nn(e[o])||(O1(o)||n===!0&&qu(o)||!t&&!qu(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}const md=k.createContext({});function xN(e,t){if(pd(e)){const{initial:n,animate:a}=e;return{initial:n===!1||hl(n)?n:void 0,animate:hl(a)?a:void 0}}return e.inherit!==!1?t:{}}function PN(e){const{initial:t,animate:n}=xN(e,k.useContext(md));return k.useMemo(()=>({initial:t,animate:n}),[m_(t),m_(n)])}function m_(e){return Array.isArray(e)?e.join(" "):e}const ig=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function j1(e,t,n){for(const a in t)!nn(t[a])&&!m1(a,n)&&(e[a]=t[a])}function SN({transformTemplate:e},t){return k.useMemo(()=>{const n=ig();return ng(n,t,e),Object.assign({},n.vars,n.style)},[t])}function CN(e,t){const n=e.style||{},a={};return j1(a,n,e),Object.assign(a,SN(e,t)),a}function TN(e,t){const n={},a=CN(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 U1=()=>({...ig(),attrs:{}});function EN(e,t,n,a){const o=k.useMemo(()=>{const s=U1();return g1(s,t,v1(a),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};j1(s,e.style,e),o.style={...s,...o.style}}return o}const AN=["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 og(e){return typeof e!="string"||e.includes("-")?!1:!!(AN.indexOf(e)>-1||/[A-Z]/u.test(e))}function RN(e,t,n,{latestValues:a},o,s=!1,l){const f=(l??og(e)?EN:TN)(t,a,o,e),h=wN(t,typeof e=="string",s),m=e!==k.Fragment?{...h,...f,ref:n}:{},{children:y}=t,v=k.useMemo(()=>nn(y)?y.get():y,[y]);return k.createElement(e,{...m,children:v})}function DN({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,o){return{latestValues:LN(n,a,o,e),renderState:t()}}function LN(e,t,n,a){const o={},s=a(e,{});for(const v in s)o[v]=bu(s[v]);let{initial:l,animate:u}=e;const f=pd(e),h=o1(e);t&&h&&!f&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const y=m?u:l;if(y&&typeof y!="boolean"&&!fd(y)){const v=Array.isArray(y)?y:[y];for(let _=0;_<v.length;_++){const x=Km(e,v[_]);if(x){const{transitionEnd:S,transition:C,...L}=x;for(const M in L){let E=L[M];if(Array.isArray(E)){const A=m?E.length-1:0;E=E[A]}E!==null&&(o[M]=E)}for(const M in S)o[M]=S[M]}}}return o}const B1=e=>(t,n)=>{const a=k.useContext(md),o=k.useContext(dd),s=()=>DN(e,t,a,o);return n?s():Lm(s)},IN=B1({scrapeMotionValuesFromProps:ag,createRenderState:ig}),MN=B1({scrapeMotionValuesFromProps:b1,createRenderState:U1}),NN=Symbol.for("motionComponentSymbol");function ON(e,t,n){const a=k.useRef(n);k.useInsertionEffect(()=>{a.current=n});const o=k.useRef(null);return k.useCallback(s=>{s&&e.onMount?.(s);const l=a.current;if(typeof l=="function")if(s){const u=l(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):l(s);else l&&(l.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const F1=k.createContext({});function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function jN(e,t,n,a,o,s){const{visualElement:l}=k.useContext(md),u=k.useContext(M1),f=k.useContext(dd),h=k.useContext(rg),m=h.reducedMotion,y=h.skipAnimations,v=k.useRef(null),_=k.useRef(!1);a=a||u.renderer,!v.current&&a&&(v.current=a(e,{visualState:t,parent:l,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:s}),_.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const x=v.current,S=k.useContext(F1);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&UN(v.current,n,o,S);const C=k.useRef(!1);k.useInsertionEffect(()=>{x&&C.current&&x.update(n,f)});const L=n[Kx],M=k.useRef(!!L&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(L)&&window.MotionHasOptimisedAnimation?.(L));return ix(()=>{_.current=!0,x&&(C.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),M.current&&x.animationState&&x.animationState.animateChanges())}),k.useEffect(()=>{x&&(!M.current&&x.animationState&&x.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(L)}),M.current=!1),x.enteringChildren=void 0)}),x}function UN(e,t,n,a){const{layoutId:o,layout:s,drag:l,dragConstraints:u,layoutScroll:f,layoutRoot:h,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:z1(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!l||u&&wo(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:f,layoutRoot:h,layoutAnchor:m})}function z1(e){if(e)return e.options.allowProjection!==!1?e.projection:z1(e.parent)}function Lf(e,{forwardMotionProps:t=!1,type:n}={},a,o){a&&bN(a);const s=n?n==="svg":og(e),l=s?MN:IN;function u(h,m){let y;const v={...k.useContext(rg),...h,layoutId:BN(h)},{isStatic:_}=v,x=PN(h),S=l(h,_);if(!_&&typeof window<"u"){FN();const C=zN(v);y=C.MeasureLayout,x.visualElement=jN(e,S,v,o,C.ProjectionNode,s)}return T.jsxs(md.Provider,{value:x,children:[y&&x.visualElement?T.jsx(y,{visualElement:x.visualElement,...v}):null,RN(e,h,ON(S,x.visualElement,m),S,_,t,s)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=k.forwardRef(u);return f[NN]=e,f}function BN({layoutId:e}){const t=k.useContext(Dm).id;return t&&e!==void 0?t+"-"+e:e}function FN(e,t){k.useContext(M1).strict}function zN(e){const t=N1(),{drag:n,layout:a}=t;if(!n&&!a)return{};const o={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function VN(e,t){if(typeof Proxy>"u")return Lf;const n=new Map,a=(s,l)=>Lf(s,l,e,t),o=(s,l)=>a(s,l);return new Proxy(o,{get:(s,l)=>l==="create"?a:(n.has(l)||n.set(l,Lf(l,void 0,e,t)),n.get(l))})}const $N=(e,t)=>t.isSVG??og(e)?new b5(t):new f5(t,{allowProjection:e!==k.Fragment});class HN extends Zr{constructor(t){super(t),t.animationState||(t.animationState=P5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fd(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 WN=0;class GN extends Zr{constructor(){super(...arguments),this.id=WN++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;if(t&&a===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"){const u=Ci(this.node,s,l);if(u){const{transition:f,transitionEnd:h,...m}=u;for(const y in m)this.node.getValue(y)?.jump(m[y])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const KN={animation:{Feature:HN},exit:{Feature:GN}};function Rl(e){return{point:{x:e.pageX,y:e.pageY}}}const qN=e=>t=>Xm(t)&&e(t,Rl(t));function Js(e,t,n,a){return fl(e,t,qN(n),a)}const V1=({current:e})=>e?e.ownerDocument.defaultView:null,g_=(e,t)=>Math.abs(e-t);function YN(e,t){const n=g_(e.x,t.x),a=g_(e.y,t.y);return Math.sqrt(n**2+a**2)}const y_=new Set(["auto","scroll"]);class $1{constructor(t,n,{transformPagePoint:a,contextWindow:o=window,dragSnapToOrigin:s=!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=_=>{this.handleScroll(_.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=qc(this.lastRawMoveEventInfo,this.transformPagePoint));const _=If(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,S=YN(_.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!S)return;const{point:C}=_,{timestamp:L}=tn;this.history.push({...C,timestamp:L});const{onStart:M,onMove:E}=this.handlers;x||(M&&M(this.lastMoveEvent,_),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,_)},this.handlePointerMove=(_,x)=>{this.lastMoveEvent=_,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=qc(x,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(_,x)=>{this.end();const{onEnd:S,onSessionEnd:C,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const M=If(_.type==="pointercancel"?this.lastMoveEventInfo:qc(x,this.transformPagePoint),this.history);this.startEvent&&S&&S(_,M),C&&C(_,M)},!Xm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=l,this.contextWindow=o||window;const f=Rl(t),h=qc(f,this.transformPagePoint),{point:m}=h,{timestamp:y}=tn;this.history=[{...m,timestamp:y}];const{onSessionStart:v}=n;v&&v(t,If(h,this.history)),this.removeListeners=Tl(Js(this.contextWindow,"pointermove",this.handlePointerMove),Js(this.contextWindow,"pointerup",this.handlePointerUp),Js(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(y_.has(a.overflowX)||y_.has(a.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const a=t===window,o=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Kr(this.updatePoint)}}function qc(e,t){return t?{point:t(e.point)}:e}function v_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function If({point:e},t){return{point:e,delta:v_(e,H1(t)),offset:v_(e,ZN(t)),velocity:XN(t,.1)}}function ZN(e){return e[0]}function H1(e){return e[e.length-1]}function XN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const o=H1(e);for(;n>=0&&(a=e[n],!(o.timestamp-a.timestamp>Bn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&o.timestamp-a.timestamp>Bn(t)*2&&(a=e[1]);const s=Yn(o.timestamp-a.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-a.x)/s,y:(o.y-a.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function QN(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?Pt(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?Pt(n,e,a.max):Math.min(e,n)),e}function b_(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 JN(e,{top:t,left:n,bottom:a,right:o}){return{x:b_(e.x,n,o),y:b_(e.y,t,a)}}function k_(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 eO(e,t){return{x:k_(e.x,t.x),y:k_(e.y,t.y)}}function tO(e,t){let n=.5;const a=vn(e),o=vn(t);return o>a?n=ul(t.min,t.max-a,e.min):a>o&&(n=ul(e.min,e.max-o,t.min)),Oa(0,1,n)}function nO(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 Ip=.35;function aO(e=Ip){return e===!1?e=0:e===!0&&(e=Ip),{x:__(e,"left","right"),y:__(e,"top","bottom")}}function __(e,t,n){return{min:w_(e,t),max:w_(e,n)}}function w_(e,t){return typeof e=="number"?e:e[t]||0}const rO=new WeakMap;class iO{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=Ht(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=y=>{n&&this.snapToCursor(Rl(y).point),this.stopAnimation()},l=(y,v)=>{const{drag:_,dragPropagation:x,onDragStart:S}=this.getProps();if(_&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=I4(_),!this.openDragLock))return;this.latestPointerEvent=y,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),Ta(L=>{let M=this.getAxisMotionValue(L).get()||0;if(Da.test(M)){const{projection:E}=this.visualElement;if(E&&E.layout){const A=E.layout.layoutBox[L];A&&(M=vn(A)*(parseFloat(M)/100))}}this.originPoint[L]=M}),S&>.update(()=>S(y,v),!1,!0),Sp(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},u=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:_,dragDirectionLock:x,onDirectionLock:S,onDrag:C}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:L}=v;if(x&&this.currentDirection===null){this.currentDirection=sO(L),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",v.point,L),this.updateAxis("y",v.point,L),this.visualElement.render(),C&>.update(()=>C(y,v),!1,!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new $1(t,{onSessionStart:s,onStart:l,onMove:u,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:a,contextWindow:V1(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!a)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&>.postRender(()=>u(a,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,a){const{drag:o}=this.getProps();if(!a||!Yc(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(l=QN(l,this.constraints[t],this.elastic[t])),s.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,o=this.constraints;t&&wo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=JN(a.layoutBox,t):this.constraints=!1,this.elastic=aO(n),o!==this.constraints&&!wo(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&Ta(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=nO(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const a=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=s5(a,o.root,this.visualElement.getTransformPagePoint());let l=eO(o.layout.layoutBox,s);if(n){const u=n(r5(l));this.hasMutatedConstraints=!!u,u&&(l=u1(u))}return l}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),f=this.constraints||{},h=Ta(m=>{if(!Yc(m,n,this.currentDirection))return;let y=f&&f[m]||{};(l===!0||l===m)&&(y={min:0,max:0});const v=o?200:1e6,_=o?40:1e7,x={type:"inertia",velocity:a?t[m]:0,bounceStiffness:v,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...s,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(h).then(u)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return Sp(this.visualElement,t),a.start(Gm(t,a,0,n,this.visualElement,!1))}stopAnimation(){Ta(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),o=a[n];return o||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){Ta(n=>{const{drag:a}=this.getProps();if(!Yc(n,a,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:u}=o.layout.layoutBox[n],f=s.get()||0;s.set(t[n]-Pt(l,u,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!wo(n)||!a||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ta(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const f=u.get();o[l]=tO({min:f,max:f},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ta(l=>{if(!Yc(l,t,null))return;const u=this.getAxisMotionValue(l),{min:f,max:h}=this.constraints[l];u.set(Pt(f,h,o[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;rO.set(this.visualElement,this);const t=this.visualElement.current,n=Js(t,"pointerdown",h=>{const{drag:m,dragListener:y=!0}=this.getProps(),v=h.target,_=v!==t&&B4(v);m&&y&&!_&&this.start(h)});let a;const o=()=>{const{dragConstraints:h}=this.getProps();wo(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),a||(a=oO(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,l=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),gt.read(o);const u=fl(window,"resize",()=>this.scalePositionWithinConstraints()),f=s.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Ta(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=h[y].translate,v.set(v.get()+h[y].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),f&&f(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=Ip,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function x_(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function oO(e,t,n){const a=Rk(e,x_(n)),o=Rk(t,x_(n));return()=>{a(),o()}}function Yc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class lO extends Zr{constructor(t){super(t),this.removeGroupControls=Zn,this.removeListeners=Zn,this.controls=new iO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zn}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 Mf=e=>(t,n)=>{e&>.update(()=>e(t,n),!1,!0)};class cO extends Zr{constructor(){super(...arguments),this.removePointerDownListener=Zn}onPointerDown(t){this.session=new $1(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:V1(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:Mf(t),onStart:Mf(n),onMove:Mf(a),onEnd:(s,l)=>{delete this.session,o&>.postRender(()=>o(s,l))}}}mount(){this.removePointerDownListener=Js(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 Nf=!1;class uO extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),a&&a.register&&o&&a.register(s),Nf&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ku.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:o,isPresent:s}=this.props,{projection:l}=a;return l&&(l.isPresent=s,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),Nf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||gt.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(),Zm.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:o}=t;Nf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),a&&a.deregister&&a.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function W1(e){const[t,n]=L1(),a=k.useContext(Dm);return T.jsx(uO,{...e,layoutGroup:a,switchLayoutGroup:k.useContext(F1),isPresent:t,safeToRemove:n})}const dO={pan:{Feature:cO},drag:{Feature:lO,ProjectionNode:D1,MeasureLayout:W1}};function P_(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=a[o];s&>.postRender(()=>s(t,Rl(t)))}class hO extends Zr{mount(){const{current:t}=this.node;t&&(this.unmount=N4(t,(n,a)=>(P_(this.node,a,"Start"),o=>P_(this.node,o,"End"))))}unmount(){}}class fO extends Zr{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=Tl(fl(this.node.current,"focus",()=>this.onFocus()),fl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function S_(e,t,n){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=a[o];s&>.postRender(()=>s(t,Rl(t)))}class pO extends Zr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=z4(t,(o,s)=>(S_(this.node,s,"Start"),(l,{success:u})=>S_(this.node,l,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const Mp=new WeakMap,Of=new WeakMap,mO=e=>{const t=Mp.get(e.target);t&&t(e)},gO=e=>{e.forEach(mO)};function yO({root:e,...t}){const n=e||document;Of.has(n)||Of.set(n,{});const a=Of.get(n),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(gO,{root:e,...t})),a[o]}function vO(e,t,n){const a=yO(t);return Mp.set(e,n),a.observe(e),()=>{Mp.delete(e),a.unobserve(e)}}const bO={some:0,all:1};class kO extends Zr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:o="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:bO[o]},u=f=>{const{isIntersecting:h}=f;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),v=h?m:y;v&&v(f)};this.stopObserver=vO(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(_O(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function _O({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const wO={inView:{Feature:kO},tap:{Feature:pO},focus:{Feature:fO},hover:{Feature:hO}},xO={layout:{ProjectionNode:D1,MeasureLayout:W1}},PO={...KN,...wO,...dO,...xO},el=VN(PO,$N);function SO(){!tg.current&&s1();const[e]=k.useState(Hu.current);return e}function G1(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=G1(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function CO(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=G1(e))&&(a&&(a+=" "),a+=t);return a}const TO=(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},EO=(e,t)=>({classGroupId:e,validator:t}),K1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Yu="-",C_=[],AO="arbitrary..",RO=e=>{const t=LO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return DO(l);const u=l.split(Yu),f=u[0]===""&&u.length>1?1:0;return q1(u,f,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const f=a[l],h=n[l];return f?h?TO(h,f):f:h||C_}return n[l]||C_}}},q1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const h=q1(e,t+1,s);if(h)return h}const l=n.validators;if(l===null)return;const u=t===0?e.join(Yu):e.slice(t).join(Yu),f=l.length;for(let h=0;h<f;h++){const m=l[h];if(m.validator(u))return m.classGroupId}},DO=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?AO+a:void 0})(),LO=e=>{const{theme:t,classGroups:n}=e;return IO(n,t)},IO=(e,t)=>{const n=K1();for(const a in e){const o=e[a];sg(o,n,a,t)}return n},sg=(e,t,n,a)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];MO(l,t,n,a)}},MO=(e,t,n,a)=>{if(typeof e=="string"){NO(e,t,n);return}if(typeof e=="function"){OO(e,t,n,a);return}jO(e,t,n,a)},NO=(e,t,n)=>{const a=e===""?t:Y1(t,e);a.classGroupId=n},OO=(e,t,n,a)=>{if(UO(e)){sg(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(EO(n,e))},jO=(e,t,n,a)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[u,f]=o[l];sg(f,Y1(t,u),n,a)}},Y1=(e,t)=>{let n=e;const a=t.split(Yu),o=a.length;for(let s=0;s<o;s++){const l=a[s];let u=n.nextPart.get(l);u||(u=K1(),n.nextPart.set(l,u)),n=u}return n},UO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,BO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=a[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},Np="!",T_=":",FO=[],E_=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),zO=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const s=[];let l=0,u=0,f=0,h;const m=o.length;for(let S=0;S<m;S++){const C=o[S];if(l===0&&u===0){if(C===T_){s.push(o.slice(f,S)),f=S+1;continue}if(C==="/"){h=S;continue}}C==="["?l++:C==="]"?l--:C==="("?u++:C===")"&&u--}const y=s.length===0?o:o.slice(f);let v=y,_=!1;y.endsWith(Np)?(v=y.slice(0,-1),_=!0):y.startsWith(Np)&&(v=y.slice(1),_=!0);const x=h&&h>f?h-f:void 0;return E_(s,_,v,x)};if(t){const o=t+T_,s=a;a=l=>l.startsWith(o)?s(l.slice(o.length)):E_(FO,!1,l,void 0,!0)}if(n){const o=a;a=s=>n({className:s,parseClassName:o})}return a},VO=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],u=l[0]==="[",f=t.has(l);u||f?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(l)):o.push(l)}return o.length>0&&(o.sort(),a.push(...o)),a}},$O=e=>({cache:BO(e.cacheSize),parseClassName:zO(e),sortModifiers:VO(e),...RO(e)}),HO=/\s+/,WO=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],u=e.trim().split(HO);let f="";for(let h=u.length-1;h>=0;h-=1){const m=u[h],{isExternal:y,modifiers:v,hasImportantModifier:_,baseClassName:x,maybePostfixModifierPosition:S}=n(m);if(y){f=m+(f.length>0?" "+f:f);continue}let C=!!S,L=a(C?x.substring(0,S):x);if(!L){if(!C){f=m+(f.length>0?" "+f:f);continue}if(L=a(x),!L){f=m+(f.length>0?" "+f:f);continue}C=!1}const M=v.length===0?"":v.length===1?v[0]:s(v).join(":"),E=_?M+Np:M,A=E+L;if(l.indexOf(A)>-1)continue;l.push(A);const B=o(L,C);for(let z=0;z<B.length;++z){const H=B[z];l.push(E+H)}f=m+(f.length>0?" "+f:f)}return f},GO=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=Z1(n))&&(o&&(o+=" "),o+=a);return o},Z1=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=Z1(e[a]))&&(n&&(n+=" "),n+=t);return n},KO=(e,...t)=>{let n,a,o,s;const l=f=>{const h=t.reduce((m,y)=>y(m),e());return n=$O(h),a=n.cache.get,o=n.cache.set,s=u,u(f)},u=f=>{const h=a(f);if(h)return h;const m=WO(f,n);return o(f,m),m};return s=l,(...f)=>s(GO(...f))},qO=[],$t=e=>{const t=n=>n[e]||qO;return t.isThemeGetter=!0,t},X1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Q1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,YO=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ZO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XO=/\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$/,QO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,JO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,e6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ir=e=>YO.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Mr=e=>!!e&&Number.isInteger(Number(e)),jf=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),Ja=e=>ZO.test(e),J1=()=>!0,t6=e=>XO.test(e)&&!QO.test(e),lg=()=>!1,n6=e=>JO.test(e),a6=e=>e6.test(e),r6=e=>!Se(e)&&!Te(e),i6=e=>Xr(e,nP,lg),Se=e=>X1.test(e),yi=e=>Xr(e,aP,t6),A_=e=>Xr(e,f6,Xe),o6=e=>Xr(e,iP,J1),s6=e=>Xr(e,rP,lg),R_=e=>Xr(e,eP,lg),l6=e=>Xr(e,tP,a6),Zc=e=>Xr(e,oP,n6),Te=e=>Q1.test(e),Os=e=>Ui(e,aP),c6=e=>Ui(e,rP),D_=e=>Ui(e,eP),u6=e=>Ui(e,nP),d6=e=>Ui(e,tP),Xc=e=>Ui(e,oP,!0),h6=e=>Ui(e,iP,!0),Xr=(e,t,n)=>{const a=X1.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ui=(e,t,n=!1)=>{const a=Q1.exec(e);return a?a[1]?t(a[1]):n:!1},eP=e=>e==="position"||e==="percentage",tP=e=>e==="image"||e==="url",nP=e=>e==="length"||e==="size"||e==="bg-size",aP=e=>e==="length",f6=e=>e==="number",rP=e=>e==="family-name",iP=e=>e==="number"||e==="weight",oP=e=>e==="shadow",p6=()=>{const e=$t("color"),t=$t("font"),n=$t("text"),a=$t("font-weight"),o=$t("tracking"),s=$t("leading"),l=$t("breakpoint"),u=$t("container"),f=$t("spacing"),h=$t("radius"),m=$t("shadow"),y=$t("inset-shadow"),v=$t("text-shadow"),_=$t("drop-shadow"),x=$t("blur"),S=$t("perspective"),C=$t("aspect"),L=$t("ease"),M=$t("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...A(),Te,Se],z=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],P=()=>[Te,Se,f],Z=()=>[Ir,"full","auto",...P()],X=()=>[Mr,"none","subgrid",Te,Se],fe=()=>["auto",{span:["full",Mr,Te,Se]},Mr,Te,Se],he=()=>[Mr,"auto",Te,Se],Q=()=>["auto","min","max","fr",Te,Se],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...P()],se=()=>[Ir,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],F=()=>[Ir,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Y=()=>[Ir,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],V=()=>[e,Te,Se],I=()=>[...A(),D_,R_,{position:[Te,Se]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],me=()=>["auto","cover","contain",u6,i6,{size:[Te,Se]}],pe=()=>[jf,Os,yi],ye=()=>["","none","full",h,Te,Se],xe=()=>["",Xe,Os,yi],Fe=()=>["solid","dashed","dotted","double"],Ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],je=()=>[Xe,jf,D_,R_],Rt=()=>["","none",x,Te,Se],Rn=()=>["none",Xe,Te,Se],wn=()=>["none",Xe,Te,Se],pt=()=>[Xe,Te,Se],Xt=()=>[Ir,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ja],breakpoint:[Ja],color:[J1],container:[Ja],"drop-shadow":[Ja],ease:["in","out","in-out"],font:[r6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ja],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ja],shadow:[Ja],spacing:["px",Xe],text:[Ja],"text-shadow":[Ja],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ir,Se,Te,C]}],container:["container"],columns:[{columns:[Xe,Se,Te,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:B()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[Mr,"auto",Te,Se]}],basis:[{basis:[Ir,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,Ir,"auto","initial","none",Se]}],grow:[{grow:["",Xe,Te,Se]}],shrink:[{shrink:["",Xe,Te,Se]}],order:[{order:[Mr,"first","last","none",Te,Se]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mbs:[{mbs:ee()}],mbe:[{mbe:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:se()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[u,"screen",...se()]}],"min-w":[{"min-w":[u,"screen","none",...se()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...se()]}],h:[{h:["screen","lh",...se()]}],"min-h":[{"min-h":["screen","lh","none",...se()]}],"max-h":[{"max-h":["screen","lh",...se()]}],"font-size":[{text:["base",n,Os,yi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,h6,o6]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jf,Se]}],"font-family":[{font:[c6,s6,t]}],"font-features":[{"font-features":[Se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Te,Se]}],"line-clamp":[{"line-clamp":[Xe,"none",Te,A_]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",Te,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",Te,yi]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Xe,"auto",Te,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Se]}],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",Te,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:me()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mr,Te,Se],radial:["",Te,Se],conic:[Mr,Te,Se]},d6,l6]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:ye()}],"rounded-s":[{"rounded-s":ye()}],"rounded-e":[{"rounded-e":ye()}],"rounded-t":[{"rounded-t":ye()}],"rounded-r":[{"rounded-r":ye()}],"rounded-b":[{"rounded-b":ye()}],"rounded-l":[{"rounded-l":ye()}],"rounded-ss":[{"rounded-ss":ye()}],"rounded-se":[{"rounded-se":ye()}],"rounded-ee":[{"rounded-ee":ye()}],"rounded-es":[{"rounded-es":ye()}],"rounded-tl":[{"rounded-tl":ye()}],"rounded-tr":[{"rounded-tr":ye()}],"rounded-br":[{"rounded-br":ye()}],"rounded-bl":[{"rounded-bl":ye()}],"border-w":[{border:xe()}],"border-w-x":[{"border-x":xe()}],"border-w-y":[{"border-y":xe()}],"border-w-s":[{"border-s":xe()}],"border-w-e":[{"border-e":xe()}],"border-w-bs":[{"border-bs":xe()}],"border-w-be":[{"border-be":xe()}],"border-w-t":[{"border-t":xe()}],"border-w-r":[{"border-r":xe()}],"border-w-b":[{"border-b":xe()}],"border-w-l":[{"border-l":xe()}],"divide-x":[{"divide-x":xe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":xe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Fe(),"hidden","none"]}],"divide-style":[{divide:[...Fe(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-bs":[{"border-bs":V()}],"border-color-be":[{"border-be":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...Fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,Te,Se]}],"outline-w":[{outline:["",Xe,Os,yi]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",m,Xc,Zc]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",y,Xc,Zc]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Xe,yi]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":xe()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",v,Xc,Zc]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Xe,Te,Se]}],"mix-blend":[{"mix-blend":[...Ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ye()}],"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":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":je()}],"mask-image-linear-to-pos":[{"mask-linear-to":je()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":je()}],"mask-image-t-to-pos":[{"mask-t-to":je()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":je()}],"mask-image-r-to-pos":[{"mask-r-to":je()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":je()}],"mask-image-b-to-pos":[{"mask-b-to":je()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":je()}],"mask-image-l-to-pos":[{"mask-l-to":je()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":je()}],"mask-image-x-to-pos":[{"mask-x-to":je()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":je()}],"mask-image-y-to-pos":[{"mask-y-to":je()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[Te,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":je()}],"mask-image-radial-to-pos":[{"mask-radial-to":je()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":je()}],"mask-image-conic-to-pos":[{"mask-conic-to":je()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:me()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Se]}],filter:[{filter:["","none",Te,Se]}],blur:[{blur:Rt()}],brightness:[{brightness:[Xe,Te,Se]}],contrast:[{contrast:[Xe,Te,Se]}],"drop-shadow":[{"drop-shadow":["","none",_,Xc,Zc]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Xe,Te,Se]}],"hue-rotate":[{"hue-rotate":[Xe,Te,Se]}],invert:[{invert:["",Xe,Te,Se]}],saturate:[{saturate:[Xe,Te,Se]}],sepia:[{sepia:["",Xe,Te,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Se]}],"backdrop-blur":[{"backdrop-blur":Rt()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,Te,Se]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,Te,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,Te,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,Te,Se]}],"backdrop-invert":[{"backdrop-invert":["",Xe,Te,Se]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,Te,Se]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,Te,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,Te,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",Te,Se]}],ease:[{ease:["linear","initial",L,Te,Se]}],delay:[{delay:[Xe,Te,Se]}],animate:[{animate:["none",M,Te,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Te,Se]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:Rn()}],"rotate-x":[{"rotate-x":Rn()}],"rotate-y":[{"rotate-y":Rn()}],"rotate-z":[{"rotate-z":Rn()}],scale:[{scale:wn()}],"scale-x":[{"scale-x":wn()}],"scale-y":[{"scale-y":wn()}],"scale-z":[{"scale-z":wn()}],"scale-3d":["scale-3d"],skew:[{skew:pt()}],"skew-x":[{"skew-x":pt()}],"skew-y":[{"skew-y":pt()}],transform:[{transform:[Te,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Xt()}],"translate-x":[{"translate-x":Xt()}],"translate-y":[{"translate-y":Xt()}],"translate-z":[{"translate-z":Xt()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",Te,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,Se]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Xe,Os,yi,A_]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},m6=KO(p6);function wt(...e){return m6(CO(e))}const g6=T.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[T.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"}),T.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"}),T.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"}),T.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"})]}),y6=T.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:T.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"})}),v6={google:g6,github:y6},b6={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function k6(e){return b6[e]||String(e||"").replace(/-/g," ")}function _6({title:e,subtitle:t,className:n="",onSuccess:a,hideLogo:o=!1}){Cl();const{enabled:s,signedIn:l,refreshUser:u,signInWithPassword:f,signUp:h,signInWithOAuth:m,getPublicAuthConfig:y}=Vo(),[v,_]=k.useState("signin"),[x,S]=k.useState(""),[C,L]=k.useState(""),[M,E]=k.useState(""),[A,B]=k.useState(!1),[z,H]=k.useState(null),[P,Z]=k.useState(null),[X,fe]=k.useState(!1),[he,Q]=k.useState(!0),[J,te]=k.useState([]),[ee,se]=k.useState(8);k.useEffect(()=>{if(!s)return;let I=!0;return Q(!0),(async()=>{const{data:W,error:me}=await y();if(I){if(me||!W)te(["google","github"]);else{const pe=Array.isArray(W.oAuthProviders)?W.oAuthProviders:[],ye=Array.isArray(W.customOAuthProviders)?W.customOAuthProviders:[];te([...pe,...ye]),typeof W.passwordMinLength=="number"&&W.passwordMinLength>0&&se(W.passwordMinLength)}Q(!1)}})(),()=>{I=!1}},[s,y]),k.useEffect(()=>{l&&a&&a()},[l,a]);const F=k.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),Y=k.useCallback(async I=>{H(null),B(!0);try{const{error:W}=await m(I,F);W&&H(W.message||String(W))}finally{B(!1)}},[m,F]),V=k.useCallback(async I=>{I.preventDefault(),H(null),B(!0);try{if(v==="signup"){const{data:me,error:pe}=await h({email:x.trim(),password:C,name:M.trim()||void 0});if(pe){H(pe.message||String(pe));return}if(me?.requireEmailVerification){Z(Le("login.verify_email_pending")),_("signin");return}await u();return}const{error:W}=await f({email:x.trim(),password:C});if(W){H(W.message||String(W));return}await u()}finally{B(!1)}},[v,x,C,M,h,f,u]);return s?T.jsxs("div",{className:wt("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",n),children:[T.jsxs("div",{className:"text-center mb-6",children:[!o&&T.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[T.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),T.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white font-oai tracking-tight",children:Le("shared.app_name")})]}),T.jsx("h2",{className:wt("text-sm font-semibold text-oai-black dark:text-white tracking-tight mb-1",o&&"text-base font-bold md:text-lg"),children:e||Le("login_modal.subtitle")}),t&&T.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})]}),P&&T.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:P}),z&&T.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:z}),T.jsx("div",{className:"space-y-2.5 mb-5",children:he?T.jsxs("div",{className:"space-y-2.5",children:[T.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),T.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):J.map(I=>T.jsxs("button",{type:"button",disabled:A,onClick:()=>Y(I),className:wt("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:[v6[I]||null,Le("login.oauth.continue",{provider:k6(I)})]},I))}),X?T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"relative mb-5",children:[T.jsx("div",{className:"absolute inset-0 flex items-center",children:T.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),T.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:T.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Le("login_modal.divider_email")})})]}),T.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:[T.jsx("button",{type:"button",className:wt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",v==="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:()=>{_("signin"),H(null)},children:Le("login.tab.sign_in")}),T.jsx("button",{type:"button",className:wt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",v==="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:()=>{_("signup"),H(null)},children:Le("login.tab.sign_up")})]}),T.jsxs("form",{onSubmit:V,className:"space-y-3",children:[v==="signup"&&T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Le("login.field.name")}),T.jsx("input",{id:"card-name",type:"text",autoComplete:"name",value:M,onChange:I=>E(I.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:Le("login.field.name_placeholder")})]}),T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Le("login.field.email")}),T.jsx("input",{id:"card-email",type:"email",autoComplete:"email",required:!0,value:x,onChange:I=>S(I.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"})]}),T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Le("login.field.password")}),T.jsx("input",{id:"card-password",type:"password",autoComplete:v==="signup"?"new-password":"current-password",required:!0,minLength:v==="signup"?ee:void 0,value:C,onChange:I=>L(I.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"}),v==="signup"&&T.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Le("login.password_hint",{min:String(ee)})})]}),T.jsx("button",{type:"submit",disabled:A,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:Le(v==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"relative mb-5",children:[T.jsx("div",{className:"absolute inset-0 flex items-center",children:T.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),T.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:T.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Le("login.divider")})})]}),T.jsxs("button",{type:"button",onClick:()=>fe(!0),className:wt("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:[T.jsx(nI,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Le("login_modal.continue_email")]})]})]}):null}function w6(){const{isOpen:e,closeLoginModal:t}=rx(),{enabled:n}=Vo();return k.useEffect(()=>{if(!e)return;const a=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),n?T.jsx(I1,{children:e&&T.jsxs(el.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:[T.jsx(el.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),T.jsxs(el.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:[T.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:T.jsx(Rm,{className:"h-5 w-5"})}),T.jsx(_6,{onSuccess:t,className:"p-6 bg-transparent"})]})]})}):null}const x6={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},uU="https://tokentracker.statuspage.io/";function P6(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?x6:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||rr()).trim()}function dU(){return rr()}function S6(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 C6=300*1e3,T6=720*60*1e3;function cg(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function E6(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+T6<=t:!0}async function sP(e,t){const n=rr();if(!cg(n)||!e)return;const a=n.replace(/\/$/,""),o=wl(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};o&&(s.apikey=o);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:t})})}catch{}}async function A6(e){const t=rr();if(!cg(t)||!e)return null;const n=t.replace(/\/$/,""),a=wl(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(o.apikey=a);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:o,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:s})});if(!l.ok)return null;const u=await l.json().catch(()=>null),f=typeof u?.token=="string"?u.token:null,h=typeof u?.device_id=="string"?u.device_id:null;return!f||!h?null:{token:f,deviceId:h,issuedAt:typeof u?.created_at=="string"?u.created_at:new Date().toISOString()}}async function L_(e){const{deviceToken:t,insforgeBaseUrl:n}=e,a={deviceToken:t},o=n||rr();cg(o)&&(a.insforgeBaseUrl=o.trim());const s=await cd(),l=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...s},body:JSON.stringify(a)}),u=await l.json().catch(()=>({}));if(!l.ok){const f=typeof u.error=="string"?u.error:`HTTP ${l.status}`;throw new Error(f)}return u}async function I_(e){const t=await e();if(!t)return null;const n=bw();if(n&&!E6(n))return n;const a=await A6(t);return a?(OR(a),a):null}async function lP(e){let t=await e();if(!t)return null;let n=await I_(async()=>t);if(!n)return t;try{return await L_({deviceToken:n.token,insforgeBaseUrl:rr()}),t}catch(a){if(!bw()||(kw(),t=await e(),!t)||(n=await I_(async()=>t),!n))throw a;return await L_({deviceToken:n.token,insforgeBaseUrl:rr()}),t}}async function R6(e){const t=jR();if(Date.now()-t<C6)return;const n=await lP(e);n&&(_w(Date.now()),await sP(n,"cloud-sync-auto"))}async function hU(e){const t=await lP(e);t&&(_w(Date.now()),await sP(t,"cloud-sync-now"))}function D6(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function L6(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||D6(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function I6(){const e=Jn(),t=Vo(),n=k.useRef(!1);k.useEffect(()=>{if(!MR()||!L6(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!NR())return;let a=!1;const o=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await R6(()=>t.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(o)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function M6(){const e=k.useContext(nx);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function N6({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function O6(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 j6(e){return e?Em()?`/api/avatar-proxy?url=${encodeURIComponent(e)}`:e:null}function Qc(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 M_({className:e,variant:t="header",collapsed:n=!1,onAfterAction:a}){Cl();const o=t==="sidebar",{enabled:s,loading:l,signedIn:u,user:f,displayName:h}=Vo(),{openLoginModal:m}=rx(),y=kl(),v=k.useMemo(()=>O6(f),[f]),_=k.useMemo(()=>j6(v),[v]),[x,S]=al.useState(!1);if(al.useEffect(()=>{S(!1)},[_]),!s)return null;if(l)return T.jsx("div",{className:wt("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",e),"aria-hidden":!0});if(!u)return o?T.jsxs("button",{type:"button",onClick:()=>{m(),a?.()},className:wt("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":Le("header.auth.sign_in_aria"),title:n?Le("header.auth.sign_in_aria"):void 0,children:[T.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:T.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&T.jsx("span",{className:"truncate flex-1 text-left",children:Le("header.auth.sign_in_aria")})]}):T.jsx("button",{type:"button",onClick:m,className:wt("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":Le("header.auth.sign_in_aria"),children:Le("header.auth.sign_in_aria")});const C=()=>{y("/settings"),a?.()};return T.jsx("div",{className:wt(o?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:T.jsxs("button",{type:"button",onClick:C,className:wt(o?wt("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":Le("header.auth.open_settings"),title:o&&n?h:void 0,children:[o?T.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:_&&!x?T.jsx("img",{src:_,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)}):Qc(h)==="?"?T.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:T.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:T.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"})})}):T.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:Qc(h)})}):_&&!x?T.jsx("img",{src:_,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)}):Qc(h)==="?"?T.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:T.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:T.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"})})}):T.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:Qc(h)}),o?!n&&T.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:h}):T.jsx("span",{className:"hidden sm:inline truncate text-sm font-medium text-oai-gray-900 dark:text-oai-gray-200 max-w-[120px]",children:h})]})})}const Op="tt.sidebarCollapsed";function cP(){return[{id:"general",label:Le("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:GL,label:Le("nav.usage")},{id:"limits",to:"/limits",icon:ZL,label:Le("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:kI,label:Le("nav.leaderboard")}]},{id:"tools",label:Le("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:eI,label:Le("nav.widgets")},{id:"skills",to:"/skills",icon:cI,label:Le("nav.skills")},{id:"ip-check",to:"/ip-check",icon:QL,label:Le("nav.ip_check")}]},{id:"account",label:Le("nav.group.account"),items:[{id:"settings",to:"/settings",icon:mI,label:Le("nav.settings")}]}]}function U6(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Op)==="1"}catch{return!1}}function B6(){const[e,t]=k.useState(U6),n=k.useCallback(()=>{t(a=>{const o=!a;try{typeof window<"u"&&window.localStorage.setItem(Op,o?"1":"0")}catch{}return o})},[]);return k.useEffect(()=>{if(typeof window>"u")return;const a=o=>{o.key===Op&&t(o.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function F6(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function z6({label:e,collapsed:t,first:n}){return t?n?null:T.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):T.jsx("div",{className:wt("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 V6({item:e,collapsed:t,active:n,onClick:a}){const o=e.icon;return T.jsxs(ad,{to:e.to,onClick:a,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:wt("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:[T.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:T.jsx(o,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&T.jsx("span",{className:"truncate",children:e.label})]})}function $6({as:e="button",title:t,onClick:n,href:a,children:o,className:s,...l}){const u=wt("flex h-10 w-10 items-center justify-center rounded-lg text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",s);return e==="a"?T.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...l,children:o}):T.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...l,children:o})}function H6({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,a]=k.useState(null);return k.useEffect(()=>{if(typeof window>"u")return;const o=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;N6({prefersReducedMotion:o,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&a(s.stargazers_count)}).catch(()=>{})},[e]),T.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:wt("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:[T.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:T.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"})}),T.jsx("span",{children:"Star"}),n!==null&&T.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const W6=[{value:"light",label:"Light",Icon:tx},{value:"dark",label:"Dark",Icon:ex},{value:"system",label:"System",Icon:oI}];function G6({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[o,s]=k.useState(!1),l=k.useRef(null),u=t==="dark"?ex:tx;return k.useEffect(()=>{if(!o)return;const f=m=>{l.current&&!l.current.contains(m.target)&&s(!1)},h=m=>{m.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",f),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",f),document.removeEventListener("keydown",h)}},[o]),T.jsxs("div",{ref:l,className:"relative",children:[T.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":o,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(f=>!f),className:wt("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:T.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),o&&T.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:W6.map(({value:f,label:h,Icon:m})=>{const y=e===f;return T.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(f),s(!1)},className:wt("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",y?"text-oai-black dark:text-white bg-oai-gray-100 dark:bg-oai-gray-800":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 hover:text-oai-black dark:hover:text-white"),children:[T.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),T.jsx("span",{children:h})]},f)})})]})}function uP({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:o,glassChrome:s=!1}){const u=Jn()?.pathname||"/",{theme:f,resolvedTheme:h,setTheme:m}=M6(),{resolvedLocale:y}=Cl(),v=k.useMemo(()=>cP(),[y]);return T.jsxs(T.Fragment,{children:[T.jsx("div",{className:wt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:a?T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"flex-1 min-w-0",children:T.jsx(M_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),T.jsx("button",{type:"button",onClick:o,"aria-label":Le("nav.close_menu"),title:Le("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:T.jsx(Rm,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):T.jsx(M_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),T.jsx("nav",{"aria-label":Le("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:v.map((_,x)=>T.jsxs("div",{className:"flex flex-col",children:[T.jsx(z6,{label:_.label,collapsed:e,first:x===0}),T.jsx("div",{className:"flex flex-col gap-0.5",children:_.items.map(S=>T.jsx(V6,{item:S,collapsed:e,active:F6(u,S.to),onClick:n},S.id))})]},_.id))}),T.jsxs("div",{className:wt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[T.jsx(G6,{theme:f,resolvedTheme:h,onSetTheme:m,glassChrome:s}),T.jsx("div",{className:"flex items-center gap-1.5",children:!e&&T.jsx(H6,{glassChrome:s})})]})]})}function K6({collapsed:e,onToggleCollapsed:t}){const n=k.useMemo(()=>typeof window>"u"?!1:pa()||Em(),[]);return T.jsx("aside",{"aria-label":Le("nav.aside_label"),className:wt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:T.jsx(uP,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function q6({open:e,onClose:t}){return k.useEffect(()=>{if(!e)return;const n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),k.useEffect(()=>{if(!e)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e]),e?T.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[T.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),T.jsx("aside",{"aria-label":Le("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:T.jsx(uP,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function Y6({onOpenDrawer:e}){return T.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:[T.jsx($6,{title:Le("nav.menu"),onClick:e,children:T.jsx(rI,{className:"h-5 w-5","aria-hidden":!0})}),T.jsxs(ad,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[T.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),T.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),T.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function Z6({children:e}){const{collapsed:t,toggle:n}=B6(),[a,o]=k.useState(!1),s=k.useCallback(()=>o(!0),[]),l=k.useCallback(()=>o(!1),[]),u=k.useMemo(()=>typeof window>"u"?!1:pa()||Em(),[]);return T.jsxs("div",{className:wt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",u?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[u&&T.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),T.jsxs("div",{className:"flex-1 min-h-0 flex",children:[T.jsx(K6,{collapsed:t,onToggleCollapsed:n}),T.jsx(q6,{open:a,onClose:l}),T.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:T.jsxs("div",{className:wt("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:[T.jsx(Y6,{onOpenDrawer:s}),T.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}function X6({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 Q6({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:T.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 J6({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 ej({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 tj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 nj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 aj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function rj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:[T.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"}),T.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 ij({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 oj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 60",fill:"none",className:t,"aria-hidden":"true",children:[T.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"}),T.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:T.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),T.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:T.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function sj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:T.jsx("path",{d:"M7 2h10a5 5 0 015 5v10a5 5 0 01-5 5H7a5 5 0 01-5-5V7a5 5 0 015-5zm0 4.5v11h2.35v-4.55h5.3V17.5H17v-11h-2.35v4.1h-5.3V6.5H7z"})})}function lj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:t,children:T.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 cj({size:e=16,className:t=""}){return T.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:T.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:T.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 uj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[T.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),T.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),T.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),T.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),T.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),T.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function dj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[T.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),T.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),T.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}function hj({size:e=16,className:t=""}){return T.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:[T.jsx("path",{d:"M9 3v2"}),T.jsx("path",{d:"M15 3v2"}),T.jsx("rect",{x:"4",y:"6",width:"16",height:"13",rx:"3"}),T.jsx("circle",{cx:"9",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),T.jsx("circle",{cx:"15",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),T.jsx("path",{d:"M9 16h6"})]})}const fj={CLAUDE:X6,CODEBUDDY:oj,CODEX:Q6,COPILOT:ij,CRAFT:cj,CURSOR:J6,DROID:hj,GEMINI:ej,GITHUB:lj,GROK:tj,HERMES:sj,KIMI:rj,KIRO:nj,OPENCODE:aj,OMP:uj,PI:dj},pj={ANTIGRAVITY:"/brand-logos/antigravity.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",GEMINI:"/brand-logos/gemini.svg",HERMES:"/brand-logos/hermes.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"};function mj({size:e=16,className:t=""}){return T.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:T.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function gj({provider:e,size:t=16,color:n,className:a=""}){const o=e?.toUpperCase?.()||"",s=pj[o];if(s)return T.jsx("img",{src:s,alt:"",width:t,height:t,className:a,style:{width:t,height:t,objectFit:"contain"},"aria-hidden":!0});const l=fj[o];return l?T.jsx(l,{size:t,className:a}):T.jsx(mj,{size:t,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${a}`})}const dP="tokentracker-skills";async function Bi(e){const t=new URL(`/functions/${dP}`,window.location.origin);if(e)for(const[o,s]of Object.entries(e))s!=null&&s!==""&&t.searchParams.set(o,String(s));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 Qr(e){const t=await cd(),n=await fetch(`/functions/${dP}`,{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 yj(){return Bi({mode:"installed"})}function fU(e={}){return Bi({mode:"discover",...e.force?{force:1}:{}})}function pU(e,t=0,n=20){return Bi({mode:"search",q:e,offset:t,limit:n})}function mU(){return Bi({mode:"repos"})}function gU(e,t){return Qr({action:"install",skill:e,targets:t})}function yU(e){return Qr({action:"uninstall",id:e})}function vU(e){return Qr({action:"restore",id:e})}function bU(e,t){return Qr({action:"set_targets",id:e,targets:t})}function kU(e,t){return Qr({action:"import_local",directory:e,targets:t})}function _U(e,t){return Qr({action:"delete_local",directory:e,targets:t||[]})}function wU(e){return Qr({action:"add_repo",repo:e})}function xU(e,t){return Qr({action:"remove_repo",owner:e,name:t})}function PU(e={}){return Bi({mode:"popular",...e.force?{force:1}:{}})}function SU(e={}){return Bi({mode:"updates",...e.force?{force:1}:{}})}function CU(e={}){return Bi({mode:"skill_usage",...e.force?{force:1}:{}})}const vj=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function bj(){const e=kl(),t=SO(),[n,a]=k.useState(!1),[o,s]=k.useState(""),[l,u]=k.useState(0),[f,h]=k.useState([]),m=k.useRef(null),y=k.useRef(null);k.useEffect(()=>{const E=A=>{(A.metaKey||A.ctrlKey)&&(A.key==="k"||A.key==="K")&&(A.preventDefault(),a(z=>!z))};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]),k.useEffect(()=>{if(!n)return;s(""),u(0);const E=requestAnimationFrame(()=>m.current?.focus());return vj&&!f.length&&yj().then(A=>h(A?.skills||[])).catch(()=>h([])),()=>cancelAnimationFrame(E)},[n,f.length]);const v=k.useMemo(()=>{const E=cP().flatMap(B=>B.items.map(z=>({kind:"page",id:`page:${z.id}`,label:z.label,sub:Le("cmdk.group.pages"),Icon:z.icon,run:()=>e(z.to)}))),A=(f||[]).map(B=>({kind:"skill",id:`skill:${B.id||B.directory}`,label:B.name||B.directory,sub:B.repoOwner&&B.repoName?`${B.repoOwner}/${B.repoName}`:Le("cmdk.group.skills"),provider:(B.targets||[])[0]||"claude",run:()=>e(`/skills?skill=${encodeURIComponent(B.directory||B.id)}`)}));return[...E,...A]},[e,f]),_=k.useMemo(()=>{const E=o.trim().toLowerCase();return E?v.filter(A=>A.label.toLowerCase().includes(E)||String(A.sub||"").toLowerCase().includes(E)):v},[v,o]);k.useEffect(()=>{l>=_.length&&u(_.length?_.length-1:0)},[l,_.length]),k.useEffect(()=>{if(!n)return;y.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,n]);const x=k.useCallback(()=>a(!1),[]),S=k.useCallback(E=>{E&&(x(),E.run())},[x]),C=E=>{E.key==="ArrowDown"?(E.preventDefault(),u(A=>Math.min(A+1,Math.max(0,_.length-1)))):E.key==="ArrowUp"?(E.preventDefault(),u(A=>Math.max(A-1,0))):E.key==="Enter"?(E.preventDefault(),S(_[l])):E.key==="Escape"&&(E.preventDefault(),x())},L={duration:t?0:.12},M=t?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return T.jsx(I1,{children:n?T.jsxs(el.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:[T.jsx("button",{type:"button","aria-label":Le("cmdk.close"),onClick:x,className:"absolute inset-0 cursor-default bg-oai-black/40"}),T.jsxs(el.div,{role:"dialog","aria-modal":"true","aria-label":Le("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:M,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:[T.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[T.jsx(fI,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),T.jsx("input",{ref:m,type:"text",value:o,onChange:E=>{s(E.target.value),u(0)},onKeyDown:C,"aria-label":Le("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":_[l]?`cmdk-opt-${l}`:void 0,role:"combobox","aria-expanded":"true",placeholder:Le("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"})]}),T.jsx("div",{ref:y,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:_.length===0?T.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:Le("cmdk.empty")}):_.map((E,A)=>{const B=A===l;return T.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${A}`,"data-cmdk-index":A,"aria-selected":B,onMouseMove:()=>u(A),onClick:()=>S(E),className:wt("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",B?"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:[T.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"?T.jsx(gj,{provider:E.provider,size:16}):T.jsx(E.Icon,{className:"h-4 w-4","aria-hidden":!0})}),T.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:E.label}),T.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:E.sub}),B?T.jsx(qL,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},E.id)})})]})]}):null})}function gd(){return typeof window<"u"}function ug(e){return dg(e)?(e.nodeName||"").toLowerCase():"#document"}function qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kj(e){var t;return(t=(dg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dg(e){return gd()?e instanceof Node||e instanceof qr(e).Node:!1}function hP(e){return gd()?e instanceof Element||e instanceof qr(e).Element:!1}function yd(e){return gd()?e instanceof HTMLElement||e instanceof qr(e).HTMLElement:!1}function jp(e){return!gd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qr(e).ShadowRoot}function fP(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=mP(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&o!=="inline"&&o!=="contents"}function TU(e){return/^(table|td|th)$/.test(ug(e))}function _j(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const wj=/transform|translate|scale|rotate|perspective|filter/,xj=/paint|layout|strict|content/,vi=e=>!!e&&e!=="none";let Uf;function Pj(e){const t=hP(e)?mP(e):e;return vi(t.transform)||vi(t.translate)||vi(t.scale)||vi(t.rotate)||vi(t.perspective)||!Sj()&&(vi(t.backdropFilter)||vi(t.filter))||wj.test(t.willChange||"")||xj.test(t.contain||"")}function EU(e){let t=Up(e);for(;yd(t)&&!pP(t);){if(Pj(t))return t;if(_j(t))return null;t=Up(t)}return null}function Sj(){return Uf==null&&(Uf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Uf}function pP(e){return/^(html|body|#document)$/.test(ug(e))}function mP(e){return qr(e).getComputedStyle(e)}function AU(e){return hP(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Up(e){if(ug(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jp(e)&&e.host||kj(e);return jp(t)?t.host:t}function gP(e){const t=Up(e);return pP(t)?e.ownerDocument?e.ownerDocument.body:e.body:yd(t)&&fP(t)?t:gP(t)}function N_(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=gP(e),s=o===((a=e.ownerDocument)==null?void 0:a.body),l=qr(o);if(s){const u=Cj(l);return t.concat(l,l.visualViewport||[],fP(o)?o:[],u&&n?N_(u):[])}else return t.concat(o,N_(o,[],n))}function Cj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Eo(e){return e?.ownerDocument||document}const O_={};function Dl(e,t){const n=k.useRef(O_);return n.current===O_&&(n.current=e(t)),n}const Bf=qp[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Tj=Bf&&Bf!==k.useLayoutEffect?Bf:e=>e();function An(e){const t=Dl(Ej).current;return t.next=e,Tj(t.effect),t.trampoline}function Ej(){const e={next:void 0,callback:Aj,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Aj(){}let j_=0;function yP(e){return j_+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${j_}`}const Rj=[];function vP(e){k.useEffect(e,Rj)}const js=0;class pl{static create(){return new pl}currentId=js;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=js,n()},t)}isStarted(){return this.currentId!==js}clear=()=>{this.currentId!==js&&(clearTimeout(this.currentId),this.currentId=js)};disposeEffect=()=>this.clear}function RU(){const e=Dl(pl.create).current;return vP(e.disposeEffect),e}const Go=typeof navigator<"u",Ff=Ij(),bP=Nj(),kP=Mj(),DU=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),LU=Ff.platform==="MacIntel"&&Ff.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Ff.platform),Dj=Go&&/apple/i.test(navigator.vendor),IU=Go&&/android/i.test(bP)||/android/i.test(kP);Go&&bP.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Lj=kP.includes("jsdom/");function Ij(){if(!Go)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 Mj(){if(!Go)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Nj(){if(!Go)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const U_="data-base-ui-focusable",MU="active",NU="selected",Oj="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",OU="ArrowLeft",jU="ArrowRight",UU="ArrowUp",BU="ArrowDown";function ml(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ti(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&jp(n)){let a=t;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function Bp(e){return"composedPath"in e?e.composedPath()[0]:e.target}function FU(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 zU(e){return e.matches("html,body")}function vd(e){return e?.ownerDocument||document}function jj(e){return yd(e)&&e.matches(Oj)}function VU(e){return e?e.getAttribute("role")==="combobox"&&jj(e):!1}function Fp(e){if(!e||Lj)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function $U(e){return e?e.hasAttribute(U_)?e:e.querySelector(`[${U_}]`)||e:null}function Ll(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(a=>n.searchParams.append("args[]",a)),`Base UI error #${e}; visit ${n} for the full message.`}var Uj=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Zu=Uj.join(","),_P=typeof Element>"u",Bo=_P?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xu=!_P&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Qu=function(t,n){var a;n===void 0&&(n=!0);var o=t==null||(a=t.getAttribute)===null||a===void 0?void 0:a.call(t,"inert"),s=o===""||o==="true",l=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Qu(t.parentNode));return l},Bj=function(t){var n,a=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return a===""||a==="true"},wP=function(t,n,a){if(Qu(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Zu));return n&&Bo.call(t,Zu)&&o.unshift(t),o=o.filter(a),o},Ju=function(t,n,a){for(var o=[],s=Array.from(t);s.length;){var l=s.shift();if(!Qu(l,!1))if(l.tagName==="SLOT"){var u=l.assignedElements(),f=u.length?u:l.children,h=Ju(f,!0,a);a.flatten?o.push.apply(o,h):o.push({scopeParent:l,candidates:h})}else{var m=Bo.call(l,Zu);m&&a.filter(l)&&(n||!t.includes(l))&&o.push(l);var y=l.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(l),v=!Qu(y,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(l));if(y&&v){var _=Ju(y===!0?l.children:y.children,!0,a);a.flatten?o.push.apply(o,_):o.push({scopeParent:l,candidates:_})}else s.unshift.apply(s,l.children)}}return o},xP=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},PP=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Bj(t))&&!xP(t)?0:t.tabIndex},Fj=function(t,n){var a=PP(t);return a<0&&n&&!xP(t)?0:a},zj=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},SP=function(t){return t.tagName==="INPUT"},Vj=function(t){return SP(t)&&t.type==="hidden"},$j=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(a){return a.tagName==="SUMMARY"});return n},Hj=function(t,n){for(var a=0;a<t.length;a++)if(t[a].checked&&t[a].form===n)return t[a]},Wj=function(t){if(!t.name)return!0;var n=t.form||Xu(t),a=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=a(window.CSS.escape(t.name));else try{o=a(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var s=Hj(o,t.form);return!s||s===t},Gj=function(t){return SP(t)&&t.type==="radio"},Kj=function(t){return Gj(t)&&!Wj(t)},qj=function(t){var n,a=t&&Xu(t),o=(n=a)===null||n===void 0?void 0:n.host,s=!1;if(a&&a!==t){var l,u,f;for(s=!!((l=o)!==null&&l!==void 0&&(u=l.ownerDocument)!==null&&u!==void 0&&u.contains(o)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!s&&o;){var h,m,y;a=Xu(o),o=(h=a)===null||h===void 0?void 0:h.host,s=!!((m=o)!==null&&m!==void 0&&(y=m.ownerDocument)!==null&&y!==void 0&&y.contains(o))}}return s},B_=function(t){var n=t.getBoundingClientRect(),a=n.width,o=n.height;return a===0&&o===0},Yj=function(t,n){var a=n.displayCheck,o=n.getShadowRoot;if(a==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var l=Bo.call(t,"details>summary:first-of-type"),u=l?t.parentElement:t;if(Bo.call(u,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof o=="function"){for(var f=t;t;){var h=t.parentElement,m=Xu(t);if(h&&!h.shadowRoot&&o(h)===!0)return B_(t);t.assignedSlot?t=t.assignedSlot:!h&&m!==t.ownerDocument?t=m.host:t=h}t=f}if(qj(t))return!t.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return B_(t);return!1},Zj=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var a=0;a<n.children.length;a++){var o=n.children.item(a);if(o.tagName==="LEGEND")return Bo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},zp=function(t,n){return!(n.disabled||Vj(n)||Yj(n,t)||$j(n)||Zj(n))},Vp=function(t,n){return!(Kj(n)||PP(n)<0||!zp(t,n))},Xj=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},CP=function(t){var n=[],a=[];return t.forEach(function(o,s){var l=!!o.scopeParent,u=l?o.scopeParent:o,f=Fj(u,l),h=l?CP(o.candidates):u;f===0?l?n.push.apply(n,h):n.push(u):a.push({documentOrder:s,tabIndex:f,item:o,isScope:l,content:h})}),a.sort(zj).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},hg=function(t,n){n=n||{};var a;return n.getShadowRoot?a=Ju([t],n.includeContainer,{filter:Vp.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Xj}):a=wP(t,n.includeContainer,Vp.bind(null,n)),CP(a)},HU=function(t,n){n=n||{};var a;return n.getShadowRoot?a=Ju([t],n.includeContainer,{filter:zp.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):a=wP(t,n.includeContainer,zp.bind(null,n)),a},WU=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Bo.call(t,Zu)===!1?!1:Vp(n,t)};const fg=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function TP(e,t){const n=hg(e,fg()),a=n.length;if(a===0)return;const o=ml(vd(e)),s=n.indexOf(o),l=s===-1?t===1?0:a-1:s+t;return n[l]}function Qj(e){return TP(vd(e).body,1)||e}function Jj(e){return TP(vd(e).body,-1)||e}function EP(e,t){if(!e)return null;const n=hg(vd(e).body,fg()),a=n.length;if(a===0)return null;const o=n.indexOf(e);if(o===-1)return null;const s=(o+t+a)%a;return n[s]}function GU(e){return EP(e,1)}function KU(e){return EP(e,-1)}function zf(e,t){const n=t||e.currentTarget,a=e.relatedTarget;return!a||!Ti(n,a)}function e8(e){hg(e,fg()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function F_(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const a=n.dataset.tabindex;delete n.dataset.tabindex,a?n.setAttribute("tabindex",a):n.removeAttribute("tabindex")})}const pg=k.createContext(void 0);function mg(){const e=k.useContext(pg);if(!e)throw new Error(Ll(73));return e}function Vf(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 t8=function(t){const{children:n,timeout:a=5e3,limit:o=3,toastManager:s}=t,[l,u]=k.useState([]),[f,h]=k.useState(!1),[m,y]=k.useState(!1),[v,_]=k.useState(null);l.length===0&&(f&&h(!1),m&&y(!1));const x=f||m,S=k.useRef(new Map),C=k.useRef(null),L=k.useRef(!0),M=k.useRef(!1);function E(Q){const J=ml(Eo(C.current));if(!C.current||!Ti(C.current,J)||!Fp(J))return;const te=l.findIndex(F=>F.id===Q);let ee=null,se=te+1;for(;se<l.length;){if(l[se].transitionStatus!=="ending"){ee=l[se];break}se+=1}if(!ee)for(se=te-1;se>=0;){if(l[se].transitionStatus!=="ending"){ee=l[se];break}se-=1}ee?ee.ref?.current?.focus():v?.focus({preventScroll:!0})}const A=An(()=>{M.current||(M.current=!0,S.current.forEach(Q=>{if(Q.timeout){Q.timeout.clear();const J=Date.now()-Q.start,te=Q.delay-J;Q.remaining=te>0?te:0}}))}),B=An(()=>{M.current&&(M.current=!1,S.current.forEach((Q,J)=>{Q.remaining=Q.remaining>0?Q.remaining:Q.delay,Q.timeout??=pl.create(),Q.timeout.start(Q.remaining,()=>{S.current.delete(J),Q.callback()}),Q.start=Date.now()}))}),z=An(Q=>{u(ee=>{const se=ee.map(Y=>Y.id===Q?{...Y,transitionStatus:"ending",height:0}:Y),F=se.filter(Y=>Y.transitionStatus!=="ending");return se.map(Y=>{if(Y.transitionStatus==="ending")return Y;const V=F.indexOf(Y)>=o;return{...Y,limited:V}})});const J=S.current.get(Q);J&&J.timeout&&(J.timeout.clear(),S.current.delete(Q)),l.find(ee=>ee.id===Q)?.onClose?.(),E(Q),l.length===1&&(h(!1),y(!1))}),H=An(Q=>{u(te=>te.filter(ee=>ee.id!==Q)),l.find(te=>te.id===Q)?.onRemove?.()}),P=An((Q,J,te)=>{const ee=Date.now(),se=L.current&&!f&&!m,F=se?pl.create():void 0;F?.start(J,()=>{S.current.delete(Q),te()}),S.current.set(Q,{timeout:F,start:se?ee:0,delay:J,remaining:J,callback:te})}),Z=An(Q=>{const J=Q.id||yP("toast"),te={...Q,id:J,transitionStatus:"starting"};u(se=>{const F=[te,...se],Y=F.filter(V=>V.transitionStatus!=="ending");if(Y.length>o){const V=Y.length-o,I=Y.slice(-V);return F.map(W=>I.some(me=>me.id===W.id)?{...W,limited:!0}:{...W,limited:!1})}return F.map(V=>({...V,limited:!1}))});const ee=te.timeout??a;return te.type!=="loading"&&ee>0&&P(J,ee,()=>z(J)),(f||m||!L.current)&&A(),J}),X=An((Q,J)=>{const te=l.find(pe=>pe.id===Q)??null,ee=te?{...te,...J}:null;if(Ni.flushSync(()=>{u(pe=>pe.map(ye=>ye.id===Q?{...ye,...J}:ye))}),!ee)return;const se=ee.timeout??a,F=te?.timeout??a,Y=Object.hasOwn(J,"timeout"),V=ee.transitionStatus!=="ending"&&ee.type!=="loading"&&se>0,I=S.current.has(Q),W=F!==se,me=te?.type==="loading";if(!V&&I){S.current.get(Q)?.timeout?.clear(),S.current.delete(Q);return}if(V&&(!I||W||Y||me)){const pe=S.current.get(Q);pe&&(pe.timeout?.clear(),S.current.delete(Q)),P(Q,se,()=>z(Q)),(f||m||!L.current)&&A()}}),fe=An((Q,J)=>{const te=Vf(J.loading),ee=Z({...te,type:"loading"}),se=Q.then(F=>{const Y=Vf(J.success,F);return X(ee,{...Y,type:"success",timeout:Y.timeout}),F}).catch(F=>{const Y=Vf(J.error,F);return X(ee,{...Y,type:"error",timeout:Y.timeout}),Promise.reject(F)});return{}.hasOwnProperty.call(J,"setPromise")&&J.setPromise(se),se});k.useEffect(function(){return s?s[" subscribe"](({action:te,options:ee})=>{const se=ee.id;te==="promise"&&ee.promise?fe(ee.promise,ee):te==="update"&&se?X(se,ee):te==="close"&&se?z(se):Z(ee)}):void 0},[Z,X,P,a,s,fe,z]);const he=k.useMemo(()=>({toasts:l,setToasts:u,hovering:f,setHovering:h,focused:m,setFocused:y,expanded:x,add:Z,close:z,remove:H,update:X,promise:fe,pauseTimers:A,resumeTimers:B,prevFocusElement:v,setPrevFocusElement:_,viewportRef:C,scheduleTimer:P,windowFocusedRef:L}),[Z,z,m,f,x,A,v,fe,H,B,P,l,X]);return T.jsx(pg.Provider,{value:he,children:n})},AP={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},RP={...AP,position:"fixed",top:0,left:0},qU={...AP,position:"absolute"},n8=()=>{},Il=typeof document<"u"?k.useLayoutEffect:n8,tl=k.forwardRef(function(t,n){const[a,o]=k.useState();Il(()=>{Dj&&o("button")},[]);const s={tabIndex:0,role:a};return T.jsx("span",{...t,ref:n,style:RP,"aria-hidden":a?void 0:!0,...s,"data-base-ui-focus-guard":""})}),a8=k.createContext(void 0);function z_(e,t,n,a){const o=Dl(DP).current;return i8(o,e,t,n,a)&&LP(o,[e,t,n,a]),o.callback}function r8(e){const t=Dl(DP).current;return o8(t,e)&&LP(t,e),t.callback}function DP(){return{callback:null,cleanup:null,refs:[]}}function i8(e,t,n,a,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==a||e.refs[3]!==o}function o8(e,t){return e.refs.length!==t.length||e.refs.some((n,a)=>n!==t[a])}function LP(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 o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(a[o]=l);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=a[o];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}const s8=parseInt(k.version,10);function IP(e){return s8>=e}function V_(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return(IP(19)?n?.ref:t.ref)??null}function $p(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function l8(e,t){const n={};for(const a in e){const o=e[a];if(t?.hasOwnProperty(a)){const s=t[a](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${a.toLowerCase()}`]="":o&&(n[`data-${a.toLowerCase()}`]=o.toString())}return n}function c8(e,t){return typeof e=="function"?e(t):e}function u8(e,t){return typeof e=="function"?e(t):e}const nl={};function MP(e,t,n,a,o){let s={...Hp(e,nl)};return t&&(s=Hs(s,t)),n&&(s=Hs(s,n)),a&&(s=Hs(s,a)),o&&(s=Hs(s,o)),s}function d8(e){if(e.length===0)return nl;if(e.length===1)return Hp(e[0],nl);let t={...Hp(e[0],nl)};for(let n=1;n<e.length;n+=1)t=Hs(t,e[n]);return t}function Hs(e,t){return NP(t)?t(e):h8(e,t)}function h8(e,t){if(!t)return e;for(const n in t){const a=t[n];switch(n){case"style":{e[n]=$p(e.style,a);break}case"className":{e[n]=OP(e.className,a);break}default:f8(n,a)?e[n]=p8(e[n],a):e[n]=a}}return e}function f8(e,t){const n=e.charCodeAt(0),a=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&a===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function NP(e){return typeof e=="function"}function Hp(e,t){return NP(e)?e(t):e??nl}function p8(e,t){return t?e?n=>{if(m8(n)){const o=n;Wp(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const a=t(n);return e?.(n),a}:t:e}function Wp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function OP(e,t){return t?e?t+" "+e:t:e}function m8(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function YU(){}const ZU=Object.freeze([]),zr=Object.freeze({}),XU=500,QU={style:{transition:"none"}},JU="data-base-ui-click-trigger",e7={fallbackAxisSide:"none"},t7={fallbackAxisSide:"end"},g8={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Ml(e,t,n={}){const a=t.render,o=y8(t,n);if(n.enabled===!1)return null;const s=n.state??zr;return v8(e,a,o,s)}function y8(e,t={}){const{className:n,style:a,render:o}=e,{state:s=zr,ref:l,props:u,stateAttributesMapping:f,enabled:h=!0}=t,m=h?c8(n,s):void 0,y=h?u8(a,s):void 0,v=h?l8(s,f):zr,_=h?$p(v,Array.isArray(u)?d8(u):u)??zr:zr;return typeof document<"u"&&(h?Array.isArray(l)?_.ref=r8([_.ref,V_(o),...l]):_.ref=z_(_.ref,V_(o),l):z_(null,null)),h?(m!==void 0&&(_.className=OP(_.className,m)),y!==void 0&&(_.style=$p(_.style,y)),_):zr}function v8(e,t,n,a){if(t){if(typeof t=="function")return t(n,a);const o=MP(n,t.props);return o.ref=n.ref,k.cloneElement(t,o)}if(e&&typeof e=="string")return b8(e,n);throw new Error(Ll(8))}function b8(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}let k8=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const _8=k.forwardRef(function(t,n){const{render:a,className:o,children:s,...l}=t,{toasts:u,pauseTimers:f,resumeTimers:h,setHovering:m,setFocused:y,viewportRef:v,windowFocusedRef:_,prevFocusElement:x,setPrevFocusElement:S,expanded:C,focused:L}=mg(),M=k.useRef(!1),E=k.useRef(!1),A=u.length,B=u[0]?.height??0,z=k.useMemo(()=>u.some(F=>F.transitionStatus==="ending"),[u]);k.useEffect(()=>{if(!v.current)return;function F(V){A!==0&&V.key==="F6"&&V.target!==v.current&&(V.preventDefault(),S(ml(Eo(v.current))),v.current?.focus({preventScroll:!0}),f(),y(!0))}const Y=qr(v.current);return Y.addEventListener("keydown",F),()=>{Y.removeEventListener("keydown",F)}},[f,y,S,A,v]),k.useEffect(()=>{if(!v.current||!A)return;const F=qr(v.current);function Y(I){I.target===F&&(_.current=!1,f())}function V(I){if(I.relatedTarget||I.target===F)return;const W=Bp(I),me=ml(Eo(v.current));(!Ti(v.current,W)||!Fp(me))&&h(),setTimeout(()=>{_.current=!0})}return F.addEventListener("blur",Y,!0),F.addEventListener("focus",V,!0),()=>{F.removeEventListener("blur",Y,!0),F.removeEventListener("focus",V,!0)}},[f,h,v,_,y,A]),k.useEffect(()=>{const F=v.current;if(!F||A===0)return;const Y=Eo(F);function V(I){if(I.pointerType!=="touch")return;const W=Bp(I);Ti(F,W)||(h(),m(!1),y(!1))}return Y.addEventListener("pointerdown",V,!0),()=>{Y.removeEventListener("pointerdown",V,!0)}},[A,h,y,m,v]);function H(F){v.current&&(M.current=!0,F.relatedTarget===v.current?u[0]?.ref?.current?.focus():x?.focus({preventScroll:!0}))}function P(F){F.key==="Tab"&&F.shiftKey&&F.target===v.current&&(F.preventDefault(),x?.focus({preventScroll:!0}),h())}k.useEffect(()=>{!_.current||z||!E.current||(h(),m(!1),E.current=!1)},[z,h,m,_]);function Z(){f(),m(!0),E.current=!1}function X(){u.some(F=>F.transitionStatus==="ending")?E.current=!0:(h(),m(!1))}function fe(){if(M.current){M.current=!1;return}L||Fp(Eo(v.current).activeElement)&&(y(!0),f())}function he(F){!L||Ti(v.current,F.relatedTarget)||(y(!1),h())}const Q={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:Z,onMouseMove:Z,onMouseLeave:X,onFocus:fe,onBlur:he,onKeyDown:P,onClick:fe},J=k.useMemo(()=>({expanded:C}),[C]),te=Ml("div",t,{ref:[n,v],state:J,props:[Q,{style:{[k8.frontmostHeight]:B?`${B}px`:void 0}},l,{children:T.jsxs(k.Fragment,{children:[A>0&&x&&T.jsx(tl,{onFocus:H}),s,A>0&&x&&T.jsx(tl,{onFocus:H})]})}]}),ee=k.useMemo(()=>({viewportRef:v}),[v]),se=k.useMemo(()=>u.filter(F=>F.priority==="high"),[u]);return T.jsxs(a8.Provider,{value:ee,children:[A>0&&x&&T.jsx(tl,{onFocus:H}),te,!L&&se.length>0&&T.jsx("div",{style:RP,children:se.map(F=>T.jsxs("div",{role:"alert","aria-atomic":!0,children:[T.jsx("div",{children:F.title}),T.jsx("div",{children:F.description})]},F.id))})]})});function w8(e){return IP(19)?e:e?"true":void 0}const jP=k.createContext(void 0);function Gp(){const e=k.useContext(jP);if(!e)throw new Error(Ll(66));return e}let gg=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const x8={[gg.startingStyle]:""},P8={[gg.endingStyle]:""},S8={transitionStatus(e){return e==="starting"?x8:e==="ending"?P8:null}},Jc=null;class C8{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 o=0;o<n.length;o+=1)n[o]?.(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 eu=new C8;class yg{static create(){return new yg}static request(t){return eu.request(t)}static cancel(t){return eu.cancel(t)}currentId=Jc;request(t){this.cancel(),this.currentId=eu.request(()=>{this.currentId=Jc,t()})}cancel=()=>{this.currentId!==Jc&&(eu.cancel(this.currentId),this.currentId=Jc)};disposeEffect=()=>this.cancel}function T8(){const e=Dl(yg.create).current;return vP(e.disposeEffect),e}function E8(e){return e==null?e:"current"in e?e.current:e}function A8(e,t=!1,n=!0){const a=T8();return An((o,s=null)=>{a.cancel();function l(){Ni.flushSync(o)}const u=E8(e);if(u==null)return;const f=u;if(typeof f.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let h=function(){const y=gg.startingStyle;if(!f.hasAttribute(y)){a.request(m);return}const v=new MutationObserver(()=>{f.hasAttribute(y)||(v.disconnect(),m())});v.observe(f,{attributes:!0,attributeFilter:[y]}),s?.addEventListener("abort",()=>v.disconnect(),{once:!0})},m=function(){Promise.all(f.getAnimations().map(y=>y.finished)).then(()=>{s?.aborted||l()}).catch(()=>{const y=f.getAnimations();if(n){if(s?.aborted)return;l()}else y.length>0&&y.some(v=>v.pending||v.playState!=="finished")&&m()})};if(t){h();return}a.request(m)}})}function R8(e){const{enabled:t=!0,open:n,ref:a,onComplete:o}=e,s=An(o),l=A8(a,n,!1);k.useEffect(()=>{if(!t)return;const u=new AbortController;return l(s,u.signal),()=>{u.abort()}},[t,n,s,l])}let bi=(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 D8={...S8,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Us=40,L8=10,Nr=.5,I8=1;function $_(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 M8(e){const n=window.getComputedStyle(e).transform;let a=0,o=0,s=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],o=u[5],s=Math.sqrt(u[0]*u[0]+u[1]*u[1])):u.length===16&&(a=u[12],o=u[13],s=u[0])}}return{x:a,y:o,scale:s}}const N8=k.forwardRef(function(t,n){const{toast:a,render:o,className:s,swipeDirection:l=["down","right"],...u}=t,f=a.positionerProps?.anchor!==void 0;let h=[];f||(h=Array.isArray(l)?l:[l]);const m=h.length>0,{toasts:y,focused:v,close:_,remove:x,setToasts:S,pauseTimers:C,expanded:L,setHovering:M}=mg(),[E,A]=k.useState(void 0),[B,z]=k.useState(!1),[H,P]=k.useState(!1),[Z,X]=k.useState(!1),[fe,he]=k.useState({x:0,y:0}),[Q,J]=k.useState({x:0,y:0,scale:1}),[te,ee]=k.useState(),[se,F]=k.useState(),[Y,V]=k.useState(null),I=k.useRef(null),W=k.useRef({x:0,y:0}),me=k.useRef({x:0,y:0,scale:1}),pe=k.useRef(void 0),ye=k.useRef(0),xe=k.useRef(!1),Fe=k.useRef({x:0,y:0}),Ye=k.useRef(!1),je=k.useMemo(()=>y.indexOf(a),[a,y]),Rt=k.useMemo(()=>y.filter(Ke=>Ke.transitionStatus!=="ending").indexOf(a),[a,y]),Rn=k.useMemo(()=>y.slice(0,y.indexOf(a)).reduce((Ke,Ve)=>Ke+(Ve.height||0),0),[y,a]);R8({open:a.transitionStatus!=="ending",ref:I,onComplete(){a.transitionStatus==="ending"&&x(a.id)}});const wn=An((Ke=!1)=>{const Ve=I.current;if(!Ve)return;const ft=Ve.style.height;Ve.style.height="auto";const St=Ve.offsetHeight;Ve.style.height=ft;function Ot(){S(yt=>yt.map(dt=>dt.id===a.id?{...dt,ref:I,height:St,transitionStatus:void 0}:dt))}Ke?Ni.flushSync(Ot):Ot()});Il(wn,[wn]);function pt(Ke,Ve){let ft=Ke,St=Ve;return!h.includes("left")&&!h.includes("right")?ft=Ke>0?Ke**Nr:-(Math.abs(Ke)**Nr):(!h.includes("right")&&Ke>0&&(ft=Ke**Nr),!h.includes("left")&&Ke<0&&(ft=-(Math.abs(Ke)**Nr))),!h.includes("up")&&!h.includes("down")?St=Ve>0?Ve**Nr:-(Math.abs(Ve)**Nr):(!h.includes("down")&&Ve>0&&(St=Ve**Nr),!h.includes("up")&&Ve<0&&(St=-(Math.abs(Ve)**Nr))),{x:ft,y:St}}function Xt(Ke){if(Ke.button!==0)return;Ke.pointerType==="touch"&&C();const Ve=Bp(Ke.nativeEvent);if(!(Ve&&Ve.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(xe.current=!1,pe.current=void 0,ye.current=0,W.current={x:Ke.clientX,y:Ke.clientY},Fe.current=W.current,I.current){const St=M8(I.current);me.current=St,J(St),he({x:St.x,y:St.y})}M(!0),z(!0),P(!1),V(null),Ye.current=!0,I.current?.setPointerCapture(Ke.pointerId)}}function Jr(Ke){if(!B)return;Ke.preventDefault(),Ye.current&&(W.current={x:Ke.clientX,y:Ke.clientY},Ye.current=!1);const{clientY:Ve,clientX:ft,movementX:St,movementY:Ot}=Ke;(Ot<0&&Ve>Fe.current.y||Ot>0&&Ve<Fe.current.y)&&(Fe.current={x:Fe.current.x,y:Ve}),(St<0&&ft>Fe.current.x||St>0&&ft<Fe.current.x)&&(Fe.current={x:ft,y:Fe.current.y});const yt=ft-W.current.x,dt=Ve-W.current.y,ba=Ve-Fe.current.y,Ko=ft-Fe.current.x;if(!H&&Math.sqrt(yt*yt+dt*dt)>=I8&&(P(!0),Y===null)){const aa=h.includes("left")||h.includes("right"),ti=h.includes("up")||h.includes("down");if(aa&&ti){const lr=Math.abs(yt),Ln=Math.abs(dt);V(lr>Ln?"horizontal":"vertical")}}let Wt;if(!pe.current)Y==="vertical"?dt>0?Wt="down":dt<0&&(Wt="up"):Y==="horizontal"?yt>0?Wt="right":yt<0&&(Wt="left"):Math.abs(yt)>=Math.abs(dt)?Wt=yt>0?"right":"left":Wt=dt>0?"down":"up",Wt&&h.includes(Wt)&&(pe.current=Wt,ye.current=$_(Wt,yt,dt),A(Wt));else{const _a=pe.current,aa=$_(_a,Ko,ba);aa>Us?(xe.current=!1,A(_a)):!(h.includes("left")&&h.includes("right"))&&!(h.includes("up")&&h.includes("down"))&&ye.current-aa>=L8&&(xe.current=!0)}const Ba=pt(yt,dt);let hn=me.current.x,ka=me.current.y;Y==="horizontal"?(h.includes("left")||h.includes("right"))&&(hn+=Ba.x):(Y==="vertical"||(h.includes("left")||h.includes("right"))&&(hn+=Ba.x),(h.includes("up")||h.includes("down"))&&(ka+=Ba.y)),he({x:hn,y:ka})}function Fi(Ke){if(!B)return;if(z(!1),P(!1),V(null),I.current?.releasePointerCapture(Ke.pointerId),xe.current){he({x:Q.x,y:Q.y}),A(void 0);return}let Ve=!1;const ft=fe.x-Q.x,St=fe.y-Q.y;let Ot;for(const yt of h){switch(yt){case"right":ft>Us&&(Ve=!0,Ot="right");break;case"left":ft<-Us&&(Ve=!0,Ot="left");break;case"down":St>Us&&(Ve=!0,Ot="down");break;case"up":St<-Us&&(Ve=!0,Ot="up");break}if(Ve)break}Ve?(A(Ot),X(!0),_(a.id)):(he({x:Q.x,y:Q.y}),A(void 0))}function Dn(Ke){if(Ke.key==="Escape"){if(!I.current||!Ti(I.current,ml(Eo(I.current))))return;_(a.id)}}k.useEffect(()=>{if(!m)return;const Ke=I.current;if(!Ke)return;function Ve(ft){Ti(Ke,ft.target)&&ft.preventDefault()}return Ke.addEventListener("touchmove",Ve,{passive:!1}),()=>{Ke.removeEventListener("touchmove",Ve)}},[m]);function zi(){if(!B&&fe.x===Q.x&&fe.y===Q.y&&!Z)return{[bi.swipeMovementX]:"0px",[bi.swipeMovementY]:"0px"};const Ke=fe.x-Q.x,Ve=fe.y-Q.y;return{transition:B?"none":void 0,transform:B?`translateX(${fe.x}px) translateY(${fe.y}px) scale(${Q.scale})`:void 0,[bi.swipeMovementX]:`${Ke}px`,[bi.swipeMovementY]:`${Ve}px`}}const sr=a.priority==="high",va={role:sr?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":te,"aria-describedby":se,"aria-hidden":sr&&!v?!0:void 0,onPointerDown:m?Xt:void 0,onPointerMove:m?Jr:void 0,onPointerUp:m?Fi:void 0,onKeyDown:Dn,inert:w8(a.limited),style:{...zi(),[bi.index]:a.transitionStatus==="ending"?je:Rt,[bi.offsetY]:`${Rn}px`,[bi.height]:a.height?`${a.height}px`:void 0}},dn=k.useMemo(()=>({rootRef:I,toast:a,titleId:te,setTitleId:ee,descriptionId:se,setDescriptionId:F,swiping:B,swipeDirection:E,recalculateHeight:wn,index:je,visibleIndex:Rt,expanded:L}),[a,te,se,B,E,wn,je,Rt,L]),ei=k.useMemo(()=>({transitionStatus:a.transitionStatus,expanded:L,limited:a.limited||!1,type:a.type,swiping:dn.swiping,swipeDirection:dn.swipeDirection}),[L,a.transitionStatus,a.limited,a.type,dn.swiping,dn.swipeDirection]),Vi=Ml("div",t,{ref:[n,dn.rootRef],state:ei,stateAttributesMapping:D8,props:[va,u]});return T.jsx(jP.Provider,{value:dn,children:Vi})}),O8={...qp};let H_=0;function j8(e,t="mui"){const[n,a]=k.useState(e),o=e||n;return k.useEffect(()=>{n==null&&(H_+=1,a(`${t}-${H_}`))},[n,t]),o}const W_=O8.useId;function UP(e,t){if(W_!==void 0){const n=W_();return e??(t?`${t}-${n}`:n)}return j8(e,t)}const U8=k.forwardRef(function(t,n){const{render:a,className:o,id:s,children:l,...u}=t,{toast:f}=Gp(),h=l??f.title,m=!!h,y=UP(s),{setTitleId:v}=Gp();Il(()=>{if(m)return v(y),()=>{v(void 0)}},[m,y,v]);const _=k.useMemo(()=>({type:f.type}),[f.type]),x=Ml("h2",t,{ref:n,state:_,props:{...u,id:y,children:h}});return m?x:null}),B8=k.createContext(void 0);function F8(e=!1){const t=k.useContext(B8);if(t===void 0&&!e)throw new Error(Ll(16));return t}function z8(e){const{focusableWhenDisabled:t,disabled:n,composite:a=!1,tabIndex:o=0,isNativeButton:s}=e,l=a&&t!==!1,u=a&&t===!1;return{props:k.useMemo(()=>{const h={onKeyDown(m){n&&t&&m.key!=="Tab"&&m.preventDefault()}};return a||(h.tabIndex=o,!s&&n&&(h.tabIndex=t?o:-1)),(s&&(t||l)||!s&&n)&&(h["aria-disabled"]=n),s&&(!t||u)&&(h.disabled=n),h},[a,n,t,l,u,s,o])}}function V8(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:a=0,native:o=!0}=e,s=k.useRef(null),l=F8(!0)!==void 0,u=An(()=>{const v=s.current;return!!(v?.tagName==="A"&&v?.href)}),{props:f}=z8({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:a,isNativeButton:o}),h=k.useCallback(()=>{const v=s.current;$8(v)&&l&&t&&f.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,f.disabled,l]);Il(h,[h]);const m=k.useCallback((v={})=>{const{onClick:_,onMouseDown:x,onKeyUp:S,onKeyDown:C,onPointerDown:L,...M}=v;return MP({type:o?"button":void 0,onClick(A){if(t){A.preventDefault();return}_?.(A)},onMouseDown(A){t||x?.(A)},onKeyDown(A){if(t||(Wp(A),C?.(A)),A.baseUIHandlerPrevented)return;const B=A.target===A.currentTarget&&!o&&!u()&&!t,z=A.key==="Enter",H=A.key===" ";B&&((H||z)&&A.preventDefault(),z&&_?.(A))},onKeyUp(A){t||(Wp(A),S?.(A)),!A.baseUIHandlerPrevented&&A.target===A.currentTarget&&!o&&!t&&A.key===" "&&_?.(A)},onPointerDown(A){if(t){A.preventDefault();return}L?.(A)}},o?void 0:{role:"button"},f,M)},[t,f,o,u]),y=An(v=>{s.current=v,h()});return{getButtonProps:m,buttonRef:y}}function $8(e){return yd(e)&&e.tagName==="BUTTON"}const H8=k.forwardRef(function(t,n){const{render:a,className:o,disabled:s,nativeButton:l=!0,...u}=t,{close:f,expanded:h}=mg(),{toast:m}=Gp(),[y,v]=k.useState(!1),{getButtonProps:_,buttonRef:x}=V8({disabled:s,native:l}),S=k.useMemo(()=>({type:m.type}),[m.type]);return Ml("button",t,{ref:[n,x],state:S,props:[{"aria-hidden":!h&&!y,onClick(){f(m.id)},onFocus(){v(!0)},onBlur(){v(!1)}},u,_]})}),n7="none",a7="trigger-press",r7="trigger-hover",i7="outside-press",o7="item-press",s7="close-press",W8="focus-out",l7="escape-key",c7="list-navigation",u7="cancel-open",d7="imperative-action",h7="window-resize";function G8(e,t,n,a){let o=!1,s=!1;const l=zr;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...l}}function K8(e){return`data-base-ui-${e}`}const BP=k.createContext(null),q8=()=>k.useContext(BP),Y8=K8("portal");function FP(e={}){const{ref:t,container:n,componentProps:a=zr,elementProps:o,elementState:s}=e,l=UP(),f=q8()?.portalNode,[h,m]=k.useState(null),[y,v]=k.useState(null),_=An(L=>{L!==null&&v(L)}),x=k.useRef(null);Il(()=>{if(n===null){x.current&&(x.current=null,v(null),m(null));return}if(l==null)return;const L=(n&&(dg(n)?n:n.current))??f??document.body;if(L==null){x.current&&(x.current=null,v(null),m(null));return}x.current!==L&&(x.current=L,v(null),m(L))},[n,f,l]);const S=Ml("div",a,{ref:[t,_],state:s,props:[{id:l,[Y8]:""},o]});return{portalNode:y,portalSubtree:h&&S?Ni.createPortal(S,h):null}}const f7=k.forwardRef(function(t,n){const{children:a,container:o,className:s,render:l,renderGuards:u,...f}=t,{portalNode:h,portalSubtree:m}=FP({container:o,ref:n,componentProps:t,elementProps:f}),y=k.useRef(null),v=k.useRef(null),_=k.useRef(null),x=k.useRef(null),[S,C]=k.useState(null),L=S?.modal,M=S?.open,E=typeof u=="boolean"?u:!!S&&!S.modal&&S.open&&!!h;k.useEffect(()=>{if(!h||L)return;function B(z){h&&z.relatedTarget&&zf(z)&&(z.type==="focusin"?F_:e8)(h)}return h.addEventListener("focusin",B,!0),h.addEventListener("focusout",B,!0),()=>{h.removeEventListener("focusin",B,!0),h.removeEventListener("focusout",B,!0)}},[h,L]),k.useEffect(()=>{!h||M||F_(h)},[M,h]);const A=k.useMemo(()=>({beforeOutsideRef:y,afterOutsideRef:v,beforeInsideRef:_,afterInsideRef:x,portalNode:h,setFocusManagerState:C}),[h]);return T.jsxs(k.Fragment,{children:[m,T.jsxs(BP.Provider,{value:A,children:[E&&h&&T.jsx(tl,{"data-type":"outside",ref:y,onFocus:B=>{if(zf(B,h))_.current?.focus();else{const z=S?S.domReference:null;Jj(z)?.focus()}}}),E&&h&&T.jsx("span",{"aria-owns":h.id,style:g8}),h&&Ni.createPortal(a,h),E&&h&&T.jsx(tl,{"data-type":"outside",ref:v,onFocus:B=>{if(zf(B,h))x.current?.focus();else{const z=S?S.domReference:null;Qj(z)?.focus(),S?.closeOnFocusOut&&S?.onOpenChange(!1,G8(W8,B.nativeEvent))}}})]})]})}),Z8=k.forwardRef(function(t,n){const{children:a,container:o,className:s,render:l,...u}=t,{portalNode:f,portalSubtree:h}=FP({container:o,ref:n,componentProps:t,elementProps:u});return!h&&!f?null:T.jsxs(k.Fragment,{children:[h,f&&Ni.createPortal(a,f)]})}),X8=Z8;function Q8(){const e=k.useContext(pg);if(!e)throw new Error(Ll(73));const{toasts:t,add:n,close:a,update:o,promise:s}=e;return k.useMemo(()=>({toasts:t,add:n,close:a,update:o,promise:s}),[t,n,a,o,s])}function J8(){const e=[];function t(n){e.forEach(a=>a(n))}return{" subscribe":function(a){return e.push(a),()=>{const o=e.indexOf(a);o!==-1&&e.splice(o,1)}},add(n){const a=n.id||yP("toast"),o={...n,id:a,transitionStatus:"starting"};return t({action:"add",options:o}),a},close(n){t({action:"close",options:{id:n}})},update(n,a){t({action:"update",options:{...a,id:n}})},promise(n,a){let o=n;return t({action:"promise",options:{...a,promise:n,setPromise(s){o=s}}}),o}}}const vg=J8();function p7(e){return vg.add(e)}function e9({children:e}){return T.jsxs(t8,{toastManager:vg,children:[e,T.jsx(X8,{children:T.jsx(_8,{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:T.jsx(t9,{})})})]})}function t9(){const{toasts:e}=Q8();return e.map(t=>{const n=t.data?.onUndo;return T.jsxs(N8,{toast:t,className:wt("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:[T.jsx(U8,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),n?T.jsx("button",{type:"button",onClick:()=>{n(),vg.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:Le("shared.action.undo")}):null,T.jsx(H8,{"aria-label":Le("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:T.jsx(Rm,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},t.id)})}const n9=typeof window<"u"?window.location.search:"",G_=new URLSearchParams(n9),tu=G_.get("insforge_code")||G_.get("code")||null,a9=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function r9(){Cl();const{loading:e,signedIn:t}=Vo(),n=kl(),[a,o]=k.useState("processing"),[s,l]=k.useState(null),u=k.useRef(!1);k.useEffect(()=>{if(!(!tu||u.current)){if(u.current=!0,a9){l(!1);return}(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();l(!!m?.native)}catch{l(!1)}})()}},[]),k.useEffect(()=>{if(s!==!0||!tu)return;o("redirecting");const h=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(tu)}`},200);return()=>clearTimeout(h)},[s]),k.useEffect(()=>{if(s!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const h=setTimeout(()=>{t||o("failed")},12e3);return()=>clearTimeout(h)},[s,e,t,n]),k.useEffect(()=>{if(!tu&&s===null){const h=setTimeout(()=>o("failed"),3e3);return()=>clearTimeout(h)}},[s]);const f=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&s!==!0&&(s===null||s===!1&&e)?T.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):T.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:T.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),T.jsx("p",{className:"text-oai-gray-400 text-sm",children:Le("auth.callback.processing")})]}),a==="redirecting"&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:T.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:T.jsx("path",{d:"M20 6 9 17l-5-5"})})}),T.jsx("p",{className:"text-white text-sm font-medium",children:Le("auth.callback.success")}),T.jsx("p",{className:"text-oai-gray-500 text-xs",children:Le("auth.callback.redirecting")})]}),a==="failed"&&T.jsxs("div",{className:"space-y-3",children:[T.jsx("p",{className:"text-oai-gray-300 text-sm",children:Le("auth.callback.failed")}),T.jsx("button",{type:"button",onClick:f,className:"px-4 py-2 rounded-lg bg-oai-gray-800 text-sm text-white hover:bg-oai-gray-700 transition-colors",children:Le("auth.callback.close")})]})]})})}const i9=k.lazy(()=>na(()=>import("./DashboardPage-CsR8XWxj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.DashboardPage}))),o9=k.lazy(()=>na(()=>import("./IpCheckPage-F5CeRlub.js"),[])),s9=k.lazy(()=>na(()=>import("./LandingPage-2_sEF9mN.js"),__vite__mapDeps([10,11,7])).then(e=>({default:e.LandingPage}))),l9=k.lazy(()=>na(()=>import("./LeaderboardPage-Za_4Qq0N.js"),__vite__mapDeps([12,2,13,14])).then(e=>({default:e.LeaderboardPage}))),c9=k.lazy(()=>na(()=>import("./LeaderboardProfilePage-CuGbG8_n.js"),__vite__mapDeps([15,2,11,16,13,3,4,17,18,5])).then(e=>({default:e.LeaderboardProfilePage}))),u9=k.lazy(()=>na(()=>import("./LimitsPage-DlcSiBHP.js"),__vite__mapDeps([19,1,20,6,9,21,17,22])).then(e=>({default:e.LimitsPage}))),d9=k.lazy(()=>na(()=>import("./LoginPage-UkyGRtTz.js"),[]).then(e=>({default:e.LoginPage}))),h9=k.lazy(()=>na(()=>import("./DevicePage-XTngLOwj.js"),[])),f9=k.lazy(()=>na(()=>import("./WrappedPage-DpP5X0ug.js"),[])),p9=k.lazy(()=>na(()=>import("./SettingsPage-D3gNWvI6.js"),__vite__mapDeps([23,20,24,6,18,2,14,4,22])).then(e=>({default:e.SettingsPage}))),m9=k.lazy(()=>na(()=>import("./SkillsPage-ChO2jmQM.js"),__vite__mapDeps([25,21,17,22,6,5,4,2,8,18,14])).then(e=>({default:e.SkillsPage}))),g9=k.lazy(()=>na(()=>import("./WidgetsPage-BzPEEeI3.js"),__vite__mapDeps([26,24,6,9,17,22,14])).then(e=>({default:e.WidgetsPage})));function y9(){const{resolvedLocale:e}=Cl(),t=Jn(),n=Vo();I6();const a=_n(),o=k.useMemo(()=>typeof window>"u"?!1:S6(window.location.search),[]),s=t?.pathname||"/",l=new URL(window.location.href),u=l.pathname.replace(/\/+$/,"")||"/",h=u.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,m=l.searchParams.get("token")||null,y=h||m,v=u==="/share"||u==="/share.html"||u.startsWith("/share/"),_=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),x=s.replace(/\/+$/,"")||"/",S=x==="/leaderboard",C=x.match(/^\/u\/([^/]+)$/i),L=C?C[1]:null,M=!!(n.enabled&&n.signedIn),E=_||M,A=!1,B=P6(),z=!E&&!a&&!_,H=k.useMemo(()=>!n.enabled||!M?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[M,n]);let P=_||a||o?"dashboard":"landing";x==="/landing"&&(P="landing"),x==="/dashboard"&&(P="dashboard"),S&&(P="dashboard"),L&&(P="dashboard");const Z=x==="/limits",X=x==="/settings",fe=x==="/skills",he=x==="/widgets",Q=x==="/ip-check";(Z||X||fe||he||Q)&&(P="dashboard");let J=i9;L?J=c9:x==="/leaderboard"?J=l9:Z?J=u9:X?J=p9:fe?J=m9:he?J=g9:Q&&(J=o9);const te=!v&&!z&&(x==="/dashboard"||x==="/"||S||Z||X||fe||he||Q);let ee=null;if(x==="/auth/callback"||x==="/auth/native-callback")ee=T.jsx(r9,{});else if(x==="/login")ee=T.jsx(d9,{});else if(x==="/device")ee=T.jsx(h9,{});else if(x==="/wrapped")ee=T.jsx(f9,{});else if(P==="landing")ee=T.jsx(s9,{signInUrl:"/login",signUpUrl:"/login"});else{const se=T.jsx(J,{baseUrl:B,auth:H,signedIn:E,sessionSoftExpired:A,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:v,publicToken:y,userId:L,signInUrl:"/login",signUpUrl:"/login"},e);te?ee=T.jsx(Z6,{children:se}):ee=se}return T.jsx(xI,{children:T.jsx(CI,{children:T.jsx(e9,{children:T.jsxs(TI,{children:[T.jsx(k.Suspense,{fallback:null,children:ee}),te?T.jsx(bj,{}):null,T.jsx(w6,{}),T.jsx(TL,{}),T.jsx(UL,{})]})})})})}const v9=$2([{path:"*",element:T.jsx(y9,{})}]);DC.createRoot(document.getElementById("root")).render(T.jsx(al.StrictMode,{children:T.jsx(oL,{children:T.jsx(fL,{children:T.jsx(TD,{children:T.jsx(tE,{router:v9})})})})}));export{z9 as $,el as A,uu as B,F9 as C,B9 as D,ll as E,wI as F,J9 as G,R9 as H,A9 as I,I1 as J,M6 as K,ad as L,Ni as M,wt as N,rx as O,gj as P,Vo as Q,al as R,_6 as S,O9 as T,H9 as U,Cl as V,S6 as W,Rm as X,Fr as Y,Z9 as Z,na as _,E9 as a,ZU as a$,GR as a0,D9 as a1,L9 as a2,X9 as a3,U9 as a4,N9 as a5,M_ as a6,uU as a7,xM as a8,gt as a9,tx as aA,ex as aB,oI as aC,j9 as aD,Oo as aE,Mu as aF,Fw as aG,zw as aH,Vw as aI,$w as aJ,dI as aK,UU as aL,BU as aM,OU as aN,jU as aO,$U as aP,Il as aQ,VU as aR,An as aS,ml as aT,vd as aU,Ti as aV,c7 as aW,yd as aX,Bp as aY,W8 as aZ,RU as a_,nn as aa,$u as ab,Lm as ac,Uo as ad,rg as ae,ix as af,Kr as ag,Pk as ah,Jn as ai,kl as aj,dU as ak,NR as al,C9 as am,hU as an,T9 as ao,G9 as ap,kI as aq,N6 as ar,mI as as,aU as at,b9 as au,LR as av,Dm as aw,MR as ax,tk as ay,W9 as az,FR as b,XU as b$,Ll as b0,YU as b1,zr as b2,hP as b3,Dl as b4,R8 as b5,MP as b6,z_ as b7,qU as b8,RP as b9,bU as bA,kU as bB,xU as bC,wU as bD,a7 as bE,jj as bF,N_ as bG,kj as bH,Cj as bI,mP as bJ,Sj as bK,_j as bL,Up as bM,pP as bN,TU as bO,Pj as bP,EU as bQ,ug as bR,fP as bS,AU as bT,UP as bU,K8 as bV,Oj as bW,r7 as bX,pl as bY,QU as bZ,l7 as b_,n7 as ba,i7 as bb,Eo as bc,u7 as bd,f7 as be,e7 as bf,w8 as bg,T8 as bh,qr as bi,DU as bj,h7 as bk,S8 as bl,o7 as bm,yj as bn,mU as bo,fU as bp,PU as bq,SU as br,CU as bs,fI as bt,pU as bu,gU as bv,p7 as bw,yU as bx,_U as by,vU as bz,an as c,vP as c0,d7 as c1,JU as c2,tl as c3,KU as c4,zf as c5,GU as c6,Qj as c7,t7 as c8,A8 as c9,yg as cA,U_ as cB,MU as cC,NU as cD,gg as cE,LU as cF,hL as ca,Pm as cb,sU as cc,pa as cd,Em as ce,iU as cf,lU as cg,oU as ch,Ys as ci,q9 as cj,Y9 as ck,K9 as cl,rr as cm,IU as cn,Lj as co,q8 as cp,hg as cq,fg as cr,E8 as cs,Jj as ct,WU as cu,HU as cv,zU as cw,FU as cx,Kp as cy,IP as cz,rU as d,tD as e,nD as f,Iw as g,eU as h,_n as i,M9 as j,$9 as k,tU as l,nU as m,I9 as n,xt as o,V9 as p,Q9 as q,k as r,Le as s,Lw as t,T as u,V8 as v,Ml as w,G8 as x,s7 as y,SO as z};
|
|
959
|
+
`),()=>{u.current?.removeAttribute("data-motion-pop-id"),B.contains(A)&&B.removeChild(A)}},[t]),T.jsx(pN,{isPresent:t,childRef:u,sizeRef:f,pop:s,children:s===!1?e:k.cloneElement(e,{ref:y})})}const gN=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:o,presenceAffectsLayout:s,mode:l,anchorX:u,anchorY:f,root:h})=>{const m=Lm(yN),y=k.useId();let v=!0,_=k.useMemo(()=>(v=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:x=>{m.set(x,!0);for(const S of m.values())if(!S)return;a&&a()},register:x=>(m.set(x,!1),()=>m.delete(x))}),[n,m,a]);return s&&v&&(_={..._}),k.useMemo(()=>{m.forEach((x,S)=>m.set(S,!1))},[n]),k.useEffect(()=>{!n&&!m.size&&a&&a()},[n]),e=T.jsx(mN,{pop:l==="popLayout",isPresent:n,anchorX:u,anchorY:f,root:h,children:e}),T.jsx(dd.Provider,{value:_,children:e})};function yN(){return new Map}function L1(e=!0){const t=k.useContext(dd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:o}=t,s=k.useId();k.useEffect(()=>{if(e)return o(s)},[e]);const l=k.useCallback(()=>e&&a&&a(s),[s,a,e]);return!n&&a?[!1,l]:[!0]}const Kc=e=>e.key||"";function h_(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const I1=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s="sync",propagate:l=!1,anchorX:u="left",anchorY:f="top",root:h})=>{const[m,y]=L1(l),v=k.useMemo(()=>h_(e),[e]),_=l&&!m?[]:v.map(Kc),x=k.useRef(!0),S=k.useRef(v),C=Lm(()=>new Map),L=k.useRef(new Set),[M,E]=k.useState(v),[A,B]=k.useState(v);ix(()=>{x.current=!1,S.current=v;for(let P=0;P<A.length;P++){const Z=Kc(A[P]);_.includes(Z)?(C.delete(Z),L.current.delete(Z)):C.get(Z)!==!0&&C.set(Z,!1)}},[A,_.length,_.join("-")]);const z=[];if(v!==M){let P=[...v];for(let Z=0;Z<A.length;Z++){const X=A[Z],fe=Kc(X);_.includes(fe)||(P.splice(Z,0,X),z.push(X))}return s==="wait"&&z.length&&(P=z),B(h_(P)),E(v),null}const{forceRender:H}=k.useContext(Dm);return T.jsx(T.Fragment,{children:A.map(P=>{const Z=Kc(P),X=l&&!m?!1:v===A||_.includes(Z),fe=()=>{if(L.current.has(Z))return;if(C.has(Z))L.current.add(Z),C.set(Z,!0);else return;let he=!0;C.forEach(Q=>{Q||(he=!1)}),he&&(H?.(),B(S.current),l&&y?.(),a&&a())};return T.jsx(gN,{isPresent:X,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:h,onExitComplete:X?void 0:fe,anchorX:u,anchorY:f,children:P},Z)})})},M1=k.createContext({strict:!1}),f_={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 p_=!1;function vN(){if(p_)return;const e={};for(const t in f_)e[t]={isEnabled:n=>f_[t].some(a=>!!n[a])};l1(e),p_=!0}function N1(){return vN(),n5()}function bN(e){const t=N1();for(const n in e)t[n]={...t[n],...e[n]};l1(t)}const kN=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 qu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||kN.has(e)}let O1=e=>!qu(e);function _N(e){typeof e=="function"&&(O1=t=>t.startsWith("on")?!qu(t):e(t))}try{_N(require("@emotion/is-prop-valid").default)}catch{}function wN(e,t,n){const a={};for(const o in e)o==="values"&&typeof e.values=="object"||nn(e[o])||(O1(o)||n===!0&&qu(o)||!t&&!qu(o)||e.draggable&&o.startsWith("onDrag"))&&(a[o]=e[o]);return a}const md=k.createContext({});function xN(e,t){if(pd(e)){const{initial:n,animate:a}=e;return{initial:n===!1||hl(n)?n:void 0,animate:hl(a)?a:void 0}}return e.inherit!==!1?t:{}}function PN(e){const{initial:t,animate:n}=xN(e,k.useContext(md));return k.useMemo(()=>({initial:t,animate:n}),[m_(t),m_(n)])}function m_(e){return Array.isArray(e)?e.join(" "):e}const ig=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function j1(e,t,n){for(const a in t)!nn(t[a])&&!m1(a,n)&&(e[a]=t[a])}function SN({transformTemplate:e},t){return k.useMemo(()=>{const n=ig();return ng(n,t,e),Object.assign({},n.vars,n.style)},[t])}function CN(e,t){const n=e.style||{},a={};return j1(a,n,e),Object.assign(a,SN(e,t)),a}function TN(e,t){const n={},a=CN(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 U1=()=>({...ig(),attrs:{}});function EN(e,t,n,a){const o=k.useMemo(()=>{const s=U1();return g1(s,t,v1(a),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};j1(s,e.style,e),o.style={...s,...o.style}}return o}const AN=["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 og(e){return typeof e!="string"||e.includes("-")?!1:!!(AN.indexOf(e)>-1||/[A-Z]/u.test(e))}function RN(e,t,n,{latestValues:a},o,s=!1,l){const f=(l??og(e)?EN:TN)(t,a,o,e),h=wN(t,typeof e=="string",s),m=e!==k.Fragment?{...h,...f,ref:n}:{},{children:y}=t,v=k.useMemo(()=>nn(y)?y.get():y,[y]);return k.createElement(e,{...m,children:v})}function DN({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,o){return{latestValues:LN(n,a,o,e),renderState:t()}}function LN(e,t,n,a){const o={},s=a(e,{});for(const v in s)o[v]=bu(s[v]);let{initial:l,animate:u}=e;const f=pd(e),h=o1(e);t&&h&&!f&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const y=m?u:l;if(y&&typeof y!="boolean"&&!fd(y)){const v=Array.isArray(y)?y:[y];for(let _=0;_<v.length;_++){const x=Km(e,v[_]);if(x){const{transitionEnd:S,transition:C,...L}=x;for(const M in L){let E=L[M];if(Array.isArray(E)){const A=m?E.length-1:0;E=E[A]}E!==null&&(o[M]=E)}for(const M in S)o[M]=S[M]}}}return o}const B1=e=>(t,n)=>{const a=k.useContext(md),o=k.useContext(dd),s=()=>DN(e,t,a,o);return n?s():Lm(s)},IN=B1({scrapeMotionValuesFromProps:ag,createRenderState:ig}),MN=B1({scrapeMotionValuesFromProps:b1,createRenderState:U1}),NN=Symbol.for("motionComponentSymbol");function ON(e,t,n){const a=k.useRef(n);k.useInsertionEffect(()=>{a.current=n});const o=k.useRef(null);return k.useCallback(s=>{s&&e.onMount?.(s);const l=a.current;if(typeof l=="function")if(s){const u=l(s);typeof u=="function"&&(o.current=u)}else o.current?(o.current(),o.current=null):l(s);else l&&(l.current=s);t&&(s?t.mount(s):t.unmount())},[t])}const F1=k.createContext({});function wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function jN(e,t,n,a,o,s){const{visualElement:l}=k.useContext(md),u=k.useContext(M1),f=k.useContext(dd),h=k.useContext(rg),m=h.reducedMotion,y=h.skipAnimations,v=k.useRef(null),_=k.useRef(!1);a=a||u.renderer,!v.current&&a&&(v.current=a(e,{visualState:t,parent:l,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:m,skipAnimations:y,isSVG:s}),_.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const x=v.current,S=k.useContext(F1);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&UN(v.current,n,o,S);const C=k.useRef(!1);k.useInsertionEffect(()=>{x&&C.current&&x.update(n,f)});const L=n[Kx],M=k.useRef(!!L&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(L)&&window.MotionHasOptimisedAnimation?.(L));return ix(()=>{_.current=!0,x&&(C.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),M.current&&x.animationState&&x.animationState.animateChanges())}),k.useEffect(()=>{x&&(!M.current&&x.animationState&&x.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(L)}),M.current=!1),x.enteringChildren=void 0)}),x}function UN(e,t,n,a){const{layoutId:o,layout:s,drag:l,dragConstraints:u,layoutScroll:f,layoutRoot:h,layoutAnchor:m,layoutCrossfade:y}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:z1(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!l||u&&wo(u),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:a,crossfade:y,layoutScroll:f,layoutRoot:h,layoutAnchor:m})}function z1(e){if(e)return e.options.allowProjection!==!1?e.projection:z1(e.parent)}function Lf(e,{forwardMotionProps:t=!1,type:n}={},a,o){a&&bN(a);const s=n?n==="svg":og(e),l=s?MN:IN;function u(h,m){let y;const v={...k.useContext(rg),...h,layoutId:BN(h)},{isStatic:_}=v,x=PN(h),S=l(h,_);if(!_&&typeof window<"u"){FN();const C=zN(v);y=C.MeasureLayout,x.visualElement=jN(e,S,v,o,C.ProjectionNode,s)}return T.jsxs(md.Provider,{value:x,children:[y&&x.visualElement?T.jsx(y,{visualElement:x.visualElement,...v}):null,RN(e,h,ON(S,x.visualElement,m),S,_,t,s)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=k.forwardRef(u);return f[NN]=e,f}function BN({layoutId:e}){const t=k.useContext(Dm).id;return t&&e!==void 0?t+"-"+e:e}function FN(e,t){k.useContext(M1).strict}function zN(e){const t=N1(),{drag:n,layout:a}=t;if(!n&&!a)return{};const o={...n,...a};return{MeasureLayout:n?.isEnabled(e)||a?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function VN(e,t){if(typeof Proxy>"u")return Lf;const n=new Map,a=(s,l)=>Lf(s,l,e,t),o=(s,l)=>a(s,l);return new Proxy(o,{get:(s,l)=>l==="create"?a:(n.has(l)||n.set(l,Lf(l,void 0,e,t)),n.get(l))})}const $N=(e,t)=>t.isSVG??og(e)?new b5(t):new f5(t,{allowProjection:e!==k.Fragment});class HN extends Zr{constructor(t){super(t),t.animationState||(t.animationState=P5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fd(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 WN=0;class GN extends Zr{constructor(){super(...arguments),this.id=WN++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;if(t&&a===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"){const u=Ci(this.node,s,l);if(u){const{transition:f,transitionEnd:h,...m}=u;for(const y in m)this.node.getValue(y)?.jump(m[y])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const KN={animation:{Feature:HN},exit:{Feature:GN}};function Rl(e){return{point:{x:e.pageX,y:e.pageY}}}const qN=e=>t=>Xm(t)&&e(t,Rl(t));function Js(e,t,n,a){return fl(e,t,qN(n),a)}const V1=({current:e})=>e?e.ownerDocument.defaultView:null,g_=(e,t)=>Math.abs(e-t);function YN(e,t){const n=g_(e.x,t.x),a=g_(e.y,t.y);return Math.sqrt(n**2+a**2)}const y_=new Set(["auto","scroll"]);class $1{constructor(t,n,{transformPagePoint:a,contextWindow:o=window,dragSnapToOrigin:s=!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=_=>{this.handleScroll(_.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=qc(this.lastRawMoveEventInfo,this.transformPagePoint));const _=If(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,S=YN(_.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!S)return;const{point:C}=_,{timestamp:L}=tn;this.history.push({...C,timestamp:L});const{onStart:M,onMove:E}=this.handlers;x||(M&&M(this.lastMoveEvent,_),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,_)},this.handlePointerMove=(_,x)=>{this.lastMoveEvent=_,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=qc(x,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(_,x)=>{this.end();const{onEnd:S,onSessionEnd:C,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const M=If(_.type==="pointercancel"?this.lastMoveEventInfo:qc(x,this.transformPagePoint),this.history);this.startEvent&&S&&S(_,M),C&&C(_,M)},!Xm(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=l,this.contextWindow=o||window;const f=Rl(t),h=qc(f,this.transformPagePoint),{point:m}=h,{timestamp:y}=tn;this.history=[{...m,timestamp:y}];const{onSessionStart:v}=n;v&&v(t,If(h,this.history)),this.removeListeners=Tl(Js(this.contextWindow,"pointermove",this.handlePointerMove),Js(this.contextWindow,"pointerup",this.handlePointerUp),Js(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(y_.has(a.overflowX)||y_.has(a.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const a=t===window,o=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Kr(this.updatePoint)}}function qc(e,t){return t?{point:t(e.point)}:e}function v_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function If({point:e},t){return{point:e,delta:v_(e,H1(t)),offset:v_(e,ZN(t)),velocity:XN(t,.1)}}function ZN(e){return e[0]}function H1(e){return e[e.length-1]}function XN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const o=H1(e);for(;n>=0&&(a=e[n],!(o.timestamp-a.timestamp>Bn(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&o.timestamp-a.timestamp>Bn(t)*2&&(a=e[1]);const s=Yn(o.timestamp-a.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-a.x)/s,y:(o.y-a.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function QN(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?Pt(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?Pt(n,e,a.max):Math.min(e,n)),e}function b_(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 JN(e,{top:t,left:n,bottom:a,right:o}){return{x:b_(e.x,n,o),y:b_(e.y,t,a)}}function k_(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 eO(e,t){return{x:k_(e.x,t.x),y:k_(e.y,t.y)}}function tO(e,t){let n=.5;const a=vn(e),o=vn(t);return o>a?n=ul(t.min,t.max-a,e.min):a>o&&(n=ul(e.min,e.max-o,t.min)),Oa(0,1,n)}function nO(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 Ip=.35;function aO(e=Ip){return e===!1?e=0:e===!0&&(e=Ip),{x:__(e,"left","right"),y:__(e,"top","bottom")}}function __(e,t,n){return{min:w_(e,t),max:w_(e,n)}}function w_(e,t){return typeof e=="number"?e:e[t]||0}const rO=new WeakMap;class iO{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=Ht(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=y=>{n&&this.snapToCursor(Rl(y).point),this.stopAnimation()},l=(y,v)=>{const{drag:_,dragPropagation:x,onDragStart:S}=this.getProps();if(_&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=I4(_),!this.openDragLock))return;this.latestPointerEvent=y,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),Ta(L=>{let M=this.getAxisMotionValue(L).get()||0;if(Da.test(M)){const{projection:E}=this.visualElement;if(E&&E.layout){const A=E.layout.layoutBox[L];A&&(M=vn(A)*(parseFloat(M)/100))}}this.originPoint[L]=M}),S&>.update(()=>S(y,v),!1,!0),Sp(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},u=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:_,dragDirectionLock:x,onDirectionLock:S,onDrag:C}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:L}=v;if(x&&this.currentDirection===null){this.currentDirection=sO(L),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",v.point,L),this.updateAxis("y",v.point,L),this.visualElement.render(),C&>.update(()=>C(y,v),!1,!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new $1(t,{onSessionStart:s,onStart:l,onMove:u,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:a,contextWindow:V1(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!a)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&>.postRender(()=>u(a,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,a){const{drag:o}=this.getProps();if(!a||!Yc(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(l=QN(l,this.constraints[t],this.elastic[t])),s.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,o=this.constraints;t&&wo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=JN(a.layoutBox,t):this.constraints=!1,this.elastic=aO(n),o!==this.constraints&&!wo(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&Ta(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=nO(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wo(t))return!1;const a=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=s5(a,o.root,this.visualElement.getTransformPagePoint());let l=eO(o.layout.layoutBox,s);if(n){const u=n(r5(l));this.hasMutatedConstraints=!!u,u&&(l=u1(u))}return l}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),f=this.constraints||{},h=Ta(m=>{if(!Yc(m,n,this.currentDirection))return;let y=f&&f[m]||{};(l===!0||l===m)&&(y={min:0,max:0});const v=o?200:1e6,_=o?40:1e7,x={type:"inertia",velocity:a?t[m]:0,bounceStiffness:v,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...s,...y};return this.startAxisValueAnimation(m,x)});return Promise.all(h).then(u)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return Sp(this.visualElement,t),a.start(Gm(t,a,0,n,this.visualElement,!1))}stopAnimation(){Ta(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),o=a[n];return o||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){Ta(n=>{const{drag:a}=this.getProps();if(!Yc(n,a,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:u}=o.layout.layoutBox[n],f=s.get()||0;s.set(t[n]-Pt(l,u,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!wo(n)||!a||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ta(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const f=u.get();o[l]=tO({min:f,max:f},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ta(l=>{if(!Yc(l,t,null))return;const u=this.getAxisMotionValue(l),{min:f,max:h}=this.constraints[l];u.set(Pt(f,h,o[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;rO.set(this.visualElement,this);const t=this.visualElement.current,n=Js(t,"pointerdown",h=>{const{drag:m,dragListener:y=!0}=this.getProps(),v=h.target,_=v!==t&&B4(v);m&&y&&!_&&this.start(h)});let a;const o=()=>{const{dragConstraints:h}=this.getProps();wo(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),a||(a=oO(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,l=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),gt.read(o);const u=fl(window,"resize",()=>this.scalePositionWithinConstraints()),f=s.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Ta(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=h[y].translate,v.set(v.get()+h[y].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),f&&f(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=Ip,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:u}}}function x_(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function oO(e,t,n){const a=Rk(e,x_(n)),o=Rk(t,x_(n));return()=>{a(),o()}}function Yc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class lO extends Zr{constructor(t){super(t),this.removeGroupControls=Zn,this.removeListeners=Zn,this.controls=new iO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zn}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 Mf=e=>(t,n)=>{e&>.update(()=>e(t,n),!1,!0)};class cO extends Zr{constructor(){super(...arguments),this.removePointerDownListener=Zn}onPointerDown(t){this.session=new $1(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:V1(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:Mf(t),onStart:Mf(n),onMove:Mf(a),onEnd:(s,l)=>{delete this.session,o&>.postRender(()=>o(s,l))}}}mount(){this.removePointerDownListener=Js(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 Nf=!1;class uO extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),a&&a.register&&o&&a.register(s),Nf&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ku.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:o,isPresent:s}=this.props,{projection:l}=a;return l&&(l.isPresent=s,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),Nf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||gt.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(),Zm.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:o}=t;Nf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),a&&a.deregister&&a.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function W1(e){const[t,n]=L1(),a=k.useContext(Dm);return T.jsx(uO,{...e,layoutGroup:a,switchLayoutGroup:k.useContext(F1),isPresent:t,safeToRemove:n})}const dO={pan:{Feature:cO},drag:{Feature:lO,ProjectionNode:D1,MeasureLayout:W1}};function P_(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=a[o];s&>.postRender(()=>s(t,Rl(t)))}class hO extends Zr{mount(){const{current:t}=this.node;t&&(this.unmount=N4(t,(n,a)=>(P_(this.node,a,"Start"),o=>P_(this.node,o,"End"))))}unmount(){}}class fO extends Zr{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=Tl(fl(this.node.current,"focus",()=>this.onFocus()),fl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function S_(e,t,n){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=a[o];s&>.postRender(()=>s(t,Rl(t)))}class pO extends Zr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=z4(t,(o,s)=>(S_(this.node,s,"Start"),(l,{success:u})=>S_(this.node,l,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const Mp=new WeakMap,Of=new WeakMap,mO=e=>{const t=Mp.get(e.target);t&&t(e)},gO=e=>{e.forEach(mO)};function yO({root:e,...t}){const n=e||document;Of.has(n)||Of.set(n,{});const a=Of.get(n),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(gO,{root:e,...t})),a[o]}function vO(e,t,n){const a=yO(t);return Mp.set(e,n),a.observe(e),()=>{Mp.delete(e),a.unobserve(e)}}const bO={some:0,all:1};class kO extends Zr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:o="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:bO[o]},u=f=>{const{isIntersecting:h}=f;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),v=h?m:y;v&&v(f)};this.stopObserver=vO(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(_O(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function _O({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const wO={inView:{Feature:kO},tap:{Feature:pO},focus:{Feature:fO},hover:{Feature:hO}},xO={layout:{ProjectionNode:D1,MeasureLayout:W1}},PO={...KN,...wO,...dO,...xO},el=VN(PO,$N);function SO(){!tg.current&&s1();const[e]=k.useState(Hu.current);return e}function G1(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=G1(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function CO(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=G1(e))&&(a&&(a+=" "),a+=t);return a}const TO=(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},EO=(e,t)=>({classGroupId:e,validator:t}),K1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Yu="-",C_=[],AO="arbitrary..",RO=e=>{const t=LO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return DO(l);const u=l.split(Yu),f=u[0]===""&&u.length>1?1:0;return q1(u,f,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const f=a[l],h=n[l];return f?h?TO(h,f):f:h||C_}return n[l]||C_}}},q1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const h=q1(e,t+1,s);if(h)return h}const l=n.validators;if(l===null)return;const u=t===0?e.join(Yu):e.slice(t).join(Yu),f=l.length;for(let h=0;h<f;h++){const m=l[h];if(m.validator(u))return m.classGroupId}},DO=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?AO+a:void 0})(),LO=e=>{const{theme:t,classGroups:n}=e;return IO(n,t)},IO=(e,t)=>{const n=K1();for(const a in e){const o=e[a];sg(o,n,a,t)}return n},sg=(e,t,n,a)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];MO(l,t,n,a)}},MO=(e,t,n,a)=>{if(typeof e=="string"){NO(e,t,n);return}if(typeof e=="function"){OO(e,t,n,a);return}jO(e,t,n,a)},NO=(e,t,n)=>{const a=e===""?t:Y1(t,e);a.classGroupId=n},OO=(e,t,n,a)=>{if(UO(e)){sg(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(EO(n,e))},jO=(e,t,n,a)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[u,f]=o[l];sg(f,Y1(t,u),n,a)}},Y1=(e,t)=>{let n=e;const a=t.split(Yu),o=a.length;for(let s=0;s<o;s++){const l=a[s];let u=n.nextPart.get(l);u||(u=K1(),n.nextPart.set(l,u)),n=u}return n},UO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,BO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=a[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},Np="!",T_=":",FO=[],E_=(e,t,n,a,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:o}),zO=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=o=>{const s=[];let l=0,u=0,f=0,h;const m=o.length;for(let S=0;S<m;S++){const C=o[S];if(l===0&&u===0){if(C===T_){s.push(o.slice(f,S)),f=S+1;continue}if(C==="/"){h=S;continue}}C==="["?l++:C==="]"?l--:C==="("?u++:C===")"&&u--}const y=s.length===0?o:o.slice(f);let v=y,_=!1;y.endsWith(Np)?(v=y.slice(0,-1),_=!0):y.startsWith(Np)&&(v=y.slice(1),_=!0);const x=h&&h>f?h-f:void 0;return E_(s,_,v,x)};if(t){const o=t+T_,s=a;a=l=>l.startsWith(o)?s(l.slice(o.length)):E_(FO,!1,l,void 0,!0)}if(n){const o=a;a=s=>n({className:s,parseClassName:o})}return a},VO=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],u=l[0]==="[",f=t.has(l);u||f?(o.length>0&&(o.sort(),a.push(...o),o=[]),a.push(l)):o.push(l)}return o.length>0&&(o.sort(),a.push(...o)),a}},$O=e=>({cache:BO(e.cacheSize),parseClassName:zO(e),sortModifiers:VO(e),...RO(e)}),HO=/\s+/,WO=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],u=e.trim().split(HO);let f="";for(let h=u.length-1;h>=0;h-=1){const m=u[h],{isExternal:y,modifiers:v,hasImportantModifier:_,baseClassName:x,maybePostfixModifierPosition:S}=n(m);if(y){f=m+(f.length>0?" "+f:f);continue}let C=!!S,L=a(C?x.substring(0,S):x);if(!L){if(!C){f=m+(f.length>0?" "+f:f);continue}if(L=a(x),!L){f=m+(f.length>0?" "+f:f);continue}C=!1}const M=v.length===0?"":v.length===1?v[0]:s(v).join(":"),E=_?M+Np:M,A=E+L;if(l.indexOf(A)>-1)continue;l.push(A);const B=o(L,C);for(let z=0;z<B.length;++z){const H=B[z];l.push(E+H)}f=m+(f.length>0?" "+f:f)}return f},GO=(...e)=>{let t=0,n,a,o="";for(;t<e.length;)(n=e[t++])&&(a=Z1(n))&&(o&&(o+=" "),o+=a);return o},Z1=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=Z1(e[a]))&&(n&&(n+=" "),n+=t);return n},KO=(e,...t)=>{let n,a,o,s;const l=f=>{const h=t.reduce((m,y)=>y(m),e());return n=$O(h),a=n.cache.get,o=n.cache.set,s=u,u(f)},u=f=>{const h=a(f);if(h)return h;const m=WO(f,n);return o(f,m),m};return s=l,(...f)=>s(GO(...f))},qO=[],$t=e=>{const t=n=>n[e]||qO;return t.isThemeGetter=!0,t},X1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Q1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,YO=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ZO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XO=/\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$/,QO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,JO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,e6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ir=e=>YO.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Mr=e=>!!e&&Number.isInteger(Number(e)),jf=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),Ja=e=>ZO.test(e),J1=()=>!0,t6=e=>XO.test(e)&&!QO.test(e),lg=()=>!1,n6=e=>JO.test(e),a6=e=>e6.test(e),r6=e=>!Se(e)&&!Te(e),i6=e=>Xr(e,nP,lg),Se=e=>X1.test(e),yi=e=>Xr(e,aP,t6),A_=e=>Xr(e,f6,Xe),o6=e=>Xr(e,iP,J1),s6=e=>Xr(e,rP,lg),R_=e=>Xr(e,eP,lg),l6=e=>Xr(e,tP,a6),Zc=e=>Xr(e,oP,n6),Te=e=>Q1.test(e),Os=e=>Ui(e,aP),c6=e=>Ui(e,rP),D_=e=>Ui(e,eP),u6=e=>Ui(e,nP),d6=e=>Ui(e,tP),Xc=e=>Ui(e,oP,!0),h6=e=>Ui(e,iP,!0),Xr=(e,t,n)=>{const a=X1.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ui=(e,t,n=!1)=>{const a=Q1.exec(e);return a?a[1]?t(a[1]):n:!1},eP=e=>e==="position"||e==="percentage",tP=e=>e==="image"||e==="url",nP=e=>e==="length"||e==="size"||e==="bg-size",aP=e=>e==="length",f6=e=>e==="number",rP=e=>e==="family-name",iP=e=>e==="number"||e==="weight",oP=e=>e==="shadow",p6=()=>{const e=$t("color"),t=$t("font"),n=$t("text"),a=$t("font-weight"),o=$t("tracking"),s=$t("leading"),l=$t("breakpoint"),u=$t("container"),f=$t("spacing"),h=$t("radius"),m=$t("shadow"),y=$t("inset-shadow"),v=$t("text-shadow"),_=$t("drop-shadow"),x=$t("blur"),S=$t("perspective"),C=$t("aspect"),L=$t("ease"),M=$t("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...A(),Te,Se],z=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],P=()=>[Te,Se,f],Z=()=>[Ir,"full","auto",...P()],X=()=>[Mr,"none","subgrid",Te,Se],fe=()=>["auto",{span:["full",Mr,Te,Se]},Mr,Te,Se],he=()=>[Mr,"auto",Te,Se],Q=()=>["auto","min","max","fr",Te,Se],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...P()],se=()=>[Ir,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],F=()=>[Ir,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Y=()=>[Ir,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],V=()=>[e,Te,Se],I=()=>[...A(),D_,R_,{position:[Te,Se]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],me=()=>["auto","cover","contain",u6,i6,{size:[Te,Se]}],pe=()=>[jf,Os,yi],ye=()=>["","none","full",h,Te,Se],xe=()=>["",Xe,Os,yi],Fe=()=>["solid","dashed","dotted","double"],Ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],je=()=>[Xe,jf,D_,R_],Rt=()=>["","none",x,Te,Se],Rn=()=>["none",Xe,Te,Se],wn=()=>["none",Xe,Te,Se],pt=()=>[Xe,Te,Se],Xt=()=>[Ir,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ja],breakpoint:[Ja],color:[J1],container:[Ja],"drop-shadow":[Ja],ease:["in","out","in-out"],font:[r6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ja],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ja],shadow:[Ja],spacing:["px",Xe],text:[Ja],"text-shadow":[Ja],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ir,Se,Te,C]}],container:["container"],columns:[{columns:[Xe,Se,Te,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:B()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[Mr,"auto",Te,Se]}],basis:[{basis:[Ir,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,Ir,"auto","initial","none",Se]}],grow:[{grow:["",Xe,Te,Se]}],shrink:[{shrink:["",Xe,Te,Se]}],order:[{order:[Mr,"first","last","none",Te,Se]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mbs:[{mbs:ee()}],mbe:[{mbe:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:se()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[u,"screen",...se()]}],"min-w":[{"min-w":[u,"screen","none",...se()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...se()]}],h:[{h:["screen","lh",...se()]}],"min-h":[{"min-h":["screen","lh","none",...se()]}],"max-h":[{"max-h":["screen","lh",...se()]}],"font-size":[{text:["base",n,Os,yi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,h6,o6]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jf,Se]}],"font-family":[{font:[c6,s6,t]}],"font-features":[{"font-features":[Se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Te,Se]}],"line-clamp":[{"line-clamp":[Xe,"none",Te,A_]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",Te,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",Te,yi]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Xe,"auto",Te,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Se]}],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",Te,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:me()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mr,Te,Se],radial:["",Te,Se],conic:[Mr,Te,Se]},d6,l6]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:ye()}],"rounded-s":[{"rounded-s":ye()}],"rounded-e":[{"rounded-e":ye()}],"rounded-t":[{"rounded-t":ye()}],"rounded-r":[{"rounded-r":ye()}],"rounded-b":[{"rounded-b":ye()}],"rounded-l":[{"rounded-l":ye()}],"rounded-ss":[{"rounded-ss":ye()}],"rounded-se":[{"rounded-se":ye()}],"rounded-ee":[{"rounded-ee":ye()}],"rounded-es":[{"rounded-es":ye()}],"rounded-tl":[{"rounded-tl":ye()}],"rounded-tr":[{"rounded-tr":ye()}],"rounded-br":[{"rounded-br":ye()}],"rounded-bl":[{"rounded-bl":ye()}],"border-w":[{border:xe()}],"border-w-x":[{"border-x":xe()}],"border-w-y":[{"border-y":xe()}],"border-w-s":[{"border-s":xe()}],"border-w-e":[{"border-e":xe()}],"border-w-bs":[{"border-bs":xe()}],"border-w-be":[{"border-be":xe()}],"border-w-t":[{"border-t":xe()}],"border-w-r":[{"border-r":xe()}],"border-w-b":[{"border-b":xe()}],"border-w-l":[{"border-l":xe()}],"divide-x":[{"divide-x":xe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":xe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Fe(),"hidden","none"]}],"divide-style":[{divide:[...Fe(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-bs":[{"border-bs":V()}],"border-color-be":[{"border-be":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...Fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,Te,Se]}],"outline-w":[{outline:["",Xe,Os,yi]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",m,Xc,Zc]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",y,Xc,Zc]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Xe,yi]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":xe()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",v,Xc,Zc]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Xe,Te,Se]}],"mix-blend":[{"mix-blend":[...Ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ye()}],"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":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":je()}],"mask-image-linear-to-pos":[{"mask-linear-to":je()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":je()}],"mask-image-t-to-pos":[{"mask-t-to":je()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":je()}],"mask-image-r-to-pos":[{"mask-r-to":je()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":je()}],"mask-image-b-to-pos":[{"mask-b-to":je()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":je()}],"mask-image-l-to-pos":[{"mask-l-to":je()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":je()}],"mask-image-x-to-pos":[{"mask-x-to":je()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":je()}],"mask-image-y-to-pos":[{"mask-y-to":je()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[Te,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":je()}],"mask-image-radial-to-pos":[{"mask-radial-to":je()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":je()}],"mask-image-conic-to-pos":[{"mask-conic-to":je()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:me()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Se]}],filter:[{filter:["","none",Te,Se]}],blur:[{blur:Rt()}],brightness:[{brightness:[Xe,Te,Se]}],contrast:[{contrast:[Xe,Te,Se]}],"drop-shadow":[{"drop-shadow":["","none",_,Xc,Zc]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Xe,Te,Se]}],"hue-rotate":[{"hue-rotate":[Xe,Te,Se]}],invert:[{invert:["",Xe,Te,Se]}],saturate:[{saturate:[Xe,Te,Se]}],sepia:[{sepia:["",Xe,Te,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Se]}],"backdrop-blur":[{"backdrop-blur":Rt()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,Te,Se]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,Te,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,Te,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,Te,Se]}],"backdrop-invert":[{"backdrop-invert":["",Xe,Te,Se]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,Te,Se]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,Te,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,Te,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",Te,Se]}],ease:[{ease:["linear","initial",L,Te,Se]}],delay:[{delay:[Xe,Te,Se]}],animate:[{animate:["none",M,Te,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Te,Se]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:Rn()}],"rotate-x":[{"rotate-x":Rn()}],"rotate-y":[{"rotate-y":Rn()}],"rotate-z":[{"rotate-z":Rn()}],scale:[{scale:wn()}],"scale-x":[{"scale-x":wn()}],"scale-y":[{"scale-y":wn()}],"scale-z":[{"scale-z":wn()}],"scale-3d":["scale-3d"],skew:[{skew:pt()}],"skew-x":[{"skew-x":pt()}],"skew-y":[{"skew-y":pt()}],transform:[{transform:[Te,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Xt()}],"translate-x":[{"translate-x":Xt()}],"translate-y":[{"translate-y":Xt()}],"translate-z":[{"translate-z":Xt()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",Te,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,Se]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Xe,Os,yi,A_]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},m6=KO(p6);function wt(...e){return m6(CO(e))}const g6=T.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[T.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"}),T.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"}),T.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"}),T.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"})]}),y6=T.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:T.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"})}),v6={google:g6,github:y6},b6={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function k6(e){return b6[e]||String(e||"").replace(/-/g," ")}function _6({title:e,subtitle:t,className:n="",onSuccess:a,hideLogo:o=!1}){Cl();const{enabled:s,signedIn:l,refreshUser:u,signInWithPassword:f,signUp:h,signInWithOAuth:m,getPublicAuthConfig:y}=Vo(),[v,_]=k.useState("signin"),[x,S]=k.useState(""),[C,L]=k.useState(""),[M,E]=k.useState(""),[A,B]=k.useState(!1),[z,H]=k.useState(null),[P,Z]=k.useState(null),[X,fe]=k.useState(!1),[he,Q]=k.useState(!0),[J,te]=k.useState([]),[ee,se]=k.useState(8);k.useEffect(()=>{if(!s)return;let I=!0;return Q(!0),(async()=>{const{data:W,error:me}=await y();if(I){if(me||!W)te(["google","github"]);else{const pe=Array.isArray(W.oAuthProviders)?W.oAuthProviders:[],ye=Array.isArray(W.customOAuthProviders)?W.customOAuthProviders:[];te([...pe,...ye]),typeof W.passwordMinLength=="number"&&W.passwordMinLength>0&&se(W.passwordMinLength)}Q(!1)}})(),()=>{I=!1}},[s,y]),k.useEffect(()=>{l&&a&&a()},[l,a]);const F=k.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),Y=k.useCallback(async I=>{H(null),B(!0);try{const{error:W}=await m(I,F);W&&H(W.message||String(W))}finally{B(!1)}},[m,F]),V=k.useCallback(async I=>{I.preventDefault(),H(null),B(!0);try{if(v==="signup"){const{data:me,error:pe}=await h({email:x.trim(),password:C,name:M.trim()||void 0});if(pe){H(pe.message||String(pe));return}if(me?.requireEmailVerification){Z(Le("login.verify_email_pending")),_("signin");return}await u();return}const{error:W}=await f({email:x.trim(),password:C});if(W){H(W.message||String(W));return}await u()}finally{B(!1)}},[v,x,C,M,h,f,u]);return s?T.jsxs("div",{className:wt("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",n),children:[T.jsxs("div",{className:"text-center mb-6",children:[!o&&T.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[T.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),T.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white font-oai tracking-tight",children:Le("shared.app_name")})]}),T.jsx("h2",{className:wt("text-sm font-semibold text-oai-black dark:text-white tracking-tight mb-1",o&&"text-base font-bold md:text-lg"),children:e||Le("login_modal.subtitle")}),t&&T.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})]}),P&&T.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:P}),z&&T.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:z}),T.jsx("div",{className:"space-y-2.5 mb-5",children:he?T.jsxs("div",{className:"space-y-2.5",children:[T.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),T.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):J.map(I=>T.jsxs("button",{type:"button",disabled:A,onClick:()=>Y(I),className:wt("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:[v6[I]||null,Le("login.oauth.continue",{provider:k6(I)})]},I))}),X?T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"relative mb-5",children:[T.jsx("div",{className:"absolute inset-0 flex items-center",children:T.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),T.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:T.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Le("login_modal.divider_email")})})]}),T.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:[T.jsx("button",{type:"button",className:wt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",v==="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:()=>{_("signin"),H(null)},children:Le("login.tab.sign_in")}),T.jsx("button",{type:"button",className:wt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",v==="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:()=>{_("signup"),H(null)},children:Le("login.tab.sign_up")})]}),T.jsxs("form",{onSubmit:V,className:"space-y-3",children:[v==="signup"&&T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Le("login.field.name")}),T.jsx("input",{id:"card-name",type:"text",autoComplete:"name",value:M,onChange:I=>E(I.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:Le("login.field.name_placeholder")})]}),T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Le("login.field.email")}),T.jsx("input",{id:"card-email",type:"email",autoComplete:"email",required:!0,value:x,onChange:I=>S(I.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"})]}),T.jsxs("div",{children:[T.jsx("label",{htmlFor:"card-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:Le("login.field.password")}),T.jsx("input",{id:"card-password",type:"password",autoComplete:v==="signup"?"new-password":"current-password",required:!0,minLength:v==="signup"?ee:void 0,value:C,onChange:I=>L(I.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"}),v==="signup"&&T.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:Le("login.password_hint",{min:String(ee)})})]}),T.jsx("button",{type:"submit",disabled:A,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:Le(v==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"relative mb-5",children:[T.jsx("div",{className:"absolute inset-0 flex items-center",children:T.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),T.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:T.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:Le("login.divider")})})]}),T.jsxs("button",{type:"button",onClick:()=>fe(!0),className:wt("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:[T.jsx(nI,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),Le("login_modal.continue_email")]})]})]}):null}function w6(){const{isOpen:e,closeLoginModal:t}=rx(),{enabled:n}=Vo();return k.useEffect(()=>{if(!e)return;const a=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),n?T.jsx(I1,{children:e&&T.jsxs(el.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:[T.jsx(el.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),T.jsxs(el.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:[T.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:T.jsx(Rm,{className:"h-5 w-5"})}),T.jsx(_6,{onSuccess:t,className:"p-6 bg-transparent"})]})]})}):null}const x6={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},uU="https://tokentracker.statuspage.io/";function P6(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?x6:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||rr()).trim()}function dU(){return rr()}function S6(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 C6=300*1e3,T6=720*60*1e3;function cg(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function E6(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const n=Date.parse(e.issuedAt);return Number.isFinite(n)?n+T6<=t:!0}async function sP(e,t){const n=rr();if(!cg(n)||!e)return;const a=n.replace(/\/$/,""),o=wl(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};o&&(s.apikey=o);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:t})})}catch{}}async function A6(e){const t=rr();if(!cg(t)||!e)return null;const n=t.replace(/\/$/,""),a=wl(),o={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};a&&(o.apikey=a);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:o,body:JSON.stringify({device_name:"Token Tracker (dashboard)",platform:s})});if(!l.ok)return null;const u=await l.json().catch(()=>null),f=typeof u?.token=="string"?u.token:null,h=typeof u?.device_id=="string"?u.device_id:null;return!f||!h?null:{token:f,deviceId:h,issuedAt:typeof u?.created_at=="string"?u.created_at:new Date().toISOString()}}async function L_(e){const{deviceToken:t,insforgeBaseUrl:n}=e,a={deviceToken:t},o=n||rr();cg(o)&&(a.insforgeBaseUrl=o.trim());const s=await cd(),l=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...s},body:JSON.stringify(a)}),u=await l.json().catch(()=>({}));if(!l.ok){const f=typeof u.error=="string"?u.error:`HTTP ${l.status}`;throw new Error(f)}return u}async function I_(e){const t=await e();if(!t)return null;const n=bw();if(n&&!E6(n))return n;const a=await A6(t);return a?(OR(a),a):null}async function lP(e){let t=await e();if(!t)return null;let n=await I_(async()=>t);if(!n)return t;try{return await L_({deviceToken:n.token,insforgeBaseUrl:rr()}),t}catch(a){if(!bw()||(kw(),t=await e(),!t)||(n=await I_(async()=>t),!n))throw a;return await L_({deviceToken:n.token,insforgeBaseUrl:rr()}),t}}async function R6(e){const t=jR();if(Date.now()-t<C6)return;const n=await lP(e);n&&(_w(Date.now()),await sP(n,"cloud-sync-auto"))}async function hU(e){const t=await lP(e);t&&(_w(Date.now()),await sP(t,"cloud-sync-now"))}function D6(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function L6(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||D6(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function I6(){const e=Jn(),t=Vo(),n=k.useRef(!1);k.useEffect(()=>{if(!MR()||!L6(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!NR())return;let a=!1;const o=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await R6(()=>t.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(o)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function M6(){const e=k.useContext(nx);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function N6({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function O6(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 j6(e){return e?Em()?`/api/avatar-proxy?url=${encodeURIComponent(e)}`:e:null}function Qc(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 M_({className:e,variant:t="header",collapsed:n=!1,onAfterAction:a}){Cl();const o=t==="sidebar",{enabled:s,loading:l,signedIn:u,user:f,displayName:h}=Vo(),{openLoginModal:m}=rx(),y=kl(),v=k.useMemo(()=>O6(f),[f]),_=k.useMemo(()=>j6(v),[v]),[x,S]=al.useState(!1);if(al.useEffect(()=>{S(!1)},[_]),!s)return null;if(l)return T.jsx("div",{className:wt("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",e),"aria-hidden":!0});if(!u)return o?T.jsxs("button",{type:"button",onClick:()=>{m(),a?.()},className:wt("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":Le("header.auth.sign_in_aria"),title:n?Le("header.auth.sign_in_aria"):void 0,children:[T.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:T.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&T.jsx("span",{className:"truncate flex-1 text-left",children:Le("header.auth.sign_in_aria")})]}):T.jsx("button",{type:"button",onClick:m,className:wt("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":Le("header.auth.sign_in_aria"),children:Le("header.auth.sign_in_aria")});const C=()=>{y("/settings"),a?.()};return T.jsx("div",{className:wt(o?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:T.jsxs("button",{type:"button",onClick:C,className:wt(o?wt("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":Le("header.auth.open_settings"),title:o&&n?h:void 0,children:[o?T.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:_&&!x?T.jsx("img",{src:_,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)}):Qc(h)==="?"?T.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:T.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:T.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"})})}):T.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:Qc(h)})}):_&&!x?T.jsx("img",{src:_,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)}):Qc(h)==="?"?T.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:T.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:T.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"})})}):T.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:Qc(h)}),o?!n&&T.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:h}):T.jsx("span",{className:"hidden sm:inline truncate text-sm font-medium text-oai-gray-900 dark:text-oai-gray-200 max-w-[120px]",children:h})]})})}const Op="tt.sidebarCollapsed";function cP(){return[{id:"general",label:Le("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:GL,label:Le("nav.usage")},{id:"limits",to:"/limits",icon:ZL,label:Le("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:kI,label:Le("nav.leaderboard")}]},{id:"tools",label:Le("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:eI,label:Le("nav.widgets")},{id:"skills",to:"/skills",icon:cI,label:Le("nav.skills")},{id:"ip-check",to:"/ip-check",icon:QL,label:Le("nav.ip_check")}]},{id:"account",label:Le("nav.group.account"),items:[{id:"settings",to:"/settings",icon:mI,label:Le("nav.settings")}]}]}function U6(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Op)==="1"}catch{return!1}}function B6(){const[e,t]=k.useState(U6),n=k.useCallback(()=>{t(a=>{const o=!a;try{typeof window<"u"&&window.localStorage.setItem(Op,o?"1":"0")}catch{}return o})},[]);return k.useEffect(()=>{if(typeof window>"u")return;const a=o=>{o.key===Op&&t(o.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:e,toggle:n}}function F6(e,t){const n=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?n==="/dashboard"||n==="/":t==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===t}function z6({label:e,collapsed:t,first:n}){return t?n?null:T.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):T.jsx("div",{className:wt("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 V6({item:e,collapsed:t,active:n,onClick:a}){const o=e.icon;return T.jsxs(ad,{to:e.to,onClick:a,title:t?e.label:void 0,"aria-current":n?"page":void 0,className:wt("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:[T.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:T.jsx(o,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&T.jsx("span",{className:"truncate",children:e.label})]})}function $6({as:e="button",title:t,onClick:n,href:a,children:o,className:s,...l}){const u=wt("flex h-10 w-10 items-center justify-center rounded-lg text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",s);return e==="a"?T.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:u,...l,children:o}):T.jsx("button",{type:"button",title:t,"aria-label":t,onClick:n,className:u,...l,children:o})}function H6({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[n,a]=k.useState(null);return k.useEffect(()=>{if(typeof window>"u")return;const o=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;N6({prefersReducedMotion:o,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&a(s.stargazers_count)}).catch(()=>{})},[e]),T.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:wt("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:[T.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:T.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"})}),T.jsx("span",{children:"Star"}),n!==null&&T.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const W6=[{value:"light",label:"Light",Icon:tx},{value:"dark",label:"Dark",Icon:ex},{value:"system",label:"System",Icon:oI}];function G6({theme:e,resolvedTheme:t,onSetTheme:n,glassChrome:a=!1}){const[o,s]=k.useState(!1),l=k.useRef(null),u=t==="dark"?ex:tx;return k.useEffect(()=>{if(!o)return;const f=m=>{l.current&&!l.current.contains(m.target)&&s(!1)},h=m=>{m.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",f),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",f),document.removeEventListener("keydown",h)}},[o]),T.jsxs("div",{ref:l,className:"relative",children:[T.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":o,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(f=>!f),className:wt("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:T.jsx(u,{className:"h-3.5 w-3.5","aria-hidden":!0})}),o&&T.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:W6.map(({value:f,label:h,Icon:m})=>{const y=e===f;return T.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(f),s(!1)},className:wt("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",y?"text-oai-black dark:text-white bg-oai-gray-100 dark:bg-oai-gray-800":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 hover:text-oai-black dark:hover:text-white"),children:[T.jsx(m,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),T.jsx("span",{children:h})]},f)})})]})}function uP({collapsed:e,onToggleCollapsed:t,onItemClick:n,showCloseButton:a=!1,onClose:o,glassChrome:s=!1}){const u=Jn()?.pathname||"/",{theme:f,resolvedTheme:h,setTheme:m}=M6(),{resolvedLocale:y}=Cl(),v=k.useMemo(()=>cP(),[y]);return T.jsxs(T.Fragment,{children:[T.jsx("div",{className:wt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:a?T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"flex-1 min-w-0",children:T.jsx(M_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),T.jsx("button",{type:"button",onClick:o,"aria-label":Le("nav.close_menu"),title:Le("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:T.jsx(Rm,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):T.jsx(M_,{variant:"sidebar",collapsed:e,onAfterAction:n})}),T.jsx("nav",{"aria-label":Le("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:v.map((_,x)=>T.jsxs("div",{className:"flex flex-col",children:[T.jsx(z6,{label:_.label,collapsed:e,first:x===0}),T.jsx("div",{className:"flex flex-col gap-0.5",children:_.items.map(S=>T.jsx(V6,{item:S,collapsed:e,active:F6(u,S.to),onClick:n},S.id))})]},_.id))}),T.jsxs("div",{className:wt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[T.jsx(G6,{theme:f,resolvedTheme:h,onSetTheme:m,glassChrome:s}),T.jsx("div",{className:"flex items-center gap-1.5",children:!e&&T.jsx(H6,{glassChrome:s})})]})]})}function K6({collapsed:e,onToggleCollapsed:t}){const n=k.useMemo(()=>typeof window>"u"?!1:pa()||Em(),[]);return T.jsx("aside",{"aria-label":Le("nav.aside_label"),className:wt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:T.jsx(uP,{collapsed:e,onToggleCollapsed:t,glassChrome:n})})}function q6({open:e,onClose:t}){return k.useEffect(()=>{if(!e)return;const n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),k.useEffect(()=>{if(!e)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e]),e?T.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[T.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),T.jsx("aside",{"aria-label":Le("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:T.jsx(uP,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function Y6({onOpenDrawer:e}){return T.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:[T.jsx($6,{title:Le("nav.menu"),onClick:e,children:T.jsx(rI,{className:"h-5 w-5","aria-hidden":!0})}),T.jsxs(ad,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[T.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),T.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),T.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function Z6({children:e}){const{collapsed:t,toggle:n}=B6(),[a,o]=k.useState(!1),s=k.useCallback(()=>o(!0),[]),l=k.useCallback(()=>o(!1),[]),u=k.useMemo(()=>typeof window>"u"?!1:pa()||Em(),[]);return T.jsxs("div",{className:wt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",u?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[u&&T.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),T.jsxs("div",{className:"flex-1 min-h-0 flex",children:[T.jsx(K6,{collapsed:t,onToggleCollapsed:n}),T.jsx(q6,{open:a,onClose:l}),T.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:T.jsxs("div",{className:wt("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:[T.jsx(Y6,{onOpenDrawer:s}),T.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}function X6({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 Q6({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:T.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 J6({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 ej({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 tj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 nj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 aj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function rj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:[T.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"}),T.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 ij({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:T.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 oj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 60",fill:"none",className:t,"aria-hidden":"true",children:[T.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"}),T.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:T.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),T.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:T.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function sj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:T.jsx("path",{d:"M7 2h10a5 5 0 015 5v10a5 5 0 01-5 5H7a5 5 0 01-5-5V7a5 5 0 015-5zm0 4.5v11h2.35v-4.55h5.3V17.5H17v-11h-2.35v4.1h-5.3V6.5H7z"})})}function lj({size:e=16,className:t=""}){return T.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:t,children:T.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 cj({size:e=16,className:t=""}){return T.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:T.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:T.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 uj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[T.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),T.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),T.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),T.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),T.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),T.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function dj({size:e=16,className:t=""}){return T.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[T.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),T.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),T.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}function hj({size:e=16,className:t=""}){return T.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:[T.jsx("path",{d:"M9 3v2"}),T.jsx("path",{d:"M15 3v2"}),T.jsx("rect",{x:"4",y:"6",width:"16",height:"13",rx:"3"}),T.jsx("circle",{cx:"9",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),T.jsx("circle",{cx:"15",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),T.jsx("path",{d:"M9 16h6"})]})}const fj={CLAUDE:X6,CODEBUDDY:oj,CODEX:Q6,COPILOT:ij,CRAFT:cj,CURSOR:J6,DROID:hj,GEMINI:ej,GITHUB:lj,GROK:tj,HERMES:sj,KIMI:rj,KIRO:nj,OPENCODE:aj,OMP:uj,PI:dj},pj={ANTIGRAVITY:"/brand-logos/antigravity.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",GEMINI:"/brand-logos/gemini.svg",HERMES:"/brand-logos/hermes.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"};function mj({size:e=16,className:t=""}){return T.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:T.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function gj({provider:e,size:t=16,color:n,className:a=""}){const o=e?.toUpperCase?.()||"",s=pj[o];if(s)return T.jsx("img",{src:s,alt:"",width:t,height:t,className:a,style:{width:t,height:t,objectFit:"contain"},"aria-hidden":!0});const l=fj[o];return l?T.jsx(l,{size:t,className:a}):T.jsx(mj,{size:t,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${a}`})}const dP="tokentracker-skills";async function Bi(e){const t=new URL(`/functions/${dP}`,window.location.origin);if(e)for(const[o,s]of Object.entries(e))s!=null&&s!==""&&t.searchParams.set(o,String(s));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 Qr(e){const t=await cd(),n=await fetch(`/functions/${dP}`,{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 yj(){return Bi({mode:"installed"})}function fU(e={}){return Bi({mode:"discover",...e.force?{force:1}:{}})}function pU(e,t=0,n=20){return Bi({mode:"search",q:e,offset:t,limit:n})}function mU(){return Bi({mode:"repos"})}function gU(e,t){return Qr({action:"install",skill:e,targets:t})}function yU(e){return Qr({action:"uninstall",id:e})}function vU(e){return Qr({action:"restore",id:e})}function bU(e,t){return Qr({action:"set_targets",id:e,targets:t})}function kU(e,t){return Qr({action:"import_local",directory:e,targets:t})}function _U(e,t){return Qr({action:"delete_local",directory:e,targets:t||[]})}function wU(e){return Qr({action:"add_repo",repo:e})}function xU(e,t){return Qr({action:"remove_repo",owner:e,name:t})}function PU(e={}){return Bi({mode:"popular",...e.force?{force:1}:{}})}function SU(e={}){return Bi({mode:"updates",...e.force?{force:1}:{}})}function CU(e={}){return Bi({mode:"skill_usage",...e.force?{force:1}:{}})}const vj=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function bj(){const e=kl(),t=SO(),[n,a]=k.useState(!1),[o,s]=k.useState(""),[l,u]=k.useState(0),[f,h]=k.useState([]),m=k.useRef(null),y=k.useRef(null);k.useEffect(()=>{const E=A=>{(A.metaKey||A.ctrlKey)&&(A.key==="k"||A.key==="K")&&(A.preventDefault(),a(z=>!z))};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]),k.useEffect(()=>{if(!n)return;s(""),u(0);const E=requestAnimationFrame(()=>m.current?.focus());return vj&&!f.length&&yj().then(A=>h(A?.skills||[])).catch(()=>h([])),()=>cancelAnimationFrame(E)},[n,f.length]);const v=k.useMemo(()=>{const E=cP().flatMap(B=>B.items.map(z=>({kind:"page",id:`page:${z.id}`,label:z.label,sub:Le("cmdk.group.pages"),Icon:z.icon,run:()=>e(z.to)}))),A=(f||[]).map(B=>({kind:"skill",id:`skill:${B.id||B.directory}`,label:B.name||B.directory,sub:B.repoOwner&&B.repoName?`${B.repoOwner}/${B.repoName}`:Le("cmdk.group.skills"),provider:(B.targets||[])[0]||"claude",run:()=>e(`/skills?skill=${encodeURIComponent(B.directory||B.id)}`)}));return[...E,...A]},[e,f]),_=k.useMemo(()=>{const E=o.trim().toLowerCase();return E?v.filter(A=>A.label.toLowerCase().includes(E)||String(A.sub||"").toLowerCase().includes(E)):v},[v,o]);k.useEffect(()=>{l>=_.length&&u(_.length?_.length-1:0)},[l,_.length]),k.useEffect(()=>{if(!n)return;y.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,n]);const x=k.useCallback(()=>a(!1),[]),S=k.useCallback(E=>{E&&(x(),E.run())},[x]),C=E=>{E.key==="ArrowDown"?(E.preventDefault(),u(A=>Math.min(A+1,Math.max(0,_.length-1)))):E.key==="ArrowUp"?(E.preventDefault(),u(A=>Math.max(A-1,0))):E.key==="Enter"?(E.preventDefault(),S(_[l])):E.key==="Escape"&&(E.preventDefault(),x())},L={duration:t?0:.12},M=t?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return T.jsx(I1,{children:n?T.jsxs(el.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:[T.jsx("button",{type:"button","aria-label":Le("cmdk.close"),onClick:x,className:"absolute inset-0 cursor-default bg-oai-black/40"}),T.jsxs(el.div,{role:"dialog","aria-modal":"true","aria-label":Le("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:M,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:[T.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[T.jsx(fI,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),T.jsx("input",{ref:m,type:"text",value:o,onChange:E=>{s(E.target.value),u(0)},onKeyDown:C,"aria-label":Le("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":_[l]?`cmdk-opt-${l}`:void 0,role:"combobox","aria-expanded":"true",placeholder:Le("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"})]}),T.jsx("div",{ref:y,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:_.length===0?T.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:Le("cmdk.empty")}):_.map((E,A)=>{const B=A===l;return T.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${A}`,"data-cmdk-index":A,"aria-selected":B,onMouseMove:()=>u(A),onClick:()=>S(E),className:wt("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",B?"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:[T.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"?T.jsx(gj,{provider:E.provider,size:16}):T.jsx(E.Icon,{className:"h-4 w-4","aria-hidden":!0})}),T.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:E.label}),T.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:E.sub}),B?T.jsx(qL,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},E.id)})})]})]}):null})}function gd(){return typeof window<"u"}function ug(e){return dg(e)?(e.nodeName||"").toLowerCase():"#document"}function qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kj(e){var t;return(t=(dg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dg(e){return gd()?e instanceof Node||e instanceof qr(e).Node:!1}function hP(e){return gd()?e instanceof Element||e instanceof qr(e).Element:!1}function yd(e){return gd()?e instanceof HTMLElement||e instanceof qr(e).HTMLElement:!1}function jp(e){return!gd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qr(e).ShadowRoot}function fP(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=mP(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&o!=="inline"&&o!=="contents"}function TU(e){return/^(table|td|th)$/.test(ug(e))}function _j(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const wj=/transform|translate|scale|rotate|perspective|filter/,xj=/paint|layout|strict|content/,vi=e=>!!e&&e!=="none";let Uf;function Pj(e){const t=hP(e)?mP(e):e;return vi(t.transform)||vi(t.translate)||vi(t.scale)||vi(t.rotate)||vi(t.perspective)||!Sj()&&(vi(t.backdropFilter)||vi(t.filter))||wj.test(t.willChange||"")||xj.test(t.contain||"")}function EU(e){let t=Up(e);for(;yd(t)&&!pP(t);){if(Pj(t))return t;if(_j(t))return null;t=Up(t)}return null}function Sj(){return Uf==null&&(Uf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Uf}function pP(e){return/^(html|body|#document)$/.test(ug(e))}function mP(e){return qr(e).getComputedStyle(e)}function AU(e){return hP(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Up(e){if(ug(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jp(e)&&e.host||kj(e);return jp(t)?t.host:t}function gP(e){const t=Up(e);return pP(t)?e.ownerDocument?e.ownerDocument.body:e.body:yd(t)&&fP(t)?t:gP(t)}function N_(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=gP(e),s=o===((a=e.ownerDocument)==null?void 0:a.body),l=qr(o);if(s){const u=Cj(l);return t.concat(l,l.visualViewport||[],fP(o)?o:[],u&&n?N_(u):[])}else return t.concat(o,N_(o,[],n))}function Cj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Eo(e){return e?.ownerDocument||document}const O_={};function Dl(e,t){const n=k.useRef(O_);return n.current===O_&&(n.current=e(t)),n}const Bf=qp[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Tj=Bf&&Bf!==k.useLayoutEffect?Bf:e=>e();function An(e){const t=Dl(Ej).current;return t.next=e,Tj(t.effect),t.trampoline}function Ej(){const e={next:void 0,callback:Aj,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Aj(){}let j_=0;function yP(e){return j_+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${j_}`}const Rj=[];function vP(e){k.useEffect(e,Rj)}const js=0;class pl{static create(){return new pl}currentId=js;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=js,n()},t)}isStarted(){return this.currentId!==js}clear=()=>{this.currentId!==js&&(clearTimeout(this.currentId),this.currentId=js)};disposeEffect=()=>this.clear}function RU(){const e=Dl(pl.create).current;return vP(e.disposeEffect),e}const Go=typeof navigator<"u",Ff=Ij(),bP=Nj(),kP=Mj(),DU=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),LU=Ff.platform==="MacIntel"&&Ff.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Ff.platform),Dj=Go&&/apple/i.test(navigator.vendor),IU=Go&&/android/i.test(bP)||/android/i.test(kP);Go&&bP.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Lj=kP.includes("jsdom/");function Ij(){if(!Go)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 Mj(){if(!Go)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Nj(){if(!Go)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const U_="data-base-ui-focusable",MU="active",NU="selected",Oj="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",OU="ArrowLeft",jU="ArrowRight",UU="ArrowUp",BU="ArrowDown";function ml(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ti(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&jp(n)){let a=t;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function Bp(e){return"composedPath"in e?e.composedPath()[0]:e.target}function FU(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 zU(e){return e.matches("html,body")}function vd(e){return e?.ownerDocument||document}function jj(e){return yd(e)&&e.matches(Oj)}function VU(e){return e?e.getAttribute("role")==="combobox"&&jj(e):!1}function Fp(e){if(!e||Lj)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function $U(e){return e?e.hasAttribute(U_)?e:e.querySelector(`[${U_}]`)||e:null}function Ll(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(a=>n.searchParams.append("args[]",a)),`Base UI error #${e}; visit ${n} for the full message.`}var Uj=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Zu=Uj.join(","),_P=typeof Element>"u",Bo=_P?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xu=!_P&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Qu=function(t,n){var a;n===void 0&&(n=!0);var o=t==null||(a=t.getAttribute)===null||a===void 0?void 0:a.call(t,"inert"),s=o===""||o==="true",l=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Qu(t.parentNode));return l},Bj=function(t){var n,a=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return a===""||a==="true"},wP=function(t,n,a){if(Qu(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Zu));return n&&Bo.call(t,Zu)&&o.unshift(t),o=o.filter(a),o},Ju=function(t,n,a){for(var o=[],s=Array.from(t);s.length;){var l=s.shift();if(!Qu(l,!1))if(l.tagName==="SLOT"){var u=l.assignedElements(),f=u.length?u:l.children,h=Ju(f,!0,a);a.flatten?o.push.apply(o,h):o.push({scopeParent:l,candidates:h})}else{var m=Bo.call(l,Zu);m&&a.filter(l)&&(n||!t.includes(l))&&o.push(l);var y=l.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(l),v=!Qu(y,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(l));if(y&&v){var _=Ju(y===!0?l.children:y.children,!0,a);a.flatten?o.push.apply(o,_):o.push({scopeParent:l,candidates:_})}else s.unshift.apply(s,l.children)}}return o},xP=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},PP=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Bj(t))&&!xP(t)?0:t.tabIndex},Fj=function(t,n){var a=PP(t);return a<0&&n&&!xP(t)?0:a},zj=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},SP=function(t){return t.tagName==="INPUT"},Vj=function(t){return SP(t)&&t.type==="hidden"},$j=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(a){return a.tagName==="SUMMARY"});return n},Hj=function(t,n){for(var a=0;a<t.length;a++)if(t[a].checked&&t[a].form===n)return t[a]},Wj=function(t){if(!t.name)return!0;var n=t.form||Xu(t),a=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=a(window.CSS.escape(t.name));else try{o=a(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var s=Hj(o,t.form);return!s||s===t},Gj=function(t){return SP(t)&&t.type==="radio"},Kj=function(t){return Gj(t)&&!Wj(t)},qj=function(t){var n,a=t&&Xu(t),o=(n=a)===null||n===void 0?void 0:n.host,s=!1;if(a&&a!==t){var l,u,f;for(s=!!((l=o)!==null&&l!==void 0&&(u=l.ownerDocument)!==null&&u!==void 0&&u.contains(o)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!s&&o;){var h,m,y;a=Xu(o),o=(h=a)===null||h===void 0?void 0:h.host,s=!!((m=o)!==null&&m!==void 0&&(y=m.ownerDocument)!==null&&y!==void 0&&y.contains(o))}}return s},B_=function(t){var n=t.getBoundingClientRect(),a=n.width,o=n.height;return a===0&&o===0},Yj=function(t,n){var a=n.displayCheck,o=n.getShadowRoot;if(a==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var l=Bo.call(t,"details>summary:first-of-type"),u=l?t.parentElement:t;if(Bo.call(u,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof o=="function"){for(var f=t;t;){var h=t.parentElement,m=Xu(t);if(h&&!h.shadowRoot&&o(h)===!0)return B_(t);t.assignedSlot?t=t.assignedSlot:!h&&m!==t.ownerDocument?t=m.host:t=h}t=f}if(qj(t))return!t.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return B_(t);return!1},Zj=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var a=0;a<n.children.length;a++){var o=n.children.item(a);if(o.tagName==="LEGEND")return Bo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},zp=function(t,n){return!(n.disabled||Vj(n)||Yj(n,t)||$j(n)||Zj(n))},Vp=function(t,n){return!(Kj(n)||PP(n)<0||!zp(t,n))},Xj=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},CP=function(t){var n=[],a=[];return t.forEach(function(o,s){var l=!!o.scopeParent,u=l?o.scopeParent:o,f=Fj(u,l),h=l?CP(o.candidates):u;f===0?l?n.push.apply(n,h):n.push(u):a.push({documentOrder:s,tabIndex:f,item:o,isScope:l,content:h})}),a.sort(zj).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},hg=function(t,n){n=n||{};var a;return n.getShadowRoot?a=Ju([t],n.includeContainer,{filter:Vp.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Xj}):a=wP(t,n.includeContainer,Vp.bind(null,n)),CP(a)},HU=function(t,n){n=n||{};var a;return n.getShadowRoot?a=Ju([t],n.includeContainer,{filter:zp.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):a=wP(t,n.includeContainer,zp.bind(null,n)),a},WU=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Bo.call(t,Zu)===!1?!1:Vp(n,t)};const fg=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function TP(e,t){const n=hg(e,fg()),a=n.length;if(a===0)return;const o=ml(vd(e)),s=n.indexOf(o),l=s===-1?t===1?0:a-1:s+t;return n[l]}function Qj(e){return TP(vd(e).body,1)||e}function Jj(e){return TP(vd(e).body,-1)||e}function EP(e,t){if(!e)return null;const n=hg(vd(e).body,fg()),a=n.length;if(a===0)return null;const o=n.indexOf(e);if(o===-1)return null;const s=(o+t+a)%a;return n[s]}function GU(e){return EP(e,1)}function KU(e){return EP(e,-1)}function zf(e,t){const n=t||e.currentTarget,a=e.relatedTarget;return!a||!Ti(n,a)}function e8(e){hg(e,fg()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function F_(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const a=n.dataset.tabindex;delete n.dataset.tabindex,a?n.setAttribute("tabindex",a):n.removeAttribute("tabindex")})}const pg=k.createContext(void 0);function mg(){const e=k.useContext(pg);if(!e)throw new Error(Ll(73));return e}function Vf(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 t8=function(t){const{children:n,timeout:a=5e3,limit:o=3,toastManager:s}=t,[l,u]=k.useState([]),[f,h]=k.useState(!1),[m,y]=k.useState(!1),[v,_]=k.useState(null);l.length===0&&(f&&h(!1),m&&y(!1));const x=f||m,S=k.useRef(new Map),C=k.useRef(null),L=k.useRef(!0),M=k.useRef(!1);function E(Q){const J=ml(Eo(C.current));if(!C.current||!Ti(C.current,J)||!Fp(J))return;const te=l.findIndex(F=>F.id===Q);let ee=null,se=te+1;for(;se<l.length;){if(l[se].transitionStatus!=="ending"){ee=l[se];break}se+=1}if(!ee)for(se=te-1;se>=0;){if(l[se].transitionStatus!=="ending"){ee=l[se];break}se-=1}ee?ee.ref?.current?.focus():v?.focus({preventScroll:!0})}const A=An(()=>{M.current||(M.current=!0,S.current.forEach(Q=>{if(Q.timeout){Q.timeout.clear();const J=Date.now()-Q.start,te=Q.delay-J;Q.remaining=te>0?te:0}}))}),B=An(()=>{M.current&&(M.current=!1,S.current.forEach((Q,J)=>{Q.remaining=Q.remaining>0?Q.remaining:Q.delay,Q.timeout??=pl.create(),Q.timeout.start(Q.remaining,()=>{S.current.delete(J),Q.callback()}),Q.start=Date.now()}))}),z=An(Q=>{u(ee=>{const se=ee.map(Y=>Y.id===Q?{...Y,transitionStatus:"ending",height:0}:Y),F=se.filter(Y=>Y.transitionStatus!=="ending");return se.map(Y=>{if(Y.transitionStatus==="ending")return Y;const V=F.indexOf(Y)>=o;return{...Y,limited:V}})});const J=S.current.get(Q);J&&J.timeout&&(J.timeout.clear(),S.current.delete(Q)),l.find(ee=>ee.id===Q)?.onClose?.(),E(Q),l.length===1&&(h(!1),y(!1))}),H=An(Q=>{u(te=>te.filter(ee=>ee.id!==Q)),l.find(te=>te.id===Q)?.onRemove?.()}),P=An((Q,J,te)=>{const ee=Date.now(),se=L.current&&!f&&!m,F=se?pl.create():void 0;F?.start(J,()=>{S.current.delete(Q),te()}),S.current.set(Q,{timeout:F,start:se?ee:0,delay:J,remaining:J,callback:te})}),Z=An(Q=>{const J=Q.id||yP("toast"),te={...Q,id:J,transitionStatus:"starting"};u(se=>{const F=[te,...se],Y=F.filter(V=>V.transitionStatus!=="ending");if(Y.length>o){const V=Y.length-o,I=Y.slice(-V);return F.map(W=>I.some(me=>me.id===W.id)?{...W,limited:!0}:{...W,limited:!1})}return F.map(V=>({...V,limited:!1}))});const ee=te.timeout??a;return te.type!=="loading"&&ee>0&&P(J,ee,()=>z(J)),(f||m||!L.current)&&A(),J}),X=An((Q,J)=>{const te=l.find(pe=>pe.id===Q)??null,ee=te?{...te,...J}:null;if(Ni.flushSync(()=>{u(pe=>pe.map(ye=>ye.id===Q?{...ye,...J}:ye))}),!ee)return;const se=ee.timeout??a,F=te?.timeout??a,Y=Object.hasOwn(J,"timeout"),V=ee.transitionStatus!=="ending"&&ee.type!=="loading"&&se>0,I=S.current.has(Q),W=F!==se,me=te?.type==="loading";if(!V&&I){S.current.get(Q)?.timeout?.clear(),S.current.delete(Q);return}if(V&&(!I||W||Y||me)){const pe=S.current.get(Q);pe&&(pe.timeout?.clear(),S.current.delete(Q)),P(Q,se,()=>z(Q)),(f||m||!L.current)&&A()}}),fe=An((Q,J)=>{const te=Vf(J.loading),ee=Z({...te,type:"loading"}),se=Q.then(F=>{const Y=Vf(J.success,F);return X(ee,{...Y,type:"success",timeout:Y.timeout}),F}).catch(F=>{const Y=Vf(J.error,F);return X(ee,{...Y,type:"error",timeout:Y.timeout}),Promise.reject(F)});return{}.hasOwnProperty.call(J,"setPromise")&&J.setPromise(se),se});k.useEffect(function(){return s?s[" subscribe"](({action:te,options:ee})=>{const se=ee.id;te==="promise"&&ee.promise?fe(ee.promise,ee):te==="update"&&se?X(se,ee):te==="close"&&se?z(se):Z(ee)}):void 0},[Z,X,P,a,s,fe,z]);const he=k.useMemo(()=>({toasts:l,setToasts:u,hovering:f,setHovering:h,focused:m,setFocused:y,expanded:x,add:Z,close:z,remove:H,update:X,promise:fe,pauseTimers:A,resumeTimers:B,prevFocusElement:v,setPrevFocusElement:_,viewportRef:C,scheduleTimer:P,windowFocusedRef:L}),[Z,z,m,f,x,A,v,fe,H,B,P,l,X]);return T.jsx(pg.Provider,{value:he,children:n})},AP={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},RP={...AP,position:"fixed",top:0,left:0},qU={...AP,position:"absolute"},n8=()=>{},Il=typeof document<"u"?k.useLayoutEffect:n8,tl=k.forwardRef(function(t,n){const[a,o]=k.useState();Il(()=>{Dj&&o("button")},[]);const s={tabIndex:0,role:a};return T.jsx("span",{...t,ref:n,style:RP,"aria-hidden":a?void 0:!0,...s,"data-base-ui-focus-guard":""})}),a8=k.createContext(void 0);function z_(e,t,n,a){const o=Dl(DP).current;return i8(o,e,t,n,a)&&LP(o,[e,t,n,a]),o.callback}function r8(e){const t=Dl(DP).current;return o8(t,e)&&LP(t,e),t.callback}function DP(){return{callback:null,cleanup:null,refs:[]}}function i8(e,t,n,a,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==a||e.refs[3]!==o}function o8(e,t){return e.refs.length!==t.length||e.refs.some((n,a)=>n!==t[a])}function LP(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 o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(a[o]=l);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=a[o];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}const s8=parseInt(k.version,10);function IP(e){return s8>=e}function V_(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return(IP(19)?n?.ref:t.ref)??null}function $p(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function l8(e,t){const n={};for(const a in e){const o=e[a];if(t?.hasOwnProperty(a)){const s=t[a](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${a.toLowerCase()}`]="":o&&(n[`data-${a.toLowerCase()}`]=o.toString())}return n}function c8(e,t){return typeof e=="function"?e(t):e}function u8(e,t){return typeof e=="function"?e(t):e}const nl={};function MP(e,t,n,a,o){let s={...Hp(e,nl)};return t&&(s=Hs(s,t)),n&&(s=Hs(s,n)),a&&(s=Hs(s,a)),o&&(s=Hs(s,o)),s}function d8(e){if(e.length===0)return nl;if(e.length===1)return Hp(e[0],nl);let t={...Hp(e[0],nl)};for(let n=1;n<e.length;n+=1)t=Hs(t,e[n]);return t}function Hs(e,t){return NP(t)?t(e):h8(e,t)}function h8(e,t){if(!t)return e;for(const n in t){const a=t[n];switch(n){case"style":{e[n]=$p(e.style,a);break}case"className":{e[n]=OP(e.className,a);break}default:f8(n,a)?e[n]=p8(e[n],a):e[n]=a}}return e}function f8(e,t){const n=e.charCodeAt(0),a=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&a===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function NP(e){return typeof e=="function"}function Hp(e,t){return NP(e)?e(t):e??nl}function p8(e,t){return t?e?n=>{if(m8(n)){const o=n;Wp(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const a=t(n);return e?.(n),a}:t:e}function Wp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function OP(e,t){return t?e?t+" "+e:t:e}function m8(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function YU(){}const ZU=Object.freeze([]),zr=Object.freeze({}),XU=500,QU={style:{transition:"none"}},JU="data-base-ui-click-trigger",e7={fallbackAxisSide:"none"},t7={fallbackAxisSide:"end"},g8={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Ml(e,t,n={}){const a=t.render,o=y8(t,n);if(n.enabled===!1)return null;const s=n.state??zr;return v8(e,a,o,s)}function y8(e,t={}){const{className:n,style:a,render:o}=e,{state:s=zr,ref:l,props:u,stateAttributesMapping:f,enabled:h=!0}=t,m=h?c8(n,s):void 0,y=h?u8(a,s):void 0,v=h?l8(s,f):zr,_=h?$p(v,Array.isArray(u)?d8(u):u)??zr:zr;return typeof document<"u"&&(h?Array.isArray(l)?_.ref=r8([_.ref,V_(o),...l]):_.ref=z_(_.ref,V_(o),l):z_(null,null)),h?(m!==void 0&&(_.className=OP(_.className,m)),y!==void 0&&(_.style=$p(_.style,y)),_):zr}function v8(e,t,n,a){if(t){if(typeof t=="function")return t(n,a);const o=MP(n,t.props);return o.ref=n.ref,k.cloneElement(t,o)}if(e&&typeof e=="string")return b8(e,n);throw new Error(Ll(8))}function b8(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}let k8=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const _8=k.forwardRef(function(t,n){const{render:a,className:o,children:s,...l}=t,{toasts:u,pauseTimers:f,resumeTimers:h,setHovering:m,setFocused:y,viewportRef:v,windowFocusedRef:_,prevFocusElement:x,setPrevFocusElement:S,expanded:C,focused:L}=mg(),M=k.useRef(!1),E=k.useRef(!1),A=u.length,B=u[0]?.height??0,z=k.useMemo(()=>u.some(F=>F.transitionStatus==="ending"),[u]);k.useEffect(()=>{if(!v.current)return;function F(V){A!==0&&V.key==="F6"&&V.target!==v.current&&(V.preventDefault(),S(ml(Eo(v.current))),v.current?.focus({preventScroll:!0}),f(),y(!0))}const Y=qr(v.current);return Y.addEventListener("keydown",F),()=>{Y.removeEventListener("keydown",F)}},[f,y,S,A,v]),k.useEffect(()=>{if(!v.current||!A)return;const F=qr(v.current);function Y(I){I.target===F&&(_.current=!1,f())}function V(I){if(I.relatedTarget||I.target===F)return;const W=Bp(I),me=ml(Eo(v.current));(!Ti(v.current,W)||!Fp(me))&&h(),setTimeout(()=>{_.current=!0})}return F.addEventListener("blur",Y,!0),F.addEventListener("focus",V,!0),()=>{F.removeEventListener("blur",Y,!0),F.removeEventListener("focus",V,!0)}},[f,h,v,_,y,A]),k.useEffect(()=>{const F=v.current;if(!F||A===0)return;const Y=Eo(F);function V(I){if(I.pointerType!=="touch")return;const W=Bp(I);Ti(F,W)||(h(),m(!1),y(!1))}return Y.addEventListener("pointerdown",V,!0),()=>{Y.removeEventListener("pointerdown",V,!0)}},[A,h,y,m,v]);function H(F){v.current&&(M.current=!0,F.relatedTarget===v.current?u[0]?.ref?.current?.focus():x?.focus({preventScroll:!0}))}function P(F){F.key==="Tab"&&F.shiftKey&&F.target===v.current&&(F.preventDefault(),x?.focus({preventScroll:!0}),h())}k.useEffect(()=>{!_.current||z||!E.current||(h(),m(!1),E.current=!1)},[z,h,m,_]);function Z(){f(),m(!0),E.current=!1}function X(){u.some(F=>F.transitionStatus==="ending")?E.current=!0:(h(),m(!1))}function fe(){if(M.current){M.current=!1;return}L||Fp(Eo(v.current).activeElement)&&(y(!0),f())}function he(F){!L||Ti(v.current,F.relatedTarget)||(y(!1),h())}const Q={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:Z,onMouseMove:Z,onMouseLeave:X,onFocus:fe,onBlur:he,onKeyDown:P,onClick:fe},J=k.useMemo(()=>({expanded:C}),[C]),te=Ml("div",t,{ref:[n,v],state:J,props:[Q,{style:{[k8.frontmostHeight]:B?`${B}px`:void 0}},l,{children:T.jsxs(k.Fragment,{children:[A>0&&x&&T.jsx(tl,{onFocus:H}),s,A>0&&x&&T.jsx(tl,{onFocus:H})]})}]}),ee=k.useMemo(()=>({viewportRef:v}),[v]),se=k.useMemo(()=>u.filter(F=>F.priority==="high"),[u]);return T.jsxs(a8.Provider,{value:ee,children:[A>0&&x&&T.jsx(tl,{onFocus:H}),te,!L&&se.length>0&&T.jsx("div",{style:RP,children:se.map(F=>T.jsxs("div",{role:"alert","aria-atomic":!0,children:[T.jsx("div",{children:F.title}),T.jsx("div",{children:F.description})]},F.id))})]})});function w8(e){return IP(19)?e:e?"true":void 0}const jP=k.createContext(void 0);function Gp(){const e=k.useContext(jP);if(!e)throw new Error(Ll(66));return e}let gg=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const x8={[gg.startingStyle]:""},P8={[gg.endingStyle]:""},S8={transitionStatus(e){return e==="starting"?x8:e==="ending"?P8:null}},Jc=null;class C8{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 o=0;o<n.length;o+=1)n[o]?.(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 eu=new C8;class yg{static create(){return new yg}static request(t){return eu.request(t)}static cancel(t){return eu.cancel(t)}currentId=Jc;request(t){this.cancel(),this.currentId=eu.request(()=>{this.currentId=Jc,t()})}cancel=()=>{this.currentId!==Jc&&(eu.cancel(this.currentId),this.currentId=Jc)};disposeEffect=()=>this.cancel}function T8(){const e=Dl(yg.create).current;return vP(e.disposeEffect),e}function E8(e){return e==null?e:"current"in e?e.current:e}function A8(e,t=!1,n=!0){const a=T8();return An((o,s=null)=>{a.cancel();function l(){Ni.flushSync(o)}const u=E8(e);if(u==null)return;const f=u;if(typeof f.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let h=function(){const y=gg.startingStyle;if(!f.hasAttribute(y)){a.request(m);return}const v=new MutationObserver(()=>{f.hasAttribute(y)||(v.disconnect(),m())});v.observe(f,{attributes:!0,attributeFilter:[y]}),s?.addEventListener("abort",()=>v.disconnect(),{once:!0})},m=function(){Promise.all(f.getAnimations().map(y=>y.finished)).then(()=>{s?.aborted||l()}).catch(()=>{const y=f.getAnimations();if(n){if(s?.aborted)return;l()}else y.length>0&&y.some(v=>v.pending||v.playState!=="finished")&&m()})};if(t){h();return}a.request(m)}})}function R8(e){const{enabled:t=!0,open:n,ref:a,onComplete:o}=e,s=An(o),l=A8(a,n,!1);k.useEffect(()=>{if(!t)return;const u=new AbortController;return l(s,u.signal),()=>{u.abort()}},[t,n,s,l])}let bi=(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 D8={...S8,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Us=40,L8=10,Nr=.5,I8=1;function $_(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 M8(e){const n=window.getComputedStyle(e).transform;let a=0,o=0,s=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],o=u[5],s=Math.sqrt(u[0]*u[0]+u[1]*u[1])):u.length===16&&(a=u[12],o=u[13],s=u[0])}}return{x:a,y:o,scale:s}}const N8=k.forwardRef(function(t,n){const{toast:a,render:o,className:s,swipeDirection:l=["down","right"],...u}=t,f=a.positionerProps?.anchor!==void 0;let h=[];f||(h=Array.isArray(l)?l:[l]);const m=h.length>0,{toasts:y,focused:v,close:_,remove:x,setToasts:S,pauseTimers:C,expanded:L,setHovering:M}=mg(),[E,A]=k.useState(void 0),[B,z]=k.useState(!1),[H,P]=k.useState(!1),[Z,X]=k.useState(!1),[fe,he]=k.useState({x:0,y:0}),[Q,J]=k.useState({x:0,y:0,scale:1}),[te,ee]=k.useState(),[se,F]=k.useState(),[Y,V]=k.useState(null),I=k.useRef(null),W=k.useRef({x:0,y:0}),me=k.useRef({x:0,y:0,scale:1}),pe=k.useRef(void 0),ye=k.useRef(0),xe=k.useRef(!1),Fe=k.useRef({x:0,y:0}),Ye=k.useRef(!1),je=k.useMemo(()=>y.indexOf(a),[a,y]),Rt=k.useMemo(()=>y.filter(Ke=>Ke.transitionStatus!=="ending").indexOf(a),[a,y]),Rn=k.useMemo(()=>y.slice(0,y.indexOf(a)).reduce((Ke,Ve)=>Ke+(Ve.height||0),0),[y,a]);R8({open:a.transitionStatus!=="ending",ref:I,onComplete(){a.transitionStatus==="ending"&&x(a.id)}});const wn=An((Ke=!1)=>{const Ve=I.current;if(!Ve)return;const ft=Ve.style.height;Ve.style.height="auto";const St=Ve.offsetHeight;Ve.style.height=ft;function Ot(){S(yt=>yt.map(dt=>dt.id===a.id?{...dt,ref:I,height:St,transitionStatus:void 0}:dt))}Ke?Ni.flushSync(Ot):Ot()});Il(wn,[wn]);function pt(Ke,Ve){let ft=Ke,St=Ve;return!h.includes("left")&&!h.includes("right")?ft=Ke>0?Ke**Nr:-(Math.abs(Ke)**Nr):(!h.includes("right")&&Ke>0&&(ft=Ke**Nr),!h.includes("left")&&Ke<0&&(ft=-(Math.abs(Ke)**Nr))),!h.includes("up")&&!h.includes("down")?St=Ve>0?Ve**Nr:-(Math.abs(Ve)**Nr):(!h.includes("down")&&Ve>0&&(St=Ve**Nr),!h.includes("up")&&Ve<0&&(St=-(Math.abs(Ve)**Nr))),{x:ft,y:St}}function Xt(Ke){if(Ke.button!==0)return;Ke.pointerType==="touch"&&C();const Ve=Bp(Ke.nativeEvent);if(!(Ve&&Ve.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(xe.current=!1,pe.current=void 0,ye.current=0,W.current={x:Ke.clientX,y:Ke.clientY},Fe.current=W.current,I.current){const St=M8(I.current);me.current=St,J(St),he({x:St.x,y:St.y})}M(!0),z(!0),P(!1),V(null),Ye.current=!0,I.current?.setPointerCapture(Ke.pointerId)}}function Jr(Ke){if(!B)return;Ke.preventDefault(),Ye.current&&(W.current={x:Ke.clientX,y:Ke.clientY},Ye.current=!1);const{clientY:Ve,clientX:ft,movementX:St,movementY:Ot}=Ke;(Ot<0&&Ve>Fe.current.y||Ot>0&&Ve<Fe.current.y)&&(Fe.current={x:Fe.current.x,y:Ve}),(St<0&&ft>Fe.current.x||St>0&&ft<Fe.current.x)&&(Fe.current={x:ft,y:Fe.current.y});const yt=ft-W.current.x,dt=Ve-W.current.y,ba=Ve-Fe.current.y,Ko=ft-Fe.current.x;if(!H&&Math.sqrt(yt*yt+dt*dt)>=I8&&(P(!0),Y===null)){const aa=h.includes("left")||h.includes("right"),ti=h.includes("up")||h.includes("down");if(aa&&ti){const lr=Math.abs(yt),Ln=Math.abs(dt);V(lr>Ln?"horizontal":"vertical")}}let Wt;if(!pe.current)Y==="vertical"?dt>0?Wt="down":dt<0&&(Wt="up"):Y==="horizontal"?yt>0?Wt="right":yt<0&&(Wt="left"):Math.abs(yt)>=Math.abs(dt)?Wt=yt>0?"right":"left":Wt=dt>0?"down":"up",Wt&&h.includes(Wt)&&(pe.current=Wt,ye.current=$_(Wt,yt,dt),A(Wt));else{const _a=pe.current,aa=$_(_a,Ko,ba);aa>Us?(xe.current=!1,A(_a)):!(h.includes("left")&&h.includes("right"))&&!(h.includes("up")&&h.includes("down"))&&ye.current-aa>=L8&&(xe.current=!0)}const Ba=pt(yt,dt);let hn=me.current.x,ka=me.current.y;Y==="horizontal"?(h.includes("left")||h.includes("right"))&&(hn+=Ba.x):(Y==="vertical"||(h.includes("left")||h.includes("right"))&&(hn+=Ba.x),(h.includes("up")||h.includes("down"))&&(ka+=Ba.y)),he({x:hn,y:ka})}function Fi(Ke){if(!B)return;if(z(!1),P(!1),V(null),I.current?.releasePointerCapture(Ke.pointerId),xe.current){he({x:Q.x,y:Q.y}),A(void 0);return}let Ve=!1;const ft=fe.x-Q.x,St=fe.y-Q.y;let Ot;for(const yt of h){switch(yt){case"right":ft>Us&&(Ve=!0,Ot="right");break;case"left":ft<-Us&&(Ve=!0,Ot="left");break;case"down":St>Us&&(Ve=!0,Ot="down");break;case"up":St<-Us&&(Ve=!0,Ot="up");break}if(Ve)break}Ve?(A(Ot),X(!0),_(a.id)):(he({x:Q.x,y:Q.y}),A(void 0))}function Dn(Ke){if(Ke.key==="Escape"){if(!I.current||!Ti(I.current,ml(Eo(I.current))))return;_(a.id)}}k.useEffect(()=>{if(!m)return;const Ke=I.current;if(!Ke)return;function Ve(ft){Ti(Ke,ft.target)&&ft.preventDefault()}return Ke.addEventListener("touchmove",Ve,{passive:!1}),()=>{Ke.removeEventListener("touchmove",Ve)}},[m]);function zi(){if(!B&&fe.x===Q.x&&fe.y===Q.y&&!Z)return{[bi.swipeMovementX]:"0px",[bi.swipeMovementY]:"0px"};const Ke=fe.x-Q.x,Ve=fe.y-Q.y;return{transition:B?"none":void 0,transform:B?`translateX(${fe.x}px) translateY(${fe.y}px) scale(${Q.scale})`:void 0,[bi.swipeMovementX]:`${Ke}px`,[bi.swipeMovementY]:`${Ve}px`}}const sr=a.priority==="high",va={role:sr?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":te,"aria-describedby":se,"aria-hidden":sr&&!v?!0:void 0,onPointerDown:m?Xt:void 0,onPointerMove:m?Jr:void 0,onPointerUp:m?Fi:void 0,onKeyDown:Dn,inert:w8(a.limited),style:{...zi(),[bi.index]:a.transitionStatus==="ending"?je:Rt,[bi.offsetY]:`${Rn}px`,[bi.height]:a.height?`${a.height}px`:void 0}},dn=k.useMemo(()=>({rootRef:I,toast:a,titleId:te,setTitleId:ee,descriptionId:se,setDescriptionId:F,swiping:B,swipeDirection:E,recalculateHeight:wn,index:je,visibleIndex:Rt,expanded:L}),[a,te,se,B,E,wn,je,Rt,L]),ei=k.useMemo(()=>({transitionStatus:a.transitionStatus,expanded:L,limited:a.limited||!1,type:a.type,swiping:dn.swiping,swipeDirection:dn.swipeDirection}),[L,a.transitionStatus,a.limited,a.type,dn.swiping,dn.swipeDirection]),Vi=Ml("div",t,{ref:[n,dn.rootRef],state:ei,stateAttributesMapping:D8,props:[va,u]});return T.jsx(jP.Provider,{value:dn,children:Vi})}),O8={...qp};let H_=0;function j8(e,t="mui"){const[n,a]=k.useState(e),o=e||n;return k.useEffect(()=>{n==null&&(H_+=1,a(`${t}-${H_}`))},[n,t]),o}const W_=O8.useId;function UP(e,t){if(W_!==void 0){const n=W_();return e??(t?`${t}-${n}`:n)}return j8(e,t)}const U8=k.forwardRef(function(t,n){const{render:a,className:o,id:s,children:l,...u}=t,{toast:f}=Gp(),h=l??f.title,m=!!h,y=UP(s),{setTitleId:v}=Gp();Il(()=>{if(m)return v(y),()=>{v(void 0)}},[m,y,v]);const _=k.useMemo(()=>({type:f.type}),[f.type]),x=Ml("h2",t,{ref:n,state:_,props:{...u,id:y,children:h}});return m?x:null}),B8=k.createContext(void 0);function F8(e=!1){const t=k.useContext(B8);if(t===void 0&&!e)throw new Error(Ll(16));return t}function z8(e){const{focusableWhenDisabled:t,disabled:n,composite:a=!1,tabIndex:o=0,isNativeButton:s}=e,l=a&&t!==!1,u=a&&t===!1;return{props:k.useMemo(()=>{const h={onKeyDown(m){n&&t&&m.key!=="Tab"&&m.preventDefault()}};return a||(h.tabIndex=o,!s&&n&&(h.tabIndex=t?o:-1)),(s&&(t||l)||!s&&n)&&(h["aria-disabled"]=n),s&&(!t||u)&&(h.disabled=n),h},[a,n,t,l,u,s,o])}}function V8(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:a=0,native:o=!0}=e,s=k.useRef(null),l=F8(!0)!==void 0,u=An(()=>{const v=s.current;return!!(v?.tagName==="A"&&v?.href)}),{props:f}=z8({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:a,isNativeButton:o}),h=k.useCallback(()=>{const v=s.current;$8(v)&&l&&t&&f.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,f.disabled,l]);Il(h,[h]);const m=k.useCallback((v={})=>{const{onClick:_,onMouseDown:x,onKeyUp:S,onKeyDown:C,onPointerDown:L,...M}=v;return MP({type:o?"button":void 0,onClick(A){if(t){A.preventDefault();return}_?.(A)},onMouseDown(A){t||x?.(A)},onKeyDown(A){if(t||(Wp(A),C?.(A)),A.baseUIHandlerPrevented)return;const B=A.target===A.currentTarget&&!o&&!u()&&!t,z=A.key==="Enter",H=A.key===" ";B&&((H||z)&&A.preventDefault(),z&&_?.(A))},onKeyUp(A){t||(Wp(A),S?.(A)),!A.baseUIHandlerPrevented&&A.target===A.currentTarget&&!o&&!t&&A.key===" "&&_?.(A)},onPointerDown(A){if(t){A.preventDefault();return}L?.(A)}},o?void 0:{role:"button"},f,M)},[t,f,o,u]),y=An(v=>{s.current=v,h()});return{getButtonProps:m,buttonRef:y}}function $8(e){return yd(e)&&e.tagName==="BUTTON"}const H8=k.forwardRef(function(t,n){const{render:a,className:o,disabled:s,nativeButton:l=!0,...u}=t,{close:f,expanded:h}=mg(),{toast:m}=Gp(),[y,v]=k.useState(!1),{getButtonProps:_,buttonRef:x}=V8({disabled:s,native:l}),S=k.useMemo(()=>({type:m.type}),[m.type]);return Ml("button",t,{ref:[n,x],state:S,props:[{"aria-hidden":!h&&!y,onClick(){f(m.id)},onFocus(){v(!0)},onBlur(){v(!1)}},u,_]})}),n7="none",a7="trigger-press",r7="trigger-hover",i7="outside-press",o7="item-press",s7="close-press",W8="focus-out",l7="escape-key",c7="list-navigation",u7="cancel-open",d7="imperative-action",h7="window-resize";function G8(e,t,n,a){let o=!1,s=!1;const l=zr;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...l}}function K8(e){return`data-base-ui-${e}`}const BP=k.createContext(null),q8=()=>k.useContext(BP),Y8=K8("portal");function FP(e={}){const{ref:t,container:n,componentProps:a=zr,elementProps:o,elementState:s}=e,l=UP(),f=q8()?.portalNode,[h,m]=k.useState(null),[y,v]=k.useState(null),_=An(L=>{L!==null&&v(L)}),x=k.useRef(null);Il(()=>{if(n===null){x.current&&(x.current=null,v(null),m(null));return}if(l==null)return;const L=(n&&(dg(n)?n:n.current))??f??document.body;if(L==null){x.current&&(x.current=null,v(null),m(null));return}x.current!==L&&(x.current=L,v(null),m(L))},[n,f,l]);const S=Ml("div",a,{ref:[t,_],state:s,props:[{id:l,[Y8]:""},o]});return{portalNode:y,portalSubtree:h&&S?Ni.createPortal(S,h):null}}const f7=k.forwardRef(function(t,n){const{children:a,container:o,className:s,render:l,renderGuards:u,...f}=t,{portalNode:h,portalSubtree:m}=FP({container:o,ref:n,componentProps:t,elementProps:f}),y=k.useRef(null),v=k.useRef(null),_=k.useRef(null),x=k.useRef(null),[S,C]=k.useState(null),L=S?.modal,M=S?.open,E=typeof u=="boolean"?u:!!S&&!S.modal&&S.open&&!!h;k.useEffect(()=>{if(!h||L)return;function B(z){h&&z.relatedTarget&&zf(z)&&(z.type==="focusin"?F_:e8)(h)}return h.addEventListener("focusin",B,!0),h.addEventListener("focusout",B,!0),()=>{h.removeEventListener("focusin",B,!0),h.removeEventListener("focusout",B,!0)}},[h,L]),k.useEffect(()=>{!h||M||F_(h)},[M,h]);const A=k.useMemo(()=>({beforeOutsideRef:y,afterOutsideRef:v,beforeInsideRef:_,afterInsideRef:x,portalNode:h,setFocusManagerState:C}),[h]);return T.jsxs(k.Fragment,{children:[m,T.jsxs(BP.Provider,{value:A,children:[E&&h&&T.jsx(tl,{"data-type":"outside",ref:y,onFocus:B=>{if(zf(B,h))_.current?.focus();else{const z=S?S.domReference:null;Jj(z)?.focus()}}}),E&&h&&T.jsx("span",{"aria-owns":h.id,style:g8}),h&&Ni.createPortal(a,h),E&&h&&T.jsx(tl,{"data-type":"outside",ref:v,onFocus:B=>{if(zf(B,h))x.current?.focus();else{const z=S?S.domReference:null;Qj(z)?.focus(),S?.closeOnFocusOut&&S?.onOpenChange(!1,G8(W8,B.nativeEvent))}}})]})]})}),Z8=k.forwardRef(function(t,n){const{children:a,container:o,className:s,render:l,...u}=t,{portalNode:f,portalSubtree:h}=FP({container:o,ref:n,componentProps:t,elementProps:u});return!h&&!f?null:T.jsxs(k.Fragment,{children:[h,f&&Ni.createPortal(a,f)]})}),X8=Z8;function Q8(){const e=k.useContext(pg);if(!e)throw new Error(Ll(73));const{toasts:t,add:n,close:a,update:o,promise:s}=e;return k.useMemo(()=>({toasts:t,add:n,close:a,update:o,promise:s}),[t,n,a,o,s])}function J8(){const e=[];function t(n){e.forEach(a=>a(n))}return{" subscribe":function(a){return e.push(a),()=>{const o=e.indexOf(a);o!==-1&&e.splice(o,1)}},add(n){const a=n.id||yP("toast"),o={...n,id:a,transitionStatus:"starting"};return t({action:"add",options:o}),a},close(n){t({action:"close",options:{id:n}})},update(n,a){t({action:"update",options:{...a,id:n}})},promise(n,a){let o=n;return t({action:"promise",options:{...a,promise:n,setPromise(s){o=s}}}),o}}}const vg=J8();function p7(e){return vg.add(e)}function e9({children:e}){return T.jsxs(t8,{toastManager:vg,children:[e,T.jsx(X8,{children:T.jsx(_8,{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:T.jsx(t9,{})})})]})}function t9(){const{toasts:e}=Q8();return e.map(t=>{const n=t.data?.onUndo;return T.jsxs(N8,{toast:t,className:wt("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:[T.jsx(U8,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),n?T.jsx("button",{type:"button",onClick:()=>{n(),vg.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:Le("shared.action.undo")}):null,T.jsx(H8,{"aria-label":Le("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:T.jsx(Rm,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},t.id)})}const n9=typeof window<"u"?window.location.search:"",G_=new URLSearchParams(n9),tu=G_.get("insforge_code")||G_.get("code")||null,a9=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function r9(){Cl();const{loading:e,signedIn:t}=Vo(),n=kl(),[a,o]=k.useState("processing"),[s,l]=k.useState(null),u=k.useRef(!1);k.useEffect(()=>{if(!(!tu||u.current)){if(u.current=!0,a9){l(!1);return}(async()=>{try{const m=await(await fetch("/api/auth-bridge/verifier")).json();l(!!m?.native)}catch{l(!1)}})()}},[]),k.useEffect(()=>{if(s!==!0||!tu)return;o("redirecting");const h=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(tu)}`},200);return()=>clearTimeout(h)},[s]),k.useEffect(()=>{if(s!==!1||e)return;if(t){n("/dashboard",{replace:!0});return}const h=setTimeout(()=>{t||o("failed")},12e3);return()=>clearTimeout(h)},[s,e,t,n]),k.useEffect(()=>{if(!tu&&s===null){const h=setTimeout(()=>o("failed"),3e3);return()=>clearTimeout(h)}},[s]);const f=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&s!==!0&&(s===null||s===!1&&e)?T.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):T.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:T.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),T.jsx("p",{className:"text-oai-gray-400 text-sm",children:Le("auth.callback.processing")})]}),a==="redirecting"&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:T.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:T.jsx("path",{d:"M20 6 9 17l-5-5"})})}),T.jsx("p",{className:"text-white text-sm font-medium",children:Le("auth.callback.success")}),T.jsx("p",{className:"text-oai-gray-500 text-xs",children:Le("auth.callback.redirecting")})]}),a==="failed"&&T.jsxs("div",{className:"space-y-3",children:[T.jsx("p",{className:"text-oai-gray-300 text-sm",children:Le("auth.callback.failed")}),T.jsx("button",{type:"button",onClick:f,className:"px-4 py-2 rounded-lg bg-oai-gray-800 text-sm text-white hover:bg-oai-gray-700 transition-colors",children:Le("auth.callback.close")})]})]})})}const i9=k.lazy(()=>na(()=>import("./DashboardPage-z7rLj1gX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(e=>({default:e.DashboardPage}))),o9=k.lazy(()=>na(()=>import("./IpCheckPage-C0wQLtdK.js"),[])),s9=k.lazy(()=>na(()=>import("./LandingPage-DWSbmVip.js"),__vite__mapDeps([10,11,7])).then(e=>({default:e.LandingPage}))),l9=k.lazy(()=>na(()=>import("./LeaderboardPage-CZvefN8H.js"),__vite__mapDeps([12,2,13,14])).then(e=>({default:e.LeaderboardPage}))),c9=k.lazy(()=>na(()=>import("./LeaderboardProfilePage-DJJ7l3Ix.js"),__vite__mapDeps([15,2,11,16,13,3,4,17,18,5])).then(e=>({default:e.LeaderboardProfilePage}))),u9=k.lazy(()=>na(()=>import("./LimitsPage-xUmhxOqT.js"),__vite__mapDeps([19,1,20,6,9,21,17,22])).then(e=>({default:e.LimitsPage}))),d9=k.lazy(()=>na(()=>import("./LoginPage-BejL6eIO.js"),[]).then(e=>({default:e.LoginPage}))),h9=k.lazy(()=>na(()=>import("./DevicePage-B1NhBt9Q.js"),[])),f9=k.lazy(()=>na(()=>import("./WrappedPage-BpXrsSoG.js"),[])),p9=k.lazy(()=>na(()=>import("./SettingsPage-DossFM4s.js"),__vite__mapDeps([23,20,24,6,18,2,14,4,22])).then(e=>({default:e.SettingsPage}))),m9=k.lazy(()=>na(()=>import("./SkillsPage-COwiRUo1.js"),__vite__mapDeps([25,21,17,22,6,5,4,2,8,18,14])).then(e=>({default:e.SkillsPage}))),g9=k.lazy(()=>na(()=>import("./WidgetsPage-CtkM_RQn.js"),__vite__mapDeps([26,24,6,9,17,22,14])).then(e=>({default:e.WidgetsPage})));function y9(){const{resolvedLocale:e}=Cl(),t=Jn(),n=Vo();I6();const a=_n(),o=k.useMemo(()=>typeof window>"u"?!1:S6(window.location.search),[]),s=t?.pathname||"/",l=new URL(window.location.href),u=l.pathname.replace(/\/+$/,"")||"/",h=u.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,m=l.searchParams.get("token")||null,y=h||m,v=u==="/share"||u==="/share.html"||u.startsWith("/share/"),_=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),x=s.replace(/\/+$/,"")||"/",S=x==="/leaderboard",C=x.match(/^\/u\/([^/]+)$/i),L=C?C[1]:null,M=!!(n.enabled&&n.signedIn),E=_||M,A=!1,B=P6(),z=!E&&!a&&!_,H=k.useMemo(()=>!n.enabled||!M?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[M,n]);let P=_||a||o?"dashboard":"landing";x==="/landing"&&(P="landing"),x==="/dashboard"&&(P="dashboard"),S&&(P="dashboard"),L&&(P="dashboard");const Z=x==="/limits",X=x==="/settings",fe=x==="/skills",he=x==="/widgets",Q=x==="/ip-check";(Z||X||fe||he||Q)&&(P="dashboard");let J=i9;L?J=c9:x==="/leaderboard"?J=l9:Z?J=u9:X?J=p9:fe?J=m9:he?J=g9:Q&&(J=o9);const te=!v&&!z&&(x==="/dashboard"||x==="/"||S||Z||X||fe||he||Q);let ee=null;if(x==="/auth/callback"||x==="/auth/native-callback")ee=T.jsx(r9,{});else if(x==="/login")ee=T.jsx(d9,{});else if(x==="/device")ee=T.jsx(h9,{});else if(x==="/wrapped")ee=T.jsx(f9,{});else if(P==="landing")ee=T.jsx(s9,{signInUrl:"/login",signUpUrl:"/login"});else{const se=T.jsx(J,{baseUrl:B,auth:H,signedIn:E,sessionSoftExpired:A,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:v,publicToken:y,userId:L,signInUrl:"/login",signUpUrl:"/login"},e);te?ee=T.jsx(Z6,{children:se}):ee=se}return T.jsx(xI,{children:T.jsx(CI,{children:T.jsx(e9,{children:T.jsxs(TI,{children:[T.jsx(k.Suspense,{fallback:null,children:ee}),te?T.jsx(bj,{}):null,T.jsx(w6,{}),T.jsx(TL,{}),T.jsx(UL,{})]})})})})}const v9=$2([{path:"*",element:T.jsx(y9,{})}]);DC.createRoot(document.getElementById("root")).render(T.jsx(al.StrictMode,{children:T.jsx(oL,{children:T.jsx(fL,{children:T.jsx(TD,{children:T.jsx(tE,{router:v9})})})})}));export{z9 as $,el as A,uu as B,F9 as C,B9 as D,ll as E,wI as F,J9 as G,R9 as H,A9 as I,I1 as J,M6 as K,ad as L,Ni as M,wt as N,rx as O,gj as P,Vo as Q,al as R,_6 as S,O9 as T,H9 as U,Cl as V,S6 as W,Rm as X,Fr as Y,Z9 as Z,na as _,E9 as a,ZU as a$,GR as a0,D9 as a1,L9 as a2,X9 as a3,U9 as a4,N9 as a5,M_ as a6,uU as a7,xM as a8,gt as a9,tx as aA,ex as aB,oI as aC,j9 as aD,Oo as aE,Mu as aF,Fw as aG,zw as aH,Vw as aI,$w as aJ,dI as aK,UU as aL,BU as aM,OU as aN,jU as aO,$U as aP,Il as aQ,VU as aR,An as aS,ml as aT,vd as aU,Ti as aV,c7 as aW,yd as aX,Bp as aY,W8 as aZ,RU as a_,nn as aa,$u as ab,Lm as ac,Uo as ad,rg as ae,ix as af,Kr as ag,Pk as ah,Jn as ai,kl as aj,dU as ak,NR as al,C9 as am,hU as an,T9 as ao,G9 as ap,kI as aq,N6 as ar,mI as as,aU as at,b9 as au,LR as av,Dm as aw,MR as ax,tk as ay,W9 as az,FR as b,XU as b$,Ll as b0,YU as b1,zr as b2,hP as b3,Dl as b4,R8 as b5,MP as b6,z_ as b7,qU as b8,RP as b9,bU as bA,kU as bB,xU as bC,wU as bD,a7 as bE,jj as bF,N_ as bG,kj as bH,Cj as bI,mP as bJ,Sj as bK,_j as bL,Up as bM,pP as bN,TU as bO,Pj as bP,EU as bQ,ug as bR,fP as bS,AU as bT,UP as bU,K8 as bV,Oj as bW,r7 as bX,pl as bY,QU as bZ,l7 as b_,n7 as ba,i7 as bb,Eo as bc,u7 as bd,f7 as be,e7 as bf,w8 as bg,T8 as bh,qr as bi,DU as bj,h7 as bk,S8 as bl,o7 as bm,yj as bn,mU as bo,fU as bp,PU as bq,SU as br,CU as bs,fI as bt,pU as bu,gU as bv,p7 as bw,yU as bx,_U as by,vU as bz,an as c,vP as c0,d7 as c1,JU as c2,tl as c3,KU as c4,zf as c5,GU as c6,Qj as c7,t7 as c8,A8 as c9,yg as cA,U_ as cB,MU as cC,NU as cD,gg as cE,LU as cF,hL as ca,Pm as cb,sU as cc,pa as cd,Em as ce,iU as cf,lU as cg,oU as ch,Ys as ci,q9 as cj,Y9 as ck,K9 as cl,rr as cm,IU as cn,Lj as co,q8 as cp,hg as cq,fg as cr,E8 as cs,Jj as ct,WU as cu,HU as cv,zU as cw,FU as cx,Kp as cy,IP as cz,rU as d,tD as e,nD as f,Iw as g,eU as h,_n as i,M9 as j,$9 as k,tU as l,nU as m,I9 as n,xt as o,V9 as p,Q9 as q,k as r,Le as s,Lw as t,T as u,V8 as v,Ml as w,G8 as x,s7 as y,SO as z};
|