We deploy an AI OS that takes the grind out of your business.

AI Deployment Partners. Focused on making your business enjoyable and making you irreplaceable in the market. We discover the ops in your business and deploy our AI OS, human in the loop or completely autonomous.

Start the free Ops Audit Book a call
What we build
AI that answers the phone, replies to customers, checks the paperwork and updates your records. Not a chat window bolted to the front of your website.
Where it runs
Inside the software you already pay for. Your CRM, your accounts system, your booking system. You do not change how the business works to suit it.
What you keep
Working software in production, the code and the documentation behind it, and a named person who keeps it running.
Engineers working side by side at desks in a shared office.
Our process

Steps to shipping. You keep something at the end of each one.

The next step does not open until the last one is finished and you have signed it off.

1Prove One workflow, on your real data. A paid discovery on a single job your team does today, connected to the systems that hold the answers. You watch it work before you commit to anything more. You keep: the written plan and a working version, run on your own records, whether or not you continue.
2Build The full system, and the tests. The AI, the connections into your software, the limits it cannot cross, and the test set that catches problems before your customers do. You keep: the system, its test set and its hard limits, all in your own repository.
3Ship Live, behind your own security. It goes into production inside your access controls, with what it costs, how fast it is and where it gets things wrong all visible to you. You keep: a live system, a written procedure for when it breaks, and a named person to ring.
4Compound We keep it running, or hand it over. Reviewed every quarter. Keep us running it, or take it in house with the documentation and the procedures written down. You keep: a quarterly test run against real cases, with every change written down.
Q1 Q2 Q3 Q4
Services

Six ways we deploy the AI OS.

Every one is running in production for a real business. Nothing goes on the list until it is live, and the links under each service open the proof.

AI automation

The recurring admin that eats a team's week: updating records, producing the reports, chasing the follow-ups. HireHospo runs its CRM, product catalogue and reporting from one engine we built, with separate agents auditing its ads and sales.

Running in HireHospo

Open the portal ↗

Voice AI

Agents that hold a real phone conversation and act on what was agreed. DebtOps phones people about overdue accounts, negotiates a repayment plan with a reasoning model built for that job, and records the plan against the account.

Running in DebtOps

Open debtops.ai ↗

Agentic AI workflows

AI agents that carry a whole job from start to finish, not a chat window. One agent does the work, a second checks every commitment before it counts, and a third hands to a person when the rules say it must.

Running in DebtOps and HireHospo

Open debtops.ai ↗Read the build →

AI engines

The specialised core that does one hard thing well. HeyRegs turns a photograph of a paper stamp card into a working loyalty programme. GrantOps reads grant conditions and explains them in plain language.

Running in HeyRegs and GrantOps

Open heyregs.com ↗Open grantops.au ↗

AI products

When the answer is new software rather than a change to your systems, we design the product, build it and run it after launch. Three of ours are open on the internet right now.

DebtOps · HeyRegs · GrantOps

See all five systems →

MCP integrations

The connections that let AI read and write the software you already run: your CRM, your ledger, your phone system. We build them as custom MCP servers, and exactly one path is allowed to write.

Running in DebtOps · telephony, CRM, ledger

Read the build →

Case studies

Live case studies.

We don't do mockups or slide decks. We deploy a functional AI OS. These are real systems running in production right now.

All five systems, and what each one does →

Who does the work

A small team, and the people from your side.

A dedicated team from us and key roles from your side. If those people do not exist in your business yet, we tell you before we quote rather than after.

Solution architect
designs the whole thing
AI engineer
builds the AI itself
Integration engineer
connects it to your software
Delivery lead
keeps it on schedule
Testing
proves it works before launch
Your product owner
decides what right looks like
Your systems owner
gives access, approves changes
A team standing at a board, working through a plan together.
Five roles from us, two from you. The numbers are set when we scope it.

The full team, and the two roles that are yours →

Working with us

Two ways in.

For your business

Deploy the AI OS in your operations.

We find the grind in how your business runs and deploy the AI OS to take it. Start with the free Ops Audit: four questions, about two minutes, and an honest answer on whether we are the right fit.

Start the free Ops Audit →

For your clients

Bring the AI OS to the businesses you serve.

Accountants, agencies and software companies: your clients are asking you about AI. Bring us in behind you. We do the build, you keep the relationship.

