@devness/useai 0.5.15 → 0.5.16
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/dist/index.js +9 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2681,7 +2681,7 @@ var VERSION;
|
|
|
2681
2681
|
var init_version = __esm({
|
|
2682
2682
|
"../shared/dist/constants/version.js"() {
|
|
2683
2683
|
"use strict";
|
|
2684
|
-
VERSION = "0.5.
|
|
2684
|
+
VERSION = "0.5.16";
|
|
2685
2685
|
}
|
|
2686
2686
|
});
|
|
2687
2687
|
|
|
@@ -36311,7 +36311,7 @@ function registerTools(server2, session2, opts) {
|
|
|
36311
36311
|
);
|
|
36312
36312
|
server2.tool(
|
|
36313
36313
|
"useai_end",
|
|
36314
|
-
'End the current AI coding session and record milestones. Each milestone needs TWO titles: (1) a generic public "title" safe for public display (NEVER include project names, file names, class names, or any identifying details), and (2) an optional detailed "private_title" for the user\'s own records that CAN include project names, file names, and specific details. GOOD title: "Implemented user authentication". GOOD private_title: "Added JWT auth to UseAI API server". BAD title: "Fixed bug in Acme auth service". Also provide an `evaluation` object assessing the session: prompt_quality (1-5), context_provided (1-5), task_outcome (completed/partial/abandoned/blocked), iteration_count, independence_level (1-5), scope_quality (1-5), and tools_leveraged count. Score honestly based on the actual interaction.',
|
|
36314
|
+
'End the current AI coding session and record milestones. Each milestone needs TWO titles: (1) a generic public "title" safe for public display (NEVER include project names, file names, class names, or any identifying details), and (2) an optional detailed "private_title" for the user\'s own records that CAN include project names, file names, and specific details. GOOD title: "Implemented user authentication". GOOD private_title: "Added JWT auth to UseAI API server". BAD title: "Fixed bug in Acme auth service". Also provide an `evaluation` object assessing the session: prompt_quality (1-5), context_provided (1-5), task_outcome (completed/partial/abandoned/blocked), iteration_count, independence_level (1-5), scope_quality (1-5), and tools_leveraged count. Score honestly based on the actual interaction. For any scored metric < 5 or non-completed outcome, you MUST provide a *_reason field explaining what was lacking and a concrete tip for the user to improve next time. Only skip *_reason for a perfect 5.',
|
|
36315
36315
|
{
|
|
36316
36316
|
task_type: external_exports.enum(["coding", "debugging", "testing", "planning", "reviewing", "documenting", "learning", "other"]).optional().describe("What kind of task was the developer working on?"),
|
|
36317
36317
|
languages: external_exports.array(external_exports.string()).optional().describe("Programming languages used (e.g. ['typescript', 'python'])"),
|
|
@@ -36324,11 +36324,16 @@ function registerTools(server2, session2, opts) {
|
|
|
36324
36324
|
})).optional().describe("What was accomplished this session? List each distinct piece of work completed. Provide both a generic public title and an optional detailed private_title."),
|
|
36325
36325
|
evaluation: external_exports.object({
|
|
36326
36326
|
prompt_quality: external_exports.number().min(1).max(5).describe("How clear, specific, and complete was the initial prompt? 1=vague/ambiguous, 5=crystal clear with acceptance criteria"),
|
|
36327
|
+
prompt_quality_reason: external_exports.string().optional().describe("Required if prompt_quality < 5. Explain what was vague/missing and how the user could phrase it better next time."),
|
|
36327
36328
|
context_provided: external_exports.number().min(1).max(5).describe("Did the user provide relevant context (files, errors, constraints)? 1=no context, 5=comprehensive context"),
|
|
36329
|
+
context_provided_reason: external_exports.string().optional().describe("Required if context_provided < 5. What context was missing (files, error logs, constraints) that would have helped?"),
|
|
36328
36330
|
task_outcome: external_exports.enum(["completed", "partial", "abandoned", "blocked"]).describe("Was the primary task achieved?"),
|
|
36331
|
+
task_outcome_reason: external_exports.string().optional().describe('Required if task_outcome is not "completed". Explain why the task was not fully completed and what blocked progress.'),
|
|
36329
36332
|
iteration_count: external_exports.number().min(1).describe("Number of user-to-AI turns in this session"),
|
|
36330
36333
|
independence_level: external_exports.number().min(1).max(5).describe("How self-directed was the user? 1=needed constant guidance, 5=gave clear spec and let AI execute"),
|
|
36334
|
+
independence_level_reason: external_exports.string().optional().describe("Required if independence_level < 5. What decisions needed constant back-and-forth that could have been specified upfront?"),
|
|
36331
36335
|
scope_quality: external_exports.number().min(1).max(5).describe("Was the task well-scoped? 1=vague or impossibly broad, 5=precise and achievable"),
|
|
36336
|
+
scope_quality_reason: external_exports.string().optional().describe("Required if scope_quality < 5. How was the scope too broad/vague and how could it be better defined?"),
|
|
36332
36337
|
tools_leveraged: external_exports.number().min(0).describe("Count of distinct AI capabilities used (code gen, debugging, refactoring, testing, docs, etc.)")
|
|
36333
36338
|
}).optional().describe("AI-assessed evaluation of this session. Score honestly based on the actual interaction.")
|
|
36334
36339
|
},
|
|
@@ -36514,8 +36519,8 @@ var U={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"
|
|
|
36514
36519
|
*
|
|
36515
36520
|
* This source code is licensed under the ISC license.
|
|
36516
36521
|
* See the LICENSE file in the root directory of this source tree.
|
|
36517
|
-
*/function Ce({health:e,timeContextLabel:t}){return s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-accent flex items-center justify-center shadow-[0_0_15px_rgba(99,102,241,0.4)]",children:s.jsx("span",{className:"font-mono text-white font-bold text-lg",children:"U"})}),s.jsx("div",{children:s.jsxs("h1",{className:"text-xl font-bold tracking-tight text-text-primary flex items-center gap-2",children:["UseAI",s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-bg-surface-2 text-text-muted font-mono uppercase tracking-widest border border-border/50",children:"Dashboard"})]})})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[e&&e.active_sessions>0&&s.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-full bg-success/10 border border-success/20",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-success animate-ping absolute inset-0"}),s.jsx("div",{className:"w-2 h-2 rounded-full bg-success relative"})]}),s.jsxs("span",{className:"text-xs font-medium text-success",children:[e.active_sessions," active session",1!==e.active_sessions?"s":""]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-text-muted font-mono bg-bg-surface-1 px-3 py-1.5 rounded-md border border-border",children:[s.jsx(q,{className:"w-3 h-3"}),t]})]})]})}const Te=f.createContext({});function Pe(e){const t=f.useRef(null);return null===t.current&&(t.current=e()),t.current}const je="undefined"!=typeof window,Ne=je?f.useLayoutEffect:f.useEffect,Me=f.createContext(null);function De(e,t){-1===e.indexOf(t)&&e.push(t)}function Le(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ae=(e,t,n)=>n>t?t:n<e?e:n;const _e={},ze=e=>/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(e);function Re(e){return"object"==typeof e&&null!==e}const Fe=e=>/^0[^.\\s]+$/u.test(e);function Oe(e){let t;return()=>(void 0===t&&(t=e()),t)}const Ve=e=>e,Ie=(e,t)=>n=>t(e(n)),$e=(...e)=>e.reduce(Ie),Be=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Ue{constructor(){this.subscriptions=[]}add(e){return De(this.subscriptions,e),()=>Le(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const He=e=>1e3*e,We=e=>e/1e3;function qe(e,t){return t?e*(1e3/t):0}const Ye=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Xe(e,t,n,r){if(e===t&&n===r)return Ve;const i=t=>function(e,t,n,r,i){let a,o,s=0;do{o=t+(n-t)/2,a=Ye(o,r,i)-e,a>0?n=o:t=o}while(Math.abs(a)>1e-7&&++s<12);return o}(t,0,1,e,n);return e=>0===e||1===e?e:Ye(i(e),t,r)}const Ke=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Qe=e=>t=>1-e(1-t),Ge=Xe(.33,1.53,.69,.99),Ze=Qe(Ge),Je=Ke(Ze),et=e=>(e*=2)<1?.5*Ze(e):.5*(2-Math.pow(2,-10*(e-1))),tt=e=>1-Math.sin(Math.acos(e)),nt=Qe(tt),rt=Ke(tt),it=Xe(.42,0,1,1),at=Xe(0,0,.58,1),ot=Xe(.42,0,.58,1),st=e=>Array.isArray(e)&&"number"==typeof e[0],lt={linear:Ve,easeIn:it,easeInOut:ot,easeOut:at,circIn:tt,circInOut:rt,circOut:nt,backIn:Ze,backInOut:Je,backOut:Ge,anticipate:et},ut=e=>{if(st(e)){e.length;const[t,n,r,i]=e;return Xe(t,n,r,i)}return"string"==typeof e?lt[e]:e},ct=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function dt(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=ct.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(l.schedule(t),e()),t(o)}const l={schedule:(e,i=!1,o=!1)=>{const s=o&&r?t:n;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{o=e,r?i=!0:(r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,l.process(e)))}};return l}(a),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:p}=o,m=()=>{const a=_e.useManualTiming?i.timestamp:performance.now();n=!1,_e.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:ct.reduce((t,a)=>{const s=o[a];return t[a]=(t,a=!1,o=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(m)),s.schedule(t,a,o)),t},{}),cancel:e=>{for(let t=0;t<ct.length;t++)o[ct[t]].cancel(e)},state:i,steps:o}}const{schedule:ft,cancel:ht,state:pt,steps:mt}=dt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Ve,!0);let gt;function yt(){gt=void 0}const vt={now:()=>(void 0===gt&&vt.set(pt.isProcessing||_e.useManualTiming?pt.timestamp:performance.now()),gt),set:e=>{gt=e,queueMicrotask(yt)}},bt=e=>t=>"string"==typeof t&&t.startsWith(e),xt=bt("--"),wt=bt("var(--"),kt=e=>!!wt(e)&&St.test(e.split("/*")[0].trim()),St=/var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;function Et(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const Ct={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Tt={...Ct,transform:e=>Ae(0,1,e)},Pt={...Ct,default:1},jt=e=>Math.round(1e5*e)/1e5,Nt=/-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;const Mt=/^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu,Dt=(e,t)=>n=>Boolean("string"==typeof n&&Mt.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Lt=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,a,o,s]=r.match(Nt);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},At={...Ct,transform:e=>Math.round((e=>Ae(0,255,e))(e))},_t={test:Dt("rgb","red"),parse:Lt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+At.transform(e)+", "+At.transform(t)+", "+At.transform(n)+", "+jt(Tt.transform(r))+")"};const zt={test:Dt("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:_t.transform},Rt=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>\`\${t}\${e}\`}),Ft=Rt("deg"),Ot=Rt("%"),Vt=Rt("px"),It=Rt("vh"),$t=Rt("vw"),Bt=(()=>({...Ot,parse:e=>Ot.parse(e)/100,transform:e=>Ot.transform(100*e)}))(),Ut={test:Dt("hsl","hue"),parse:Lt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ot.transform(jt(t))+", "+Ot.transform(jt(n))+", "+jt(Tt.transform(r))+")"},Ht={test:e=>_t.test(e)||zt.test(e)||Ut.test(e),parse:e=>_t.test(e)?_t.parse(e):Ut.test(e)?Ut.parse(e):zt.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?_t.transform(e):Ut.transform(e),getAnimatableNone:e=>{const t=Ht.parse(e);return t.alpha=0,Ht.transform(t)}},Wt=/(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;const qt="number",Yt="color",Xt=/var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;function Kt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(Xt,e=>(Ht.test(e)?(r.color.push(a),i.push(Yt),n.push(Ht.parse(e))):e.startsWith("var(")?(r.var.push(a),i.push("var"),n.push(e)):(r.number.push(a),i.push(qt),n.push(parseFloat(e))),++a,"\${}")).split("\${}");return{values:n,split:o,indexes:r,types:i}}function Qt(e){return Kt(e).values}function Gt(e){const{split:t,types:n}=Kt(e),r=t.length;return e=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],void 0!==e[a]){const t=n[a];i+=t===qt?jt(e[a]):t===Yt?Ht.transform(e[a]):e[a]}return i}}const Zt=e=>"number"==typeof e?0:Ht.test(e)?Ht.getAnimatableNone(e):e;const Jt={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(Nt)?.length||0)+(e.match(Wt)?.length||0)>0},parse:Qt,createTransformer:Gt,getAnimatableNone:function(e){const t=Qt(e);return Gt(e)(t.map(Zt))}};function en(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tn(e,t){return n=>n>0?t:e}const nn=(e,t,n)=>e+(t-e)*n,rn=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},an=[zt,_t,Ut];function on(e){const t=(n=e,an.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Ut&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,a=0,o=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=en(s,r,e+1/3),a=en(s,r,e),o=en(s,r,e-1/3)}else i=a=o=n;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*o),alpha:r}}(r)),r}const sn=(e,t)=>{const n=on(e),r=on(t);if(!n||!r)return tn(e,t);const i={...n};return e=>(i.red=rn(n.red,r.red,e),i.green=rn(n.green,r.green,e),i.blue=rn(n.blue,r.blue,e),i.alpha=nn(n.alpha,r.alpha,e),_t.transform(i))},ln=new Set(["none","hidden"]);function un(e,t){return n=>nn(e,t,n)}function cn(e){return"number"==typeof e?un:"string"==typeof e?kt(e)?tn:Ht.test(e)?sn:hn:Array.isArray(e)?dn:"object"==typeof e?Ht.test(e)?sn:fn:tn}function dn(e,t){const n=[...e],r=n.length,i=e.map((e,n)=>cn(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function fn(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=cn(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const hn=(e,t)=>{const n=Jt.createTransformer(t),r=Kt(e),i=Kt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?ln.has(e)&&!i.values.length||ln.has(t)&&!r.values.length?function(e,t){return ln.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):$e(dn(function(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}(r,i),i.values),n):tn(e,t)};function pn(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return nn(e,t,n);return cn(e)(e,t)}const mn=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>ft.update(t,e),stop:()=>ht(t),now:()=>pt.isProcessing?pt.timestamp:vt.now()}},gn=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=Math.round(1e4*e(a/(i-1)))/1e4+", ";return\`linear(\${r.substring(0,r.length-2)})\`},yn=2e4;function vn(e){let t=0;let n=e.next(t);for(;!n.done&&t<yn;)t+=50,n=e.next(t);return t>=yn?1/0:t}function bn(e,t,n){const r=Math.max(t-5,0);return qe(n-e(r),t-r)}const xn=100,wn=10,kn=1,Sn=0,En=800,Cn=.3,Tn=.3,Pn={granular:.01,default:2},jn={granular:.005,default:.5},Nn=.01,Mn=10,Dn=.05,Ln=1,An=.001;function _n({duration:e=En,bounce:t=Cn,velocity:n=Sn,mass:r=kn}){let i,a,o=1-t;o=Ae(Dn,Ln,o),e=Ae(Nn,Mn,We(e)),o<1?(i=t=>{const r=t*o,i=r*e,a=r-n,s=Rn(t,o),l=Math.exp(-i);return An-a/s*l},a=t=>{const r=t*o*e,a=r*n+n,s=Math.pow(o,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=Rn(Math.pow(t,2),o);return(-i(t)+An>0?-1:1)*((a-s)*l)/u}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let i=1;i<zn;i++)r-=e(r)/t(r);return r}(i,a,5/e);if(e=He(e),isNaN(s))return{stiffness:xn,damping:wn,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*o*Math.sqrt(r*t),duration:e}}}const zn=12;function Rn(e,t){return e*Math.sqrt(1-t*t)}const Fn=["duration","bounce"],On=["stiffness","damping","mass"];function Vn(e,t){return t.some(t=>void 0!==e[t])}function In(e=Tn,t=Cn){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=function(e){let t={velocity:Sn,stiffness:xn,damping:wn,mass:kn,isResolvedFromDuration:!1,...e};if(!Vn(e,On)&&Vn(e,Fn))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,a=2*Ae(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:kn,stiffness:i,damping:a}}else{const n=_n(e);t={...t,...n,mass:kn},t.isResolvedFromDuration=!0}return t}({...n,velocity:-We(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),g=o-a,y=We(Math.sqrt(l/c)),v=Math.abs(g)<5;let b;if(r||(r=v?Pn.granular:Pn.default),i||(i=v?jn.granular:jn.default),m<1){const e=Rn(y,m);b=t=>{const n=Math.exp(-m*y*t);return o-n*((p+m*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)b=e=>o-Math.exp(-y*e)*(g+(p+y*g)*e);else{const e=y*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return o-n*((p+m*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const x={calculatedDuration:h&&d||null,next:e=>{const t=b(e);if(h)s.done=e>=d;else{let n=0===e?p:0;m<1&&(n=0===e?He(p):bn(b,e,t));const a=Math.abs(n)<=r,l=Math.abs(o-t)<=i;s.done=a&&l}return s.value=s.done?o:t,s},toString:()=>{const e=Math.min(vn(x),yn),t=gn(t=>x.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return x}function $n({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let p=n*t;const m=d+p,g=void 0===o?m:o(m);g!==m&&(p=g-d);const y=e=>-p*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);f.done=Math.abs(t)<=u,f.value=f.done?g:n};let x,w;const k=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=In({keyframes:[f.value,h(f.value)],velocity:bn(v,e,f.value),damping:i,stiffness:a,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),k(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function Bn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(t.length,1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||_e.mix||pn,a=e.length-1;for(let o=0;o<a;o++){let n=i(e[o],e[o+1]);if(t){const e=Array.isArray(t)?t[o]||Ve:t;n=$e(e,n)}r.push(n)}return r}(t,r,i),l=s.length,u=n=>{if(o&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const i=Be(e[r],e[r+1],n);return s[r](i)};return n?t=>u(Ae(e[0],e[a-1],t)):u}function Un(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Be(0,t,r);e.push(nn(n,1,i))}}(t,e.length-1),t}function Hn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(ut):ut(r),a={done:!1,value:t[0]},o=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:Un(t),e),s=Bn(o,t,{ease:Array.isArray(i)?i:(l=t,u=i,l.map(()=>u||ot).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}In.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(vn(r),yn);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:We(i)}}(e,100,In);return e.ease=t.ease,e.duration=He(t.duration),e.type="keyframes",e};const Wn=e=>null!==e;function qn(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(Wn),o=i<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return o&&void 0!==r?r:a[o]}const Yn={decay:$n,inertia:$n,tween:Hn,keyframes:Hn,spring:In};function Xn(e){"string"==typeof e.type&&(e.type=Yn[e.type])}class Kn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Qn=e=>e/100;class Gn extends Kn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==vt.now()&&this.tick(vt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Xn(e);const{type:t=Hn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const s=t||Hn;s!==Hn&&"number"!=typeof o[0]&&(this.mixKeyframes=$e(Qn,pn(o[0],o[1])),o=[0,100]);const l=s({...e,keyframes:o});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=vn(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:f,type:h,onUpdate:p,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,b=n;if(c){const e=Math.min(this.currentTime,r)/o;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,c+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/o)):"mirror"===d&&(b=a)),v=Ae(0,1,n)*o}const x=y?{done:!1,value:u[0]}:b.next(v);i&&(x.value=i(x.value));let{done:w}=x;y||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&h!==$n&&(x.value=qn(u,this.options,m,this.speed)),p&&p(x.value),k&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return We(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+We(e)}get time(){return We(this.currentTime)}set time(e){e=He(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(vt.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=We(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=mn,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(vt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const Zn=e=>180*e/Math.PI,Jn=e=>{const t=Zn(Math.atan2(e[1],e[0]));return tr(t)},er={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Jn,rotateZ:Jn,skewX:e=>Zn(Math.atan(e[1])),skewY:e=>Zn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},tr=e=>((e%=360)<0&&(e+=360),e),nr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ir={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nr,scaleY:rr,scale:e=>(nr(e)+rr(e))/2,rotateX:e=>tr(Zn(Math.atan2(e[6],e[5]))),rotateY:e=>tr(Zn(Math.atan2(-e[2],e[0]))),rotateZ:Jn,rotate:Jn,skewX:e=>Zn(Math.atan(e[4])),skewY:e=>Zn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ar(e){return e.includes("scale")?1:0}function or(e,t){if(!e||"none"===e)return ar(t);const n=e.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);let r,i;if(n)r=ir,i=n;else{const t=e.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);r=er,i=t}if(!i)return ar(t);const a=r[t],o=i[1].split(",").map(sr);return"function"==typeof a?a(o):o[a]}function sr(e){return parseFloat(e.trim())}const lr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ur=(()=>new Set(lr))(),cr=e=>e===Ct||e===Vt,dr=new Set(["x","y","z"]),fr=lr.filter(e=>!dr.has(e));const hr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>or(t,"x"),y:(e,{transform:t})=>or(t,"y")};hr.translateX=hr.x,hr.translateY=hr.y;const pr=new Set;let mr=!1,gr=!1,yr=!1;function vr(){if(gr){const e=Array.from(pr).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return fr.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}gr=!1,mr=!1,pr.forEach(e=>e.complete(yr)),pr.clear()}function br(){pr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gr=!0)})}class xr{constructor(e,t,n,r,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(pr.add(this),mr||(mr=!0,ft.read(br),ft.resolveKeyframes(vr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const i=r?.get(),a=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,a);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=a),r&&void 0===i&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),pr.delete(this)}cancel(){"scheduled"===this.state&&(pr.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const wr=Oe(()=>void 0!==window.ScrollTimeline),kr={};function Sr(e,t){const n=Oe(e);return()=>kr[t]??n()}const Er=Sr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Cr=([e,t,n,r])=>\`cubic-bezier(\${e}, \${t}, \${n}, \${r})\`,Tr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cr([0,.65,.55,1]),circOut:Cr([.55,0,1,.45]),backIn:Cr([.31,.01,.66,-.59]),backOut:Cr([.33,1.53,.69,.99])};function Pr(e,t){return e?"function"==typeof e?Er()?gn(e,t):"ease-out":st(e)?Cr(e):Array.isArray(e)?e.map(e=>Pr(e,t)||Tr.easeOut):Tr[e]:void 0}function jr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Pr(s,i);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};u&&(f.pseudoElement=u);return e.animate(c,f)}function Nr(e){return"function"==typeof e&&"applyToOptions"in e}class Mr extends Kn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=a,this.options=e,e.type;const l=function({type:e,...t}){return Nr(e)&&Er()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=jr(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=qn(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return We(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+We(e)}get time(){return We(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=He(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&wr()?(this.animation.timeline=e,Ve):t(this)}}const Dr={anticipate:et,backInOut:Je,circInOut:rt};function Lr(e){"string"==typeof e.ease&&e.ease in Dr&&(e.ease=Dr[e.ease])}class Ar extends Mr{constructor(e){Lr(e),Xn(e),super(e),void 0!==e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const o=new Gn({...a,autoplay:!1}),s=Math.max(10,vt.now()-this.startTime),l=Ae(0,10,s-10);t.setWithVelocity(o.sample(Math.max(0,s-l)).value,o.sample(s).value,l),o.stop()}}const _r=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Jt.test(e)&&"0"!==e||e.startsWith("url(")));function zr(e){e.duration=0,e.type="keyframes"}const Rr=new Set(["opacity","clipPath","filter","transform"]),Fr=Oe(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Or extends Kn{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a="loop",keyframes:o,name:s,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=vt.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:l,element:u,...c},f=u?.KeyframeResolver||xr;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:i,type:a,velocity:o,delay:s,isHandoff:l,onUpdate:u}=n;this.resolvedAt=vt.now(),function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const a=e[e.length-1],o=_r(i,t),s=_r(a,t);return!(!o||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Nr(n))&&r)}(e,i,a,o)||(!_e.instantAnimations&&s||u?.(qn(e,n,t)),e[0]=e[e.length-1],zr(n),n.repeat=0);const c={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e,s=t?.owner?.current;if(!(s instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Fr()&&n&&Rr.has(n)&&("transform"!==n||!u)&&!l&&!r&&"mirror"!==i&&0!==a&&"inertia"!==o}(c),f=c.motionValue?.owner?.current,h=d?new Ar({...c,element:f}):new Gn(c);h.finished.then(()=>{this.notifyFinished()}).catch(Ve),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),yr=!0,br(),vr(),yr=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Vr(e,t,n,r=0,i=1){const a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return"function"==typeof n?n(a,o):1===i?a*r:s-a*r}const Ir=/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;function $r(e,t,n=1){const[r,i]=function(e){const t=Ir.exec(e);if(!t)return[,];const[,n,r,i]=t;return[\`--\${n??r}\`,i]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const e=a.trim();return ze(e)?parseFloat(e):e}return kt(i)?$r(i,t,n+1):i}const Br={type:"spring",stiffness:500,damping:25,restSpeed:10},Ur={type:"keyframes",duration:.8},Hr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Wr=(e,{keyframes:t})=>t.length>2?Ur:ur.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Br:Hr,qr=e=>null!==e;function Yr(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Xr(e,t){const n=e?.[t]??e?.default??e;return n!==e?Yr(n,e):n}const Kr=(e,t,n,r={},i,a)=>o=>{const s=Xr(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u-=He(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(s)||Object.assign(c,Wr(e,c)),c.duration&&(c.duration=He(c.duration)),c.repeatDelay&&(c.repeatDelay=He(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(zr(c),0===c.delay&&(d=!0)),(_e.instantAnimations||_e.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,zr(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"}){const r=e.filter(qr);return r[t&&"loop"!==n&&t%2==1?0:r.length-1]}(c.keyframes,s);if(void 0!==e)return void ft.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new Gn(c):new Or(c)};function Qr(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Gr(e,t,n,r){if("function"==typeof t){const[i,a]=Qr(r);t=t(void 0!==n?n:e.custom,i,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,a]=Qr(r);t=t(void 0!==n?n:e.custom,i,a)}return t}function Zr(e,t,n){const r=e.getProps();return Gr(r,t,void 0!==n?n:r.custom,e)}const Jr=new Set(["width","height","top","left","right","bottom",...lr]);class ei{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=vt.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=vt.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Ue);const n=this.events[e].add(t);return"change"===e?()=>{n(),ft.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=vt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return qe(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ti(e,t){return new ei(e,t)}const ni=e=>Array.isArray(e);function ri(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ti(n))}function ii(e){return ni(e)?e[e.length-1]||0:e}const ai=e=>Boolean(e&&e.getVelocity);function oi(e,t){const n=e.getValue("willChange");if(r=n,Boolean(ai(r)&&r.add))return n.add(t);if(!n&&_e.WillChange){const n=new _e.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function si(e){return e.replace(/([A-Z])/g,e=>\`-\${e.toLowerCase()}\`)}const li="data-"+si("framerAppearId");function ui(e){return e.props[li]}function ci({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function di(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t;const l=e.getDefaultTransition();a=a?Yr(a,l):l;const u=a?.reduceMotion;r&&(a=r);const c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in s){const t=e.getValue(f,e.latestValues[f]??null),r=s[f];if(void 0===r||d&&ci(d,f))continue;const i={delay:n,...Xr(a||{},f)},o=t.get();if(void 0!==o&&!t.isAnimating&&!Array.isArray(r)&&r===o&&!i.velocity)continue;let l=!1;if(window.MotionHandoffAnimation){const t=ui(e);if(t){const e=window.MotionHandoffAnimation(t,f,ft);null!==e&&(i.startTime=e,l=!0)}}oi(e,f);const h=u??e.shouldReduceMotion;t.start(Kr(f,t,r,h&&Jr.has(f)?{type:!1}:i,e,l));const p=t.animation;p&&c.push(p)}if(o){const t=()=>ft.update(()=>{o&&function(e,t){const n=Zr(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a)ri(e,o,ii(a[o]))}(e,o)});c.length?Promise.all(c).then(t):t()}return c}function fi(e,t,n={}){const r=Zr(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(di(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return function(e,t,n=0,r=0,i=0,a=1,o){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(fi(l,t,{...o,delay:n+("function"==typeof r?0:r)+Vr(e.variantChildren,l,r,i,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[e,t]="beforeChildren"===s?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}const hi=e=>t=>t.test(e),pi=[Ct,Vt,Ot,Ft,$t,It,{test:e=>"auto"===e,parse:e=>e}],mi=e=>pi.find(hi(e));function gi(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||Fe(e))}const yi=new Set(["brightness","contrast","saturate","opacity"]);function vi(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Nt)||[];if(!r)return e;const i=n.replace(r,"");let a=yi.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const bi=/\\b([a-z-]*)\\(.*?\\)/gu,xi={...Jt,getAnimatableNone:e=>{const t=e.match(bi);return t?t.map(vi).join(" "):e}},wi={...Ct,transform:Math.round},ki={borderWidth:Vt,borderTopWidth:Vt,borderRightWidth:Vt,borderBottomWidth:Vt,borderLeftWidth:Vt,borderRadius:Vt,borderTopLeftRadius:Vt,borderTopRightRadius:Vt,borderBottomRightRadius:Vt,borderBottomLeftRadius:Vt,width:Vt,maxWidth:Vt,height:Vt,maxHeight:Vt,top:Vt,right:Vt,bottom:Vt,left:Vt,inset:Vt,insetBlock:Vt,insetBlockStart:Vt,insetBlockEnd:Vt,insetInline:Vt,insetInlineStart:Vt,insetInlineEnd:Vt,padding:Vt,paddingTop:Vt,paddingRight:Vt,paddingBottom:Vt,paddingLeft:Vt,paddingBlock:Vt,paddingBlockStart:Vt,paddingBlockEnd:Vt,paddingInline:Vt,paddingInlineStart:Vt,paddingInlineEnd:Vt,margin:Vt,marginTop:Vt,marginRight:Vt,marginBottom:Vt,marginLeft:Vt,marginBlock:Vt,marginBlockStart:Vt,marginBlockEnd:Vt,marginInline:Vt,marginInlineStart:Vt,marginInlineEnd:Vt,fontSize:Vt,backgroundPositionX:Vt,backgroundPositionY:Vt,...{rotate:Ft,rotateX:Ft,rotateY:Ft,rotateZ:Ft,scale:Pt,scaleX:Pt,scaleY:Pt,scaleZ:Pt,skew:Ft,skewX:Ft,skewY:Ft,distance:Vt,translateX:Vt,translateY:Vt,translateZ:Vt,x:Vt,y:Vt,z:Vt,perspective:Vt,transformPerspective:Vt,opacity:Tt,originX:Bt,originY:Bt,originZ:Vt},zIndex:wi,fillOpacity:Tt,strokeOpacity:Tt,numOctaves:wi},Si={...ki,color:Ht,backgroundColor:Ht,outlineColor:Ht,fill:Ht,stroke:Ht,borderColor:Ht,borderTopColor:Ht,borderRightColor:Ht,borderBottomColor:Ht,borderLeftColor:Ht,filter:xi,WebkitFilter:xi},Ei=e=>Si[e];function Ci(e,t){let n=Ei(e);return n!==xi&&(n=Jt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ti=new Set(["auto","none","0"]);class Pi extends xr{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),kt(n))){const r=$r(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Jr.has(n)||2!==e.length)return;const[r,i]=e,a=mi(r),o=mi(i);if(Et(r)!==Et(i)&&hr[n])this.needsMeasurement=!0;else if(a!==o)if(cr(a)&&cr(o))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else hr[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||gi(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!Ti.has(t)&&Kt(t).values.length&&(r=e[i]),i++}if(r&&n)for(const a of t)e[a]=Ci(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=hr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const i=n.length-1,a=n[i];n[i]=hr[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const ji=new Set(["opacity","clipPath","filter","transform"]);function Ni(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=n?.[e]??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const Mi=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function Di(e){return Re(e)&&"offsetHeight"in e}const{schedule:Li}=dt(queueMicrotask,!1),Ai={x:!1,y:!1};function _i(){return Ai.x||Ai.y}function zi(e,t){const n=Ni(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ri(e,t,n={}){const[r,i,a]=zi(e,n);return r.forEach(e=>{let n,r=!1,a=!1;const o=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),a&&(a=!1,o(e))},l=e=>{"touch"!==e.pointerType&&(r?a=!0:o(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||_i())return;a=!1;const o=t(e,r);"function"==typeof o&&(n=o,e.addEventListener("pointerleave",l,i))},i),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",s,i)},i)}),a}const Fi=(e,t)=>!!t&&(e===t||Fi(e,t.parentElement)),Oi=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Vi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Ii=new Set(["INPUT","SELECT","TEXTAREA"]);const $i=new WeakSet;function Bi(e){return t=>{"Enter"===t.key&&e(t)}}function Ui(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Hi(e){return Oi(e)&&!_i()}const Wi=new WeakSet;function qi(e,t,n={}){const[r,i,a]=zi(e,n),o=e=>{const r=e.currentTarget;if(!Hi(e))return;if(Wi.has(e))return;$i.add(r),n.stopPropagation&&Wi.add(e);const a=t(r,e),o=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),$i.has(r)&&$i.delete(r),Hi(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Fi(r,e.target))},l=e=>{o(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",o,i),Di(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Bi(()=>{if($i.has(n))return;Ui(n,"down");const e=Bi(()=>{Ui(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Ui(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),t=e,Vi.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function Yi(e){return Re(e)&&"ownerSVGElement"in e}const Xi=new WeakMap;let Ki;const Qi=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:Yi(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Gi=Qi("inline","width","offsetWidth"),Zi=Qi("block","height","offsetHeight");function Ji({target:e,borderBoxSize:t}){Xi.get(e)?.forEach(n=>{n(e,{get width(){return Gi(e,t)},get height(){return Zi(e,t)}})})}function ea(e){e.forEach(Ji)}function ta(e,t){Ki||"undefined"!=typeof ResizeObserver&&(Ki=new ResizeObserver(ea));const n=Ni(e);return n.forEach(e=>{let n=Xi.get(e);n||(n=new Set,Xi.set(e,n)),n.add(t),Ki?.observe(e)}),()=>{n.forEach(e=>{const n=Xi.get(e);n?.delete(t),n?.size||Ki?.unobserve(e)})}}const na=new Set;let ra;function ia(e){return na.add(e),ra||(ra=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};na.forEach(t=>t(e))},window.addEventListener("resize",ra)),()=>{na.delete(e),na.size||"function"!=typeof ra||(window.removeEventListener("resize",ra),ra=void 0)}}function aa(e,t){return"function"==typeof e?ia(e):ta(e,t)}const oa=[...pi,Ht,Jt],sa=()=>({x:{min:0,max:0},y:{min:0,max:0}}),la=new WeakMap;function ua(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function ca(e){return"string"==typeof e||Array.isArray(e)}const da=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fa=["initial",...da];function ha(e){return ua(e.animate)||fa.some(t=>ca(e[t]))}function pa(e){return Boolean(ha(e)||e.variants)}const ma={current:null},ga={current:!1},ya="undefined"!=typeof window;const va=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ba={};function xa(e){ba=e}class wa{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=xr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=vt.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ft.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=ha(t),this.isVariantNode=pa(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const f in d){const e=d[f];void 0!==l[f]&&ai(e)&&e.set(l[f])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,la.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ga.current||function(){if(ga.current=!0,ya)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ma.current=e.matches;e.addEventListener("change",t),t()}else ma.current=!1}(),this.shouldReduceMotion=ma.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ht(this.notifyUpdate),ht(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&ji.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Mr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:He(o)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=ur.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ft.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in ba){const t=ba[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<va.length;n++){const t=va[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],a=n[r];if(ai(i))e.addValue(r,i);else if(ai(a))e.addValue(r,ti(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,ti(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=ti(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(ze(n)||Fe(n))?n=parseFloat(n):(r=n,!oa.find(hi(r))&&Jt.test(t)&&(n=Ci(e,t))),this.setBaseTarget(e,ai(n)?n.get():n)),ai(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=Gr(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||ai(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new Ue),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Li.render(this.render)}}class ka extends wa{constructor(){super(...arguments),this.KeyframeResolver=Pi}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ai(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=\`\${e}\`)}))}}class Sa{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Ea({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ca(e){return void 0===e||1===e}function Ta({scale:e,scaleX:t,scaleY:n}){return!Ca(e)||!Ca(t)||!Ca(n)}function Pa(e){return Ta(e)||ja(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ja(e){return Na(e.x)||Na(e.y)}function Na(e){return e&&"0%"!==e}function Ma(e,t,n){return n+t*(e-n)}function Da(e,t,n,r,i){return void 0!==i&&(e=Ma(e,i,r)),Ma(e,n,r)+t}function La(e,t=0,n=1,r,i){e.min=Da(e.min,t,n,r,i),e.max=Da(e.max,t,n,r,i)}function Aa(e,{x:t,y:n}){La(e.x,t.translate,t.scale,t.originPoint),La(e.y,n.translate,n.scale,n.originPoint)}const _a=.999999999999,za=1.0000000000001;function Ra(e,t){e.min=e.min+t,e.max=e.max+t}function Fa(e,t,n,r,i=.5){La(e,t,n,nn(e.min,e.max,i),r)}function Oa(e,t){Fa(e.x,t.x,t.scaleX,t.scale,t.originX),Fa(e.y,t.y,t.scaleY,t.scale,t.originY)}function Va(e,t){return Ea(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Ia={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$a=lr.length;function Ba(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const l in t){const e=t[l];if(ur.has(l))o=!0;else if(xt(l))i[l]=e;else{const t=Mi(e,ki[l]);l.startsWith("origin")?(s=!0,a[l]=t):r[l]=t}}if(t.transform||(o||n?r.transform=function(e,t,n){let r="",i=!0;for(let a=0;a<$a;a++){const o=lr[a],s=e[o];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(o.startsWith("scale")?1:0);else{const e=parseFloat(s);l=o.startsWith("scale")?1===e:0===e}if(!l||n){const e=Mi(s,ki[o]);l||(i=!1,r+=\`\${Ia[o]||o}(\${e}) \`),n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;r.transformOrigin=\`\${e} \${t} \${n}\`}}function Ua(e,{style:t,vars:n},r,i){const a=e.style;let o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Ha(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wa={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Vt.test(e))return e;e=parseFloat(e)}return\`\${Ha(e,t.target.x)}% \${Ha(e,t.target.y)}%\`}},qa={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Jt.parse(e);if(i.length>5)return r;const a=Jt.createTransformer(e),o="number"!=typeof i[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const u=nn(s,l,.5);return"number"==typeof i[2+o]&&(i[2+o]/=u),"number"==typeof i[3+o]&&(i[3+o]/=u),a(i)}},Ya={borderRadius:{...Wa,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wa,borderTopRightRadius:Wa,borderBottomLeftRadius:Wa,borderBottomRightRadius:Wa,boxShadow:qa};function Xa(e,{layout:t,layoutId:n}){return ur.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Ya[e]||"opacity"===e)}function Ka(e,t,n){const r=e.style,i=t?.style,a={};if(!r)return a;for(const o in r)(ai(r[o])||i&&ai(i[o])||Xa(o,e)||void 0!==n?.getValue(o)?.liveStyle)&&(a[o]=r[o]);return a}class Qa extends ka{constructor(){super(...arguments),this.type="html",this.renderInstance=Ua}readValueFromInstance(e,t){if(ur.has(t))return this.projection?.isProjecting?ar(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return or(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),i=(xt(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Va(e,t)}build(e,t,n){Ba(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ka(e,t,n)}}const Ga={offset:"stroke-dashoffset",array:"stroke-dasharray"},Za={offset:"strokeDashoffset",array:"strokeDasharray"};const Ja=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function eo(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},l,u,c){if(Ba(e,s,u),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox);for(const h of Ja)void 0!==d[h]&&(f[h]=d[h],delete d[h]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?Ga:Za;e[a.offset]=""+-r,e[a.array]=\`\${t} \${n}\`}(d,i,a,o,!1)}const to=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),no=e=>"string"==typeof e&&"svg"===e.toLowerCase();function ro(e,t,n){const r=Ka(e,t,n);for(const i in e)if(ai(e[i])||ai(t[i])){r[-1!==lr.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}class io extends ka{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=sa}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ur.has(t)){const e=Ei(t);return e&&e.default||0}return t=to.has(t)?t:si(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ro(e,t,n)}build(e,t,n){eo(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Ua(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(to.has(i)?i:si(i),t.attrs[i])}(e,t,0,r)}mount(e){this.isSVGTag=no(e.tagName),super.mount(e)}}const ao=fa.length;function oo(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&oo(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<ao;n++){const r=fa[n],i=e.props[r];(ca(i)||!1===i)&&(t[r]=i)}return t}function so(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const lo=[...da].reverse(),uo=da.length;function co(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map(t=>fi(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=fi(e,t,n);else{const i="function"==typeof t?Zr(e,t,n.custom):t;r=Promise.all(di(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function fo(e){let t=co(e),n=mo(),r=!0;const i=t=>(n,r)=>{const i=Zr(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(a){const{props:o}=e,s=oo(e.parent)||{},l=[],u=new Set;let c={},d=1/0;for(let t=0;t<uo;t++){const f=lo[t],h=n[f],p=void 0!==o[f]?o[f]:s[f],m=ca(p),g=f===a?h.isActive:null;!1===g&&(d=t);let y=p===s[f]&&p!==o[f]&&m;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...c},!h.isActive&&null===g||!p&&!h.prevProp||ua(p)||"boolean"==typeof p)continue;if("exit"===f&&h.isActive&&!0!==g){h.prevResolvedValues&&(c={...c,...h.prevResolvedValues});continue}const v=ho(h.prevProp,p);let b=v||f===a&&h.isActive&&!y&&m||t>d&&m,x=!1;const w=Array.isArray(p)?p:[p];let k=w.reduce(i(f),{});!1===g&&(k={});const{prevResolvedValues:S={}}=h,E={...S,...k},C=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in E){const t=k[e],n=S[e];if(c.hasOwnProperty(e))continue;let r=!1;r=ni(t)&&ni(n)?!so(t,n):t!==n,r?null!=t?C(e):u.add(e):void 0!==t&&u.has(e)?C(e):h.protectedKeys[e]=!0}h.prevProp=p,h.prevResolvedValues=k,h.isActive&&(c={...c,...k}),r&&e.blockInitialAnimation&&(b=!1);const T=y&&v;b&&(!T||x)&&l.push(...w.map(t=>{const n={type:f};if("string"==typeof t&&r&&!T&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,i=Zr(r,t);if(r.enteringChildren&&i){const{delayChildren:t}=i.transition||{};n.delay=Vr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof o.initial){const n=Zr(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let f=Boolean(l.length);return!r||!1!==o.initial&&o.initial!==o.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const i=a(t);for(const e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=mo()}}}function ho(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!so(t,e)}function po(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mo(){return{animate:po(!0),whileInView:po(),whileHover:po(),whileTap:po(),whileDrag:po(),whileFocus:po(),exit:po()}}function go(e,t){e.min=t.min,e.max=t.max}function yo(e,t){go(e.x,t.x),go(e.y,t.y)}function vo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bo(e){return e.max-e.min}function xo(e,t,n,r=.5){e.origin=r,e.originPoint=nn(t.min,t.max,e.origin),e.scale=bo(n)/bo(t),e.translate=nn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function wo(e,t,n,r){xo(e.x,t.x,n.x,r?r.originX:void 0),xo(e.y,t.y,n.y,r?r.originY:void 0)}function ko(e,t,n){e.min=n.min+t.min,e.max=e.min+bo(t)}function So(e,t,n){e.min=t.min-n.min,e.max=e.min+bo(t)}function Eo(e,t,n){So(e.x,t.x,n.x),So(e.y,t.y,n.y)}function Co(e,t,n,r,i){return e=Ma(e-=t,1/n,r),void 0!==i&&(e=Ma(e,1/i,r)),e}function To(e,t,[n,r,i],a,o){!function(e,t=0,n=1,r=.5,i,a=e,o=e){Ot.test(t)&&(t=parseFloat(t),t=nn(o.min,o.max,t/100)-o.min);if("number"!=typeof t)return;let s=nn(a.min,a.max,r);e===a&&(s-=t),e.min=Co(e.min,t,n,s,i),e.max=Co(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,a,o)}const Po=["x","scaleX","originX"],jo=["y","scaleY","originY"];function No(e,t,n,r){To(e.x,t,Po,n?n.x:void 0,r?r.x:void 0),To(e.y,t,jo,n?n.y:void 0,r?r.y:void 0)}function Mo(e){return 0===e.translate&&1===e.scale}function Do(e){return Mo(e.x)&&Mo(e.y)}function Lo(e,t){return e.min===t.min&&e.max===t.max}function Ao(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _o(e,t){return Ao(e.x,t.x)&&Ao(e.y,t.y)}function zo(e){return bo(e.x)/bo(e.y)}function Ro(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Fo(e){return[e("x"),e("y")]}const Oo=["TopLeft","TopRight","BottomLeft","BottomRight"],Vo=Oo.length,Io=e=>"string"==typeof e?parseFloat(e):e,$o=e=>"number"==typeof e||Vt.test(e);function Bo(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Uo=Wo(0,.5,nt),Ho=Wo(.5,.95,Ve);function Wo(e,t,n){return r=>r<e?0:r>t?1:n(Be(e,t,r))}function qo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Yo=(e,t)=>e.depth-t.depth;class Xo{constructor(){this.children=[],this.isDirty=!1}add(e){De(this.children,e),this.isDirty=!0}remove(e){Le(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Yo),this.isDirty=!1,this.children.forEach(e)}}function Ko(e){return ai(e)?e.get():e}class Qo{constructor(){this.members=[]}add(e){De(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1===r.isConnected&&!1!==n.isPresent&&!n.snapshot&&Le(this.members,n)}e.scheduleRender()}remove(e){if(Le(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r],t=e.instance;if(!1!==e.isPresent&&(!t||!1!==t.isConnected)){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();const r=n.options.layoutDependency,i=e.options.layoutDependency;if(!(void 0!==r&&void 0!==i&&r===i)){const r=n.instance;r&&!1===r.isConnected&&!n.snapshot||(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:a}=e.options;!1===a&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Go={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Zo=["","X","Y","Z"];let Jo=0;function es(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ts(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ui(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ft,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ts(r)}function ns({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Jo++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(as),this.nodes.forEach(fs),this.nodes.forEach(hs),this.nodes.forEach(os)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Xo)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Ue),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=Yi(t)&&!(Yi(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const i=()=>this.root.updateBlockedByResize=!1;ft.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=vt.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(ht(r),e(a-t))};return ft.setup(r,!0),()=>ht(r)}(i,250),Go.hasAnimatedSinceResize&&(Go.hasAnimatedSinceResize=!1,this.nodes.forEach(ds)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||a.getDefaultTransition()||bs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!_o(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...Xr(i,"layout"),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||ds(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ht(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ps),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ts(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ls);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(us);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(cs),this.nodes.forEach(rs),this.nodes.forEach(is)):this.nodes.forEach(us),this.clearAllSnapshots();const e=vt.now();pt.delta=Ae(0,1e3/60,e-pt.timestamp),pt.timestamp=e,pt.isProcessing=!0,mt.update.process(pt),mt.preRender.process(pt),mt.render.process(pt),pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Li.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ss),this.sharedNodes.forEach(ms)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||bo(this.snapshot.measuredBox.x)||bo(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Do(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Pa(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),ks((r=n).x),ks(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Es))){const{scroll:e}=this.root;e&&(Ra(t.x,e.offset.x),Ra(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(yo(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&yo(t,e),Ra(t.x,i.offset.x),Ra(t.y,i.offset.y))}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};yo(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Oa(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Pa(e.latestValues)&&Oa(n,e.latestValues)}return Pa(this.latestValues)&&Oa(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};yo(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Pa(e.latestValues))continue;Ta(e.latestValues)&&e.updateSnapshot();const r=sa();yo(r,e.measurePageBox()),No(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Pa(this.latestValues)&&No(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:i}=this.options;if(!this.layout||!r&&!i)return;this.resolvedRelativeTargetAt=pt.timestamp;const a=this.getClosestProjectingParent();var o,s,l;(a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,s=this.relativeTarget,l=this.relativeParent.target,ko(o.x,s.x,l.x),ko(o.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):yo(this.target,this.layout.layoutBox),Aa(this.target,this.targetDelta)):yo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&Boolean(a.resumingFrom)===Boolean(this.resumingFrom)&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!Ta(this.parent.latestValues)&&!ja(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Eo(this.relativeTargetOrigin,t,n),yo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===pt.timestamp&&(n=!1),n)return;const{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!i)return;yo(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,o=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let a,o;t.x=t.y=1;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:i}=a.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Oa(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Aa(e,o)),r&&Pa(a.latestValues)&&Oa(e,a.latestValues))}t.x<za&&t.x>_a&&(t.x=1),t.y<za&&t.y>_a&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(vo(this.prevProjectionDelta.x,this.projectionDelta.x),vo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),wo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Ro(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ro(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const o={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(s&&!u&&!0===this.options.crossfade&&!this.path.some(vs));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,h,p,m,g;gs(a.x,e.x,n),gs(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Eo(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,m=o,g=n,ys(h.x,p.x,m.x,g),ys(h.y,p.y,m.y,g),d&&(l=this.relativeTarget,f=d,Lo(l.x,f.x)&&Lo(l.y,f.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),yo(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,n,r,i,a){i?(e.opacity=nn(0,n.opacity??1,Uo(r)),e.opacityExit=nn(t.opacity??1,0,Ho(r))):a&&(e.opacity=nn(t.opacity??1,n.opacity??1,r));for(let o=0;o<Vo;o++){const i=\`border\${Oo[o]}Radius\`;let a=Bo(t,i),s=Bo(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||$o(a)===$o(s)?(e[i]=Math.max(nn(Io(a),Io(s),r),0),(Ot.test(s)||Ot.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=nn(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ht(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{Go.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ti(0)),this.currentAnimation=function(e,t,n){const r=ai(e)?e:ti(e);return r.start(Kr("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Ss(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=bo(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=bo(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}yo(t,n),Oa(t,i),wo(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Qo);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&es("z",e,r,this.animationValues);for(let i=0;i<Zo.length;i++)es(\`rotate\${Zo[i]}\`,e,r,this.animationValues),es(\`skew\${Zo[i]}\`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=Ko(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Ko(t?.pointerEvents)||""),void(this.hasProjected&&!Pa(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=\`translate3d(\${i}px, \${a}px, \${o}px) \`),1===t.x&&1===t.y||(r+=\`scale(\${1/t.x}, \${1/t.y}) \`),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=\`perspective(\${e}px) \${r}\`),t&&(r+=\`rotate(\${t}deg) \`),i&&(r+=\`rotateX(\${i}deg) \`),a&&(r+=\`rotateY(\${a}deg) \`),o&&(r+=\`skewX(\${o}deg) \`),s&&(r+=\`skewY(\${s}deg) \`)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=\`scale(\${s}, \${l})\`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;const{x:o,y:s}=this.projectionDelta;e.transformOrigin=\`\${100*o.origin}% \${100*s.origin}% 0\`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const l in Ya){if(void 0===i[l])continue;const{correct:t,applyTo:n,isCSSVariable:o}=Ya[l],s="none"===a?i[l]:t(i[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else o?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=r===this?Ko(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(ls),this.root.sharedNodes.clear()}}}function rs(e){e.updateLayout()}function is(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;"size"===i?Fo(e=>{const r=a?t.measuredBox[e]:t.layoutBox[e],i=bo(r);r.min=n[e].min,r.max=r.min+i}):Ss(i,t.layoutBox,n)&&Fo(r=>{const i=a?t.measuredBox[r]:t.layoutBox[r],o=bo(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};wo(o,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?wo(s,e.applyTransform(r,!0),t.measuredBox):wo(s,n,t.layoutBox);const l=!Do(o);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:a}=r;if(i&&a){const o={x:{min:0,max:0},y:{min:0,max:0}};Eo(o,t.layoutBox,i.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};Eo(s,n,a.layoutBox),_o(o,s)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function as(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function os(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ss(e){e.clearSnapshot()}function ls(e){e.clearMeasurements()}function us(e){e.isLayoutDirty=!1}function cs(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ds(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fs(e){e.resolveTargetDelta()}function hs(e){e.calcProjection()}function ps(e){e.resetSkewAndRotation()}function ms(e){e.removeLeadSnapshot()}function gs(e,t,n){e.translate=nn(t.translate,0,n),e.scale=nn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ys(e,t,n,r){e.min=nn(t.min,n.min,r),e.max=nn(t.max,n.max,r)}function vs(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const bs={duration:.45,ease:[.4,0,.1,1]},xs=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ws=xs("applewebkit/")&&!xs("chrome/")?Math.round:Ve;function ks(e){e.min=ws(e.min),e.max=ws(e.max)}function Ss(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=zo(t),i=zo(n),a=.2,!(Math.abs(r-i)<=a));var r,i,a}function Es(e){return e!==e.root&&e.scroll?.wasRoot}const Cs=ns({attachResizeListener:(e,t)=>qo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ts={current:void 0},Ps=ns({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ts.current){const e=new Cs({});e.mount(window),e.setOptions({layoutScroll:!0}),Ts.current=e}return Ts.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),js=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ns(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Ms(...e){return f.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Ns(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Ns(e[t],null)}}}}(...e),e)}class Ds extends f.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Di(e)&&e.offsetWidth||0,r=Di(e)&&e.offsetHeight||0,i=this.props.sizeRef.current;i.height=t.offsetHeight||0,i.width=t.offsetWidth||0,i.top=t.offsetTop,i.left=t.offsetLeft,i.right=n-i.width-i.left,i.bottom=r-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ls({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){const o=f.useId(),l=f.useRef(null),u=f.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=f.useContext(js),d=e.props?.ref??e?.ref,h=Ms(l,d);return f.useInsertionEffect(()=>{const{width:e,height:s,top:d,left:f,right:h,bottom:p}=u.current;if(t||!1===a||!l.current||!e||!s)return;const m="left"===n?\`left: \${f}\`:\`right: \${h}\`,g="bottom"===r?\`bottom: \${p}\`:\`top: \${d}\`;l.current.dataset.motionPopId=o;const y=document.createElement("style");c&&(y.nonce=c);const v=i??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(\`\\n [data-motion-pop-id="\${o}"] {\\n position: absolute !important;\\n width: \${e}px !important;\\n height: \${s}px !important;\\n \${m}px !important;\\n \${g}px !important;\\n }\\n \`),()=>{v.contains(y)&&v.removeChild(y)}},[t]),s.jsx(Ds,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:!1===a?e:f.cloneElement(e,{ref:h})})}const As=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:l,anchorY:u,root:c})=>{const d=Pe(_s),h=f.useId();let p=!0,m=f.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:e=>{d.set(e,!0);for(const t of d.values())if(!t)return;r&&r()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[n,d,r]);return a&&p&&(m={...m}),f.useMemo(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),f.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=s.jsx(Ls,{pop:"popLayout"===o,isPresent:n,anchorX:l,anchorY:u,root:c,children:e}),s.jsx(Me.Provider,{value:m,children:e})};function _s(){return new Map}function zs(e=!0){const t=f.useContext(Me);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=f.useId();f.useEffect(()=>{if(e)return i(a)},[e]);const o=f.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const Rs=e=>e.key||"";function Fs(e){const t=[];return f.Children.forEach(e,e=>{f.isValidElement(e)&&t.push(e)}),t}const Os=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:l="left",anchorY:u="top",root:c})=>{const[d,h]=zs(o),p=f.useMemo(()=>Fs(e),[e]),m=o&&!d?[]:p.map(Rs),g=f.useRef(!0),y=f.useRef(p),v=Pe(()=>new Map),b=f.useRef(new Set),[x,w]=f.useState(p),[k,S]=f.useState(p);Ne(()=>{g.current=!1,y.current=p;for(let e=0;e<k.length;e++){const t=Rs(k[e]);m.includes(t)?(v.delete(t),b.current.delete(t)):!0!==v.get(t)&&v.set(t,!1)}},[k,m.length,m.join("-")]);const E=[];if(p!==x){let e=[...p];for(let t=0;t<k.length;t++){const n=k[t],r=Rs(n);m.includes(r)||(e.splice(t,0,n),E.push(n))}return"wait"===a&&E.length&&(e=E),S(Fs(e)),w(p),null}const{forceRender:C}=f.useContext(Te);return s.jsx(s.Fragment,{children:k.map(e=>{const f=Rs(e),x=!(o&&!d)&&(p===k||m.includes(f));return s.jsx(As,{isPresent:x,initial:!(g.current&&!n)&&void 0,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:x?void 0:()=>{if(b.current.has(f))return;if(b.current.add(f),!v.has(f))return;v.set(f,!0);let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(C?.(),S(y.current),o&&h?.(),r&&r())},anchorX:l,anchorY:u,children:e},f)})})},Vs=f.createContext({strict:!1}),Is={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 $s=!1;function Bs(){return function(){if($s)return;const e={};for(const t in Is)e[t]={isEnabled:e=>Is[t].some(t=>!!e[t])};xa(e),$s=!0}(),ba}const Us=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 Hs(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Us.has(e)}let Ws=e=>!Hs(e);try{"function"==typeof(qs=require("@emotion/is-prop-valid").default)&&(Ws=e=>e.startsWith("on")?!Hs(e):qs(e))}catch{}var qs;const Ys=f.createContext({});function Xs(e){const{initial:t,animate:n}=function(e,t){if(ha(e)){const{initial:t,animate:n}=e;return{initial:!1===t||ca(t)?t:void 0,animate:ca(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,f.useContext(Ys));return f.useMemo(()=>({initial:t,animate:n}),[Ks(t),Ks(n)])}function Ks(e){return Array.isArray(e)?e.join(" "):e}const Qs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Gs(e,t,n){for(const r in t)ai(t[r])||Xa(r,n)||(e[r]=t[r])}function Zs(e,t){const n={};return Gs(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Ba(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function Js(e,t){const n={},r=Zs(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const el=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function tl(e,t,n,r){const i=f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return eo(n,t,no(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};Gs(t,e.style,e),i.style={...t,...i.style}}return i}const nl=["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 rl(e){return"string"==typeof e&&!e.includes("-")&&!!(nl.indexOf(e)>-1||/[A-Z]/u.test(e))}function il(e,t,n,{latestValues:r},i,a=!1,o){const s=(o??rl(e)?tl:Js)(t,r,i,e),l=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(Ws(i)||!0===n&&Hs(i)||!t&&!Hs(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,a),u=e!==f.Fragment?{...l,...s,ref:n}:{},{children:c}=t,d=f.useMemo(()=>ai(c)?c.get():c,[c]);return f.createElement(e,{...u,children:d})}function al(e,t,n,r){const i={},a=r(e,{});for(const f in a)i[f]=Ko(a[f]);let{initial:o,animate:s}=e;const l=ha(e),u=pa(e);t&&u&&!l&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===o;const d=c?s:o;if(d&&"boolean"!=typeof d&&!ua(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Gr(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(i[r]=e)}for(const r in e)i[r]=e[r]}}}return i}const ol=e=>(t,n)=>{const r=f.useContext(Ys),i=f.useContext(Me),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:al(n,r,i,e),renderState:t()}}(e,t,r,i);return n?a():Pe(a)},sl=ol({scrapeMotionValuesFromProps:Ka,createRenderState:Qs}),ll=ol({scrapeMotionValuesFromProps:ro,createRenderState:el}),ul=Symbol.for("motionComponentSymbol");function cl(e,t,n){const r=f.useRef(n);f.useInsertionEffect(()=>{r.current=n});const i=f.useRef(null);return f.useCallback(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());const a=r.current;if("function"==typeof a)if(n){const e=a(n);"function"==typeof e&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}const dl=f.createContext({});function fl(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function hl(e,t,n,r,i,a){const{visualElement:o}=f.useContext(Ys),s=f.useContext(Vs),l=f.useContext(Me),u=f.useContext(js),c=u.reducedMotion,d=u.skipAnimations,h=f.useRef(null),p=f.useRef(!1);r=r||s.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,g=f.useContext(dl);!m||m.projection||!i||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:pl(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:Boolean(o)||s&&fl(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}(h.current,n,i,g);const y=f.useRef(!1);f.useInsertionEffect(()=>{m&&y.current&&m.update(n,l)});const v=n[li],b=f.useRef(Boolean(v)&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Ne(()=>{p.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),f.useEffect(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),b.current=!1),m.enteringChildren=void 0)}),m}function pl(e){if(e)return!1!==e.options.allowProjection?e.projection:pl(e.parent)}function ml(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&function(e){const t=Bs();for(const n in e)t[n]={...t[n],...e[n]};xa(t)}(r);const a=n?"svg"===n:rl(e),o=a?ll:sl;function l(n,r){let l;const u={...f.useContext(js),...n,layoutId:gl(n)},{isStatic:c}=u,d=Xs(n),h=o(n,c);if(!c&&je){f.useContext(Vs).strict;const t=function(e){const t=Bs(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);l=t.MeasureLayout,d.visualElement=hl(e,h,u,i,t.ProjectionNode,a)}return s.jsxs(Ys.Provider,{value:d,children:[l&&d.visualElement?s.jsx(l,{visualElement:d.visualElement,...u}):null,il(e,n,cl(h,d.visualElement,r),h,c,t,a)]})}l.displayName=\`motion.\${"string"==typeof e?e:\`create(\${e.displayName??e.name??""})\`}\`;const u=f.forwardRef(l);return u[ul]=e,u}function gl({layoutId:e}){const t=f.useContext(Te).id;return t&&void 0!==e?t+"-"+e:e}function yl(e,t){if("undefined"==typeof Proxy)return ml;const n=new Map,r=(n,r)=>ml(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>"create"===a?r:(n.has(a)||n.set(a,ml(a,void 0,e,t)),n.get(a))})}const vl=(e,t)=>t.isSVG??rl(e)?new io(t):new Qa(t,{allowProjection:e!==f.Fragment});let bl=0;const xl={animation:{Feature:class extends Sa{constructor(e){super(e),e.animationState||(e.animationState=fo(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ua(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Sa{constructor(){super(...arguments),this.id=bl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function wl(e){return{point:{x:e.pageX,y:e.pageY}}}function kl(e,t,n,r){return qo(e,t,(e=>t=>Oi(t)&&e(t,wl(t)))(n),r)}const Sl=({current:e})=>e?e.ownerDocument.defaultView:null,El=(e,t)=>Math.abs(e-t);const Cl=new Set(["auto","scroll"]);class Tl{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Nl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=El(e.x,t.x),r=El(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=pt;this.history.push({...r,timestamp:i});const{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Pl(t,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=Nl("pointercancel"===e.type?this.lastMoveEventInfo:Pl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Oi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const s=Pl(wl(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=pt;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,Nl(s,this.history)),this.removeListeners=$e(kl(this.contextWindow,"pointermove",this.handlePointerMove),kl(this.contextWindow,"pointerup",this.handlePointerUp),kl(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(Cl.has(e.overflowX)||Cl.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i=r.x-t.x,a=r.y-t.y;0===i&&0===a||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i,this.lastMoveEventInfo.point.y+=a):this.history.length>0&&(this.history[0].x-=i,this.history[0].y-=a),this.scrollPositions.set(e,r),ft.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ht(this.updatePoint)}}function Pl(e,t){return t?{point:t(e.point)}:e}function jl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nl({point:e},t){return{point:e,delta:jl(e,Dl(t)),offset:jl(e,Ml(t)),velocity:Ll(t,.1)}}function Ml(e){return e[0]}function Dl(e){return e[e.length-1]}function Ll(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Dl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>He(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>2*He(t)&&(r=e[1]);const a=We(i.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Al(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function _l(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const zl=.35;function Rl(e,t,n){return{min:Fl(e,t),max:Fl(e,n)}}function Fl(e,t){return"number"==typeof e?e:e[t]||0}const Ol=new WeakMap;class Vl{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Tl(e,{onSessionStart:e=>{t&&this.snapToCursor(wl(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(a=n)||"y"===a?Ai[a]?null:(Ai[a]=!0,()=>{Ai[a]=!1}):Ai.x||Ai.y?null:(Ai.x=Ai.y=!0,()=>{Ai.x=Ai.y=!1}),!this.openDragLock))return;var a;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Fo(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Ot.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=bo(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&ft.update(()=>i(e,t),!1,!0),oi(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:o}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(o),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),a&&ft.update(()=>a(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:Sl(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&ft.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!$l(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?nn(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?nn(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&fl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Al(e.x,n,i),y:Al(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=zl){return!1===e?e=0:!0===e&&(e=zl),{x:Rl(e,"left","right"),y:Rl(e,"top","bottom")}}(t),r!==this.constraints&&!fl(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Fo(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!fl(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=Va(e,n),{scroll:i}=t;return i&&(Ra(r.x,i.offset.x),Ra(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:_l(e.x,t.x),y:_l(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=Ea(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},l=Fo(o=>{if(!$l(o,t,this.currentDirection))return;let l=s&&s[o]||{};a&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[o]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(o,d)});return Promise.all(l).then(o)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return oi(this.visualElement,e),n.start(Kr(e,n,0,t,this.visualElement,!1))}stopAnimation(){Fo(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=\`_drag\${e.toUpperCase()}\`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Fo(t=>{const{drag:n}=this.getProps();if(!$l(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-nn(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!fl(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Fo(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=bo(e),i=bo(t);return i>r?n=Be(t.min,t.max-r,e.min):r>i&&(n=Be(e.min,e.max-i,t.min)),Ae(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Fo(t=>{if(!$l(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(nn(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ol.set(this.visualElement,this);const e=this.visualElement.current,t=kl(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&function(e){return Ii.has(e.tagName)||!0===e.isContentEditable}(i);n&&r&&!a&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();fl(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=aa(e,Il(n)),i=aa(t,Il(n));return()=>{r(),i()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ft.read(r);const o=qo(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Fo(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=zl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function Il(e){let t=!0;return()=>{t?t=!1:e()}}function $l(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Bl=e=>(t,n)=>{e&&ft.update(()=>e(t,n),!1,!0)};let Ul=!1;class Hl extends f.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Ul&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Go.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Ul=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||ft.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Li.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Ul=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Wl(e){const[t,n]=zs(),r=f.useContext(Te);return s.jsx(Hl,{...e,layoutGroup:r,switchLayoutGroup:f.useContext(dl),isPresent:t,safeToRemove:n})}const ql={pan:{Feature:class extends Sa{constructor(){super(...arguments),this.removePointerDownListener=Ve}onPointerDown(e){this.session=new Tl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sl(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Bl(e),onStart:Bl(t),onMove:Bl(n),onEnd:(e,t)=>{delete this.session,r&&ft.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=kl(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Sa{constructor(e){super(e),this.removeGroupControls=Ve,this.removeListeners=Ve,this.controls=new Vl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ve}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Ps,MeasureLayout:Wl}};function Yl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&ft.postRender(()=>i(t,wl(t)))}function Xl(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const i=r["onTap"+("End"===n?"":n)];i&&ft.postRender(()=>i(t,wl(t)))}const Kl=new WeakMap,Ql=new WeakMap,Gl=e=>{const t=Kl.get(e.target);t&&t(e)},Zl=e=>{e.forEach(Gl)};function Jl(e,t,n){const r=function({root:e,...t}){const n=e||document;Ql.has(n)||Ql.set(n,{});const r=Ql.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Zl,{root:e,...t})),r[i]}(t);return Kl.set(e,n),r.observe(e),()=>{Kl.delete(e),r.unobserve(e)}}const eu={some:0,all:1};const tu=yl({...xl,...{inView:{Feature:class extends Sa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:eu[r]};return Jl(this.node.current,a,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Sa{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=qi(e,(e,t)=>(Xl(this.node,t,"Start"),(e,{success:t})=>Xl(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends Sa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=$e(qo(this.node.current,"focus",()=>this.onFocus()),qo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Sa{mount(){const{current:e}=this.node;e&&(this.unmount=Ri(e,(e,t)=>(Yl(this.node,t,"Start"),e=>Yl(this.node,e,"End"))))}unmount(){}}}},...ql,...{layout:{ProjectionNode:Ps,MeasureLayout:Wl}}},vl);function nu({label:e,value:t,suffix:n,decimals:r=0,icon:i,delay:a=0}){const o=f.useRef(null),l=f.useRef(0);return f.useEffect(()=>{o.current&&t!==l.current&&(!function(e,t,n){let r=null;requestAnimationFrame(function i(a){r||(r=a);const o=Math.min((a-r)/800,1),s=1-Math.pow(1-o,4),l=t*s;e.textContent=n>0?l.toFixed(n):String(Math.round(l)),o<1&&requestAnimationFrame(i)})}(o.current,t,r),l.current=t)},[t,r]),s.jsxs(tu.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:a},className:"flex-1 min-w-[120px] px-3 py-2 rounded-lg bg-bg-surface-1 border border-border/50 flex items-center gap-2.5 group hover:border-accent/30 transition-all duration-300",children:[s.jsx("div",{className:"p-1.5 rounded-md bg-bg-surface-2 group-hover:bg-accent/10 transition-colors",children:s.jsx(i,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-accent transition-colors"})}),s.jsxs("div",{className:"flex items-baseline gap-1 min-w-0",children:[s.jsx("span",{ref:o,className:"text-lg font-bold text-text-primary tracking-tight",children:r>0?t.toFixed(r):t}),n&&s.jsx("span",{className:"text-[10px] text-text-muted font-medium",children:n})]}),s.jsx("span",{className:"text-[9px] font-mono text-text-muted uppercase tracking-wider ml-auto hidden sm:block",children:e})]})}function ru({totalHours:e,featuresShipped:t,bugsFixed:n,complexSolved:r,currentStreak:i,filesTouched:a}){return s.jsxs("div",{className:"grid grid-cols-3 lg:grid-cols-6 gap-2 mb-4",children:[s.jsx(nu,{label:"Active Hours",value:e,suffix:"hrs",decimals:1,icon:ee,delay:.1}),s.jsx(nu,{label:"Features",value:t,icon:pe,delay:.15}),s.jsx(nu,{label:"Bugs Fixed",value:n,icon:X,delay:.2}),s.jsx(nu,{label:"Complex",value:r,icon:Y,delay:.25}),s.jsx(nu,{label:"Streak",value:i,suffix:"days",icon:Ee,delay:.3}),s.jsx(nu,{label:"Files",value:a,icon:ie,delay:.35})]})}const iu={"claude-code":"#d4a04a",cursor:"#00b4d8",copilot:"#6e40c9",windsurf:"#38bdf8","github-copilot":"#6e40c9",aider:"#4ade80",continue:"#f97316",cody:"#ff6b6b",tabby:"#a78bfa",roo:"#f472b6",gemini:"#4285f4"},au={"claude-code":"Claude Code",cursor:"Cursor",copilot:"GitHub Copilot",windsurf:"Windsurf","github-copilot":"GitHub Copilot",aider:"Aider",continue:"Continue",cody:"Sourcegraph Cody",tabby:"TabbyML",roo:"Roo Code",mcp:"MCP Client",gemini:"Gemini"},ou={"claude-code":"CC",cursor:"Cu",copilot:"CP",windsurf:"WS","github-copilot":"CP",aider:"Ai",continue:"Co",cody:"Cy",tabby:"Tb",roo:"Ro",mcp:"MC",gemini:"Ge"},su={"claude-code":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"/></svg>')}\`,gemini:\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"/></svg>')}\`},lu=Object.keys(iu);function uu(e){if(iu[e])return e;return lu.filter(t=>e.startsWith(t)).sort((e,t)=>t.length-e.length)[0]??e}const cu={feature:"#4ade80",bugfix:"#f87171",refactor:"#a78bfa",test:"#38bdf8",docs:"#fbbf24",setup:"#6b655c",deployment:"#f97316",other:"#9c9588"};function du(e){const t=e/3600;return t<.1?\`\${t.toFixed(2)}h\`:\`\${t.toFixed(1)}h\`}function fu(e,t){return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,t)}function hu({label:e,children:t}){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-[10px] text-text-muted uppercase tracking-widest font-bold whitespace-nowrap",children:e}),s.jsx("div",{className:"flex items-center gap-1.5 overflow-x-auto pb-1 no-scrollbar",children:t})]})}function pu({stats:e}){const t=fu(e.byClient,4),n=fu(e.byLanguage,4);return 0===t.length&&0===n.length?null:s.jsxs("div",{className:"flex flex-col gap-4 mb-8 p-4 rounded-xl bg-bg-surface-1/30 border border-border/50",children:[t.length>0&&s.jsx(hu,{label:"Top Clients",children:t.map(([e,t])=>{const n=iu[e];return s.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",style:n?{borderLeftWidth:"3px",borderLeftColor:n}:void 0,title:du(t),children:[au[e]??e,s.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:du(t)})]},e)})}),n.length>0&&s.jsx(hu,{label:"Languages",children:n.map(([e,t])=>s.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",title:du(t),children:[e,s.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:du(t)})]},e))})]})}const mu={coding:"#6366f1",debugging:"#f87171",testing:"#60a5fa",planning:"#a78bfa",reviewing:"#34d399",documenting:"#fbbf24",learning:"#f472b6",other:"#94a3b8"};function gu(e){if(e<60)return"<1m";const t=Math.round(e/60);if(t<60)return\`\${t}m\`;return\`\${(e/3600).toFixed(1)}h\`}function yu({byTaskType:e}){const t=Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1]);if(0===t.length)return null;const n=t[0][1];return s.jsxs("div",{className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4 mb-8",children:[s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest mb-4 px-1",children:"Task Types"}),s.jsx("div",{className:"space-y-2.5",children:t.map(([e,t],r)=>{const i=mu[e]??mu.other,a=t/n*100;return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-xs text-text-secondary font-medium w-24 text-right shrink-0",children:(o=e,o.charAt(0).toUpperCase()+o.slice(1))}),s.jsx("div",{className:"flex-1 h-5 rounded bg-bg-surface-2/50 overflow-hidden",children:s.jsx(tu.div,{className:"h-full rounded",style:{backgroundColor:i},initial:{width:0},animate:{width:\`\${a}%\`},transition:{duration:.6,delay:.05*r,ease:[.22,1,.36,1]}})}),s.jsx("span",{className:"text-xs text-text-muted font-mono w-12 text-right shrink-0",children:gu(t)})]},e);var o})})]})}function vu({label:e,active:t,onClick:n}){return s.jsx("button",{onClick:n,className:"text-[10px] font-bold uppercase tracking-wider px-3 py-1.5 rounded-full transition-all duration-200 cursor-pointer border "+(t?"bg-accent text-white border-accent shadow-[0_2px_10px_rgba(99,102,241,0.4)] scale-105":"bg-bg-surface-1 border-border text-text-muted hover:text-text-primary hover:border-text-muted/50"),children:e})}function bu({sessions:e,filters:t,onFilterChange:n}){const r=f.useMemo(()=>[...new Set(e.map(e=>e.client))].sort(),[e]),i=f.useMemo(()=>[...new Set(e.flatMap(e=>e.languages))].sort(),[e]),a=f.useMemo(()=>[...new Set(e.map(e=>e.project).filter(e=>{if(!e)return!1;const t=e.trim().toLowerCase();return!["untitled","mcp","unknown","default","none"].includes(t)}))].sort(),[e]);return r.length>0||i.length>0||a.length>0?s.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-1",children:[s.jsx(vu,{label:"All",active:"all"===t.client&&"all"===t.language&&"all"===t.project,onClick:()=>{n("client","all"),n("language","all"),n("project","all")}}),r.map(e=>s.jsx(vu,{label:au[e]??e,active:t.client===e,onClick:()=>n("client",t.client===e?"all":e)},e)),i.map(e=>s.jsx(vu,{label:e,active:t.language===e,onClick:()=>n("language",t.language===e?"all":e)},e)),a.map(e=>s.jsx(vu,{label:e,active:t.project===e,onClick:()=>n("project",t.project===e?"all":e)},e))]}):null}function xu({onDelete:e,size:t="md",className:n=""}){const[r,i]=f.useState(!1),a=f.useRef(void 0);f.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]);const o="sm"===t?"w-3 h-3":"w-3.5 h-3.5",l="sm"===t?"p-1":"p-1.5";return s.jsx("button",{onClick:t=>{t.stopPropagation(),r?(a.current&&clearTimeout(a.current),i(!1),e()):(i(!0),a.current=setTimeout(()=>i(!1),3e3))},className:\`\${l} rounded-lg transition-all \${r?"bg-error/15 text-error":"text-text-muted hover:text-error/70 hover:bg-error/5"} \${n}\`,title:r?"Click again to confirm":"Delete",children:s.jsx(xe,{className:\`\${o} \${r?"animate-pulse":""}\`})})}function wu(e,t){const n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0});return\`\${n(e)} \u2014 \${n(t)}\`}function ku(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}const Su={feature:"bg-success/15 text-success border-success/30",bugfix:"bg-error/15 text-error border-error/30",refactor:"bg-purple/15 text-purple border-purple/30",test:"bg-blue/15 text-blue border-blue/30",docs:"bg-accent/15 text-accent border-accent/30",setup:"bg-text-muted/15 text-text-muted border-text-muted/20",deployment:"bg-emerald/15 text-emerald border-emerald/30"};function Eu({category:e}){const t=Su[e]??"bg-bg-surface-2 text-text-secondary border-border";return s.jsx("span",{className:\`text-[10px] px-1.5 py-0.5 rounded-full border font-bold uppercase tracking-wider \${t}\`,children:e})}function Cu({score:e}){const t=e/5*100,n=e>=4?"bg-success":e>=3?"bg-accent":"bg-error",r=e>=4?"bg-success/15":e>=3?"bg-accent/15":"bg-error/15";return s.jsx("span",{className:\`w-7 h-[4px] rounded-full \${r} flex-shrink-0 overflow-hidden\`,title:\`Quality: \${e.toFixed(1)}/5\`,children:s.jsx("span",{className:\`block h-full rounded-full \${n}\`,style:{width:\`\${t}%\`}})})}function Tu({evaluation:e}){const t=[{label:"Prompt",value:e.prompt_quality,Icon:de},{label:"Context",value:e.context_provided,Icon:ae},{label:"Scope",value:e.scope_quality,Icon:be},{label:"Independence",value:e.independence_level,Icon:te}];return s.jsxs("div",{className:"px-2 py-1.5 bg-bg-surface-2/30 rounded-md mb-2",children:[s.jsx("div",{className:"grid grid-cols-2 gap-x-6 gap-y-1.5",children:t.map(({label:e,value:t,Icon:n})=>s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px]",children:[s.jsx(n,{className:"w-3 h-3 text-text-muted/50 flex-shrink-0"}),s.jsx("span",{className:"text-text-muted min-w-[58px]",children:e}),s.jsx(Cu,{score:t})]},e))}),s.jsxs("div",{className:"flex items-center gap-4 mt-1.5 pt-1.5 border-t border-border/15",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px]",children:[s.jsx(he,{className:"w-3 h-3 text-text-muted/50"}),s.jsx("span",{className:"text-text-muted",children:"Iterations"}),s.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.iteration_count})]}),s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px]",children:[s.jsx(Se,{className:"w-3 h-3 text-text-muted/50"}),s.jsx("span",{className:"text-text-muted",children:"Tools"}),s.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.tools_leveraged})]})]})]})}function Pu({session:e,milestones:t,defaultExpanded:n=!1,externalShowPublic:r,hideClientAvatar:i=!1,onDeleteSession:a,onDeleteMilestone:o}){const[l,u]=f.useState(n),[c,d]=f.useState(!1),h=r??c,p=d,m=uu(e.client),g=iu[m]??"#91919a",y=ou[m]??m.slice(0,2).toUpperCase(),v=su[m],b=t.length>0,x=e.project?.trim()||"",w=!x||["untitled","mcp","unknown","default","none","null","undefined"].includes(x.toLowerCase()),k=t[0],S=w&&k?k.title:x,E=w&&k?k.private_title||k.title:x;let C=e.private_title||e.title||E||"Untitled Session",T=e.title||S||"Untitled Session";const P=C!==T;return s.jsxs("div",{className:"group/card mb-1 rounded-lg border transition-all duration-200 "+(l?"bg-bg-surface-1 border-accent/30 shadow-md":"bg-bg-surface-1/30 border-border/50 hover:border-accent/30"),children:[s.jsxs("div",{className:"flex items-center",children:[s.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3 py-2 text-left min-w-0",onClick:()=>b&&u(!l),style:{cursor:b?"pointer":"default"},children:[!i&&s.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:{backgroundColor:\`\${g}15\`,color:g,border:\`1px solid \${g}30\`},title:au[m]??m,children:v?s.jsx("div",{className:"w-4 h-4",style:{backgroundColor:g,maskImage:\`url(\${v})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${v})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):y}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[s.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:s.jsx(Os,{mode:"wait",children:s.jsxs(tu.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[h?s.jsx(ye,{className:"w-3 h-3 text-success/60 flex-shrink-0"}):s.jsx(ue,{className:"w-3 h-3 text-accent/60 flex-shrink-0"}),s.jsx("span",{className:"text-sm font-bold truncate text-text-primary tracking-tight",children:h?T:C})]},h?"public":"private")})}),!i&&s.jsx("span",{className:"text-[9px] font-bold text-text-muted font-mono bg-bg-surface-2/60 px-1.5 rounded uppercase tracking-tighter border border-border/30 flex-shrink-0",children:au[m]??m}),e.evaluation&&s.jsx("span",{className:"text-[9px] font-black px-1.5 py-0.5 rounded border flex-shrink-0 "+("completed"===e.evaluation.task_outcome?"bg-success/10 text-success border-success/20":"partial"===e.evaluation.task_outcome?"bg-accent/10 text-accent border-accent/20":"bg-error/10 text-error border-error/20"),children:"completed"===e.evaluation.task_outcome?"DONE":"partial"===e.evaluation.task_outcome?"PART":"FAIL"})]}),s.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-text-muted font-semibold",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ee,{className:"w-3 h-3 opacity-60"}),ku(e.duration_seconds)]}),e.duration_seconds>=900&&(()=>{const t=Math.floor(e.duration_seconds/900),n=t>0?Math.min(e.heartbeat_count/t,1):0,r=n>=.8?"text-success":n>=.5?"text-accent":"text-text-muted";return s.jsxs("span",{className:\`flex items-center gap-0.5 font-mono \${r}\`,title:\`Focus: \${Math.round(100*n)}%\`,children:[s.jsx(Ee,{className:"w-2.5 h-2.5 fill-current opacity-70"}),Math.round(100*n),"%"]})})(),s.jsx("span",{className:"opacity-50 font-mono tracking-tight",children:wu(e.started_at,e.ended_at).split(" \u2014 ")[0]}),t.length>0&&s.jsxs("span",{className:"flex items-center gap-0.5",title:\`\${t.length} milestone\${1!==t.length?"s":""}\`,children:[s.jsx(se,{className:"w-2.5 h-2.5 opacity-60"}),t.length]}),e.evaluation&&s.jsx(Cu,{score:(j=e.evaluation,(j.prompt_quality+j.context_provided+j.scope_quality+j.independence_level)/4)})]})]})]}),s.jsxs("div",{className:"flex items-center px-2 gap-1.5 border-l border-border/30 h-8 self-center",children:[a&&s.jsx(xu,{onDelete:()=>a(e.session_id),className:"opacity-0 group-hover/card:opacity-100"}),P&&void 0===r&&s.jsx("button",{onClick:e=>{e.stopPropagation(),p(!h)},className:"p-1.5 rounded-lg transition-all "+(h?"bg-success/10 text-success":"text-text-muted hover:bg-bg-surface-2"),title:h?"Public Mode":"Private Mode",children:h?s.jsx(re,{className:"w-3.5 h-3.5"}):s.jsx(ne,{className:"w-3.5 h-3.5"})}),b&&s.jsx("button",{onClick:()=>u(!l),className:"p-1.5 rounded-lg transition-all "+(l?"text-accent bg-accent/5":"text-text-muted hover:bg-bg-surface-2"),children:s.jsx(G,{className:"w-4 h-4 transition-transform duration-200 "+(l?"rotate-180":"")})})]})]}),s.jsx(Os,{children:l&&b&&s.jsx(tu.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:s.jsxs("div",{className:"px-3 pb-3 pt-1 space-y-1",children:[s.jsx("div",{className:"h-px bg-border/20 mb-2 mx-1"}),e.evaluation&&s.jsx(Tu,{evaluation:e.evaluation}),s.jsx("div",{className:"space-y-0.5",children:t.map(e=>{e.private_title;const t=h?e.title:e.private_title||e.title,n=function(e){if(!e||e<=0)return"";if(e<60)return\`\${e}m\`;const t=Math.floor(e/60),n=e%60;return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}(e.duration_minutes);return s.jsxs("div",{className:"group flex items-center gap-2 p-1.5 rounded-md hover:bg-bg-surface-2/40 transition-colors",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{backgroundColor:cu[e.category]??"#9c9588"}}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs font-medium text-text-secondary group-hover:text-text-primary truncate",children:t}),s.jsx(Eu,{category:e.category})]})}),n&&s.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:n}),o&&s.jsx(xu,{onDelete:()=>o(e.id),size:"sm",className:"opacity-0 group-hover:opacity-100"})]},e.id)})})]})})})]});var j}function ju(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Nu({group:e,defaultExpanded:t,globalShowPublic:n,onDeleteSession:r,onDeleteMilestone:i,onDeleteConversation:a}){const[o,l]=f.useState(t),[u,c]=f.useState(!1),d=n||u;if(1===e.sessions.length){const a=e.sessions[0];return s.jsx(Pu,{session:a.session,milestones:a.milestones,defaultExpanded:t&&a.milestones.length>0,externalShowPublic:n||void 0,onDeleteSession:r,onDeleteMilestone:i})}const h=uu(e.sessions[0].session.client),p=iu[h]??"#91919a",m=ou[h]??h.slice(0,2).toUpperCase(),g=su[h],y=e.aggregateEval,v=e.sessions[0].session,b=v.private_title||v.title||v.project||"Conversation",x=v.title||v.project||"Conversation",w=b!==x;return s.jsxs("div",{className:"group/conv rounded-lg border border-accent/20 bg-bg-surface-1/20 overflow-hidden",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3 py-2 text-left hover:bg-bg-surface-1/40 transition-colors min-w-0",onClick:()=>l(!o),children:[s.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:{backgroundColor:\`\${p}15\`,color:p,border:\`1px solid \${p}30\`},title:au[h]??h,children:g?s.jsx("div",{className:"w-4 h-4",style:{backgroundColor:p,maskImage:\`url(\${g})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${g})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):m}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:s.jsx(Os,{mode:"wait",children:s.jsxs(tu.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[d?s.jsx(ye,{className:"w-3 h-3 text-success/60 flex-shrink-0"}):s.jsx(ue,{className:"w-3 h-3 text-accent/60 flex-shrink-0"}),s.jsx("span",{className:"text-sm font-bold truncate text-text-primary",children:d?x:b})]},d?"public":"private")})}),s.jsxs("span",{className:"text-[10px] font-bold text-accent/80 bg-accent/5 px-1.5 py-0.5 rounded border border-accent/10 flex-shrink-0",children:[e.sessions.length," prompts"]}),y&&s.jsxs("span",{className:"text-[9px] font-bold px-1.5 py-0.5 rounded border flex-shrink-0 "+((y.outcomes.completed??0)===y.session_count?"bg-success/10 text-success border-success/20":(y.outcomes.completed??0)>0?"bg-accent/10 text-accent border-accent/20":"bg-error/10 text-error border-error/20"),children:[y.outcomes.completed??0,"/",y.session_count]})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-text-muted font-medium mt-0.5",children:[s.jsx("span",{className:"font-mono",children:ju(e.totalDuration)}),e.totalMilestones>0&&s.jsxs("span",{className:"text-[10px] text-accent/70",children:[e.totalMilestones," milestone",1!==e.totalMilestones?"s":""]}),y&&s.jsxs("span",{className:"text-[10px] font-mono text-text-muted/60",children:["avg prompt: ",y.prompt_quality,"/5"]})]})]})]}),s.jsxs("div",{className:"flex items-center px-2 gap-1.5 border-l border-border/30 h-8 self-center",children:[a&&e.conversationId&&s.jsx(xu,{onDelete:()=>a(e.conversationId),className:"opacity-0 group-hover/conv:opacity-100"}),w&&!n&&s.jsx("button",{onClick:()=>c(!u),className:"p-1.5 rounded-lg transition-all "+(d?"bg-success/10 text-success":"text-text-muted hover:bg-bg-surface-2"),title:d?"Public Mode":"Private Mode",children:d?s.jsx(re,{className:"w-3.5 h-3.5"}):s.jsx(ne,{className:"w-3.5 h-3.5"})}),s.jsx("button",{onClick:()=>l(!o),className:"p-1.5 rounded-lg transition-all "+(o?"text-accent bg-accent/5":"text-text-muted hover:bg-bg-surface-2"),children:s.jsx(G,{className:"w-4 h-4 transition-transform duration-200 "+(o?"rotate-180":"")})})]})]}),s.jsx(Os,{children:o&&s.jsx(tu.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:s.jsxs("div",{className:"px-3 pb-2 relative",children:[s.jsx("div",{className:"absolute left-[1.75rem] top-0 bottom-2 w-px",style:{backgroundColor:\`\${p}25\`}}),s.jsx("div",{className:"space-y-1 pl-10",children:e.sessions.map((e,t)=>s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute -left-7 top-5 w-2 h-2 rounded-full border-2",style:{backgroundColor:p,borderColor:\`\${p}40\`}}),s.jsx(Pu,{session:e.session,milestones:e.milestones,defaultExpanded:!1,externalShowPublic:d||void 0,hideClientAvatar:!0,onDeleteSession:r,onDeleteMilestone:i})]},e.session.session_id))})]})})})]})}function Mu({sessions:e,milestones:t,filters:n,globalShowPublic:r,onDeleteSession:i,onDeleteConversation:a,onDeleteMilestone:o}){const l=f.useMemo(()=>e.filter(e=>("all"===n.client||e.client===n.client)&&(!("all"!==n.language&&!e.languages.includes(n.language))&&("all"===n.project||(e.project??"")===n.project))),[e,n]),u=f.useMemo(()=>"all"===n.category?t:t.filter(e=>e.category===n.category),[t,n.category]),c=f.useMemo(()=>{const e=function(e,t){const n=new Map;for(const i of t){const e=n.get(i.session_id);e?e.push(i):n.set(i.session_id,[i])}const r=e.map(e=>({session:e,milestones:n.get(e.session_id)??[]}));return r.sort((e,t)=>new Date(t.session.started_at).getTime()-new Date(e.session.started_at).getTime()),r}(l,u);return function(e){const t=new Map,n=[];for(const i of e){const e=i.session.conversation_id;if(e){const n=t.get(e);n?n.push(i):t.set(e,[i])}else n.push(i)}const r=[];for(const[i,a]of t){a.sort((e,t)=>(e.session.conversation_index??0)-(t.session.conversation_index??0));const e=a.reduce((e,t)=>e+t.session.duration_seconds,0),t=a.reduce((e,t)=>e+t.milestones.length,0),n=a[0].session.started_at,o=a[a.length-1].session.ended_at;r.push({conversationId:i,sessions:a,aggregateEval:$(a),totalDuration:e,totalMilestones:t,startedAt:n,endedAt:o})}for(const i of n)r.push({conversationId:null,sessions:[i],aggregateEval:i.session.evaluation?$([i]):null,totalDuration:i.session.duration_seconds,totalMilestones:i.milestones.length,startedAt:i.session.started_at,endedAt:i.session.ended_at});return r.sort((e,t)=>new Date(t.startedAt).getTime()-new Date(e.startedAt).getTime()),r}(e)},[l,u]);return 0===c.length?s.jsx("div",{className:"text-center text-text-muted py-8 text-sm mb-4",children:"No sessions in this window"}):s.jsx("div",{className:"space-y-1.5 mb-4",children:c.map((e,t)=>s.jsx(Nu,{group:e,defaultExpanded:0===t,globalShowPublic:r,onDeleteSession:i,onDeleteMilestone:o,onDeleteConversation:a},e.conversationId??e.sessions[0].session.session_id))})}function Du({sessions:e,timeScale:t,effectiveTime:n,isLive:r,onDayClick:i,highlightDate:a}){const o="24h"===t||"12h"===t,l=new Date(n).toISOString().slice(0,10),u=f.useMemo(()=>o?function(e,t){const n=new Date(\`\${t}T00:00:00\`).getTime(),r=n+864e5,i=[];for(let a=0;a<24;a++)i.push({hour:a,minutes:0});for(const a of e){const e=new Date(a.started_at).getTime(),t=new Date(a.ended_at).getTime();if(t<n||e>r)continue;const o=Math.max(e,n),s=Math.min(t,r);for(let r=0;r<24;r++){const e=n+36e5*r,t=e+36e5,a=Math.max(o,e),l=Math.min(s,t);l>a&&(i[r].minutes+=(l-a)/6e4)}}return i}(e,l):[],[e,l,o]),c=f.useMemo(()=>o?[]:function(e,t){const n=new Date,r=[];for(let i=t-1;i>=0;i--){const t=new Date(n);t.setDate(t.getDate()-i);const a=t.toISOString().slice(0,10);let o=0;for(const n of e)n.started_at.slice(0,10)===a&&(o+=n.duration_seconds);r.push({date:a,hours:o/3600})}return r}(e,7),[e,o]),d=o?\`Hourly \u2014 \${new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}\`:"Last 7 Days";if(o){const e=Math.max(...u.map(e=>e.minutes),1);return s.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[s.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),s.jsxs("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[e.toFixed(0),"m peak"]})]}),s.jsx("div",{className:"flex items-end gap-[3px] h-16",children:u.map((t,n)=>{const r=e>0?t.minutes/e*100:0;return s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[s.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:s.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[s.jsxs("span",{className:"font-bold",children:[t.hour,":00"]}),s.jsxs("span",{className:"text-accent",children:[t.minutes.toFixed(0),"m active"]}),s.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),s.jsx(tu.div,{initial:{height:0},animate:{height:\`\${Math.max(r,t.minutes>0?8:0)}%\`},transition:{delay:.01*n,duration:.5},className:"w-full rounded-t-sm transition-all duration-300 group-hover:bg-accent relative overflow-hidden",style:{minHeight:t.minutes>0?"4px":"0px",backgroundColor:t.minutes>0?\`rgba(99, 102, 241, \${.4+t.minutes/e*.6})\`:"var(--color-bg-surface-2)"},children:t.minutes>.5*e&&s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-transparent to-white/10"})})]},t.hour)})}),s.jsx("div",{className:"flex gap-[3px] mt-2 border-t border-border/30 pt-2",children:u.map(e=>s.jsx("div",{className:"flex-1 text-center",children:e.hour%6==0&&s.jsx("span",{className:"text-[9px] text-text-muted font-bold font-mono uppercase",children:0===e.hour?"12a":e.hour<12?\`\${e.hour}a\`:12===e.hour?"12p":e.hour-12+"p"})},e.hour))})]})}const h=Math.max(...c.map(e=>e.hours),.1);return s.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[s.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),s.jsx("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:"Last 7 days"})]}),s.jsx("div",{className:"flex items-end gap-2 h-16",children:c.map((e,t)=>{const n=h>0?e.hours/h*100:0,r=e.date===a;return s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[s.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:s.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[s.jsx("span",{className:"font-bold",children:e.date}),s.jsxs("span",{className:"text-accent",children:[e.hours.toFixed(1),"h active"]}),s.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),s.jsx(tu.div,{initial:{height:0},animate:{height:\`\${Math.max(n,e.hours>0?8:0)}%\`},transition:{delay:.05*t,duration:.5},className:"w-full rounded-t-md cursor-pointer transition-all duration-300 group-hover:scale-x-110 origin-bottom "+(r?"ring-2 ring-accent ring-offset-2 ring-offset-bg-base":""),style:{minHeight:e.hours>0?"4px":"0px",backgroundColor:r?"var(--color-accent-bright)":e.hours>0?\`rgba(99, 102, 241, \${.4+e.hours/h*.6})\`:"var(--color-bg-surface-2)"},onClick:()=>i?.(e.date)})]},e.date)})}),s.jsx("div",{className:"flex gap-2 mt-2 border-t border-border/30 pt-2",children:c.map(e=>s.jsx("div",{className:"flex-1 text-center",children:s.jsx("span",{className:"text-[10px] text-text-muted font-bold uppercase tracking-tighter",children:new Date(e.date+"T12:00:00").toLocaleDateString([],{weekday:"short"})})},e.date))})]})}function Lu(e){if(!e)return"Never synced";const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"Just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;return\`\${Math.floor(r/24)}d ago\`}function Au({config:e,onRefresh:t}){const[n,r]=f.useState(""),[i,a]=f.useState(""),[o,l]=f.useState("email"),[u,c]=f.useState(!1),[d,h]=f.useState(null);if(!e)return null;if(e.authenticated){const n=async()=>{c(!0),h(null);try{const e=await z("/api/local/sync");e.success?(h("Synced!"),t(),setTimeout(()=>h(null),3e3)):h(e.error??"Sync failed")}catch(e){h(e.message)}finally{c(!1)}};return s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 p-4 mt-12 bg-bg-surface-1/50 rounded-2xl border border-border/50 backdrop-blur-sm",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-accent/10 flex items-center justify-center border border-accent/20",children:s.jsx(ke,{className:"w-4 h-4 text-accent"})}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-xs font-bold text-text-primary",children:e.email}),s.jsxs("span",{className:"text-[10px] text-text-muted font-mono uppercase tracking-tighter",children:["Last sync: ",Lu(e.last_sync_at)]})]})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[d&&s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest "+("Synced!"===d?"text-success":"text-error"),children:d}),s.jsxs("button",{onClick:n,disabled:u,className:"group flex items-center gap-2 px-4 py-2 bg-accent hover:bg-accent-bright text-white text-xs font-bold rounded-lg transition-all duration-300 shadow-lg shadow-accent/20 disabled:opacity-50 cursor-pointer overflow-hidden relative",children:[s.jsx(he,{className:"w-3.5 h-3.5 "+(u?"animate-spin":"group-hover:rotate-180 transition-transform duration-500")}),u?"Syncing...":"Sync Now"]})]})]})}const p=f.useCallback(async()=>{if(n.includes("@")){c(!0),h(null);try{await function(e){return z("/api/local/auth/send-otp",{email:e})}(n),l("otp")}catch(e){h(e.message)}finally{c(!1)}}},[n]),m=f.useCallback(async()=>{if(/^\\d{6}$/.test(i)){c(!0),h(null);try{await function(e,t){return z("/api/local/auth/verify-otp",{email:e,code:t})}(n,i),t()}catch(e){h(e.message)}finally{c(!1)}}},[n,i,t]);return s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 p-4 mt-12 bg-bg-surface-1/50 rounded-2xl border border-border/50 backdrop-blur-sm",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-bg-surface-2 flex items-center justify-center border border-border",children:s.jsx(ge,{className:"w-4 h-4 text-text-muted"})}),s.jsx("span",{className:"text-xs font-bold text-text-secondary uppercase tracking-widest",children:"Sign in to sync"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[d&&s.jsx("span",{className:"text-[10px] font-bold text-error uppercase tracking-widest mr-2",children:d}),"email"===o?s.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[s.jsx("div",{className:"pl-3 py-2",children:s.jsx(ce,{className:"w-3.5 h-3.5 text-text-muted"})}),s.jsx("input",{type:"email",placeholder:"you@email.com",value:n,onChange:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&p(),className:"px-3 py-2 text-xs bg-transparent text-text-primary outline-none w-40 placeholder:text-text-muted/50"}),s.jsx("button",{onClick:p,disabled:u||!n.includes("@"),className:"px-4 py-2 bg-bg-surface-2 hover:bg-bg-surface-3 text-text-primary text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer border-l border-border",children:u?"...":"Send"})]}):s.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[s.jsx("input",{type:"text",maxLength:6,placeholder:"000000",inputMode:"numeric",autoComplete:"one-time-code",value:i,onChange:e=>a(e.target.value),onKeyDown:e=>"Enter"===e.key&&m(),autoFocus:!0,className:"px-4 py-2 text-xs bg-transparent text-text-primary text-center font-mono tracking-widest outline-none w-32 placeholder:text-text-muted/50"}),s.jsx("button",{onClick:m,disabled:u||6!==i.length,className:"px-4 py-2 bg-accent hover:bg-accent-bright text-white text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer",children:u?"...":"Verify"})]})]})]})}var _u=j();const zu={"15m":{visibleDuration:9e5,majorTickInterval:3e5,minorTickInterval:6e4,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"30m":{visibleDuration:18e5,majorTickInterval:6e5,minorTickInterval:12e4,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"1h":{visibleDuration:36e5,majorTickInterval:9e5,minorTickInterval:3e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"12h":{visibleDuration:432e5,majorTickInterval:72e5,minorTickInterval:18e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"24h":{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"7d":{visibleDuration:6048e5,majorTickInterval:864e5,minorTickInterval:216e5,labelFormat:e=>e.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"})},"30d":{visibleDuration:2592e6,majorTickInterval:6048e5,minorTickInterval:864e5,labelFormat:e=>e.toLocaleDateString([],{month:"short",day:"numeric"})}};function Ru(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Fu({value:e,onChange:t,scale:n,sessions:r=[],milestones:i=[]}){const a=f.useRef(null),[o,l]=f.useState(0);f.useEffect(()=>{if(!a.current)return;const e=new ResizeObserver(e=>{for(const t of e)l(t.contentRect.width)});return e.observe(a.current),l(a.current.getBoundingClientRect().width),()=>e.disconnect()},[]);const u=zu[n],c=o>0?o/u.visibleDuration:0,[d,h]=f.useState(!1),p=f.useRef(0),m=f.useCallback(e=>{h(!0),p.current=e.clientX,e.currentTarget.setPointerCapture(e.pointerId)},[]),g=f.useCallback(n=>{if(!d||0===c)return;const r=n.clientX-p.current;p.current=n.clientX,t(e+-r/c)},[d,c,e,t]),y=f.useCallback(()=>{h(!1)},[]),v=f.useMemo(()=>{if(!o||0===c)return[];const t=u.visibleDuration/2,n=e+t,r=e-t-u.majorTickInterval,i=n+u.majorTickInterval,a=[];for(let o=Math.ceil(r/u.majorTickInterval)*u.majorTickInterval;o<=i;o+=u.majorTickInterval)a.push({type:"major",time:o,position:(o-e)*c,label:u.labelFormat(new Date(o))});for(let o=Math.ceil(r/u.minorTickInterval)*u.minorTickInterval;o<=i;o+=u.minorTickInterval)o%u.majorTickInterval!==0&&a.push({type:"minor",time:o,position:(o-e)*c});return a},[e,o,c,u]),b=f.useMemo(()=>r.map(e=>({session:e,start:new Date(e.started_at).getTime(),end:new Date(e.ended_at).getTime()})),[r]),x=f.useMemo(()=>{if(!o||0===c)return[];const t=u.visibleDuration/2,n=e-t,r=e+t;return b.filter(e=>e.start<=r&&e.end>=n).map(t=>({session:t.session,leftOffset:(Math.max(t.start,n)-e)*c,width:(Math.min(t.end,r)-Math.max(t.start,n))*c}))},[b,e,o,c,u]),w=f.useMemo(()=>i.map(e=>({milestone:e,time:new Date(e.created_at).getTime()})).sort((e,t)=>e.time-t.time),[i]),k=f.useMemo(()=>{if(!o||0===c||!w.length)return[];const t=u.visibleDuration/2,n=e-t,r=e+t;let i=0,a=w.length;for(;i<a;){const e=i+a>>1;w[e].time<n?i=e+1:a=e}const s=i;for(a=w.length;i<a;){const e=i+a>>1;w[e].time<=r?i=e+1:a=e}const l=i,d=[];for(let o=s;o<l;o++){const t=w[o];d.push({...t,offset:(t.time-e)*c})}return d},[w,e,o,c,u]),[S,E]=f.useState(null),C=f.useRef(e);return f.useEffect(()=>{S&&Math.abs(e-C.current)>1e3&&E(null),C.current=e},[e,S]),s.jsxs("div",{className:"relative h-20",children:[s.jsxs("div",{className:"absolute inset-0 bg-transparent border-t border-border/50 overflow-hidden select-none touch-none cursor-grab active:cursor-grabbing",ref:a,onPointerDown:m,onPointerMove:g,onPointerUp:y,style:{touchAction:"none"},children:[s.jsxs("div",{className:"absolute left-1/2 top-0 bottom-0 w-[2px] bg-accent z-30 -translate-x-1/2 shadow-[0_0_15px_rgba(99,102,241,0.5)]",children:[s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-3 h-3 bg-accent rounded-b-full"}),s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-3 h-3 bg-accent rounded-t-full"})]}),s.jsxs("div",{className:"absolute inset-0 left-1/2 top-0 bottom-0 pointer-events-none",children:[v.map(e=>s.jsx("div",{className:"absolute top-0 border-l "+("major"===e.type?"border-border/60":"border-border/30"),style:{left:e.position,height:"major"===e.type?"100%":"35%",bottom:0},children:"major"===e.type&&e.label&&s.jsx("span",{className:"absolute top-3 left-2 text-[9px] font-bold text-text-muted uppercase tracking-wider whitespace-nowrap bg-bg-surface-1/80 px-1 py-0.5 rounded",children:e.label})},e.time)),x.map(e=>s.jsx("div",{className:"absolute bottom-0 rounded-t-md pointer-events-auto cursor-pointer transition-opacity hover:opacity-80",style:{left:e.leftOffset,width:Math.max(e.width,3),height:"45%",backgroundColor:"rgba(99, 102, 241, 0.15)",borderTop:"2px solid rgba(99, 102, 241, 0.5)",boxShadow:"inset 0 1px 10px rgba(99, 102, 241, 0.05)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();E({type:"session",data:e.session,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>E(null)},e.session.session_id)),k.map((e,n)=>s.jsx("div",{className:"absolute bottom-3 pointer-events-auto cursor-pointer z-40 transition-transform hover:scale-125",style:{left:e.offset,transform:"translateX(-50%)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();E({type:"milestone",data:e.milestone,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>E(null),onClick:n=>{n.stopPropagation(),t(e.time)},children:s.jsx("div",{className:"w-3.5 h-3.5 rounded-full border-2 border-bg-surface-1 shadow-lg",style:{backgroundColor:cu[e.milestone.category]??"#9c9588",boxShadow:\`0 0 10px \${cu[e.milestone.category]}50\`}})},n))]})]}),S&&_u.createPortal(s.jsx("div",{className:"fixed z-[9999] pointer-events-none",style:{left:S.x,top:S.y,transform:"translate(-50%, -100%)"},children:s.jsxs("div",{className:"mb-3 bg-bg-surface-3/95 backdrop-blur-md text-text-primary rounded-xl shadow-2xl px-3 py-2.5 text-[11px] min-w-[180px] max-w-[280px] border border-border/50 animate-in fade-in zoom-in-95 duration-200",children:["session"===S.type?s.jsx(Ou,{session:S.data}):s.jsx(Vu,{milestone:S.data}),s.jsx("div",{className:"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-bg-surface-3/95 border-r border-b border-border/50 rotate-45"})]})}),document.body)]})}function Ou({session:e}){const t=au[e.client]??e.client,n=e.private_title||e.title||e.project||\`\${t} Session\`;return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-bold text-xs text-accent uppercase tracking-widest",children:t}),s.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:Ru(e.duration_seconds)})]}),s.jsx("div",{className:"h-px bg-border/50 my-0.5"}),s.jsx("div",{className:"text-text-primary font-medium",children:n}),s.jsx("div",{className:"text-text-secondary capitalize text-[10px]",children:e.task_type})]})}function Vu({milestone:e}){const t=e.private_title??e.title;return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-bold text-[10px] uppercase tracking-widest",style:{color:cu[e.category]??"#9c9588"},children:e.category}),e.complexity&&s.jsx("span",{className:"text-[9px] font-mono text-text-muted font-bold border border-border/50 px-1 rounded uppercase",children:e.complexity})]}),s.jsx("div",{className:"h-px bg-border/50 my-0.5"}),s.jsx("div",{className:"font-bold text-xs break-words text-text-primary",children:t}),e.private_title&&s.jsxs("div",{className:"text-[10px] text-text-muted italic opacity-70",children:["Public: ",e.title]})]})}const Iu={"15m":9e5,"30m":18e5,"1h":36e5,"12h":432e5,"24h":864e5,"7d":6048e5,"30d":2592e6},$u={"15m":"15 Minutes","30m":"30 Minutes","1h":"1 Hour","12h":"12 Hours","24h":"24 Hours","7d":"7 Days","30d":"30 Days"};function Bu(e,t){const n=e.trim();if(!n)return null;const r=new Date(t),i=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?\\s*(AM|PM)$/i);if(i){let e=parseInt(i[1],10);const t=parseInt(i[2],10),n=i[3]?parseInt(i[3],10):0,a=i[4].toUpperCase();return e<1||e>12||t>59||n>59?null:("AM"===a&&12===e&&(e=0),"PM"===a&&12!==e&&(e+=12),r.setHours(e,t,n,0),r.getTime())}const a=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/);if(a){const e=parseInt(a[1],10),t=parseInt(a[2],10),n=a[3]?parseInt(a[3],10):0;return e>23||t>59||n>59?null:(r.setHours(e,t,n,0),r.getTime())}return null}const Uu=["15m","30m","1h","12h","24h","7d","30d"];function Hu({value:e,onChange:t,scale:n,onScaleChange:r,sessions:i,milestones:a}){const o=null===e,[l,u]=f.useState(Date.now());f.useEffect(()=>{if(!o)return;const e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[o]);const c=o?l:e,[d,h]=f.useState(!1),[p,m]=f.useState(""),g=f.useRef(null),y=f.useRef(!1),v=f.useRef(""),b=f.useRef(!1),x=f.useRef(0),w=f.useCallback(e=>{const n=Date.now();if(e>=n-2e3)return b.current=!0,x.current=n,void t(null);b.current&&n-x.current<300||b.current&&e>=n-1e4?t(null):(b.current=!1,t(e))},[t]),k=e=>{const n=c,r=Math.min(n+e,Date.now());t(r)},S=()=>{y.current=o,t(c);const e=new Date(c).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});v.current=e,m(e),h(!0),requestAnimationFrame(()=>g.current?.select())},E=()=>{if(h(!1),y.current&&p===v.current)return void t(null);const e=Bu(p,c);null!==e&&t(Math.min(e,Date.now()))};return s.jsxs("div",{className:"flex flex-col bg-bg-surface-1/40 border border-border/50 rounded-2xl overflow-hidden mb-8 shadow-xl backdrop-blur-md",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between px-6 py-5 border-b border-border/50 gap-6",children:[s.jsxs("div",{className:"flex flex-col items-start gap-1.5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2 h-8",children:[d?s.jsx("input",{ref:g,type:"text",value:p,onChange:e=>m(e.target.value),onBlur:E,onKeyDown:e=>{if("Enter"===e.key)return void E();if("Escape"===e.key)return e.preventDefault(),h(!1),void(y.current&&t(null));if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;e.preventDefault();const n=g.current;if(!n)return;const r=n.selectionStart??0,i="ArrowUp"===e.key?1:-1,a=Bu(p,c);if(null===a)return;const o=p.indexOf(":"),s=p.indexOf(":",o+1),l=p.lastIndexOf(" ");let u;u=r<=o?36e5*i:s>-1&&r<=s?6e4*i:l>-1&&r<=l?1e3*i:12*i*36e5;const d=Math.min(a+u,Date.now()),f=new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});m(f),t(d),requestAnimationFrame(()=>{n&&n.setSelectionRange(r,r)})},className:"text-2xl font-mono font-bold tracking-tight bg-bg-surface-2 border border-accent rounded-lg px-2 -ml-2 w-[165px] outline-none text-text-primary shadow-[0_0_10px_rgba(99,102,241,0.2)]"}):s.jsxs("button",{onClick:S,className:"group flex items-center gap-2 hover:bg-bg-surface-2/50 rounded-lg px-2 -ml-2 py-1 transition-all cursor-text",title:"Click to edit time",children:[s.jsx(ee,{className:"w-5 h-5 "+(o?"text-text-muted":"text-accent")}),s.jsx("span",{className:"text-2xl font-mono font-bold tracking-tight tabular-nums "+(o?"text-text-primary":"text-accent"),children:new Date(c).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"})})]}),s.jsx("button",{onClick:d?E:S,className:"p-1.5 rounded-lg transition-colors flex-shrink-0 "+(d?"bg-accent text-white hover:bg-accent-bright":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:d?"Confirm time":"Edit time",children:s.jsx(fe,{className:"w-3.5 h-3.5"})})]}),o?s.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 text-[10px] font-bold uppercase tracking-widest bg-success/10 text-success rounded-full border border-success/20 shadow-[0_0_10px_rgba(16,185,129,0.1)]",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-success animate-pulse"}),"Live"]}):s.jsx("div",{className:"flex items-center gap-1.5 px-2.5 py-1 text-[10px] font-bold uppercase tracking-widest bg-accent/10 text-accent rounded-full border border-accent/20",children:"History"})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary font-medium px-0.5",children:[s.jsx(K,{className:"w-3.5 h-3.5 text-text-muted"}),new Date(c).toLocaleDateString([],{weekday:"short",month:"long",day:"numeric",year:"numeric"})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[s.jsx("div",{className:"flex items-center bg-bg-surface-2/50 border border-border/50 rounded-xl p-1 shadow-inner",children:Uu.map(e=>s.jsx("button",{onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(n===e?"bg-accent text-white shadow-lg shadow-accent/20":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:$u[e],children:e},e))}),s.jsxs("div",{className:"flex items-center gap-2",children:[!o&&s.jsxs("button",{onClick:()=>t(null),className:"group flex items-center gap-2 px-4 py-2 text-[10px] font-bold uppercase tracking-widest bg-accent/10 hover:bg-accent text-accent hover:text-white rounded-xl transition-all border border-accent/20",children:[s.jsx(me,{className:"w-3.5 h-3.5 group-hover:-rotate-90 transition-transform duration-500"}),"Live"]}),s.jsxs("div",{className:"flex items-center gap-1 bg-bg-surface-2/50 border border-border/50 rounded-xl p-1",children:[s.jsx("button",{onClick:()=>k(-Iu[n]),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors",title:\`Back \${$u[n]}\`,children:s.jsx(Z,{className:"w-4 h-4"})}),s.jsx("button",{onClick:()=>k(Iu[n]),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors disabled:opacity-20 disabled:cursor-not-allowed",title:\`Forward \${$u[n]}\`,disabled:o||c>=Date.now()-1e3,children:s.jsx(J,{className:"w-4 h-4"})})]})]})]})]}),s.jsx(Fu,{value:c,onChange:w,scale:n,sessions:i,milestones:a})]})}const Wu={feature:{verb:"shipped",noun:"feature",plural:"features"},bugfix:{verb:"fixed",noun:"bug",plural:"bugs"},refactor:{verb:"refactored",noun:"module",plural:"modules"},test:{verb:"added",noun:"test suite",plural:"test suites"},docs:{verb:"wrote",noun:"doc",plural:"docs"},setup:{verb:"configured",noun:"setup",plural:"setups"},deployment:{verb:"deployed",noun:"release",plural:"releases"},other:{verb:"completed",noun:"task",plural:"tasks"}};function qu({children:e}){return s.jsx("span",{className:"text-text-primary font-medium",children:e})}function Yu({sessions:e,milestones:t}){const n=f.useMemo(()=>function(e,t){if(0===e.length)return s.jsx("span",{className:"text-text-muted",children:"No sessions in this time window."});const n=[],r=e.reduce((e,t)=>e+t.duration_seconds,0)/3600,i=r<.1?"<0.1":r.toFixed(1);if(n.push(s.jsxs("span",{children:[s.jsx(qu,{children:e.length})," ",1===e.length?"session":"sessions",","," ",s.jsx(qu,{children:i})," hrs"]},"sessions")),t.length>0){const e={};let r=0;for(const n of t)e[n.category]=(e[n.category]??0)+1,"feature"===n.category&&"complex"===n.complexity&&r++;const i=[],a=["feature","bugfix","refactor","test","docs","setup","deployment","other"];for(const t of a){const n=e[t];if(!n)continue;const a=Wu[t]??Wu.other,o=1===n?a.noun:a.plural,l="feature"===t&&r>0?s.jsxs("span",{children:[" ","(",s.jsx(qu,{children:r})," complex)"]},\`\${t}-complex\`):null;i.push(s.jsxs("span",{children:[a.verb," ",s.jsx(qu,{children:n})," ",o,l]},t))}if(i.length>0){n.push(s.jsx("span",{children:" \u2014 "},"milestone-sep"));for(let e=0;e<i.length;e++)e>0&&n.push(s.jsx("span",{children:", "},\`sep-\${e}\`)),n.push(i[e])}}const a={};for(const s of e)s.client&&(a[s.client]=(a[s.client]??0)+1);const o=Object.entries(a).sort((e,t)=>t[1]-e[1])[0];if(o){const e=au[o[0]]??o[0];n.push(s.jsxs("span",{children:[". Most active: ",s.jsx(qu,{children:e})]},"client"))}const l={};for(const s of e){const e=s.languages?.[0];e&&(l[e]=(l[e]??0)+1)}const u=Object.entries(l).sort((e,t)=>t[1]-e[1])[0];if(u){const e=u[0].charAt(0).toUpperCase()+u[0].slice(1);n.push(s.jsxs("span",{children:[". Primary: ",s.jsx(qu,{children:e})]},"lang"))}return n.push(s.jsx("span",{children:"."},"end")),s.jsx(s.Fragment,{children:n})}(e,t),[e,t]);return s.jsx(tu.div,{initial:{opacity:0},animate:{opacity:1},className:"rounded-xl bg-bg-surface-1 border border-border/50 px-4 py-3 mb-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(ve,{className:"w-4 h-4 text-accent flex-shrink-0 mt-0.5"}),s.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:n})]})})}function Xu({sessions:e}){const{scores:t,summaryLine:n}=f.useMemo(()=>{const t=e.filter(e=>null!=e.evaluation);if(0===t.length)return{scores:null,summaryLine:null};let n=0,r=0,i=0,a=0,o=0,s=0;for(const e of t){const t=e.evaluation;n+=t.prompt_quality,r+=t.context_provided,i+=t.independence_level,a+=t.scope_quality,s+=t.iteration_count,"completed"===t.task_outcome&&o++}const l=t.length,u=Math.round(o/l*100);return{scores:[{label:"Prompt Quality",value:n/l,max:5},{label:"Context",value:r/l,max:5},{label:"Independence",value:i/l,max:5},{label:"Scope",value:a/l,max:5},{label:"Completion",value:u/20,max:5}],summaryLine:\`\${l} session\${1===l?"":"s"} evaluated \xB7 \${u}% completed \xB7 avg \${(s/l).toFixed(1)} iterations\`}},[e]);return s.jsxs(tu.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:s.jsx(be,{className:"w-3.5 h-3.5 text-text-muted"})}),s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"AI Proficiency"})]}),null===t?s.jsx("p",{className:"text-xs text-text-muted py-2",children:"No evaluation data yet"}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"space-y-3",children:t.map((e,t)=>{const n=e.value/e.max*100,r="Completion"===e.label?\`\${Math.round(n)}%\`:e.value.toFixed(1);return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-xs text-text-secondary font-medium w-28 text-right shrink-0",children:e.label}),s.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-bg-surface-2/50 overflow-hidden",children:s.jsx(tu.div,{className:"h-full rounded-full",style:{backgroundColor:(i=e.value,i>=4?"var(--color-accent)":i>=3?"var(--color-success)":"var(--color-text-muted)")},initial:{width:0},animate:{width:\`\${n}%\`},transition:{duration:.6,delay:.05*t,ease:[.22,1,.36,1]}})}),s.jsx("span",{className:"text-xs text-text-muted font-mono w-10 text-right shrink-0",children:r})]},e.label);var i})}),s.jsx("p",{className:"text-[10px] text-text-muted mt-4 px-1 font-mono",children:n})]})]})}const Ku=["Output","Efficiency","Prompts","Consistency","Breadth"];function Qu(e,t,n,r,i){const a=2*Math.PI*e/5-Math.PI/2;return[n+i*t*Math.cos(a),r+i*t*Math.sin(a)]}function Gu(e,t,n,r){const i=[];for(let a=0;a<5;a++){const[o,s]=Qu(a,e,t,n,r);i.push(\`\${o},\${s}\`)}return i.join(" ")}function Zu({sessions:e,milestones:t,streak:n}){const{values:r,hasEvalData:i}=f.useMemo(()=>{const r={simple:1,medium:2,complex:4};let i=0;for(const e of t)i+=r[e.complexity]??1;const a=Math.min(1,i/10),o=e.reduce((e,t)=>e+t.files_touched,0),s=e.reduce((e,t)=>e+t.duration_seconds,0)/3600,l=Math.min(1,o/Math.max(s,1)/20),u=e.filter(e=>null!=e.evaluation);let c=0;const d=u.length>0;if(d){c=u.reduce((e,t)=>e+t.evaluation.prompt_quality,0)/u.length/5}const f=Math.min(1,n/14),h=new Set;for(const t of e)for(const e of t.languages)h.add(e);return{values:[a,l,c,f,Math.min(1,h.size/5)],hasEvalData:d}},[e,t,n]),a=100,o=100,l=[];for(let s=0;s<5;s++){const e=Math.max(r[s],.02),[t,n]=Qu(s,e,a,o,70);l.push(\`\${t},\${n}\`)}const u=l.join(" ");return s.jsxs(tu.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:s.jsx(Y,{className:"w-3.5 h-3.5 text-text-muted"})}),s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Skill Profile"})]}),s.jsx("div",{className:"flex justify-center",children:s.jsxs("svg",{viewBox:"0 0 200 200",width:200,height:200,className:"overflow-visible",children:[[.33,.66,1].map(e=>s.jsx("polygon",{points:Gu(e,a,o,70),fill:"none",stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.6},e)),Array.from({length:5}).map((e,t)=>{const[n,r]=Qu(t,1,a,o,70);return s.jsx("line",{x1:a,y1:o,x2:n,y2:r,stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.4},\`axis-\${t}\`)}),s.jsx(tu.polygon,{points:u,fill:"var(--color-accent)",fillOpacity:.2,stroke:"var(--color-accent)",strokeWidth:1.5,strokeLinejoin:"round",initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{duration:.6,ease:[.22,1,.36,1]},style:{transformOrigin:"100px 100px"}}),r.map((e,t)=>{const n=Math.max(e,.02),[r,l]=Qu(t,n,a,o,70),u=2===t&&!i;return s.jsx("circle",{cx:r,cy:l,r:2.5,fill:u?"var(--color-text-muted)":"var(--color-accent-bright)",opacity:u?.4:1},\`point-\${t}\`)}),Ku.map((e,t)=>{const n=function(e,t,n,r){const[i,a]=Qu(e,1.28,t,n,r);let o="middle";return 1!==e&&2!==e||(o="start"),3!==e&&4!==e||(o="end"),{x:i,y:a,anchor:o}}(t,a,o,70),r=2===t&&!i;return s.jsx("text",{x:n.x,y:n.y,textAnchor:n.anchor,dominantBaseline:"central",className:"text-[9px] font-medium",fill:r?"var(--color-text-muted)":"var(--color-text-secondary)",opacity:r?.5:1,children:e},e)})]})}),s.jsx("div",{className:"flex justify-center gap-3 mt-2 flex-wrap",children:Ku.map((e,t)=>{const n=2===t&&!i,a=Math.round(100*r[t]);return s.jsxs("span",{className:"text-[10px] font-mono "+(n?"text-text-muted/50":"text-text-muted"),children:[a,"%"]},e)})})]})}const Ju={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function ec(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;const i=Math.floor(r/24);return 1===i?"yesterday":i<7?\`\${i}d ago\`:new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})}function tc({milestones:e}){const t=[...e].sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime()).slice(0,8);return s.jsxs(tu.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.35,ease:[.22,1,.36,1]},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[s.jsx(we,{className:"w-4 h-4 text-accent"}),s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Recent Achievements"}),s.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded ml-auto",children:[e.length," total"]})]}),0===t.length?s.jsx("div",{className:"text-sm text-text-muted text-center py-6",children:"No milestones yet \u2014 complete your first session!"}):s.jsx("div",{className:"space-y-0.5",children:t.map((e,t)=>{const n=cu[e.category]??"#9c9588",r=Ju[e.category]??"bg-bg-surface-2 text-text-secondary border-border",i=ou[e.client]??e.client.slice(0,2).toUpperCase(),a=iu[e.client]??"#91919a",o=e.private_title||e.title,l="complex"===e.complexity;return s.jsxs(tu.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.25,delay:.04*t},className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-bg-surface-2/40 transition-colors",children:[s.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:n}}),s.jsx("span",{className:"text-sm font-medium text-text-secondary hover:text-text-primary truncate flex-1 min-w-0",children:o}),s.jsx("span",{className:\`text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border flex-shrink-0 \${r}\`,children:e.category}),l&&s.jsxs("span",{className:"flex items-center gap-0.5 text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border bg-purple/10 text-purple border-purple/20 flex-shrink-0",children:[s.jsx(Y,{className:"w-2.5 h-2.5"}),"complex"]}),s.jsx("span",{className:"text-[10px] text-text-muted font-mono flex-shrink-0",children:ec(e.created_at)}),s.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[8px] font-bold font-mono flex-shrink-0",style:{backgroundColor:\`\${a}15\`,color:a,border:\`1px solid \${a}20\`},children:i})]},e.id)})})]})}const nc=[{id:"sessions",label:"Sessions",icon:le},{id:"insights",label:"Insights",icon:Q}];function rc({activeTab:e,onTabChange:t}){return s.jsx("div",{className:"sticky top-0 z-20 bg-bg-base/80 backdrop-blur-md pt-2 pb-1 -mx-1 px-1",children:s.jsx("div",{className:"flex gap-1 p-1 rounded-lg bg-bg-surface-1 border border-border/50",children:nc.map(({id:n,label:r,icon:i})=>{const a=e===n;return s.jsxs("button",{onClick:()=>t(n),className:\`\\n flex-1 flex items-center justify-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-all duration-200\\n \${a?"bg-accent text-white shadow-[0_0_12px_rgba(99,102,241,0.3)]":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"}\\n \`,children:[s.jsx(i,{className:"w-4 h-4"}),r]},n)})})})}function ic({filteredSessions:e,filteredMilestones:t,filters:n,onFilterChange:r,onDeleteSession:i,onDeleteConversation:a,onDeleteMilestone:o}){const[l,u]=f.useState(!1),[c,d]=f.useState(!1),h="all"!==n.client||"all"!==n.language||"all"!==n.project;return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between px-1",children:[s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Activity Feed"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[e.length," Sessions"]}),s.jsx("button",{onClick:()=>d(e=>!e),className:"p-1.5 rounded-md border transition-all duration-200 "+(c?"bg-success/10 border-success/30 text-success":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:c?"Showing public titles":"Showing private titles",children:c?s.jsx(re,{className:"w-3.5 h-3.5"}):s.jsx(ne,{className:"w-3.5 h-3.5"})}),s.jsx("button",{onClick:()=>u(e=>!e),className:"p-1.5 rounded-md border transition-all duration-200 "+(l||h?"bg-accent/10 border-accent/30 text-accent":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),children:s.jsx(oe,{className:"w-3.5 h-3.5"})})]})]}),l&&s.jsx(bu,{sessions:e,filters:n,onFilterChange:r}),s.jsx(Mu,{sessions:e,milestones:t,filters:n,globalShowPublic:c,onDeleteSession:i,onDeleteConversation:a,onDeleteMilestone:o})]})}function ac(){const{sessions:e,milestones:t,config:n,health:r,loading:i,timeTravelTime:a,timeScale:o,filters:l,activeTab:u,loadAll:c,loadHealth:d,setTimeTravelTime:h,setTimeScale:p,setFilter:m,setActiveTab:g,deleteSession:y,deleteConversation:v,deleteMilestone:b}=O();f.useEffect(()=>{c(),d()},[c,d]),f.useEffect(()=>{const e=setInterval(d,3e4);if(null!==a)return()=>clearInterval(e);const t=setInterval(c,3e4);return()=>{clearInterval(e),clearInterval(t)}},[a,c,d]);const x=null===a,w=a??Date.now(),k=F[o]/2,S=w-k,E=w+k,C=f.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=new Date(e.started_at).getTime(),i=new Date(e.ended_at).getTime();return r<=n&&i>=t})}(e,S,E),[e,S,E]),T=f.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=new Date(e.created_at).getTime();return r>=t&&r<=n})}(t,S,E),[t,S,E]),P=f.useMemo(()=>function(e,t=[]){let n=0,r=0;const i={},a={},o={},s={};for(const u of e){n+=u.duration_seconds,r+=u.files_touched,i[u.client]=(i[u.client]??0)+u.duration_seconds;for(const e of u.languages)a[e]=(a[e]??0)+u.duration_seconds;o[u.task_type]=(o[u.task_type]??0)+u.duration_seconds,u.project&&(s[u.project]=(s[u.project]??0)+u.duration_seconds)}const l=function(e){let t=0,n=0,r=0;for(const i of e)"feature"===i.category&&t++,"bugfix"===i.category&&n++,"complex"===i.complexity&&r++;return{featuresShipped:t,bugsFixed:n,complexSolved:r}}(t);return{totalHours:n/3600,totalSessions:e.length,currentStreak:I(e),filesTouched:r,...l,byClient:i,byLanguage:a,byTaskType:o,byProject:s}}(C,T),[C,T]),j=f.useMemo(()=>function(e,t,n){if(n)return"Live";const r=new Date((e+t)/2),i=new Date,a=new Date(Date.now()-864e5);return r.toDateString()===i.toDateString()?"Today":r.toDateString()===a.toDateString()?"Yesterday":r.toLocaleDateString([],{month:"short",day:"numeric"})}(S,E,x),[S,E,x]),N=f.useMemo(()=>{if(!x)return new Date(w).toISOString().slice(0,10)},[x,w]);return i?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"text-text-muted text-sm",children:"Loading..."})}):s.jsx("div",{className:"min-h-screen bg-bg-base selection:bg-accent/30 selection:text-text-primary",children:s.jsxs("div",{className:"max-w-[1000px] mx-auto px-6 py-6",children:[s.jsx(Ce,{health:r,timeContextLabel:j}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Hu,{value:a,onChange:h,scale:o,onScaleChange:p,sessions:e,milestones:t}),s.jsx(ru,{totalHours:P.totalHours,totalSessions:P.totalSessions,currentStreak:P.currentStreak,filesTouched:P.filesTouched,featuresShipped:P.featuresShipped,bugsFixed:P.bugsFixed,complexSolved:P.complexSolved}),s.jsx(rc,{activeTab:u,onTabChange:g}),"sessions"===u&&s.jsx(ic,{filteredSessions:C,filteredMilestones:T,filters:l,onFilterChange:m,onDeleteSession:y,onDeleteConversation:v,onDeleteMilestone:b}),"insights"===u&&s.jsxs("div",{className:"space-y-4 pt-2",children:[s.jsx(Yu,{sessions:C,milestones:T,isLive:x,windowStart:S,windowEnd:E}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Xu,{sessions:C}),s.jsx(Zu,{sessions:C,milestones:T,streak:P.currentStreak})]}),s.jsx(yu,{byTaskType:P.byTaskType}),s.jsx(Du,{sessions:e,timeScale:o,effectiveTime:w,isLive:x,onDayClick:e=>{const t=new Date(\`\${e}T12:00:00\`).getTime();h(t),p("24h")},highlightDate:N}),s.jsx(tc,{milestones:T}),s.jsx(pu,{stats:P})]}),s.jsx(Au,{config:n,onRefresh:c})]})]})})}M.createRoot(document.getElementById("root")).render(s.jsx(f.StrictMode,{children:s.jsx(ac,{})}));</script>
|
|
36518
|
-
<style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:"Geist Mono","JetBrains Mono","SF Mono","Fira Code",ui-monospace,monospace;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-body:"Inter",system-ui,-apple-system,sans-serif;--color-bg-base:var(--bg-base);--color-bg-surface-1:var(--bg-surface-1);--color-bg-surface-2:var(--bg-surface-2);--color-bg-surface-3:var(--bg-surface-3);--color-text-primary:var(--text-primary);--color-text-secondary:var(--text-secondary);--color-text-muted:var(--text-muted);--color-accent:var(--accent);--color-accent-bright:var(--accent-bright);--color-border:var(--border);--color-success:#10b981;--color-error:#ef4444;--color-blue:#3b82f6;--color-purple:#8b5cf6}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.-top-10{top:calc(var(--spacing)*-10)}.top-0{top:calc(var(--spacing)*0)}.top-3{top:calc(var(--spacing)*3)}.top-5{top:calc(var(--spacing)*5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-1\\.5{bottom:calc(var(--spacing)*-1.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-3{bottom:calc(var(--spacing)*3)}.-left-7{left:calc(var(--spacing)*-7)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-\\[1\\.75rem\\]{left:1.75rem}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-12{margin-top:calc(var(--spacing)*12)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-8{height:calc(var(--spacing)*8)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-\\[4px\\]{height:4px}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-24{width:calc(var(--spacing)*24)}.w-28{width:calc(var(--spacing)*28)}.w-32{width:calc(var(--spacing)*32)}.w-40{width:calc(var(--spacing)*40)}.w-\\[2px\\]{width:2px}.w-\\[165px\\]{width:165px}.w-full{width:100%}.w-px{width:1px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[1000px\\]{max-width:1000px}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[58px\\]{min-width:58px}.min-w-\\[120px\\]{min-width:120px}.min-w-\\[180px\\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.origin-bottom{transform-origin:bottom}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\\[3px\\]{gap:3px}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-6{column-gap:calc(var(--spacing)*6)}.gap-y-1\\.5{row-gap:calc(var(--spacing)*1.5)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-full{border-top-left-radius:3.40282e38px;border-top-right-radius:3.40282e38px}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.rounded-b-full{border-bottom-right-radius:3.40282e38px;border-bottom-left-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent,.border-accent\\/10{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/10{border-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.border-accent\\/20{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/20{border-color:color-mix(in oklab,var(--color-accent)20%,transparent)}}.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/30{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.border-bg-surface-1{border-color:var(--color-bg-surface-1)}.border-blue\\/20{border-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.border-blue\\/20{border-color:color-mix(in oklab,var(--color-blue)20%,transparent)}}.border-blue\\/30{border-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.border-blue\\/30{border-color:color-mix(in oklab,var(--color-blue)30%,transparent)}}.border-border,.border-border\\/15{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/15{border-color:color-mix(in oklab,var(--color-border)15%,transparent)}}.border-border\\/30{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/30{border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.border-border\\/50{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/50{border-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.border-border\\/60{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/60{border-color:color-mix(in oklab,var(--color-border)60%,transparent)}}.border-error\\/20{border-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.border-error\\/20{border-color:color-mix(in oklab,var(--color-error)20%,transparent)}}.border-error\\/30{border-color:#ef44444d}@supports (color:color-mix(in lab,red,red)){.border-error\\/30{border-color:color-mix(in oklab,var(--color-error)30%,transparent)}}.border-purple\\/20{border-color:#8b5cf633}@supports (color:color-mix(in lab,red,red)){.border-purple\\/20{border-color:color-mix(in oklab,var(--color-purple)20%,transparent)}}.border-purple\\/30{border-color:#8b5cf64d}@supports (color:color-mix(in lab,red,red)){.border-purple\\/30{border-color:color-mix(in oklab,var(--color-purple)30%,transparent)}}.border-success\\/20{border-color:#10b98133}@supports (color:color-mix(in lab,red,red)){.border-success\\/20{border-color:color-mix(in oklab,var(--color-success)20%,transparent)}}.border-success\\/30{border-color:#10b9814d}@supports (color:color-mix(in lab,red,red)){.border-success\\/30{border-color:color-mix(in oklab,var(--color-success)30%,transparent)}}.border-text-muted\\/20{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.border-text-muted\\/20{border-color:color-mix(in oklab,var(--color-text-muted)20%,transparent)}}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/5{background-color:color-mix(in oklab,var(--color-accent)5%,transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/10{background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/15{background-color:color-mix(in oklab,var(--color-accent)15%,transparent)}}.bg-bg-base,.bg-bg-base\\/80{background-color:var(--color-bg-base)}@supports (color:color-mix(in lab,red,red)){.bg-bg-base\\/80{background-color:color-mix(in oklab,var(--color-bg-base)80%,transparent)}}.bg-bg-surface-1,.bg-bg-surface-1\\/20{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/20{background-color:color-mix(in oklab,var(--color-bg-surface-1)20%,transparent)}}.bg-bg-surface-1\\/30{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-1)30%,transparent)}}.bg-bg-surface-1\\/40{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/40{background-color:color-mix(in oklab,var(--color-bg-surface-1)40%,transparent)}}.bg-bg-surface-1\\/50{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-1)50%,transparent)}}.bg-bg-surface-1\\/80{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/80{background-color:color-mix(in oklab,var(--color-bg-surface-1)80%,transparent)}}.bg-bg-surface-2,.bg-bg-surface-2\\/30{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-2)30%,transparent)}}.bg-bg-surface-2\\/50{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.bg-bg-surface-2\\/60{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/60{background-color:color-mix(in oklab,var(--color-bg-surface-2)60%,transparent)}}.bg-bg-surface-3,.bg-bg-surface-3\\/95{background-color:var(--color-bg-surface-3)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-3\\/95{background-color:color-mix(in oklab,var(--color-bg-surface-3)95%,transparent)}}.bg-blue\\/10{background-color:#3b82f61a}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/10{background-color:color-mix(in oklab,var(--color-blue)10%,transparent)}}.bg-blue\\/15{background-color:#3b82f626}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/15{background-color:color-mix(in oklab,var(--color-blue)15%,transparent)}}.bg-border\\/20{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/20{background-color:color-mix(in oklab,var(--color-border)20%,transparent)}}.bg-border\\/50{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/50{background-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.bg-error{background-color:var(--color-error)}.bg-error\\/10{background-color:#ef44441a}@supports (color:color-mix(in lab,red,red)){.bg-error\\/10{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.bg-error\\/15{background-color:#ef444426}@supports (color:color-mix(in lab,red,red)){.bg-error\\/15{background-color:color-mix(in oklab,var(--color-error)15%,transparent)}}.bg-purple\\/10{background-color:#8b5cf61a}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/10{background-color:color-mix(in oklab,var(--color-purple)10%,transparent)}}.bg-purple\\/15{background-color:#8b5cf626}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/15{background-color:color-mix(in oklab,var(--color-purple)15%,transparent)}}.bg-success{background-color:var(--color-success)}.bg-success\\/10{background-color:#10b9811a}@supports (color:color-mix(in lab,red,red)){.bg-success\\/10{background-color:color-mix(in oklab,var(--color-success)10%,transparent)}}.bg-success\\/15{background-color:#10b98126}@supports (color:color-mix(in lab,red,red)){.bg-success\\/15{background-color:color-mix(in oklab,var(--color-success)15%,transparent)}}.bg-text-muted\\/10{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/10{background-color:color-mix(in oklab,var(--color-text-muted)10%,transparent)}}.bg-text-muted\\/15{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/15{background-color:color-mix(in oklab,var(--color-text-muted)15%,transparent)}}.bg-transparent{background-color:#0000}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white\\/10{--tw-gradient-to:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.to-white\\/10{--tw-gradient-to:color-mix(in oklab,var(--color-white)10%,transparent)}}.to-white\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-5{padding-block:calc(var(--spacing)*5)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-accent,.text-accent\\/60{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/60{color:color-mix(in oklab,var(--color-accent)60%,transparent)}}.text-accent\\/70{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/70{color:color-mix(in oklab,var(--color-accent)70%,transparent)}}.text-accent\\/80{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/80{color:color-mix(in oklab,var(--color-accent)80%,transparent)}}.text-blue{color:var(--color-blue)}.text-error{color:var(--color-error)}.text-purple{color:var(--color-purple)}.text-success{color:var(--color-success)}.text-success\\/60{color:#10b98199}@supports (color:color-mix(in lab,red,red)){.text-success\\/60{color:color-mix(in oklab,var(--color-success)60%,transparent)}}.text-text-muted,.text-text-muted\\/50{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/50{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.text-text-muted\\/60{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/60{color:color-mix(in oklab,var(--color-text-muted)60%,transparent)}}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_10px_rgba\\(16\\,185\\,129\\,0\\.1\\)\\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#10b9811a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_10px_rgba\\(99\\,102\\,241\\,0\\.2\\)\\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#6366f133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_12px_rgba\\(99\\,102\\,241\\,0\\.3\\)\\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#6366f14d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_15px_rgba\\(99\\,102\\,241\\,0\\.4\\)\\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#6366f166);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_15px_rgba\\(99\\,102\\,241\\,0\\.5\\)\\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#6366f180);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_10px_rgba\\(99\\,102\\,241\\,0\\.4\\)\\]{--tw-shadow:0 2px 10px var(--tw-shadow-color,#6366f166);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-accent\\/20{--tw-shadow-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.shadow-accent\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-accent)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-accent{--tw-ring-color:var(--color-accent)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-bg-base{--tw-ring-offset-color:var(--color-bg-base)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:scale-x-110:is(:where(.group):hover *){--tw-scale-x:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\\:-rotate-90:is(:where(.group):hover *){rotate:-90deg}.group-hover\\:rotate-180:is(:where(.group):hover *){rotate:180deg}.group-hover\\:bg-accent:is(:where(.group):hover *),.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.group-hover\\:text-accent:is(:where(.group):hover *){color:var(--color-accent)}.group-hover\\:text-text-primary:is(:where(.group):hover *){color:var(--color-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *),.group-hover\\/card\\:opacity-100:is(:where(.group\\/card):hover *),.group-hover\\/conv\\:opacity-100:is(:where(.group\\/conv):hover *){opacity:1}}.selection\\:bg-accent\\/30 ::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30 ::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:bg-accent\\/30::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:text-text-primary ::selection{color:var(--color-text-primary)}.selection\\:text-text-primary::selection{color:var(--color-text-primary)}.placeholder\\:text-text-muted\\/50::placeholder{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-text-muted\\/50::placeholder{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.focus-within\\:border-accent\\/50:focus-within{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:border-accent\\/50:focus-within{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.focus-within\\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}@media(hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:border-accent\\/30:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/30:hover{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.hover\\:border-accent\\/40:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/40:hover{border-color:color-mix(in oklab,var(--color-accent)40%,transparent)}}.hover\\:border-text-muted\\/50:hover{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-text-muted\\/50:hover{border-color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.hover\\:bg-accent:hover{background-color:var(--color-accent)}.hover\\:bg-accent-bright:hover{background-color:var(--color-accent-bright)}.hover\\:bg-bg-surface-1\\/40:hover{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-1\\/40:hover{background-color:color-mix(in oklab,var(--color-bg-surface-1)40%,transparent)}}.hover\\:bg-bg-surface-2:hover,.hover\\:bg-bg-surface-2\\/40:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/40:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)40%,transparent)}}.hover\\:bg-bg-surface-2\\/50:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/50:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.hover\\:bg-bg-surface-3:hover{background-color:var(--color-bg-surface-3)}.hover\\:bg-error\\/5:hover{background-color:#ef44440d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/5:hover{background-color:color-mix(in oklab,var(--color-error)5%,transparent)}}.hover\\:text-error\\/70:hover{color:#ef4444b3}@supports (color:color-mix(in lab,red,red)){.hover\\:text-error\\/70:hover{color:color-mix(in oklab,var(--color-error)70%,transparent)}}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:block{display:block}.sm\\:flex-row{flex-direction:row}}@media(min-width:48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}}@media(min-width:64rem){.lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}}:root{--bg-base:#09090b;--bg-surface-1:#18181b;--bg-surface-2:#27272a;--bg-surface-3:#3f3f46;--text-primary:#fafafa;--text-secondary:#a1a1aa;--text-muted:#71717a;--accent:#6366f1;--accent-bright:#818cf8;--accent-dim:#3730a3;--border:#27272a;--border-accent:#6366f133;--glass-bg:#18181bb3;--glass-border:#ffffff0d}@media(prefers-color-scheme:light){:root{--bg-base:#fff;--bg-surface-1:#f4f4f5;--bg-surface-2:#e4e4e7;--bg-surface-3:#d4d4d8;--text-primary:#09090b;--text-secondary:#52525b;--text-muted:#71717a;--accent:#4f46e5;--accent-bright:#6366f1;--accent-dim:#e0e7ff;--border:#e4e4e7;--border-accent:#4f46e51a;--glass-bg:#ffffffb3;--glass-border:#0000000d}}::selection{color:var(--color-text-primary);background:#6366f14d}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-bg-surface-3);border-radius:10px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-muted)}body{font-family:var(--font-body);background:var(--color-bg-base);color:var(--color-text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;min-height:100vh;margin:0;line-height:1.6}.glass-card{background:var(--glass-bg);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--glass-border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.subtle-glow{position:relative}.subtle-glow:after{content:"";border-radius:inherit;z-index:-1;pointer-events:none;background:linear-gradient(45deg,#0000,#6366f11a,#0000);position:absolute;inset:-1px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}</style>
|
|
36522
|
+
*/function Ce({health:e,timeContextLabel:t}){return s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-accent flex items-center justify-center shadow-[0_0_15px_rgba(99,102,241,0.4)]",children:s.jsx("span",{className:"font-mono text-white font-bold text-lg",children:"U"})}),s.jsx("div",{children:s.jsxs("h1",{className:"text-xl font-bold tracking-tight text-text-primary flex items-center gap-2",children:["UseAI",s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-bg-surface-2 text-text-muted font-mono uppercase tracking-widest border border-border/50",children:"Dashboard"})]})})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[e&&e.active_sessions>0&&s.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-full bg-success/10 border border-success/20",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-success animate-ping absolute inset-0"}),s.jsx("div",{className:"w-2 h-2 rounded-full bg-success relative"})]}),s.jsxs("span",{className:"text-xs font-medium text-success",children:[e.active_sessions," active session",1!==e.active_sessions?"s":""]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-text-muted font-mono bg-bg-surface-1 px-3 py-1.5 rounded-md border border-border",children:[s.jsx(q,{className:"w-3 h-3"}),t]})]})]})}const Te=f.createContext({});function Pe(e){const t=f.useRef(null);return null===t.current&&(t.current=e()),t.current}const je="undefined"!=typeof window,Ne=je?f.useLayoutEffect:f.useEffect,Me=f.createContext(null);function De(e,t){-1===e.indexOf(t)&&e.push(t)}function Le(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ae=(e,t,n)=>n>t?t:n<e?e:n;const _e={},ze=e=>/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(e);function Re(e){return"object"==typeof e&&null!==e}const Fe=e=>/^0[^.\\s]+$/u.test(e);function Oe(e){let t;return()=>(void 0===t&&(t=e()),t)}const Ve=e=>e,Ie=(e,t)=>n=>t(e(n)),$e=(...e)=>e.reduce(Ie),Be=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Ue{constructor(){this.subscriptions=[]}add(e){return De(this.subscriptions,e),()=>Le(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const He=e=>1e3*e,We=e=>e/1e3;function qe(e,t){return t?e*(1e3/t):0}const Ye=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Xe(e,t,n,r){if(e===t&&n===r)return Ve;const i=t=>function(e,t,n,r,i){let a,o,s=0;do{o=t+(n-t)/2,a=Ye(o,r,i)-e,a>0?n=o:t=o}while(Math.abs(a)>1e-7&&++s<12);return o}(t,0,1,e,n);return e=>0===e||1===e?e:Ye(i(e),t,r)}const Ke=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Qe=e=>t=>1-e(1-t),Ge=Xe(.33,1.53,.69,.99),Ze=Qe(Ge),Je=Ke(Ze),et=e=>(e*=2)<1?.5*Ze(e):.5*(2-Math.pow(2,-10*(e-1))),tt=e=>1-Math.sin(Math.acos(e)),nt=Qe(tt),rt=Ke(tt),it=Xe(.42,0,1,1),at=Xe(0,0,.58,1),ot=Xe(.42,0,.58,1),st=e=>Array.isArray(e)&&"number"==typeof e[0],lt={linear:Ve,easeIn:it,easeInOut:ot,easeOut:at,circIn:tt,circInOut:rt,circOut:nt,backIn:Ze,backInOut:Je,backOut:Ge,anticipate:et},ut=e=>{if(st(e)){e.length;const[t,n,r,i]=e;return Xe(t,n,r,i)}return"string"==typeof e?lt[e]:e},ct=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function dt(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=ct.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(l.schedule(t),e()),t(o)}const l={schedule:(e,i=!1,o=!1)=>{const s=o&&r?t:n;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{o=e,r?i=!0:(r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,l.process(e)))}};return l}(a),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:p}=o,m=()=>{const a=_e.useManualTiming?i.timestamp:performance.now();n=!1,_e.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:ct.reduce((t,a)=>{const s=o[a];return t[a]=(t,a=!1,o=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(m)),s.schedule(t,a,o)),t},{}),cancel:e=>{for(let t=0;t<ct.length;t++)o[ct[t]].cancel(e)},state:i,steps:o}}const{schedule:ft,cancel:ht,state:pt,steps:mt}=dt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Ve,!0);let gt;function yt(){gt=void 0}const vt={now:()=>(void 0===gt&&vt.set(pt.isProcessing||_e.useManualTiming?pt.timestamp:performance.now()),gt),set:e=>{gt=e,queueMicrotask(yt)}},bt=e=>t=>"string"==typeof t&&t.startsWith(e),xt=bt("--"),wt=bt("var(--"),kt=e=>!!wt(e)&&St.test(e.split("/*")[0].trim()),St=/var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;function Et(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const Ct={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Tt={...Ct,transform:e=>Ae(0,1,e)},Pt={...Ct,default:1},jt=e=>Math.round(1e5*e)/1e5,Nt=/-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;const Mt=/^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu,Dt=(e,t)=>n=>Boolean("string"==typeof n&&Mt.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Lt=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,a,o,s]=r.match(Nt);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},At={...Ct,transform:e=>Math.round((e=>Ae(0,255,e))(e))},_t={test:Dt("rgb","red"),parse:Lt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+At.transform(e)+", "+At.transform(t)+", "+At.transform(n)+", "+jt(Tt.transform(r))+")"};const zt={test:Dt("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:_t.transform},Rt=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>\`\${t}\${e}\`}),Ft=Rt("deg"),Ot=Rt("%"),Vt=Rt("px"),It=Rt("vh"),$t=Rt("vw"),Bt=(()=>({...Ot,parse:e=>Ot.parse(e)/100,transform:e=>Ot.transform(100*e)}))(),Ut={test:Dt("hsl","hue"),parse:Lt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ot.transform(jt(t))+", "+Ot.transform(jt(n))+", "+jt(Tt.transform(r))+")"},Ht={test:e=>_t.test(e)||zt.test(e)||Ut.test(e),parse:e=>_t.test(e)?_t.parse(e):Ut.test(e)?Ut.parse(e):zt.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?_t.transform(e):Ut.transform(e),getAnimatableNone:e=>{const t=Ht.parse(e);return t.alpha=0,Ht.transform(t)}},Wt=/(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;const qt="number",Yt="color",Xt=/var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;function Kt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(Xt,e=>(Ht.test(e)?(r.color.push(a),i.push(Yt),n.push(Ht.parse(e))):e.startsWith("var(")?(r.var.push(a),i.push("var"),n.push(e)):(r.number.push(a),i.push(qt),n.push(parseFloat(e))),++a,"\${}")).split("\${}");return{values:n,split:o,indexes:r,types:i}}function Qt(e){return Kt(e).values}function Gt(e){const{split:t,types:n}=Kt(e),r=t.length;return e=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],void 0!==e[a]){const t=n[a];i+=t===qt?jt(e[a]):t===Yt?Ht.transform(e[a]):e[a]}return i}}const Zt=e=>"number"==typeof e?0:Ht.test(e)?Ht.getAnimatableNone(e):e;const Jt={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(Nt)?.length||0)+(e.match(Wt)?.length||0)>0},parse:Qt,createTransformer:Gt,getAnimatableNone:function(e){const t=Qt(e);return Gt(e)(t.map(Zt))}};function en(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tn(e,t){return n=>n>0?t:e}const nn=(e,t,n)=>e+(t-e)*n,rn=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},an=[zt,_t,Ut];function on(e){const t=(n=e,an.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Ut&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,a=0,o=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=en(s,r,e+1/3),a=en(s,r,e),o=en(s,r,e-1/3)}else i=a=o=n;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*o),alpha:r}}(r)),r}const sn=(e,t)=>{const n=on(e),r=on(t);if(!n||!r)return tn(e,t);const i={...n};return e=>(i.red=rn(n.red,r.red,e),i.green=rn(n.green,r.green,e),i.blue=rn(n.blue,r.blue,e),i.alpha=nn(n.alpha,r.alpha,e),_t.transform(i))},ln=new Set(["none","hidden"]);function un(e,t){return n=>nn(e,t,n)}function cn(e){return"number"==typeof e?un:"string"==typeof e?kt(e)?tn:Ht.test(e)?sn:hn:Array.isArray(e)?dn:"object"==typeof e?Ht.test(e)?sn:fn:tn}function dn(e,t){const n=[...e],r=n.length,i=e.map((e,n)=>cn(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function fn(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=cn(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const hn=(e,t)=>{const n=Jt.createTransformer(t),r=Kt(e),i=Kt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?ln.has(e)&&!i.values.length||ln.has(t)&&!r.values.length?function(e,t){return ln.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):$e(dn(function(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}(r,i),i.values),n):tn(e,t)};function pn(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return nn(e,t,n);return cn(e)(e,t)}const mn=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>ft.update(t,e),stop:()=>ht(t),now:()=>pt.isProcessing?pt.timestamp:vt.now()}},gn=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=Math.round(1e4*e(a/(i-1)))/1e4+", ";return\`linear(\${r.substring(0,r.length-2)})\`},yn=2e4;function vn(e){let t=0;let n=e.next(t);for(;!n.done&&t<yn;)t+=50,n=e.next(t);return t>=yn?1/0:t}function bn(e,t,n){const r=Math.max(t-5,0);return qe(n-e(r),t-r)}const xn=100,wn=10,kn=1,Sn=0,En=800,Cn=.3,Tn=.3,Pn={granular:.01,default:2},jn={granular:.005,default:.5},Nn=.01,Mn=10,Dn=.05,Ln=1,An=.001;function _n({duration:e=En,bounce:t=Cn,velocity:n=Sn,mass:r=kn}){let i,a,o=1-t;o=Ae(Dn,Ln,o),e=Ae(Nn,Mn,We(e)),o<1?(i=t=>{const r=t*o,i=r*e,a=r-n,s=Rn(t,o),l=Math.exp(-i);return An-a/s*l},a=t=>{const r=t*o*e,a=r*n+n,s=Math.pow(o,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=Rn(Math.pow(t,2),o);return(-i(t)+An>0?-1:1)*((a-s)*l)/u}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let i=1;i<zn;i++)r-=e(r)/t(r);return r}(i,a,5/e);if(e=He(e),isNaN(s))return{stiffness:xn,damping:wn,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*o*Math.sqrt(r*t),duration:e}}}const zn=12;function Rn(e,t){return e*Math.sqrt(1-t*t)}const Fn=["duration","bounce"],On=["stiffness","damping","mass"];function Vn(e,t){return t.some(t=>void 0!==e[t])}function In(e=Tn,t=Cn){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=function(e){let t={velocity:Sn,stiffness:xn,damping:wn,mass:kn,isResolvedFromDuration:!1,...e};if(!Vn(e,On)&&Vn(e,Fn))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,a=2*Ae(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:kn,stiffness:i,damping:a}}else{const n=_n(e);t={...t,...n,mass:kn},t.isResolvedFromDuration=!0}return t}({...n,velocity:-We(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),g=o-a,y=We(Math.sqrt(l/c)),v=Math.abs(g)<5;let b;if(r||(r=v?Pn.granular:Pn.default),i||(i=v?jn.granular:jn.default),m<1){const e=Rn(y,m);b=t=>{const n=Math.exp(-m*y*t);return o-n*((p+m*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)b=e=>o-Math.exp(-y*e)*(g+(p+y*g)*e);else{const e=y*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return o-n*((p+m*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const x={calculatedDuration:h&&d||null,next:e=>{const t=b(e);if(h)s.done=e>=d;else{let n=0===e?p:0;m<1&&(n=0===e?He(p):bn(b,e,t));const a=Math.abs(n)<=r,l=Math.abs(o-t)<=i;s.done=a&&l}return s.value=s.done?o:t,s},toString:()=>{const e=Math.min(vn(x),yn),t=gn(t=>x.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return x}function $n({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let p=n*t;const m=d+p,g=void 0===o?m:o(m);g!==m&&(p=g-d);const y=e=>-p*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);f.done=Math.abs(t)<=u,f.value=f.done?g:n};let x,w;const k=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=In({keyframes:[f.value,h(f.value)],velocity:bn(v,e,f.value),damping:i,stiffness:a,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),k(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function Bn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(t.length,1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||_e.mix||pn,a=e.length-1;for(let o=0;o<a;o++){let n=i(e[o],e[o+1]);if(t){const e=Array.isArray(t)?t[o]||Ve:t;n=$e(e,n)}r.push(n)}return r}(t,r,i),l=s.length,u=n=>{if(o&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const i=Be(e[r],e[r+1],n);return s[r](i)};return n?t=>u(Ae(e[0],e[a-1],t)):u}function Un(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Be(0,t,r);e.push(nn(n,1,i))}}(t,e.length-1),t}function Hn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(ut):ut(r),a={done:!1,value:t[0]},o=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:Un(t),e),s=Bn(o,t,{ease:Array.isArray(i)?i:(l=t,u=i,l.map(()=>u||ot).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}In.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(vn(r),yn);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:We(i)}}(e,100,In);return e.ease=t.ease,e.duration=He(t.duration),e.type="keyframes",e};const Wn=e=>null!==e;function qn(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(Wn),o=i<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return o&&void 0!==r?r:a[o]}const Yn={decay:$n,inertia:$n,tween:Hn,keyframes:Hn,spring:In};function Xn(e){"string"==typeof e.type&&(e.type=Yn[e.type])}class Kn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Qn=e=>e/100;class Gn extends Kn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==vt.now()&&this.tick(vt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Xn(e);const{type:t=Hn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const s=t||Hn;s!==Hn&&"number"!=typeof o[0]&&(this.mixKeyframes=$e(Qn,pn(o[0],o[1])),o=[0,100]);const l=s({...e,keyframes:o});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=vn(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:f,type:h,onUpdate:p,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,b=n;if(c){const e=Math.min(this.currentTime,r)/o;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,c+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/o)):"mirror"===d&&(b=a)),v=Ae(0,1,n)*o}const x=y?{done:!1,value:u[0]}:b.next(v);i&&(x.value=i(x.value));let{done:w}=x;y||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&h!==$n&&(x.value=qn(u,this.options,m,this.speed)),p&&p(x.value),k&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return We(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+We(e)}get time(){return We(this.currentTime)}set time(e){e=He(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(vt.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=We(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=mn,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(vt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const Zn=e=>180*e/Math.PI,Jn=e=>{const t=Zn(Math.atan2(e[1],e[0]));return tr(t)},er={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Jn,rotateZ:Jn,skewX:e=>Zn(Math.atan(e[1])),skewY:e=>Zn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},tr=e=>((e%=360)<0&&(e+=360),e),nr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),rr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ir={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nr,scaleY:rr,scale:e=>(nr(e)+rr(e))/2,rotateX:e=>tr(Zn(Math.atan2(e[6],e[5]))),rotateY:e=>tr(Zn(Math.atan2(-e[2],e[0]))),rotateZ:Jn,rotate:Jn,skewX:e=>Zn(Math.atan(e[4])),skewY:e=>Zn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ar(e){return e.includes("scale")?1:0}function or(e,t){if(!e||"none"===e)return ar(t);const n=e.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);let r,i;if(n)r=ir,i=n;else{const t=e.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);r=er,i=t}if(!i)return ar(t);const a=r[t],o=i[1].split(",").map(sr);return"function"==typeof a?a(o):o[a]}function sr(e){return parseFloat(e.trim())}const lr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ur=(()=>new Set(lr))(),cr=e=>e===Ct||e===Vt,dr=new Set(["x","y","z"]),fr=lr.filter(e=>!dr.has(e));const hr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>or(t,"x"),y:(e,{transform:t})=>or(t,"y")};hr.translateX=hr.x,hr.translateY=hr.y;const pr=new Set;let mr=!1,gr=!1,yr=!1;function vr(){if(gr){const e=Array.from(pr).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return fr.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}gr=!1,mr=!1,pr.forEach(e=>e.complete(yr)),pr.clear()}function br(){pr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gr=!0)})}class xr{constructor(e,t,n,r,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(pr.add(this),mr||(mr=!0,ft.read(br),ft.resolveKeyframes(vr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const i=r?.get(),a=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,a);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=a),r&&void 0===i&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),pr.delete(this)}cancel(){"scheduled"===this.state&&(pr.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const wr=Oe(()=>void 0!==window.ScrollTimeline),kr={};function Sr(e,t){const n=Oe(e);return()=>kr[t]??n()}const Er=Sr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Cr=([e,t,n,r])=>\`cubic-bezier(\${e}, \${t}, \${n}, \${r})\`,Tr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cr([0,.65,.55,1]),circOut:Cr([.55,0,1,.45]),backIn:Cr([.31,.01,.66,-.59]),backOut:Cr([.33,1.53,.69,.99])};function Pr(e,t){return e?"function"==typeof e?Er()?gn(e,t):"ease-out":st(e)?Cr(e):Array.isArray(e)?e.map(e=>Pr(e,t)||Tr.easeOut):Tr[e]:void 0}function jr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Pr(s,i);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};u&&(f.pseudoElement=u);return e.animate(c,f)}function Nr(e){return"function"==typeof e&&"applyToOptions"in e}class Mr extends Kn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=a,this.options=e,e.type;const l=function({type:e,...t}){return Nr(e)&&Er()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=jr(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=qn(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return We(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+We(e)}get time(){return We(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=He(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&wr()?(this.animation.timeline=e,Ve):t(this)}}const Dr={anticipate:et,backInOut:Je,circInOut:rt};function Lr(e){"string"==typeof e.ease&&e.ease in Dr&&(e.ease=Dr[e.ease])}class Ar extends Mr{constructor(e){Lr(e),Xn(e),super(e),void 0!==e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const o=new Gn({...a,autoplay:!1}),s=Math.max(10,vt.now()-this.startTime),l=Ae(0,10,s-10);t.setWithVelocity(o.sample(Math.max(0,s-l)).value,o.sample(s).value,l),o.stop()}}const _r=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Jt.test(e)&&"0"!==e||e.startsWith("url(")));function zr(e){e.duration=0,e.type="keyframes"}const Rr=new Set(["opacity","clipPath","filter","transform"]),Fr=Oe(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Or extends Kn{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a="loop",keyframes:o,name:s,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=vt.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:l,element:u,...c},f=u?.KeyframeResolver||xr;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:i,type:a,velocity:o,delay:s,isHandoff:l,onUpdate:u}=n;this.resolvedAt=vt.now(),function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const a=e[e.length-1],o=_r(i,t),s=_r(a,t);return!(!o||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Nr(n))&&r)}(e,i,a,o)||(!_e.instantAnimations&&s||u?.(qn(e,n,t)),e[0]=e[e.length-1],zr(n),n.repeat=0);const c={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e,s=t?.owner?.current;if(!(s instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Fr()&&n&&Rr.has(n)&&("transform"!==n||!u)&&!l&&!r&&"mirror"!==i&&0!==a&&"inertia"!==o}(c),f=c.motionValue?.owner?.current,h=d?new Ar({...c,element:f}):new Gn(c);h.finished.then(()=>{this.notifyFinished()}).catch(Ve),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),yr=!0,br(),vr(),yr=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Vr(e,t,n,r=0,i=1){const a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return"function"==typeof n?n(a,o):1===i?a*r:s-a*r}const Ir=/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;function $r(e,t,n=1){const[r,i]=function(e){const t=Ir.exec(e);if(!t)return[,];const[,n,r,i]=t;return[\`--\${n??r}\`,i]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const e=a.trim();return ze(e)?parseFloat(e):e}return kt(i)?$r(i,t,n+1):i}const Br={type:"spring",stiffness:500,damping:25,restSpeed:10},Ur={type:"keyframes",duration:.8},Hr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Wr=(e,{keyframes:t})=>t.length>2?Ur:ur.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Br:Hr,qr=e=>null!==e;function Yr(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Xr(e,t){const n=e?.[t]??e?.default??e;return n!==e?Yr(n,e):n}const Kr=(e,t,n,r={},i,a)=>o=>{const s=Xr(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u-=He(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(s)||Object.assign(c,Wr(e,c)),c.duration&&(c.duration=He(c.duration)),c.repeatDelay&&(c.repeatDelay=He(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(zr(c),0===c.delay&&(d=!0)),(_e.instantAnimations||_e.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,zr(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"}){const r=e.filter(qr);return r[t&&"loop"!==n&&t%2==1?0:r.length-1]}(c.keyframes,s);if(void 0!==e)return void ft.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new Gn(c):new Or(c)};function Qr(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Gr(e,t,n,r){if("function"==typeof t){const[i,a]=Qr(r);t=t(void 0!==n?n:e.custom,i,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,a]=Qr(r);t=t(void 0!==n?n:e.custom,i,a)}return t}function Zr(e,t,n){const r=e.getProps();return Gr(r,t,void 0!==n?n:r.custom,e)}const Jr=new Set(["width","height","top","left","right","bottom",...lr]);class ei{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=vt.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=vt.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Ue);const n=this.events[e].add(t);return"change"===e?()=>{n(),ft.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=vt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return qe(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ti(e,t){return new ei(e,t)}const ni=e=>Array.isArray(e);function ri(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ti(n))}function ii(e){return ni(e)?e[e.length-1]||0:e}const ai=e=>Boolean(e&&e.getVelocity);function oi(e,t){const n=e.getValue("willChange");if(r=n,Boolean(ai(r)&&r.add))return n.add(t);if(!n&&_e.WillChange){const n=new _e.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function si(e){return e.replace(/([A-Z])/g,e=>\`-\${e.toLowerCase()}\`)}const li="data-"+si("framerAppearId");function ui(e){return e.props[li]}function ci({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function di(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t;const l=e.getDefaultTransition();a=a?Yr(a,l):l;const u=a?.reduceMotion;r&&(a=r);const c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in s){const t=e.getValue(f,e.latestValues[f]??null),r=s[f];if(void 0===r||d&&ci(d,f))continue;const i={delay:n,...Xr(a||{},f)},o=t.get();if(void 0!==o&&!t.isAnimating&&!Array.isArray(r)&&r===o&&!i.velocity)continue;let l=!1;if(window.MotionHandoffAnimation){const t=ui(e);if(t){const e=window.MotionHandoffAnimation(t,f,ft);null!==e&&(i.startTime=e,l=!0)}}oi(e,f);const h=u??e.shouldReduceMotion;t.start(Kr(f,t,r,h&&Jr.has(f)?{type:!1}:i,e,l));const p=t.animation;p&&c.push(p)}if(o){const t=()=>ft.update(()=>{o&&function(e,t){const n=Zr(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a)ri(e,o,ii(a[o]))}(e,o)});c.length?Promise.all(c).then(t):t()}return c}function fi(e,t,n={}){const r=Zr(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(di(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return function(e,t,n=0,r=0,i=0,a=1,o){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(fi(l,t,{...o,delay:n+("function"==typeof r?0:r)+Vr(e.variantChildren,l,r,i,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[e,t]="beforeChildren"===s?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}const hi=e=>t=>t.test(e),pi=[Ct,Vt,Ot,Ft,$t,It,{test:e=>"auto"===e,parse:e=>e}],mi=e=>pi.find(hi(e));function gi(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||Fe(e))}const yi=new Set(["brightness","contrast","saturate","opacity"]);function vi(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Nt)||[];if(!r)return e;const i=n.replace(r,"");let a=yi.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const bi=/\\b([a-z-]*)\\(.*?\\)/gu,xi={...Jt,getAnimatableNone:e=>{const t=e.match(bi);return t?t.map(vi).join(" "):e}},wi={...Ct,transform:Math.round},ki={borderWidth:Vt,borderTopWidth:Vt,borderRightWidth:Vt,borderBottomWidth:Vt,borderLeftWidth:Vt,borderRadius:Vt,borderTopLeftRadius:Vt,borderTopRightRadius:Vt,borderBottomRightRadius:Vt,borderBottomLeftRadius:Vt,width:Vt,maxWidth:Vt,height:Vt,maxHeight:Vt,top:Vt,right:Vt,bottom:Vt,left:Vt,inset:Vt,insetBlock:Vt,insetBlockStart:Vt,insetBlockEnd:Vt,insetInline:Vt,insetInlineStart:Vt,insetInlineEnd:Vt,padding:Vt,paddingTop:Vt,paddingRight:Vt,paddingBottom:Vt,paddingLeft:Vt,paddingBlock:Vt,paddingBlockStart:Vt,paddingBlockEnd:Vt,paddingInline:Vt,paddingInlineStart:Vt,paddingInlineEnd:Vt,margin:Vt,marginTop:Vt,marginRight:Vt,marginBottom:Vt,marginLeft:Vt,marginBlock:Vt,marginBlockStart:Vt,marginBlockEnd:Vt,marginInline:Vt,marginInlineStart:Vt,marginInlineEnd:Vt,fontSize:Vt,backgroundPositionX:Vt,backgroundPositionY:Vt,...{rotate:Ft,rotateX:Ft,rotateY:Ft,rotateZ:Ft,scale:Pt,scaleX:Pt,scaleY:Pt,scaleZ:Pt,skew:Ft,skewX:Ft,skewY:Ft,distance:Vt,translateX:Vt,translateY:Vt,translateZ:Vt,x:Vt,y:Vt,z:Vt,perspective:Vt,transformPerspective:Vt,opacity:Tt,originX:Bt,originY:Bt,originZ:Vt},zIndex:wi,fillOpacity:Tt,strokeOpacity:Tt,numOctaves:wi},Si={...ki,color:Ht,backgroundColor:Ht,outlineColor:Ht,fill:Ht,stroke:Ht,borderColor:Ht,borderTopColor:Ht,borderRightColor:Ht,borderBottomColor:Ht,borderLeftColor:Ht,filter:xi,WebkitFilter:xi},Ei=e=>Si[e];function Ci(e,t){let n=Ei(e);return n!==xi&&(n=Jt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ti=new Set(["auto","none","0"]);class Pi extends xr{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),kt(n))){const r=$r(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Jr.has(n)||2!==e.length)return;const[r,i]=e,a=mi(r),o=mi(i);if(Et(r)!==Et(i)&&hr[n])this.needsMeasurement=!0;else if(a!==o)if(cr(a)&&cr(o))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else hr[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||gi(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!Ti.has(t)&&Kt(t).values.length&&(r=e[i]),i++}if(r&&n)for(const a of t)e[a]=Ci(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=hr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const i=n.length-1,a=n[i];n[i]=hr[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const ji=new Set(["opacity","clipPath","filter","transform"]);function Ni(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=n?.[e]??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const Mi=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function Di(e){return Re(e)&&"offsetHeight"in e}const{schedule:Li}=dt(queueMicrotask,!1),Ai={x:!1,y:!1};function _i(){return Ai.x||Ai.y}function zi(e,t){const n=Ni(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ri(e,t,n={}){const[r,i,a]=zi(e,n);return r.forEach(e=>{let n,r=!1,a=!1;const o=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),a&&(a=!1,o(e))},l=e=>{"touch"!==e.pointerType&&(r?a=!0:o(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||_i())return;a=!1;const o=t(e,r);"function"==typeof o&&(n=o,e.addEventListener("pointerleave",l,i))},i),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",s,i)},i)}),a}const Fi=(e,t)=>!!t&&(e===t||Fi(e,t.parentElement)),Oi=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Vi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Ii=new Set(["INPUT","SELECT","TEXTAREA"]);const $i=new WeakSet;function Bi(e){return t=>{"Enter"===t.key&&e(t)}}function Ui(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Hi(e){return Oi(e)&&!_i()}const Wi=new WeakSet;function qi(e,t,n={}){const[r,i,a]=zi(e,n),o=e=>{const r=e.currentTarget;if(!Hi(e))return;if(Wi.has(e))return;$i.add(r),n.stopPropagation&&Wi.add(e);const a=t(r,e),o=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),$i.has(r)&&$i.delete(r),Hi(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Fi(r,e.target))},l=e=>{o(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",o,i),Di(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Bi(()=>{if($i.has(n))return;Ui(n,"down");const e=Bi(()=>{Ui(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Ui(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),t=e,Vi.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function Yi(e){return Re(e)&&"ownerSVGElement"in e}const Xi=new WeakMap;let Ki;const Qi=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:Yi(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Gi=Qi("inline","width","offsetWidth"),Zi=Qi("block","height","offsetHeight");function Ji({target:e,borderBoxSize:t}){Xi.get(e)?.forEach(n=>{n(e,{get width(){return Gi(e,t)},get height(){return Zi(e,t)}})})}function ea(e){e.forEach(Ji)}function ta(e,t){Ki||"undefined"!=typeof ResizeObserver&&(Ki=new ResizeObserver(ea));const n=Ni(e);return n.forEach(e=>{let n=Xi.get(e);n||(n=new Set,Xi.set(e,n)),n.add(t),Ki?.observe(e)}),()=>{n.forEach(e=>{const n=Xi.get(e);n?.delete(t),n?.size||Ki?.unobserve(e)})}}const na=new Set;let ra;function ia(e){return na.add(e),ra||(ra=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};na.forEach(t=>t(e))},window.addEventListener("resize",ra)),()=>{na.delete(e),na.size||"function"!=typeof ra||(window.removeEventListener("resize",ra),ra=void 0)}}function aa(e,t){return"function"==typeof e?ia(e):ta(e,t)}const oa=[...pi,Ht,Jt],sa=()=>({x:{min:0,max:0},y:{min:0,max:0}}),la=new WeakMap;function ua(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function ca(e){return"string"==typeof e||Array.isArray(e)}const da=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fa=["initial",...da];function ha(e){return ua(e.animate)||fa.some(t=>ca(e[t]))}function pa(e){return Boolean(ha(e)||e.variants)}const ma={current:null},ga={current:!1},ya="undefined"!=typeof window;const va=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ba={};function xa(e){ba=e}class wa{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=xr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=vt.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ft.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=ha(t),this.isVariantNode=pa(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const f in d){const e=d[f];void 0!==l[f]&&ai(e)&&e.set(l[f])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,la.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ga.current||function(){if(ga.current=!0,ya)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ma.current=e.matches;e.addEventListener("change",t),t()}else ma.current=!1}(),this.shouldReduceMotion=ma.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ht(this.notifyUpdate),ht(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&ji.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Mr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:He(o)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=ur.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ft.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in ba){const t=ba[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<va.length;n++){const t=va[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],a=n[r];if(ai(i))e.addValue(r,i);else if(ai(a))e.addValue(r,ti(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,ti(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=ti(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(ze(n)||Fe(n))?n=parseFloat(n):(r=n,!oa.find(hi(r))&&Jt.test(t)&&(n=Ci(e,t))),this.setBaseTarget(e,ai(n)?n.get():n)),ai(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=Gr(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||ai(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new Ue),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Li.render(this.render)}}class ka extends wa{constructor(){super(...arguments),this.KeyframeResolver=Pi}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ai(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=\`\${e}\`)}))}}class Sa{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Ea({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ca(e){return void 0===e||1===e}function Ta({scale:e,scaleX:t,scaleY:n}){return!Ca(e)||!Ca(t)||!Ca(n)}function Pa(e){return Ta(e)||ja(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ja(e){return Na(e.x)||Na(e.y)}function Na(e){return e&&"0%"!==e}function Ma(e,t,n){return n+t*(e-n)}function Da(e,t,n,r,i){return void 0!==i&&(e=Ma(e,i,r)),Ma(e,n,r)+t}function La(e,t=0,n=1,r,i){e.min=Da(e.min,t,n,r,i),e.max=Da(e.max,t,n,r,i)}function Aa(e,{x:t,y:n}){La(e.x,t.translate,t.scale,t.originPoint),La(e.y,n.translate,n.scale,n.originPoint)}const _a=.999999999999,za=1.0000000000001;function Ra(e,t){e.min=e.min+t,e.max=e.max+t}function Fa(e,t,n,r,i=.5){La(e,t,n,nn(e.min,e.max,i),r)}function Oa(e,t){Fa(e.x,t.x,t.scaleX,t.scale,t.originX),Fa(e.y,t.y,t.scaleY,t.scale,t.originY)}function Va(e,t){return Ea(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Ia={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$a=lr.length;function Ba(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const l in t){const e=t[l];if(ur.has(l))o=!0;else if(xt(l))i[l]=e;else{const t=Mi(e,ki[l]);l.startsWith("origin")?(s=!0,a[l]=t):r[l]=t}}if(t.transform||(o||n?r.transform=function(e,t,n){let r="",i=!0;for(let a=0;a<$a;a++){const o=lr[a],s=e[o];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(o.startsWith("scale")?1:0);else{const e=parseFloat(s);l=o.startsWith("scale")?1===e:0===e}if(!l||n){const e=Mi(s,ki[o]);l||(i=!1,r+=\`\${Ia[o]||o}(\${e}) \`),n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;r.transformOrigin=\`\${e} \${t} \${n}\`}}function Ua(e,{style:t,vars:n},r,i){const a=e.style;let o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Ha(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wa={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Vt.test(e))return e;e=parseFloat(e)}return\`\${Ha(e,t.target.x)}% \${Ha(e,t.target.y)}%\`}},qa={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Jt.parse(e);if(i.length>5)return r;const a=Jt.createTransformer(e),o="number"!=typeof i[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const u=nn(s,l,.5);return"number"==typeof i[2+o]&&(i[2+o]/=u),"number"==typeof i[3+o]&&(i[3+o]/=u),a(i)}},Ya={borderRadius:{...Wa,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wa,borderTopRightRadius:Wa,borderBottomLeftRadius:Wa,borderBottomRightRadius:Wa,boxShadow:qa};function Xa(e,{layout:t,layoutId:n}){return ur.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Ya[e]||"opacity"===e)}function Ka(e,t,n){const r=e.style,i=t?.style,a={};if(!r)return a;for(const o in r)(ai(r[o])||i&&ai(i[o])||Xa(o,e)||void 0!==n?.getValue(o)?.liveStyle)&&(a[o]=r[o]);return a}class Qa extends ka{constructor(){super(...arguments),this.type="html",this.renderInstance=Ua}readValueFromInstance(e,t){if(ur.has(t))return this.projection?.isProjecting?ar(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return or(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),i=(xt(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Va(e,t)}build(e,t,n){Ba(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ka(e,t,n)}}const Ga={offset:"stroke-dashoffset",array:"stroke-dasharray"},Za={offset:"strokeDashoffset",array:"strokeDasharray"};const Ja=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function eo(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},l,u,c){if(Ba(e,s,u),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox);for(const h of Ja)void 0!==d[h]&&(f[h]=d[h],delete d[h]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?Ga:Za;e[a.offset]=""+-r,e[a.array]=\`\${t} \${n}\`}(d,i,a,o,!1)}const to=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),no=e=>"string"==typeof e&&"svg"===e.toLowerCase();function ro(e,t,n){const r=Ka(e,t,n);for(const i in e)if(ai(e[i])||ai(t[i])){r[-1!==lr.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}class io extends ka{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=sa}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ur.has(t)){const e=Ei(t);return e&&e.default||0}return t=to.has(t)?t:si(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ro(e,t,n)}build(e,t,n){eo(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Ua(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(to.has(i)?i:si(i),t.attrs[i])}(e,t,0,r)}mount(e){this.isSVGTag=no(e.tagName),super.mount(e)}}const ao=fa.length;function oo(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&oo(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<ao;n++){const r=fa[n],i=e.props[r];(ca(i)||!1===i)&&(t[r]=i)}return t}function so(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const lo=[...da].reverse(),uo=da.length;function co(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map(t=>fi(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=fi(e,t,n);else{const i="function"==typeof t?Zr(e,t,n.custom):t;r=Promise.all(di(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function fo(e){let t=co(e),n=mo(),r=!0;const i=t=>(n,r)=>{const i=Zr(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(a){const{props:o}=e,s=oo(e.parent)||{},l=[],u=new Set;let c={},d=1/0;for(let t=0;t<uo;t++){const f=lo[t],h=n[f],p=void 0!==o[f]?o[f]:s[f],m=ca(p),g=f===a?h.isActive:null;!1===g&&(d=t);let y=p===s[f]&&p!==o[f]&&m;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...c},!h.isActive&&null===g||!p&&!h.prevProp||ua(p)||"boolean"==typeof p)continue;if("exit"===f&&h.isActive&&!0!==g){h.prevResolvedValues&&(c={...c,...h.prevResolvedValues});continue}const v=ho(h.prevProp,p);let b=v||f===a&&h.isActive&&!y&&m||t>d&&m,x=!1;const w=Array.isArray(p)?p:[p];let k=w.reduce(i(f),{});!1===g&&(k={});const{prevResolvedValues:S={}}=h,E={...S,...k},C=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in E){const t=k[e],n=S[e];if(c.hasOwnProperty(e))continue;let r=!1;r=ni(t)&&ni(n)?!so(t,n):t!==n,r?null!=t?C(e):u.add(e):void 0!==t&&u.has(e)?C(e):h.protectedKeys[e]=!0}h.prevProp=p,h.prevResolvedValues=k,h.isActive&&(c={...c,...k}),r&&e.blockInitialAnimation&&(b=!1);const T=y&&v;b&&(!T||x)&&l.push(...w.map(t=>{const n={type:f};if("string"==typeof t&&r&&!T&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,i=Zr(r,t);if(r.enteringChildren&&i){const{delayChildren:t}=i.transition||{};n.delay=Vr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof o.initial){const n=Zr(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let f=Boolean(l.length);return!r||!1!==o.initial&&o.initial!==o.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const i=a(t);for(const e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=mo()}}}function ho(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!so(t,e)}function po(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mo(){return{animate:po(!0),whileInView:po(),whileHover:po(),whileTap:po(),whileDrag:po(),whileFocus:po(),exit:po()}}function go(e,t){e.min=t.min,e.max=t.max}function yo(e,t){go(e.x,t.x),go(e.y,t.y)}function vo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bo(e){return e.max-e.min}function xo(e,t,n,r=.5){e.origin=r,e.originPoint=nn(t.min,t.max,e.origin),e.scale=bo(n)/bo(t),e.translate=nn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function wo(e,t,n,r){xo(e.x,t.x,n.x,r?r.originX:void 0),xo(e.y,t.y,n.y,r?r.originY:void 0)}function ko(e,t,n){e.min=n.min+t.min,e.max=e.min+bo(t)}function So(e,t,n){e.min=t.min-n.min,e.max=e.min+bo(t)}function Eo(e,t,n){So(e.x,t.x,n.x),So(e.y,t.y,n.y)}function Co(e,t,n,r,i){return e=Ma(e-=t,1/n,r),void 0!==i&&(e=Ma(e,1/i,r)),e}function To(e,t,[n,r,i],a,o){!function(e,t=0,n=1,r=.5,i,a=e,o=e){Ot.test(t)&&(t=parseFloat(t),t=nn(o.min,o.max,t/100)-o.min);if("number"!=typeof t)return;let s=nn(a.min,a.max,r);e===a&&(s-=t),e.min=Co(e.min,t,n,s,i),e.max=Co(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,a,o)}const Po=["x","scaleX","originX"],jo=["y","scaleY","originY"];function No(e,t,n,r){To(e.x,t,Po,n?n.x:void 0,r?r.x:void 0),To(e.y,t,jo,n?n.y:void 0,r?r.y:void 0)}function Mo(e){return 0===e.translate&&1===e.scale}function Do(e){return Mo(e.x)&&Mo(e.y)}function Lo(e,t){return e.min===t.min&&e.max===t.max}function Ao(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _o(e,t){return Ao(e.x,t.x)&&Ao(e.y,t.y)}function zo(e){return bo(e.x)/bo(e.y)}function Ro(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Fo(e){return[e("x"),e("y")]}const Oo=["TopLeft","TopRight","BottomLeft","BottomRight"],Vo=Oo.length,Io=e=>"string"==typeof e?parseFloat(e):e,$o=e=>"number"==typeof e||Vt.test(e);function Bo(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Uo=Wo(0,.5,nt),Ho=Wo(.5,.95,Ve);function Wo(e,t,n){return r=>r<e?0:r>t?1:n(Be(e,t,r))}function qo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Yo=(e,t)=>e.depth-t.depth;class Xo{constructor(){this.children=[],this.isDirty=!1}add(e){De(this.children,e),this.isDirty=!0}remove(e){Le(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Yo),this.isDirty=!1,this.children.forEach(e)}}function Ko(e){return ai(e)?e.get():e}class Qo{constructor(){this.members=[]}add(e){De(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1===r.isConnected&&!1!==n.isPresent&&!n.snapshot&&Le(this.members,n)}e.scheduleRender()}remove(e){if(Le(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r],t=e.instance;if(!1!==e.isPresent&&(!t||!1!==t.isConnected)){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();const r=n.options.layoutDependency,i=e.options.layoutDependency;if(!(void 0!==r&&void 0!==i&&r===i)){const r=n.instance;r&&!1===r.isConnected&&!n.snapshot||(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:a}=e.options;!1===a&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Go={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Zo=["","X","Y","Z"];let Jo=0;function es(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ts(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ui(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ft,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ts(r)}function ns({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Jo++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(as),this.nodes.forEach(fs),this.nodes.forEach(hs),this.nodes.forEach(os)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Xo)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Ue),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=Yi(t)&&!(Yi(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const i=()=>this.root.updateBlockedByResize=!1;ft.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=vt.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(ht(r),e(a-t))};return ft.setup(r,!0),()=>ht(r)}(i,250),Go.hasAnimatedSinceResize&&(Go.hasAnimatedSinceResize=!1,this.nodes.forEach(ds)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||a.getDefaultTransition()||bs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!_o(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...Xr(i,"layout"),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||ds(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ht(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ps),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ts(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ls);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(us);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(cs),this.nodes.forEach(rs),this.nodes.forEach(is)):this.nodes.forEach(us),this.clearAllSnapshots();const e=vt.now();pt.delta=Ae(0,1e3/60,e-pt.timestamp),pt.timestamp=e,pt.isProcessing=!0,mt.update.process(pt),mt.preRender.process(pt),mt.render.process(pt),pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Li.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ss),this.sharedNodes.forEach(ms)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||bo(this.snapshot.measuredBox.x)||bo(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Do(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Pa(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),ks((r=n).x),ks(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Es))){const{scroll:e}=this.root;e&&(Ra(t.x,e.offset.x),Ra(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(yo(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&yo(t,e),Ra(t.x,i.offset.x),Ra(t.y,i.offset.y))}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};yo(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Oa(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Pa(e.latestValues)&&Oa(n,e.latestValues)}return Pa(this.latestValues)&&Oa(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};yo(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Pa(e.latestValues))continue;Ta(e.latestValues)&&e.updateSnapshot();const r=sa();yo(r,e.measurePageBox()),No(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Pa(this.latestValues)&&No(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:i}=this.options;if(!this.layout||!r&&!i)return;this.resolvedRelativeTargetAt=pt.timestamp;const a=this.getClosestProjectingParent();var o,s,l;(a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,s=this.relativeTarget,l=this.relativeParent.target,ko(o.x,s.x,l.x),ko(o.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):yo(this.target,this.layout.layoutBox),Aa(this.target,this.targetDelta)):yo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&Boolean(a.resumingFrom)===Boolean(this.resumingFrom)&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!Ta(this.parent.latestValues)&&!ja(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Eo(this.relativeTargetOrigin,t,n),yo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===pt.timestamp&&(n=!1),n)return;const{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!i)return;yo(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,o=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let a,o;t.x=t.y=1;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:i}=a.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Oa(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Aa(e,o)),r&&Pa(a.latestValues)&&Oa(e,a.latestValues))}t.x<za&&t.x>_a&&(t.x=1),t.y<za&&t.y>_a&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(vo(this.prevProjectionDelta.x,this.projectionDelta.x),vo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),wo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Ro(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ro(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const o={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(s&&!u&&!0===this.options.crossfade&&!this.path.some(vs));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,h,p,m,g;gs(a.x,e.x,n),gs(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Eo(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,m=o,g=n,ys(h.x,p.x,m.x,g),ys(h.y,p.y,m.y,g),d&&(l=this.relativeTarget,f=d,Lo(l.x,f.x)&&Lo(l.y,f.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),yo(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,n,r,i,a){i?(e.opacity=nn(0,n.opacity??1,Uo(r)),e.opacityExit=nn(t.opacity??1,0,Ho(r))):a&&(e.opacity=nn(t.opacity??1,n.opacity??1,r));for(let o=0;o<Vo;o++){const i=\`border\${Oo[o]}Radius\`;let a=Bo(t,i),s=Bo(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||$o(a)===$o(s)?(e[i]=Math.max(nn(Io(a),Io(s),r),0),(Ot.test(s)||Ot.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=nn(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ht(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{Go.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ti(0)),this.currentAnimation=function(e,t,n){const r=ai(e)?e:ti(e);return r.start(Kr("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Ss(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=bo(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=bo(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}yo(t,n),Oa(t,i),wo(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Qo);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&es("z",e,r,this.animationValues);for(let i=0;i<Zo.length;i++)es(\`rotate\${Zo[i]}\`,e,r,this.animationValues),es(\`skew\${Zo[i]}\`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=Ko(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Ko(t?.pointerEvents)||""),void(this.hasProjected&&!Pa(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=\`translate3d(\${i}px, \${a}px, \${o}px) \`),1===t.x&&1===t.y||(r+=\`scale(\${1/t.x}, \${1/t.y}) \`),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=\`perspective(\${e}px) \${r}\`),t&&(r+=\`rotate(\${t}deg) \`),i&&(r+=\`rotateX(\${i}deg) \`),a&&(r+=\`rotateY(\${a}deg) \`),o&&(r+=\`skewX(\${o}deg) \`),s&&(r+=\`skewY(\${s}deg) \`)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=\`scale(\${s}, \${l})\`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;const{x:o,y:s}=this.projectionDelta;e.transformOrigin=\`\${100*o.origin}% \${100*s.origin}% 0\`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const l in Ya){if(void 0===i[l])continue;const{correct:t,applyTo:n,isCSSVariable:o}=Ya[l],s="none"===a?i[l]:t(i[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else o?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=r===this?Ko(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(ls),this.root.sharedNodes.clear()}}}function rs(e){e.updateLayout()}function is(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;"size"===i?Fo(e=>{const r=a?t.measuredBox[e]:t.layoutBox[e],i=bo(r);r.min=n[e].min,r.max=r.min+i}):Ss(i,t.layoutBox,n)&&Fo(r=>{const i=a?t.measuredBox[r]:t.layoutBox[r],o=bo(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};wo(o,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?wo(s,e.applyTransform(r,!0),t.measuredBox):wo(s,n,t.layoutBox);const l=!Do(o);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:a}=r;if(i&&a){const o={x:{min:0,max:0},y:{min:0,max:0}};Eo(o,t.layoutBox,i.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};Eo(s,n,a.layoutBox),_o(o,s)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function as(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function os(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ss(e){e.clearSnapshot()}function ls(e){e.clearMeasurements()}function us(e){e.isLayoutDirty=!1}function cs(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ds(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fs(e){e.resolveTargetDelta()}function hs(e){e.calcProjection()}function ps(e){e.resetSkewAndRotation()}function ms(e){e.removeLeadSnapshot()}function gs(e,t,n){e.translate=nn(t.translate,0,n),e.scale=nn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ys(e,t,n,r){e.min=nn(t.min,n.min,r),e.max=nn(t.max,n.max,r)}function vs(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const bs={duration:.45,ease:[.4,0,.1,1]},xs=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ws=xs("applewebkit/")&&!xs("chrome/")?Math.round:Ve;function ks(e){e.min=ws(e.min),e.max=ws(e.max)}function Ss(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=zo(t),i=zo(n),a=.2,!(Math.abs(r-i)<=a));var r,i,a}function Es(e){return e!==e.root&&e.scroll?.wasRoot}const Cs=ns({attachResizeListener:(e,t)=>qo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ts={current:void 0},Ps=ns({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ts.current){const e=new Cs({});e.mount(window),e.setOptions({layoutScroll:!0}),Ts.current=e}return Ts.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),js=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ns(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Ms(...e){return f.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Ns(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Ns(e[t],null)}}}}(...e),e)}class Ds extends f.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Di(e)&&e.offsetWidth||0,r=Di(e)&&e.offsetHeight||0,i=this.props.sizeRef.current;i.height=t.offsetHeight||0,i.width=t.offsetWidth||0,i.top=t.offsetTop,i.left=t.offsetLeft,i.right=n-i.width-i.left,i.bottom=r-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ls({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){const o=f.useId(),l=f.useRef(null),u=f.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=f.useContext(js),d=e.props?.ref??e?.ref,h=Ms(l,d);return f.useInsertionEffect(()=>{const{width:e,height:s,top:d,left:f,right:h,bottom:p}=u.current;if(t||!1===a||!l.current||!e||!s)return;const m="left"===n?\`left: \${f}\`:\`right: \${h}\`,g="bottom"===r?\`bottom: \${p}\`:\`top: \${d}\`;l.current.dataset.motionPopId=o;const y=document.createElement("style");c&&(y.nonce=c);const v=i??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(\`\\n [data-motion-pop-id="\${o}"] {\\n position: absolute !important;\\n width: \${e}px !important;\\n height: \${s}px !important;\\n \${m}px !important;\\n \${g}px !important;\\n }\\n \`),()=>{v.contains(y)&&v.removeChild(y)}},[t]),s.jsx(Ds,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:!1===a?e:f.cloneElement(e,{ref:h})})}const As=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:l,anchorY:u,root:c})=>{const d=Pe(_s),h=f.useId();let p=!0,m=f.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:e=>{d.set(e,!0);for(const t of d.values())if(!t)return;r&&r()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[n,d,r]);return a&&p&&(m={...m}),f.useMemo(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),f.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=s.jsx(Ls,{pop:"popLayout"===o,isPresent:n,anchorX:l,anchorY:u,root:c,children:e}),s.jsx(Me.Provider,{value:m,children:e})};function _s(){return new Map}function zs(e=!0){const t=f.useContext(Me);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=f.useId();f.useEffect(()=>{if(e)return i(a)},[e]);const o=f.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const Rs=e=>e.key||"";function Fs(e){const t=[];return f.Children.forEach(e,e=>{f.isValidElement(e)&&t.push(e)}),t}const Os=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:l="left",anchorY:u="top",root:c})=>{const[d,h]=zs(o),p=f.useMemo(()=>Fs(e),[e]),m=o&&!d?[]:p.map(Rs),g=f.useRef(!0),y=f.useRef(p),v=Pe(()=>new Map),b=f.useRef(new Set),[x,w]=f.useState(p),[k,S]=f.useState(p);Ne(()=>{g.current=!1,y.current=p;for(let e=0;e<k.length;e++){const t=Rs(k[e]);m.includes(t)?(v.delete(t),b.current.delete(t)):!0!==v.get(t)&&v.set(t,!1)}},[k,m.length,m.join("-")]);const E=[];if(p!==x){let e=[...p];for(let t=0;t<k.length;t++){const n=k[t],r=Rs(n);m.includes(r)||(e.splice(t,0,n),E.push(n))}return"wait"===a&&E.length&&(e=E),S(Fs(e)),w(p),null}const{forceRender:C}=f.useContext(Te);return s.jsx(s.Fragment,{children:k.map(e=>{const f=Rs(e),x=!(o&&!d)&&(p===k||m.includes(f));return s.jsx(As,{isPresent:x,initial:!(g.current&&!n)&&void 0,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:x?void 0:()=>{if(b.current.has(f))return;if(b.current.add(f),!v.has(f))return;v.set(f,!0);let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(C?.(),S(y.current),o&&h?.(),r&&r())},anchorX:l,anchorY:u,children:e},f)})})},Vs=f.createContext({strict:!1}),Is={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 $s=!1;function Bs(){return function(){if($s)return;const e={};for(const t in Is)e[t]={isEnabled:e=>Is[t].some(t=>!!e[t])};xa(e),$s=!0}(),ba}const Us=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 Hs(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Us.has(e)}let Ws=e=>!Hs(e);try{"function"==typeof(qs=require("@emotion/is-prop-valid").default)&&(Ws=e=>e.startsWith("on")?!Hs(e):qs(e))}catch{}var qs;const Ys=f.createContext({});function Xs(e){const{initial:t,animate:n}=function(e,t){if(ha(e)){const{initial:t,animate:n}=e;return{initial:!1===t||ca(t)?t:void 0,animate:ca(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,f.useContext(Ys));return f.useMemo(()=>({initial:t,animate:n}),[Ks(t),Ks(n)])}function Ks(e){return Array.isArray(e)?e.join(" "):e}const Qs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Gs(e,t,n){for(const r in t)ai(t[r])||Xa(r,n)||(e[r]=t[r])}function Zs(e,t){const n={};return Gs(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Ba(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function Js(e,t){const n={},r=Zs(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const el=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function tl(e,t,n,r){const i=f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return eo(n,t,no(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};Gs(t,e.style,e),i.style={...t,...i.style}}return i}const nl=["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 rl(e){return"string"==typeof e&&!e.includes("-")&&!!(nl.indexOf(e)>-1||/[A-Z]/u.test(e))}function il(e,t,n,{latestValues:r},i,a=!1,o){const s=(o??rl(e)?tl:Js)(t,r,i,e),l=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(Ws(i)||!0===n&&Hs(i)||!t&&!Hs(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,a),u=e!==f.Fragment?{...l,...s,ref:n}:{},{children:c}=t,d=f.useMemo(()=>ai(c)?c.get():c,[c]);return f.createElement(e,{...u,children:d})}function al(e,t,n,r){const i={},a=r(e,{});for(const f in a)i[f]=Ko(a[f]);let{initial:o,animate:s}=e;const l=ha(e),u=pa(e);t&&u&&!l&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===o;const d=c?s:o;if(d&&"boolean"!=typeof d&&!ua(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Gr(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(i[r]=e)}for(const r in e)i[r]=e[r]}}}return i}const ol=e=>(t,n)=>{const r=f.useContext(Ys),i=f.useContext(Me),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:al(n,r,i,e),renderState:t()}}(e,t,r,i);return n?a():Pe(a)},sl=ol({scrapeMotionValuesFromProps:Ka,createRenderState:Qs}),ll=ol({scrapeMotionValuesFromProps:ro,createRenderState:el}),ul=Symbol.for("motionComponentSymbol");function cl(e,t,n){const r=f.useRef(n);f.useInsertionEffect(()=>{r.current=n});const i=f.useRef(null);return f.useCallback(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());const a=r.current;if("function"==typeof a)if(n){const e=a(n);"function"==typeof e&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}const dl=f.createContext({});function fl(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function hl(e,t,n,r,i,a){const{visualElement:o}=f.useContext(Ys),s=f.useContext(Vs),l=f.useContext(Me),u=f.useContext(js),c=u.reducedMotion,d=u.skipAnimations,h=f.useRef(null),p=f.useRef(!1);r=r||s.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,g=f.useContext(dl);!m||m.projection||!i||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:pl(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:Boolean(o)||s&&fl(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}(h.current,n,i,g);const y=f.useRef(!1);f.useInsertionEffect(()=>{m&&y.current&&m.update(n,l)});const v=n[li],b=f.useRef(Boolean(v)&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Ne(()=>{p.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),f.useEffect(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),b.current=!1),m.enteringChildren=void 0)}),m}function pl(e){if(e)return!1!==e.options.allowProjection?e.projection:pl(e.parent)}function ml(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&function(e){const t=Bs();for(const n in e)t[n]={...t[n],...e[n]};xa(t)}(r);const a=n?"svg"===n:rl(e),o=a?ll:sl;function l(n,r){let l;const u={...f.useContext(js),...n,layoutId:gl(n)},{isStatic:c}=u,d=Xs(n),h=o(n,c);if(!c&&je){f.useContext(Vs).strict;const t=function(e){const t=Bs(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);l=t.MeasureLayout,d.visualElement=hl(e,h,u,i,t.ProjectionNode,a)}return s.jsxs(Ys.Provider,{value:d,children:[l&&d.visualElement?s.jsx(l,{visualElement:d.visualElement,...u}):null,il(e,n,cl(h,d.visualElement,r),h,c,t,a)]})}l.displayName=\`motion.\${"string"==typeof e?e:\`create(\${e.displayName??e.name??""})\`}\`;const u=f.forwardRef(l);return u[ul]=e,u}function gl({layoutId:e}){const t=f.useContext(Te).id;return t&&void 0!==e?t+"-"+e:e}function yl(e,t){if("undefined"==typeof Proxy)return ml;const n=new Map,r=(n,r)=>ml(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>"create"===a?r:(n.has(a)||n.set(a,ml(a,void 0,e,t)),n.get(a))})}const vl=(e,t)=>t.isSVG??rl(e)?new io(t):new Qa(t,{allowProjection:e!==f.Fragment});let bl=0;const xl={animation:{Feature:class extends Sa{constructor(e){super(e),e.animationState||(e.animationState=fo(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ua(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Sa{constructor(){super(...arguments),this.id=bl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function wl(e){return{point:{x:e.pageX,y:e.pageY}}}function kl(e,t,n,r){return qo(e,t,(e=>t=>Oi(t)&&e(t,wl(t)))(n),r)}const Sl=({current:e})=>e?e.ownerDocument.defaultView:null,El=(e,t)=>Math.abs(e-t);const Cl=new Set(["auto","scroll"]);class Tl{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Nl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=El(e.x,t.x),r=El(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=pt;this.history.push({...r,timestamp:i});const{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Pl(t,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=Nl("pointercancel"===e.type?this.lastMoveEventInfo:Pl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Oi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const s=Pl(wl(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=pt;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,Nl(s,this.history)),this.removeListeners=$e(kl(this.contextWindow,"pointermove",this.handlePointerMove),kl(this.contextWindow,"pointerup",this.handlePointerUp),kl(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(Cl.has(e.overflowX)||Cl.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i=r.x-t.x,a=r.y-t.y;0===i&&0===a||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i,this.lastMoveEventInfo.point.y+=a):this.history.length>0&&(this.history[0].x-=i,this.history[0].y-=a),this.scrollPositions.set(e,r),ft.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ht(this.updatePoint)}}function Pl(e,t){return t?{point:t(e.point)}:e}function jl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nl({point:e},t){return{point:e,delta:jl(e,Dl(t)),offset:jl(e,Ml(t)),velocity:Ll(t,.1)}}function Ml(e){return e[0]}function Dl(e){return e[e.length-1]}function Ll(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Dl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>He(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>2*He(t)&&(r=e[1]);const a=We(i.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Al(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function _l(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const zl=.35;function Rl(e,t,n){return{min:Fl(e,t),max:Fl(e,n)}}function Fl(e,t){return"number"==typeof e?e:e[t]||0}const Ol=new WeakMap;class Vl{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Tl(e,{onSessionStart:e=>{t&&this.snapToCursor(wl(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(a=n)||"y"===a?Ai[a]?null:(Ai[a]=!0,()=>{Ai[a]=!1}):Ai.x||Ai.y?null:(Ai.x=Ai.y=!0,()=>{Ai.x=Ai.y=!1}),!this.openDragLock))return;var a;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Fo(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Ot.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=bo(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&ft.update(()=>i(e,t),!1,!0),oi(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:o}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(o),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),a&&ft.update(()=>a(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:Sl(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&ft.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!$l(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?nn(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?nn(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&fl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Al(e.x,n,i),y:Al(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=zl){return!1===e?e=0:!0===e&&(e=zl),{x:Rl(e,"left","right"),y:Rl(e,"top","bottom")}}(t),r!==this.constraints&&!fl(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Fo(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!fl(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=Va(e,n),{scroll:i}=t;return i&&(Ra(r.x,i.offset.x),Ra(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:_l(e.x,t.x),y:_l(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=Ea(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},l=Fo(o=>{if(!$l(o,t,this.currentDirection))return;let l=s&&s[o]||{};a&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[o]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(o,d)});return Promise.all(l).then(o)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return oi(this.visualElement,e),n.start(Kr(e,n,0,t,this.visualElement,!1))}stopAnimation(){Fo(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=\`_drag\${e.toUpperCase()}\`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Fo(t=>{const{drag:n}=this.getProps();if(!$l(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-nn(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!fl(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Fo(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=bo(e),i=bo(t);return i>r?n=Be(t.min,t.max-r,e.min):r>i&&(n=Be(e.min,e.max-i,t.min)),Ae(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Fo(t=>{if(!$l(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(nn(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ol.set(this.visualElement,this);const e=this.visualElement.current,t=kl(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&function(e){return Ii.has(e.tagName)||!0===e.isContentEditable}(i);n&&r&&!a&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();fl(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=aa(e,Il(n)),i=aa(t,Il(n));return()=>{r(),i()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ft.read(r);const o=qo(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Fo(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=zl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function Il(e){let t=!0;return()=>{t?t=!1:e()}}function $l(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Bl=e=>(t,n)=>{e&&ft.update(()=>e(t,n),!1,!0)};let Ul=!1;class Hl extends f.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Ul&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Go.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Ul=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||ft.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Li.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Ul=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Wl(e){const[t,n]=zs(),r=f.useContext(Te);return s.jsx(Hl,{...e,layoutGroup:r,switchLayoutGroup:f.useContext(dl),isPresent:t,safeToRemove:n})}const ql={pan:{Feature:class extends Sa{constructor(){super(...arguments),this.removePointerDownListener=Ve}onPointerDown(e){this.session=new Tl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sl(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Bl(e),onStart:Bl(t),onMove:Bl(n),onEnd:(e,t)=>{delete this.session,r&&ft.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=kl(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Sa{constructor(e){super(e),this.removeGroupControls=Ve,this.removeListeners=Ve,this.controls=new Vl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ve}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Ps,MeasureLayout:Wl}};function Yl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&ft.postRender(()=>i(t,wl(t)))}function Xl(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const i=r["onTap"+("End"===n?"":n)];i&&ft.postRender(()=>i(t,wl(t)))}const Kl=new WeakMap,Ql=new WeakMap,Gl=e=>{const t=Kl.get(e.target);t&&t(e)},Zl=e=>{e.forEach(Gl)};function Jl(e,t,n){const r=function({root:e,...t}){const n=e||document;Ql.has(n)||Ql.set(n,{});const r=Ql.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Zl,{root:e,...t})),r[i]}(t);return Kl.set(e,n),r.observe(e),()=>{Kl.delete(e),r.unobserve(e)}}const eu={some:0,all:1};const tu=yl({...xl,...{inView:{Feature:class extends Sa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:eu[r]};return Jl(this.node.current,a,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Sa{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=qi(e,(e,t)=>(Xl(this.node,t,"Start"),(e,{success:t})=>Xl(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends Sa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=$e(qo(this.node.current,"focus",()=>this.onFocus()),qo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Sa{mount(){const{current:e}=this.node;e&&(this.unmount=Ri(e,(e,t)=>(Yl(this.node,t,"Start"),e=>Yl(this.node,e,"End"))))}unmount(){}}}},...ql,...{layout:{ProjectionNode:Ps,MeasureLayout:Wl}}},vl);function nu({label:e,value:t,suffix:n,decimals:r=0,icon:i,delay:a=0}){const o=f.useRef(null),l=f.useRef(0);return f.useEffect(()=>{o.current&&t!==l.current&&(!function(e,t,n){let r=null;requestAnimationFrame(function i(a){r||(r=a);const o=Math.min((a-r)/800,1),s=1-Math.pow(1-o,4),l=t*s;e.textContent=n>0?l.toFixed(n):String(Math.round(l)),o<1&&requestAnimationFrame(i)})}(o.current,t,r),l.current=t)},[t,r]),s.jsxs(tu.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:a},className:"flex-1 min-w-[120px] px-3 py-2 rounded-lg bg-bg-surface-1 border border-border/50 flex items-center gap-2.5 group hover:border-accent/30 transition-all duration-300",children:[s.jsx("div",{className:"p-1.5 rounded-md bg-bg-surface-2 group-hover:bg-accent/10 transition-colors",children:s.jsx(i,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-accent transition-colors"})}),s.jsxs("div",{className:"flex items-baseline gap-1 min-w-0",children:[s.jsx("span",{ref:o,className:"text-lg font-bold text-text-primary tracking-tight",children:r>0?t.toFixed(r):t}),n&&s.jsx("span",{className:"text-[10px] text-text-muted font-medium",children:n})]}),s.jsx("span",{className:"text-[9px] font-mono text-text-muted uppercase tracking-wider ml-auto hidden sm:block",children:e})]})}function ru({totalHours:e,featuresShipped:t,bugsFixed:n,complexSolved:r,currentStreak:i,filesTouched:a}){return s.jsxs("div",{className:"grid grid-cols-3 lg:grid-cols-6 gap-2 mb-4",children:[s.jsx(nu,{label:"Active Hours",value:e,suffix:"hrs",decimals:1,icon:ee,delay:.1}),s.jsx(nu,{label:"Features",value:t,icon:pe,delay:.15}),s.jsx(nu,{label:"Bugs Fixed",value:n,icon:X,delay:.2}),s.jsx(nu,{label:"Complex",value:r,icon:Y,delay:.25}),s.jsx(nu,{label:"Streak",value:i,suffix:"days",icon:Ee,delay:.3}),s.jsx(nu,{label:"Files",value:a,icon:ie,delay:.35})]})}const iu={"claude-code":"#d4a04a",cursor:"#00b4d8",copilot:"#6e40c9",windsurf:"#38bdf8","github-copilot":"#6e40c9",aider:"#4ade80",continue:"#f97316",cody:"#ff6b6b",tabby:"#a78bfa",roo:"#f472b6",gemini:"#4285f4"},au={"claude-code":"Claude Code",cursor:"Cursor",copilot:"GitHub Copilot",windsurf:"Windsurf","github-copilot":"GitHub Copilot",aider:"Aider",continue:"Continue",cody:"Sourcegraph Cody",tabby:"TabbyML",roo:"Roo Code",mcp:"MCP Client",gemini:"Gemini"},ou={"claude-code":"CC",cursor:"Cu",copilot:"CP",windsurf:"WS","github-copilot":"CP",aider:"Ai",continue:"Co",cody:"Cy",tabby:"Tb",roo:"Ro",mcp:"MC",gemini:"Ge"},su={"claude-code":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"/></svg>')}\`,gemini:\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"/></svg>')}\`},lu=Object.keys(iu);function uu(e){if(iu[e])return e;return lu.filter(t=>e.startsWith(t)).sort((e,t)=>t.length-e.length)[0]??e}const cu={feature:"#4ade80",bugfix:"#f87171",refactor:"#a78bfa",test:"#38bdf8",docs:"#fbbf24",setup:"#6b655c",deployment:"#f97316",other:"#9c9588"};function du(e){const t=e/3600;return t<.1?\`\${t.toFixed(2)}h\`:\`\${t.toFixed(1)}h\`}function fu(e,t){return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,t)}function hu({label:e,children:t}){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-[10px] text-text-muted uppercase tracking-widest font-bold whitespace-nowrap",children:e}),s.jsx("div",{className:"flex items-center gap-1.5 overflow-x-auto pb-1 no-scrollbar",children:t})]})}function pu({stats:e}){const t=fu(e.byClient,4),n=fu(e.byLanguage,4);return 0===t.length&&0===n.length?null:s.jsxs("div",{className:"flex flex-col gap-4 mb-8 p-4 rounded-xl bg-bg-surface-1/30 border border-border/50",children:[t.length>0&&s.jsx(hu,{label:"Top Clients",children:t.map(([e,t])=>{const n=iu[e];return s.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",style:n?{borderLeftWidth:"3px",borderLeftColor:n}:void 0,title:du(t),children:[au[e]??e,s.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:du(t)})]},e)})}),n.length>0&&s.jsx(hu,{label:"Languages",children:n.map(([e,t])=>s.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",title:du(t),children:[e,s.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:du(t)})]},e))})]})}const mu={coding:"#6366f1",debugging:"#f87171",testing:"#60a5fa",planning:"#a78bfa",reviewing:"#34d399",documenting:"#fbbf24",learning:"#f472b6",other:"#94a3b8"};function gu(e){if(e<60)return"<1m";const t=Math.round(e/60);if(t<60)return\`\${t}m\`;return\`\${(e/3600).toFixed(1)}h\`}function yu({byTaskType:e}){const t=Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1]);if(0===t.length)return null;const n=t[0][1];return s.jsxs("div",{className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4 mb-8",children:[s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest mb-4 px-1",children:"Task Types"}),s.jsx("div",{className:"space-y-2.5",children:t.map(([e,t],r)=>{const i=mu[e]??mu.other,a=t/n*100;return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-xs text-text-secondary font-medium w-24 text-right shrink-0",children:(o=e,o.charAt(0).toUpperCase()+o.slice(1))}),s.jsx("div",{className:"flex-1 h-5 rounded bg-bg-surface-2/50 overflow-hidden",children:s.jsx(tu.div,{className:"h-full rounded",style:{backgroundColor:i},initial:{width:0},animate:{width:\`\${a}%\`},transition:{duration:.6,delay:.05*r,ease:[.22,1,.36,1]}})}),s.jsx("span",{className:"text-xs text-text-muted font-mono w-12 text-right shrink-0",children:gu(t)})]},e);var o})})]})}function vu({label:e,active:t,onClick:n}){return s.jsx("button",{onClick:n,className:"text-[10px] font-bold uppercase tracking-wider px-3 py-1.5 rounded-full transition-all duration-200 cursor-pointer border "+(t?"bg-accent text-white border-accent shadow-[0_2px_10px_rgba(99,102,241,0.4)] scale-105":"bg-bg-surface-1 border-border text-text-muted hover:text-text-primary hover:border-text-muted/50"),children:e})}function bu({sessions:e,filters:t,onFilterChange:n}){const r=f.useMemo(()=>[...new Set(e.map(e=>e.client))].sort(),[e]),i=f.useMemo(()=>[...new Set(e.flatMap(e=>e.languages))].sort(),[e]),a=f.useMemo(()=>[...new Set(e.map(e=>e.project).filter(e=>{if(!e)return!1;const t=e.trim().toLowerCase();return!["untitled","mcp","unknown","default","none"].includes(t)}))].sort(),[e]);return r.length>0||i.length>0||a.length>0?s.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-1",children:[s.jsx(vu,{label:"All",active:"all"===t.client&&"all"===t.language&&"all"===t.project,onClick:()=>{n("client","all"),n("language","all"),n("project","all")}}),r.map(e=>s.jsx(vu,{label:au[e]??e,active:t.client===e,onClick:()=>n("client",t.client===e?"all":e)},e)),i.map(e=>s.jsx(vu,{label:e,active:t.language===e,onClick:()=>n("language",t.language===e?"all":e)},e)),a.map(e=>s.jsx(vu,{label:e,active:t.project===e,onClick:()=>n("project",t.project===e?"all":e)},e))]}):null}function xu({onDelete:e,size:t="md",className:n=""}){const[r,i]=f.useState(!1),a=f.useRef(void 0);f.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]);const o="sm"===t?"w-3 h-3":"w-3.5 h-3.5",l="sm"===t?"p-1":"p-1.5";return s.jsx("button",{onClick:t=>{t.stopPropagation(),r?(a.current&&clearTimeout(a.current),i(!1),e()):(i(!0),a.current=setTimeout(()=>i(!1),3e3))},className:\`\${l} rounded-lg transition-all \${r?"bg-error/15 text-error":"text-text-muted hover:text-error/70 hover:bg-error/5"} \${n}\`,title:r?"Click again to confirm":"Delete",children:s.jsx(xe,{className:\`\${o} \${r?"animate-pulse":""}\`})})}function wu(e,t){const n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0});return\`\${n(e)} \u2014 \${n(t)}\`}function ku(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}const Su={feature:"bg-success/15 text-success border-success/30",bugfix:"bg-error/15 text-error border-error/30",refactor:"bg-purple/15 text-purple border-purple/30",test:"bg-blue/15 text-blue border-blue/30",docs:"bg-accent/15 text-accent border-accent/30",setup:"bg-text-muted/15 text-text-muted border-text-muted/20",deployment:"bg-emerald/15 text-emerald border-emerald/30"};function Eu({category:e}){const t=Su[e]??"bg-bg-surface-2 text-text-secondary border-border";return s.jsx("span",{className:\`text-[10px] px-1.5 py-0.5 rounded-full border font-bold uppercase tracking-wider \${t}\`,children:e})}function Cu({score:e}){const t=e/5*100,n=e>=4?"bg-success":e>=3?"bg-accent":"bg-error",r=e>=4?"bg-success/15":e>=3?"bg-accent/15":"bg-error/15";return s.jsx("span",{className:\`w-7 h-[4px] rounded-full \${r} flex-shrink-0 overflow-hidden\`,title:\`Quality: \${e.toFixed(1)}/5\`,children:s.jsx("span",{className:\`block h-full rounded-full \${n}\`,style:{width:\`\${t}%\`}})})}function Tu({evaluation:e}){const t=[{label:"Prompt",value:e.prompt_quality,reason:e.prompt_quality_reason,Icon:de},{label:"Context",value:e.context_provided,reason:e.context_provided_reason,Icon:ae},{label:"Scope",value:e.scope_quality,reason:e.scope_quality_reason,Icon:be},{label:"Independence",value:e.independence_level,reason:e.independence_level_reason,Icon:te}],n=t.some(e=>e.reason)||e.task_outcome_reason;return s.jsxs("div",{className:"px-2 py-1.5 bg-bg-surface-2/30 rounded-md mb-2",children:[s.jsx("div",{className:"grid grid-cols-2 gap-x-6 gap-y-1.5",children:t.map(({label:e,value:t,Icon:n})=>s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px]",children:[s.jsx(n,{className:"w-3 h-3 text-text-muted/50 flex-shrink-0"}),s.jsx("span",{className:"text-text-muted min-w-[58px]",children:e}),s.jsx(Cu,{score:t})]},e))}),n&&s.jsxs("div",{className:"mt-1.5 pt-1.5 border-t border-border/15 space-y-1",children:[e.task_outcome_reason&&s.jsxs("div",{className:"flex items-start gap-1.5 text-[10px]",children:[s.jsx("span",{className:"text-error font-bold flex-shrink-0",children:"Outcome:"}),s.jsx("span",{className:"text-text-muted leading-tight",children:e.task_outcome_reason})]}),t.filter(e=>e.reason).map(({label:e,reason:t})=>s.jsxs("div",{className:"flex items-start gap-1.5 text-[10px]",children:[s.jsxs("span",{className:"text-accent font-bold flex-shrink-0",children:[e,":"]}),s.jsx("span",{className:"text-text-muted leading-tight",children:t})]},e))]}),s.jsxs("div",{className:"flex items-center gap-4 mt-1.5 pt-1.5 border-t border-border/15",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px]",children:[s.jsx(he,{className:"w-3 h-3 text-text-muted/50"}),s.jsx("span",{className:"text-text-muted",children:"Iterations"}),s.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.iteration_count})]}),s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px]",children:[s.jsx(Se,{className:"w-3 h-3 text-text-muted/50"}),s.jsx("span",{className:"text-text-muted",children:"Tools"}),s.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.tools_leveraged})]})]})]})}function Pu({session:e,milestones:t,defaultExpanded:n=!1,externalShowPublic:r,hideClientAvatar:i=!1,onDeleteSession:a,onDeleteMilestone:o}){const[l,u]=f.useState(n),[c,d]=f.useState(!1),h=r??c,p=d,m=uu(e.client),g=iu[m]??"#91919a",y=ou[m]??m.slice(0,2).toUpperCase(),v=su[m],b=t.length>0,x=e.project?.trim()||"",w=!x||["untitled","mcp","unknown","default","none","null","undefined"].includes(x.toLowerCase()),k=t[0],S=w&&k?k.title:x,E=w&&k?k.private_title||k.title:x;let C=e.private_title||e.title||E||"Untitled Session",T=e.title||S||"Untitled Session";const P=C!==T;return s.jsxs("div",{className:"group/card mb-1 rounded-lg border transition-all duration-200 "+(l?"bg-bg-surface-1 border-accent/30 shadow-md":"bg-bg-surface-1/30 border-border/50 hover:border-accent/30"),children:[s.jsxs("div",{className:"flex items-center",children:[s.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3 py-2 text-left min-w-0",onClick:()=>b&&u(!l),style:{cursor:b?"pointer":"default"},children:[!i&&s.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:{backgroundColor:\`\${g}15\`,color:g,border:\`1px solid \${g}30\`},title:au[m]??m,children:v?s.jsx("div",{className:"w-4 h-4",style:{backgroundColor:g,maskImage:\`url(\${v})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${v})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):y}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[s.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:s.jsx(Os,{mode:"wait",children:s.jsxs(tu.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[h?s.jsx(ye,{className:"w-3 h-3 text-success/60 flex-shrink-0"}):s.jsx(ue,{className:"w-3 h-3 text-accent/60 flex-shrink-0"}),s.jsx("span",{className:"text-sm font-bold truncate text-text-primary tracking-tight",children:h?T:C})]},h?"public":"private")})}),!i&&s.jsx("span",{className:"text-[9px] font-bold text-text-muted font-mono bg-bg-surface-2/60 px-1.5 rounded uppercase tracking-tighter border border-border/30 flex-shrink-0",children:au[m]??m}),e.evaluation&&s.jsx("span",{className:"text-[9px] font-black px-1.5 py-0.5 rounded border flex-shrink-0 "+("completed"===e.evaluation.task_outcome?"bg-success/10 text-success border-success/20":"partial"===e.evaluation.task_outcome?"bg-accent/10 text-accent border-accent/20":"bg-error/10 text-error border-error/20"),children:"completed"===e.evaluation.task_outcome?"DONE":"partial"===e.evaluation.task_outcome?"PART":"FAIL"})]}),s.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-text-muted font-semibold",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ee,{className:"w-3 h-3 opacity-60"}),ku(e.duration_seconds)]}),e.duration_seconds>=900&&(()=>{const t=Math.floor(e.duration_seconds/900),n=t>0?Math.min(e.heartbeat_count/t,1):0,r=n>=.8?"text-success":n>=.5?"text-accent":"text-text-muted";return s.jsxs("span",{className:\`flex items-center gap-0.5 font-mono \${r}\`,title:\`Focus: \${Math.round(100*n)}%\`,children:[s.jsx(Ee,{className:"w-2.5 h-2.5 fill-current opacity-70"}),Math.round(100*n),"%"]})})(),s.jsx("span",{className:"opacity-50 font-mono tracking-tight",children:wu(e.started_at,e.ended_at).split(" \u2014 ")[0]}),t.length>0&&s.jsxs("span",{className:"flex items-center gap-0.5",title:\`\${t.length} milestone\${1!==t.length?"s":""}\`,children:[s.jsx(se,{className:"w-2.5 h-2.5 opacity-60"}),t.length]}),e.evaluation&&s.jsx(Cu,{score:(j=e.evaluation,(j.prompt_quality+j.context_provided+j.scope_quality+j.independence_level)/4)})]})]})]}),s.jsxs("div",{className:"flex items-center px-2 gap-1.5 border-l border-border/30 h-8 self-center",children:[a&&s.jsx(xu,{onDelete:()=>a(e.session_id),className:"opacity-0 group-hover/card:opacity-100"}),P&&void 0===r&&s.jsx("button",{onClick:e=>{e.stopPropagation(),p(!h)},className:"p-1.5 rounded-lg transition-all "+(h?"bg-success/10 text-success":"text-text-muted hover:bg-bg-surface-2"),title:h?"Public Mode":"Private Mode",children:h?s.jsx(re,{className:"w-3.5 h-3.5"}):s.jsx(ne,{className:"w-3.5 h-3.5"})}),b&&s.jsx("button",{onClick:()=>u(!l),className:"p-1.5 rounded-lg transition-all "+(l?"text-accent bg-accent/5":"text-text-muted hover:bg-bg-surface-2"),children:s.jsx(G,{className:"w-4 h-4 transition-transform duration-200 "+(l?"rotate-180":"")})})]})]}),s.jsx(Os,{children:l&&b&&s.jsx(tu.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:s.jsxs("div",{className:"px-3 pb-3 pt-1 space-y-1",children:[s.jsx("div",{className:"h-px bg-border/20 mb-2 mx-1"}),e.evaluation&&s.jsx(Tu,{evaluation:e.evaluation}),s.jsx("div",{className:"space-y-0.5",children:t.map(e=>{e.private_title;const t=h?e.title:e.private_title||e.title,n=function(e){if(!e||e<=0)return"";if(e<60)return\`\${e}m\`;const t=Math.floor(e/60),n=e%60;return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}(e.duration_minutes);return s.jsxs("div",{className:"group flex items-center gap-2 p-1.5 rounded-md hover:bg-bg-surface-2/40 transition-colors",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{backgroundColor:cu[e.category]??"#9c9588"}}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs font-medium text-text-secondary group-hover:text-text-primary truncate",children:t}),s.jsx(Eu,{category:e.category})]})}),n&&s.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:n}),o&&s.jsx(xu,{onDelete:()=>o(e.id),size:"sm",className:"opacity-0 group-hover:opacity-100"})]},e.id)})})]})})})]});var j}function ju(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Nu({group:e,defaultExpanded:t,globalShowPublic:n,onDeleteSession:r,onDeleteMilestone:i,onDeleteConversation:a}){const[o,l]=f.useState(t),[u,c]=f.useState(!1),d=n||u;if(1===e.sessions.length){const a=e.sessions[0];return s.jsx(Pu,{session:a.session,milestones:a.milestones,defaultExpanded:t&&a.milestones.length>0,externalShowPublic:n||void 0,onDeleteSession:r,onDeleteMilestone:i})}const h=uu(e.sessions[0].session.client),p=iu[h]??"#91919a",m=ou[h]??h.slice(0,2).toUpperCase(),g=su[h],y=e.aggregateEval,v=e.sessions[0].session,b=v.private_title||v.title||v.project||"Conversation",x=v.title||v.project||"Conversation",w=b!==x;return s.jsxs("div",{className:"group/conv rounded-lg border border-accent/20 bg-bg-surface-1/20 overflow-hidden",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3 py-2 text-left hover:bg-bg-surface-1/40 transition-colors min-w-0",onClick:()=>l(!o),children:[s.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:{backgroundColor:\`\${p}15\`,color:p,border:\`1px solid \${p}30\`},title:au[h]??h,children:g?s.jsx("div",{className:"w-4 h-4",style:{backgroundColor:p,maskImage:\`url(\${g})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${g})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):m}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:s.jsx(Os,{mode:"wait",children:s.jsxs(tu.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[d?s.jsx(ye,{className:"w-3 h-3 text-success/60 flex-shrink-0"}):s.jsx(ue,{className:"w-3 h-3 text-accent/60 flex-shrink-0"}),s.jsx("span",{className:"text-sm font-bold truncate text-text-primary",children:d?x:b})]},d?"public":"private")})}),s.jsxs("span",{className:"text-[10px] font-bold text-accent/80 bg-accent/5 px-1.5 py-0.5 rounded border border-accent/10 flex-shrink-0",children:[e.sessions.length," prompts"]}),y&&s.jsxs("span",{className:"text-[9px] font-bold px-1.5 py-0.5 rounded border flex-shrink-0 "+((y.outcomes.completed??0)===y.session_count?"bg-success/10 text-success border-success/20":(y.outcomes.completed??0)>0?"bg-accent/10 text-accent border-accent/20":"bg-error/10 text-error border-error/20"),children:[y.outcomes.completed??0,"/",y.session_count]})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-text-muted font-medium mt-0.5",children:[s.jsx("span",{className:"font-mono",children:ju(e.totalDuration)}),e.totalMilestones>0&&s.jsxs("span",{className:"text-[10px] text-accent/70",children:[e.totalMilestones," milestone",1!==e.totalMilestones?"s":""]}),y&&s.jsxs("span",{className:"text-[10px] font-mono text-text-muted/60",children:["avg prompt: ",y.prompt_quality,"/5"]})]})]})]}),s.jsxs("div",{className:"flex items-center px-2 gap-1.5 border-l border-border/30 h-8 self-center",children:[a&&e.conversationId&&s.jsx(xu,{onDelete:()=>a(e.conversationId),className:"opacity-0 group-hover/conv:opacity-100"}),w&&!n&&s.jsx("button",{onClick:()=>c(!u),className:"p-1.5 rounded-lg transition-all "+(d?"bg-success/10 text-success":"text-text-muted hover:bg-bg-surface-2"),title:d?"Public Mode":"Private Mode",children:d?s.jsx(re,{className:"w-3.5 h-3.5"}):s.jsx(ne,{className:"w-3.5 h-3.5"})}),s.jsx("button",{onClick:()=>l(!o),className:"p-1.5 rounded-lg transition-all "+(o?"text-accent bg-accent/5":"text-text-muted hover:bg-bg-surface-2"),children:s.jsx(G,{className:"w-4 h-4 transition-transform duration-200 "+(o?"rotate-180":"")})})]})]}),s.jsx(Os,{children:o&&s.jsx(tu.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:s.jsxs("div",{className:"px-3 pb-2 relative",children:[s.jsx("div",{className:"absolute left-[1.75rem] top-0 bottom-2 w-px",style:{backgroundColor:\`\${p}25\`}}),s.jsx("div",{className:"space-y-1 pl-10",children:e.sessions.map((e,t)=>s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute -left-7 top-5 w-2 h-2 rounded-full border-2",style:{backgroundColor:p,borderColor:\`\${p}40\`}}),s.jsx(Pu,{session:e.session,milestones:e.milestones,defaultExpanded:!1,externalShowPublic:d||void 0,hideClientAvatar:!0,onDeleteSession:r,onDeleteMilestone:i})]},e.session.session_id))})]})})})]})}function Mu({sessions:e,milestones:t,filters:n,globalShowPublic:r,onDeleteSession:i,onDeleteConversation:a,onDeleteMilestone:o}){const l=f.useMemo(()=>e.filter(e=>("all"===n.client||e.client===n.client)&&(!("all"!==n.language&&!e.languages.includes(n.language))&&("all"===n.project||(e.project??"")===n.project))),[e,n]),u=f.useMemo(()=>"all"===n.category?t:t.filter(e=>e.category===n.category),[t,n.category]),c=f.useMemo(()=>{const e=function(e,t){const n=new Map;for(const i of t){const e=n.get(i.session_id);e?e.push(i):n.set(i.session_id,[i])}const r=e.map(e=>({session:e,milestones:n.get(e.session_id)??[]}));return r.sort((e,t)=>new Date(t.session.started_at).getTime()-new Date(e.session.started_at).getTime()),r}(l,u);return function(e){const t=new Map,n=[];for(const i of e){const e=i.session.conversation_id;if(e){const n=t.get(e);n?n.push(i):t.set(e,[i])}else n.push(i)}const r=[];for(const[i,a]of t){a.sort((e,t)=>(e.session.conversation_index??0)-(t.session.conversation_index??0));const e=a.reduce((e,t)=>e+t.session.duration_seconds,0),t=a.reduce((e,t)=>e+t.milestones.length,0),n=a[0].session.started_at,o=a[a.length-1].session.ended_at;r.push({conversationId:i,sessions:a,aggregateEval:$(a),totalDuration:e,totalMilestones:t,startedAt:n,endedAt:o})}for(const i of n)r.push({conversationId:null,sessions:[i],aggregateEval:i.session.evaluation?$([i]):null,totalDuration:i.session.duration_seconds,totalMilestones:i.milestones.length,startedAt:i.session.started_at,endedAt:i.session.ended_at});return r.sort((e,t)=>new Date(t.startedAt).getTime()-new Date(e.startedAt).getTime()),r}(e)},[l,u]);return 0===c.length?s.jsx("div",{className:"text-center text-text-muted py-8 text-sm mb-4",children:"No sessions in this window"}):s.jsx("div",{className:"space-y-1.5 mb-4",children:c.map((e,t)=>s.jsx(Nu,{group:e,defaultExpanded:0===t,globalShowPublic:r,onDeleteSession:i,onDeleteMilestone:o,onDeleteConversation:a},e.conversationId??e.sessions[0].session.session_id))})}function Du({sessions:e,timeScale:t,effectiveTime:n,isLive:r,onDayClick:i,highlightDate:a}){const o="24h"===t||"12h"===t,l=new Date(n).toISOString().slice(0,10),u=f.useMemo(()=>o?function(e,t){const n=new Date(\`\${t}T00:00:00\`).getTime(),r=n+864e5,i=[];for(let a=0;a<24;a++)i.push({hour:a,minutes:0});for(const a of e){const e=new Date(a.started_at).getTime(),t=new Date(a.ended_at).getTime();if(t<n||e>r)continue;const o=Math.max(e,n),s=Math.min(t,r);for(let r=0;r<24;r++){const e=n+36e5*r,t=e+36e5,a=Math.max(o,e),l=Math.min(s,t);l>a&&(i[r].minutes+=(l-a)/6e4)}}return i}(e,l):[],[e,l,o]),c=f.useMemo(()=>o?[]:function(e,t){const n=new Date,r=[];for(let i=t-1;i>=0;i--){const t=new Date(n);t.setDate(t.getDate()-i);const a=t.toISOString().slice(0,10);let o=0;for(const n of e)n.started_at.slice(0,10)===a&&(o+=n.duration_seconds);r.push({date:a,hours:o/3600})}return r}(e,7),[e,o]),d=o?\`Hourly \u2014 \${new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}\`:"Last 7 Days";if(o){const e=Math.max(...u.map(e=>e.minutes),1);return s.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[s.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),s.jsxs("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[e.toFixed(0),"m peak"]})]}),s.jsx("div",{className:"flex items-end gap-[3px] h-16",children:u.map((t,n)=>{const r=e>0?t.minutes/e*100:0;return s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[s.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:s.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[s.jsxs("span",{className:"font-bold",children:[t.hour,":00"]}),s.jsxs("span",{className:"text-accent",children:[t.minutes.toFixed(0),"m active"]}),s.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),s.jsx(tu.div,{initial:{height:0},animate:{height:\`\${Math.max(r,t.minutes>0?8:0)}%\`},transition:{delay:.01*n,duration:.5},className:"w-full rounded-t-sm transition-all duration-300 group-hover:bg-accent relative overflow-hidden",style:{minHeight:t.minutes>0?"4px":"0px",backgroundColor:t.minutes>0?\`rgba(99, 102, 241, \${.4+t.minutes/e*.6})\`:"var(--color-bg-surface-2)"},children:t.minutes>.5*e&&s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-transparent to-white/10"})})]},t.hour)})}),s.jsx("div",{className:"flex gap-[3px] mt-2 border-t border-border/30 pt-2",children:u.map(e=>s.jsx("div",{className:"flex-1 text-center",children:e.hour%6==0&&s.jsx("span",{className:"text-[9px] text-text-muted font-bold font-mono uppercase",children:0===e.hour?"12a":e.hour<12?\`\${e.hour}a\`:12===e.hour?"12p":e.hour-12+"p"})},e.hour))})]})}const h=Math.max(...c.map(e=>e.hours),.1);return s.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[s.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),s.jsx("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:"Last 7 days"})]}),s.jsx("div",{className:"flex items-end gap-2 h-16",children:c.map((e,t)=>{const n=h>0?e.hours/h*100:0,r=e.date===a;return s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[s.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:s.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[s.jsx("span",{className:"font-bold",children:e.date}),s.jsxs("span",{className:"text-accent",children:[e.hours.toFixed(1),"h active"]}),s.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),s.jsx(tu.div,{initial:{height:0},animate:{height:\`\${Math.max(n,e.hours>0?8:0)}%\`},transition:{delay:.05*t,duration:.5},className:"w-full rounded-t-md cursor-pointer transition-all duration-300 group-hover:scale-x-110 origin-bottom "+(r?"ring-2 ring-accent ring-offset-2 ring-offset-bg-base":""),style:{minHeight:e.hours>0?"4px":"0px",backgroundColor:r?"var(--color-accent-bright)":e.hours>0?\`rgba(99, 102, 241, \${.4+e.hours/h*.6})\`:"var(--color-bg-surface-2)"},onClick:()=>i?.(e.date)})]},e.date)})}),s.jsx("div",{className:"flex gap-2 mt-2 border-t border-border/30 pt-2",children:c.map(e=>s.jsx("div",{className:"flex-1 text-center",children:s.jsx("span",{className:"text-[10px] text-text-muted font-bold uppercase tracking-tighter",children:new Date(e.date+"T12:00:00").toLocaleDateString([],{weekday:"short"})})},e.date))})]})}function Lu(e){if(!e)return"Never synced";const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"Just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;return\`\${Math.floor(r/24)}d ago\`}function Au({config:e,onRefresh:t}){const[n,r]=f.useState(""),[i,a]=f.useState(""),[o,l]=f.useState("email"),[u,c]=f.useState(!1),[d,h]=f.useState(null);if(!e)return null;if(e.authenticated){const n=async()=>{c(!0),h(null);try{const e=await z("/api/local/sync");e.success?(h("Synced!"),t(),setTimeout(()=>h(null),3e3)):h(e.error??"Sync failed")}catch(e){h(e.message)}finally{c(!1)}};return s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 p-4 mt-12 bg-bg-surface-1/50 rounded-2xl border border-border/50 backdrop-blur-sm",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-accent/10 flex items-center justify-center border border-accent/20",children:s.jsx(ke,{className:"w-4 h-4 text-accent"})}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-xs font-bold text-text-primary",children:e.email}),s.jsxs("span",{className:"text-[10px] text-text-muted font-mono uppercase tracking-tighter",children:["Last sync: ",Lu(e.last_sync_at)]})]})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[d&&s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest "+("Synced!"===d?"text-success":"text-error"),children:d}),s.jsxs("button",{onClick:n,disabled:u,className:"group flex items-center gap-2 px-4 py-2 bg-accent hover:bg-accent-bright text-white text-xs font-bold rounded-lg transition-all duration-300 shadow-lg shadow-accent/20 disabled:opacity-50 cursor-pointer overflow-hidden relative",children:[s.jsx(he,{className:"w-3.5 h-3.5 "+(u?"animate-spin":"group-hover:rotate-180 transition-transform duration-500")}),u?"Syncing...":"Sync Now"]})]})]})}const p=f.useCallback(async()=>{if(n.includes("@")){c(!0),h(null);try{await function(e){return z("/api/local/auth/send-otp",{email:e})}(n),l("otp")}catch(e){h(e.message)}finally{c(!1)}}},[n]),m=f.useCallback(async()=>{if(/^\\d{6}$/.test(i)){c(!0),h(null);try{await function(e,t){return z("/api/local/auth/verify-otp",{email:e,code:t})}(n,i),t()}catch(e){h(e.message)}finally{c(!1)}}},[n,i,t]);return s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 p-4 mt-12 bg-bg-surface-1/50 rounded-2xl border border-border/50 backdrop-blur-sm",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-bg-surface-2 flex items-center justify-center border border-border",children:s.jsx(ge,{className:"w-4 h-4 text-text-muted"})}),s.jsx("span",{className:"text-xs font-bold text-text-secondary uppercase tracking-widest",children:"Sign in to sync"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[d&&s.jsx("span",{className:"text-[10px] font-bold text-error uppercase tracking-widest mr-2",children:d}),"email"===o?s.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[s.jsx("div",{className:"pl-3 py-2",children:s.jsx(ce,{className:"w-3.5 h-3.5 text-text-muted"})}),s.jsx("input",{type:"email",placeholder:"you@email.com",value:n,onChange:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&p(),className:"px-3 py-2 text-xs bg-transparent text-text-primary outline-none w-40 placeholder:text-text-muted/50"}),s.jsx("button",{onClick:p,disabled:u||!n.includes("@"),className:"px-4 py-2 bg-bg-surface-2 hover:bg-bg-surface-3 text-text-primary text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer border-l border-border",children:u?"...":"Send"})]}):s.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[s.jsx("input",{type:"text",maxLength:6,placeholder:"000000",inputMode:"numeric",autoComplete:"one-time-code",value:i,onChange:e=>a(e.target.value),onKeyDown:e=>"Enter"===e.key&&m(),autoFocus:!0,className:"px-4 py-2 text-xs bg-transparent text-text-primary text-center font-mono tracking-widest outline-none w-32 placeholder:text-text-muted/50"}),s.jsx("button",{onClick:m,disabled:u||6!==i.length,className:"px-4 py-2 bg-accent hover:bg-accent-bright text-white text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer",children:u?"...":"Verify"})]})]})]})}var _u=j();const zu={"15m":{visibleDuration:9e5,majorTickInterval:3e5,minorTickInterval:6e4,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"30m":{visibleDuration:18e5,majorTickInterval:6e5,minorTickInterval:12e4,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"1h":{visibleDuration:36e5,majorTickInterval:9e5,minorTickInterval:3e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"12h":{visibleDuration:432e5,majorTickInterval:72e5,minorTickInterval:18e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"24h":{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})},"7d":{visibleDuration:6048e5,majorTickInterval:864e5,minorTickInterval:216e5,labelFormat:e=>e.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"})},"30d":{visibleDuration:2592e6,majorTickInterval:6048e5,minorTickInterval:864e5,labelFormat:e=>e.toLocaleDateString([],{month:"short",day:"numeric"})}};function Ru(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Fu({value:e,onChange:t,scale:n,sessions:r=[],milestones:i=[]}){const a=f.useRef(null),[o,l]=f.useState(0);f.useEffect(()=>{if(!a.current)return;const e=new ResizeObserver(e=>{for(const t of e)l(t.contentRect.width)});return e.observe(a.current),l(a.current.getBoundingClientRect().width),()=>e.disconnect()},[]);const u=zu[n],c=o>0?o/u.visibleDuration:0,[d,h]=f.useState(!1),p=f.useRef(0),m=f.useCallback(e=>{h(!0),p.current=e.clientX,e.currentTarget.setPointerCapture(e.pointerId)},[]),g=f.useCallback(n=>{if(!d||0===c)return;const r=n.clientX-p.current;p.current=n.clientX,t(e+-r/c)},[d,c,e,t]),y=f.useCallback(()=>{h(!1)},[]),v=f.useMemo(()=>{if(!o||0===c)return[];const t=u.visibleDuration/2,n=e+t,r=e-t-u.majorTickInterval,i=n+u.majorTickInterval,a=[];for(let o=Math.ceil(r/u.majorTickInterval)*u.majorTickInterval;o<=i;o+=u.majorTickInterval)a.push({type:"major",time:o,position:(o-e)*c,label:u.labelFormat(new Date(o))});for(let o=Math.ceil(r/u.minorTickInterval)*u.minorTickInterval;o<=i;o+=u.minorTickInterval)o%u.majorTickInterval!==0&&a.push({type:"minor",time:o,position:(o-e)*c});return a},[e,o,c,u]),b=f.useMemo(()=>r.map(e=>({session:e,start:new Date(e.started_at).getTime(),end:new Date(e.ended_at).getTime()})),[r]),x=f.useMemo(()=>{if(!o||0===c)return[];const t=u.visibleDuration/2,n=e-t,r=e+t;return b.filter(e=>e.start<=r&&e.end>=n).map(t=>({session:t.session,leftOffset:(Math.max(t.start,n)-e)*c,width:(Math.min(t.end,r)-Math.max(t.start,n))*c}))},[b,e,o,c,u]),w=f.useMemo(()=>i.map(e=>({milestone:e,time:new Date(e.created_at).getTime()})).sort((e,t)=>e.time-t.time),[i]),k=f.useMemo(()=>{if(!o||0===c||!w.length)return[];const t=u.visibleDuration/2,n=e-t,r=e+t;let i=0,a=w.length;for(;i<a;){const e=i+a>>1;w[e].time<n?i=e+1:a=e}const s=i;for(a=w.length;i<a;){const e=i+a>>1;w[e].time<=r?i=e+1:a=e}const l=i,d=[];for(let o=s;o<l;o++){const t=w[o];d.push({...t,offset:(t.time-e)*c})}return d},[w,e,o,c,u]),[S,E]=f.useState(null),C=f.useRef(e);return f.useEffect(()=>{S&&Math.abs(e-C.current)>1e3&&E(null),C.current=e},[e,S]),s.jsxs("div",{className:"relative h-20",children:[s.jsxs("div",{className:"absolute inset-0 bg-transparent border-t border-border/50 overflow-hidden select-none touch-none cursor-grab active:cursor-grabbing",ref:a,onPointerDown:m,onPointerMove:g,onPointerUp:y,style:{touchAction:"none"},children:[s.jsxs("div",{className:"absolute left-1/2 top-0 bottom-0 w-[2px] bg-accent z-30 -translate-x-1/2 shadow-[0_0_15px_rgba(99,102,241,0.5)]",children:[s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-3 h-3 bg-accent rounded-b-full"}),s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-3 h-3 bg-accent rounded-t-full"})]}),s.jsxs("div",{className:"absolute inset-0 left-1/2 top-0 bottom-0 pointer-events-none",children:[v.map(e=>s.jsx("div",{className:"absolute top-0 border-l "+("major"===e.type?"border-border/60":"border-border/30"),style:{left:e.position,height:"major"===e.type?"100%":"35%",bottom:0},children:"major"===e.type&&e.label&&s.jsx("span",{className:"absolute top-3 left-2 text-[9px] font-bold text-text-muted uppercase tracking-wider whitespace-nowrap bg-bg-surface-1/80 px-1 py-0.5 rounded",children:e.label})},e.time)),x.map(e=>s.jsx("div",{className:"absolute bottom-0 rounded-t-md pointer-events-auto cursor-pointer transition-opacity hover:opacity-80",style:{left:e.leftOffset,width:Math.max(e.width,3),height:"45%",backgroundColor:"rgba(99, 102, 241, 0.15)",borderTop:"2px solid rgba(99, 102, 241, 0.5)",boxShadow:"inset 0 1px 10px rgba(99, 102, 241, 0.05)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();E({type:"session",data:e.session,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>E(null)},e.session.session_id)),k.map((e,n)=>s.jsx("div",{className:"absolute bottom-3 pointer-events-auto cursor-pointer z-40 transition-transform hover:scale-125",style:{left:e.offset,transform:"translateX(-50%)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();E({type:"milestone",data:e.milestone,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>E(null),onClick:n=>{n.stopPropagation(),t(e.time)},children:s.jsx("div",{className:"w-3.5 h-3.5 rounded-full border-2 border-bg-surface-1 shadow-lg",style:{backgroundColor:cu[e.milestone.category]??"#9c9588",boxShadow:\`0 0 10px \${cu[e.milestone.category]}50\`}})},n))]})]}),S&&_u.createPortal(s.jsx("div",{className:"fixed z-[9999] pointer-events-none",style:{left:S.x,top:S.y,transform:"translate(-50%, -100%)"},children:s.jsxs("div",{className:"mb-3 bg-bg-surface-3/95 backdrop-blur-md text-text-primary rounded-xl shadow-2xl px-3 py-2.5 text-[11px] min-w-[180px] max-w-[280px] border border-border/50 animate-in fade-in zoom-in-95 duration-200",children:["session"===S.type?s.jsx(Ou,{session:S.data}):s.jsx(Vu,{milestone:S.data}),s.jsx("div",{className:"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-bg-surface-3/95 border-r border-b border-border/50 rotate-45"})]})}),document.body)]})}function Ou({session:e}){const t=au[e.client]??e.client,n=e.private_title||e.title||e.project||\`\${t} Session\`;return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-bold text-xs text-accent uppercase tracking-widest",children:t}),s.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:Ru(e.duration_seconds)})]}),s.jsx("div",{className:"h-px bg-border/50 my-0.5"}),s.jsx("div",{className:"text-text-primary font-medium",children:n}),s.jsx("div",{className:"text-text-secondary capitalize text-[10px]",children:e.task_type})]})}function Vu({milestone:e}){const t=e.private_title??e.title;return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-bold text-[10px] uppercase tracking-widest",style:{color:cu[e.category]??"#9c9588"},children:e.category}),e.complexity&&s.jsx("span",{className:"text-[9px] font-mono text-text-muted font-bold border border-border/50 px-1 rounded uppercase",children:e.complexity})]}),s.jsx("div",{className:"h-px bg-border/50 my-0.5"}),s.jsx("div",{className:"font-bold text-xs break-words text-text-primary",children:t}),e.private_title&&s.jsxs("div",{className:"text-[10px] text-text-muted italic opacity-70",children:["Public: ",e.title]})]})}const Iu={"15m":9e5,"30m":18e5,"1h":36e5,"12h":432e5,"24h":864e5,"7d":6048e5,"30d":2592e6},$u={"15m":"15 Minutes","30m":"30 Minutes","1h":"1 Hour","12h":"12 Hours","24h":"24 Hours","7d":"7 Days","30d":"30 Days"};function Bu(e,t){const n=e.trim();if(!n)return null;const r=new Date(t),i=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?\\s*(AM|PM)$/i);if(i){let e=parseInt(i[1],10);const t=parseInt(i[2],10),n=i[3]?parseInt(i[3],10):0,a=i[4].toUpperCase();return e<1||e>12||t>59||n>59?null:("AM"===a&&12===e&&(e=0),"PM"===a&&12!==e&&(e+=12),r.setHours(e,t,n,0),r.getTime())}const a=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/);if(a){const e=parseInt(a[1],10),t=parseInt(a[2],10),n=a[3]?parseInt(a[3],10):0;return e>23||t>59||n>59?null:(r.setHours(e,t,n,0),r.getTime())}return null}const Uu=["15m","30m","1h","12h","24h","7d","30d"];function Hu({value:e,onChange:t,scale:n,onScaleChange:r,sessions:i,milestones:a}){const o=null===e,[l,u]=f.useState(Date.now());f.useEffect(()=>{if(!o)return;const e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[o]);const c=o?l:e,[d,h]=f.useState(!1),[p,m]=f.useState(""),g=f.useRef(null),y=f.useRef(!1),v=f.useRef(""),b=f.useRef(!1),x=f.useRef(0),w=f.useCallback(e=>{const n=Date.now();if(e>=n-2e3)return b.current=!0,x.current=n,void t(null);b.current&&n-x.current<300||b.current&&e>=n-1e4?t(null):(b.current=!1,t(e))},[t]),k=e=>{const n=c,r=Math.min(n+e,Date.now());t(r)},S=()=>{y.current=o,t(c);const e=new Date(c).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});v.current=e,m(e),h(!0),requestAnimationFrame(()=>g.current?.select())},E=()=>{if(h(!1),y.current&&p===v.current)return void t(null);const e=Bu(p,c);null!==e&&t(Math.min(e,Date.now()))};return s.jsxs("div",{className:"flex flex-col bg-bg-surface-1/40 border border-border/50 rounded-2xl overflow-hidden mb-8 shadow-xl backdrop-blur-md",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between px-6 py-5 border-b border-border/50 gap-6",children:[s.jsxs("div",{className:"flex flex-col items-start gap-1.5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2 h-8",children:[d?s.jsx("input",{ref:g,type:"text",value:p,onChange:e=>m(e.target.value),onBlur:E,onKeyDown:e=>{if("Enter"===e.key)return void E();if("Escape"===e.key)return e.preventDefault(),h(!1),void(y.current&&t(null));if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;e.preventDefault();const n=g.current;if(!n)return;const r=n.selectionStart??0,i="ArrowUp"===e.key?1:-1,a=Bu(p,c);if(null===a)return;const o=p.indexOf(":"),s=p.indexOf(":",o+1),l=p.lastIndexOf(" ");let u;u=r<=o?36e5*i:s>-1&&r<=s?6e4*i:l>-1&&r<=l?1e3*i:12*i*36e5;const d=Math.min(a+u,Date.now()),f=new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});m(f),t(d),requestAnimationFrame(()=>{n&&n.setSelectionRange(r,r)})},className:"text-2xl font-mono font-bold tracking-tight bg-bg-surface-2 border border-accent rounded-lg px-2 -ml-2 w-[165px] outline-none text-text-primary shadow-[0_0_10px_rgba(99,102,241,0.2)]"}):s.jsxs("button",{onClick:S,className:"group flex items-center gap-2 hover:bg-bg-surface-2/50 rounded-lg px-2 -ml-2 py-1 transition-all cursor-text",title:"Click to edit time",children:[s.jsx(ee,{className:"w-5 h-5 "+(o?"text-text-muted":"text-accent")}),s.jsx("span",{className:"text-2xl font-mono font-bold tracking-tight tabular-nums "+(o?"text-text-primary":"text-accent"),children:new Date(c).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"})})]}),s.jsx("button",{onClick:d?E:S,className:"p-1.5 rounded-lg transition-colors flex-shrink-0 "+(d?"bg-accent text-white hover:bg-accent-bright":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:d?"Confirm time":"Edit time",children:s.jsx(fe,{className:"w-3.5 h-3.5"})})]}),o?s.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 text-[10px] font-bold uppercase tracking-widest bg-success/10 text-success rounded-full border border-success/20 shadow-[0_0_10px_rgba(16,185,129,0.1)]",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-success animate-pulse"}),"Live"]}):s.jsx("div",{className:"flex items-center gap-1.5 px-2.5 py-1 text-[10px] font-bold uppercase tracking-widest bg-accent/10 text-accent rounded-full border border-accent/20",children:"History"})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary font-medium px-0.5",children:[s.jsx(K,{className:"w-3.5 h-3.5 text-text-muted"}),new Date(c).toLocaleDateString([],{weekday:"short",month:"long",day:"numeric",year:"numeric"})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[s.jsx("div",{className:"flex items-center bg-bg-surface-2/50 border border-border/50 rounded-xl p-1 shadow-inner",children:Uu.map(e=>s.jsx("button",{onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(n===e?"bg-accent text-white shadow-lg shadow-accent/20":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:$u[e],children:e},e))}),s.jsxs("div",{className:"flex items-center gap-2",children:[!o&&s.jsxs("button",{onClick:()=>t(null),className:"group flex items-center gap-2 px-4 py-2 text-[10px] font-bold uppercase tracking-widest bg-accent/10 hover:bg-accent text-accent hover:text-white rounded-xl transition-all border border-accent/20",children:[s.jsx(me,{className:"w-3.5 h-3.5 group-hover:-rotate-90 transition-transform duration-500"}),"Live"]}),s.jsxs("div",{className:"flex items-center gap-1 bg-bg-surface-2/50 border border-border/50 rounded-xl p-1",children:[s.jsx("button",{onClick:()=>k(-Iu[n]),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors",title:\`Back \${$u[n]}\`,children:s.jsx(Z,{className:"w-4 h-4"})}),s.jsx("button",{onClick:()=>k(Iu[n]),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors disabled:opacity-20 disabled:cursor-not-allowed",title:\`Forward \${$u[n]}\`,disabled:o||c>=Date.now()-1e3,children:s.jsx(J,{className:"w-4 h-4"})})]})]})]})]}),s.jsx(Fu,{value:c,onChange:w,scale:n,sessions:i,milestones:a})]})}const Wu={feature:{verb:"shipped",noun:"feature",plural:"features"},bugfix:{verb:"fixed",noun:"bug",plural:"bugs"},refactor:{verb:"refactored",noun:"module",plural:"modules"},test:{verb:"added",noun:"test suite",plural:"test suites"},docs:{verb:"wrote",noun:"doc",plural:"docs"},setup:{verb:"configured",noun:"setup",plural:"setups"},deployment:{verb:"deployed",noun:"release",plural:"releases"},other:{verb:"completed",noun:"task",plural:"tasks"}};function qu({children:e}){return s.jsx("span",{className:"text-text-primary font-medium",children:e})}function Yu({sessions:e,milestones:t}){const n=f.useMemo(()=>function(e,t){if(0===e.length)return s.jsx("span",{className:"text-text-muted",children:"No sessions in this time window."});const n=[],r=e.reduce((e,t)=>e+t.duration_seconds,0)/3600,i=r<.1?"<0.1":r.toFixed(1);if(n.push(s.jsxs("span",{children:[s.jsx(qu,{children:e.length})," ",1===e.length?"session":"sessions",","," ",s.jsx(qu,{children:i})," hrs"]},"sessions")),t.length>0){const e={};let r=0;for(const n of t)e[n.category]=(e[n.category]??0)+1,"feature"===n.category&&"complex"===n.complexity&&r++;const i=[],a=["feature","bugfix","refactor","test","docs","setup","deployment","other"];for(const t of a){const n=e[t];if(!n)continue;const a=Wu[t]??Wu.other,o=1===n?a.noun:a.plural,l="feature"===t&&r>0?s.jsxs("span",{children:[" ","(",s.jsx(qu,{children:r})," complex)"]},\`\${t}-complex\`):null;i.push(s.jsxs("span",{children:[a.verb," ",s.jsx(qu,{children:n})," ",o,l]},t))}if(i.length>0){n.push(s.jsx("span",{children:" \u2014 "},"milestone-sep"));for(let e=0;e<i.length;e++)e>0&&n.push(s.jsx("span",{children:", "},\`sep-\${e}\`)),n.push(i[e])}}const a={};for(const s of e)s.client&&(a[s.client]=(a[s.client]??0)+1);const o=Object.entries(a).sort((e,t)=>t[1]-e[1])[0];if(o){const e=au[o[0]]??o[0];n.push(s.jsxs("span",{children:[". Most active: ",s.jsx(qu,{children:e})]},"client"))}const l={};for(const s of e){const e=s.languages?.[0];e&&(l[e]=(l[e]??0)+1)}const u=Object.entries(l).sort((e,t)=>t[1]-e[1])[0];if(u){const e=u[0].charAt(0).toUpperCase()+u[0].slice(1);n.push(s.jsxs("span",{children:[". Primary: ",s.jsx(qu,{children:e})]},"lang"))}return n.push(s.jsx("span",{children:"."},"end")),s.jsx(s.Fragment,{children:n})}(e,t),[e,t]);return s.jsx(tu.div,{initial:{opacity:0},animate:{opacity:1},className:"rounded-xl bg-bg-surface-1 border border-border/50 px-4 py-3 mb-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(ve,{className:"w-4 h-4 text-accent flex-shrink-0 mt-0.5"}),s.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:n})]})})}function Xu({sessions:e}){const{scores:t,summaryLine:n}=f.useMemo(()=>{const t=e.filter(e=>null!=e.evaluation);if(0===t.length)return{scores:null,summaryLine:null};let n=0,r=0,i=0,a=0,o=0,s=0;for(const e of t){const t=e.evaluation;n+=t.prompt_quality,r+=t.context_provided,i+=t.independence_level,a+=t.scope_quality,s+=t.iteration_count,"completed"===t.task_outcome&&o++}const l=t.length,u=Math.round(o/l*100);return{scores:[{label:"Prompt Quality",value:n/l,max:5},{label:"Context",value:r/l,max:5},{label:"Independence",value:i/l,max:5},{label:"Scope",value:a/l,max:5},{label:"Completion",value:u/20,max:5}],summaryLine:\`\${l} session\${1===l?"":"s"} evaluated \xB7 \${u}% completed \xB7 avg \${(s/l).toFixed(1)} iterations\`}},[e]);return s.jsxs(tu.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:s.jsx(be,{className:"w-3.5 h-3.5 text-text-muted"})}),s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"AI Proficiency"})]}),null===t?s.jsx("p",{className:"text-xs text-text-muted py-2",children:"No evaluation data yet"}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"space-y-3",children:t.map((e,t)=>{const n=e.value/e.max*100,r="Completion"===e.label?\`\${Math.round(n)}%\`:e.value.toFixed(1);return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-xs text-text-secondary font-medium w-28 text-right shrink-0",children:e.label}),s.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-bg-surface-2/50 overflow-hidden",children:s.jsx(tu.div,{className:"h-full rounded-full",style:{backgroundColor:(i=e.value,i>=4?"var(--color-accent)":i>=3?"var(--color-success)":"var(--color-text-muted)")},initial:{width:0},animate:{width:\`\${n}%\`},transition:{duration:.6,delay:.05*t,ease:[.22,1,.36,1]}})}),s.jsx("span",{className:"text-xs text-text-muted font-mono w-10 text-right shrink-0",children:r})]},e.label);var i})}),s.jsx("p",{className:"text-[10px] text-text-muted mt-4 px-1 font-mono",children:n})]})]})}const Ku=["Output","Efficiency","Prompts","Consistency","Breadth"];function Qu(e,t,n,r,i){const a=2*Math.PI*e/5-Math.PI/2;return[n+i*t*Math.cos(a),r+i*t*Math.sin(a)]}function Gu(e,t,n,r){const i=[];for(let a=0;a<5;a++){const[o,s]=Qu(a,e,t,n,r);i.push(\`\${o},\${s}\`)}return i.join(" ")}function Zu({sessions:e,milestones:t,streak:n}){const{values:r,hasEvalData:i}=f.useMemo(()=>{const r={simple:1,medium:2,complex:4};let i=0;for(const e of t)i+=r[e.complexity]??1;const a=Math.min(1,i/10),o=e.reduce((e,t)=>e+t.files_touched,0),s=e.reduce((e,t)=>e+t.duration_seconds,0)/3600,l=Math.min(1,o/Math.max(s,1)/20),u=e.filter(e=>null!=e.evaluation);let c=0;const d=u.length>0;if(d){c=u.reduce((e,t)=>e+t.evaluation.prompt_quality,0)/u.length/5}const f=Math.min(1,n/14),h=new Set;for(const t of e)for(const e of t.languages)h.add(e);return{values:[a,l,c,f,Math.min(1,h.size/5)],hasEvalData:d}},[e,t,n]),a=100,o=100,l=[];for(let s=0;s<5;s++){const e=Math.max(r[s],.02),[t,n]=Qu(s,e,a,o,70);l.push(\`\${t},\${n}\`)}const u=l.join(" ");return s.jsxs(tu.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:s.jsx(Y,{className:"w-3.5 h-3.5 text-text-muted"})}),s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Skill Profile"})]}),s.jsx("div",{className:"flex justify-center",children:s.jsxs("svg",{viewBox:"0 0 200 200",width:200,height:200,className:"overflow-visible",children:[[.33,.66,1].map(e=>s.jsx("polygon",{points:Gu(e,a,o,70),fill:"none",stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.6},e)),Array.from({length:5}).map((e,t)=>{const[n,r]=Qu(t,1,a,o,70);return s.jsx("line",{x1:a,y1:o,x2:n,y2:r,stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.4},\`axis-\${t}\`)}),s.jsx(tu.polygon,{points:u,fill:"var(--color-accent)",fillOpacity:.2,stroke:"var(--color-accent)",strokeWidth:1.5,strokeLinejoin:"round",initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{duration:.6,ease:[.22,1,.36,1]},style:{transformOrigin:"100px 100px"}}),r.map((e,t)=>{const n=Math.max(e,.02),[r,l]=Qu(t,n,a,o,70),u=2===t&&!i;return s.jsx("circle",{cx:r,cy:l,r:2.5,fill:u?"var(--color-text-muted)":"var(--color-accent-bright)",opacity:u?.4:1},\`point-\${t}\`)}),Ku.map((e,t)=>{const n=function(e,t,n,r){const[i,a]=Qu(e,1.28,t,n,r);let o="middle";return 1!==e&&2!==e||(o="start"),3!==e&&4!==e||(o="end"),{x:i,y:a,anchor:o}}(t,a,o,70),r=2===t&&!i;return s.jsx("text",{x:n.x,y:n.y,textAnchor:n.anchor,dominantBaseline:"central",className:"text-[9px] font-medium",fill:r?"var(--color-text-muted)":"var(--color-text-secondary)",opacity:r?.5:1,children:e},e)})]})}),s.jsx("div",{className:"flex justify-center gap-3 mt-2 flex-wrap",children:Ku.map((e,t)=>{const n=2===t&&!i,a=Math.round(100*r[t]);return s.jsxs("span",{className:"text-[10px] font-mono "+(n?"text-text-muted/50":"text-text-muted"),children:[a,"%"]},e)})})]})}const Ju={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function ec(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;const i=Math.floor(r/24);return 1===i?"yesterday":i<7?\`\${i}d ago\`:new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})}function tc({milestones:e}){const t=[...e].sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime()).slice(0,8);return s.jsxs(tu.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.35,ease:[.22,1,.36,1]},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[s.jsx(we,{className:"w-4 h-4 text-accent"}),s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Recent Achievements"}),s.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded ml-auto",children:[e.length," total"]})]}),0===t.length?s.jsx("div",{className:"text-sm text-text-muted text-center py-6",children:"No milestones yet \u2014 complete your first session!"}):s.jsx("div",{className:"space-y-0.5",children:t.map((e,t)=>{const n=cu[e.category]??"#9c9588",r=Ju[e.category]??"bg-bg-surface-2 text-text-secondary border-border",i=ou[e.client]??e.client.slice(0,2).toUpperCase(),a=iu[e.client]??"#91919a",o=e.private_title||e.title,l="complex"===e.complexity;return s.jsxs(tu.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.25,delay:.04*t},className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-bg-surface-2/40 transition-colors",children:[s.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:n}}),s.jsx("span",{className:"text-sm font-medium text-text-secondary hover:text-text-primary truncate flex-1 min-w-0",children:o}),s.jsx("span",{className:\`text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border flex-shrink-0 \${r}\`,children:e.category}),l&&s.jsxs("span",{className:"flex items-center gap-0.5 text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border bg-purple/10 text-purple border-purple/20 flex-shrink-0",children:[s.jsx(Y,{className:"w-2.5 h-2.5"}),"complex"]}),s.jsx("span",{className:"text-[10px] text-text-muted font-mono flex-shrink-0",children:ec(e.created_at)}),s.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[8px] font-bold font-mono flex-shrink-0",style:{backgroundColor:\`\${a}15\`,color:a,border:\`1px solid \${a}20\`},children:i})]},e.id)})})]})}const nc=[{id:"sessions",label:"Sessions",icon:le},{id:"insights",label:"Insights",icon:Q}];function rc({activeTab:e,onTabChange:t}){return s.jsx("div",{className:"sticky top-0 z-20 bg-bg-base/80 backdrop-blur-md pt-2 pb-1 -mx-1 px-1",children:s.jsx("div",{className:"flex gap-1 p-1 rounded-lg bg-bg-surface-1 border border-border/50",children:nc.map(({id:n,label:r,icon:i})=>{const a=e===n;return s.jsxs("button",{onClick:()=>t(n),className:\`\\n flex-1 flex items-center justify-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-all duration-200\\n \${a?"bg-accent text-white shadow-[0_0_12px_rgba(99,102,241,0.3)]":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"}\\n \`,children:[s.jsx(i,{className:"w-4 h-4"}),r]},n)})})})}function ic({filteredSessions:e,filteredMilestones:t,filters:n,onFilterChange:r,onDeleteSession:i,onDeleteConversation:a,onDeleteMilestone:o}){const[l,u]=f.useState(!1),[c,d]=f.useState(!1),h="all"!==n.client||"all"!==n.language||"all"!==n.project;return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between px-1",children:[s.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Activity Feed"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[e.length," Sessions"]}),s.jsx("button",{onClick:()=>d(e=>!e),className:"p-1.5 rounded-md border transition-all duration-200 "+(c?"bg-success/10 border-success/30 text-success":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:c?"Showing public titles":"Showing private titles",children:c?s.jsx(re,{className:"w-3.5 h-3.5"}):s.jsx(ne,{className:"w-3.5 h-3.5"})}),s.jsx("button",{onClick:()=>u(e=>!e),className:"p-1.5 rounded-md border transition-all duration-200 "+(l||h?"bg-accent/10 border-accent/30 text-accent":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),children:s.jsx(oe,{className:"w-3.5 h-3.5"})})]})]}),l&&s.jsx(bu,{sessions:e,filters:n,onFilterChange:r}),s.jsx(Mu,{sessions:e,milestones:t,filters:n,globalShowPublic:c,onDeleteSession:i,onDeleteConversation:a,onDeleteMilestone:o})]})}function ac(){const{sessions:e,milestones:t,config:n,health:r,loading:i,timeTravelTime:a,timeScale:o,filters:l,activeTab:u,loadAll:c,loadHealth:d,setTimeTravelTime:h,setTimeScale:p,setFilter:m,setActiveTab:g,deleteSession:y,deleteConversation:v,deleteMilestone:b}=O();f.useEffect(()=>{c(),d()},[c,d]),f.useEffect(()=>{const e=setInterval(d,3e4);if(null!==a)return()=>clearInterval(e);const t=setInterval(c,3e4);return()=>{clearInterval(e),clearInterval(t)}},[a,c,d]);const x=null===a,w=a??Date.now(),k=F[o]/2,S=w-k,E=w+k,C=f.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=new Date(e.started_at).getTime(),i=new Date(e.ended_at).getTime();return r<=n&&i>=t})}(e,S,E),[e,S,E]),T=f.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=new Date(e.created_at).getTime();return r>=t&&r<=n})}(t,S,E),[t,S,E]),P=f.useMemo(()=>function(e,t=[]){let n=0,r=0;const i={},a={},o={},s={};for(const u of e){n+=u.duration_seconds,r+=u.files_touched,i[u.client]=(i[u.client]??0)+u.duration_seconds;for(const e of u.languages)a[e]=(a[e]??0)+u.duration_seconds;o[u.task_type]=(o[u.task_type]??0)+u.duration_seconds,u.project&&(s[u.project]=(s[u.project]??0)+u.duration_seconds)}const l=function(e){let t=0,n=0,r=0;for(const i of e)"feature"===i.category&&t++,"bugfix"===i.category&&n++,"complex"===i.complexity&&r++;return{featuresShipped:t,bugsFixed:n,complexSolved:r}}(t);return{totalHours:n/3600,totalSessions:e.length,currentStreak:I(e),filesTouched:r,...l,byClient:i,byLanguage:a,byTaskType:o,byProject:s}}(C,T),[C,T]),j=f.useMemo(()=>function(e,t,n){if(n)return"Live";const r=new Date((e+t)/2),i=new Date,a=new Date(Date.now()-864e5);return r.toDateString()===i.toDateString()?"Today":r.toDateString()===a.toDateString()?"Yesterday":r.toLocaleDateString([],{month:"short",day:"numeric"})}(S,E,x),[S,E,x]),N=f.useMemo(()=>{if(!x)return new Date(w).toISOString().slice(0,10)},[x,w]);return i?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx("div",{className:"text-text-muted text-sm",children:"Loading..."})}):s.jsx("div",{className:"min-h-screen bg-bg-base selection:bg-accent/30 selection:text-text-primary",children:s.jsxs("div",{className:"max-w-[1000px] mx-auto px-6 py-6",children:[s.jsx(Ce,{health:r,timeContextLabel:j}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Hu,{value:a,onChange:h,scale:o,onScaleChange:p,sessions:e,milestones:t}),s.jsx(ru,{totalHours:P.totalHours,totalSessions:P.totalSessions,currentStreak:P.currentStreak,filesTouched:P.filesTouched,featuresShipped:P.featuresShipped,bugsFixed:P.bugsFixed,complexSolved:P.complexSolved}),s.jsx(rc,{activeTab:u,onTabChange:g}),"sessions"===u&&s.jsx(ic,{filteredSessions:C,filteredMilestones:T,filters:l,onFilterChange:m,onDeleteSession:y,onDeleteConversation:v,onDeleteMilestone:b}),"insights"===u&&s.jsxs("div",{className:"space-y-4 pt-2",children:[s.jsx(Yu,{sessions:C,milestones:T,isLive:x,windowStart:S,windowEnd:E}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Xu,{sessions:C}),s.jsx(Zu,{sessions:C,milestones:T,streak:P.currentStreak})]}),s.jsx(yu,{byTaskType:P.byTaskType}),s.jsx(Du,{sessions:e,timeScale:o,effectiveTime:w,isLive:x,onDayClick:e=>{const t=new Date(\`\${e}T12:00:00\`).getTime();h(t),p("24h")},highlightDate:N}),s.jsx(tc,{milestones:T}),s.jsx(pu,{stats:P})]}),s.jsx(Au,{config:n,onRefresh:c})]})]})})}M.createRoot(document.getElementById("root")).render(s.jsx(f.StrictMode,{children:s.jsx(ac,{})}));</script>
|
|
36523
|
+
<style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:"Geist Mono","JetBrains Mono","SF Mono","Fira Code",ui-monospace,monospace;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-body:"Inter",system-ui,-apple-system,sans-serif;--color-bg-base:var(--bg-base);--color-bg-surface-1:var(--bg-surface-1);--color-bg-surface-2:var(--bg-surface-2);--color-bg-surface-3:var(--bg-surface-3);--color-text-primary:var(--text-primary);--color-text-secondary:var(--text-secondary);--color-text-muted:var(--text-muted);--color-accent:var(--accent);--color-accent-bright:var(--accent-bright);--color-border:var(--border);--color-success:#10b981;--color-error:#ef4444;--color-blue:#3b82f6;--color-purple:#8b5cf6}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.-top-10{top:calc(var(--spacing)*-10)}.top-0{top:calc(var(--spacing)*0)}.top-3{top:calc(var(--spacing)*3)}.top-5{top:calc(var(--spacing)*5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-1\\.5{bottom:calc(var(--spacing)*-1.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-3{bottom:calc(var(--spacing)*3)}.-left-7{left:calc(var(--spacing)*-7)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-\\[1\\.75rem\\]{left:1.75rem}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-12{margin-top:calc(var(--spacing)*12)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-8{height:calc(var(--spacing)*8)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-\\[4px\\]{height:4px}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-24{width:calc(var(--spacing)*24)}.w-28{width:calc(var(--spacing)*28)}.w-32{width:calc(var(--spacing)*32)}.w-40{width:calc(var(--spacing)*40)}.w-\\[2px\\]{width:2px}.w-\\[165px\\]{width:165px}.w-full{width:100%}.w-px{width:1px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[1000px\\]{max-width:1000px}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[58px\\]{min-width:58px}.min-w-\\[120px\\]{min-width:120px}.min-w-\\[180px\\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.origin-bottom{transform-origin:bottom}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\\[3px\\]{gap:3px}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-6{column-gap:calc(var(--spacing)*6)}.gap-y-1\\.5{row-gap:calc(var(--spacing)*1.5)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-full{border-top-left-radius:3.40282e38px;border-top-right-radius:3.40282e38px}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.rounded-b-full{border-bottom-right-radius:3.40282e38px;border-bottom-left-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent,.border-accent\\/10{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/10{border-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.border-accent\\/20{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/20{border-color:color-mix(in oklab,var(--color-accent)20%,transparent)}}.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/30{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.border-bg-surface-1{border-color:var(--color-bg-surface-1)}.border-blue\\/20{border-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.border-blue\\/20{border-color:color-mix(in oklab,var(--color-blue)20%,transparent)}}.border-blue\\/30{border-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.border-blue\\/30{border-color:color-mix(in oklab,var(--color-blue)30%,transparent)}}.border-border,.border-border\\/15{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/15{border-color:color-mix(in oklab,var(--color-border)15%,transparent)}}.border-border\\/30{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/30{border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.border-border\\/50{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/50{border-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.border-border\\/60{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/60{border-color:color-mix(in oklab,var(--color-border)60%,transparent)}}.border-error\\/20{border-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.border-error\\/20{border-color:color-mix(in oklab,var(--color-error)20%,transparent)}}.border-error\\/30{border-color:#ef44444d}@supports (color:color-mix(in lab,red,red)){.border-error\\/30{border-color:color-mix(in oklab,var(--color-error)30%,transparent)}}.border-purple\\/20{border-color:#8b5cf633}@supports (color:color-mix(in lab,red,red)){.border-purple\\/20{border-color:color-mix(in oklab,var(--color-purple)20%,transparent)}}.border-purple\\/30{border-color:#8b5cf64d}@supports (color:color-mix(in lab,red,red)){.border-purple\\/30{border-color:color-mix(in oklab,var(--color-purple)30%,transparent)}}.border-success\\/20{border-color:#10b98133}@supports (color:color-mix(in lab,red,red)){.border-success\\/20{border-color:color-mix(in oklab,var(--color-success)20%,transparent)}}.border-success\\/30{border-color:#10b9814d}@supports (color:color-mix(in lab,red,red)){.border-success\\/30{border-color:color-mix(in oklab,var(--color-success)30%,transparent)}}.border-text-muted\\/20{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.border-text-muted\\/20{border-color:color-mix(in oklab,var(--color-text-muted)20%,transparent)}}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/5{background-color:color-mix(in oklab,var(--color-accent)5%,transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/10{background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/15{background-color:color-mix(in oklab,var(--color-accent)15%,transparent)}}.bg-bg-base,.bg-bg-base\\/80{background-color:var(--color-bg-base)}@supports (color:color-mix(in lab,red,red)){.bg-bg-base\\/80{background-color:color-mix(in oklab,var(--color-bg-base)80%,transparent)}}.bg-bg-surface-1,.bg-bg-surface-1\\/20{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/20{background-color:color-mix(in oklab,var(--color-bg-surface-1)20%,transparent)}}.bg-bg-surface-1\\/30{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-1)30%,transparent)}}.bg-bg-surface-1\\/40{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/40{background-color:color-mix(in oklab,var(--color-bg-surface-1)40%,transparent)}}.bg-bg-surface-1\\/50{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-1)50%,transparent)}}.bg-bg-surface-1\\/80{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/80{background-color:color-mix(in oklab,var(--color-bg-surface-1)80%,transparent)}}.bg-bg-surface-2,.bg-bg-surface-2\\/30{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-2)30%,transparent)}}.bg-bg-surface-2\\/50{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.bg-bg-surface-2\\/60{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/60{background-color:color-mix(in oklab,var(--color-bg-surface-2)60%,transparent)}}.bg-bg-surface-3,.bg-bg-surface-3\\/95{background-color:var(--color-bg-surface-3)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-3\\/95{background-color:color-mix(in oklab,var(--color-bg-surface-3)95%,transparent)}}.bg-blue\\/10{background-color:#3b82f61a}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/10{background-color:color-mix(in oklab,var(--color-blue)10%,transparent)}}.bg-blue\\/15{background-color:#3b82f626}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/15{background-color:color-mix(in oklab,var(--color-blue)15%,transparent)}}.bg-border\\/20{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/20{background-color:color-mix(in oklab,var(--color-border)20%,transparent)}}.bg-border\\/50{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/50{background-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.bg-error{background-color:var(--color-error)}.bg-error\\/10{background-color:#ef44441a}@supports (color:color-mix(in lab,red,red)){.bg-error\\/10{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.bg-error\\/15{background-color:#ef444426}@supports (color:color-mix(in lab,red,red)){.bg-error\\/15{background-color:color-mix(in oklab,var(--color-error)15%,transparent)}}.bg-purple\\/10{background-color:#8b5cf61a}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/10{background-color:color-mix(in oklab,var(--color-purple)10%,transparent)}}.bg-purple\\/15{background-color:#8b5cf626}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/15{background-color:color-mix(in oklab,var(--color-purple)15%,transparent)}}.bg-success{background-color:var(--color-success)}.bg-success\\/10{background-color:#10b9811a}@supports (color:color-mix(in lab,red,red)){.bg-success\\/10{background-color:color-mix(in oklab,var(--color-success)10%,transparent)}}.bg-success\\/15{background-color:#10b98126}@supports (color:color-mix(in lab,red,red)){.bg-success\\/15{background-color:color-mix(in oklab,var(--color-success)15%,transparent)}}.bg-text-muted\\/10{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/10{background-color:color-mix(in oklab,var(--color-text-muted)10%,transparent)}}.bg-text-muted\\/15{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/15{background-color:color-mix(in oklab,var(--color-text-muted)15%,transparent)}}.bg-transparent{background-color:#0000}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white\\/10{--tw-gradient-to:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.to-white\\/10{--tw-gradient-to:color-mix(in oklab,var(--color-white)10%,transparent)}}.to-white\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-5{padding-block:calc(var(--spacing)*5)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-accent,.text-accent\\/60{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/60{color:color-mix(in oklab,var(--color-accent)60%,transparent)}}.text-accent\\/70{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/70{color:color-mix(in oklab,var(--color-accent)70%,transparent)}}.text-accent\\/80{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/80{color:color-mix(in oklab,var(--color-accent)80%,transparent)}}.text-blue{color:var(--color-blue)}.text-error{color:var(--color-error)}.text-purple{color:var(--color-purple)}.text-success{color:var(--color-success)}.text-success\\/60{color:#10b98199}@supports (color:color-mix(in lab,red,red)){.text-success\\/60{color:color-mix(in oklab,var(--color-success)60%,transparent)}}.text-text-muted,.text-text-muted\\/50{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/50{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.text-text-muted\\/60{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/60{color:color-mix(in oklab,var(--color-text-muted)60%,transparent)}}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_10px_rgba\\(16\\,185\\,129\\,0\\.1\\)\\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#10b9811a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_10px_rgba\\(99\\,102\\,241\\,0\\.2\\)\\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#6366f133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_12px_rgba\\(99\\,102\\,241\\,0\\.3\\)\\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#6366f14d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_15px_rgba\\(99\\,102\\,241\\,0\\.4\\)\\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#6366f166);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_15px_rgba\\(99\\,102\\,241\\,0\\.5\\)\\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#6366f180);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_10px_rgba\\(99\\,102\\,241\\,0\\.4\\)\\]{--tw-shadow:0 2px 10px var(--tw-shadow-color,#6366f166);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-accent\\/20{--tw-shadow-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.shadow-accent\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-accent)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-accent{--tw-ring-color:var(--color-accent)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-bg-base{--tw-ring-offset-color:var(--color-bg-base)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:scale-x-110:is(:where(.group):hover *){--tw-scale-x:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\\:-rotate-90:is(:where(.group):hover *){rotate:-90deg}.group-hover\\:rotate-180:is(:where(.group):hover *){rotate:180deg}.group-hover\\:bg-accent:is(:where(.group):hover *),.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.group-hover\\:text-accent:is(:where(.group):hover *){color:var(--color-accent)}.group-hover\\:text-text-primary:is(:where(.group):hover *){color:var(--color-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *),.group-hover\\/card\\:opacity-100:is(:where(.group\\/card):hover *),.group-hover\\/conv\\:opacity-100:is(:where(.group\\/conv):hover *){opacity:1}}.selection\\:bg-accent\\/30 ::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30 ::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:bg-accent\\/30::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:text-text-primary ::selection{color:var(--color-text-primary)}.selection\\:text-text-primary::selection{color:var(--color-text-primary)}.placeholder\\:text-text-muted\\/50::placeholder{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-text-muted\\/50::placeholder{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.focus-within\\:border-accent\\/50:focus-within{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:border-accent\\/50:focus-within{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.focus-within\\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}@media(hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:border-accent\\/30:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/30:hover{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.hover\\:border-accent\\/40:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/40:hover{border-color:color-mix(in oklab,var(--color-accent)40%,transparent)}}.hover\\:border-text-muted\\/50:hover{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-text-muted\\/50:hover{border-color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.hover\\:bg-accent:hover{background-color:var(--color-accent)}.hover\\:bg-accent-bright:hover{background-color:var(--color-accent-bright)}.hover\\:bg-bg-surface-1\\/40:hover{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-1\\/40:hover{background-color:color-mix(in oklab,var(--color-bg-surface-1)40%,transparent)}}.hover\\:bg-bg-surface-2:hover,.hover\\:bg-bg-surface-2\\/40:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/40:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)40%,transparent)}}.hover\\:bg-bg-surface-2\\/50:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/50:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.hover\\:bg-bg-surface-3:hover{background-color:var(--color-bg-surface-3)}.hover\\:bg-error\\/5:hover{background-color:#ef44440d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/5:hover{background-color:color-mix(in oklab,var(--color-error)5%,transparent)}}.hover\\:text-error\\/70:hover{color:#ef4444b3}@supports (color:color-mix(in lab,red,red)){.hover\\:text-error\\/70:hover{color:color-mix(in oklab,var(--color-error)70%,transparent)}}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:block{display:block}.sm\\:flex-row{flex-direction:row}}@media(min-width:48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}}@media(min-width:64rem){.lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}}:root{--bg-base:#09090b;--bg-surface-1:#18181b;--bg-surface-2:#27272a;--bg-surface-3:#3f3f46;--text-primary:#fafafa;--text-secondary:#a1a1aa;--text-muted:#71717a;--accent:#6366f1;--accent-bright:#818cf8;--accent-dim:#3730a3;--border:#27272a;--border-accent:#6366f133;--glass-bg:#18181bb3;--glass-border:#ffffff0d}@media(prefers-color-scheme:light){:root{--bg-base:#fff;--bg-surface-1:#f4f4f5;--bg-surface-2:#e4e4e7;--bg-surface-3:#d4d4d8;--text-primary:#09090b;--text-secondary:#52525b;--text-muted:#71717a;--accent:#4f46e5;--accent-bright:#6366f1;--accent-dim:#e0e7ff;--border:#e4e4e7;--border-accent:#4f46e51a;--glass-bg:#ffffffb3;--glass-border:#0000000d}}::selection{color:var(--color-text-primary);background:#6366f14d}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-bg-surface-3);border-radius:10px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-muted)}body{font-family:var(--font-body);background:var(--color-bg-base);color:var(--color-text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;min-height:100vh;margin:0;line-height:1.6}.glass-card{background:var(--glass-bg);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--glass-border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.subtle-glow{position:relative}.subtle-glow:after{content:"";border-radius:inherit;z-index:-1;pointer-events:none;background:linear-gradient(45deg,#0000,#6366f11a,#0000);position:absolute;inset:-1px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}</style>
|
|
36519
36524
|
</head>
|
|
36520
36525
|
<body>
|
|
36521
36526
|
<div id="root"></div>
|