titan-agent 5.2.0 → 5.3.0
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/README.md +38 -8
- package/dist/eval/harness.js +49 -0
- package/dist/eval/harness.js.map +1 -1
- package/dist/eval/parity.js +148 -0
- package/dist/eval/parity.js.map +1 -0
- package/dist/eval/record.js +96 -0
- package/dist/eval/record.js.map +1 -0
- package/dist/gateway/metrics.js +20 -1
- package/dist/gateway/metrics.js.map +1 -1
- package/dist/gateway/server.js +5 -1
- package/dist/gateway/server.js.map +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/safety.js +31 -1
- package/dist/utils/safety.js.map +1 -1
- package/package.json +5 -1
- package/scripts/eval-gate.sh +189 -0
- package/scripts/eval-record.ts +133 -0
- package/ui/dist/assets/{AuditPanel-DLy0WJQZ.js → AuditPanel-C31LRHZX.js} +1 -1
- package/ui/dist/assets/{AutonomyPanel-DjFAQGns.js → AutonomyPanel-CxQU72ZY.js} +1 -1
- package/ui/dist/assets/{AutopilotPanel-nBluaHA4.js → AutopilotPanel-D4FnBwJm.js} +1 -1
- package/ui/dist/assets/{AutoresearchPanel-BDy8y_Cs.js → AutoresearchPanel-BYHXZ9AO.js} +1 -1
- package/ui/dist/assets/{BackupPanel-B_Fv2pJA.js → BackupPanel-C4CQKf2P.js} +1 -1
- package/ui/dist/assets/{BrowserPanel-DOCT3-Rq.js → BrowserPanel-C-OFYyLm.js} +1 -1
- package/ui/dist/assets/{CPAgents-CpkHf0b8.js → CPAgents-CvkZDm_3.js} +1 -1
- package/ui/dist/assets/{CPDashboard-CnMd6qNK.js → CPDashboard-JmBLBbj7.js} +1 -1
- package/ui/dist/assets/{CPFiles-BDRjJpYl.js → CPFiles-BDToRw0a.js} +1 -1
- package/ui/dist/assets/{CPGoals-2DrwHk62.js → CPGoals-Dh9qJNWa.js} +1 -1
- package/ui/dist/assets/{CPInbox-C6l2o4FD.js → CPInbox-B6iaIbNG.js} +1 -1
- package/ui/dist/assets/{CPSocial-Cea6NptR.js → CPSocial-CsFrwZRC.js} +1 -1
- package/ui/dist/assets/{ChannelsPanel-5EhhyXeg.js → ChannelsPanel-D-S4ktFn.js} +1 -1
- package/ui/dist/assets/{CheckpointsPanel-BVt2oEUe.js → CheckpointsPanel-D-sP9ZuS.js} +1 -1
- package/ui/dist/assets/{CommandPostHub-PXKE62DN.js → CommandPostHub-BhlNyeDH.js} +3 -3
- package/ui/dist/assets/{CronPanel-lAsoKavq.js → CronPanel-Bf3rV7N2.js} +1 -1
- package/ui/dist/assets/{DaemonPanel-xt08Rs10.js → DaemonPanel-GGBWjTG2.js} +1 -1
- package/ui/dist/assets/{DataTable-BHOu7fZP.js → DataTable-D2Px4o6f.js} +1 -1
- package/ui/dist/assets/{EmptyState-Dk7BBthD.js → EmptyState-DH6-Jy6A.js} +1 -1
- package/ui/dist/assets/EvalHarnessPanel-Cz9dRg61.js +2 -0
- package/ui/dist/assets/{EvalPanel-D9rDf1bk.js → EvalPanel-CdjxzHlJ.js} +1 -1
- package/ui/dist/assets/{FilesPanel-CNrDLmix.js → FilesPanel-Dz8TFydL.js} +1 -1
- package/ui/dist/assets/{FleetPanel-DP_ji0AE.js → FleetPanel-CWwWWTD4.js} +1 -1
- package/ui/dist/assets/{HomelabPanel-B4bCsrBw.js → HomelabPanel-C7VBV7AC.js} +1 -1
- package/ui/dist/assets/{InfraView-C5OYx_9s.js → InfraView-B1TgXARJ.js} +2 -2
- package/ui/dist/assets/{InlineEditableField-DyBCbIoN.js → InlineEditableField-DOJNOL8m.js} +1 -1
- package/ui/dist/assets/{Input-DWnbv1Yh.js → Input-BgyHgQ3D.js} +1 -1
- package/ui/dist/assets/{IntegrationsPanel-DsB6hjvE.js → IntegrationsPanel-O26b4nhv.js} +1 -1
- package/ui/dist/assets/{IntelligenceView-PIFGvIg_.js → IntelligenceView-DUhTQ8f_.js} +2 -2
- package/ui/dist/assets/{LearningPanel-D_S4HFX5.js → LearningPanel-DX5S9ovg.js} +1 -1
- package/ui/dist/assets/{LogsPanel-BnWNREPX.js → LogsPanel-DdeTnATQ.js} +1 -1
- package/ui/dist/assets/{McpPanel-CIMxZ2Am.js → McpPanel-BpXWrP1a.js} +1 -1
- package/ui/dist/assets/{MemoryGraphPanel-DD7x4rrm.js → MemoryGraphPanel-CNkZmTUy.js} +1 -1
- package/ui/dist/assets/{MemoryWikiPanel-BPPVAH0b.js → MemoryWikiPanel-o4L8Df-n.js} +1 -1
- package/ui/dist/assets/{MeshPanel-CiuwR3oV.js → MeshPanel-DMBQJFCC.js} +1 -1
- package/ui/dist/assets/{NvidiaPanel-DVntoRrH.js → NvidiaPanel-C8P-tJFG.js} +1 -1
- package/ui/dist/assets/{OrganismPanel-pqIKtHrW.js → OrganismPanel-CcfHDWDk.js} +1 -1
- package/ui/dist/assets/OverviewPanel-BSotI1Zv.js +1 -0
- package/ui/dist/assets/{PageHeader-CF75km05.js → PageHeader-DPJuAgJk.js} +1 -1
- package/ui/dist/assets/{PaperclipPanel-CwN5-cKg.js → PaperclipPanel-aXoXUjo6.js} +1 -1
- package/ui/dist/assets/{PersonasPanel-ClC_TTGX.js → PersonasPanel-DdPZxz2C.js} +1 -1
- package/ui/dist/assets/{RecipesPanel-Di2l-eOe.js → RecipesPanel-D7qffXQN.js} +1 -1
- package/ui/dist/assets/{SecurityPanel-DjC4pXGM.js → SecurityPanel-BDRK5el7.js} +1 -1
- package/ui/dist/assets/{SelfImprovePanel-CNpCp5N4.js → SelfImprovePanel-oYiMwFnA.js} +1 -1
- package/ui/dist/assets/{SelfProposalsPanel-BJL6Fjxo.js → SelfProposalsPanel-DOpNU_rr.js} +1 -1
- package/ui/dist/assets/{SessionsPanel-EAGKDQp0.js → SessionsPanel-eRbM3D9P.js} +1 -1
- package/ui/dist/assets/{SessionsTab-tc0njI15.js → SessionsTab-Jq3UKQCI.js} +1 -1
- package/ui/dist/assets/{SettingsPanel-BdSGImIa.js → SettingsPanel-DBIvKUYY.js} +1 -1
- package/ui/dist/assets/{SettingsView-DQB64bjy.js → SettingsView-yfSY4OLt.js} +2 -2
- package/ui/dist/assets/{SkeletonLoader-P8SFCyGi.js → SkeletonLoader-D1d-Gyyg.js} +1 -1
- package/ui/dist/assets/{SkillsPanel-lDMl_8da.js → SkillsPanel-bubl9nag.js} +1 -1
- package/ui/dist/assets/{SomaView-BG7YvBu2.js → SomaView-D3aFL8Tw.js} +1 -1
- package/ui/dist/assets/{StatCard-Cv2u-yqA.js → StatCard-CEVFsz7t.js} +1 -1
- package/ui/dist/assets/{StatusBadge-JJeoEdCm.js → StatusBadge-DxeA9LNd.js} +1 -1
- package/ui/dist/assets/{TeamsPanel-D-iCyyYd.js → TeamsPanel-D6IJJIR_.js} +1 -1
- package/ui/dist/assets/{TelemetryPanel-DHNFyCwn.js → TelemetryPanel-SMPebdjQ.js} +1 -1
- package/ui/dist/assets/{TitanCanvas-BhurNMK3.js → TitanCanvas-BQU1yxqf.js} +3 -3
- package/ui/dist/assets/ToolsView-DgP4uRPr.js +2 -0
- package/ui/dist/assets/{Tooltip-D4IeQDJL.js → Tooltip-CNPQr7IO.js} +1 -1
- package/ui/dist/assets/{TraceViewer-CMd-Wi0z.js → TraceViewer-BbISy_ET.js} +1 -1
- package/ui/dist/assets/{TrainingPanel-CLtiBq2h.js → TrainingPanel-BdCHcv6t.js} +1 -1
- package/ui/dist/assets/{VoiceOverlay-BXPVdnJc.js → VoiceOverlay-l6yoasVz.js} +1 -1
- package/ui/dist/assets/{VramPanel-DjuwGUzA.js → VramPanel-XLhmen92.js} +1 -1
- package/ui/dist/assets/{WatchView-B7sDnMpl.js → WatchView-Bt-lNNWJ.js} +1 -1
- package/ui/dist/assets/{WorkTab-B5nQ4Y7A.js → WorkTab-IG-F6Qll.js} +1 -1
- package/ui/dist/assets/{WorkflowsPanel-2z0TeXyR.js → WorkflowsPanel-DsMpnwLK.js} +1 -1
- package/ui/dist/assets/{arrow-left-BKOkzkae.js → arrow-left-C_H9Z2Tm.js} +1 -1
- package/ui/dist/assets/{chart-column-D39PCk17.js → chart-column-rR6tb72l.js} +1 -1
- package/ui/dist/assets/{circle-check-big-CMz0QouP.js → circle-check-big-B1hMwau0.js} +1 -1
- package/ui/dist/assets/{dollar-sign-Bu8fZOQl.js → dollar-sign-DhYwsTnR.js} +1 -1
- package/ui/dist/assets/{download-vvx6zJ-U.js → download-UDDcAlZC.js} +1 -1
- package/ui/dist/assets/{eye-off-BPXFIzlW.js → eye-off-Cx0M_VQb.js} +1 -1
- package/ui/dist/assets/{funnel-Bqns-i8I.js → funnel-B7YvM1ei.js} +1 -1
- package/ui/dist/assets/{git-branch-CdmeqL8d.js → git-branch-BhTBN3J6.js} +1 -1
- package/ui/dist/assets/index-D0RJ8701.css +1 -0
- package/ui/dist/assets/{index-C6oarzis.js → index-D7Clon2u.js} +2 -2
- package/ui/dist/assets/layers-B6jDzitD.js +6 -0
- package/ui/dist/assets/{legacy-DFIaZTiF.js → legacy-av079XKu.js} +1 -1
- package/ui/dist/assets/{lightbulb-DOL6Q-iP.js → lightbulb-DRuQ3Chf.js} +1 -1
- package/ui/dist/assets/{pause-B0XymOnS.js → pause-DqkRWPB_.js} +1 -1
- package/ui/dist/assets/{play-Dwp2l5HG.js → play-hUyR3CVS.js} +1 -1
- package/ui/dist/assets/{plug-DRlTjWqQ.js → plug-CvpyjJt_.js} +1 -1
- package/ui/dist/assets/{proxy-sXxWK7WF.js → proxy-Cc5bR828.js} +1 -1
- package/ui/dist/assets/{square-yh0jffQZ.js → square-CdiC0J8Z.js} +1 -1
- package/ui/dist/assets/{target-GxtNG2RW.js → target-DemL8_0v.js} +1 -1
- package/ui/dist/assets/{toggle-right-CYQd_Ux1.js → toggle-right-Dsk892k5.js} +1 -1
- package/ui/dist/assets/{trash-2-B4jp_pAQ.js → trash-2-Byj4OvKB.js} +1 -1
- package/ui/dist/assets/{trending-up-B26tNhFP.js → trending-up-Dh_CffGX.js} +1 -1
- package/ui/dist/assets/{trophy-Bf3ZeSeb.js → trophy-DDr2AePx.js} +1 -1
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/EvalHarnessPanel-CJv8CUDy.js +0 -1
- package/ui/dist/assets/OverviewPanel-gqYRhmpF.js +0 -6
- package/ui/dist/assets/ToolsView-C8sWxLny.js +0 -2
- package/ui/dist/assets/index-DsFoD9SP.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as T,j as et}from"./index-C6oarzis.js";const qe=T.createContext({});function Ze(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const Lo=typeof window<"u",Gs=Lo?T.useLayoutEffect:T.useEffect,ae=T.createContext(null);function Je(t,e){t.indexOf(e)===-1&&t.push(e)}function Qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const J=(t,e,n)=>n>e?e:n<t?t:n;let Qe=()=>{};const nt={},Hs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function _s(t){return typeof t=="object"&&t!==null}const Xs=t=>/^0[^.\s]+$/u.test(t);function Ys(t){let e;return()=>(e===void 0&&(e=t()),e)}const z=t=>t,ko=(t,e)=>n=>e(t(n)),Ot=(...t)=>t.reduce(ko),kt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class tn{constructor(){this.subscriptions=[]}add(e){return Je(this.subscriptions,e),()=>Qt(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const W=t=>t*1e3,$=t=>t/1e3;function qs(t,e){return e?t*(1e3/e):0}const Zs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Fo=1e-7,Io=12;function Bo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Zs(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Fo&&++a<Io);return o}function jt(t,e,n,s){if(t===e&&n===s)return z;const i=r=>Bo(r,0,1,t,n);return r=>r===0||r===1?r:Zs(i(r),e,s)}const Js=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Qs=t=>e=>1-t(1-e),ti=jt(.33,1.53,.69,.99),en=Qs(ti),ei=Js(en),ni=t=>(t*=2)<1?.5*en(t):.5*(2-Math.pow(2,-10*(t-1))),nn=t=>1-Math.sin(Math.acos(t)),si=Qs(nn),ii=Js(nn),Oo=jt(.42,0,1,1),jo=jt(0,0,.58,1),oi=jt(.42,0,.58,1),No=t=>Array.isArray(t)&&typeof t[0]!="number",ri=t=>Array.isArray(t)&&typeof t[0]=="number",Uo={linear:z,easeIn:Oo,easeInOut:oi,easeOut:jo,circIn:nn,circInOut:ii,circOut:si,backIn:en,backInOut:ei,backOut:ti,anticipate:ni},Wo=t=>typeof t=="string",Mn=t=>{if(ri(t)){Qe(t.length===4);const[e,n,s,i]=t;return jt(e,n,s,i)}else if(Wo(t))return Uo[t];return t},Wt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ko(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const p=f&&i?n:s;return h&&o.add(c),p.has(c)||p.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const $o=40;function ai(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Wt.reduce((v,S)=>(v[S]=Ko(r),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:p}=o,m=()=>{const v=nt.useManualTiming?i.timestamp:performance.now();n=!1,nt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,$o),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:Wt.reduce((v,S)=>{const P=o[S];return v[S]=(C,L=!1,A=!1)=>(n||g(),P.schedule(C,L,A)),v},{}),cancel:v=>{for(let S=0;S<Wt.length;S++)o[Wt[S]].cancel(v)},state:i,steps:o}}const{schedule:M,cancel:rt,state:O,steps:he}=ai(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0);let Ht;function zo(){Ht=void 0}const N={now:()=>(Ht===void 0&&N.set(O.isProcessing||nt.useManualTiming?O.timestamp:performance.now()),Ht),set:t=>{Ht=t,queueMicrotask(zo)}},li=t=>e=>typeof e=="string"&&e.startsWith(t),ci=li("--"),Go=li("var(--"),sn=t=>Go(t)?Ho.test(t.split("/*")[0].trim()):!1,Ho=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Dn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const bt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ft={...bt,transform:t=>J(0,1,t)},Kt={...bt,default:1},Dt=t=>Math.round(t*1e5)/1e5,on=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _o(t){return t==null}const Xo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rn=(t,e)=>n=>!!(typeof n=="string"&&Xo.test(n)&&n.startsWith(t)||e&&!_o(n)&&Object.prototype.hasOwnProperty.call(n,e)),ui=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(on);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Yo=t=>J(0,255,t),fe={...bt,transform:t=>Math.round(Yo(t))},ht={test:rn("rgb","red"),parse:ui("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+Dt(Ft.transform(s))+")"};function qo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ce={test:rn("#"),parse:qo,transform:ht.transform},Nt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Nt("deg"),Z=Nt("%"),w=Nt("px"),Zo=Nt("vh"),Jo=Nt("vw"),En={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},gt={test:rn("hsl","hue"),parse:ui("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Dt(e))+", "+Z.transform(Dt(n))+", "+Dt(Ft.transform(s))+")"},k={test:t=>ht.test(t)||Ce.test(t)||gt.test(t),parse:t=>ht.test(t)?ht.parse(t):gt.test(t)?gt.parse(t):Ce.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ht.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=k.parse(t);return e.alpha=0,k.transform(e)}},Qo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function tr(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(on))==null?void 0:e.length)||0)+(((n=t.match(Qo))==null?void 0:n.length)||0)>0}const hi="number",fi="color",er="var",nr="var(",Rn="${}",sr=/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 St(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(sr,l=>(k.test(l)?(s.color.push(r),i.push(fi),n.push(k.parse(l))):l.startsWith(nr)?(s.var.push(r),i.push(er),n.push(l)):(s.number.push(r),i.push(hi),n.push(parseFloat(l))),++r,Rn)).split(Rn);return{values:n,split:a,indexes:s,types:i}}function ir(t){return St(t).values}function di({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===hi?i+=Dt(s[r]):o===fi?i+=k.transform(s[r]):i+=s[r]}return i}}function or(t){return di(St(t))}const rr=t=>typeof t=="number"?0:k.test(t)?k.getAnimatableNone(t):t,ar=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:rr(t);function lr(t){const e=St(t);return di(e)(e.values.map((s,i)=>ar(s,e.split[i])))}const _={test:tr,parse:ir,createTransformer:or,getAnimatableNone:lr};function de(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function cr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=de(l,a,t+1/3),r=de(l,a,t),o=de(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function te(t,e){return n=>n>0?e:t}const E=(t,e,n)=>t+(e-t)*n,pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ur=[Ce,ht,gt],hr=t=>ur.find(e=>e.test(t));function Ln(t){const e=hr(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=cr(n)),n}const kn=(t,e)=>{const n=Ln(t),s=Ln(e);if(!n||!s)return te(t,e);const i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=E(n.alpha,s.alpha,r),ht.transform(i))},Me=new Set(["none","hidden"]);function fr(t,e){return Me.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function dr(t,e){return n=>E(t,e,n)}function an(t){return typeof t=="number"?dr:typeof t=="string"?sn(t)?te:k.test(t)?kn:gr:Array.isArray(t)?pi:typeof t=="object"?k.test(t)?kn:pr:te}function pi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>an(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function pr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=an(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function mr(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const gr=(t,e)=>{const n=_.createTransformer(e),s=St(t),i=St(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Me.has(t)&&!i.values.length||Me.has(e)&&!s.values.length?fr(t,e):Ot(pi(mr(s,i),i.values),n):te(t,e)};function mi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?E(t,e,n):an(t)(t,e)}const yr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>rt(e),now:()=>O.isProcessing?O.timestamp:N.now()}},gi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},ee=2e4;function ln(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ee;)e+=n,s=t.next(e);return e>=ee?1/0:e}function vr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(ln(s),ee);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:$(i)}}const R={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function De(t,e){return t*Math.sqrt(1-e*e)}const xr=12;function Tr(t,e,n){let s=n;for(let i=1;i<xr;i++)s=s-t(s)/e(s);return s}const me=.001;function wr({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,r,o=1-e;o=J(R.minDamping,R.maxDamping,o),t=J(R.minDuration,R.maxDuration,$(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=De(u,o),p=Math.exp(-h);return me-f/d*p},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-h),m=De(Math.pow(u,2),o);return(-i(u)+me>0?-1:1)*((f-d)*p)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-me+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Tr(i,r,a);if(t=W(t),isNaN(l))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Sr=["duration","bounce"],Pr=["stiffness","damping","mass"];function Fn(t,e){return e.some(n=>t[n]!==void 0)}function br(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!Fn(t,Pr)&&Fn(t,Sr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:r}}else{const n=wr({...t,velocity:0});e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function ne(t=R.visualDuration,e=R.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=br({...n,velocity:-$(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),g=o-r,y=$(Math.sqrt(l/c)),x=Math.abs(g)<5;s||(s=x?R.restSpeed.granular:R.restSpeed.default),i||(i=x?R.restDelta.granular:R.restDelta.default);let v,S,P,C,L,A;if(m<1)P=De(y,m),C=(p+m*y*g)/P,v=b=>{const D=Math.exp(-m*y*b);return o-D*(C*Math.sin(P*b)+g*Math.cos(P*b))},L=m*y*C+g*P,A=m*y*g-C*P,S=b=>Math.exp(-m*y*b)*(L*Math.sin(P*b)+A*Math.cos(P*b));else if(m===1){v=D=>o-Math.exp(-y*D)*(g+(p+y*g)*D);const b=p+y*g;S=D=>Math.exp(-y*D)*(y*b*D-p)}else{const b=y*Math.sqrt(m*m-1);v=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(b*X,300);return o-tt*((p+m*y*g)*Math.sinh(Y)+b*g*Math.cosh(Y))/b};const D=(p+m*y*g)/b,I=m*y*D-g*b,Q=m*y*g-D*b;S=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(b*X,300);return tt*(I*Math.sinh(Y)+Q*Math.cosh(Y))}}const V={calculatedDuration:d&&h||null,velocity:b=>W(S(b)),next:b=>{if(!d&&m<1){const I=Math.exp(-m*y*b),Q=Math.sin(P*b),X=Math.cos(P*b),tt=o-I*(C*Q+g*X),Y=W(I*(L*Q+A*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-tt)<=i,a.value=a.done?o:tt,a}const D=v(b);if(d)a.done=b>=h;else{const I=W(S(b));a.done=Math.abs(I)<=s&&Math.abs(o-D)<=i}return a.value=a.done?o:D,a},toString:()=>{const b=Math.min(ln(V),ee),D=gi(I=>V.next(b*I).value,b,30);return b+"ms "+D},toTransition:()=>{}};return V}ne.applyToOptions=t=>{const e=vr(t,100,ne);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const Ar=5;function yi(t,e,n){const s=Math.max(e-Ar,0);return qs(n-t(s),e-s)}function Ee({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const x=A=>-m*Math.exp(-A/s),v=A=>y+x(A),S=A=>{const V=x(A),b=v(A);f.done=Math.abs(V)<=u,f.value=f.done?y:b};let P,C;const L=A=>{d(f.value)&&(P=A,C=ne({keyframes:[f.value,p(f.value)],velocity:yi(v,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return L(0),{calculatedDuration:null,next:A=>{let V=!1;return!C&&P===void 0&&(V=!0,S(A),L(A)),P!==void 0&&A>=P?C.next(A-P):(!V&&S(A),f)}}}function Vr(t,e,n){const s=[],i=n||nt.mix||mi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||z:e;a=Ot(l,a)}s.push(a)}return s}function Cr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Qe(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Vr(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=kt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(J(t[0],t[r-1],c)):u}function Mr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=kt(0,e,s);t.push(E(n,1,i))}}function Dr(t){const e=[0];return Mr(e,t.length-1),e}function Er(t,e){return t.map(n=>n*e)}function Rr(t,e){return t.map(()=>e||oi).splice(0,t.length-1)}function Et({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=No(s)?s.map(Mn):Mn(s),r={done:!1,value:e[0]},o=Er(n&&n.length===e.length?n:Dr(e),t),a=Cr(o,e,{ease:Array.isArray(i)?i:Rr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Lr=t=>t!==null;function cn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Lr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const kr={decay:Ee,inertia:Ee,tween:Et,keyframes:Et,spring:ne};function vi(t){typeof t.type=="string"&&(t.type=kr[t.type])}class un{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Fr=t=>t/100;class hn extends un{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;vi(e);const{type:n=Et,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Et;l!==Et&&typeof a[0]!="number"&&(this.mixKeyframes=Ot(Fr,mi(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ln(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,S=s;if(h){const A=Math.min(this.currentTime,i)/a;let V=Math.floor(A),b=A%1;!b&&A>=1&&(b=1),b===1&&V--,V=Math.min(V,h+1),!!(V%2)&&(f==="reverse"?(b=1-b,d&&(b-=d/a)):f==="mirror"&&(S=o)),v=J(0,1,b)*a}const P=x?{done:!1,value:c[0]}:S.next(v);r&&!x&&(P.value=r(P.value));let{done:C}=P;!x&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return L&&p!==Ee&&(P.value=cn(c,this.options,g,this.speed)),m&&m(P.value),L&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return $(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return yi(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=$(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:e=yr,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(N.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Ir(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ft=t=>t*180/Math.PI,Re=t=>{const e=ft(Math.atan2(t[1],t[0]));return Le(e)},Br={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Re,rotateZ:Re,skewX:t=>ft(Math.atan(t[1])),skewY:t=>ft(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Le=t=>(t=t%360,t<0&&(t+=360),t),In=Re,Bn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),On=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Or={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bn,scaleY:On,scale:t=>(Bn(t)+On(t))/2,rotateX:t=>Le(ft(Math.atan2(t[6],t[5]))),rotateY:t=>Le(ft(Math.atan2(-t[2],t[0]))),rotateZ:In,rotate:In,skewX:t=>ft(Math.atan(t[4])),skewY:t=>ft(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ke(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||t==="none")return ke(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Or,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Br,i=a}if(!i)return ke(e);const r=s[e],o=i[1].split(",").map(Nr);return typeof r=="function"?r(o):o[r]}const jr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)};function Nr(t){return parseFloat(t.trim())}const At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vt=new Set(At),jn=t=>t===bt||t===w,Ur=new Set(["x","y","z"]),Wr=At.filter(t=>!Ur.has(t));function Kr(t){const e=[];return Wr.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ot={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Fe(e,"x"),y:(t,{transform:e})=>Fe(e,"y")};ot.translateX=ot.x;ot.translateY=ot.y;const dt=new Set;let Ie=!1,Be=!1,Oe=!1;function xi(){if(Be){const t=Array.from(dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Kr(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Be=!1,Ie=!1,dt.forEach(t=>t.complete(Oe)),dt.clear()}function Ti(){dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Be=!0)})}function $r(){Oe=!0,Ti(),xi(),Oe=!1}class fn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(dt.add(this),Ie||(Ie=!0,M.read(Ti),M.resolveKeyframes(xi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Ir(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),dt.delete(this)}cancel(){this.state==="scheduled"&&(dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zr=t=>t.startsWith("--");function wi(t,e,n){zr(e)?t.style.setProperty(e,n):t.style[e]=n}const Gr={};function Si(t,e){const n=Ys(t);return()=>Gr[e]??n()}const Hr=Si(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Pi=Si(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Nn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mt([0,.65,.55,1]),circOut:Mt([.55,0,1,.45]),backIn:Mt([.31,.01,.66,-.59]),backOut:Mt([.33,1.53,.69,.99])};function bi(t,e){if(t)return typeof t=="function"?Pi()?gi(t,e):"ease-out":ri(t)?Mt(t):Array.isArray(t)?t.map(n=>bi(n,e)||Nn.easeOut):Nn[t]}function _r(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=bi(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function Ai(t){return typeof t=="function"&&"applyToOptions"in t}function Xr({type:t,...e}){return Ai(t)&&Pi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Vi extends un{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,Qe(typeof e.type!="string");const u=Xr(e);this.animation=_r(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=cn(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),wi(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,i;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return $(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=W(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"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,rangeStart:n,rangeEnd:s,observe:i}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Hr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),z):i(this)}}const Ci={anticipate:ni,backInOut:ei,circInOut:ii};function Yr(t){return t in Ci}function qr(t){typeof t.ease=="string"&&Yr(t.ease)&&(t.ease=Ci[t.ease])}const ge=10;class Zr extends Vi{constructor(e){qr(e),vi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new hn({...o,autoplay:!1}),l=Math.max(ge,N.now()-this.startTime),u=J(0,ge,l-ge),c=a.sample(l).value,{name:h}=this.options;r&&h&&wi(r,h,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Un=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function Jr(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Qr(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=Un(i,e),a=Un(r,e);return!o||!a?!1:Jr(t)||(n==="spring"||Ai(n))&&s}function je(t){t.duration=0,t.type="keyframes"}const ta=new Set(["opacity","clipPath","filter","transform"]),ea=Ys(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function na(t){var c;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return ea()&&n&&ta.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const sa=40;class ia extends un{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var p;super(),this.stop=()=>{var m,g;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=N.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||fn;this.keyframeResolver=new d(a,(m,g,y)=>this.onKeyframesResolved(m,g,f,!y),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(e,n,s,i){var g,y;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=N.now(),Qr(e,r,o,a)||((nt.instantAnimations||!l)&&(c==null||c(cn(e,s,n))),e[0]=e[e.length-1],je(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>sa?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&na(f),p=(y=(g=f.motionValue)==null?void 0:g.owner)==null?void 0:y.current,m=d?new Zr({...f,element:p}):new hn(f);m.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),$r()),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(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function Mi(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const oa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ra(t){const e=oa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Di(t,e,n=1){const[s,i]=ra(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Hs(o)?parseFloat(o):o}return sn(i)?Di(i,e,n+1):i}const aa={type:"spring",stiffness:500,damping:25,restSpeed:10},la=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ca={type:"keyframes",duration:.8},ua={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ha=(t,{keyframes:e})=>e.length>2?ca:Vt.has(t)?t.startsWith("scale")?la(e[1]):aa:ua,fa=t=>t!==null;function da(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(fa),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}function Ei(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function dn(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Ei(n,t):n}function pa({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const pn=(t,e,n,s={},i,r)=>o=>{const a=dn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-W(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};pa(a)||Object.assign(c,ha(t,c)),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(je(c),c.delay===0&&(h=!0)),(nt.instantAnimations||nt.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,je(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=da(c.keyframes,a);if(f!==void 0){M.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new hn(c):new ia(c)};function Wn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function mn(t,e,n,s){if(typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function wt(t,e,n){const s=t.getProps();return mn(s,e,n!==void 0?n:s.custom,t)}const Ri=new Set(["width","height","top","left","right","bottom",...At]),Kn=30,ma=t=>!isNaN(parseFloat(t));class ga{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=N.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=N.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ma(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new tn);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.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=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Kn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Kn);return qs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pt(t,e){return new ga(t,e)}const Ne=t=>Array.isArray(t);function ya(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Pt(n))}function va(t){return Ne(t)?t[t.length-1]||0:t}function xa(t,e){const n=wt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=va(r[o]);ya(t,o,a)}}const j=t=>!!(t&&t.getVelocity);function Ta(t){return!!(j(t)&&t.add)}function Ue(t,e){const n=t.getValue("willChange");if(Ta(n))return n.add(e);if(!n&&nt.WillChange){const s=new nt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function gn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const wa="framerAppearId",Li="data-"+gn(wa);function ki(t){return t.props[Li]}function Sa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Fi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Ei(r,l):l;const u=r==null?void 0:r.reduceMotion;s&&(r=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),p=a[f];if(p===void 0||h&&Sa(h,f))continue;const m={delay:n,...dn(r||{},f)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===g&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const S=ki(t);if(S){const P=window.MotionHandoffAnimation(S,f,M);P!==null&&(m.startTime=P,y=!0)}}Ue(t,f);const x=u??t.shouldReduceMotion;d.start(pn(f,d,p,x&&Ri.has(f)?{type:!1}:m,t,y));const v=d.animation;v&&c.push(v)}if(o){const f=()=>M.update(()=>{o&&xa(t,o)});c.length?Promise.all(c).then(f):f()}return c}function We(t,e,n={}){var l;const s=wt(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Fi(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return Pa(t,e,u,c,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Pa(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(We(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Mi(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function ba(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>We(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=We(t,e,n);else{const i=typeof e=="function"?wt(t,e,n.custom):e;s=Promise.all(Fi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Aa={test:t=>t==="auto",parse:t=>t},Ii=t=>e=>e.test(t),Bi=[bt,w,Z,st,Jo,Zo,Aa],$n=t=>Bi.find(Ii(t));function Va(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Xs(t):!0}const Ca=new Set(["brightness","contrast","saturate","opacity"]);function Ma(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(on)||[];if(!s)return t;const i=n.replace(s,"");let r=Ca.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Da=/\b([a-z-]*)\(.*?\)/gu,Ke={..._,getAnimatableNone:t=>{const e=t.match(Da);return e?e.map(Ma).join(" "):t}},$e={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},zn={...bt,transform:Math.round},Ea={rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:st,skewX:st,skewY:st,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:Ft,originX:En,originY:En,originZ:w},yn={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,top:w,right:w,bottom:w,left:w,inset:w,insetBlock:w,insetBlockStart:w,insetBlockEnd:w,insetInline:w,insetInlineStart:w,insetInlineEnd:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,paddingBlock:w,paddingBlockStart:w,paddingBlockEnd:w,paddingInline:w,paddingInlineStart:w,paddingInlineEnd:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,marginBlock:w,marginBlockStart:w,marginBlockEnd:w,marginInline:w,marginInlineStart:w,marginInlineEnd:w,fontSize:w,backgroundPositionX:w,backgroundPositionY:w,...Ea,zIndex:zn,fillOpacity:Ft,strokeOpacity:Ft,numOctaves:zn},Ra={...yn,color:k,backgroundColor:k,outlineColor:k,fill:k,stroke:k,borderColor:k,borderTopColor:k,borderRightColor:k,borderBottomColor:k,borderLeftColor:k,filter:Ke,WebkitFilter:Ke,mask:$e,WebkitMask:$e},Oi=t=>Ra[t],La=new Set([Ke,$e]);function ji(t,e){let n=Oi(t);return La.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ka=new Set(["auto","none","0"]);function Fa(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!ka.has(r)&&St(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=ji(n,i)}class Ia extends fn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),sn(h))){const f=Di(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Ri.has(s)||e.length!==2)return;const[i,r]=e,o=$n(i),a=$n(r),l=Dn(i),u=Dn(r);if(l!==u&&ot[s]){this.needsMeasurement=!0;return}if(o!==a)if(jn(o)&&jn(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else ot[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Va(e[i]))&&s.push(i);s.length&&Fa(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ot[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=ot[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Ba=new Set(["opacity","clipPath","filter","transform"]);function Ni(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const Ui=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function _t(t){return _s(t)&&"offsetHeight"in t}const{schedule:vn}=ai(queueMicrotask,!1),H={x:!1,y:!1};function Wi(){return H.x||H.y}function Oa(t){return t==="x"||t==="y"?H[t]?null:(H[t]=!0,()=>{H[t]=!1}):H.x||H.y?null:(H.x=H.y=!0,()=>{H.x=H.y=!1})}function Ki(t,e){const n=Ni(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ja(t){return!(t.pointerType==="touch"||Wi())}function Na(t,e,n={}){const[s,i,r]=Ki(t,n);return s.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},h=g=>{u&&(u(g),u=void 0),c()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(g))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=g=>{if(g.pointerType!=="touch"){if(a){l=!0;return}h(g)}},m=g=>{if(!ja(g))return;l=!1;const y=e(o,g);typeof y=="function"&&(u=y,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",d,i)}),r}const $i=(t,e)=>e?t===e?!0:$i(t,e.parentElement):!1,xn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ua=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wa(t){return Ua.has(t.tagName)||t.isContentEditable===!0}const Ka=new Set(["INPUT","SELECT","TEXTAREA"]);function $a(t){return Ka.has(t.tagName)||t.isContentEditable===!0}const Xt=new WeakSet;function Gn(t){return e=>{e.key==="Enter"&&t(e)}}function ye(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const za=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Gn(()=>{if(Xt.has(n))return;ye(n,"down");const i=Gn(()=>{ye(n,"up")}),r=()=>ye(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Hn(t){return xn(t)&&!Wi()}const _n=new WeakSet;function Ga(t,e,n={}){const[s,i,r]=Ki(t,n),o=a=>{const l=a.currentTarget;if(!Hn(a)||_n.has(a))return;Xt.add(l),n.stopPropagation&&_n.add(a);const u=e(l,a),c=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Xt.has(l)&&Xt.delete(l),Hn(d)&&typeof u=="function"&&u(d,{success:p})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||$i(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),_t(a)&&(a.addEventListener("focus",u=>za(u,i)),!Wa(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Tn(t){return _s(t)&&"ownerSVGElement"in t}const Yt=new WeakMap;let it;const zi=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Tn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ha=zi("inline","width","offsetWidth"),_a=zi("block","height","offsetHeight");function Xa({target:t,borderBoxSize:e}){var n;(n=Yt.get(t))==null||n.forEach(s=>{s(t,{get width(){return Ha(t,e)},get height(){return _a(t,e)}})})}function Ya(t){t.forEach(Xa)}function qa(){typeof ResizeObserver>"u"||(it=new ResizeObserver(Ya))}function Za(t,e){it||qa();const n=Ni(t);return n.forEach(s=>{let i=Yt.get(s);i||(i=new Set,Yt.set(s,i)),i.add(e),it==null||it.observe(s)}),()=>{n.forEach(s=>{const i=Yt.get(s);i==null||i.delete(e),i!=null&&i.size||it==null||it.unobserve(s)})}}const qt=new Set;let yt;function Ja(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};qt.forEach(e=>e(t))},window.addEventListener("resize",yt)}function Qa(t){return qt.add(t),yt||Ja(),()=>{qt.delete(t),!qt.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function Xn(t,e){return typeof t=="function"?Qa(t):Za(t,e)}function tl(t){return Tn(t)&&t.tagName==="svg"}const el=[...Bi,k,_],nl=t=>el.find(Ii(t)),Yn=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Yn(),y:Yn()}),qn=()=>({min:0,max:0}),F=()=>({x:qn(),y:qn()}),sl=new WeakMap;function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function It(t){return typeof t=="string"||Array.isArray(t)}const wn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sn=["initial",...wn];function ce(t){return le(t.animate)||Sn.some(e=>It(t[e]))}function Gi(t){return!!(ce(t)||t.variants)}function il(t,e,n){for(const s in e){const i=e[s],r=n[s];if(j(i))t.addValue(s,i);else if(j(r))t.addValue(s,Pt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Pt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ze={current:null},Hi={current:!1},ol=typeof window<"u";function rl(){if(Hi.current=!0,!!ol)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ze.current=t.matches;t.addEventListener("change",e),e()}else ze.current=!1}const Zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let se={};function _i(t){se=t}function al(){return se}class ll{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){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=fn,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 d=N.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,M.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=ce(n),this.isVariantNode=Gi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];u[d]!==void 0&&j(p)&&p.set(u[d])}}mount(e){var n,s;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=e,sl.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((i,r)=>this.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hi.current||rl(),this.shouldReduceMotion=ze.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),rt(this.notifyUpdate),rt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.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,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Ba.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,h=new Vi({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:W(c)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=Vt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in se){const n=se[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Zn.length;s++){const i=Zn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=il(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Pt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Hs(s)||Xs(s))?s=parseFloat(s):!nl(s)&&_.test(n)&&(s=ji(e,n)),this.setBaseTarget(e,j(s)?s.get():s)),j(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=mn(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!j(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new tn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){vn.render(this.render)}}class Xi extends ll{constructor(){super(...arguments),this.KeyframeResolver=Ia}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;j(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class at{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Yi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function cl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ul(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ve(t){return t===void 0||t===1}function Ge({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function ut(t){return Ge(t)||qi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function qi(t){return Jn(t.x)||Jn(t.y)}function Jn(t){return t&&t!=="0%"}function ie(t,e,n){const s=t-n,i=e*s;return n+i}function Qn(t,e,n,s,i){return i!==void 0&&(t=ie(t,i,s)),ie(t,n,s)+e}function He(t,e=0,n=1,s,i){t.min=Qn(t.min,e,n,s,i),t.max=Qn(t.max,e,n,s,i)}function Zi(t,{x:e,y:n}){He(t.x,e.translate,e.scale,e.originPoint),He(t.y,n.translate,n.scale,n.originPoint)}const ts=.999999999999,es=1.0000000000001;function hl(t,e,n,s=!1){var a;const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let l=0;l<i;l++){r=n[l],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Tt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Zi(t,o)),s&&ut(r.latestValues)&&Tt(t,r.latestValues,(a=r.layout)==null?void 0:a.layoutBox))}e.x<es&&e.x>ts&&(e.x=1),e.y<es&&e.y>ts&&(e.y=1)}function xt(t,e){t.min=t.min+e,t.max=t.max+e}function ns(t,e,n,s,i=.5){const r=E(t.min,t.max,i);He(t,e,n,r,s)}function ss(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Tt(t,e,n){const s=n??t;ns(t.x,ss(e.x,s.x),e.scaleX,e.scale,e.originX),ns(t.y,ss(e.y,s.y),e.scaleY,e.scale,e.originY)}function Ji(t,e){return Yi(ul(t.getBoundingClientRect(),e))}function fl(t,e,n){const s=Ji(t,n),{scroll:i}=e;return i&&(xt(s.x,i.offset.x),xt(s.y,i.offset.y)),s}const dl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pl=At.length;function ml(t,e,n){let s="",i=!0;for(let r=0;r<pl;r++){const o=At[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=Ui(a,yn[o]);if(!l){i=!1;const c=dl[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Pn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Vt.has(l)){o=!0;continue}else if(ci(l)){i[l]=u;continue}else{const c=Ui(u,yn[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=ml(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function Qi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function is(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ct={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=is(t,e.target.x),s=is(t,e.target.y);return`${n}% ${s}%`}},gl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=_.parse(t);if(i.length>5)return s;const r=_.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=E(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},_e={borderRadius:{...Ct,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomLeftRadius:Ct,borderBottomRightRadius:Ct,boxShadow:gl};function to(t,{layout:e,layoutId:n}){return Vt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_e[t]||t==="opacity")}function bn(t,e,n){var o;const s=t.style,i=e==null?void 0:e.style,r={};if(!s)return r;for(const a in s)(j(s[a])||i&&j(i[a])||to(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function yl(t){return window.getComputedStyle(t)}class vl extends Xi{constructor(){super(...arguments),this.type="html",this.renderInstance=Qi}readValueFromInstance(e,n){var s;if(Vt.has(n))return(s=this.projection)!=null&&s.isProjecting?ke(n):jr(e,n);{const i=yl(e),r=(ci(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ji(e,n)}build(e,n,s){Pn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return bn(e,n,s)}}const xl={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tl={offset:"strokeDashoffset",array:"strokeDasharray"};function wl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?xl:Tl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Sl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function eo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Pn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox);for(const d of Sl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&wl(h,i,r,o,!1)}const no=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"]),so=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Pl(t,e,n,s){Qi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(no.has(i)?i:gn(i),e.attrs[i])}function io(t,e,n){const s=bn(t,e,n);for(const i in t)if(j(t[i])||j(e[i])){const r=At.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class bl extends Xi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=F}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Vt.has(n)){const s=Oi(n);return s&&s.default||0}return n=no.has(n)?n:gn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return io(e,n,s)}build(e,n,s){eo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Pl(e,n,s,i)}mount(e){this.isSVGTag=so(e.tagName),super.mount(e)}}const Al=Sn.length;function oo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?oo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Al;n++){const s=Sn[n],i=t.props[s];(It(i)||i===!1)&&(e[s]=i)}return e}function ro(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Vl=[...wn].reverse(),Cl=wn.length;function Ml(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ba(t,n,s)))}function Dl(t){let e=Ml(t),n=os(),s=!0,i=!1;const r=u=>(c,h)=>{var d;const f=wt(t,h,u==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;c={...c,...g,...m}}return c};function o(u){e=u(t)}function a(u){const{props:c}=t,h=oo(t.parent)||{},f=[],d=new Set;let p={},m=1/0;for(let y=0;y<Cl;y++){const x=Vl[y],v=n[x],S=c[x]!==void 0?c[x]:h[x],P=It(S),C=x===u?v.isActive:null;C===!1&&(m=y);let L=S===h[x]&&S!==c[x]&&P;if(L&&(s||i)&&t.manuallyAnimateOnMount&&(L=!1),v.protectedKeys={...p},!v.isActive&&C===null||!S&&!v.prevProp||le(S)||typeof S=="boolean")continue;if(x==="exit"&&v.isActive&&C!==!0){v.prevResolvedValues&&(p={...p,...v.prevResolvedValues});continue}const A=El(v.prevProp,S);let V=A||x===u&&v.isActive&&!L&&P||y>m&&P,b=!1;const D=Array.isArray(S)?S:[S];let I=D.reduce(r(x),{});C===!1&&(I={});const{prevResolvedValues:Q={}}=v,X={...Q,...I},tt=B=>{V=!0,d.has(B)&&(b=!0,d.delete(B)),v.needsAnimating[B]=!0;const K=t.getValue(B);K&&(K.liveStyle=!1)};for(const B in X){const K=I[B],lt=Q[B];if(p.hasOwnProperty(B))continue;let pt=!1;Ne(K)&&Ne(lt)?pt=!ro(K,lt):pt=K!==lt,pt?K!=null?tt(B):d.add(B):K!==void 0&&d.has(B)?tt(B):v.protectedKeys[B]=!0}v.prevProp=S,v.prevResolvedValues=I,v.isActive&&(p={...p,...I}),(s||i)&&t.blockInitialAnimation&&(V=!1);const Y=L&&A;V&&(!Y||b)&&f.push(...D.map(B=>{const K={type:x};if(typeof B=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:lt}=t,pt=wt(lt,B);if(lt.enteringChildren&&pt){const{delayChildren:Ro}=pt.transition||{};K.delay=Mi(lt.enteringChildren,t,Ro)}}return{animation:B,options:K}}))}if(d.size){const y={};if(typeof c.initial!="boolean"){const x=wt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(y.transition=x.transition)}d.forEach(x=>{const v=t.getBaseTarget(x),S=t.getValue(x);S&&(S.liveStyle=!0),y[x]=v??null}),f.push({animation:y})}let g=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var p;return(p=d.animationState)==null?void 0:p.setActive(u,c)}),n[u].isActive=c;const h=a(u);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=os(),i=!0}}}function El(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ro(e,t):!1}function ct(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function os(){return{animate:ct(!0),whileInView:ct(),whileHover:ct(),whileTap:ct(),whileDrag:ct(),whileFocus:ct(),exit:ct()}}function rs(t,e){t.min=e.min,t.max=e.max}function G(t,e){rs(t.x,e.x),rs(t.y,e.y)}function as(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const ao=1e-4,Rl=1-ao,Ll=1+ao,lo=.01,kl=0-lo,Fl=0+lo;function U(t){return t.max-t.min}function Il(t,e,n){return Math.abs(t-e)<=n}function ls(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=U(n)/U(e),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Rl&&t.scale<=Ll||isNaN(t.scale))&&(t.scale=1),(t.translate>=kl&&t.translate<=Fl||isNaN(t.translate))&&(t.translate=0)}function Rt(t,e,n,s){ls(t.x,e.x,n.x,s?s.originX:void 0),ls(t.y,e.y,n.y,s?s.originY:void 0)}function cs(t,e,n){t.min=n.min+e.min,t.max=t.min+U(e)}function Bl(t,e,n){cs(t.x,e.x,n.x),cs(t.y,e.y,n.y)}function us(t,e,n){t.min=e.min-n.min,t.max=t.min+U(e)}function oe(t,e,n){us(t.x,e.x,n.x),us(t.y,e.y,n.y)}function hs(t,e,n,s,i){return t-=e,t=ie(t,1/n,s),i!==void 0&&(t=ie(t,1/i,s)),t}function Ol(t,e=0,n=1,s=.5,i,r=t,o=t){if(Z.test(e)&&(e=parseFloat(e),e=E(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=E(r.min,r.max,s);t===r&&(a-=e),t.min=hs(t.min,e,n,a,i),t.max=hs(t.max,e,n,a,i)}function fs(t,e,[n,s,i],r,o){Ol(t,e[n],e[s],e[i],e.scale,r,o)}const jl=["x","scaleX","originX"],Nl=["y","scaleY","originY"];function ds(t,e,n,s){fs(t.x,e,jl,n?n.x:void 0,s?s.x:void 0),fs(t.y,e,Nl,n?n.y:void 0,s?s.y:void 0)}function ps(t){return t.translate===0&&t.scale===1}function co(t){return ps(t.x)&&ps(t.y)}function ms(t,e){return t.min===e.min&&t.max===e.max}function Ul(t,e){return ms(t.x,e.x)&&ms(t.y,e.y)}function gs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function uo(t,e){return gs(t.x,e.x)&&gs(t.y,e.y)}function ys(t){return U(t.x)/U(t.y)}function vs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function Wl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ho=["TopLeft","TopRight","BottomLeft","BottomRight"],Kl=ho.length,xs=t=>typeof t=="string"?parseFloat(t):t,Ts=t=>typeof t=="number"||w.test(t);function $l(t,e,n,s,i,r){i?(t.opacity=E(0,n.opacity??1,zl(s)),t.opacityExit=E(e.opacity??1,0,Gl(s))):r&&(t.opacity=E(e.opacity??1,n.opacity??1,s));for(let o=0;o<Kl;o++){const a=`border${ho[o]}Radius`;let l=ws(e,a),u=ws(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Ts(l)===Ts(u)?(t[a]=Math.max(E(xs(l),xs(u),s),0),(Z.test(u)||Z.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function ws(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const zl=fo(0,.5,si),Gl=fo(.5,.95,z);function fo(t,e,n){return s=>s<t?0:s>e?1:n(kt(t,e,s))}function Hl(t,e,n){const s=j(t)?t:Pt(t);return s.start(pn("",s,e,n)),s.animation}function Bt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const _l=(t,e)=>t.depth-e.depth;class Xl{constructor(){this.children=[],this.isDirty=!1}add(e){Je(this.children,e),this.isDirty=!0}remove(e){Qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(_l),this.isDirty=!1,this.children.forEach(e)}}function Yl(t,e){const n=N.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(rt(s),t(r-e))};return M.setup(s,!0),()=>rt(s)}function Zt(t){return j(t)?t.get():t}class ql{constructor(){this.members=[]}add(e){Je(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(Qt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(Qt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){var n;for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,n){var i;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=s.options,{layoutDependency:o}=e.options;(r===void 0||r!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,i,r,o;(s=(n=e.options).onExitComplete)==null||s.call(n),(o=(i=e.resumingFrom)==null?void 0:(r=i.options).onExitComplete)==null||o.call(r)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Jt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xe=["","X","Y","Z"],Zl=1e3;let Jl=0;function Te(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function po(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ki(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&po(s)}function mo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Jl++,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(ec),this.nodes.forEach(oc),this.nodes.forEach(rc),this.nodes.forEach(nc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Xl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new tn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Tn(o)&&!tl(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=Yl(f,250),Jt.hasAnimatedSinceResize&&(Jt.hasAnimatedSinceResize=!1,this.nodes.forEach(bs)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||hc,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=u.getProps(),y=!this.targetLayout||!uo(this.targetLayout,d),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...dn(p,"layout"),onPlay:m,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x)}else h||bs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),rt(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(ac),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&po(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ss);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ps);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ic),this.nodes.forEach(Ql),this.nodes.forEach(tc)):this.nodes.forEach(Ps),this.clearAllSnapshots();const a=N.now();O.delta=J(0,1e3/60,a-O.timestamp),O.timestamp=a,O.isProcessing=!0,he.update.process(O),he.preRender.process(O),he.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,vn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sc),this.sharedNodes.forEach(lc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=F(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!co(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ut(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),fc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return F();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(dc))){const{scroll:c}=this.root;c&&(xt(a.x,c.offset.x),xt(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=F();if(G(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&G(a,o),xt(a.x,h.offset.x),xt(a.y,h.offset.y))}return a}applyTransform(o,a=!1){var u,c;const l=F();G(l,o);for(let h=0;h<this.path.length;h++){const f=this.path[h];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Tt(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ut(f.latestValues)&&Tt(l,f.latestValues,(u=f.layout)==null?void 0:u.layoutBox)}return ut(this.latestValues)&&Tt(l,this.latestValues,(c=this.layout)==null?void 0:c.layoutBox),l}removeTransform(o){var l;const a=F();G(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!ut(c.latestValues))continue;let h;c.instance&&(Ge(c.latestValues)&&c.updateSnapshot(),h=F(),G(h,c.measurePageBox())),ds(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,h)}return ut(this.latestValues)&&ds(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=O.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=F(),this.targetWithTransforms=F()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):G(this.target,this.layout.layoutBox),Zi(this.target,this.targetDelta)):G(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ge(this.parent.latestValues)||qi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),oe(this.relativeTargetOrigin,a,l),G(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===O.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;G(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;hl(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=F());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(as(this.prevProjectionDelta.x,this.projectionDelta.x),as(this.prevProjectionDelta.y,this.projectionDelta.y)),Rt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!vs(this.projectionDelta.x,this.prevProjectionDelta.x)||!vs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=F(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,g=this.getStack(),y=!g||g.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(uc));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const P=S/1e3;As(h.x,o.x,P),As(h.y,o.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oe(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cc(this.relativeTarget,this.relativeTargetOrigin,f,P),v&&Ul(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=F()),G(v,this.relativeTarget)),m&&(this.animationValues=c,$l(c,u,this.latestValues,P,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Jt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Hl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Zl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&go(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||F();const h=U(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=U(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}G(a,l),Tt(a,c),Rt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ql),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Te("z",o,u,this.animationValues);for(let c=0;c<xe.length;c++)Te(`rotate${xe[c]}`,o,u,this.animationValues),Te(`skew${xe[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Zt(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Zt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ut(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Wl(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in _e){if(c[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=_e[p],x=h==="none"?c[p]:m(c[p],u);if(g){const v=g.length;for(let S=0;S<v;S++)o[g[S]]=x}else y?this.options.visualElement.renderState.vars[p]=x:o[p]=x}this.options.layoutId&&(o.pointerEvents=u===this?Zt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ss),this.root.sharedNodes.clear()}}}function Ql(t){t.updateLayout()}function tc(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;r==="size"?q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=U(f);f.min=s[h].min,f.max=f.min+d}):go(r,e.layoutBox,s)&&q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=U(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=vt();Rt(a,s,e.layoutBox);const l=vt();o?Rt(l,t.applyTransform(i,!0),e.measuredBox):Rt(l,s,e.layoutBox);const u=!co(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=F();oe(p,e.layoutBox,f.layoutBox);const m=F();oe(m,s,d.layoutBox),uo(p,m)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function ec(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function nc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function sc(t){t.clearSnapshot()}function Ss(t){t.clearMeasurements()}function Ps(t){t.isLayoutDirty=!1}function ic(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function bs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function oc(t){t.resolveTargetDelta()}function rc(t){t.calcProjection()}function ac(t){t.resetSkewAndRotation()}function lc(t){t.removeLeadSnapshot()}function As(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Vs(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function cc(t,e,n,s){Vs(t.x,e.x,n.x,s),Vs(t.y,e.y,n.y,s)}function uc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hc={duration:.45,ease:[.4,0,.1,1]},Cs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ms=Cs("applewebkit/")&&!Cs("chrome/")?Math.round:z;function Ds(t){t.min=Ms(t.min),t.max=Ms(t.max)}function fc(t){Ds(t.x),Ds(t.y)}function go(t,e,n){return t==="position"||t==="preserve-aspect"&&!Il(ys(e),ys(n),.2)}function dc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const pc=mo({attachResizeListener:(t,e)=>Bt(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),we={current:void 0},yo=mo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!we.current){const t=new pc({});t.mount(window),t.setOptions({layoutScroll:!0}),we.current=t}return we.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),An=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Es(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function mc(...t){return e=>{let n=!1;const s=t.map(i=>{const r=Es(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():Es(t[i],null)}}}}function gc(...t){return T.useCallback(mc(...t),t)}class yc extends T.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(_t(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=_t(s)&&s.offsetWidth||0,r=_t(s)&&s.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function vc({children:t,isPresent:e,anchorX:n,anchorY:s,root:i,pop:r}){var f;const o=T.useId(),a=T.useRef(null),l=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=T.useContext(An),c=((f=t.props)==null?void 0:f.ref)??(t==null?void 0:t.ref),h=gc(a,c);return T.useInsertionEffect(()=>{const{width:d,height:p,top:m,left:g,right:y,bottom:x}=l.current;if(e||r===!1||!a.current||!d||!p)return;const v=n==="left"?`left: ${g}`:`right: ${y}`,S=s==="bottom"?`bottom: ${x}`:`top: ${m}`;a.current.dataset.motionPopId=o;const P=document.createElement("style");u&&(P.nonce=u);const C=i??document.head;return C.appendChild(P),P.sheet&&P.sheet.insertRule(`
|
|
1
|
+
import{r as T,j as et}from"./index-D7Clon2u.js";const qe=T.createContext({});function Ze(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const Lo=typeof window<"u",Gs=Lo?T.useLayoutEffect:T.useEffect,ae=T.createContext(null);function Je(t,e){t.indexOf(e)===-1&&t.push(e)}function Qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const J=(t,e,n)=>n>e?e:n<t?t:n;let Qe=()=>{};const nt={},Hs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function _s(t){return typeof t=="object"&&t!==null}const Xs=t=>/^0[^.\s]+$/u.test(t);function Ys(t){let e;return()=>(e===void 0&&(e=t()),e)}const z=t=>t,ko=(t,e)=>n=>e(t(n)),Ot=(...t)=>t.reduce(ko),kt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class tn{constructor(){this.subscriptions=[]}add(e){return Je(this.subscriptions,e),()=>Qt(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const W=t=>t*1e3,$=t=>t/1e3;function qs(t,e){return e?t*(1e3/e):0}const Zs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Fo=1e-7,Io=12;function Bo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Zs(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Fo&&++a<Io);return o}function jt(t,e,n,s){if(t===e&&n===s)return z;const i=r=>Bo(r,0,1,t,n);return r=>r===0||r===1?r:Zs(i(r),e,s)}const Js=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Qs=t=>e=>1-t(1-e),ti=jt(.33,1.53,.69,.99),en=Qs(ti),ei=Js(en),ni=t=>(t*=2)<1?.5*en(t):.5*(2-Math.pow(2,-10*(t-1))),nn=t=>1-Math.sin(Math.acos(t)),si=Qs(nn),ii=Js(nn),Oo=jt(.42,0,1,1),jo=jt(0,0,.58,1),oi=jt(.42,0,.58,1),No=t=>Array.isArray(t)&&typeof t[0]!="number",ri=t=>Array.isArray(t)&&typeof t[0]=="number",Uo={linear:z,easeIn:Oo,easeInOut:oi,easeOut:jo,circIn:nn,circInOut:ii,circOut:si,backIn:en,backInOut:ei,backOut:ti,anticipate:ni},Wo=t=>typeof t=="string",Mn=t=>{if(ri(t)){Qe(t.length===4);const[e,n,s,i]=t;return jt(e,n,s,i)}else if(Wo(t))return Uo[t];return t},Wt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ko(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const p=f&&i?n:s;return h&&o.add(c),p.has(c)||p.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const $o=40;function ai(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Wt.reduce((v,S)=>(v[S]=Ko(r),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:p}=o,m=()=>{const v=nt.useManualTiming?i.timestamp:performance.now();n=!1,nt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,$o),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:Wt.reduce((v,S)=>{const P=o[S];return v[S]=(C,L=!1,A=!1)=>(n||g(),P.schedule(C,L,A)),v},{}),cancel:v=>{for(let S=0;S<Wt.length;S++)o[Wt[S]].cancel(v)},state:i,steps:o}}const{schedule:M,cancel:rt,state:O,steps:he}=ai(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0);let Ht;function zo(){Ht=void 0}const N={now:()=>(Ht===void 0&&N.set(O.isProcessing||nt.useManualTiming?O.timestamp:performance.now()),Ht),set:t=>{Ht=t,queueMicrotask(zo)}},li=t=>e=>typeof e=="string"&&e.startsWith(t),ci=li("--"),Go=li("var(--"),sn=t=>Go(t)?Ho.test(t.split("/*")[0].trim()):!1,Ho=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Dn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const bt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ft={...bt,transform:t=>J(0,1,t)},Kt={...bt,default:1},Dt=t=>Math.round(t*1e5)/1e5,on=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _o(t){return t==null}const Xo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rn=(t,e)=>n=>!!(typeof n=="string"&&Xo.test(n)&&n.startsWith(t)||e&&!_o(n)&&Object.prototype.hasOwnProperty.call(n,e)),ui=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(on);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Yo=t=>J(0,255,t),fe={...bt,transform:t=>Math.round(Yo(t))},ht={test:rn("rgb","red"),parse:ui("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+Dt(Ft.transform(s))+")"};function qo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ce={test:rn("#"),parse:qo,transform:ht.transform},Nt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Nt("deg"),Z=Nt("%"),w=Nt("px"),Zo=Nt("vh"),Jo=Nt("vw"),En={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},gt={test:rn("hsl","hue"),parse:ui("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Dt(e))+", "+Z.transform(Dt(n))+", "+Dt(Ft.transform(s))+")"},k={test:t=>ht.test(t)||Ce.test(t)||gt.test(t),parse:t=>ht.test(t)?ht.parse(t):gt.test(t)?gt.parse(t):Ce.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ht.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=k.parse(t);return e.alpha=0,k.transform(e)}},Qo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function tr(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(on))==null?void 0:e.length)||0)+(((n=t.match(Qo))==null?void 0:n.length)||0)>0}const hi="number",fi="color",er="var",nr="var(",Rn="${}",sr=/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 St(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(sr,l=>(k.test(l)?(s.color.push(r),i.push(fi),n.push(k.parse(l))):l.startsWith(nr)?(s.var.push(r),i.push(er),n.push(l)):(s.number.push(r),i.push(hi),n.push(parseFloat(l))),++r,Rn)).split(Rn);return{values:n,split:a,indexes:s,types:i}}function ir(t){return St(t).values}function di({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===hi?i+=Dt(s[r]):o===fi?i+=k.transform(s[r]):i+=s[r]}return i}}function or(t){return di(St(t))}const rr=t=>typeof t=="number"?0:k.test(t)?k.getAnimatableNone(t):t,ar=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:rr(t);function lr(t){const e=St(t);return di(e)(e.values.map((s,i)=>ar(s,e.split[i])))}const _={test:tr,parse:ir,createTransformer:or,getAnimatableNone:lr};function de(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function cr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=de(l,a,t+1/3),r=de(l,a,t),o=de(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function te(t,e){return n=>n>0?e:t}const E=(t,e,n)=>t+(e-t)*n,pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ur=[Ce,ht,gt],hr=t=>ur.find(e=>e.test(t));function Ln(t){const e=hr(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=cr(n)),n}const kn=(t,e)=>{const n=Ln(t),s=Ln(e);if(!n||!s)return te(t,e);const i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=E(n.alpha,s.alpha,r),ht.transform(i))},Me=new Set(["none","hidden"]);function fr(t,e){return Me.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function dr(t,e){return n=>E(t,e,n)}function an(t){return typeof t=="number"?dr:typeof t=="string"?sn(t)?te:k.test(t)?kn:gr:Array.isArray(t)?pi:typeof t=="object"?k.test(t)?kn:pr:te}function pi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>an(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function pr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=an(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function mr(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const gr=(t,e)=>{const n=_.createTransformer(e),s=St(t),i=St(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Me.has(t)&&!i.values.length||Me.has(e)&&!s.values.length?fr(t,e):Ot(pi(mr(s,i),i.values),n):te(t,e)};function mi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?E(t,e,n):an(t)(t,e)}const yr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>rt(e),now:()=>O.isProcessing?O.timestamp:N.now()}},gi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},ee=2e4;function ln(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ee;)e+=n,s=t.next(e);return e>=ee?1/0:e}function vr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(ln(s),ee);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:$(i)}}const R={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function De(t,e){return t*Math.sqrt(1-e*e)}const xr=12;function Tr(t,e,n){let s=n;for(let i=1;i<xr;i++)s=s-t(s)/e(s);return s}const me=.001;function wr({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,r,o=1-e;o=J(R.minDamping,R.maxDamping,o),t=J(R.minDuration,R.maxDuration,$(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=De(u,o),p=Math.exp(-h);return me-f/d*p},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-h),m=De(Math.pow(u,2),o);return(-i(u)+me>0?-1:1)*((f-d)*p)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-me+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Tr(i,r,a);if(t=W(t),isNaN(l))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Sr=["duration","bounce"],Pr=["stiffness","damping","mass"];function Fn(t,e){return e.some(n=>t[n]!==void 0)}function br(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!Fn(t,Pr)&&Fn(t,Sr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:r}}else{const n=wr({...t,velocity:0});e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function ne(t=R.visualDuration,e=R.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=br({...n,velocity:-$(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),g=o-r,y=$(Math.sqrt(l/c)),x=Math.abs(g)<5;s||(s=x?R.restSpeed.granular:R.restSpeed.default),i||(i=x?R.restDelta.granular:R.restDelta.default);let v,S,P,C,L,A;if(m<1)P=De(y,m),C=(p+m*y*g)/P,v=b=>{const D=Math.exp(-m*y*b);return o-D*(C*Math.sin(P*b)+g*Math.cos(P*b))},L=m*y*C+g*P,A=m*y*g-C*P,S=b=>Math.exp(-m*y*b)*(L*Math.sin(P*b)+A*Math.cos(P*b));else if(m===1){v=D=>o-Math.exp(-y*D)*(g+(p+y*g)*D);const b=p+y*g;S=D=>Math.exp(-y*D)*(y*b*D-p)}else{const b=y*Math.sqrt(m*m-1);v=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(b*X,300);return o-tt*((p+m*y*g)*Math.sinh(Y)+b*g*Math.cosh(Y))/b};const D=(p+m*y*g)/b,I=m*y*D-g*b,Q=m*y*g-D*b;S=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(b*X,300);return tt*(I*Math.sinh(Y)+Q*Math.cosh(Y))}}const V={calculatedDuration:d&&h||null,velocity:b=>W(S(b)),next:b=>{if(!d&&m<1){const I=Math.exp(-m*y*b),Q=Math.sin(P*b),X=Math.cos(P*b),tt=o-I*(C*Q+g*X),Y=W(I*(L*Q+A*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-tt)<=i,a.value=a.done?o:tt,a}const D=v(b);if(d)a.done=b>=h;else{const I=W(S(b));a.done=Math.abs(I)<=s&&Math.abs(o-D)<=i}return a.value=a.done?o:D,a},toString:()=>{const b=Math.min(ln(V),ee),D=gi(I=>V.next(b*I).value,b,30);return b+"ms "+D},toTransition:()=>{}};return V}ne.applyToOptions=t=>{const e=vr(t,100,ne);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const Ar=5;function yi(t,e,n){const s=Math.max(e-Ar,0);return qs(n-t(s),e-s)}function Ee({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const x=A=>-m*Math.exp(-A/s),v=A=>y+x(A),S=A=>{const V=x(A),b=v(A);f.done=Math.abs(V)<=u,f.value=f.done?y:b};let P,C;const L=A=>{d(f.value)&&(P=A,C=ne({keyframes:[f.value,p(f.value)],velocity:yi(v,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return L(0),{calculatedDuration:null,next:A=>{let V=!1;return!C&&P===void 0&&(V=!0,S(A),L(A)),P!==void 0&&A>=P?C.next(A-P):(!V&&S(A),f)}}}function Vr(t,e,n){const s=[],i=n||nt.mix||mi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||z:e;a=Ot(l,a)}s.push(a)}return s}function Cr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Qe(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Vr(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=kt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(J(t[0],t[r-1],c)):u}function Mr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=kt(0,e,s);t.push(E(n,1,i))}}function Dr(t){const e=[0];return Mr(e,t.length-1),e}function Er(t,e){return t.map(n=>n*e)}function Rr(t,e){return t.map(()=>e||oi).splice(0,t.length-1)}function Et({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=No(s)?s.map(Mn):Mn(s),r={done:!1,value:e[0]},o=Er(n&&n.length===e.length?n:Dr(e),t),a=Cr(o,e,{ease:Array.isArray(i)?i:Rr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Lr=t=>t!==null;function cn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Lr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const kr={decay:Ee,inertia:Ee,tween:Et,keyframes:Et,spring:ne};function vi(t){typeof t.type=="string"&&(t.type=kr[t.type])}class un{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Fr=t=>t/100;class hn extends un{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;vi(e);const{type:n=Et,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Et;l!==Et&&typeof a[0]!="number"&&(this.mixKeyframes=Ot(Fr,mi(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ln(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,S=s;if(h){const A=Math.min(this.currentTime,i)/a;let V=Math.floor(A),b=A%1;!b&&A>=1&&(b=1),b===1&&V--,V=Math.min(V,h+1),!!(V%2)&&(f==="reverse"?(b=1-b,d&&(b-=d/a)):f==="mirror"&&(S=o)),v=J(0,1,b)*a}const P=x?{done:!1,value:c[0]}:S.next(v);r&&!x&&(P.value=r(P.value));let{done:C}=P;!x&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return L&&p!==Ee&&(P.value=cn(c,this.options,g,this.speed)),m&&m(P.value),L&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return $(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return yi(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=$(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:e=yr,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(N.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Ir(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ft=t=>t*180/Math.PI,Re=t=>{const e=ft(Math.atan2(t[1],t[0]));return Le(e)},Br={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Re,rotateZ:Re,skewX:t=>ft(Math.atan(t[1])),skewY:t=>ft(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Le=t=>(t=t%360,t<0&&(t+=360),t),In=Re,Bn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),On=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Or={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bn,scaleY:On,scale:t=>(Bn(t)+On(t))/2,rotateX:t=>Le(ft(Math.atan2(t[6],t[5]))),rotateY:t=>Le(ft(Math.atan2(-t[2],t[0]))),rotateZ:In,rotate:In,skewX:t=>ft(Math.atan(t[4])),skewY:t=>ft(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ke(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||t==="none")return ke(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Or,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Br,i=a}if(!i)return ke(e);const r=s[e],o=i[1].split(",").map(Nr);return typeof r=="function"?r(o):o[r]}const jr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)};function Nr(t){return parseFloat(t.trim())}const At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vt=new Set(At),jn=t=>t===bt||t===w,Ur=new Set(["x","y","z"]),Wr=At.filter(t=>!Ur.has(t));function Kr(t){const e=[];return Wr.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ot={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Fe(e,"x"),y:(t,{transform:e})=>Fe(e,"y")};ot.translateX=ot.x;ot.translateY=ot.y;const dt=new Set;let Ie=!1,Be=!1,Oe=!1;function xi(){if(Be){const t=Array.from(dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Kr(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Be=!1,Ie=!1,dt.forEach(t=>t.complete(Oe)),dt.clear()}function Ti(){dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Be=!0)})}function $r(){Oe=!0,Ti(),xi(),Oe=!1}class fn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(dt.add(this),Ie||(Ie=!0,M.read(Ti),M.resolveKeyframes(xi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Ir(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),dt.delete(this)}cancel(){this.state==="scheduled"&&(dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zr=t=>t.startsWith("--");function wi(t,e,n){zr(e)?t.style.setProperty(e,n):t.style[e]=n}const Gr={};function Si(t,e){const n=Ys(t);return()=>Gr[e]??n()}const Hr=Si(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Pi=Si(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Nn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mt([0,.65,.55,1]),circOut:Mt([.55,0,1,.45]),backIn:Mt([.31,.01,.66,-.59]),backOut:Mt([.33,1.53,.69,.99])};function bi(t,e){if(t)return typeof t=="function"?Pi()?gi(t,e):"ease-out":ri(t)?Mt(t):Array.isArray(t)?t.map(n=>bi(n,e)||Nn.easeOut):Nn[t]}function _r(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=bi(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function Ai(t){return typeof t=="function"&&"applyToOptions"in t}function Xr({type:t,...e}){return Ai(t)&&Pi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Vi extends un{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,Qe(typeof e.type!="string");const u=Xr(e);this.animation=_r(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=cn(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),wi(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,i;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return $(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=W(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"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,rangeStart:n,rangeEnd:s,observe:i}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Hr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),z):i(this)}}const Ci={anticipate:ni,backInOut:ei,circInOut:ii};function Yr(t){return t in Ci}function qr(t){typeof t.ease=="string"&&Yr(t.ease)&&(t.ease=Ci[t.ease])}const ge=10;class Zr extends Vi{constructor(e){qr(e),vi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new hn({...o,autoplay:!1}),l=Math.max(ge,N.now()-this.startTime),u=J(0,ge,l-ge),c=a.sample(l).value,{name:h}=this.options;r&&h&&wi(r,h,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Un=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function Jr(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Qr(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=Un(i,e),a=Un(r,e);return!o||!a?!1:Jr(t)||(n==="spring"||Ai(n))&&s}function je(t){t.duration=0,t.type="keyframes"}const ta=new Set(["opacity","clipPath","filter","transform"]),ea=Ys(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function na(t){var c;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return ea()&&n&&ta.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const sa=40;class ia extends un{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var p;super(),this.stop=()=>{var m,g;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=N.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||fn;this.keyframeResolver=new d(a,(m,g,y)=>this.onKeyframesResolved(m,g,f,!y),l,u,c),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(e,n,s,i){var g,y;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=N.now(),Qr(e,r,o,a)||((nt.instantAnimations||!l)&&(c==null||c(cn(e,s,n))),e[0]=e[e.length-1],je(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>sa?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&na(f),p=(y=(g=f.motionValue)==null?void 0:g.owner)==null?void 0:y.current,m=d?new Zr({...f,element:p}):new hn(f);m.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),$r()),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(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function Mi(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const oa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ra(t){const e=oa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Di(t,e,n=1){const[s,i]=ra(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Hs(o)?parseFloat(o):o}return sn(i)?Di(i,e,n+1):i}const aa={type:"spring",stiffness:500,damping:25,restSpeed:10},la=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ca={type:"keyframes",duration:.8},ua={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ha=(t,{keyframes:e})=>e.length>2?ca:Vt.has(t)?t.startsWith("scale")?la(e[1]):aa:ua,fa=t=>t!==null;function da(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(fa),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}function Ei(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function dn(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Ei(n,t):n}function pa({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const pn=(t,e,n,s={},i,r)=>o=>{const a=dn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-W(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};pa(a)||Object.assign(c,ha(t,c)),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(je(c),c.delay===0&&(h=!0)),(nt.instantAnimations||nt.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,je(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=da(c.keyframes,a);if(f!==void 0){M.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new hn(c):new ia(c)};function Wn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function mn(t,e,n,s){if(typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function wt(t,e,n){const s=t.getProps();return mn(s,e,n!==void 0?n:s.custom,t)}const Ri=new Set(["width","height","top","left","right","bottom",...At]),Kn=30,ma=t=>!isNaN(parseFloat(t));class ga{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=N.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=N.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ma(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new tn);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.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=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Kn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Kn);return qs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pt(t,e){return new ga(t,e)}const Ne=t=>Array.isArray(t);function ya(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Pt(n))}function va(t){return Ne(t)?t[t.length-1]||0:t}function xa(t,e){const n=wt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=va(r[o]);ya(t,o,a)}}const j=t=>!!(t&&t.getVelocity);function Ta(t){return!!(j(t)&&t.add)}function Ue(t,e){const n=t.getValue("willChange");if(Ta(n))return n.add(e);if(!n&&nt.WillChange){const s=new nt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function gn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const wa="framerAppearId",Li="data-"+gn(wa);function ki(t){return t.props[Li]}function Sa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Fi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Ei(r,l):l;const u=r==null?void 0:r.reduceMotion;s&&(r=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),p=a[f];if(p===void 0||h&&Sa(h,f))continue;const m={delay:n,...dn(r||{},f)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===g&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const S=ki(t);if(S){const P=window.MotionHandoffAnimation(S,f,M);P!==null&&(m.startTime=P,y=!0)}}Ue(t,f);const x=u??t.shouldReduceMotion;d.start(pn(f,d,p,x&&Ri.has(f)?{type:!1}:m,t,y));const v=d.animation;v&&c.push(v)}if(o){const f=()=>M.update(()=>{o&&xa(t,o)});c.length?Promise.all(c).then(f):f()}return c}function We(t,e,n={}){var l;const s=wt(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Fi(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return Pa(t,e,u,c,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Pa(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(We(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Mi(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function ba(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>We(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=We(t,e,n);else{const i=typeof e=="function"?wt(t,e,n.custom):e;s=Promise.all(Fi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Aa={test:t=>t==="auto",parse:t=>t},Ii=t=>e=>e.test(t),Bi=[bt,w,Z,st,Jo,Zo,Aa],$n=t=>Bi.find(Ii(t));function Va(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Xs(t):!0}const Ca=new Set(["brightness","contrast","saturate","opacity"]);function Ma(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(on)||[];if(!s)return t;const i=n.replace(s,"");let r=Ca.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Da=/\b([a-z-]*)\(.*?\)/gu,Ke={..._,getAnimatableNone:t=>{const e=t.match(Da);return e?e.map(Ma).join(" "):t}},$e={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},zn={...bt,transform:Math.round},Ea={rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:st,skewX:st,skewY:st,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:Ft,originX:En,originY:En,originZ:w},yn={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,top:w,right:w,bottom:w,left:w,inset:w,insetBlock:w,insetBlockStart:w,insetBlockEnd:w,insetInline:w,insetInlineStart:w,insetInlineEnd:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,paddingBlock:w,paddingBlockStart:w,paddingBlockEnd:w,paddingInline:w,paddingInlineStart:w,paddingInlineEnd:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,marginBlock:w,marginBlockStart:w,marginBlockEnd:w,marginInline:w,marginInlineStart:w,marginInlineEnd:w,fontSize:w,backgroundPositionX:w,backgroundPositionY:w,...Ea,zIndex:zn,fillOpacity:Ft,strokeOpacity:Ft,numOctaves:zn},Ra={...yn,color:k,backgroundColor:k,outlineColor:k,fill:k,stroke:k,borderColor:k,borderTopColor:k,borderRightColor:k,borderBottomColor:k,borderLeftColor:k,filter:Ke,WebkitFilter:Ke,mask:$e,WebkitMask:$e},Oi=t=>Ra[t],La=new Set([Ke,$e]);function ji(t,e){let n=Oi(t);return La.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ka=new Set(["auto","none","0"]);function Fa(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!ka.has(r)&&St(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=ji(n,i)}class Ia extends fn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),sn(h))){const f=Di(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Ri.has(s)||e.length!==2)return;const[i,r]=e,o=$n(i),a=$n(r),l=Dn(i),u=Dn(r);if(l!==u&&ot[s]){this.needsMeasurement=!0;return}if(o!==a)if(jn(o)&&jn(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else ot[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Va(e[i]))&&s.push(i);s.length&&Fa(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ot[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=ot[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Ba=new Set(["opacity","clipPath","filter","transform"]);function Ni(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const Ui=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function _t(t){return _s(t)&&"offsetHeight"in t}const{schedule:vn}=ai(queueMicrotask,!1),H={x:!1,y:!1};function Wi(){return H.x||H.y}function Oa(t){return t==="x"||t==="y"?H[t]?null:(H[t]=!0,()=>{H[t]=!1}):H.x||H.y?null:(H.x=H.y=!0,()=>{H.x=H.y=!1})}function Ki(t,e){const n=Ni(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ja(t){return!(t.pointerType==="touch"||Wi())}function Na(t,e,n={}){const[s,i,r]=Ki(t,n);return s.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},h=g=>{u&&(u(g),u=void 0),c()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(g))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=g=>{if(g.pointerType!=="touch"){if(a){l=!0;return}h(g)}},m=g=>{if(!ja(g))return;l=!1;const y=e(o,g);typeof y=="function"&&(u=y,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",d,i)}),r}const $i=(t,e)=>e?t===e?!0:$i(t,e.parentElement):!1,xn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ua=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wa(t){return Ua.has(t.tagName)||t.isContentEditable===!0}const Ka=new Set(["INPUT","SELECT","TEXTAREA"]);function $a(t){return Ka.has(t.tagName)||t.isContentEditable===!0}const Xt=new WeakSet;function Gn(t){return e=>{e.key==="Enter"&&t(e)}}function ye(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const za=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Gn(()=>{if(Xt.has(n))return;ye(n,"down");const i=Gn(()=>{ye(n,"up")}),r=()=>ye(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Hn(t){return xn(t)&&!Wi()}const _n=new WeakSet;function Ga(t,e,n={}){const[s,i,r]=Ki(t,n),o=a=>{const l=a.currentTarget;if(!Hn(a)||_n.has(a))return;Xt.add(l),n.stopPropagation&&_n.add(a);const u=e(l,a),c=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Xt.has(l)&&Xt.delete(l),Hn(d)&&typeof u=="function"&&u(d,{success:p})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||$i(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),_t(a)&&(a.addEventListener("focus",u=>za(u,i)),!Wa(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Tn(t){return _s(t)&&"ownerSVGElement"in t}const Yt=new WeakMap;let it;const zi=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Tn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ha=zi("inline","width","offsetWidth"),_a=zi("block","height","offsetHeight");function Xa({target:t,borderBoxSize:e}){var n;(n=Yt.get(t))==null||n.forEach(s=>{s(t,{get width(){return Ha(t,e)},get height(){return _a(t,e)}})})}function Ya(t){t.forEach(Xa)}function qa(){typeof ResizeObserver>"u"||(it=new ResizeObserver(Ya))}function Za(t,e){it||qa();const n=Ni(t);return n.forEach(s=>{let i=Yt.get(s);i||(i=new Set,Yt.set(s,i)),i.add(e),it==null||it.observe(s)}),()=>{n.forEach(s=>{const i=Yt.get(s);i==null||i.delete(e),i!=null&&i.size||it==null||it.unobserve(s)})}}const qt=new Set;let yt;function Ja(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};qt.forEach(e=>e(t))},window.addEventListener("resize",yt)}function Qa(t){return qt.add(t),yt||Ja(),()=>{qt.delete(t),!qt.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function Xn(t,e){return typeof t=="function"?Qa(t):Za(t,e)}function tl(t){return Tn(t)&&t.tagName==="svg"}const el=[...Bi,k,_],nl=t=>el.find(Ii(t)),Yn=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Yn(),y:Yn()}),qn=()=>({min:0,max:0}),F=()=>({x:qn(),y:qn()}),sl=new WeakMap;function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function It(t){return typeof t=="string"||Array.isArray(t)}const wn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sn=["initial",...wn];function ce(t){return le(t.animate)||Sn.some(e=>It(t[e]))}function Gi(t){return!!(ce(t)||t.variants)}function il(t,e,n){for(const s in e){const i=e[s],r=n[s];if(j(i))t.addValue(s,i);else if(j(r))t.addValue(s,Pt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Pt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ze={current:null},Hi={current:!1},ol=typeof window<"u";function rl(){if(Hi.current=!0,!!ol)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ze.current=t.matches;t.addEventListener("change",e),e()}else ze.current=!1}const Zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let se={};function _i(t){se=t}function al(){return se}class ll{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){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=fn,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 d=N.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,M.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=ce(n),this.isVariantNode=Gi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];u[d]!==void 0&&j(p)&&p.set(u[d])}}mount(e){var n,s;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=e,sl.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((i,r)=>this.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hi.current||rl(),this.shouldReduceMotion=ze.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),rt(this.notifyUpdate),rt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.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,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Ba.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,h=new Vi({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:W(c)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=Vt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in se){const n=se[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Zn.length;s++){const i=Zn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=il(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Pt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Hs(s)||Xs(s))?s=parseFloat(s):!nl(s)&&_.test(n)&&(s=ji(e,n)),this.setBaseTarget(e,j(s)?s.get():s)),j(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=mn(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!j(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new tn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){vn.render(this.render)}}class Xi extends ll{constructor(){super(...arguments),this.KeyframeResolver=Ia}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;j(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class at{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Yi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function cl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ul(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ve(t){return t===void 0||t===1}function Ge({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function ut(t){return Ge(t)||qi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function qi(t){return Jn(t.x)||Jn(t.y)}function Jn(t){return t&&t!=="0%"}function ie(t,e,n){const s=t-n,i=e*s;return n+i}function Qn(t,e,n,s,i){return i!==void 0&&(t=ie(t,i,s)),ie(t,n,s)+e}function He(t,e=0,n=1,s,i){t.min=Qn(t.min,e,n,s,i),t.max=Qn(t.max,e,n,s,i)}function Zi(t,{x:e,y:n}){He(t.x,e.translate,e.scale,e.originPoint),He(t.y,n.translate,n.scale,n.originPoint)}const ts=.999999999999,es=1.0000000000001;function hl(t,e,n,s=!1){var a;const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let l=0;l<i;l++){r=n[l],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Tt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Zi(t,o)),s&&ut(r.latestValues)&&Tt(t,r.latestValues,(a=r.layout)==null?void 0:a.layoutBox))}e.x<es&&e.x>ts&&(e.x=1),e.y<es&&e.y>ts&&(e.y=1)}function xt(t,e){t.min=t.min+e,t.max=t.max+e}function ns(t,e,n,s,i=.5){const r=E(t.min,t.max,i);He(t,e,n,r,s)}function ss(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Tt(t,e,n){const s=n??t;ns(t.x,ss(e.x,s.x),e.scaleX,e.scale,e.originX),ns(t.y,ss(e.y,s.y),e.scaleY,e.scale,e.originY)}function Ji(t,e){return Yi(ul(t.getBoundingClientRect(),e))}function fl(t,e,n){const s=Ji(t,n),{scroll:i}=e;return i&&(xt(s.x,i.offset.x),xt(s.y,i.offset.y)),s}const dl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pl=At.length;function ml(t,e,n){let s="",i=!0;for(let r=0;r<pl;r++){const o=At[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=Ui(a,yn[o]);if(!l){i=!1;const c=dl[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Pn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Vt.has(l)){o=!0;continue}else if(ci(l)){i[l]=u;continue}else{const c=Ui(u,yn[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=ml(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function Qi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function is(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ct={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=is(t,e.target.x),s=is(t,e.target.y);return`${n}% ${s}%`}},gl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=_.parse(t);if(i.length>5)return s;const r=_.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=E(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},_e={borderRadius:{...Ct,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomLeftRadius:Ct,borderBottomRightRadius:Ct,boxShadow:gl};function to(t,{layout:e,layoutId:n}){return Vt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_e[t]||t==="opacity")}function bn(t,e,n){var o;const s=t.style,i=e==null?void 0:e.style,r={};if(!s)return r;for(const a in s)(j(s[a])||i&&j(i[a])||to(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function yl(t){return window.getComputedStyle(t)}class vl extends Xi{constructor(){super(...arguments),this.type="html",this.renderInstance=Qi}readValueFromInstance(e,n){var s;if(Vt.has(n))return(s=this.projection)!=null&&s.isProjecting?ke(n):jr(e,n);{const i=yl(e),r=(ci(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ji(e,n)}build(e,n,s){Pn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return bn(e,n,s)}}const xl={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tl={offset:"strokeDashoffset",array:"strokeDasharray"};function wl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?xl:Tl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Sl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function eo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Pn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox);for(const d of Sl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&wl(h,i,r,o,!1)}const no=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"]),so=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Pl(t,e,n,s){Qi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(no.has(i)?i:gn(i),e.attrs[i])}function io(t,e,n){const s=bn(t,e,n);for(const i in t)if(j(t[i])||j(e[i])){const r=At.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class bl extends Xi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=F}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Vt.has(n)){const s=Oi(n);return s&&s.default||0}return n=no.has(n)?n:gn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return io(e,n,s)}build(e,n,s){eo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Pl(e,n,s,i)}mount(e){this.isSVGTag=so(e.tagName),super.mount(e)}}const Al=Sn.length;function oo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?oo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Al;n++){const s=Sn[n],i=t.props[s];(It(i)||i===!1)&&(e[s]=i)}return e}function ro(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Vl=[...wn].reverse(),Cl=wn.length;function Ml(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ba(t,n,s)))}function Dl(t){let e=Ml(t),n=os(),s=!0,i=!1;const r=u=>(c,h)=>{var d;const f=wt(t,h,u==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;c={...c,...g,...m}}return c};function o(u){e=u(t)}function a(u){const{props:c}=t,h=oo(t.parent)||{},f=[],d=new Set;let p={},m=1/0;for(let y=0;y<Cl;y++){const x=Vl[y],v=n[x],S=c[x]!==void 0?c[x]:h[x],P=It(S),C=x===u?v.isActive:null;C===!1&&(m=y);let L=S===h[x]&&S!==c[x]&&P;if(L&&(s||i)&&t.manuallyAnimateOnMount&&(L=!1),v.protectedKeys={...p},!v.isActive&&C===null||!S&&!v.prevProp||le(S)||typeof S=="boolean")continue;if(x==="exit"&&v.isActive&&C!==!0){v.prevResolvedValues&&(p={...p,...v.prevResolvedValues});continue}const A=El(v.prevProp,S);let V=A||x===u&&v.isActive&&!L&&P||y>m&&P,b=!1;const D=Array.isArray(S)?S:[S];let I=D.reduce(r(x),{});C===!1&&(I={});const{prevResolvedValues:Q={}}=v,X={...Q,...I},tt=B=>{V=!0,d.has(B)&&(b=!0,d.delete(B)),v.needsAnimating[B]=!0;const K=t.getValue(B);K&&(K.liveStyle=!1)};for(const B in X){const K=I[B],lt=Q[B];if(p.hasOwnProperty(B))continue;let pt=!1;Ne(K)&&Ne(lt)?pt=!ro(K,lt):pt=K!==lt,pt?K!=null?tt(B):d.add(B):K!==void 0&&d.has(B)?tt(B):v.protectedKeys[B]=!0}v.prevProp=S,v.prevResolvedValues=I,v.isActive&&(p={...p,...I}),(s||i)&&t.blockInitialAnimation&&(V=!1);const Y=L&&A;V&&(!Y||b)&&f.push(...D.map(B=>{const K={type:x};if(typeof B=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:lt}=t,pt=wt(lt,B);if(lt.enteringChildren&&pt){const{delayChildren:Ro}=pt.transition||{};K.delay=Mi(lt.enteringChildren,t,Ro)}}return{animation:B,options:K}}))}if(d.size){const y={};if(typeof c.initial!="boolean"){const x=wt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(y.transition=x.transition)}d.forEach(x=>{const v=t.getBaseTarget(x),S=t.getValue(x);S&&(S.liveStyle=!0),y[x]=v??null}),f.push({animation:y})}let g=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var p;return(p=d.animationState)==null?void 0:p.setActive(u,c)}),n[u].isActive=c;const h=a(u);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=os(),i=!0}}}function El(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ro(e,t):!1}function ct(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function os(){return{animate:ct(!0),whileInView:ct(),whileHover:ct(),whileTap:ct(),whileDrag:ct(),whileFocus:ct(),exit:ct()}}function rs(t,e){t.min=e.min,t.max=e.max}function G(t,e){rs(t.x,e.x),rs(t.y,e.y)}function as(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const ao=1e-4,Rl=1-ao,Ll=1+ao,lo=.01,kl=0-lo,Fl=0+lo;function U(t){return t.max-t.min}function Il(t,e,n){return Math.abs(t-e)<=n}function ls(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=U(n)/U(e),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Rl&&t.scale<=Ll||isNaN(t.scale))&&(t.scale=1),(t.translate>=kl&&t.translate<=Fl||isNaN(t.translate))&&(t.translate=0)}function Rt(t,e,n,s){ls(t.x,e.x,n.x,s?s.originX:void 0),ls(t.y,e.y,n.y,s?s.originY:void 0)}function cs(t,e,n){t.min=n.min+e.min,t.max=t.min+U(e)}function Bl(t,e,n){cs(t.x,e.x,n.x),cs(t.y,e.y,n.y)}function us(t,e,n){t.min=e.min-n.min,t.max=t.min+U(e)}function oe(t,e,n){us(t.x,e.x,n.x),us(t.y,e.y,n.y)}function hs(t,e,n,s,i){return t-=e,t=ie(t,1/n,s),i!==void 0&&(t=ie(t,1/i,s)),t}function Ol(t,e=0,n=1,s=.5,i,r=t,o=t){if(Z.test(e)&&(e=parseFloat(e),e=E(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=E(r.min,r.max,s);t===r&&(a-=e),t.min=hs(t.min,e,n,a,i),t.max=hs(t.max,e,n,a,i)}function fs(t,e,[n,s,i],r,o){Ol(t,e[n],e[s],e[i],e.scale,r,o)}const jl=["x","scaleX","originX"],Nl=["y","scaleY","originY"];function ds(t,e,n,s){fs(t.x,e,jl,n?n.x:void 0,s?s.x:void 0),fs(t.y,e,Nl,n?n.y:void 0,s?s.y:void 0)}function ps(t){return t.translate===0&&t.scale===1}function co(t){return ps(t.x)&&ps(t.y)}function ms(t,e){return t.min===e.min&&t.max===e.max}function Ul(t,e){return ms(t.x,e.x)&&ms(t.y,e.y)}function gs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function uo(t,e){return gs(t.x,e.x)&&gs(t.y,e.y)}function ys(t){return U(t.x)/U(t.y)}function vs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function Wl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ho=["TopLeft","TopRight","BottomLeft","BottomRight"],Kl=ho.length,xs=t=>typeof t=="string"?parseFloat(t):t,Ts=t=>typeof t=="number"||w.test(t);function $l(t,e,n,s,i,r){i?(t.opacity=E(0,n.opacity??1,zl(s)),t.opacityExit=E(e.opacity??1,0,Gl(s))):r&&(t.opacity=E(e.opacity??1,n.opacity??1,s));for(let o=0;o<Kl;o++){const a=`border${ho[o]}Radius`;let l=ws(e,a),u=ws(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Ts(l)===Ts(u)?(t[a]=Math.max(E(xs(l),xs(u),s),0),(Z.test(u)||Z.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function ws(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const zl=fo(0,.5,si),Gl=fo(.5,.95,z);function fo(t,e,n){return s=>s<t?0:s>e?1:n(kt(t,e,s))}function Hl(t,e,n){const s=j(t)?t:Pt(t);return s.start(pn("",s,e,n)),s.animation}function Bt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const _l=(t,e)=>t.depth-e.depth;class Xl{constructor(){this.children=[],this.isDirty=!1}add(e){Je(this.children,e),this.isDirty=!0}remove(e){Qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(_l),this.isDirty=!1,this.children.forEach(e)}}function Yl(t,e){const n=N.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(rt(s),t(r-e))};return M.setup(s,!0),()=>rt(s)}function Zt(t){return j(t)?t.get():t}class ql{constructor(){this.members=[]}add(e){Je(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(Qt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(Qt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){var n;for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,n){var i;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=s.options,{layoutDependency:o}=e.options;(r===void 0||r!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,i,r,o;(s=(n=e.options).onExitComplete)==null||s.call(n),(o=(i=e.resumingFrom)==null?void 0:(r=i.options).onExitComplete)==null||o.call(r)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Jt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xe=["","X","Y","Z"],Zl=1e3;let Jl=0;function Te(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function po(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ki(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&po(s)}function mo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Jl++,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(ec),this.nodes.forEach(oc),this.nodes.forEach(rc),this.nodes.forEach(nc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Xl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new tn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Tn(o)&&!tl(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=Yl(f,250),Jt.hasAnimatedSinceResize&&(Jt.hasAnimatedSinceResize=!1,this.nodes.forEach(bs)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||hc,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=u.getProps(),y=!this.targetLayout||!uo(this.targetLayout,d),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...dn(p,"layout"),onPlay:m,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x)}else h||bs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),rt(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(ac),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&po(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ss);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ps);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ic),this.nodes.forEach(Ql),this.nodes.forEach(tc)):this.nodes.forEach(Ps),this.clearAllSnapshots();const a=N.now();O.delta=J(0,1e3/60,a-O.timestamp),O.timestamp=a,O.isProcessing=!0,he.update.process(O),he.preRender.process(O),he.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,vn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sc),this.sharedNodes.forEach(lc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=F(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!co(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ut(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),fc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return F();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(dc))){const{scroll:c}=this.root;c&&(xt(a.x,c.offset.x),xt(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=F();if(G(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&G(a,o),xt(a.x,h.offset.x),xt(a.y,h.offset.y))}return a}applyTransform(o,a=!1){var u,c;const l=F();G(l,o);for(let h=0;h<this.path.length;h++){const f=this.path[h];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Tt(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ut(f.latestValues)&&Tt(l,f.latestValues,(u=f.layout)==null?void 0:u.layoutBox)}return ut(this.latestValues)&&Tt(l,this.latestValues,(c=this.layout)==null?void 0:c.layoutBox),l}removeTransform(o){var l;const a=F();G(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!ut(c.latestValues))continue;let h;c.instance&&(Ge(c.latestValues)&&c.updateSnapshot(),h=F(),G(h,c.measurePageBox())),ds(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,h)}return ut(this.latestValues)&&ds(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=O.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=F(),this.targetWithTransforms=F()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):G(this.target,this.layout.layoutBox),Zi(this.target,this.targetDelta)):G(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ge(this.parent.latestValues)||qi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),oe(this.relativeTargetOrigin,a,l),G(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===O.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;G(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;hl(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=F());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(as(this.prevProjectionDelta.x,this.projectionDelta.x),as(this.prevProjectionDelta.y,this.projectionDelta.y)),Rt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!vs(this.projectionDelta.x,this.prevProjectionDelta.x)||!vs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=F(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,g=this.getStack(),y=!g||g.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(uc));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const P=S/1e3;As(h.x,o.x,P),As(h.y,o.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oe(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cc(this.relativeTarget,this.relativeTargetOrigin,f,P),v&&Ul(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=F()),G(v,this.relativeTarget)),m&&(this.animationValues=c,$l(c,u,this.latestValues,P,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Jt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Hl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Zl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&go(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||F();const h=U(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=U(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}G(a,l),Tt(a,c),Rt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ql),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Te("z",o,u,this.animationValues);for(let c=0;c<xe.length;c++)Te(`rotate${xe[c]}`,o,u,this.animationValues),Te(`skew${xe[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Zt(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Zt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ut(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Wl(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in _e){if(c[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=_e[p],x=h==="none"?c[p]:m(c[p],u);if(g){const v=g.length;for(let S=0;S<v;S++)o[g[S]]=x}else y?this.options.visualElement.renderState.vars[p]=x:o[p]=x}this.options.layoutId&&(o.pointerEvents=u===this?Zt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ss),this.root.sharedNodes.clear()}}}function Ql(t){t.updateLayout()}function tc(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;r==="size"?q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=U(f);f.min=s[h].min,f.max=f.min+d}):go(r,e.layoutBox,s)&&q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=U(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=vt();Rt(a,s,e.layoutBox);const l=vt();o?Rt(l,t.applyTransform(i,!0),e.measuredBox):Rt(l,s,e.layoutBox);const u=!co(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=F();oe(p,e.layoutBox,f.layoutBox);const m=F();oe(m,s,d.layoutBox),uo(p,m)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function ec(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function nc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function sc(t){t.clearSnapshot()}function Ss(t){t.clearMeasurements()}function Ps(t){t.isLayoutDirty=!1}function ic(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function bs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function oc(t){t.resolveTargetDelta()}function rc(t){t.calcProjection()}function ac(t){t.resetSkewAndRotation()}function lc(t){t.removeLeadSnapshot()}function As(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Vs(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function cc(t,e,n,s){Vs(t.x,e.x,n.x,s),Vs(t.y,e.y,n.y,s)}function uc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hc={duration:.45,ease:[.4,0,.1,1]},Cs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ms=Cs("applewebkit/")&&!Cs("chrome/")?Math.round:z;function Ds(t){t.min=Ms(t.min),t.max=Ms(t.max)}function fc(t){Ds(t.x),Ds(t.y)}function go(t,e,n){return t==="position"||t==="preserve-aspect"&&!Il(ys(e),ys(n),.2)}function dc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const pc=mo({attachResizeListener:(t,e)=>Bt(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),we={current:void 0},yo=mo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!we.current){const t=new pc({});t.mount(window),t.setOptions({layoutScroll:!0}),we.current=t}return we.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),An=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Es(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function mc(...t){return e=>{let n=!1;const s=t.map(i=>{const r=Es(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():Es(t[i],null)}}}}function gc(...t){return T.useCallback(mc(...t),t)}class yc extends T.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(_t(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=_t(s)&&s.offsetWidth||0,r=_t(s)&&s.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function vc({children:t,isPresent:e,anchorX:n,anchorY:s,root:i,pop:r}){var f;const o=T.useId(),a=T.useRef(null),l=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=T.useContext(An),c=((f=t.props)==null?void 0:f.ref)??(t==null?void 0:t.ref),h=gc(a,c);return T.useInsertionEffect(()=>{const{width:d,height:p,top:m,left:g,right:y,bottom:x}=l.current;if(e||r===!1||!a.current||!d||!p)return;const v=n==="left"?`left: ${g}`:`right: ${y}`,S=s==="bottom"?`bottom: ${x}`:`top: ${m}`;a.current.dataset.motionPopId=o;const P=document.createElement("style");u&&(P.nonce=u);const C=i??document.head;return C.appendChild(P),P.sheet&&P.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${o}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${d}px !important;
|
package/ui/dist/index.html
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<link rel="manifest" href="/manifest.json" />
|
|
10
10
|
<link rel="apple-touch-icon" href="/titan-logo.png" />
|
|
11
11
|
<title>TITAN Mission Control</title>
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-D7Clon2u.js"></script>
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/assets/index-D0RJ8701.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body class="bg-zinc-950 text-zinc-100">
|
|
16
16
|
<div id="root"></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as N,r as c,j as s,e as E,h as T}from"./index-C6oarzis.js";import{R as $,L as j,W as v}from"./TitanCanvas-BhurNMK3.js";import{P as y}from"./play-Dwp2l5HG.js";import{a as k,C as A}from"./VoiceOverlay-BXPVdnJc.js";import{C as L}from"./circle-check-big-CMz0QouP.js";const M={"widget-creation":"Widget Creation",safety:"Safety","tool-routing":"Tool Routing","gate-format":"Gate Format",pipeline:"Pipeline Classification",adversarial:"Adversarial","tool-routing-v2":"Tool Routing v2",session:"Session Management","widget-v2":"Widget v2","gate-format-v2":"Gate Format v2",content:"Content Quality"};async function O(){const e=await N("/api/eval/suites");if(!e.ok)throw new Error(`/api/eval/suites failed: ${e.status}`);const t=await e.json();return Array.isArray(t.suites)?t.suites:[]}async function F(e){const t=await N("/api/eval/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({suite:e})});if(!t.ok){const r=await t.text().catch(()=>"");throw new Error(`/api/eval/run failed: ${t.status} ${r.slice(0,200)}`)}return t.json()}function w(e){return e.total?Math.round(e.passed/e.total*100):NaN}function S(e){return Number.isNaN(e)?"slate":e>=100?"emerald":e>=80?"amber":"red"}const C={emerald:"bg-emerald-500/15 text-emerald-300 border-emerald-500/40",amber:"bg-amber-500/15 text-amber-300 border-amber-500/40",red:"bg-red-500/15 text-red-300 border-red-500/40",slate:"bg-slate-500/15 text-slate-300 border-slate-500/40"};function G(){const[e,t]=c.useState([]),[r,n]=c.useState(!1),[p,m]=c.useState(null),d=c.useCallback(async()=>{n(!0);try{const a=await O();t(o=>{const i=new Map(o.map(l=>[l.name,l]));return a.map(l=>i.get(l)??{name:l,status:"idle"})})}catch(a){console.error("listEvalSuites failed:",a),t([])}finally{n(!1)}},[]);c.useEffect(()=>{d()},[d]);const x=c.useCallback(async a=>{t(o=>o.map(i=>i.name===a?{...i,status:"running",error:void 0}:i));try{const o=await F(a);t(i=>i.map(l=>l.name===a?{...l,status:"done",result:o}:l))}catch(o){t(i=>i.map(l=>l.name===a?{...l,status:"error",error:o.message}:l))}},[]),h=c.useCallback(async()=>{for(const a of e)await x(a.name)},[e,x]),u=e.reduce((a,o)=>{var i,l,b;return{total:a.total+(((i=o.result)==null?void 0:i.total)??0),passed:a.passed+(((l=o.result)==null?void 0:l.passed)??0),failed:a.failed+(((b=o.result)==null?void 0:b.failed)??0)}},{total:0,passed:0,failed:0}),f=w(u),R=S(f),g=e.some(a=>a.status==="running");return s.jsxs("div",{className:"flex h-full flex-col gap-4 p-4 text-slate-200",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Eval Harness"}),s.jsx("button",{onClick:d,disabled:r||g,className:"rounded border border-slate-700 bg-slate-800/40 p-1.5 hover:bg-slate-800 disabled:opacity-50",title:"Refresh suite list",children:s.jsx($,{className:`h-3.5 w-3.5 ${r?"animate-spin":""}`})}),s.jsxs("button",{onClick:h,disabled:e.length===0||g,className:"ml-auto flex items-center gap-1.5 rounded border border-emerald-500/40 bg-emerald-500/10 px-3 py-1.5 text-sm text-emerald-300 hover:bg-emerald-500/20 disabled:opacity-50",children:[g?s.jsx(j,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(y,{className:"h-3.5 w-3.5"}),"Run all suites"]})]}),s.jsxs("div",{className:`flex items-center gap-3 rounded-lg border p-3 text-sm ${C[R]}`,children:[s.jsxs("div",{className:"font-medium",children:["Overall: ",u.passed,"/",u.total," passed",Number.isFinite(f)&&s.jsxs("span",{className:"ml-2 opacity-80",children:["(",f,"%)"]})]}),u.failed>0&&s.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[s.jsx(E,{className:"h-3.5 w-3.5"}),u.failed," failure",u.failed===1?"":"s"]})]}),s.jsxs("div",{className:"flex-1 space-y-2 overflow-auto",children:[e.length===0&&!r&&s.jsxs("div",{className:"rounded border border-slate-700 bg-slate-800/30 p-4 text-center text-sm text-slate-400",children:["No eval suites available. Verify ",s.jsx("code",{className:"font-mono text-xs",children:"/api/eval/suites"})," on the gateway."]}),e.map(a=>s.jsx(P,{suite:a,expanded:p===a.name,onToggle:()=>m(o=>o===a.name?null:a.name),onRun:()=>x(a.name)},a.name))]})]})}function P({suite:e,expanded:t,onToggle:r,onRun:n}){var x;const p=M[e.name]??e.name,m=e.result?w(e.result):NaN,d=S(m);return s.jsxs("div",{className:`rounded-lg border ${C[d]}`,children:[s.jsxs("div",{className:"flex items-center gap-3 p-3",children:[s.jsx("button",{onClick:r,disabled:!e.result,className:"text-slate-300 disabled:opacity-30","aria-label":t?"Collapse":"Expand",children:t?s.jsx(k,{className:"h-4 w-4"}):s.jsx(A,{className:"h-4 w-4"})}),s.jsx("div",{className:"font-medium text-slate-100",children:p}),s.jsx("div",{className:"text-xs text-slate-400",children:e.result?`${e.result.passed}/${e.result.total} (${m}%)`:e.status==="running"?"running…":e.status==="error"?`error: ${e.error}`:"idle"}),((x=e.result)==null?void 0:x.durationMs)!==void 0&&s.jsxs("div",{className:"text-xs text-slate-500",children:[(e.result.durationMs/1e3).toFixed(1),"s"]}),s.jsxs("button",{onClick:n,disabled:e.status==="running",className:"ml-auto flex items-center gap-1 rounded border border-slate-600 bg-slate-800/60 px-2 py-1 text-xs text-slate-200 hover:bg-slate-800 disabled:opacity-50",children:[e.status==="running"?s.jsx(j,{className:"h-3 w-3 animate-spin"}):s.jsx(y,{className:"h-3 w-3"}),"Run"]})]}),t&&e.result&&s.jsx("div",{className:"space-y-1.5 border-t border-slate-700/40 px-3 py-2",children:e.result.results.map(h=>s.jsx(q,{caseResult:h},h.name))})]})}function q({caseResult:e}){const t=e.expectedToolSequence!==void 0&&JSON.stringify(e.expectedToolSequence)!==JSON.stringify(e.toolsUsed);return s.jsxs("div",{className:`rounded p-2 text-xs ${e.passed?"bg-slate-800/30":"bg-red-950/30"}`,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[e.passed?s.jsx(L,{className:"h-3.5 w-3.5 text-emerald-400"}):s.jsx(T,{className:"h-3.5 w-3.5 text-red-400"}),s.jsx("div",{className:"font-mono text-slate-200",children:e.name}),s.jsxs("div",{className:"ml-auto text-slate-500",children:[e.durationMs,"ms"]})]}),!e.passed&&e.errors.length>0&&s.jsx("ul",{className:"mt-1 ml-5 list-disc text-red-300",children:e.errors.map((r,n)=>s.jsx("li",{children:r},n))}),t&&s.jsxs("div",{className:"mt-2 ml-5 grid grid-cols-2 gap-2 rounded bg-slate-900/40 p-2",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"mb-1 flex items-center gap-1 text-slate-400",children:[s.jsx(v,{className:"h-3 w-3"})," expected"]}),(e.expectedToolSequence??[]).map((r,n)=>s.jsxs("div",{className:"font-mono text-emerald-300",children:[n+1,". ",r]},n))]}),s.jsxs("div",{children:[s.jsxs("div",{className:"mb-1 flex items-center gap-1 text-slate-400",children:[s.jsx(v,{className:"h-3 w-3"})," actual"]}),e.toolsUsed.length===0&&s.jsx("div",{className:"italic text-slate-500",children:"(no tool calls)"}),e.toolsUsed.map((r,n)=>{var d;const m=((d=e.expectedToolSequence)==null?void 0:d[n])===r;return s.jsxs("div",{className:`font-mono ${m?"text-emerald-300":"text-red-300"}`,children:[n+1,". ",r]},n)})]})]})]})}export{G as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as v,r as o,j as e,Z as x,A as h,H as f,C as j,aB as p}from"./index-C6oarzis.js";import{S as a}from"./StatCard-Cv2u-yqA.js";import{P as n}from"./PageHeader-CF75km05.js";import{S as g}from"./SkeletonLoader-P8SFCyGi.js";import{C as y,M as b,h as w}from"./TitanCanvas-BhurNMK3.js";import"./VoiceOverlay-BXPVdnJc.js";/**
|
|
2
|
-
* @license lucide-react v0.513.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const S=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],N=v("layers",S);function M(t){const s=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return s>0?`${s}d ${r}h ${i}m`:r>0?`${r}h ${i}m`:`${i}m`}function m(t){const s=t/1024/1024;return s>1024?`${(s/1024).toFixed(1)} GB`:`${s.toFixed(0)} MB`}function C(){const[t,s]=o.useState(null),[r,i]=o.useState(null),[d,u]=o.useState(!0),c=async()=>{try{const l=await p();s(l),i(null)}catch(l){i(l instanceof Error?l.message:"Failed to fetch stats")}finally{u(!1)}};return o.useEffect(()=>{c();const l=setInterval(c,1e4);return()=>clearInterval(l)},[]),d?e.jsxs("div",{className:"space-y-4 md:space-y-6",children:[e.jsx(n,{title:"System Overview",breadcrumbs:[{label:"Admin",href:"/overview"},{label:"Monitoring"},{label:"Overview"}]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:e.jsx(g,{variant:"metric",count:8})})]}):r?e.jsx("div",{className:"rounded-xl border border-error/50 bg-bg-secondary p-6 text-center text-error",children:r}):t?e.jsxs("div",{className:"space-y-4 md:space-y-6",children:[e.jsx(n,{title:"System Overview",subtitle:"Real-time system health and metrics",breadcrumbs:[{label:"Admin",href:"/overview"},{label:"Monitoring"},{label:"Overview"}]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[e.jsx(a,{title:"Uptime",value:M(t.uptime),icon:e.jsx(y,{className:"h-5 w-5"})}),e.jsx(a,{title:"Total Requests",value:t.totalRequests.toLocaleString(),icon:e.jsx(x,{className:"h-5 w-5"})}),e.jsx(a,{title:"Active Agents",value:t.activeAgents,icon:e.jsx(h,{className:"h-5 w-5"})}),e.jsx(a,{title:"Active Sessions",value:t.activeSessions,icon:e.jsx(b,{className:"h-5 w-5"})}),e.jsx(a,{title:"Memory Usage",value:m(t.memoryUsage.heapUsed),icon:e.jsx(f,{className:"h-5 w-5"}),subtitle:`${m(t.memoryUsage.heapTotal)} total`}),e.jsx(a,{title:"Model",value:t.model,icon:e.jsx(j,{className:"h-5 w-5"})}),e.jsx(a,{title:"Provider",value:t.provider,icon:e.jsx(w,{className:"h-5 w-5"})}),e.jsx(a,{title:"Version",value:t.version,icon:e.jsx(N,{className:"h-5 w-5"})})]})]}):null}export{C as default};
|