Book a call →

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(s(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(s(e,n))});const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>"object"==typeof t&&null!==t,l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(...t)=>t.reduce((t,e)=>n=>e(t(n))),d=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class p{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s1e3*t,f=t=>t/1e3,y=(t,e)=>e?t*(1e3/e):0,g=new Set;function v(t,e,n){t||g.has(e)||(console.warn(s(e,n)),g.add(e))}const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},w=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function T(t,e,n,i){if(t===e&&n===i)return u;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=w(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:w(s(t),e,i)} const b=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),A=T(.33,1.53,.69,.99),V=S(A),P=b(V),M=t=>t>=1?1:(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),k=S(E),D=b(E),C=T(.42,0,1,1),B=T(0,0,.58,1),R=T(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return L(t)?t[x(0,t.length,e)]:t}const O=t=>Array.isArray(t)&&"number"==typeof t[0],F={linear:u,easeIn:C,easeInOut:R,easeOut:B,circIn:E,circInOut:D,circOut:k,backIn:V,backInOut:P,backOut:A,anticipate:M},I=e=>{if(O(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return T(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==F[e],`Invalid easing type '${e}'`,"invalid-easing-type"),F[e]):e},$=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function N(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=$.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(r=t,i)return void(s=!0);i=!0;const o=e;e=n,n=o,e.forEach(a),e.clear(),i=!1,s&&(s=!1,l.process(t))}};return l}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,y=()=>{const r=o.useManualTiming,a=r?s.timestamp:performance.now();n=!1,r||(s.delta=i?1e3/60:Math.max(Math.min(a-s.timestamp,40),1)),s.timestamp=a,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),m.process(s),f.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y)) };return{schedule:$.reduce((e,o)=>{const r=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(y)),r.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<$.length;e++)a[$[e]].cancel(t)},state:s,steps:a}}const{schedule:W,cancel:U,state:z,steps:K}=N("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:u,!0);let Y;function X(){Y=void 0}const G={now:()=>(void 0===Y&&G.set(z.isProcessing||o.useManualTiming?z.timestamp:performance.now()),Y),set:t=>{Y=t,queueMicrotask(X)}},H=t=>e=>"string"==typeof e&&e.startsWith(t),q=H("--"),Z=H("var(--"),_=t=>!!Z(t)&&J.test(t.split("/*")[0].trim()),J=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Q(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const tt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},et={...tt,transform:t=>i(0,1,t)},nt={...tt,default:1},it=t=>Math.round(1e5*t)/1e5,st=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ot=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rt=(t,e)=>n=>Boolean("string"==typeof n&&ot.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),at=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(st);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},lt={...tt,transform:t=>Math.round((t=>i(0,255,t))(t))},ct={test:rt("rgb","red"),parse:at("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+lt.transform(t)+", "+lt.transform(e)+", "+lt.transform(n)+", "+it(et.transform(i))+")"};const ut={test:rt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7), s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:ct.transform},ht=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),dt=ht("deg"),pt=ht("%"),mt=ht("px"),ft=ht("vh"),yt=ht("vw"),gt=(()=>({...pt,parse:t=>pt.parse(t)/100,transform:t=>pt.transform(100*t)}))(),vt={test:rt("hsl","hue"),parse:at("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+pt.transform(it(e))+", "+pt.transform(it(n))+", "+it(et.transform(i))+")"},xt={test:t=>ct.test(t)||ut.test(t)||vt.test(t),parse:t=>ct.test(t)?ct.parse(t):vt.test(t)?vt.parse(t):ut.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ct.transform(t):vt.transform(t),getAnimatableNone:t=>{const e=xt.parse(t);return e.alpha=0,xt.transform(e)}},wt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Tt="number",bt="color",St=/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 At(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(St,t=>(xt.test(t)?(i.color.push(o),s.push(bt),n.push(xt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(Tt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Vt({split:t,types:e}){const n=t.length;return i=>{let s="" ;for(let o=0;o{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:xt.test(n)?xt.getAnimatableNone(n):n;var n};const Mt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(st)?.length||0)+(t.match(wt)?.length||0)>0},parse:function(t){return At(t).values},createTransformer:function(t){return Vt(At(t))},getAnimatableNone:function(t){const e=At(t);return Vt(e)(e.values.map((t,n)=>Pt(t,e.split[n])))}};function Et(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function kt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Et(a,i,t+1/3),o=Et(a,i,t),r=Et(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Dt(t,e){return n=>n>0?e:t}const Ct=(t,e,n)=>t+(e-t)*n,Bt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Rt=[ut,ct,vt];function Lt(e){const n=(i=e,Rt.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(e);return n===vt&&(s=kt(s)),s}const jt=(t,e)=>{const n=Lt(t),i=Lt(e);if(!n||!i)return Dt(t,e);const s={...n};return t=>(s.red=Bt(n.red,i.red,t),s.green=Bt(n.green,i.green,t),s.blue=Bt(n.blue,i.blue,t),s.alpha=Ct(n.alpha,i.alpha,t),ct.transform(s))},Ot=new Set(["none","hidden"]);function Ft(t,e){return Ot.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function It(t,e){return n=>Ct(t,e,n)}function $t(t){ return"number"==typeof t?It:"string"==typeof t?_(t)?Dt:xt.test(t)?jt:Ut:Array.isArray(t)?Nt:"object"==typeof t?xt.test(t)?jt:Wt:Dt}function Nt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>$t(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in i)n[e]=i[e](t);return n}}const Ut=(e,n)=>{const i=Mt.createTransformer(n),s=At(e),o=At(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Ot.has(e)&&!o.values.length||Ot.has(n)&&!s.values.length?Ft(e,n):h(Nt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>W.update(e,t),stop:()=>U(e),now:()=>z.isProcessing?z.timestamp:G.now()}},Yt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e=Xt?1/0:e}function Ht(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Gt(i),Xt);return{type:"keyframes", ease:t=>i.next(s*t).value/e,duration:f(s)}}const qt=100,Zt=10,_t=1,Jt=0,Qt=800,te=.3,ee=.3,ne={granular:.01,default:2},ie={granular:.005,default:.5},se=.01,oe=10,re=.05,ae=1;function le(t,e){return t*Math.sqrt(1-e*e)}const ce=.001;const ue=["duration","bounce"],he=["stiffness","damping","mass"];function de(t,e){return e.some(e=>void 0!==t[e])}function pe(e){let n={velocity:Jt,stiffness:qt,damping:Zt,mass:_t,isResolvedFromDuration:!1,...e};if(!de(e,he)&&de(e,ue))if(n.velocity=0,e.visualDuration){const t=e.visualDuration,s=2*Math.PI/(1.2*t),o=s*s,r=2*i(.05,1,1-(e.bounce||0))*Math.sqrt(o);n={...n,mass:_t,stiffness:o,damping:r}}else{const s=function({duration:e=Qt,bounce:n=te,velocity:s=Jt,mass:o=_t}){let r,a;t.warning(e<=m(oe),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=i(re,ae,l),e=i(se,oe,f(e)),l<1?(r=t=>{const n=t*l,i=n*e,o=n-s,r=le(t,l),a=Math.exp(-i);return ce-o/r*a},a=t=>{const n=t*l*e,i=n*s+s,o=Math.pow(l,2)*Math.pow(t,2)*e,a=Math.exp(-n),c=le(Math.pow(t,2),l);return(-r(t)+ce>0?-1:1)*((i-o)*a)/c}):(r=t=>Math.exp(-t*e)*((t-s)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(s-t)));const c=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(r,a,5/e);if(e=m(e),isNaN(c))return{stiffness:qt,damping:Zt,duration:e};{const t=Math.pow(c,2)*o;return{stiffness:t,damping:2*l*Math.sqrt(o*t),duration:e}}}({...e,velocity:0});n={...n,...s,mass:_t},n.isResolvedFromDuration=!0}return n}function me(t=ee,e=te){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:p}=pe({...n,velocity:-f(n.velocity||0) }),y=d||0,g=c/(2*Math.sqrt(l*u)),v=r-o,x=f(Math.sqrt(l/u)),w=Math.abs(v)<5;let T,b,S,A,V,P;if(i||(i=w?ne.granular:ne.default),s||(s=w?ie.granular:ie.default),g<1)S=le(x,g),A=(y+g*x*v)/S,T=t=>{const e=Math.exp(-g*x*t);return r-e*(A*Math.sin(S*t)+v*Math.cos(S*t))},V=g*x*A+v*S,P=g*x*v-A*S,b=t=>Math.exp(-g*x*t)*(V*Math.sin(S*t)+P*Math.cos(S*t));else if(1===g){T=t=>r-Math.exp(-x*t)*(v+(y+x*v)*t);const t=y+x*v;b=e=>Math.exp(-x*e)*(x*t*e-y)}else{const t=x*Math.sqrt(g*g-1);T=e=>{const n=Math.exp(-g*x*e),i=Math.min(t*e,300);return r-n*((y+g*x*v)*Math.sinh(i)+t*v*Math.cosh(i))/t};const e=(y+g*x*v)/t,n=g*x*e-v*t,i=g*x*v-e*t;b=e=>{const s=Math.exp(-g*x*e),o=Math.min(t*e,300);return s*(n*Math.sinh(o)+i*Math.cosh(o))}}const M={calculatedDuration:p&&h||null,velocity:t=>m(b(t)),next:t=>{if(!p&&g<1){const e=Math.exp(-g*x*t),n=Math.sin(S*t),o=Math.cos(S*t),l=r-e*(A*n+v*o),c=m(e*(V*n+P*o));return a.done=Math.abs(c)<=i&&Math.abs(r-l)<=s,a.value=a.done?r:l,a}const e=T(t);if(p)a.done=t>=h;else{const n=m(b(t));a.done=Math.abs(n)<=i&&Math.abs(r-e)<=s}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(Gt(M),Xt),e=Yt(e=>M.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return M}me.applyToOptions=t=>{const e=Ht(t,100,me);return t.ease=e.ease,t.duration=m(e.duration),t.type="keyframes",t};function fe(t,e,n){const i=Math.max(e-5,0);return y(n-t(i),e-i)}function ye({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?y:n} ;let w,T;const b=t=>{var e;(e=d.value,void 0!==a&&el)&&(w=t,T=me({keyframes:[d.value,p(d.value)],velocity:fe(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==w||(e=!0,x(t),b(t)),void 0!==w&&t>=w?T.next(t-w):(!e&&x(t),d)}}}function ge(e,n,{clamp:s=!0,ease:r,mixer:a}={}){const l=e.length;if(t.invariant(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const p=function(t,e,n){const i=[],s=n||o.mix||zt,r=t.length-1;for(let n=0;n{if(c&&t1)for(;if(i(e[0],e[l-1],t)):f}function ve(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=d(0,e,i);t.push(Ct(n,1,s))}}function xe(t){const e=[0];return ve(e,t.length-1),e}function we(t,e){return t.map(t=>t*e)}function Te(t,e){return t.map(()=>e||R).splice(0,t.length-1)}function be({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=L(i)?i.map(I):I(i),o={done:!1,value:e[0]},r=ge(we(n&&n.length===e.length?n:xe(e),t),e,{ease:Array.isArray(s)?s:Te(e,s)});return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}const Se=t=>null!==t;function Ae(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Se),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Ve={decay:ye,inertia:ye,tween:be,keyframes:be,spring:me};function Pe(t){"string"==typeof t.type&&(t.type=Ve[t.type])}class Me{constructor(){ this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ee=t=>t/100;class ke extends Me{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Pe(t);const{type:e=be,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||be;a!==be&&"number"!=typeof r[0]&&(this.mixKeyframes=h(Ee,zt(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Gt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)), e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x,w=this.currentTime,T=n;if(h){const t=Math.min(this.currentTime,s)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(T=r)),w=i(0,1,n)*a}v?(this.delayState.value=u[0],x=this.delayState):x=T.next(w),o&&!v&&(x.value=o(x.value));let{done:b}=x;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==ye&&(x.value=Ae(u,this.options,y,this.speed)),f&&f(x.value),S&&this.finish(),x}then(t,e){return this.finished.then(t,e)}get duration(){return f(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(this.currentTime)}set time(t){t=m(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return fe(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(G.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=f(this.currentTime))}play(){if(this.isStopped)return ;const{driver:t=Kt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function De(t){for(let e=1;e180*t/Math.PI,Be=t=>{const e=Ce(Math.atan2(t[1],t[0]));return Le(e)},Re={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Be,rotateZ:Be,skewX:t=>Ce(Math.atan(t[1])),skewY:t=>Ce(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Le=t=>((t%=360)<0&&(t+=360),t),je=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Oe=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Fe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:je,scaleY:Oe,scale:t=>(je(t)+Oe(t))/2,rotateX:t=>Le(Ce(Math.atan2(t[6],t[5]))), rotateY:t=>Le(Ce(Math.atan2(-t[2],t[0]))),rotateZ:Be,rotate:Be,skewX:t=>Ce(Math.atan(t[4])),skewY:t=>Ce(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ie(t){return t.includes("scale")?1:0}function $e(t,e){if(!t||"none"===t)return Ie(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Fe,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Re,s=e}if(!s)return Ie(e);const o=i[e],r=s[1].split(",").map(We);return"function"==typeof o?o(r):r[o]}const Ne=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return $e(n,e)};function We(t){return parseFloat(t.trim())}const Ue=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ze=(()=>new Set([...Ue,"pathRotation"]))(),Ke=t=>t===tt||t===mt,Ye=new Set(["x","y","z"]),Xe=Ue.filter(t=>!Ye.has(t));const Ge={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-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})=>$e(e,"x"),y:(t,{transform:e})=>$e(e,"y")};Ge.translateX=Ge.x,Ge.translateY=Ge.y;const He=new Set;let qe=!1,Ze=!1,_e=!1;function Je(){if(Ze){const t=Array.from(He).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Xe.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t) ;e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ze=!1,qe=!1,He.forEach(t=>t.complete(_e)),He.clear()}function Qe(){He.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ze=!0)})}function tn(){_e=!0,Qe(),Je(),_e=!1}class en{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(He.add(this),qe||(qe=!0,W.read(Qe),W.resolveKeyframes(Je))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}De(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),He.delete(this)}cancel(){"scheduled"===this.state&&(He.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const nn=t=>t.startsWith("--");function sn(t,e,n){nn(e)?t.style.setProperty(e,n):t.style[e]=n}const on={};function rn(t,e){const n=c(t);return()=>on[e]??n()}const an=rn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),ln=rn(()=>void 0!==window.ViewTimeline,"viewTimeline"),cn=rn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0 },"linearEasing"),un=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,hn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:un([0,.65,.55,1]),circOut:un([.55,0,1,.45]),backIn:un([.31,.01,.66,-.59]),backOut:un([.33,1.53,.69,.99])};function dn(t,e){return t?"function"==typeof t?cn()?Yt(t,e):"ease-out":O(t)?un(t):Array.isArray(t)?t.map(t=>dn(t,e)||hn.easeOut):hn[t]:void 0}function pn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=dn(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function mn(t){return"function"==typeof t&&"applyToOptions"in t}function fn({type:t,...e}){return mn(t)&&cn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class yn extends Me{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=fn(e);this.animation=pn(n,i,s,c,o),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Ae(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t),sn(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())} pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return f(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=m(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&an()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),u):i(this)}}const gn={anticipate:M,backInOut:P,circInOut:D};function vn(t){"string"==typeof t.ease&&t.ease in gn&&(t.ease=gn[t.ease])}class xn extends yn{constructor(t){vn(t),Pe(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){ const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new ke({...r,autoplay:!1}),l=Math.max(10,G.now()-this.startTime),c=i(0,10,l-10),u=a.sample(l).value,{name:h}=this.options;o&&h&&sn(o,h,u),e.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const wn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Mt.test(t)&&"0"!==t||t.startsWith("url(")));function Tn(t){t.duration=0,t.type="keyframes"}const bn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Sn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const An=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Vn=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Pn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Vn()&&n&&(bn.has(n)||An.has(n)&&function(t){for(let e=0;e{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...u},d=c?.KeyframeResolver||en ;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:h,onUpdate:d}=i;this.resolvedAt=G.now();let p=!0;(function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=wn(o,n),l=wn(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},f=p&&!h&&Pn(m),y=m.motionValue?.owner?.current;let g;if(f)try{g=new xn({...m,element:y})}catch{g=new ke(m)}else g=new ke(m);g.finished.then(()=>{this.notifyFinished()}).catch(u),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){ return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class En{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return kn(this.animations,"duration")}get iterationDuration(){return kn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function kn(t,e){let n=0;for(let i=0;in&&(n=s)}return n}class Dn extends En{then(t,e){return this.finished.finally(t).then(()=>{})}}class Cn extends yn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Bn=new WeakMap,Rn=(t,e="")=>`${t}:${e}`;function Ln(t){let e=Bn.get(t);return e||(e=new Map,Bn.set(t,e)),e}function jn(t,e,n,i=0,s=1){ const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const On={current:void 0};class Fn{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=G.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=G.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new p);const n=this.events[t].add(e);return"change"===t?()=>{n(),W.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return On.current&&On.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){ const t=G.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return y(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function In(t,e){return new Fn(t,e)}function $n(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Nn(t,e){const n=t?.[e]??t?.default??t;return n!==t?$n(n,t):n}const Wn={type:"spring",stiffness:500,damping:25,restSpeed:10},Un={type:"keyframes",duration:.8},zn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kn=(t,{keyframes:e})=>e.length>2?Un:ze.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Wn:zn,Yn=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Xn(t){for(const e in t)if(!Yn.has(e))return!0;return!1}const Gn=(t,e,n,i={},s,r)=>a=>{const l=Nn(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=m(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)}, onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};Xn(l)||Object.assign(h,Kn(t,h)),h.duration&&(h.duration=m(h.duration)),h.repeatDelay&&(h.repeatDelay=m(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Tn(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,Tn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=Ae(h.keyframes,l);if(void 0!==t)return void W.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new ke(h):new Mn(h)};function Hn(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function qn(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function Zn(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const _n=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jn(t){const e=_n.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Qn(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=Jn(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return _(o)?Qn(o,n,i+1):o}function ti(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ei(t,e,n,i){if("function"==typeof e){const[s,o]=ti(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=ti(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function ni(t,e,n){ const i=t.getProps();return ei(i,e,void 0!==n?n:i.custom,t)}const ii=new Set(["width","height","top","left","right","bottom",...Ue]),si=t=>Array.isArray(t);function oi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,In(n))}function ri(t){return si(t)?t[t.length-1]||0:t}function ai(t,e){const n=ni(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){oi(t,e,ri(o[e]))}}function li(t){return Boolean(t&&t.getVelocity)}function ci(t){return Boolean(li(t)&&t.add)}function ui(t,e){const n=t.getValue("willChange");if(ci(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function hi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const di="framerAppearId",pi="data-"+hi(di);function mi(t){return t.props[pi]}const fi="undefined"!=typeof window;function yi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function gi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||c&&yi(c,e))continue;const r={delay:n,...Nn(o||{},e)},u=i.get();if(void 0!==u&&!i.isAnimating()&&!Array.isArray(s)&&s===u&&!r.velocity)continue;let h=!1;if(fi&&window.MotionHandoffAnimation){const n=mi(t);if(n){const t=window.MotionHandoffAnimation(n,e,W);null!==t&&(r.startTime=t,h=!0)}}ui(t,e);const d=t.shouldReduceMotion;i.start(Gn(e,i,s,d&&ii.has(e)?{type:!1}:r,t,h));const p=i.animation;p&&l.push(p)}if(r){const e=()=>W.update(()=>{r&&ai(t,r)});l.length?Promise.all(l).then(e):e()}return l}function vi(t,e,n={}){const i=ni(t,e,"exit"===n.type?t.presenceContext?.custom:void 0) ;let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(gi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(vi(l,e,{...r,delay:n+("function"==typeof i?0:i)+jn(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function xi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>vi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=vi(t,e,n);else{const s="function"==typeof e?ni(t,e,n.custom):e;i=Promise.all(gi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const wi=t=>e=>e.test(t),Ti=[tt,mt,pt,dt,yt,ft,{test:t=>"auto"===t,parse:t=>t}],bi=t=>Ti.find(wi(t));function Si(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const Ai=new Set(["brightness","contrast","saturate","opacity"]);function Vi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(st)||[];if(!i)return t;const s=n.replace(i,"");let o=Ai.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Pi=/\b([a-z-]*)\(.*?\)/gu,Mi={...Mt,getAnimatableNone:t=>{const e=t.match(Pi);return e?e.map(Vi).join(" "):t}},Ei={...Mt,getAnimatableNone:t=>{ const e=Mt.parse(t);return Mt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},ki={...tt,transform:Math.round},Di={rotate:dt,pathRotation:dt,rotateX:dt,rotateY:dt,rotateZ:dt,scale:nt,scaleX:nt,scaleY:nt,scaleZ:nt,skew:dt,skewX:dt,skewY:dt,distance:mt,translateX:mt,translateY:mt,translateZ:mt,x:mt,y:mt,z:mt,perspective:mt,transformPerspective:mt,opacity:et,originX:gt,originY:gt,originZ:mt},Ci={borderWidth:mt,borderTopWidth:mt,borderRightWidth:mt,borderBottomWidth:mt,borderLeftWidth:mt,borderRadius:mt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,width:mt,maxWidth:mt,height:mt,maxHeight:mt,top:mt,right:mt,bottom:mt,left:mt,inset:mt,insetBlock:mt,insetBlockStart:mt,insetBlockEnd:mt,insetInline:mt,insetInlineStart:mt,insetInlineEnd:mt,padding:mt,paddingTop:mt,paddingRight:mt,paddingBottom:mt,paddingLeft:mt,paddingBlock:mt,paddingBlockStart:mt,paddingBlockEnd:mt,paddingInline:mt,paddingInlineStart:mt,paddingInlineEnd:mt,margin:mt,marginTop:mt,marginRight:mt,marginBottom:mt,marginLeft:mt,marginBlock:mt,marginBlockStart:mt,marginBlockEnd:mt,marginInline:mt,marginInlineStart:mt,marginInlineEnd:mt,fontSize:mt,backgroundPositionX:mt,backgroundPositionY:mt,...Di,zIndex:ki,fillOpacity:et,strokeOpacity:et,numOctaves:ki},Bi={...Ci,color:xt,backgroundColor:xt,outlineColor:xt,fill:xt,stroke:xt,borderColor:xt,borderTopColor:xt,borderRightColor:xt,borderBottomColor:xt,borderLeftColor:xt,filter:Mi,WebkitFilter:Mi,mask:Ei,WebkitMask:Ei},Ri=t=>Bi[t],Li=new Set([Mi,Ei]);function ji(t,e){let n=Ri(t);return Li.has(n)||(n=Mt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Oi=new Set(["auto","none","0"]);class Fi extends en{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){ const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}} const Ii=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],$i=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...Ii,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function Ni(t,e){for(let n=0;n{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0});function Ui(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function zi(t){return(e,n)=>{const i=Ui(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Ki=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Yi{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const r=()=>{const i=e.get();this.latest[t]=s?Ki(i,Ci[t]):i,n&&W.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&U(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){ return this.values.get(t)?.value}}function Xi(t){const e=new WeakMap;return(n,i)=>{const s=e.get(n)??new Yi;e.set(n,s);const o=[];for(const e in i){const r=i[e],a=t(n,s,e,r);o.push(a)}return()=>{for(const t of o)t()}}}const Gi=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?hi(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},Hi=zi(Xi(Gi)),qi=Xi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function Zi(t){return a(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const _i={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Ji=new Set(["originX","originY","originZ"]),Qi=(t,e,n,i)=>{let s,o;return ze.has(n)?(e.get("transform")||(Zi(t)||e.get("transformBox")||Qi(t,e,"transformBox",new Fn("fill-box")),e.set("transform",new Fn("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=nn(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{ t.style[n]=e.latest[n]},e.set(n,i,s,o)},ts=zi(Xi(Qi));const es=zi(Xi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return W.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new Fn("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Gi(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Qi:Gi)(t,e,n,i)}));const{schedule:ns,cancel:is}=N(queueMicrotask,!1),ss={x:!1,y:!1};function os(){return ss.x||ss.y}function rs(t,e){const n=Ui(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const as=(t,e)=>!!e&&(t===e||as(t,e.parentElement)),ls=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,cs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function us(t){return cs.has(t.tagName)||!0===t.isContentEditable}const hs=new Set(["INPUT","SELECT","TEXTAREA"]);const ds=new WeakSet;function ps(t){return e=>{"Enter"===e.key&&t(e)}}function ms(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function fs(t){return ls(t)&&!os()}const ys=new WeakSet;function gs(t,e){const n=window.getComputedStyle(t);return nn(e)?n.getPropertyValue(e):n[e]}function vs(t){return a(t)&&"ownerSVGElement"in t}const xs=new WeakMap;let ws;const Ts=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:vs(i)&&"getBBox"in i?i.getBBox()[e]:i[n],bs=Ts("inline","width","offsetWidth"),Ss=Ts("block","height","offsetHeight");function As({target:t,borderBoxSize:e}){xs.get(t)?.forEach(n=>{ n(t,{get width(){return bs(t,e)},get height(){return Ss(t,e)}})})}function Vs(t){t.forEach(As)}function Ps(t,e){ws||"undefined"!=typeof ResizeObserver&&(ws=new ResizeObserver(Vs));const n=Ui(t);return n.forEach(t=>{let n=xs.get(t);n||(n=new Set,xs.set(t,n)),n.add(e),ws?.observe(t)}),()=>{n.forEach(t=>{const n=xs.get(t);n?.delete(e),n?.size||ws?.unobserve(t)})}}const Ms=new Set;let Es;function ks(t){return Ms.add(t),Es||(Es=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ms.forEach(e=>e(t))},window.addEventListener("resize",Es)),()=>{Ms.delete(t),Ms.size||"function"!=typeof Es||(window.removeEventListener("resize",Es),Es=void 0)}}function Ds(t,e){return"function"==typeof t?ks(t):Ps(t,e)}function Cs(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return W.preUpdate(i,!0),()=>U(i)}const Bs={value:null,addProjectionMetrics:null};function Rs(t){return vs(t)&&"svg"===t.tagName}function Ls(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function js(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=ge(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function Os(t,e){const n=In(li(t)?t.get():t);return Fs(n,t,e),n}function Fs(t,e,n={}){const i=t.get();let s,o=null,r=i;const a="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,l=()=>{o&&(o.stop(),o=null),t.animation=void 0},c=()=>{(()=>{const e=$s(t.get()),i=$s(r);if(e===i)return void l();const a=o?o.getGeneratorVelocity():t.getVelocity();l(),o=new ke({keyframes:[e,i],velocity:a,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s})})(),t.animation=o??void 0,t.events.animationStart?.notify(),o?.then(()=>{t.animation=void 0,t.events.animationComplete?.notify()})};if(t.attach((t,e)=>{r=t,s=t=>e(Is(t,a)),W.postRender(c)},l), li(e)){let i=!0===n.skipInitialAnimation;const s=e.on("change",e=>{i?(i=!1,t.jump(Is(e,a),!1)):t.set(Is(e,a))}),o=t.on("destroy",s);return()=>{s(),o()}}return l}function Is(t,e){return e?t+e:t}function $s(t){return"number"==typeof t?t:parseFloat(t)}function Ns(t){const e=[];On.current=e;const n=t();On.current=void 0;const i=In(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>W.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),U(i)})}(e,i,t),i}const Ws=[...Ti,xt,Mt],Us=t=>Ws.find(wi(t));let zs=0;const Ks=()=>"motion-view-"+zs++;function Ys(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function Xs(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function Gs(t,e,n,i,s,o=[],r,a=[],l){const c=Ui(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??Ks();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),Ys(t,s,o),Xs(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=Ks(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),Ys(t,s,o),Xs(t,d,r,a,l),d})}function Hs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let qs={},Zs=null;const _s=(t,e)=>{qs[t]=e},Js=()=>{Zs||(Zs=document.createElement("style"),Zs.id="motion-view");let t="";for(const e in qs){const n=qs[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}Zs.textContent=t, document.head.appendChild(Zs),qs={}},Qs=()=>{Zs&&Zs.parentElement&&Zs.parentElement.removeChild(Zs)};function to(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function eo(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const no=["layout","enter","exit","new","old"],io=t=>t.split(" ").every(t=>0===parseFloat(t)),so={group:["layout"],new:["new","enter"],old:["old","exit"]},oo={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function ro(t){const{update:e,targets:n,resolveDefs:i,cropOverride:s,pairs:o,classNames:r,flatGroups:a,options:l}=t;if(!document.startViewTransition)return(async()=>(await e(),new En([])))();const c=new Map,u=[],h=[],d=[],p=new Set,f=new Map,y=new Set,g=new Map,x=new Map,w=new Map,T=new Map,b=t=>{n.forEach((e,n)=>{const l=r.get(n),m="root"!==n&&i.has(n)?a.has(n)?"none":"contain":void 0;let y;if("root"!==n&&i.has(n))if(o.has(n))if("old"===t)T.set(n,Ui(n)),y=Gs(n,c,u,void 0,l,h,m,d,p),w.set(n,y);else{for(const t of T.get(n)??[])t.style?.removeProperty("view-transition-name"),c.delete(t);y=Gs(o.get(n),c,u,w.get(n),l,h,m,d,p)}else y=Gs(n,c,u,void 0,l,h,m,d,p);else y=[n];const v=s.get(n);y.forEach((n,i)=>{const s=f.get(n);f.set(n,s&&s!==e?{...s,...e}:e),void 0!==v&&g.set(n,v);const o=x.get(n)??{};o[t]=[i,y.length],x.set(n,o)})})},S=(t,e)=>{const n=x.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},A=(t,e,n,i,s)=>{const o=ao(Nn(l,n),Nn(function(t,e){for(const n of so[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},V=t=>{ const[e,n]=S(t,"group"),i=A(f.get(t),"group","layout",-1===e?0:e,n);i.duration&&(i.duration=m(i.duration));const{delay:s=0,duration:o,ease:r}=fn(i);return{delay:m(s),duration:o,ease:r}},P=new Map,M=t=>c.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of Ii)o[t]=n[t];const r=P.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},P.set(e,r)}}),E=t=>{const e=P.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},k=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||_s(":root",{"view-transition-name":"none"}),_s("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),y.forEach(t=>{_s(`::view-transition-group(${t})`,{overflow:"clip"}),_s(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),p.forEach(t=>{_s(`::view-transition-group-children(${t})`,{overflow:"clip"})}),Js()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(u,h,d),Qs()},C=async()=>{await e(),b("new"),M("new"),(()=>{y.clear();for(const t of x.keys())"root"!==t&&(g.get(t)??E(t))&&y.add(t)})(),k()};let B;try{b("old"),M("old"),k(),B=document.startViewTransition(C)}catch(t){return D(),Promise.reject(t)}return B.finished.finally(D),new Promise((t,e)=>{B.ready.then(()=>{const e=eo(),n=[],i=new Set,s=new Set;f.forEach((t,e)=>{const o=x.get(e),r=!!o?.new&&!o?.old,a=!!o?.old&&!o?.new;for(const o of no){if(!t[o])continue ;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=Hs(o),[u,h]=S(e,c);if(-1===u)continue;const{keyframes:d,options:p}=t[o];for(let[f,y]of Object.entries(d)){if(null==y)continue;if("x"===f||"y"===f){v(!1,`animateView() animates view-transition layers with CSS properties; the "${f}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===o&&r&&null!=t.enter?.keyframes[f])continue;if("old"===o&&a&&null!=t.exit?.keyframes[f])continue;const d=ao(Nn(l,f),Nn(p,f));if(!Array.isArray(y)){const e="enter"===o?t.exit?.keyframes[f]:void 0,n="opacity"===f||("new"===c?r:a),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?oo[c]?.[f]:void 0;void 0!==i&&(y=[i,y])}"function"==typeof d.delay&&(d.delay=d.delay(u,h)),d.duration&&(d.duration=m(d.duration)),d.delay&&(d.delay=m(d.delay)),n.push(new yn({...d,element:document.documentElement,name:f,pseudoElement:`::view-transition-${c}(${e})`,keyframes:y})),i.add(`${e}:${c}`),"opacity"===f&&s.add(`${e}:${c}`)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=to(o);if(!r)continue;const a=f.get(r.layer);if(i.has(`${r.layer}:${r.type}`)){s.has(`${r.layer}:new`)&&s.has(`${r.layer}:old`)&&e.getKeyframes().some(t=>t.mixBlendMode)?n.push(new Cn(t)):t.cancel();continue}const l="old"===r.type?"new":"new"===r.type?"old":void 0;if(l&&i.has(`${r.layer}:${l}`)&&!s.has(`${r.layer}:${l}`)){t.cancel();continue}const c=x.get(r.layer),u=!("old"!==r.type&&"new"!==r.type||!c?.old||!c?.new);let h;if(r.type.startsWith("group")){const{delay:t,duration:e,ease:n}=V(r.layer);h={delay:t,duration:e,easing:dn(n,e)}}else{const t=u?"group":r.type,[e,n]=S(r.layer,t) ;let i=A(a,t,"group"===t?"layout":"",-1===e?0:e,n);const s=i.visualDuration;i.duration&&(i.duration=m(i.duration)),i=fn(i),h={delay:m(i.delay??0),duration:u&&void 0!==s?m(s):i.duration,easing:u?"linear":dn(i.ease,i.duration)}}e.updateTiming(h),n.push(new Cn(t))}P.forEach((t,e)=>{if(!y.has(e))return;const{delay:i,duration:s,ease:o}=V(e);for(const r of Ii){const a=t.old?.radii[r]||"0px",l=t.new?.radii[r]||"0px";io(a)&&io(l)||n.push(new yn({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:i,duration:s,ease:o}))}}),t(new En(n))}).catch(()=>B.updateCallbackDone.then(()=>t(new En([])),e))})}function ao(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let lo=[],co=null;function uo(){co=null;const[t]=lo;var e;t&&(n(lo,e=t),co=e,ro(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(uo))}function ho(){for(let t=lo.length-1;t>=0;t--){const e=lo[t],{interrupt:n}=e.options;if("immediate"===n){const n=lo.slice(0,t+1).map(t=>t.update),i=lo.slice(t+1);e.update=()=>{n.forEach(t=>t())},lo=[e,...i];break}}co&&"immediate"!==lo[0]?.options.interrupt||uo()}class po{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=u,this.notifyReject=u,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...e},this.readyPromise.catch(u),n=this,lo.push(n),ns.render(ho)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e), this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const mo=()=>({translate:0,scale:1,origin:0,originPoint:0}),fo=()=>({x:mo(),y:mo()}),yo=()=>({min:0,max:0}),go=()=>({x:yo(),y:yo()}),vo=new WeakMap;function xo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function wo(t){return"string"==typeof t||Array.isArray(t)}const To=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bo=["initial",...To];function So(t){return xo(t.animate)||bo.some(e=>wo(t[e]))}function Ao(t){return Boolean(So(t)||t.variants)}function Vo(t,e,n){for(const i in e){const s=e[i],o=n[i];if(li(s))t.addValue(i,s);else if(li(o))t.addValue(i,In(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,In(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Po={current:null},Mo={current:!1},Eo="undefined"!=typeof window;function ko(){if(Mo.current=!0, Eo)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Po.current=t.matches;t.addEventListener("change",e),e()}else Po.current=!1}const Do=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Co={};class Bo{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){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=en,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 t=G.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Mo.current||ko(),this.shouldReduceMotion=Po.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),U(this.notifyUpdate),U(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&bn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new yn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:m(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=ze.has(t) ;n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&W.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Co){const e=Co[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):go()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=In(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):!Us(n)&&Mt.test(e)&&(n=ji(t,e)),this.setBaseTarget(t,li(n)?n.get():n)),li(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=ei(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||li(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e) }scheduleRenderMicrotask(){ns.render(this.render)}}class Ro extends Bo{constructor(){super(...arguments),this.KeyframeResolver=Fi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;li(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Lo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function jo(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Oo(t){return void 0===t||1===t}function Fo({scale:t,scaleX:e,scaleY:n}){return!Oo(t)||!Oo(e)||!Oo(n)}function Io(t){return Fo(t)||$o(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function $o(t){return No(t.x)||No(t.y)}function No(t){return t&&"0%"!==t}function Wo(t,e,n){return n+e*(t-n)}function Uo(t,e,n,i,s){return void 0!==s&&(t=Wo(t,s,i)),Wo(t,n,i)+e}function zo(t,e=0,n=1,i,s){t.min=Uo(t.min,e,n,i,s),t.max=Uo(t.max,e,n,i,s)}function Ko(t,{x:e,y:n}){zo(t.x,e.translate,e.scale,e.originPoint),zo(t.y,n.translate,n.scale,n.originPoint)}const Yo=.999999999999,Xo=1.0000000000001;function Go(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;aYo&&(e.x=1),e.yYo&&(e.y=1)}function Ho(t,e){t.min+=e,t.max+=e}function qo(t,e,n,i,s=.5){zo(t,e,n,Ct(t.min,t.max,s),i)}function Zo(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function _o(t,e,n){const i=n??t;qo(t.x,Zo(e.x,i.x),e.scaleX,e.scale,e.originX),qo(t.y,Zo(e.y,i.y),e.scaleY,e.scale,e.originY)}function Jo(t,e){return Lo(jo(t.getBoundingClientRect(),e))}const Qo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tr=Ue.length;function er(t,e,n){let i="",s=!0;for(let o=0;o{if(!e.target)return t;if("string"==typeof t){if(!mt.test(t))return t;t=parseFloat(t)}return`${sr(t,e.target.x)}% ${sr(t,e.target.y)}%`}},rr={ correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Mt.parse(t);if(s.length>5)return i;const o=Mt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Ct(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},ar={borderRadius:{...or,applyTo:[...Ii]},borderTopLeftRadius:or,borderTopRightRadius:or,borderBottomLeftRadius:or,borderBottomRightRadius:or,boxShadow:rr};function lr(t,{layout:e,layoutId:n}){return ze.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!ar[t]||"opacity"===t)}function cr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(li(i[e])||s&&li(s[e])||lr(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class ur extends Ro{constructor(){super(...arguments),this.type="html",this.renderInstance=ir}mount(e){t.invariant(Boolean(e.style),"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(t,e){if(ze.has(e))return this.projection?.isProjecting?Ie(e):Ne(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(q(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Jo(t,e)}build(t,e,n){nr(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return cr(t,e,n)}}class hr extends Bo{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return go()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){ Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const dr={offset:"stroke-dashoffset",array:"stroke-dasharray"},pr={offset:"strokeDashoffset",array:"strokeDasharray"};function mr(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?dr:pr;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const fr=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function yr(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(nr(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of fr)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&mr(h,s,o,r,!1)}const gr=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"]),vr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function xr(t,e,n,i){ir(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(gr.has(n)?n:hi(n),e.attrs[n])}function wr(t,e,n){const i=cr(t,e,n);for(const n in t)if(li(t[n])||li(e[n])){i[-1!==Ue.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class Tr extends Ro{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=go}getBaseTargetFromProps(t,e){return t[e]} readValueFromInstance(t,e){if(ze.has(e)){const t=Ri(e);return t&&t.default||0}if(fr.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=gr.has(e)?e:hi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return wr(t,e,n)}build(t,e,n){yr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){xr(t,e,0,i)}mount(t){this.isSVGTag=vr(t.tagName),super.mount(t)}}const br=bo.length;function Sr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Sr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Or(t,e,n,i){jr(t.x,e.x,n.x,i?i.originX:void 0),jr(t.y,e.y,n.y,i?i.originY:void 0) }function Fr(t,e,n,i=0){const s=i?Ct(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Rr(e)}function Ir(t,e,n,i){Fr(t.x,e.x,n.x,i?.x),Fr(t.y,e.y,n.y,i?.y)}function $r(t,e,n,i=0){const s=i?Ct(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Rr(e)}function Nr(t,e,n,i){$r(t.x,e.x,n.x,i?.x),$r(t.y,e.y,n.y,i?.y)}function Wr(t,e,n,i,s){return t=Wo(t-=e,1/n,i),void 0!==s&&(t=Wo(t,1/s,i)),t}function Ur(t,e=0,n=1,i=.5,s,o=t,r=t){if(pt.test(e)){e=parseFloat(e);e=Ct(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Ct(o.min,o.max,i);t===o&&(a-=e),t.min=Wr(t.min,e,n,a,s),t.max=Wr(t.max,e,n,a,s)}function zr(t,e,[n,i,s],o,r){Ur(t,e[n],e[i],e[s],e.scale,o,r)}const Kr=["x","scaleX","originX"],Yr=["y","scaleY","originY"];function Xr(t,e,n,i){zr(t.x,e,Kr,n?n.x:void 0,i?i.x:void 0),zr(t.y,e,Yr,n?n.y:void 0,i?i.y:void 0)}function Gr(t){return 0===t.translate&&1===t.scale}function Hr(t){return Gr(t.x)&&Gr(t.y)}function qr(t,e){return t.min===e.min&&t.max===e.max}function Zr(t,e){return qr(t.x,e.x)&&qr(t.y,e.y)}function _r(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Jr(t,e){return _r(t.x,e.x)&&_r(t.y,e.y)}function Qr(t){return Rr(t.x)/Rr(t.y)}function ta(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function ea(t){return[t("x"),t("y")]}function na(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,pathRotation:s,rotateX:o,rotateY:r,skewX:a,skewY:l}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotate(${s}deg) `),o&&(i+=`rotateX(${o}deg) `),r&&(i+=`rotateY(${r}deg) `),a&&(i+=`skewX(${a}deg) `), l&&(i+=`skewY(${l}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const ia=Ii.length,sa=t=>"string"==typeof t?parseFloat(t):t,oa=t=>"number"==typeof t||mt.test(t);function ra(t,e,n,i,s,o){s?(t.opacity=Ct(0,n.opacity??1,la(i)),t.opacityExit=Ct(e.opacity??1,0,ca(i))):o&&(t.opacity=Ct(e.opacity??1,n.opacity??1,i));for(let s=0;sie?1:n(d(t,e,i))}function ha(t,e,n){const i=li(t)?t:In(t);return i.start(Gn("",i,e,n)),i.animation}function da(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const pa=(t,e)=>t.depth-e.depth;class ma{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pa),this.isDirty=!1,this.children.forEach(t)}}function fa(t,e){const n=G.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(U(i),t(o-e))};return W.setup(i,!0),()=>U(i)}function ya(t,e){return fa(t,m(e))}function ga(t){return li(t)?t.get():t}class va{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(n(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0), t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const xa={hasAnimatedSinceResize:!0,hasEverUpdated:!1},wa={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ta=["","X","Y","Z"];let ba=0;function Sa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Aa(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=mi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",W,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Aa(i)}function Va({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=ba++,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,Bs.value&&(wa.nodes=wa.calculatedTargetDeltas=wa.calculatedProjections=0),this.nodes.forEach(Ea),this.nodes.forEach(Fa),this.nodes.forEach(Ia),this.nodes.forEach(ka),Bs.addProjectionMetrics&&Bs.addProjectionMetrics(wa)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;W.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=fa(s,250),xa.hasAnimatedSinceResize&&(xa.hasAnimatedSinceResize=!1,this.nodes.forEach(Oa)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Ka,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Jr(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Nn(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||Oa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),U(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($a),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Aa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Rr(this.snapshot.measuredBox.x)||Rr(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t{const n=e/1e3;Wa(o.x,t.x,n),Wa(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nr(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),function(t,e,n,i){ Ua(t.x,e.x,n.x,i),Ua(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&function(t,e){return Zr(t,e)}(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h=go()),Cr(h,this.relativeTarget)),a&&(this.animationValues=s,ra(s,i,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(U(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{xa.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=In(0)),this.motionValue.jump(0,!1),this.currentAnimation=ha(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Ha(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||go();const e=Rr(this.layout.layoutBox.x) ;n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Rr(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Cr(e,n),_o(e,s),Or(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new va);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Sa("z",t,i,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(Ca),this.root.sharedNodes.clear()}}}function Pa(t){t.updateLayout()}function Ma(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)ea(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Rr(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){ const t="x"===s?"y":"x";Dr(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else Ha(s,e.layoutBox,n)&&ea(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Rr(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r=fo();Or(r,n,e.layoutBox);const a=fo();o?Or(a,t.applyTransform(i,!0),e.measuredBox):Or(a,n,e.layoutBox);const l=!Hr(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=go();Nr(r,e.layoutBox,s.layoutBox);const a=go();Nr(a,n,o.layoutBox),Jr(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Ea(t){Bs.value&&wa.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ka(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Da(t){t.clearSnapshot()}function Ca(t){t.clearMeasurements()}function Ba(t){t.isLayoutDirty=!0,t.updateLayout()}function Ra(t){t.isLayoutDirty=!1}function La(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ja(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Oa(t){t.finishAnimation(), t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Fa(t){t.resolveTargetDelta()}function Ia(t){t.calcProjection()}function $a(t){t.resetSkewAndRotation()}function Na(t){t.removeLeadSnapshot()}function Wa(t,e,n){t.translate=Ct(e.translate,0,n),t.scale=Ct(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ua(t,e,n,i){t.min=Ct(e.min,n.min,i),t.max=Ct(e.max,n.max,i)}function za(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Ka={duration:.45,ease:[.4,0,.1,1]},Ya=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Xa=Ya("applewebkit/")&&!Ya("chrome/")?Math.round:u;function Ga(t){t.min=Xa(t.min),t.max=Xa(t.max)}function Ha(t,e,n){return"position"===t||"preserve-aspect"===t&&!Lr(Qr(e),Qr(n),.2)}function qa(t){return t!==t.root&&t.scroll?.wasRoot}const Za=Va({attachResizeListener:(t,e)=>da(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),_a={current:void 0},Ja=Va({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!_a.current){const t=new Za({});t.mount(window),t.setOptions({layoutScroll:!0}),_a.current=t}return _a.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function Qa(t,e){const n=e?.[t]??e?.default??e;return n!==e?$n(n,e):n}const tl=t=>t&&"object"==typeof t&&t.mix,el=t=>tl(t)?t.mix:void 0;function nl(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=ge(s,o,{mixer:el(o[0]),...r});return e?a(i):a}function il(t,e){const n=In(e()),i=()=>n.set(e()) ;return W.preRender(i,!0,!0),t.forEach(t=>{t.on("change",i)}),n}function sl(t,e,n,i){if("function"==typeof t)return function(t){On.current=[],t();const e=il(On.current,t);return On.current=void 0,e}(t);const s="function"==typeof e?e:nl(...e);return Array.isArray(t)?ol(t,s,n,i):ol([t],([t])=>s(t),n,i)}function ol(t,e,n,i){const s=n?.[0]??0,o=()=>{const n=t.map(t=>t.get());return e(...(1===n.length?n:[n]))};return il(t,o)}const rl={renderer:t=>t,...{animation:{Feature:class extends class{constructor(t){this.isMounted=!1,this.node=t}update(){}}{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=(t=>t.animationState)(t)||kr();...}<

Start with a free Ops Audit.

Four questions, about two minutes. We read how your business runs and come back with where our AI OS fits, what it would take, and whether we are the right people for the job. If we are not, we say so.