@devness/useai 0.4.25 → 0.4.27
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 +3 -3
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1905,14 +1905,14 @@ var B={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"
|
|
|
1905
1905
|
*
|
|
1906
1906
|
* This source code is licensed under the ISC license.
|
|
1907
1907
|
* See the LICENSE file in the root directory of this source tree.
|
|
1908
|
-
*/const U=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},l)=>f.createElement("svg",{ref:l,...B,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:I("lucide",i),...s},[...o.map(([e,t])=>f.createElement(e,t)),...Array.isArray(a)?a:[a]])),$=(e,t)=>{const n=f.forwardRef(({className:n,...r},i)=>{return f.createElement(U,{ref:i,iconNode:t,className:I(\`lucide-\${a=e,a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}\`,n),...r});var a});return n.displayName=\`\${e}\`,n},H=$("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),W=$("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),q=$("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Y=$("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),X=$("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),K=$("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Q=$("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]),G=$("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),Z=$("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),
|
|
1908
|
+
*/const U=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},l)=>f.createElement("svg",{ref:l,...B,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:I("lucide",i),...s},[...o.map(([e,t])=>f.createElement(e,t)),...Array.isArray(a)?a:[a]])),$=(e,t)=>{const n=f.forwardRef(({className:n,...r},i)=>{return f.createElement(U,{ref:i,iconNode:t,className:I(\`lucide-\${a=e,a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}\`,n),...r});var a});return n.displayName=\`\${e}\`,n},H=$("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),W=$("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),q=$("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Y=$("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),X=$("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),K=$("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Q=$("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]),G=$("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),Z=$("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),J=$("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),ee=$("MousePointer2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]),te=$("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),ne=$("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),re=$("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),ie=$("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),ae=$("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),oe=$("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);
|
|
1909
1909
|
/**
|
|
1910
1910
|
* @license lucide-react v0.468.0 - ISC
|
|
1911
1911
|
*
|
|
1912
1912
|
* This source code is licensed under the ISC license.
|
|
1913
1913
|
* See the LICENSE file in the root directory of this source tree.
|
|
1914
|
-
*/function oe({health:e,timeContextLabel:t}){return s.jsxs("div",{className:"flex items-center justify-between mb-8",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(H,{className:"w-3 h-3"}),t]})]})]})}const se=f.createContext({});function le(e){const t=f.useRef(null);return null===t.current&&(t.current=e()),t.current}const ue="undefined"!=typeof window,ce=ue?f.useLayoutEffect:f.useEffect,de=f.createContext(null);function fe(e,t){-1===e.indexOf(t)&&e.push(t)}function he(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const pe=(e,t,n)=>n>t?t:n<e?e:n;const me={},ge=e=>/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(e);function ye(e){return"object"==typeof e&&null!==e}const ve=e=>/^0[^.\\s]+$/u.test(e);function be(e){let t;return()=>(void 0===t&&(t=e()),t)}const xe=e=>e,we=(e,t)=>n=>t(e(n)),ke=(...e)=>e.reduce(we),Se=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Ee{constructor(){this.subscriptions=[]}add(e){return fe(this.subscriptions,e),()=>he(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 Te=e=>1e3*e,Ce=e=>e/1e3;function Pe(e,t){return t?e*(1e3/t):0}const Ne=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function je(e,t,n,r){if(e===t&&n===r)return xe;const i=t=>function(e,t,n,r,i){let a,o,s=0;do{o=t+(n-t)/2,a=Ne(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:Ne(i(e),t,r)}const Me=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Le=e=>t=>1-e(1-t),Ae=je(.33,1.53,.69,.99),De=Le(Ae),Re=Me(De),_e=e=>(e*=2)<1?.5*De(e):.5*(2-Math.pow(2,-10*(e-1))),ze=e=>1-Math.sin(Math.acos(e)),Oe=Le(ze),Fe=Me(ze),Ve=je(.42,0,1,1),Ie=je(0,0,.58,1),Be=je(.42,0,.58,1),Ue=e=>Array.isArray(e)&&"number"==typeof e[0],$e={linear:xe,easeIn:Ve,easeInOut:Be,easeOut:Ie,circIn:ze,circInOut:Fe,circOut:Oe,backIn:De,backInOut:Re,backOut:Ae,anticipate:_e},He=e=>{if(Ue(e)){e.length;const[t,n,r,i]=e;return je(t,n,r,i)}return"string"==typeof e?$e[e]:e},We=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function qe(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=We.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=me.useManualTiming?i.timestamp:performance.now();n=!1,me.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:We.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<We.length;t++)o[We[t]].cancel(e)},state:i,steps:o}}const{schedule:Ye,cancel:Xe,state:Ke,steps:Qe}=qe("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:xe,!0);let Ge;function Ze(){Ge=void 0}const Je={now:()=>(void 0===Ge&&Je.set(Ke.isProcessing||me.useManualTiming?Ke.timestamp:performance.now()),Ge),set:e=>{Ge=e,queueMicrotask(Ze)}},et=e=>t=>"string"==typeof t&&t.startsWith(e),tt=et("--"),nt=et("var(--"),rt=e=>!!nt(e)&&it.test(e.split("/*")[0].trim()),it=/var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;function at(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const ot={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},st={...ot,transform:e=>pe(0,1,e)},lt={...ot,default:1},ut=e=>Math.round(1e5*e)/1e5,ct=/-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;const dt=/^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu,ft=(e,t)=>n=>Boolean("string"==typeof n&&dt.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),ht=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,a,o,s]=r.match(ct);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},pt={...ot,transform:e=>Math.round((e=>pe(0,255,e))(e))},mt={test:ft("rgb","red"),parse:ht("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+pt.transform(e)+", "+pt.transform(t)+", "+pt.transform(n)+", "+ut(st.transform(r))+")"};const gt={test:ft("#"),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:mt.transform},yt=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>\`\${t}\${e}\`}),vt=yt("deg"),bt=yt("%"),xt=yt("px"),wt=yt("vh"),kt=yt("vw"),St=(()=>({...bt,parse:e=>bt.parse(e)/100,transform:e=>bt.transform(100*e)}))(),Et={test:ft("hsl","hue"),parse:ht("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+bt.transform(ut(t))+", "+bt.transform(ut(n))+", "+ut(st.transform(r))+")"},Tt={test:e=>mt.test(e)||gt.test(e)||Et.test(e),parse:e=>mt.test(e)?mt.parse(e):Et.test(e)?Et.parse(e):gt.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?mt.transform(e):Et.transform(e),getAnimatableNone:e=>{const t=Tt.parse(e);return t.alpha=0,Tt.transform(t)}},Ct=/(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;const Pt="number",Nt="color",jt=/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 Mt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(jt,e=>(Tt.test(e)?(r.color.push(a),i.push(Nt),n.push(Tt.parse(e))):e.startsWith("var(")?(r.var.push(a),i.push("var"),n.push(e)):(r.number.push(a),i.push(Pt),n.push(parseFloat(e))),++a,"\${}")).split("\${}");return{values:n,split:o,indexes:r,types:i}}function Lt(e){return Mt(e).values}function At(e){const{split:t,types:n}=Mt(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===Pt?ut(e[a]):t===Nt?Tt.transform(e[a]):e[a]}return i}}const Dt=e=>"number"==typeof e?0:Tt.test(e)?Tt.getAnimatableNone(e):e;const Rt={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(ct)?.length||0)+(e.match(Ct)?.length||0)>0},parse:Lt,createTransformer:At,getAnimatableNone:function(e){const t=Lt(e);return At(e)(t.map(Dt))}};function _t(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 zt(e,t){return n=>n>0?t:e}const Ot=(e,t,n)=>e+(t-e)*n,Ft=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Vt=[gt,mt,Et];function It(e){const t=(n=e,Vt.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Et&&(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=_t(s,r,e+1/3),a=_t(s,r,e),o=_t(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 Bt=(e,t)=>{const n=It(e),r=It(t);if(!n||!r)return zt(e,t);const i={...n};return e=>(i.red=Ft(n.red,r.red,e),i.green=Ft(n.green,r.green,e),i.blue=Ft(n.blue,r.blue,e),i.alpha=Ot(n.alpha,r.alpha,e),mt.transform(i))},Ut=new Set(["none","hidden"]);function $t(e,t){return n=>Ot(e,t,n)}function Ht(e){return"number"==typeof e?$t:"string"==typeof e?rt(e)?zt:Tt.test(e)?Bt:Yt:Array.isArray(e)?Wt:"object"==typeof e?Tt.test(e)?Bt:qt:zt}function Wt(e,t){const n=[...e],r=n.length,i=e.map((e,n)=>Ht(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function qt(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=Ht(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Yt=(e,t)=>{const n=Rt.createTransformer(t),r=Mt(e),i=Mt(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?Ut.has(e)&&!i.values.length||Ut.has(t)&&!r.values.length?function(e,t){return Ut.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):ke(Wt(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):zt(e,t)};function Xt(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Ot(e,t,n);return Ht(e)(e,t)}const Kt=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Ye.update(t,e),stop:()=>Xe(t),now:()=>Ke.isProcessing?Ke.timestamp:Je.now()}},Qt=(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)})\`},Gt=2e4;function Zt(e){let t=0;let n=e.next(t);for(;!n.done&&t<Gt;)t+=50,n=e.next(t);return t>=Gt?1/0:t}function Jt(e,t,n){const r=Math.max(t-5,0);return Pe(n-e(r),t-r)}const en=100,tn=10,nn=1,rn=0,an=800,on=.3,sn=.3,ln={granular:.01,default:2},un={granular:.005,default:.5},cn=.01,dn=10,fn=.05,hn=1,pn=.001;function mn({duration:e=an,bounce:t=on,velocity:n=rn,mass:r=nn}){let i,a,o=1-t;o=pe(fn,hn,o),e=pe(cn,dn,Ce(e)),o<1?(i=t=>{const r=t*o,i=r*e,a=r-n,s=yn(t,o),l=Math.exp(-i);return pn-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=yn(Math.pow(t,2),o);return(-i(t)+pn>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<gn;i++)r-=e(r)/t(r);return r}(i,a,5/e);if(e=Te(e),isNaN(s))return{stiffness:en,damping:tn,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*o*Math.sqrt(r*t),duration:e}}}const gn=12;function yn(e,t){return e*Math.sqrt(1-t*t)}const vn=["duration","bounce"],bn=["stiffness","damping","mass"];function xn(e,t){return t.some(t=>void 0!==e[t])}function wn(e=sn,t=on){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:rn,stiffness:en,damping:tn,mass:nn,isResolvedFromDuration:!1,...e};if(!xn(e,bn)&&xn(e,vn))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,a=2*pe(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:nn,stiffness:i,damping:a}}else{const n=mn(e);t={...t,...n,mass:nn},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Ce(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),g=o-a,y=Ce(Math.sqrt(l/c)),v=Math.abs(g)<5;let b;if(r||(r=v?ln.granular:ln.default),i||(i=v?un.granular:un.default),m<1){const e=yn(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?Te(p):Jt(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(Zt(x),Gt),t=Qt(t=>x.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return x}function kn({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=wn({keyframes:[f.value,h(f.value)],velocity:Jt(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 Sn(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||me.mix||Xt,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]||xe:t;n=ke(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=Se(e[r],e[r+1],n);return s[r](i)};return n?t=>u(pe(e[0],e[a-1],t)):u}function En(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Se(0,t,r);e.push(Ot(n,1,i))}}(t,e.length-1),t}function Tn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(He):He(r),a={done:!1,value:t[0]},o=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:En(t),e),s=Sn(o,t,{ease:Array.isArray(i)?i:(l=t,u=i,l.map(()=>u||Be).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}wn.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Zt(r),Gt);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:Ce(i)}}(e,100,wn);return e.ease=t.ease,e.duration=Te(t.duration),e.type="keyframes",e};const Cn=e=>null!==e;function Pn(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(Cn),o=i<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return o&&void 0!==r?r:a[o]}const Nn={decay:kn,inertia:kn,tween:Tn,keyframes:Tn,spring:wn};function jn(e){"string"==typeof e.type&&(e.type=Nn[e.type])}class Mn{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 Ln=e=>e/100;class An extends Mn{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!==Je.now()&&this.tick(Je.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;jn(e);const{type:t=Tn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const s=t||Tn;s!==Tn&&"number"!=typeof o[0]&&(this.mixKeyframes=ke(Ln,Xt(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=Zt(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=pe(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!==kn&&(x.value=Pn(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 Ce(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ce(e)}get time(){return Ce(this.currentTime)}set time(e){e=Te(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(Je.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Ce(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Kt,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(Je.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 Dn=e=>180*e/Math.PI,Rn=e=>{const t=Dn(Math.atan2(e[1],e[0]));return zn(t)},_n={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Rn,rotateZ:Rn,skewX:e=>Dn(Math.atan(e[1])),skewY:e=>Dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zn=e=>((e%=360)<0&&(e+=360),e),On=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Fn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Vn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:On,scaleY:Fn,scale:e=>(On(e)+Fn(e))/2,rotateX:e=>zn(Dn(Math.atan2(e[6],e[5]))),rotateY:e=>zn(Dn(Math.atan2(-e[2],e[0]))),rotateZ:Rn,rotate:Rn,skewX:e=>Dn(Math.atan(e[4])),skewY:e=>Dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function In(e){return e.includes("scale")?1:0}function Bn(e,t){if(!e||"none"===e)return In(t);const n=e.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);let r,i;if(n)r=Vn,i=n;else{const t=e.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);r=_n,i=t}if(!i)return In(t);const a=r[t],o=i[1].split(",").map(Un);return"function"==typeof a?a(o):o[a]}function Un(e){return parseFloat(e.trim())}const $n=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hn=(()=>new Set($n))(),Wn=e=>e===ot||e===xt,qn=new Set(["x","y","z"]),Yn=$n.filter(e=>!qn.has(e));const Xn={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})=>Bn(t,"x"),y:(e,{transform:t})=>Bn(t,"y")};Xn.translateX=Xn.x,Xn.translateY=Xn.y;const Kn=new Set;let Qn=!1,Gn=!1,Zn=!1;function Jn(){if(Gn){const e=Array.from(Kn).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 Yn.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)})}Gn=!1,Qn=!1,Kn.forEach(e=>e.complete(Zn)),Kn.clear()}function er(){Kn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gn=!0)})}class tr{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?(Kn.add(this),Qn||(Qn=!0,Ye.read(er),Ye.resolveKeyframes(Jn))):(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),Kn.delete(this)}cancel(){"scheduled"===this.state&&(Kn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const nr=be(()=>void 0!==window.ScrollTimeline),rr={};function ir(e,t){const n=be(e);return()=>rr[t]??n()}const ar=ir(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),or=([e,t,n,r])=>\`cubic-bezier(\${e}, \${t}, \${n}, \${r})\`,sr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:or([0,.65,.55,1]),circOut:or([.55,0,1,.45]),backIn:or([.31,.01,.66,-.59]),backOut:or([.33,1.53,.69,.99])};function lr(e,t){return e?"function"==typeof e?ar()?Qt(e,t):"ease-out":Ue(e)?or(e):Array.isArray(e)?e.map(e=>lr(e,t)||sr.easeOut):sr[e]:void 0}function ur(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=lr(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 cr(e){return"function"==typeof e&&"applyToOptions"in e}class dr extends Mn{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 cr(e)&&ar()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=ur(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=Pn(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 Ce(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ce(e)}get time(){return Ce(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Te(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&&nr()?(this.animation.timeline=e,xe):t(this)}}const fr={anticipate:_e,backInOut:Re,circInOut:Fe};function hr(e){"string"==typeof e.ease&&e.ease in fr&&(e.ease=fr[e.ease])}class pr extends dr{constructor(e){hr(e),jn(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 An({...a,autoplay:!1}),s=Math.max(10,Je.now()-this.startTime),l=pe(0,10,s-10);t.setWithVelocity(o.sample(Math.max(0,s-l)).value,o.sample(s).value,l),o.stop()}}const mr=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Rt.test(e)&&"0"!==e||e.startsWith("url(")));function gr(e){e.duration=0,e.type="keyframes"}const yr=new Set(["opacity","clipPath","filter","transform"]),vr=be(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class br extends Mn{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=Je.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||tr;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=Je.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=mr(i,t),s=mr(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||cr(n))&&r)}(e,i,a,o)||(!me.instantAnimations&&s||u?.(Pn(e,n,t)),e[0]=e[e.length-1],gr(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 vr()&&n&&yr.has(n)&&("transform"!==n||!u)&&!l&&!r&&"mirror"!==i&&0!==a&&"inertia"!==o}(c),f=c.motionValue?.owner?.current,h=d?new pr({...c,element:f}):new An(c);h.finished.then(()=>{this.notifyFinished()}).catch(xe),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(),Zn=!0,er(),Jn(),Zn=!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 xr(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 wr=/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;function kr(e,t,n=1){const[r,i]=function(e){const t=wr.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 ge(e)?parseFloat(e):e}return rt(i)?kr(i,t,n+1):i}const Sr={type:"spring",stiffness:500,damping:25,restSpeed:10},Er={type:"keyframes",duration:.8},Tr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Cr=(e,{keyframes:t})=>t.length>2?Er:Hn.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Sr:Tr,Pr=e=>null!==e;function Nr(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function jr(e,t){const n=e?.[t]??e?.default??e;return n!==e?Nr(n,e):n}const Mr=(e,t,n,r={},i,a)=>o=>{const s=jr(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u-=Te(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,Cr(e,c)),c.duration&&(c.duration=Te(c.duration)),c.repeatDelay&&(c.repeatDelay=Te(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(gr(c),0===c.delay&&(d=!0)),(me.instantAnimations||me.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,gr(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(Pr);return r[t&&"loop"!==n&&t%2==1?0:r.length-1]}(c.keyframes,s);if(void 0!==e)return void Ye.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new An(c):new br(c)};function Lr(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ar(e,t,n,r){if("function"==typeof t){const[i,a]=Lr(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]=Lr(r);t=t(void 0!==n?n:e.custom,i,a)}return t}function Dr(e,t,n){const r=e.getProps();return Ar(r,t,void 0!==n?n:r.custom,e)}const Rr=new Set(["width","height","top","left","right","bottom",...$n]);class _r{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Je.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=Je.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 Ee);const n=this.events[e].add(t);return"change"===e?()=>{n(),Ye.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=Je.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Pe(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 zr(e,t){return new _r(e,t)}const Or=e=>Array.isArray(e);function Fr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zr(n))}function Vr(e){return Or(e)?e[e.length-1]||0:e}const Ir=e=>Boolean(e&&e.getVelocity);function Br(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Ir(r)&&r.add))return n.add(t);if(!n&&me.WillChange){const n=new me.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function Ur(e){return e.replace(/([A-Z])/g,e=>\`-\${e.toLowerCase()}\`)}const $r="data-"+Ur("framerAppearId");function Hr(e){return e.props[$r]}function Wr({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function qr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t;const l=e.getDefaultTransition();a=a?Nr(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&&Wr(d,f))continue;const i={delay:n,...jr(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=Hr(e);if(t){const e=window.MotionHandoffAnimation(t,f,Ye);null!==e&&(i.startTime=e,l=!0)}}Br(e,f);const h=u??e.shouldReduceMotion;t.start(Mr(f,t,r,h&&Rr.has(f)?{type:!1}:i,e,l));const p=t.animation;p&&c.push(p)}if(o){const t=()=>Ye.update(()=>{o&&function(e,t){const n=Dr(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a)Fr(e,o,Vr(a[o]))}(e,o)});c.length?Promise.all(c).then(t):t()}return c}function Yr(e,t,n={}){const r=Dr(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(qr(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(Yr(l,t,{...o,delay:n+("function"==typeof r?0:r)+xr(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 Xr=e=>t=>t.test(e),Kr=[ot,xt,bt,vt,kt,wt,{test:e=>"auto"===e,parse:e=>e}],Qr=e=>Kr.find(Xr(e));function Gr(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||ve(e))}const Zr=new Set(["brightness","contrast","saturate","opacity"]);function Jr(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ct)||[];if(!r)return e;const i=n.replace(r,"");let a=Zr.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const ei=/\\b([a-z-]*)\\(.*?\\)/gu,ti={...Rt,getAnimatableNone:e=>{const t=e.match(ei);return t?t.map(Jr).join(" "):e}},ni={...ot,transform:Math.round},ri={borderWidth:xt,borderTopWidth:xt,borderRightWidth:xt,borderBottomWidth:xt,borderLeftWidth:xt,borderRadius:xt,borderTopLeftRadius:xt,borderTopRightRadius:xt,borderBottomRightRadius:xt,borderBottomLeftRadius:xt,width:xt,maxWidth:xt,height:xt,maxHeight:xt,top:xt,right:xt,bottom:xt,left:xt,inset:xt,insetBlock:xt,insetBlockStart:xt,insetBlockEnd:xt,insetInline:xt,insetInlineStart:xt,insetInlineEnd:xt,padding:xt,paddingTop:xt,paddingRight:xt,paddingBottom:xt,paddingLeft:xt,paddingBlock:xt,paddingBlockStart:xt,paddingBlockEnd:xt,paddingInline:xt,paddingInlineStart:xt,paddingInlineEnd:xt,margin:xt,marginTop:xt,marginRight:xt,marginBottom:xt,marginLeft:xt,marginBlock:xt,marginBlockStart:xt,marginBlockEnd:xt,marginInline:xt,marginInlineStart:xt,marginInlineEnd:xt,fontSize:xt,backgroundPositionX:xt,backgroundPositionY:xt,...{rotate:vt,rotateX:vt,rotateY:vt,rotateZ:vt,scale:lt,scaleX:lt,scaleY:lt,scaleZ:lt,skew:vt,skewX:vt,skewY:vt,distance:xt,translateX:xt,translateY:xt,translateZ:xt,x:xt,y:xt,z:xt,perspective:xt,transformPerspective:xt,opacity:st,originX:St,originY:St,originZ:xt},zIndex:ni,fillOpacity:st,strokeOpacity:st,numOctaves:ni},ii={...ri,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:ti,WebkitFilter:ti},ai=e=>ii[e];function oi(e,t){let n=ai(e);return n!==ti&&(n=Rt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const si=new Set(["auto","none","0"]);class li extends tr{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(),rt(n))){const r=kr(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Rr.has(n)||2!==e.length)return;const[r,i]=e,a=Qr(r),o=Qr(i);if(at(r)!==at(i)&&Xn[n])this.needsMeasurement=!0;else if(a!==o)if(Wn(a)&&Wn(o))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else Xn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||Gr(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&&!si.has(t)&&Mt(t).values.length&&(r=e[i]),i++}if(r&&n)for(const a of t)e[a]=oi(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=Xn[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]=Xn[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 ui=new Set(["opacity","clipPath","filter","transform"]);function ci(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 di=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function fi(e){return ye(e)&&"offsetHeight"in e}const{schedule:hi}=qe(queueMicrotask,!1),pi={x:!1,y:!1};function mi(){return pi.x||pi.y}function gi(e,t){const n=ci(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function yi(e,t,n={}){const[r,i,a]=gi(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||mi())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 vi=(e,t)=>!!t&&(e===t||vi(e,t.parentElement)),bi=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,xi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const wi=new Set(["INPUT","SELECT","TEXTAREA"]);const ki=new WeakSet;function Si(e){return t=>{"Enter"===t.key&&e(t)}}function Ei(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Ti(e){return bi(e)&&!mi()}const Ci=new WeakSet;function Pi(e,t,n={}){const[r,i,a]=gi(e,n),o=e=>{const r=e.currentTarget;if(!Ti(e))return;if(Ci.has(e))return;ki.add(r),n.stopPropagation&&Ci.add(e);const a=t(r,e),o=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),ki.has(r)&&ki.delete(r),Ti(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||vi(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),fi(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Si(()=>{if(ki.has(n))return;Ei(n,"down");const e=Si(()=>{Ei(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Ei(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),t=e,xi.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function Ni(e){return ye(e)&&"ownerSVGElement"in e}const ji=new WeakMap;let Mi;const Li=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:Ni(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Ai=Li("inline","width","offsetWidth"),Di=Li("block","height","offsetHeight");function Ri({target:e,borderBoxSize:t}){ji.get(e)?.forEach(n=>{n(e,{get width(){return Ai(e,t)},get height(){return Di(e,t)}})})}function _i(e){e.forEach(Ri)}function zi(e,t){Mi||"undefined"!=typeof ResizeObserver&&(Mi=new ResizeObserver(_i));const n=ci(e);return n.forEach(e=>{let n=ji.get(e);n||(n=new Set,ji.set(e,n)),n.add(t),Mi?.observe(e)}),()=>{n.forEach(e=>{const n=ji.get(e);n?.delete(t),n?.size||Mi?.unobserve(e)})}}const Oi=new Set;let Fi;function Vi(e){return Oi.add(e),Fi||(Fi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Oi.forEach(t=>t(e))},window.addEventListener("resize",Fi)),()=>{Oi.delete(e),Oi.size||"function"!=typeof Fi||(window.removeEventListener("resize",Fi),Fi=void 0)}}function Ii(e,t){return"function"==typeof e?Vi(e):zi(e,t)}const Bi=[...Kr,Tt,Rt],Ui=()=>({x:{min:0,max:0},y:{min:0,max:0}}),$i=new WeakMap;function Hi(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Wi(e){return"string"==typeof e||Array.isArray(e)}const qi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yi=["initial",...qi];function Xi(e){return Hi(e.animate)||Yi.some(t=>Wi(e[t]))}function Ki(e){return Boolean(Xi(e)||e.variants)}const Qi={current:null},Gi={current:!1},Zi="undefined"!=typeof window;const Ji=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ea={};function ta(e){ea=e}class na{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=tr,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=Je.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Ye.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=Xi(t),this.isVariantNode=Ki(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]&&Ir(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,$i.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:(Gi.current||function(){if(Gi.current=!0,Zi)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Qi.current=e.matches;e.addEventListener("change",t),t()}else Qi.current=!1}(),this.shouldReduceMotion=Qi.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(),Xe(this.notifyUpdate),Xe(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&&ui.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new dr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Te(o)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=Hn.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Ye.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 ea){const t=ea[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<Ji.length;n++){const t=Ji[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(Ir(i))e.addValue(r,i);else if(Ir(a))e.addValue(r,zr(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,zr(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=zr(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&&(ge(n)||ve(n))?n=parseFloat(n):(r=n,!Bi.find(Xr(r))&&Rt.test(t)&&(n=oi(e,t))),this.setBaseTarget(e,Ir(n)?n.get():n)),Ir(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=Ar(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||Ir(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 Ee),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){hi.render(this.render)}}class ra extends na{constructor(){super(...arguments),this.KeyframeResolver=li}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;Ir(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=\`\${e}\`)}))}}class ia{constructor(e){this.isMounted=!1,this.node=e}update(){}}function aa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function oa(e){return void 0===e||1===e}function sa({scale:e,scaleX:t,scaleY:n}){return!oa(e)||!oa(t)||!oa(n)}function la(e){return sa(e)||ua(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ua(e){return ca(e.x)||ca(e.y)}function ca(e){return e&&"0%"!==e}function da(e,t,n){return n+t*(e-n)}function fa(e,t,n,r,i){return void 0!==i&&(e=da(e,i,r)),da(e,n,r)+t}function ha(e,t=0,n=1,r,i){e.min=fa(e.min,t,n,r,i),e.max=fa(e.max,t,n,r,i)}function pa(e,{x:t,y:n}){ha(e.x,t.translate,t.scale,t.originPoint),ha(e.y,n.translate,n.scale,n.originPoint)}const ma=.999999999999,ga=1.0000000000001;function ya(e,t){e.min=e.min+t,e.max=e.max+t}function va(e,t,n,r,i=.5){ha(e,t,n,Ot(e.min,e.max,i),r)}function ba(e,t){va(e.x,t.x,t.scaleX,t.scale,t.originX),va(e.y,t.y,t.scaleY,t.scale,t.originY)}function xa(e,t){return aa(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 wa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ka=$n.length;function Sa(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(Hn.has(l))o=!0;else if(tt(l))i[l]=e;else{const t=di(e,ri[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<ka;a++){const o=$n[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=di(s,ri[o]);l||(i=!1,r+=\`\${wa[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 Ea(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 Ta(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ca={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!xt.test(e))return e;e=parseFloat(e)}return\`\${Ta(e,t.target.x)}% \${Ta(e,t.target.y)}%\`}},Pa={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Rt.parse(e);if(i.length>5)return r;const a=Rt.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=Ot(s,l,.5);return"number"==typeof i[2+o]&&(i[2+o]/=u),"number"==typeof i[3+o]&&(i[3+o]/=u),a(i)}},Na={borderRadius:{...Ca,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ca,borderTopRightRadius:Ca,borderBottomLeftRadius:Ca,borderBottomRightRadius:Ca,boxShadow:Pa};function ja(e,{layout:t,layoutId:n}){return Hn.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Na[e]||"opacity"===e)}function Ma(e,t,n){const r=e.style,i=t?.style,a={};if(!r)return a;for(const o in r)(Ir(r[o])||i&&Ir(i[o])||ja(o,e)||void 0!==n?.getValue(o)?.liveStyle)&&(a[o]=r[o]);return a}class La extends ra{constructor(){super(...arguments),this.type="html",this.renderInstance=Ea}readValueFromInstance(e,t){if(Hn.has(t))return this.projection?.isProjecting?In(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Bn(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),i=(tt(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return xa(e,t)}build(e,t,n){Sa(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ma(e,t,n)}}const Aa={offset:"stroke-dashoffset",array:"stroke-dasharray"},Da={offset:"strokeDashoffset",array:"strokeDasharray"};const Ra=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function _a(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},l,u,c){if(Sa(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 Ra)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?Aa:Da;e[a.offset]=""+-r,e[a.array]=\`\${t} \${n}\`}(d,i,a,o,!1)}const za=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"]),Oa=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Fa(e,t,n){const r=Ma(e,t,n);for(const i in e)if(Ir(e[i])||Ir(t[i])){r[-1!==$n.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}class Va extends ra{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ui}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Hn.has(t)){const e=ai(t);return e&&e.default||0}return t=za.has(t)?t:Ur(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Fa(e,t,n)}build(e,t,n){_a(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Ea(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(za.has(i)?i:Ur(i),t.attrs[i])}(e,t,0,r)}mount(e){this.isSVGTag=Oa(e.tagName),super.mount(e)}}const Ia=Yi.length;function Ba(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Ba(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Ia;n++){const r=Yi[n],i=e.props[r];(Wi(i)||!1===i)&&(t[r]=i)}return t}function Ua(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 $a=[...qi].reverse(),Ha=qi.length;function Wa(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=>Yr(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=Yr(e,t,n);else{const i="function"==typeof t?Dr(e,t,n.custom):t;r=Promise.all(qr(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function qa(e){let t=Wa(e),n=Ka(),r=!0;const i=t=>(n,r)=>{const i=Dr(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=Ba(e.parent)||{},l=[],u=new Set;let c={},d=1/0;for(let t=0;t<Ha;t++){const f=$a[t],h=n[f],p=void 0!==o[f]?o[f]:s[f],m=Wi(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||Hi(p)||"boolean"==typeof p)continue;if("exit"===f&&h.isActive&&!0!==g){h.prevResolvedValues&&(c={...c,...h.prevResolvedValues});continue}const v=Ya(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},T=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=Or(t)&&Or(n)?!Ua(t,n):t!==n,r?null!=t?T(e):u.add(e):void 0!==t&&u.has(e)?T(e):h.protectedKeys[e]=!0}h.prevProp=p,h.prevResolvedValues=k,h.isActive&&(c={...c,...k}),r&&e.blockInitialAnimation&&(b=!1);const C=y&&v;b&&(!C||x)&&l.push(...w.map(t=>{const n={type:f};if("string"==typeof t&&r&&!C&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,i=Dr(r,t);if(r.enteringChildren&&i){const{delayChildren:t}=i.transition||{};n.delay=xr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof o.initial){const n=Dr(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=Ka()}}}function Ya(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Ua(t,e)}function Xa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ka(){return{animate:Xa(!0),whileInView:Xa(),whileHover:Xa(),whileTap:Xa(),whileDrag:Xa(),whileFocus:Xa(),exit:Xa()}}function Qa(e,t){e.min=t.min,e.max=t.max}function Ga(e,t){Qa(e.x,t.x),Qa(e.y,t.y)}function Za(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ja(e){return e.max-e.min}function eo(e,t,n,r=.5){e.origin=r,e.originPoint=Ot(t.min,t.max,e.origin),e.scale=Ja(n)/Ja(t),e.translate=Ot(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 to(e,t,n,r){eo(e.x,t.x,n.x,r?r.originX:void 0),eo(e.y,t.y,n.y,r?r.originY:void 0)}function no(e,t,n){e.min=n.min+t.min,e.max=e.min+Ja(t)}function ro(e,t,n){e.min=t.min-n.min,e.max=e.min+Ja(t)}function io(e,t,n){ro(e.x,t.x,n.x),ro(e.y,t.y,n.y)}function ao(e,t,n,r,i){return e=da(e-=t,1/n,r),void 0!==i&&(e=da(e,1/i,r)),e}function oo(e,t,[n,r,i],a,o){!function(e,t=0,n=1,r=.5,i,a=e,o=e){bt.test(t)&&(t=parseFloat(t),t=Ot(o.min,o.max,t/100)-o.min);if("number"!=typeof t)return;let s=Ot(a.min,a.max,r);e===a&&(s-=t),e.min=ao(e.min,t,n,s,i),e.max=ao(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,a,o)}const so=["x","scaleX","originX"],lo=["y","scaleY","originY"];function uo(e,t,n,r){oo(e.x,t,so,n?n.x:void 0,r?r.x:void 0),oo(e.y,t,lo,n?n.y:void 0,r?r.y:void 0)}function co(e){return 0===e.translate&&1===e.scale}function fo(e){return co(e.x)&&co(e.y)}function ho(e,t){return e.min===t.min&&e.max===t.max}function po(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function mo(e,t){return po(e.x,t.x)&&po(e.y,t.y)}function go(e){return Ja(e.x)/Ja(e.y)}function yo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function vo(e){return[e("x"),e("y")]}const bo=["TopLeft","TopRight","BottomLeft","BottomRight"],xo=bo.length,wo=e=>"string"==typeof e?parseFloat(e):e,ko=e=>"number"==typeof e||xt.test(e);function So(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Eo=Co(0,.5,Oe),To=Co(.5,.95,xe);function Co(e,t,n){return r=>r<e?0:r>t?1:n(Se(e,t,r))}function Po(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const No=(e,t)=>e.depth-t.depth;class jo{constructor(){this.children=[],this.isDirty=!1}add(e){fe(this.children,e),this.isDirty=!0}remove(e){he(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(No),this.isDirty=!1,this.children.forEach(e)}}function Mo(e){return Ir(e)?e.get():e}class Lo{constructor(){this.members=[]}add(e){fe(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&&he(this.members,n)}e.scheduleRender()}remove(e){if(he(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 Ao={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Do=["","X","Y","Z"];let Ro=0;function _o(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function zo(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Hr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ye,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&zo(r)}function Oo({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Ro++,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(Io),this.nodes.forEach(Yo),this.nodes.forEach(Xo),this.nodes.forEach(Bo)},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 jo)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Ee),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=Ni(t)&&!(Ni(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;Ye.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=Je.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Xe(r),e(a-t))};return Ye.setup(r,!0),()=>Xe(r)}(i,250),Ao.hasAnimatedSinceResize&&(Ao.hasAnimatedSinceResize=!1,this.nodes.forEach(qo)))})}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()||es,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!mo(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={...jr(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||qo(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(),Xe(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(Ko),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&&zo(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($o);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Ho);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wo),this.nodes.forEach(Fo),this.nodes.forEach(Vo)):this.nodes.forEach(Ho),this.clearAllSnapshots();const e=Je.now();Ke.delta=pe(0,1e3/60,e-Ke.timestamp),Ke.timestamp=e,Ke.isProcessing=!0,Qe.update.process(Ke),Qe.preRender.process(Ke),Qe.render.process(Ke),Ke.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Uo),this.sharedNodes.forEach(Qo)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ye.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ye.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ja(this.snapshot.measuredBox.x)||Ja(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&&!fo(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||la(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)),rs((r=n).x),rs(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(as))){const{scroll:e}=this.root;e&&(ya(t.x,e.offset.x),ya(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(Ga(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&&Ga(t,e),ya(t.x,i.offset.x),ya(t.y,i.offset.y))}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ga(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&&ba(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),la(e.latestValues)&&ba(n,e.latestValues)}return la(this.latestValues)&&ba(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Ga(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!la(e.latestValues))continue;sa(e.latestValues)&&e.updateSnapshot();const r=Ui();Ga(r,e.measurePageBox()),uo(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return la(this.latestValues)&&uo(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!==Ke.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=Ke.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,no(o.x,s.x,l.x),no(o.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ga(this.target,this.layout.layoutBox),pa(this.target,this.targetDelta)):Ga(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&&!sa(this.parent.latestValues)&&!ua(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}},io(this.relativeTargetOrigin,t,n),Ga(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===Ke.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;Ga(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&&ba(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,pa(e,o)),r&&la(a.latestValues)&&ba(e,a.latestValues))}t.x<ga&&t.x>ma&&(t.x=1),t.y<ga&&t.y>ma&&(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?(Za(this.prevProjectionDelta.x,this.projectionDelta.x),Za(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),to(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&yo(this.projectionDelta.x,this.prevProjectionDelta.x)&&yo(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(Jo));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,h,p,m,g;Go(a.x,e.x,n),Go(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(io(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,m=o,g=n,Zo(h.x,p.x,m.x,g),Zo(h.y,p.y,m.y,g),d&&(l=this.relativeTarget,f=d,ho(l.x,f.x)&&ho(l.y,f.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Ga(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,n,r,i,a){i?(e.opacity=Ot(0,n.opacity??1,Eo(r)),e.opacityExit=Ot(t.opacity??1,0,To(r))):a&&(e.opacity=Ot(t.opacity??1,n.opacity??1,r));for(let o=0;o<xo;o++){const i=\`border\${bo[o]}Radius\`;let a=So(t,i),s=So(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||ko(a)===ko(s)?(e[i]=Math.max(Ot(wo(a),wo(s),r),0),(bt.test(s)||bt.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Ot(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&&(Xe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ye.update(()=>{Ao.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=zr(0)),this.currentAnimation=function(e,t,n){const r=Ir(e)?e:zr(e);return r.start(Mr("",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&&is(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Ja(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ja(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Ga(t,n),ba(t,i),to(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Lo);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&&_o("z",e,r,this.animationValues);for(let i=0;i<Do.length;i++)_o(\`rotate\${Do[i]}\`,e,r,this.animationValues),_o(\`skew\${Do[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=Mo(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=Mo(t?.pointerEvents)||""),void(this.hasProjected&&!la(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 Na){if(void 0===i[l])continue;const{correct:t,applyTo:n,isCSSVariable:o}=Na[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?Mo(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach($o),this.root.sharedNodes.clear()}}}function Fo(e){e.updateLayout()}function Vo(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?vo(e=>{const r=a?t.measuredBox[e]:t.layoutBox[e],i=Ja(r);r.min=n[e].min,r.max=r.min+i}):is(i,t.layoutBox,n)&&vo(r=>{const i=a?t.measuredBox[r]:t.layoutBox[r],o=Ja(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}};to(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?to(s,e.applyTransform(r,!0),t.measuredBox):to(s,n,t.layoutBox);const l=!fo(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}};io(o,t.layoutBox,i.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};io(s,n,a.layoutBox),mo(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 Io(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 Bo(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Uo(e){e.clearSnapshot()}function $o(e){e.clearMeasurements()}function Ho(e){e.isLayoutDirty=!1}function Wo(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Yo(e){e.resolveTargetDelta()}function Xo(e){e.calcProjection()}function Ko(e){e.resetSkewAndRotation()}function Qo(e){e.removeLeadSnapshot()}function Go(e,t,n){e.translate=Ot(t.translate,0,n),e.scale=Ot(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zo(e,t,n,r){e.min=Ot(t.min,n.min,r),e.max=Ot(t.max,n.max,r)}function Jo(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const es={duration:.45,ease:[.4,0,.1,1]},ts=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ns=ts("applewebkit/")&&!ts("chrome/")?Math.round:xe;function rs(e){e.min=ns(e.min),e.max=ns(e.max)}function is(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=go(t),i=go(n),a=.2,!(Math.abs(r-i)<=a));var r,i,a}function as(e){return e!==e.root&&e.scroll?.wasRoot}const os=Oo({attachResizeListener:(e,t)=>Po(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ss={current:void 0},ls=Oo({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ss.current){const e=new os({});e.mount(window),e.setOptions({layoutScroll:!0}),ss.current=e}return ss.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),us=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function cs(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ds(...e){return f.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=cs(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():cs(e[t],null)}}}}(...e),e)}class fs 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=fi(e)&&e.offsetWidth||0,r=fi(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 hs({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(us),d=e.props?.ref??e?.ref,h=ds(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(fs,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:!1===a?e:f.cloneElement(e,{ref:h})})}const ps=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:l,anchorY:u,root:c})=>{const d=le(ms),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(hs,{pop:"popLayout"===o,isPresent:n,anchorX:l,anchorY:u,root:c,children:e}),s.jsx(de.Provider,{value:m,children:e})};function ms(){return new Map}function gs(e=!0){const t=f.useContext(de);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 ys=e=>e.key||"";function vs(e){const t=[];return f.Children.forEach(e,e=>{f.isValidElement(e)&&t.push(e)}),t}const bs=({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]=gs(o),p=f.useMemo(()=>vs(e),[e]),m=o&&!d?[]:p.map(ys),g=f.useRef(!0),y=f.useRef(p),v=le(()=>new Map),b=f.useRef(new Set),[x,w]=f.useState(p),[k,S]=f.useState(p);ce(()=>{g.current=!1,y.current=p;for(let e=0;e<k.length;e++){const t=ys(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=ys(n);m.includes(r)||(e.splice(t,0,n),E.push(n))}return"wait"===a&&E.length&&(e=E),S(vs(e)),w(p),null}const{forceRender:T}=f.useContext(se);return s.jsx(s.Fragment,{children:k.map(e=>{const f=ys(e),x=!(o&&!d)&&(p===k||m.includes(f));return s.jsx(ps,{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&&(T?.(),S(y.current),o&&h?.(),r&&r())},anchorX:l,anchorY:u,children:e},f)})})},xs=f.createContext({strict:!1}),ws={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 ks=!1;function Ss(){return function(){if(ks)return;const e={};for(const t in ws)e[t]={isEnabled:e=>ws[t].some(t=>!!e[t])};ta(e),ks=!0}(),ea}const Es=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 Ts(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Es.has(e)}let Cs=e=>!Ts(e);try{"function"==typeof(Ps=require("@emotion/is-prop-valid").default)&&(Cs=e=>e.startsWith("on")?!Ts(e):Ps(e))}catch{}var Ps;const Ns=f.createContext({});function js(e){const{initial:t,animate:n}=function(e,t){if(Xi(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Wi(t)?t:void 0,animate:Wi(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,f.useContext(Ns));return f.useMemo(()=>({initial:t,animate:n}),[Ms(t),Ms(n)])}function Ms(e){return Array.isArray(e)?e.join(" "):e}const Ls=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function As(e,t,n){for(const r in t)Ir(t[r])||ja(r,n)||(e[r]=t[r])}function Ds(e,t){const n={};return As(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Sa(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function Rs(e,t){const n={},r=Ds(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 _s=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function zs(e,t,n,r){const i=f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return _a(n,t,Oa(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};As(t,e.style,e),i.style={...t,...i.style}}return i}const Os=["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 Fs(e){return"string"==typeof e&&!e.includes("-")&&!!(Os.indexOf(e)>-1||/[A-Z]/u.test(e))}function Vs(e,t,n,{latestValues:r},i,a=!1,o){const s=(o??Fs(e)?zs:Rs)(t,r,i,e),l=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(Cs(i)||!0===n&&Ts(i)||!t&&!Ts(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(()=>Ir(c)?c.get():c,[c]);return f.createElement(e,{...u,children:d})}function Is(e,t,n,r){const i={},a=r(e,{});for(const f in a)i[f]=Mo(a[f]);let{initial:o,animate:s}=e;const l=Xi(e),u=Ki(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&&!Hi(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Ar(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 Bs=e=>(t,n)=>{const r=f.useContext(Ns),i=f.useContext(de),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Is(n,r,i,e),renderState:t()}}(e,t,r,i);return n?a():le(a)},Us=Bs({scrapeMotionValuesFromProps:Ma,createRenderState:Ls}),$s=Bs({scrapeMotionValuesFromProps:Fa,createRenderState:_s}),Hs=Symbol.for("motionComponentSymbol");function Ws(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 qs=f.createContext({});function Ys(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Xs(e,t,n,r,i,a){const{visualElement:o}=f.useContext(Ns),s=f.useContext(xs),l=f.useContext(de),u=f.useContext(us),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(qs);!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:Ks(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:Boolean(o)||s&&Ys(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[$r],b=f.useRef(Boolean(v)&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return ce(()=>{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 Ks(e){if(e)return!1!==e.options.allowProjection?e.projection:Ks(e.parent)}function Qs(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&function(e){const t=Ss();for(const n in e)t[n]={...t[n],...e[n]};ta(t)}(r);const a=n?"svg"===n:Fs(e),o=a?$s:Us;function l(n,r){let l;const u={...f.useContext(us),...n,layoutId:Gs(n)},{isStatic:c}=u,d=js(n),h=o(n,c);if(!c&&ue){f.useContext(xs).strict;const t=function(e){const t=Ss(),{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=Xs(e,h,u,i,t.ProjectionNode,a)}return s.jsxs(Ns.Provider,{value:d,children:[l&&d.visualElement?s.jsx(l,{visualElement:d.visualElement,...u}):null,Vs(e,n,Ws(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[Hs]=e,u}function Gs({layoutId:e}){const t=f.useContext(se).id;return t&&void 0!==e?t+"-"+e:e}function Zs(e,t){if("undefined"==typeof Proxy)return Qs;const n=new Map,r=(n,r)=>Qs(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>"create"===a?r:(n.has(a)||n.set(a,Qs(a,void 0,e,t)),n.get(a))})}const Js=(e,t)=>t.isSVG??Fs(e)?new Va(t):new La(t,{allowProjection:e!==f.Fragment});let el=0;const tl={animation:{Feature:class extends ia{constructor(e){super(e),e.animationState||(e.animationState=qa(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Hi(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 ia{constructor(){super(...arguments),this.id=el++}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 nl(e){return{point:{x:e.pageX,y:e.pageY}}}function rl(e,t,n,r){return Po(e,t,(e=>t=>bi(t)&&e(t,nl(t)))(n),r)}const il=({current:e})=>e?e.ownerDocument.defaultView:null,al=(e,t)=>Math.abs(e-t);const ol=new Set(["auto","scroll"]);class sl{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=cl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=al(e.x,t.x),r=al(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}=Ke;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=ll(t,this.transformPagePoint),Ye.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=cl("pointercancel"===e.type?this.lastMoveEventInfo:ll(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!bi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const s=ll(nl(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=Ke;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,cl(s,this.history)),this.removeListeners=ke(rl(this.contextWindow,"pointermove",this.handlePointerMove),rl(this.contextWindow,"pointerup",this.handlePointerUp),rl(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(ol.has(e.overflowX)||ol.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),Ye.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Xe(this.updatePoint)}}function ll(e,t){return t?{point:t(e.point)}:e}function ul(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cl({point:e},t){return{point:e,delta:ul(e,fl(t)),offset:ul(e,dl(t)),velocity:hl(t,.1)}}function dl(e){return e[0]}function fl(e){return e[e.length-1]}function hl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=fl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Te(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>2*Te(t)&&(r=e[1]);const a=Ce(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 pl(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 ml(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 gl=.35;function yl(e,t,n){return{min:vl(e,t),max:vl(e,n)}}function vl(e,t){return"number"==typeof e?e:e[t]||0}const bl=new WeakMap;class xl{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 sl(e,{onSessionStart:e=>{t&&this.snapToCursor(nl(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?pi[a]?null:(pi[a]=!0,()=>{pi[a]=!1}):pi.x||pi.y?null:(pi.x=pi.y=!0,()=>{pi.x=pi.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),vo(e=>{let t=this.getAxisMotionValue(e).get()||0;if(bt.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Ja(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&Ye.update(()=>i(e,t),!1,!0),Br(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&&Ye.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:il(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&&Ye.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||!kl(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?Ot(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Ot(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&&Ys(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:pl(e.x,n,i),y:pl(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=gl){return!1===e?e=0:!0===e&&(e=gl),{x:yl(e,"left","right"),y:yl(e,"top","bottom")}}(t),r!==this.constraints&&!Ys(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&vo(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||!Ys(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=xa(e,n),{scroll:i}=t;return i&&(ya(r.x,i.offset.x),ya(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:ml(e.x,t.x),y:ml(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=aa(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},l=vo(o=>{if(!kl(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 Br(this.visualElement,e),n.start(Mr(e,n,0,t,this.visualElement,!1))}stopAnimation(){vo(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){vo(t=>{const{drag:n}=this.getProps();if(!kl(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]-Ot(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ys(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};vo(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=Ja(e),i=Ja(t);return i>r?n=Se(t.min,t.max-r,e.min):r>i&&(n=Se(e.min,e.max-i,t.min)),pe(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(),vo(t=>{if(!kl(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Ot(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;bl.set(this.visualElement,this);const e=this.visualElement.current,t=rl(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&function(e){return wi.has(e.tagName)||!0===e.isContentEditable}(i);n&&r&&!a&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Ys(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=Ii(e,wl(n)),i=Ii(t,wl(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()),Ye.read(r);const o=Po(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(vo(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=gl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function wl(e){let t=!0;return()=>{t?t=!1:e()}}function kl(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Sl=e=>(t,n)=>{e&&Ye.update(()=>e(t,n),!1,!0)};let El=!1;class Tl 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),El&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ao.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}),El=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Ye.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),hi.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;El=!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 Cl(e){const[t,n]=gs(),r=f.useContext(se);return s.jsx(Tl,{...e,layoutGroup:r,switchLayoutGroup:f.useContext(qs),isPresent:t,safeToRemove:n})}const Pl={pan:{Feature:class extends ia{constructor(){super(...arguments),this.removePointerDownListener=xe}onPointerDown(e){this.session=new sl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:il(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Sl(e),onStart:Sl(t),onMove:Sl(n),onEnd:(e,t)=>{delete this.session,r&&Ye.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=rl(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 ia{constructor(e){super(e),this.removeGroupControls=xe,this.removeListeners=xe,this.controls=new xl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xe}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:ls,MeasureLayout:Cl}};function Nl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&Ye.postRender(()=>i(t,nl(t)))}function jl(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&&Ye.postRender(()=>i(t,nl(t)))}const Ml=new WeakMap,Ll=new WeakMap,Al=e=>{const t=Ml.get(e.target);t&&t(e)},Dl=e=>{e.forEach(Al)};function Rl(e,t,n){const r=function({root:e,...t}){const n=e||document;Ll.has(n)||Ll.set(n,{});const r=Ll.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Dl,{root:e,...t})),r[i]}(t);return Ml.set(e,n),r.observe(e),()=>{Ml.delete(e),r.unobserve(e)}}const _l={some:0,all:1};const zl=Zs({...tl,...{inView:{Feature:class extends ia{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:_l[r]};return Rl(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 ia{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Pi(e,(e,t)=>(jl(this.node,t,"Start"),(e,{success:t})=>jl(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends ia{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=ke(Po(this.node.current,"focus",()=>this.onFocus()),Po(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ia{mount(){const{current:e}=this.node;e&&(this.unmount=yi(e,(e,t)=>(Nl(this.node,t,"Start"),e=>Nl(this.node,e,"End"))))}unmount(){}}}},...Pl,...{layout:{ProjectionNode:ls,MeasureLayout:Cl}}},Js);function Ol({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(zl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:a},className:"flex-1 min-w-[140px] p-4 rounded-xl bg-bg-surface-1 border border-border/50 flex flex-col gap-2 group hover:border-accent/30 transition-all duration-300",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"p-2 rounded-lg bg-bg-surface-2 group-hover:bg-accent/10 transition-colors",children:s.jsx(i,{className:"w-4 h-4 text-text-muted group-hover:text-accent transition-colors"})}),s.jsx("span",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider",children:e})]}),s.jsxs("div",{className:"flex items-baseline gap-1 mt-1",children:[s.jsx("span",{ref:o,className:"text-2xl font-bold text-text-primary tracking-tight",children:r>0?t.toFixed(r):t}),n&&s.jsx("span",{className:"text-xs text-text-muted font-medium",children:n})]})]})}function Fl({totalHours:e,totalSessions:t,currentStreak:n,filesTouched:r}){return s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[s.jsx(Ol,{label:"Total Time",value:e,suffix:"hrs",decimals:1,icon:K,delay:.1}),s.jsx(Ol,{label:"Sessions",value:t,icon:J,delay:.2}),s.jsx(Ol,{label:"Streak",value:n,suffix:"days",icon:ae,delay:.3}),s.jsx(Ol,{label:"Files",value:r,icon:Q,delay:.4})]})}const Vl={"claude-code":"#d4a04a",cursor:"#00b4d8",copilot:"#6e40c9",windsurf:"#38bdf8","github-copilot":"#6e40c9",aider:"#4ade80",continue:"#f97316",cody:"#ff6b6b",tabby:"#a78bfa",roo:"#f472b6"},Il={"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"},Bl={"claude-code":"CC",cursor:"Cu",copilot:"CP",windsurf:"WS","github-copilot":"CP",aider:"Ai",continue:"Co",cody:"Cy",tabby:"Tb",roo:"Ro"},Ul={feature:"#4ade80",bugfix:"#f87171",refactor:"#a78bfa",test:"#38bdf8",docs:"#fbbf24",setup:"#6b655c",deployment:"#f97316",other:"#9c9588"};function $l(e){const t=e/3600;return t<.1?\`\${t.toFixed(2)}h\`:\`\${t.toFixed(1)}h\`}function Hl(e,t){return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,t)}function Wl({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 ql({stats:e}){const t=Hl(e.byClient,4),n=Hl(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(Wl,{label:"Top Clients",children:t.map(([e,t])=>{const n=Vl[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:$l(t),children:[Il[e]??e,s.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:$l(t)})]},e)})}),n.length>0&&s.jsx(Wl,{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:$l(t),children:[e,s.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:$l(t)})]},e))})]})}function Yl({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 Xl({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(Boolean))].sort(),[e]);return r.length>0||i.length>0||a.length>0?s.jsxs("div",{className:"flex flex-col gap-3 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 px-1",children:[s.jsx(G,{className:"w-3.5 h-3.5 text-text-muted"}),s.jsx("span",{className:"text-[10px] font-bold text-text-muted uppercase tracking-widest",children:"Filters"})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-1",children:[s.jsx(Yl,{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(Yl,{label:Il[e]??e,active:t.client===e,onClick:()=>n("client",t.client===e?"all":e)},e)),i.map(e=>s.jsx(Yl,{label:e,active:t.language===e,onClick:()=>n("language",t.language===e?"all":e)},e)),a.map(e=>s.jsx(Yl,{label:e,active:t.project===e,onClick:()=>n("project",t.project===e?"all":e)},e))]})]}):null}function Kl(e,t){const n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0});return\`\${n(e)} \u2014 \${n(t)}\`}function Ql(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 Gl={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 Zl({category:e}){const t=Gl[e]??"bg-bg-surface-2 text-text-secondary border-border";return s.jsx("span",{className:\`text-[10px] px-2 py-0.5 rounded-full border font-medium uppercase tracking-wider \${t}\`,children:e})}function Jl({session:e,milestones:t,defaultExpanded:n=!1}){const[r,i]=f.useState(n),a=Vl[e.client]??"#91919a",o=Bl[e.client]??e.client.slice(0,2).toUpperCase(),l=t.length>0;return s.jsxs("div",{className:"mb-1.5 rounded-lg border transition-all duration-200 "+(r?"bg-bg-surface-1 border-border-accent":"bg-bg-surface-1/30 border-border hover:border-border-accent/50"),children:[s.jsxs("button",{className:"w-full flex items-center gap-3 px-3 py-2 text-left",onClick:()=>l&&i(!r),style:{cursor:l?"pointer":"default"},children:[s.jsx("div",{className:"w-8 h-8 rounded-md flex items-center justify-center text-[11px] font-bold font-mono flex-shrink-0",style:{backgroundColor:\`\${a}15\`,color:a,border:\`1px solid \${a}20\`},children:o}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-bold text-text-primary truncate",children:e.project||"Untitled"}),s.jsx("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-1.5 rounded uppercase tracking-tighter",children:e.client})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-text-muted font-medium mt-0.5",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(K,{className:"w-3.5 h-3.5 opacity-70"}),Ql(e.duration_seconds)]}),s.jsx("span",{className:"text-[10px] opacity-60 font-mono",children:Kl(e.started_at,e.ended_at).split(" \u2014 ")[0]})]})]}),s.jsxs("div",{className:"hidden sm:flex items-center gap-2 mr-1",children:[e.languages.length>0&&s.jsx("span",{className:"text-[10px] font-mono text-text-muted/70 bg-bg-surface-2/50 px-1.5 py-0.5 rounded",children:e.languages[0]}),l&&s.jsx("span",{className:"text-[10px] font-bold text-accent/80 bg-accent/5 px-2 py-0.5 rounded border border-accent/10",children:t.length})]}),l&&s.jsx("div",{className:"transition-transform duration-200 "+(r?"rotate-180 text-accent":"text-text-muted"),children:s.jsx(q,{className:"w-4 h-4"})})]}),s.jsx(bs,{children:r&&l&&s.jsx(zl.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/30 mb-2 mx-1"}),t.map(e=>{const t=!!e.private_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-3 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:Ul[e.category]??"#9c9588"}}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-text-secondary group-hover:text-text-primary truncate",children:t}),s.jsx(Zl,{category:e.category})]})}),n&&s.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:n})]},e.id)})]})})})]})}function eu({sessions:e,milestones:t,filters:n}){const r=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]),i=f.useMemo(()=>"all"===n.category?t:t.filter(e=>e.category===n.category),[t,n.category]),a=f.useMemo(()=>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}(r,i),[r,i]);return 0===a.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 mb-4",children:a.map((e,t)=>s.jsx(Jl,{session:e.session,milestones:e.milestones,defaultExpanded:0===t&&e.milestones.length>0},e.session.session_id))})}function tu({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(zl.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(zl.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 nu(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 ru({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 _("/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(ie,{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: ",nu(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(te,{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 _("/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 _("/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(re,{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(Z,{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 iu=N();const au={"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"})}};function ou(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 su({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=au[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),T=f.useRef(e);return f.useEffect(()=>{S&&Math.abs(e-T.current)>1e3&&E(null),T.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:Ul[e.milestone.category]??"#9c9588",boxShadow:\`0 0 10px \${Ul[e.milestone.category]}50\`}})},n))]})]}),S&&iu.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(lu,{session:S.data}):s.jsx(uu,{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 lu({session:e}){const t=Il[e.client]??e.client;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:ou(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:e.project||"Untitled Project"}),s.jsx("div",{className:"text-text-secondary capitalize text-[10px]",children:e.task_type})]})}function uu({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:Ul[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 cu={"15m":9e5,"30m":18e5,"1h":36e5,"12h":432e5,"24h":864e5},du={"15m":"15 Minutes","30m":"30 Minutes","1h":"1 Hour","12h":"12 Hours","24h":"24 Hours"};function fu(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 hu=["15m","30m","1h","12h","24h"];function pu({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=fu(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=fu(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(K,{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(ee,{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(W,{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:hu.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:du[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(ne,{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(-cu[n]),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors",title:\`Back \${du[n]}\`,children:s.jsx(Y,{className:"w-4 h-4"})}),s.jsx("button",{onClick:()=>k(cu[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 \${du[n]}\`,disabled:o||c>=Date.now()-1e3,children:s.jsx(X,{className:"w-4 h-4"})})]})]})]})]}),s.jsx(su,{value:c,onChange:w,scale:n,sessions:i,milestones:a})]})}function mu(){const{sessions:e,milestones:t,config:n,health:r,loading:i,timeTravelTime:a,timeScale:o,filters:l,loadAll:u,loadHealth:c,setTimeTravelTime:d,setTimeScale:h,setFilter:p}=O();f.useEffect(()=>{u(),c()},[u,c]),f.useEffect(()=>{const e=setInterval(c,3e4);if(null!==a)return()=>clearInterval(e);const t=setInterval(u,3e4);return()=>{clearInterval(e),clearInterval(t)}},[a,u,c]);const m=null===a,g=a??Date.now(),y=z[o]/2,v=g-y,b=g+y,x=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,v,b),[e,v,b]),w=f.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=new Date(e.created_at).getTime();return r>=t&&r<=n})}(t,v,b),[t,v,b]),k=f.useMemo(()=>function(e){let t=0,n=0;const r={},i={},a={},o={};for(const s of e){t+=s.duration_seconds,n+=s.files_touched,r[s.client]=(r[s.client]??0)+s.duration_seconds;for(const e of s.languages)i[e]=(i[e]??0)+s.duration_seconds;a[s.task_type]=(a[s.task_type]??0)+s.duration_seconds,s.project&&(o[s.project]=(o[s.project]??0)+s.duration_seconds)}return{totalHours:t/3600,totalSessions:e.length,currentStreak:V(e),filesTouched:n,byClient:r,byLanguage:i,byTaskType:a,byProject:o}}(x),[x]),S=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"})}(v,b,m),[v,b,m]),E=f.useMemo(()=>{if(!m)return new Date(g).toISOString().slice(0,10)},[m,g]);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-10",children:[s.jsx(oe,{health:r,timeContextLabel:S}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(pu,{value:a,onChange:d,scale:o,onScaleChange:h,sessions:e,milestones:t}),s.jsx(Fl,{totalHours:k.totalHours,totalSessions:k.totalSessions,currentStreak:k.currentStreak,filesTouched:k.filesTouched}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-8",children:s.jsxs("div",{children:[s.jsx(ql,{stats:k}),s.jsx(Xl,{sessions:x,filters:l,onFilterChange:p}),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("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[x.length," Sessions"]})]}),s.jsx(eu,{sessions:x,milestones:w,filters:l})]})]})}),s.jsx("div",{className:"mt-12",children:s.jsx(tu,{sessions:e,timeScale:o,effectiveTime:g,isLive:m,onDayClick:e=>{const t=new Date(\`\${e}T12:00:00\`).getTime();d(t),h("24h")},highlightDate:E})}),s.jsx(ru,{config:n,onRefresh:u})]})]})})}M.createRoot(document.getElementById("root")).render(s.jsx(f.StrictMode,{children:s.jsx(mu,{})}));</script>
|
|
1915
|
-
<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-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-bold:700;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--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:#09090b;--color-bg-surface-1:#18181b;--color-bg-surface-2:#27272a;--color-bg-surface-3:#3f3f46;--color-text-primary:#fafafa;--color-text-secondary:#a1a1aa;--color-text-muted:#71717a;--color-accent:#6366f1;--color-accent-bright:#818cf8;--color-border:#27272a;--color-border-accent:#6366f133;--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}.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)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-1\\.5{bottom:calc(var(--spacing)*-1.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-3{bottom:calc(var(--spacing)*3)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.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-auto{margin-inline:auto}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-12{margin-top:calc(var(--spacing)*12)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.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-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.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-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-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-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-8{width:calc(var(--spacing)*8)}.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%}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[1000px\\]{max-width:1000px}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[140px\\]{min-width:140px}.min-w-\\[180px\\]{min-width:180px}.flex-1{flex:1}.flex-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))}.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-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}.gap-\\[3px\\]{gap:3px}: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-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)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.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-color:var(--color-accent)}.border-accent\\/10{border-color:#6366f11a}@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:#6366f133}@supports (color:color-mix(in lab,red,red)){.border-accent\\/20{border-color:color-mix(in oklab,var(--color-accent)20%,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-border{border-color:var(--color-border)}.border-border-accent{border-color:var(--color-border-accent)}.border-border\\/30{border-color:#27272a4d}@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:#27272a80}@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:#27272a99}@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-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-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-text-muted\\/20{border-color:#71717a33}@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{background-color:var(--color-accent)}.bg-accent\\/5{background-color:#6366f10d}@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:#6366f11a}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/10{background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.bg-bg-base{background-color:var(--color-bg-base)}.bg-bg-surface-1{background-color:var(--color-bg-surface-1)}.bg-bg-surface-1\\/30{background-color:#18181b4d}@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:#18181b66}@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:#18181b80}@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:#18181bcc}@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{background-color:var(--color-bg-surface-2)}.bg-bg-surface-2\\/50{background-color:#27272a80}@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-3{background-color:var(--color-bg-surface-3)}.bg-bg-surface-3\\/95{background-color:#3f3f46f2}@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-border\\/30{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.bg-border\\/30{background-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.bg-border\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-border\\/50{background-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.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-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-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-text-muted\\/10{background-color:#71717a1a}@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-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))}.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-5{padding-block:calc(var(--spacing)*5)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pl-3{padding-left:calc(var(--spacing)*3)}.text-center{text-align:center}.text-left{text-align:left}.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-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.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)}.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{color:var(--color-accent)}.text-accent\\/80{color:#6366f1cc}@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-text-muted{color:var(--color-text-muted)}.text-text-muted\\/70{color:#71717ab3}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/70{color:color-mix(in oklab,var(--color-text-muted)70%,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-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_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-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-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:#6366f133}@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 *){background-color:var(--color-accent)}.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:#6366f11a}@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 *){opacity:1}}.selection\\:bg-accent\\/30 ::selection{background-color:#6366f14d}@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:#6366f14d}@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:#71717a80}@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:#6366f180}@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:#6366f180}@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:#6366f14d}@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:#6366f166}@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-border-accent\\/50:hover{border-color:#6366f11a}@supports (color:color-mix(in lab,red,red)){.hover\\:border-border-accent\\/50:hover{border-color:color-mix(in oklab,var(--color-border-accent)50%,transparent)}}.hover\\:border-text-muted\\/50:hover{border-color:#71717a80}@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-2:hover{background-color:var(--color-bg-surface-2)}.hover\\:bg-bg-surface-2\\/40:hover{background-color:#27272a66}@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:#27272a80}@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\\: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\\:flex{display:flex}.sm\\:flex-row{flex-direction:row}}@media(min-width:48rem){.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}}@media(min-width:64rem){.lg\\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}}::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{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#18181bb3;border:1px solid #ffffff0d;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-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>
|
|
1914
|
+
*/function se({health:e,timeContextLabel:t}){return s.jsxs("div",{className:"flex items-center justify-between mb-8",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(H,{className:"w-3 h-3"}),t]})]})]})}const le=f.createContext({});function ue(e){const t=f.useRef(null);return null===t.current&&(t.current=e()),t.current}const ce="undefined"!=typeof window,de=ce?f.useLayoutEffect:f.useEffect,fe=f.createContext(null);function he(e,t){-1===e.indexOf(t)&&e.push(t)}function pe(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const me=(e,t,n)=>n>t?t:n<e?e:n;const ge={},ye=e=>/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(e);function ve(e){return"object"==typeof e&&null!==e}const be=e=>/^0[^.\\s]+$/u.test(e);function xe(e){let t;return()=>(void 0===t&&(t=e()),t)}const we=e=>e,ke=(e,t)=>n=>t(e(n)),Se=(...e)=>e.reduce(ke),Ee=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Te{constructor(){this.subscriptions=[]}add(e){return he(this.subscriptions,e),()=>pe(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 Ce=e=>1e3*e,Pe=e=>e/1e3;function Ne(e,t){return t?e*(1e3/t):0}const je=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Me(e,t,n,r){if(e===t&&n===r)return we;const i=t=>function(e,t,n,r,i){let a,o,s=0;do{o=t+(n-t)/2,a=je(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:je(i(e),t,r)}const Le=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ae=e=>t=>1-e(1-t),De=Me(.33,1.53,.69,.99),Re=Ae(De),_e=Le(Re),ze=e=>(e*=2)<1?.5*Re(e):.5*(2-Math.pow(2,-10*(e-1))),Oe=e=>1-Math.sin(Math.acos(e)),Fe=Ae(Oe),Ve=Le(Oe),Ie=Me(.42,0,1,1),Be=Me(0,0,.58,1),Ue=Me(.42,0,.58,1),$e=e=>Array.isArray(e)&&"number"==typeof e[0],He={linear:we,easeIn:Ie,easeInOut:Ue,easeOut:Be,circIn:Oe,circInOut:Ve,circOut:Fe,backIn:Re,backInOut:_e,backOut:De,anticipate:ze},We=e=>{if($e(e)){e.length;const[t,n,r,i]=e;return Me(t,n,r,i)}return"string"==typeof e?He[e]:e},qe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ye(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=qe.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=ge.useManualTiming?i.timestamp:performance.now();n=!1,ge.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:qe.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<qe.length;t++)o[qe[t]].cancel(e)},state:i,steps:o}}const{schedule:Xe,cancel:Ke,state:Qe,steps:Ge}=Ye("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:we,!0);let Ze;function Je(){Ze=void 0}const et={now:()=>(void 0===Ze&&et.set(Qe.isProcessing||ge.useManualTiming?Qe.timestamp:performance.now()),Ze),set:e=>{Ze=e,queueMicrotask(Je)}},tt=e=>t=>"string"==typeof t&&t.startsWith(e),nt=tt("--"),rt=tt("var(--"),it=e=>!!rt(e)&&at.test(e.split("/*")[0].trim()),at=/var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;function ot(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const st={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},lt={...st,transform:e=>me(0,1,e)},ut={...st,default:1},ct=e=>Math.round(1e5*e)/1e5,dt=/-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;const ft=/^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu,ht=(e,t)=>n=>Boolean("string"==typeof n&&ft.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),pt=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,a,o,s]=r.match(dt);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},mt={...st,transform:e=>Math.round((e=>me(0,255,e))(e))},gt={test:ht("rgb","red"),parse:pt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+mt.transform(e)+", "+mt.transform(t)+", "+mt.transform(n)+", "+ct(lt.transform(r))+")"};const yt={test:ht("#"),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:gt.transform},vt=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>\`\${t}\${e}\`}),bt=vt("deg"),xt=vt("%"),wt=vt("px"),kt=vt("vh"),St=vt("vw"),Et=(()=>({...xt,parse:e=>xt.parse(e)/100,transform:e=>xt.transform(100*e)}))(),Tt={test:ht("hsl","hue"),parse:pt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xt.transform(ct(t))+", "+xt.transform(ct(n))+", "+ct(lt.transform(r))+")"},Ct={test:e=>gt.test(e)||yt.test(e)||Tt.test(e),parse:e=>gt.test(e)?gt.parse(e):Tt.test(e)?Tt.parse(e):yt.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?gt.transform(e):Tt.transform(e),getAnimatableNone:e=>{const t=Ct.parse(e);return t.alpha=0,Ct.transform(t)}},Pt=/(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;const Nt="number",jt="color",Mt=/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 Lt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(Mt,e=>(Ct.test(e)?(r.color.push(a),i.push(jt),n.push(Ct.parse(e))):e.startsWith("var(")?(r.var.push(a),i.push("var"),n.push(e)):(r.number.push(a),i.push(Nt),n.push(parseFloat(e))),++a,"\${}")).split("\${}");return{values:n,split:o,indexes:r,types:i}}function At(e){return Lt(e).values}function Dt(e){const{split:t,types:n}=Lt(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===Nt?ct(e[a]):t===jt?Ct.transform(e[a]):e[a]}return i}}const Rt=e=>"number"==typeof e?0:Ct.test(e)?Ct.getAnimatableNone(e):e;const _t={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(dt)?.length||0)+(e.match(Pt)?.length||0)>0},parse:At,createTransformer:Dt,getAnimatableNone:function(e){const t=At(e);return Dt(e)(t.map(Rt))}};function zt(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 Ot(e,t){return n=>n>0?t:e}const Ft=(e,t,n)=>e+(t-e)*n,Vt=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},It=[yt,gt,Tt];function Bt(e){const t=(n=e,It.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Tt&&(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=zt(s,r,e+1/3),a=zt(s,r,e),o=zt(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 Ut=(e,t)=>{const n=Bt(e),r=Bt(t);if(!n||!r)return Ot(e,t);const i={...n};return e=>(i.red=Vt(n.red,r.red,e),i.green=Vt(n.green,r.green,e),i.blue=Vt(n.blue,r.blue,e),i.alpha=Ft(n.alpha,r.alpha,e),gt.transform(i))},$t=new Set(["none","hidden"]);function Ht(e,t){return n=>Ft(e,t,n)}function Wt(e){return"number"==typeof e?Ht:"string"==typeof e?it(e)?Ot:Ct.test(e)?Ut:Xt:Array.isArray(e)?qt:"object"==typeof e?Ct.test(e)?Ut:Yt:Ot}function qt(e,t){const n=[...e],r=n.length,i=e.map((e,n)=>Wt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Yt(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=Wt(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Xt=(e,t)=>{const n=_t.createTransformer(t),r=Lt(e),i=Lt(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?$t.has(e)&&!i.values.length||$t.has(t)&&!r.values.length?function(e,t){return $t.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Se(qt(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):Ot(e,t)};function Kt(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Ft(e,t,n);return Wt(e)(e,t)}const Qt=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Xe.update(t,e),stop:()=>Ke(t),now:()=>Qe.isProcessing?Qe.timestamp:et.now()}},Gt=(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)})\`},Zt=2e4;function Jt(e){let t=0;let n=e.next(t);for(;!n.done&&t<Zt;)t+=50,n=e.next(t);return t>=Zt?1/0:t}function en(e,t,n){const r=Math.max(t-5,0);return Ne(n-e(r),t-r)}const tn=100,nn=10,rn=1,an=0,on=800,sn=.3,ln=.3,un={granular:.01,default:2},cn={granular:.005,default:.5},dn=.01,fn=10,hn=.05,pn=1,mn=.001;function gn({duration:e=on,bounce:t=sn,velocity:n=an,mass:r=rn}){let i,a,o=1-t;o=me(hn,pn,o),e=me(dn,fn,Pe(e)),o<1?(i=t=>{const r=t*o,i=r*e,a=r-n,s=vn(t,o),l=Math.exp(-i);return mn-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=vn(Math.pow(t,2),o);return(-i(t)+mn>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<yn;i++)r-=e(r)/t(r);return r}(i,a,5/e);if(e=Ce(e),isNaN(s))return{stiffness:tn,damping:nn,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*o*Math.sqrt(r*t),duration:e}}}const yn=12;function vn(e,t){return e*Math.sqrt(1-t*t)}const bn=["duration","bounce"],xn=["stiffness","damping","mass"];function wn(e,t){return t.some(t=>void 0!==e[t])}function kn(e=ln,t=sn){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:an,stiffness:tn,damping:nn,mass:rn,isResolvedFromDuration:!1,...e};if(!wn(e,xn)&&wn(e,bn))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,a=2*me(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:rn,stiffness:i,damping:a}}else{const n=gn(e);t={...t,...n,mass:rn},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Pe(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),g=o-a,y=Pe(Math.sqrt(l/c)),v=Math.abs(g)<5;let b;if(r||(r=v?un.granular:un.default),i||(i=v?cn.granular:cn.default),m<1){const e=vn(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?Ce(p):en(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(Jt(x),Zt),t=Gt(t=>x.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return x}function Sn({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=kn({keyframes:[f.value,h(f.value)],velocity:en(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 En(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||ge.mix||Kt,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]||we:t;n=Se(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=Ee(e[r],e[r+1],n);return s[r](i)};return n?t=>u(me(e[0],e[a-1],t)):u}function Tn(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ee(0,t,r);e.push(Ft(n,1,i))}}(t,e.length-1),t}function Cn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(We):We(r),a={done:!1,value:t[0]},o=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:Tn(t),e),s=En(o,t,{ease:Array.isArray(i)?i:(l=t,u=i,l.map(()=>u||Ue).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}kn.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Jt(r),Zt);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:Pe(i)}}(e,100,kn);return e.ease=t.ease,e.duration=Ce(t.duration),e.type="keyframes",e};const Pn=e=>null!==e;function Nn(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(Pn),o=i<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return o&&void 0!==r?r:a[o]}const jn={decay:Sn,inertia:Sn,tween:Cn,keyframes:Cn,spring:kn};function Mn(e){"string"==typeof e.type&&(e.type=jn[e.type])}class Ln{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 An=e=>e/100;class Dn extends Ln{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!==et.now()&&this.tick(et.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;Mn(e);const{type:t=Cn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const s=t||Cn;s!==Cn&&"number"!=typeof o[0]&&(this.mixKeyframes=Se(An,Kt(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=Jt(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=me(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!==Sn&&(x.value=Nn(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 Pe(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Pe(e)}get time(){return Pe(this.currentTime)}set time(e){e=Ce(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(et.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Pe(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Qt,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(et.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 Rn=e=>180*e/Math.PI,_n=e=>{const t=Rn(Math.atan2(e[1],e[0]));return On(t)},zn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_n,rotateZ:_n,skewX:e=>Rn(Math.atan(e[1])),skewY:e=>Rn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},On=e=>((e%=360)<0&&(e+=360),e),Fn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Vn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),In={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fn,scaleY:Vn,scale:e=>(Fn(e)+Vn(e))/2,rotateX:e=>On(Rn(Math.atan2(e[6],e[5]))),rotateY:e=>On(Rn(Math.atan2(-e[2],e[0]))),rotateZ:_n,rotate:_n,skewX:e=>Rn(Math.atan(e[4])),skewY:e=>Rn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Bn(e){return e.includes("scale")?1:0}function Un(e,t){if(!e||"none"===e)return Bn(t);const n=e.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);let r,i;if(n)r=In,i=n;else{const t=e.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);r=zn,i=t}if(!i)return Bn(t);const a=r[t],o=i[1].split(",").map($n);return"function"==typeof a?a(o):o[a]}function $n(e){return parseFloat(e.trim())}const Hn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wn=(()=>new Set(Hn))(),qn=e=>e===st||e===wt,Yn=new Set(["x","y","z"]),Xn=Hn.filter(e=>!Yn.has(e));const Kn={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})=>Un(t,"x"),y:(e,{transform:t})=>Un(t,"y")};Kn.translateX=Kn.x,Kn.translateY=Kn.y;const Qn=new Set;let Gn=!1,Zn=!1,Jn=!1;function er(){if(Zn){const e=Array.from(Qn).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 Xn.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)})}Zn=!1,Gn=!1,Qn.forEach(e=>e.complete(Jn)),Qn.clear()}function tr(){Qn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zn=!0)})}class nr{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?(Qn.add(this),Gn||(Gn=!0,Xe.read(tr),Xe.resolveKeyframes(er))):(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),Qn.delete(this)}cancel(){"scheduled"===this.state&&(Qn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const rr=xe(()=>void 0!==window.ScrollTimeline),ir={};function ar(e,t){const n=xe(e);return()=>ir[t]??n()}const or=ar(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),sr=([e,t,n,r])=>\`cubic-bezier(\${e}, \${t}, \${n}, \${r})\`,lr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:sr([0,.65,.55,1]),circOut:sr([.55,0,1,.45]),backIn:sr([.31,.01,.66,-.59]),backOut:sr([.33,1.53,.69,.99])};function ur(e,t){return e?"function"==typeof e?or()?Gt(e,t):"ease-out":$e(e)?sr(e):Array.isArray(e)?e.map(e=>ur(e,t)||lr.easeOut):lr[e]:void 0}function cr(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=ur(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 dr(e){return"function"==typeof e&&"applyToOptions"in e}class fr extends Ln{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 dr(e)&&or()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=cr(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=Nn(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 Pe(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Pe(e)}get time(){return Pe(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ce(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&&rr()?(this.animation.timeline=e,we):t(this)}}const hr={anticipate:ze,backInOut:_e,circInOut:Ve};function pr(e){"string"==typeof e.ease&&e.ease in hr&&(e.ease=hr[e.ease])}class mr extends fr{constructor(e){pr(e),Mn(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 Dn({...a,autoplay:!1}),s=Math.max(10,et.now()-this.startTime),l=me(0,10,s-10);t.setWithVelocity(o.sample(Math.max(0,s-l)).value,o.sample(s).value,l),o.stop()}}const gr=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!_t.test(e)&&"0"!==e||e.startsWith("url(")));function yr(e){e.duration=0,e.type="keyframes"}const vr=new Set(["opacity","clipPath","filter","transform"]),br=xe(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class xr extends Ln{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=et.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||nr;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=et.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=gr(i,t),s=gr(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||dr(n))&&r)}(e,i,a,o)||(!ge.instantAnimations&&s||u?.(Nn(e,n,t)),e[0]=e[e.length-1],yr(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 br()&&n&&vr.has(n)&&("transform"!==n||!u)&&!l&&!r&&"mirror"!==i&&0!==a&&"inertia"!==o}(c),f=c.motionValue?.owner?.current,h=d?new mr({...c,element:f}):new Dn(c);h.finished.then(()=>{this.notifyFinished()}).catch(we),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(),Jn=!0,tr(),er(),Jn=!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 wr(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 kr=/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;function Sr(e,t,n=1){const[r,i]=function(e){const t=kr.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 ye(e)?parseFloat(e):e}return it(i)?Sr(i,t,n+1):i}const Er={type:"spring",stiffness:500,damping:25,restSpeed:10},Tr={type:"keyframes",duration:.8},Cr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Pr=(e,{keyframes:t})=>t.length>2?Tr:Wn.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Er:Cr,Nr=e=>null!==e;function jr(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Mr(e,t){const n=e?.[t]??e?.default??e;return n!==e?jr(n,e):n}const Lr=(e,t,n,r={},i,a)=>o=>{const s=Mr(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u-=Ce(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,Pr(e,c)),c.duration&&(c.duration=Ce(c.duration)),c.repeatDelay&&(c.repeatDelay=Ce(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(yr(c),0===c.delay&&(d=!0)),(ge.instantAnimations||ge.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,yr(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(Nr);return r[t&&"loop"!==n&&t%2==1?0:r.length-1]}(c.keyframes,s);if(void 0!==e)return void Xe.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new Dn(c):new xr(c)};function Ar(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Dr(e,t,n,r){if("function"==typeof t){const[i,a]=Ar(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]=Ar(r);t=t(void 0!==n?n:e.custom,i,a)}return t}function Rr(e,t,n){const r=e.getProps();return Dr(r,t,void 0!==n?n:r.custom,e)}const _r=new Set(["width","height","top","left","right","bottom",...Hn]);class zr{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=et.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=et.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 Te);const n=this.events[e].add(t);return"change"===e?()=>{n(),Xe.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=et.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ne(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 Or(e,t){return new zr(e,t)}const Fr=e=>Array.isArray(e);function Vr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Or(n))}function Ir(e){return Fr(e)?e[e.length-1]||0:e}const Br=e=>Boolean(e&&e.getVelocity);function Ur(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Br(r)&&r.add))return n.add(t);if(!n&&ge.WillChange){const n=new ge.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function $r(e){return e.replace(/([A-Z])/g,e=>\`-\${e.toLowerCase()}\`)}const Hr="data-"+$r("framerAppearId");function Wr(e){return e.props[Hr]}function qr({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Yr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t;const l=e.getDefaultTransition();a=a?jr(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&&qr(d,f))continue;const i={delay:n,...Mr(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=Wr(e);if(t){const e=window.MotionHandoffAnimation(t,f,Xe);null!==e&&(i.startTime=e,l=!0)}}Ur(e,f);const h=u??e.shouldReduceMotion;t.start(Lr(f,t,r,h&&_r.has(f)?{type:!1}:i,e,l));const p=t.animation;p&&c.push(p)}if(o){const t=()=>Xe.update(()=>{o&&function(e,t){const n=Rr(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a)Vr(e,o,Ir(a[o]))}(e,o)});c.length?Promise.all(c).then(t):t()}return c}function Xr(e,t,n={}){const r=Rr(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(Yr(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(Xr(l,t,{...o,delay:n+("function"==typeof r?0:r)+wr(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 Kr=e=>t=>t.test(e),Qr=[st,wt,xt,bt,St,kt,{test:e=>"auto"===e,parse:e=>e}],Gr=e=>Qr.find(Kr(e));function Zr(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||be(e))}const Jr=new Set(["brightness","contrast","saturate","opacity"]);function ei(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(dt)||[];if(!r)return e;const i=n.replace(r,"");let a=Jr.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const ti=/\\b([a-z-]*)\\(.*?\\)/gu,ni={..._t,getAnimatableNone:e=>{const t=e.match(ti);return t?t.map(ei).join(" "):e}},ri={...st,transform:Math.round},ii={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,top:wt,right:wt,bottom:wt,left:wt,inset:wt,insetBlock:wt,insetBlockStart:wt,insetBlockEnd:wt,insetInline:wt,insetInlineStart:wt,insetInlineEnd:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,paddingBlock:wt,paddingBlockStart:wt,paddingBlockEnd:wt,paddingInline:wt,paddingInlineStart:wt,paddingInlineEnd:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,marginBlock:wt,marginBlockStart:wt,marginBlockEnd:wt,marginInline:wt,marginInlineStart:wt,marginInlineEnd:wt,fontSize:wt,backgroundPositionX:wt,backgroundPositionY:wt,...{rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:ut,scaleX:ut,scaleY:ut,scaleZ:ut,skew:bt,skewX:bt,skewY:bt,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:lt,originX:Et,originY:Et,originZ:wt},zIndex:ri,fillOpacity:lt,strokeOpacity:lt,numOctaves:ri},ai={...ii,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:ni,WebkitFilter:ni},oi=e=>ai[e];function si(e,t){let n=oi(e);return n!==ni&&(n=_t),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const li=new Set(["auto","none","0"]);class ui extends nr{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(),it(n))){const r=Sr(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!_r.has(n)||2!==e.length)return;const[r,i]=e,a=Gr(r),o=Gr(i);if(ot(r)!==ot(i)&&Kn[n])this.needsMeasurement=!0;else if(a!==o)if(qn(a)&&qn(o))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else Kn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||Zr(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&&!li.has(t)&&Lt(t).values.length&&(r=e[i]),i++}if(r&&n)for(const a of t)e[a]=si(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=Kn[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]=Kn[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 ci=new Set(["opacity","clipPath","filter","transform"]);function di(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 fi=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function hi(e){return ve(e)&&"offsetHeight"in e}const{schedule:pi}=Ye(queueMicrotask,!1),mi={x:!1,y:!1};function gi(){return mi.x||mi.y}function yi(e,t){const n=di(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function vi(e,t,n={}){const[r,i,a]=yi(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||gi())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 bi=(e,t)=>!!t&&(e===t||bi(e,t.parentElement)),xi=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,wi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const ki=new Set(["INPUT","SELECT","TEXTAREA"]);const Si=new WeakSet;function Ei(e){return t=>{"Enter"===t.key&&e(t)}}function Ti(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Ci(e){return xi(e)&&!gi()}const Pi=new WeakSet;function Ni(e,t,n={}){const[r,i,a]=yi(e,n),o=e=>{const r=e.currentTarget;if(!Ci(e))return;if(Pi.has(e))return;Si.add(r),n.stopPropagation&&Pi.add(e);const a=t(r,e),o=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),Si.has(r)&&Si.delete(r),Ci(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||bi(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),hi(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ei(()=>{if(Si.has(n))return;Ti(n,"down");const e=Ei(()=>{Ti(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Ti(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),t=e,wi.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function ji(e){return ve(e)&&"ownerSVGElement"in e}const Mi=new WeakMap;let Li;const Ai=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:ji(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Di=Ai("inline","width","offsetWidth"),Ri=Ai("block","height","offsetHeight");function _i({target:e,borderBoxSize:t}){Mi.get(e)?.forEach(n=>{n(e,{get width(){return Di(e,t)},get height(){return Ri(e,t)}})})}function zi(e){e.forEach(_i)}function Oi(e,t){Li||"undefined"!=typeof ResizeObserver&&(Li=new ResizeObserver(zi));const n=di(e);return n.forEach(e=>{let n=Mi.get(e);n||(n=new Set,Mi.set(e,n)),n.add(t),Li?.observe(e)}),()=>{n.forEach(e=>{const n=Mi.get(e);n?.delete(t),n?.size||Li?.unobserve(e)})}}const Fi=new Set;let Vi;function Ii(e){return Fi.add(e),Vi||(Vi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Fi.forEach(t=>t(e))},window.addEventListener("resize",Vi)),()=>{Fi.delete(e),Fi.size||"function"!=typeof Vi||(window.removeEventListener("resize",Vi),Vi=void 0)}}function Bi(e,t){return"function"==typeof e?Ii(e):Oi(e,t)}const Ui=[...Qr,Ct,_t],$i=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Hi=new WeakMap;function Wi(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function qi(e){return"string"==typeof e||Array.isArray(e)}const Yi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xi=["initial",...Yi];function Ki(e){return Wi(e.animate)||Xi.some(t=>qi(e[t]))}function Qi(e){return Boolean(Ki(e)||e.variants)}const Gi={current:null},Zi={current:!1},Ji="undefined"!=typeof window;const ea=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ta={};function na(e){ta=e}class ra{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=nr,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=et.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Xe.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=Ki(t),this.isVariantNode=Qi(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]&&Br(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,Hi.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:(Zi.current||function(){if(Zi.current=!0,Ji)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Gi.current=e.matches;e.addEventListener("change",t),t()}else Gi.current=!1}(),this.shouldReduceMotion=Gi.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(),Ke(this.notifyUpdate),Ke(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&&ci.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new fr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Ce(o)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=Wn.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Xe.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 ta){const t=ta[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<ea.length;n++){const t=ea[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(Br(i))e.addValue(r,i);else if(Br(a))e.addValue(r,Or(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,Or(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=Or(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&&(ye(n)||be(n))?n=parseFloat(n):(r=n,!Ui.find(Kr(r))&&_t.test(t)&&(n=si(e,t))),this.setBaseTarget(e,Br(n)?n.get():n)),Br(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=Dr(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||Br(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 Te),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){pi.render(this.render)}}class ia extends ra{constructor(){super(...arguments),this.KeyframeResolver=ui}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;Br(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=\`\${e}\`)}))}}class aa{constructor(e){this.isMounted=!1,this.node=e}update(){}}function oa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function sa(e){return void 0===e||1===e}function la({scale:e,scaleX:t,scaleY:n}){return!sa(e)||!sa(t)||!sa(n)}function ua(e){return la(e)||ca(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ca(e){return da(e.x)||da(e.y)}function da(e){return e&&"0%"!==e}function fa(e,t,n){return n+t*(e-n)}function ha(e,t,n,r,i){return void 0!==i&&(e=fa(e,i,r)),fa(e,n,r)+t}function pa(e,t=0,n=1,r,i){e.min=ha(e.min,t,n,r,i),e.max=ha(e.max,t,n,r,i)}function ma(e,{x:t,y:n}){pa(e.x,t.translate,t.scale,t.originPoint),pa(e.y,n.translate,n.scale,n.originPoint)}const ga=.999999999999,ya=1.0000000000001;function va(e,t){e.min=e.min+t,e.max=e.max+t}function ba(e,t,n,r,i=.5){pa(e,t,n,Ft(e.min,e.max,i),r)}function xa(e,t){ba(e.x,t.x,t.scaleX,t.scale,t.originX),ba(e.y,t.y,t.scaleY,t.scale,t.originY)}function wa(e,t){return oa(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 ka={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Sa=Hn.length;function Ea(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(Wn.has(l))o=!0;else if(nt(l))i[l]=e;else{const t=fi(e,ii[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<Sa;a++){const o=Hn[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=fi(s,ii[o]);l||(i=!1,r+=\`\${ka[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 Ta(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 Ca(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pa={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!wt.test(e))return e;e=parseFloat(e)}return\`\${Ca(e,t.target.x)}% \${Ca(e,t.target.y)}%\`}},Na={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=_t.parse(e);if(i.length>5)return r;const a=_t.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=Ft(s,l,.5);return"number"==typeof i[2+o]&&(i[2+o]/=u),"number"==typeof i[3+o]&&(i[3+o]/=u),a(i)}},ja={borderRadius:{...Pa,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pa,borderTopRightRadius:Pa,borderBottomLeftRadius:Pa,borderBottomRightRadius:Pa,boxShadow:Na};function Ma(e,{layout:t,layoutId:n}){return Wn.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!ja[e]||"opacity"===e)}function La(e,t,n){const r=e.style,i=t?.style,a={};if(!r)return a;for(const o in r)(Br(r[o])||i&&Br(i[o])||Ma(o,e)||void 0!==n?.getValue(o)?.liveStyle)&&(a[o]=r[o]);return a}class Aa extends ia{constructor(){super(...arguments),this.type="html",this.renderInstance=Ta}readValueFromInstance(e,t){if(Wn.has(t))return this.projection?.isProjecting?Bn(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Un(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),i=(nt(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return wa(e,t)}build(e,t,n){Ea(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return La(e,t,n)}}const Da={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ra={offset:"strokeDashoffset",array:"strokeDasharray"};const _a=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function za(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},l,u,c){if(Ea(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 _a)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?Da:Ra;e[a.offset]=""+-r,e[a.array]=\`\${t} \${n}\`}(d,i,a,o,!1)}const Oa=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"]),Fa=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Va(e,t,n){const r=La(e,t,n);for(const i in e)if(Br(e[i])||Br(t[i])){r[-1!==Hn.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}class Ia extends ia{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$i}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Wn.has(t)){const e=oi(t);return e&&e.default||0}return t=Oa.has(t)?t:$r(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Va(e,t,n)}build(e,t,n){za(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Ta(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Oa.has(i)?i:$r(i),t.attrs[i])}(e,t,0,r)}mount(e){this.isSVGTag=Fa(e.tagName),super.mount(e)}}const Ba=Xi.length;function Ua(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Ua(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Ba;n++){const r=Xi[n],i=e.props[r];(qi(i)||!1===i)&&(t[r]=i)}return t}function $a(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 Ha=[...Yi].reverse(),Wa=Yi.length;function qa(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=>Xr(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=Xr(e,t,n);else{const i="function"==typeof t?Rr(e,t,n.custom):t;r=Promise.all(Yr(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function Ya(e){let t=qa(e),n=Qa(),r=!0;const i=t=>(n,r)=>{const i=Rr(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=Ua(e.parent)||{},l=[],u=new Set;let c={},d=1/0;for(let t=0;t<Wa;t++){const f=Ha[t],h=n[f],p=void 0!==o[f]?o[f]:s[f],m=qi(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||Wi(p)||"boolean"==typeof p)continue;if("exit"===f&&h.isActive&&!0!==g){h.prevResolvedValues&&(c={...c,...h.prevResolvedValues});continue}const v=Xa(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},T=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=Fr(t)&&Fr(n)?!$a(t,n):t!==n,r?null!=t?T(e):u.add(e):void 0!==t&&u.has(e)?T(e):h.protectedKeys[e]=!0}h.prevProp=p,h.prevResolvedValues=k,h.isActive&&(c={...c,...k}),r&&e.blockInitialAnimation&&(b=!1);const C=y&&v;b&&(!C||x)&&l.push(...w.map(t=>{const n={type:f};if("string"==typeof t&&r&&!C&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,i=Rr(r,t);if(r.enteringChildren&&i){const{delayChildren:t}=i.transition||{};n.delay=wr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof o.initial){const n=Rr(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=Qa()}}}function Xa(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!$a(t,e)}function Ka(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qa(){return{animate:Ka(!0),whileInView:Ka(),whileHover:Ka(),whileTap:Ka(),whileDrag:Ka(),whileFocus:Ka(),exit:Ka()}}function Ga(e,t){e.min=t.min,e.max=t.max}function Za(e,t){Ga(e.x,t.x),Ga(e.y,t.y)}function Ja(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function eo(e){return e.max-e.min}function to(e,t,n,r=.5){e.origin=r,e.originPoint=Ft(t.min,t.max,e.origin),e.scale=eo(n)/eo(t),e.translate=Ft(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 no(e,t,n,r){to(e.x,t.x,n.x,r?r.originX:void 0),to(e.y,t.y,n.y,r?r.originY:void 0)}function ro(e,t,n){e.min=n.min+t.min,e.max=e.min+eo(t)}function io(e,t,n){e.min=t.min-n.min,e.max=e.min+eo(t)}function ao(e,t,n){io(e.x,t.x,n.x),io(e.y,t.y,n.y)}function oo(e,t,n,r,i){return e=fa(e-=t,1/n,r),void 0!==i&&(e=fa(e,1/i,r)),e}function so(e,t,[n,r,i],a,o){!function(e,t=0,n=1,r=.5,i,a=e,o=e){xt.test(t)&&(t=parseFloat(t),t=Ft(o.min,o.max,t/100)-o.min);if("number"!=typeof t)return;let s=Ft(a.min,a.max,r);e===a&&(s-=t),e.min=oo(e.min,t,n,s,i),e.max=oo(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,a,o)}const lo=["x","scaleX","originX"],uo=["y","scaleY","originY"];function co(e,t,n,r){so(e.x,t,lo,n?n.x:void 0,r?r.x:void 0),so(e.y,t,uo,n?n.y:void 0,r?r.y:void 0)}function fo(e){return 0===e.translate&&1===e.scale}function ho(e){return fo(e.x)&&fo(e.y)}function po(e,t){return e.min===t.min&&e.max===t.max}function mo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function go(e,t){return mo(e.x,t.x)&&mo(e.y,t.y)}function yo(e){return eo(e.x)/eo(e.y)}function vo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function bo(e){return[e("x"),e("y")]}const xo=["TopLeft","TopRight","BottomLeft","BottomRight"],wo=xo.length,ko=e=>"string"==typeof e?parseFloat(e):e,So=e=>"number"==typeof e||wt.test(e);function Eo(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const To=Po(0,.5,Fe),Co=Po(.5,.95,we);function Po(e,t,n){return r=>r<e?0:r>t?1:n(Ee(e,t,r))}function No(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const jo=(e,t)=>e.depth-t.depth;class Mo{constructor(){this.children=[],this.isDirty=!1}add(e){he(this.children,e),this.isDirty=!0}remove(e){pe(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(jo),this.isDirty=!1,this.children.forEach(e)}}function Lo(e){return Br(e)?e.get():e}class Ao{constructor(){this.members=[]}add(e){he(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&&pe(this.members,n)}e.scheduleRender()}remove(e){if(pe(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 Do={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ro=["","X","Y","Z"];let _o=0;function zo(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Oo(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Wr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Oo(r)}function Fo({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=_o++,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(Bo),this.nodes.forEach(Xo),this.nodes.forEach(Ko),this.nodes.forEach(Uo)},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 Mo)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Te),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=ji(t)&&!(ji(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;Xe.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=et.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Ke(r),e(a-t))};return Xe.setup(r,!0),()=>Ke(r)}(i,250),Do.hasAnimatedSinceResize&&(Do.hasAnimatedSinceResize=!1,this.nodes.forEach(Yo)))})}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()||ts,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!go(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={...Mr(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||Yo(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(),Ke(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(Qo),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&&Oo(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(Ho);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Wo);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qo),this.nodes.forEach(Vo),this.nodes.forEach(Io)):this.nodes.forEach(Wo),this.clearAllSnapshots();const e=et.now();Qe.delta=me(0,1e3/60,e-Qe.timestamp),Qe.timestamp=e,Qe.isProcessing=!0,Ge.update.process(Qe),Ge.preRender.process(Qe),Ge.render.process(Qe),Qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($o),this.sharedNodes.forEach(Go)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||eo(this.snapshot.measuredBox.x)||eo(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&&!ho(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||ua(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)),is((r=n).x),is(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(os))){const{scroll:e}=this.root;e&&(va(t.x,e.offset.x),va(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(Za(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&&Za(t,e),va(t.x,i.offset.x),va(t.y,i.offset.y))}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Za(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&&xa(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),ua(e.latestValues)&&xa(n,e.latestValues)}return ua(this.latestValues)&&xa(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Za(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!ua(e.latestValues))continue;la(e.latestValues)&&e.updateSnapshot();const r=$i();Za(r,e.measurePageBox()),co(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return ua(this.latestValues)&&co(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!==Qe.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=Qe.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,ro(o.x,s.x,l.x),ro(o.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Za(this.target,this.layout.layoutBox),ma(this.target,this.targetDelta)):Za(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&&!la(this.parent.latestValues)&&!ca(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}},ao(this.relativeTargetOrigin,t,n),Za(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===Qe.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;Za(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&&xa(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ma(e,o)),r&&ua(a.latestValues)&&xa(e,a.latestValues))}t.x<ya&&t.x>ga&&(t.x=1),t.y<ya&&t.y>ga&&(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?(Ja(this.prevProjectionDelta.x,this.projectionDelta.x),Ja(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),no(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&vo(this.projectionDelta.x,this.prevProjectionDelta.x)&&vo(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(es));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,h,p,m,g;Zo(a.x,e.x,n),Zo(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ao(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,m=o,g=n,Jo(h.x,p.x,m.x,g),Jo(h.y,p.y,m.y,g),d&&(l=this.relativeTarget,f=d,po(l.x,f.x)&&po(l.y,f.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Za(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,n,r,i,a){i?(e.opacity=Ft(0,n.opacity??1,To(r)),e.opacityExit=Ft(t.opacity??1,0,Co(r))):a&&(e.opacity=Ft(t.opacity??1,n.opacity??1,r));for(let o=0;o<wo;o++){const i=\`border\${xo[o]}Radius\`;let a=Eo(t,i),s=Eo(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||So(a)===So(s)?(e[i]=Math.max(Ft(ko(a),ko(s),r),0),(xt.test(s)||xt.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Ft(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&&(Ke(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Do.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Or(0)),this.currentAnimation=function(e,t,n){const r=Br(e)?e:Or(e);return r.start(Lr("",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&&as(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=eo(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=eo(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Za(t,n),xa(t,i),no(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ao);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&&zo("z",e,r,this.animationValues);for(let i=0;i<Ro.length;i++)zo(\`rotate\${Ro[i]}\`,e,r,this.animationValues),zo(\`skew\${Ro[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=Lo(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=Lo(t?.pointerEvents)||""),void(this.hasProjected&&!ua(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 ja){if(void 0===i[l])continue;const{correct:t,applyTo:n,isCSSVariable:o}=ja[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?Lo(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Ho),this.root.sharedNodes.clear()}}}function Vo(e){e.updateLayout()}function Io(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?bo(e=>{const r=a?t.measuredBox[e]:t.layoutBox[e],i=eo(r);r.min=n[e].min,r.max=r.min+i}):as(i,t.layoutBox,n)&&bo(r=>{const i=a?t.measuredBox[r]:t.layoutBox[r],o=eo(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}};no(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?no(s,e.applyTransform(r,!0),t.measuredBox):no(s,n,t.layoutBox);const l=!ho(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}};ao(o,t.layoutBox,i.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};ao(s,n,a.layoutBox),go(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 Bo(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 Uo(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $o(e){e.clearSnapshot()}function Ho(e){e.clearMeasurements()}function Wo(e){e.isLayoutDirty=!1}function qo(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Yo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Xo(e){e.resolveTargetDelta()}function Ko(e){e.calcProjection()}function Qo(e){e.resetSkewAndRotation()}function Go(e){e.removeLeadSnapshot()}function Zo(e,t,n){e.translate=Ft(t.translate,0,n),e.scale=Ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Jo(e,t,n,r){e.min=Ft(t.min,n.min,r),e.max=Ft(t.max,n.max,r)}function es(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const ts={duration:.45,ease:[.4,0,.1,1]},ns=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rs=ns("applewebkit/")&&!ns("chrome/")?Math.round:we;function is(e){e.min=rs(e.min),e.max=rs(e.max)}function as(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=yo(t),i=yo(n),a=.2,!(Math.abs(r-i)<=a));var r,i,a}function os(e){return e!==e.root&&e.scroll?.wasRoot}const ss=Fo({attachResizeListener:(e,t)=>No(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ls={current:void 0},us=Fo({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ls.current){const e=new ss({});e.mount(window),e.setOptions({layoutScroll:!0}),ls.current=e}return ls.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),cs=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ds(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function fs(...e){return f.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=ds(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():ds(e[t],null)}}}}(...e),e)}class hs 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=hi(e)&&e.offsetWidth||0,r=hi(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 ps({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(cs),d=e.props?.ref??e?.ref,h=fs(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(hs,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:!1===a?e:f.cloneElement(e,{ref:h})})}const ms=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:l,anchorY:u,root:c})=>{const d=ue(gs),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(ps,{pop:"popLayout"===o,isPresent:n,anchorX:l,anchorY:u,root:c,children:e}),s.jsx(fe.Provider,{value:m,children:e})};function gs(){return new Map}function ys(e=!0){const t=f.useContext(fe);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 vs=e=>e.key||"";function bs(e){const t=[];return f.Children.forEach(e,e=>{f.isValidElement(e)&&t.push(e)}),t}const xs=({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]=ys(o),p=f.useMemo(()=>bs(e),[e]),m=o&&!d?[]:p.map(vs),g=f.useRef(!0),y=f.useRef(p),v=ue(()=>new Map),b=f.useRef(new Set),[x,w]=f.useState(p),[k,S]=f.useState(p);de(()=>{g.current=!1,y.current=p;for(let e=0;e<k.length;e++){const t=vs(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=vs(n);m.includes(r)||(e.splice(t,0,n),E.push(n))}return"wait"===a&&E.length&&(e=E),S(bs(e)),w(p),null}const{forceRender:T}=f.useContext(le);return s.jsx(s.Fragment,{children:k.map(e=>{const f=vs(e),x=!(o&&!d)&&(p===k||m.includes(f));return s.jsx(ms,{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&&(T?.(),S(y.current),o&&h?.(),r&&r())},anchorX:l,anchorY:u,children:e},f)})})},ws=f.createContext({strict:!1}),ks={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 Ss=!1;function Es(){return function(){if(Ss)return;const e={};for(const t in ks)e[t]={isEnabled:e=>ks[t].some(t=>!!e[t])};na(e),Ss=!0}(),ta}const Ts=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 Cs(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ts.has(e)}let Ps=e=>!Cs(e);try{"function"==typeof(Ns=require("@emotion/is-prop-valid").default)&&(Ps=e=>e.startsWith("on")?!Cs(e):Ns(e))}catch{}var Ns;const js=f.createContext({});function Ms(e){const{initial:t,animate:n}=function(e,t){if(Ki(e)){const{initial:t,animate:n}=e;return{initial:!1===t||qi(t)?t:void 0,animate:qi(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,f.useContext(js));return f.useMemo(()=>({initial:t,animate:n}),[Ls(t),Ls(n)])}function Ls(e){return Array.isArray(e)?e.join(" "):e}const As=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ds(e,t,n){for(const r in t)Br(t[r])||Ma(r,n)||(e[r]=t[r])}function Rs(e,t){const n={};return Ds(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Ea(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function _s(e,t){const n={},r=Rs(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 zs=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Os(e,t,n,r){const i=f.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return za(n,t,Fa(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};Ds(t,e.style,e),i.style={...t,...i.style}}return i}const Fs=["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 Vs(e){return"string"==typeof e&&!e.includes("-")&&!!(Fs.indexOf(e)>-1||/[A-Z]/u.test(e))}function Is(e,t,n,{latestValues:r},i,a=!1,o){const s=(o??Vs(e)?Os:_s)(t,r,i,e),l=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(Ps(i)||!0===n&&Cs(i)||!t&&!Cs(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(()=>Br(c)?c.get():c,[c]);return f.createElement(e,{...u,children:d})}function Bs(e,t,n,r){const i={},a=r(e,{});for(const f in a)i[f]=Lo(a[f]);let{initial:o,animate:s}=e;const l=Ki(e),u=Qi(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&&!Wi(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Dr(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 Us=e=>(t,n)=>{const r=f.useContext(js),i=f.useContext(fe),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Bs(n,r,i,e),renderState:t()}}(e,t,r,i);return n?a():ue(a)},$s=Us({scrapeMotionValuesFromProps:La,createRenderState:As}),Hs=Us({scrapeMotionValuesFromProps:Va,createRenderState:zs}),Ws=Symbol.for("motionComponentSymbol");function qs(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 Ys=f.createContext({});function Xs(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Ks(e,t,n,r,i,a){const{visualElement:o}=f.useContext(js),s=f.useContext(ws),l=f.useContext(fe),u=f.useContext(cs),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(Ys);!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:Qs(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:Boolean(o)||s&&Xs(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[Hr],b=f.useRef(Boolean(v)&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return de(()=>{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 Qs(e){if(e)return!1!==e.options.allowProjection?e.projection:Qs(e.parent)}function Gs(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&function(e){const t=Es();for(const n in e)t[n]={...t[n],...e[n]};na(t)}(r);const a=n?"svg"===n:Vs(e),o=a?Hs:$s;function l(n,r){let l;const u={...f.useContext(cs),...n,layoutId:Zs(n)},{isStatic:c}=u,d=Ms(n),h=o(n,c);if(!c&&ce){f.useContext(ws).strict;const t=function(e){const t=Es(),{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=Ks(e,h,u,i,t.ProjectionNode,a)}return s.jsxs(js.Provider,{value:d,children:[l&&d.visualElement?s.jsx(l,{visualElement:d.visualElement,...u}):null,Is(e,n,qs(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[Ws]=e,u}function Zs({layoutId:e}){const t=f.useContext(le).id;return t&&void 0!==e?t+"-"+e:e}function Js(e,t){if("undefined"==typeof Proxy)return Gs;const n=new Map,r=(n,r)=>Gs(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>"create"===a?r:(n.has(a)||n.set(a,Gs(a,void 0,e,t)),n.get(a))})}const el=(e,t)=>t.isSVG??Vs(e)?new Ia(t):new Aa(t,{allowProjection:e!==f.Fragment});let tl=0;const nl={animation:{Feature:class extends aa{constructor(e){super(e),e.animationState||(e.animationState=Ya(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Wi(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 aa{constructor(){super(...arguments),this.id=tl++}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 rl(e){return{point:{x:e.pageX,y:e.pageY}}}function il(e,t,n,r){return No(e,t,(e=>t=>xi(t)&&e(t,rl(t)))(n),r)}const al=({current:e})=>e?e.ownerDocument.defaultView:null,ol=(e,t)=>Math.abs(e-t);const sl=new Set(["auto","scroll"]);class ll{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=dl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=ol(e.x,t.x),r=ol(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}=Qe;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=ul(t,this.transformPagePoint),Xe.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=dl("pointercancel"===e.type?this.lastMoveEventInfo:ul(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!xi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const s=ul(rl(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=Qe;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,dl(s,this.history)),this.removeListeners=Se(il(this.contextWindow,"pointermove",this.handlePointerMove),il(this.contextWindow,"pointerup",this.handlePointerUp),il(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(sl.has(e.overflowX)||sl.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),Xe.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ke(this.updatePoint)}}function ul(e,t){return t?{point:t(e.point)}:e}function cl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function dl({point:e},t){return{point:e,delta:cl(e,hl(t)),offset:cl(e,fl(t)),velocity:pl(t,.1)}}function fl(e){return e[0]}function hl(e){return e[e.length-1]}function pl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=hl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ce(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>2*Ce(t)&&(r=e[1]);const a=Pe(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 ml(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 gl(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 yl=.35;function vl(e,t,n){return{min:bl(e,t),max:bl(e,n)}}function bl(e,t){return"number"==typeof e?e:e[t]||0}const xl=new WeakMap;class wl{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 ll(e,{onSessionStart:e=>{t&&this.snapToCursor(rl(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?mi[a]?null:(mi[a]=!0,()=>{mi[a]=!1}):mi.x||mi.y?null:(mi.x=mi.y=!0,()=>{mi.x=mi.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),bo(e=>{let t=this.getAxisMotionValue(e).get()||0;if(xt.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=eo(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&Xe.update(()=>i(e,t),!1,!0),Ur(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&&Xe.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:al(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&&Xe.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||!Sl(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?Ft(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Ft(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&&Xs(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:ml(e.x,n,i),y:ml(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=yl){return!1===e?e=0:!0===e&&(e=yl),{x:vl(e,"left","right"),y:vl(e,"top","bottom")}}(t),r!==this.constraints&&!Xs(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&bo(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||!Xs(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=wa(e,n),{scroll:i}=t;return i&&(va(r.x,i.offset.x),va(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:gl(e.x,t.x),y:gl(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=oa(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},l=bo(o=>{if(!Sl(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 Ur(this.visualElement,e),n.start(Lr(e,n,0,t,this.visualElement,!1))}stopAnimation(){bo(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){bo(t=>{const{drag:n}=this.getProps();if(!Sl(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]-Ft(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Xs(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};bo(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=eo(e),i=eo(t);return i>r?n=Ee(t.min,t.max-r,e.min):r>i&&(n=Ee(e.min,e.max-i,t.min)),me(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(),bo(t=>{if(!Sl(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Ft(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;xl.set(this.visualElement,this);const e=this.visualElement.current,t=il(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&function(e){return ki.has(e.tagName)||!0===e.isContentEditable}(i);n&&r&&!a&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Xs(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=Bi(e,kl(n)),i=Bi(t,kl(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()),Xe.read(r);const o=No(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(bo(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=yl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function kl(e){let t=!0;return()=>{t?t=!1:e()}}function Sl(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const El=e=>(t,n)=>{e&&Xe.update(()=>e(t,n),!1,!0)};let Tl=!1;class Cl 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),Tl&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Do.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}),Tl=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Xe.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),pi.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Tl=!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 Pl(e){const[t,n]=ys(),r=f.useContext(le);return s.jsx(Cl,{...e,layoutGroup:r,switchLayoutGroup:f.useContext(Ys),isPresent:t,safeToRemove:n})}const Nl={pan:{Feature:class extends aa{constructor(){super(...arguments),this.removePointerDownListener=we}onPointerDown(e){this.session=new ll(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:al(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:El(e),onStart:El(t),onMove:El(n),onEnd:(e,t)=>{delete this.session,r&&Xe.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=il(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 aa{constructor(e){super(e),this.removeGroupControls=we,this.removeListeners=we,this.controls=new wl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||we}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:us,MeasureLayout:Pl}};function jl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&Xe.postRender(()=>i(t,rl(t)))}function Ml(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&&Xe.postRender(()=>i(t,rl(t)))}const Ll=new WeakMap,Al=new WeakMap,Dl=e=>{const t=Ll.get(e.target);t&&t(e)},Rl=e=>{e.forEach(Dl)};function _l(e,t,n){const r=function({root:e,...t}){const n=e||document;Al.has(n)||Al.set(n,{});const r=Al.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Rl,{root:e,...t})),r[i]}(t);return Ll.set(e,n),r.observe(e),()=>{Ll.delete(e),r.unobserve(e)}}const zl={some:0,all:1};const Ol=Js({...nl,...{inView:{Feature:class extends aa{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:zl[r]};return _l(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 aa{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Ni(e,(e,t)=>(Ml(this.node,t,"Start"),(e,{success:t})=>Ml(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends aa{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=Se(No(this.node.current,"focus",()=>this.onFocus()),No(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends aa{mount(){const{current:e}=this.node;e&&(this.unmount=vi(e,(e,t)=>(jl(this.node,t,"Start"),e=>jl(this.node,e,"End"))))}unmount(){}}}},...Nl,...{layout:{ProjectionNode:us,MeasureLayout:Pl}}},el);function Fl({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(Ol.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:a},className:"flex-1 min-w-[140px] p-4 rounded-xl bg-bg-surface-1 border border-border/50 flex flex-col gap-2 group hover:border-accent/30 transition-all duration-300",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"p-2 rounded-lg bg-bg-surface-2 group-hover:bg-accent/10 transition-colors",children:s.jsx(i,{className:"w-4 h-4 text-text-muted group-hover:text-accent transition-colors"})}),s.jsx("span",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider",children:e})]}),s.jsxs("div",{className:"flex items-baseline gap-1 mt-1",children:[s.jsx("span",{ref:o,className:"text-2xl font-bold text-text-primary tracking-tight",children:r>0?t.toFixed(r):t}),n&&s.jsx("span",{className:"text-xs text-text-muted font-medium",children:n})]})]})}function Vl({totalHours:e,totalSessions:t,currentStreak:n,filesTouched:r}){return s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[s.jsx(Fl,{label:"Total Time",value:e,suffix:"hrs",decimals:1,icon:K,delay:.1}),s.jsx(Fl,{label:"Sessions",value:t,icon:ee,delay:.2}),s.jsx(Fl,{label:"Streak",value:n,suffix:"days",icon:oe,delay:.3}),s.jsx(Fl,{label:"Files",value:r,icon:Q,delay:.4})]})}const Il={"claude-code":"#d4a04a",cursor:"#00b4d8",copilot:"#6e40c9",windsurf:"#38bdf8","github-copilot":"#6e40c9",aider:"#4ade80",continue:"#f97316",cody:"#ff6b6b",tabby:"#a78bfa",roo:"#f472b6"},Bl={"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-cli":"Gemini CLI"},Ul={"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-cli":"GC"},$l={feature:"#4ade80",bugfix:"#f87171",refactor:"#a78bfa",test:"#38bdf8",docs:"#fbbf24",setup:"#6b655c",deployment:"#f97316",other:"#9c9588"};function Hl(e){const t=e/3600;return t<.1?\`\${t.toFixed(2)}h\`:\`\${t.toFixed(1)}h\`}function Wl(e,t){return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,t)}function ql({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 Yl({stats:e}){const t=Wl(e.byClient,4),n=Wl(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(ql,{label:"Top Clients",children:t.map(([e,t])=>{const n=Il[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:Hl(t),children:[Bl[e]??e,s.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:Hl(t)})]},e)})}),n.length>0&&s.jsx(ql,{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:Hl(t),children:[e,s.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:Hl(t)})]},e))})]})}function Xl({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 Kl({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-col gap-3 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 px-1",children:[s.jsx(G,{className:"w-3.5 h-3.5 text-text-muted"}),s.jsx("span",{className:"text-[10px] font-bold text-text-muted uppercase tracking-widest",children:"Filters"})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-1",children:[s.jsx(Xl,{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(Xl,{label:Bl[e]??e,active:t.client===e,onClick:()=>n("client",t.client===e?"all":e)},e)),i.map(e=>s.jsx(Xl,{label:e,active:t.language===e,onClick:()=>n("language",t.language===e?"all":e)},e)),a.map(e=>s.jsx(Xl,{label:e,active:t.project===e,onClick:()=>n("project",t.project===e?"all":e)},e))]})]}):null}function Ql(e,t){const n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0});return\`\${n(e)} \u2014 \${n(t)}\`}function Gl(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 Zl={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 Jl({category:e}){const t=Zl[e]??"bg-bg-surface-2 text-text-secondary border-border";return s.jsx("span",{className:\`text-[10px] px-2 py-0.5 rounded-full border font-medium uppercase tracking-wider \${t}\`,children:e})}function eu({session:e,milestones:t,defaultExpanded:n=!1}){const[r,i]=f.useState(n),a=Il[e.client]??"#91919a",o=Ul[e.client]??e.client.slice(0,2).toUpperCase(),l=t.length>0,u=e.project?.trim()||"",c=!u||["untitled","mcp","unknown","default","none","null","undefined"].includes(u.toLowerCase()),d=t[0];let h=u||"Untitled Session",p=!1;if(c&&d)h=d.private_title||d.title,p=!!d.private_title;else if(c&&!d){h=\`\${Bl[e.client]??e.client} \${e.task_type.charAt(0).toUpperCase()+e.task_type.slice(1)}\`}return s.jsxs("div",{className:"mb-1.5 rounded-lg border transition-all duration-200 "+(r?"bg-bg-surface-1 border-border-accent":"bg-bg-surface-1/30 border-border hover:border-border-accent/50"),children:[s.jsxs("button",{className:"w-full flex items-center gap-3 px-3 py-2 text-left",onClick:()=>l&&i(!r),style:{cursor:l?"pointer":"default"},children:[s.jsx("div",{className:"w-8 h-8 rounded-md flex items-center justify-center text-[11px] font-bold font-mono flex-shrink-0",style:{backgroundColor:\`\${a}15\`,color:a,border:\`1px solid \${a}20\`},children:o}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[p&&s.jsx(Z,{className:"w-3 h-3 text-accent-dim flex-shrink-0"}),s.jsx("span",{className:"text-sm font-bold truncate text-text-primary",children:h}),s.jsx("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-1.5 rounded uppercase tracking-tighter",children:e.client})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-text-muted font-medium mt-0.5",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(K,{className:"w-3.5 h-3.5 opacity-70"}),Gl(e.duration_seconds)]}),s.jsx("span",{className:"text-[10px] opacity-60 font-mono",children:Ql(e.started_at,e.ended_at).split(" \u2014 ")[0]})]})]}),s.jsxs("div",{className:"hidden sm:flex items-center gap-2 mr-1",children:[e.languages.length>0&&s.jsx("span",{className:"text-[10px] font-mono text-text-muted/70 bg-bg-surface-2/50 px-1.5 py-0.5 rounded",children:e.languages[0]}),l&&s.jsx("span",{className:"text-[10px] font-bold text-accent/80 bg-accent/5 px-2 py-0.5 rounded border border-accent/10",children:t.length})]}),l&&s.jsx("div",{className:"transition-transform duration-200 "+(r?"rotate-180 text-accent":"text-text-muted"),children:s.jsx(q,{className:"w-4 h-4"})})]}),s.jsx(xs,{children:r&&l&&s.jsx(Ol.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/30 mb-2 mx-1"}),t.map(e=>{const t=!!e.private_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-3 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:$l[e.category]??"#9c9588"}}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-text-secondary group-hover:text-text-primary truncate",children:t}),s.jsx(Jl,{category:e.category})]})}),n&&s.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:n})]},e.id)})]})})})]})}function tu({sessions:e,milestones:t,filters:n}){const r=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]),i=f.useMemo(()=>"all"===n.category?t:t.filter(e=>e.category===n.category),[t,n.category]),a=f.useMemo(()=>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}(r,i),[r,i]);return 0===a.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 mb-4",children:a.map((e,t)=>s.jsx(eu,{session:e.session,milestones:e.milestones,defaultExpanded:0===t&&e.milestones.length>0},e.session.session_id))})}function nu({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(Ol.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(Ol.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 ru(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 iu({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 _("/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(ae,{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: ",ru(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(ne,{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 _("/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 _("/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(ie,{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(J,{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 au=N();const ou={"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"})}};function su(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 lu({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=ou[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),T=f.useRef(e);return f.useEffect(()=>{S&&Math.abs(e-T.current)>1e3&&E(null),T.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:$l[e.milestone.category]??"#9c9588",boxShadow:\`0 0 10px \${$l[e.milestone.category]}50\`}})},n))]})]}),S&&au.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(uu,{session:S.data}):s.jsx(cu,{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 uu({session:e}){const t=Bl[e.client]??e.client,n=e.project?.trim(),r=!n||["untitled","mcp","unknown","default","none"].includes(n.toLowerCase())?\`\${t} \${e.task_type.charAt(0).toUpperCase()+e.task_type.slice(1)}\`:n;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:su(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:r}),s.jsx("div",{className:"text-text-secondary capitalize text-[10px]",children:e.task_type})]})}function cu({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:$l[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 du={"15m":9e5,"30m":18e5,"1h":36e5,"12h":432e5,"24h":864e5},fu={"15m":"15 Minutes","30m":"30 Minutes","1h":"1 Hour","12h":"12 Hours","24h":"24 Hours"};function hu(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 pu=["15m","30m","1h","12h","24h"];function mu({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=hu(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=hu(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(K,{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(te,{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(W,{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:pu.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:fu[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(re,{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(-du[n]),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors",title:\`Back \${fu[n]}\`,children:s.jsx(Y,{className:"w-4 h-4"})}),s.jsx("button",{onClick:()=>k(du[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 \${fu[n]}\`,disabled:o||c>=Date.now()-1e3,children:s.jsx(X,{className:"w-4 h-4"})})]})]})]})]}),s.jsx(lu,{value:c,onChange:w,scale:n,sessions:i,milestones:a})]})}function gu(){const{sessions:e,milestones:t,config:n,health:r,loading:i,timeTravelTime:a,timeScale:o,filters:l,loadAll:u,loadHealth:c,setTimeTravelTime:d,setTimeScale:h,setFilter:p}=O();f.useEffect(()=>{u(),c()},[u,c]),f.useEffect(()=>{const e=setInterval(c,3e4);if(null!==a)return()=>clearInterval(e);const t=setInterval(u,3e4);return()=>{clearInterval(e),clearInterval(t)}},[a,u,c]);const m=null===a,g=a??Date.now(),y=z[o]/2,v=g-y,b=g+y,x=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,v,b),[e,v,b]),w=f.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=new Date(e.created_at).getTime();return r>=t&&r<=n})}(t,v,b),[t,v,b]),k=f.useMemo(()=>function(e){let t=0,n=0;const r={},i={},a={},o={};for(const s of e){t+=s.duration_seconds,n+=s.files_touched,r[s.client]=(r[s.client]??0)+s.duration_seconds;for(const e of s.languages)i[e]=(i[e]??0)+s.duration_seconds;a[s.task_type]=(a[s.task_type]??0)+s.duration_seconds,s.project&&(o[s.project]=(o[s.project]??0)+s.duration_seconds)}return{totalHours:t/3600,totalSessions:e.length,currentStreak:V(e),filesTouched:n,byClient:r,byLanguage:i,byTaskType:a,byProject:o}}(x),[x]),S=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"})}(v,b,m),[v,b,m]),E=f.useMemo(()=>{if(!m)return new Date(g).toISOString().slice(0,10)},[m,g]);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-10",children:[s.jsx(se,{health:r,timeContextLabel:S}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(mu,{value:a,onChange:d,scale:o,onScaleChange:h,sessions:e,milestones:t}),s.jsx(Vl,{totalHours:k.totalHours,totalSessions:k.totalSessions,currentStreak:k.currentStreak,filesTouched:k.filesTouched}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-8",children:s.jsxs("div",{children:[s.jsx(Yl,{stats:k}),s.jsx(Kl,{sessions:x,filters:l,onFilterChange:p}),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("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[x.length," Sessions"]})]}),s.jsx(tu,{sessions:x,milestones:w,filters:l})]})]})}),s.jsx("div",{className:"mt-12",children:s.jsx(nu,{sessions:e,timeScale:o,effectiveTime:g,isLive:m,onDayClick:e=>{const t=new Date(\`\${e}T12:00:00\`).getTime();d(t),h("24h")},highlightDate:E})}),s.jsx(iu,{config:n,onRefresh:u})]})]})})}M.createRoot(document.getElementById("root")).render(s.jsx(f.StrictMode,{children:s.jsx(gu,{})}));</script>
|
|
1915
|
+
<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-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-bold:700;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--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:#09090b;--color-bg-surface-1:#18181b;--color-bg-surface-2:#27272a;--color-bg-surface-3:#3f3f46;--color-text-primary:#fafafa;--color-text-secondary:#a1a1aa;--color-text-muted:#71717a;--color-accent:#6366f1;--color-accent-bright:#818cf8;--color-accent-dim:#3730a3;--color-border:#27272a;--color-border-accent:#6366f133;--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}.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)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-1\\.5{bottom:calc(var(--spacing)*-1.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-3{bottom:calc(var(--spacing)*3)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.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-auto{margin-inline:auto}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-12{margin-top:calc(var(--spacing)*12)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.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-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.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-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-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-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-8{width:calc(var(--spacing)*8)}.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%}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[1000px\\]{max-width:1000px}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[140px\\]{min-width:140px}.min-w-\\[180px\\]{min-width:180px}.flex-1{flex:1}.flex-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))}.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-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}.gap-\\[3px\\]{gap:3px}: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-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)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.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-color:var(--color-accent)}.border-accent\\/10{border-color:#6366f11a}@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:#6366f133}@supports (color:color-mix(in lab,red,red)){.border-accent\\/20{border-color:color-mix(in oklab,var(--color-accent)20%,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-border{border-color:var(--color-border)}.border-border-accent{border-color:var(--color-border-accent)}.border-border\\/30{border-color:#27272a4d}@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:#27272a80}@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:#27272a99}@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-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-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-text-muted\\/20{border-color:#71717a33}@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{background-color:var(--color-accent)}.bg-accent\\/5{background-color:#6366f10d}@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:#6366f11a}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/10{background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.bg-bg-base{background-color:var(--color-bg-base)}.bg-bg-surface-1{background-color:var(--color-bg-surface-1)}.bg-bg-surface-1\\/30{background-color:#18181b4d}@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:#18181b66}@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:#18181b80}@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:#18181bcc}@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{background-color:var(--color-bg-surface-2)}.bg-bg-surface-2\\/50{background-color:#27272a80}@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-3{background-color:var(--color-bg-surface-3)}.bg-bg-surface-3\\/95{background-color:#3f3f46f2}@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-border\\/30{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.bg-border\\/30{background-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.bg-border\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-border\\/50{background-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.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-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-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-text-muted\\/10{background-color:#71717a1a}@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-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))}.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-5{padding-block:calc(var(--spacing)*5)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pl-3{padding-left:calc(var(--spacing)*3)}.text-center{text-align:center}.text-left{text-align:left}.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-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.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)}.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{color:var(--color-accent)}.text-accent-dim{color:var(--color-accent-dim)}.text-accent\\/80{color:#6366f1cc}@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-text-muted{color:var(--color-text-muted)}.text-text-muted\\/70{color:#71717ab3}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/70{color:color-mix(in oklab,var(--color-text-muted)70%,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-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_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-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-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:#6366f133}@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 *){background-color:var(--color-accent)}.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:#6366f11a}@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 *){opacity:1}}.selection\\:bg-accent\\/30 ::selection{background-color:#6366f14d}@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:#6366f14d}@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:#71717a80}@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:#6366f180}@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:#6366f180}@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:#6366f14d}@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:#6366f166}@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-border-accent\\/50:hover{border-color:#6366f11a}@supports (color:color-mix(in lab,red,red)){.hover\\:border-border-accent\\/50:hover{border-color:color-mix(in oklab,var(--color-border-accent)50%,transparent)}}.hover\\:border-text-muted\\/50:hover{border-color:#71717a80}@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-2:hover{background-color:var(--color-bg-surface-2)}.hover\\:bg-bg-surface-2\\/40:hover{background-color:#27272a66}@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:#27272a80}@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\\: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\\:flex{display:flex}.sm\\:flex-row{flex-direction:row}}@media(min-width:48rem){.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}}@media(min-width:64rem){.lg\\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}}::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{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#18181bb3;border:1px solid #ffffff0d;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-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>
|
|
1916
1916
|
</head>
|
|
1917
1917
|
<body>
|
|
1918
1918
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devness/useai",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.27",
|
|
4
4
|
"description": "Track your AI-assisted development workflow. MCP server that records usage metrics across all your AI tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "tsc -p tsconfig.build.json",
|
|
54
54
|
"dev": "tsc --watch",
|
|
55
|
+
"daemon": "pnpm run build && node dist/index.js daemon --port 19201",
|
|
55
56
|
"bundle": "tsup src/index.ts --format esm --target node18 --no-splitting",
|
|
56
57
|
"typecheck": "tsc --noEmit",
|
|
57
58
|
"clean": "rm -rf dist"
|