1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,585253,e=>{"use strict";var t=e.i(194690),i=e.i(926838),n=e.i(292772),s=e.i(347164);e.s(["CardSnippet",0,function({text:e,label:r}){let[a,o]=(0,s.useState)(!1),l=(0,s.useRef)(void 0);(0,s.useEffect)(()=>()=>clearTimeout(l.current),[]);let u=async()=>{try{await navigator.clipboard.writeText(e)}catch{return}o(!0),clearTimeout(l.current),l.current=setTimeout(()=>o(!1),2e3)};return(0,t.jsxs)("button",{"aria-label":a?"Copied":r??`Copy ${e}`,className:"relative w-full rounded-md border border-gray-alpha-400 bg-background-100 py-[10px] pr-12 pl-3 text-left font-mono text-copy-13 leading-5 text-gray-1000 transition-colors hover:bg-gray-alpha-100","data-card-snippet":!0,onClick:e=>{e.preventDefault(),u()},type:"button",children:[r??(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-gray-900 select-none",children:"$ "}),e]}),(0,t.jsx)("span",{className:"absolute top-1/2 right-1 flex size-8 -translate-y-1/2 items-center justify-center rounded-md text-gray-1000",children:a?(0,t.jsx)(i.IconCheck,{size:16}):(0,t.jsx)(n.IconCopy,{size:16})})]})}])},308754,e=>{"use strict";var t=e.i(194690),i=e.i(11969),n=e.i(83375),s=e.i(195889),r=e.i(347164),a=e.i(851842);function o(e,t,i){return{label:e,filename:t,kind:"text",getCode:()=>i}}let l=[o("useChat","chat.tsx",`'use client'; 2 3import { useChat } from '@ai-sdk/react'; 4import { DefaultChatTransport } from 'ai'; 5import { useState } from 'react'; 6 7export default function Chat() { 8 const { messages, sendMessage, status } = useChat({ 9 transport: new DefaultChatTransport({ 10 api: '/api/chat', 11 }), 12 }); 13 const [input, setInput] = useState(''); 14 15 return ( 16 <> 17 {messages.map(message => ( 18 <div key={message.id}> 19 {message.role === 'user' ? 'User: ' : 'AI: '} 20 {message.parts.map((part, i) => 21 part.type === 'text' ? ( 22 <span key={i}>{part.text}</span> 23 ) : null, 24 )} 25 </div> 26 ))} 27 <form onSubmit={e => { 28 e.preventDefault(); 29 sendMessage({ text: input }); 30 setInput(''); 31 }}> 32 <input 33 value={input} 34 onChange={e => setInput(e.target.value)} 35 disabled={status !== 'ready'} 36 /> 37 </form> 38 </> 39 ); 40}`),o("useCompletion","completion.tsx",`'use client'; 41 42import { useCompletion } from '@ai-sdk/react'; 43 44export default function Completion() { 45 const { 46 completion, 47 input, 48 handleInputChange, 49 handleSubmit, 50 } = useCompletion({ 51 api: '/api/completion', 52 }); 53 54 return ( 55 <form onSubmit={handleSubmit}> 56 <input 57 name="prompt" 58 value={input} 59 onChange={handleInputChange} 60 /> 61 <button type="submit">Submit</button> 62 <div>{completion}</div> 63 </form> 64 ); 65}`),o("useObject","object-generation.tsx",`'use client'; 66 67import { 68 experimental_useObject as useObject, 69} from '@ai-sdk/react'; 70import { z } from 'zod/v4'; 71 72const notificationSchema = z.object({ 73 notifications: z.array(z.object({ 74 name: z.string(), 75 message: z.string(), 76 })), 77}); 78 79export default function Notifications() { 80 const { object, submit } = useObject({ 81 api: '/api/notifications', 82 schema: notificationSchema, 83 }); 84 85 return ( 86 <> 87 <button 88 onClick={() => 89 submit('Messages during finals week.') 90 } 91 > 92 Generate 93 </button> 94 {object?.notifications?.map((n, i) => ( 95 <div key={i}> 96 <p>{n?.name}</p> 97 <p>{n?.message}</p> 98 </div> 99 ))} 100 </> 101 ); 102}`),o("Chat with Tools","chat-tools.tsx",`'use client'; 103 104import { useChat } from '@ai-sdk/react'; 105import { DefaultChatTransport } from 'ai'; 106import { useState } from 'react'; 107 108export default function Chat() { 109 const { messages, sendMessage, addToolOutput } = 110 useChat({ 111 transport: new DefaultChatTransport({ 112 api: '/api/chat', 113 }), 114 async onToolCall({ toolCall }) { 115 if (!toolCall.dynamic && toolCall.toolName === 'getLocation') { 116 addToolOutput({ 117 tool: 'getLocation', 118 toolCallId: toolCall.toolCallId, 119 output: 'San Francisco', 120 }); 121 } 122 }, 123 }); 124 const [input, setInput] = useState(''); 125 126 return ( 127 <form onSubmit={e => { 128 e.preventDefault(); 129 sendMessage({ text: input }); 130 setInput(''); 131 }}> 132 <input 133 value={input} 134 onChange={e => setInput(e.target.value)} 135 /> 136 </form> 137 ); 138}`),o("Generative UI","generative-ui.tsx",`'use client'; 139 140import { useChat } from '@ai-sdk/react';
141import { DefaultChatTransport, type UIMessage } from 'ai'; 142import { useState } from 'react'; 143 144type WeatherProps = { 145 temperature: number; 146 weather: string; 147 location: string; 148}; 149 150export const Weather = ({ temperature, weather, location }: WeatherProps) => { 151 return ( 152 <div> 153 <h2>Current Weather for {location}</h2> 154 <p>Condition: {weather}</p> 155 <p>Temperature: {temperature}\xb0C</p> 156 </div> 157 ); 158}; 159 160type WeatherMessage = UIMessage<unknown, never, { 161 displayWeather: { input: { location: string }; output: WeatherProps }; 162}>; 163 164export default function Chat() { 165 const [input, setInput] = useState(''); 166 const { messages, sendMessage } = useChat<WeatherMessage>({ 167 transport: new DefaultChatTransport({ 168 api: '/api/chat', 169 }), 170 }); 171 172 return ( 173 <> 174 {messages.map(message => ( 175 <div key={message.id}> 176 {message.parts.map((part, i) => { 177 if (part.type === 'text') { 178 return <span key={i}>{part.text}</span>; 179 } 180 if (part.type === 'tool-displayWeather') { 181 switch (part.state) { 182 case 'input-available': 183 return <div key={i}>Loading...</div>; 184 case 'output-available': 185 return ( 186 <Weather key={i} {...part.output} /> 187 ); 188 } 189 } 190 })} 191 </div> 192 ))} 193 <form onSubmit={e => { 194 e.preventDefault(); 195 sendMessage({ text: input }); 196 setInput(''); 197 }}> 198 <input 199 value={input} 200 onChange={e => setInput(e.target.value)} 201 /> 202 </form> 203 </> 204 ); 205}`),o("Streaming Data","streaming-data.tsx",`'use client'; 206 207import { useChat } from '@ai-sdk/react'; 208import { DefaultChatTransport, type UIMessage } from 'ai'; 209 210type DataMessage = UIMessage<unknown, { 211 notification: { message: string }; 212 weather: { city: string; weather: string }; 213}>; 214 215export default function Chat() { 216 const { messages } = useChat<DataMessage>({ 217 transport: new DefaultChatTransport({ api: '/api/chat' }), 218 onData: dataPart => { 219 if (dataPart.type === 'data-notification') { 220 console.log(dataPart.data.message); 221 } 222 }, 223 }); 224 225 return ( 226 <> 227 {messages.map(m => ( 228 <div key={m.id}> 229 {m.parts 230 .filter(p => p.type === 'data-weather') 231 .map((p, i) => ( 232 <span key={i}> 233 Weather in {p.data.city}: 234 {p.data.weather} 235 </span> 236 ))} 237 {m.parts 238 .filter(p => p.type === 'text') 239 .map((p, i) => ( 240 <div key={i}>{p.text}</div> 241 ))} 242 </div> 243 ))} 244 </> 245 ); 246}`),o("Chat Persistence","chat-persistence.tsx",`'use client'; 247 248import { useChat } from '@ai-sdk/react'; 249import { DefaultChatTransport, type UIMessage } from 'ai'; 250import { useState } from 'react'; 251 252export default function Chat({ 253 id, 254 initialMessages, 255}: { 256 id?: string; 257 initialMessages?: UIMessage[]; 258}) { 259 const [input, setInput] = useState(''); 260 const { messages, sendMessage } = useChat({ 261 id, 262 messages: initialMessages, 263 transport: new DefaultChatTransport({ 264 api: '/api/chat', 265 }), 266 }); 267 268 return ( 269 <div> 270 {messages.map(m => ( 271 <div key={m.id}> 272 {m.role === 'user' ? 'User: ' : 'AI: '} 273 {m.parts 274 .map(p => p.type === 'text' ? p.text : '') 275 .join('')} 276 </div> 277 ))} 278 <form onSubmit={e => { 279 e.preventDefault(); 280 sendMessage({ text: input }); 281 setInput(''); 282 }}> 283 <input 284 value={input} 285 onChange={e => setInput(e.target.value)} 286 /> 287 </form> 288 </div> 289 ); 290}`),o("Stream Status","stream-status.tsx",`'use client'; 291 292import { useChat } from '@ai-sdk/react'; 293import { DefaultChatTransport } from 'ai'; 294import { useState } from 'react'; 295 296export default function Chat() { 297 const [input, setInput] = useState(''); 298 const { messages, sendMessage, status, stop } = 299 useChat({
300 transport: new DefaultChatTransport({ 301 api: '/api/chat', 302 }), 303 }); 304 305 return ( 306 <> 307 {messages.map(m => ( 308 <div key={m.id}> 309 {m.parts.map((p, i) => 310 p.type === 'text' ? ( 311 <span key={i}>{p.text}</span> 312 ) : null, 313 )} 314 </div> 315 ))} 316 {status === 'streaming' && ( 317 <button onClick={stop}>Stop generating</button> 318 )} 319 {status === 'submitted' && <div>Thinking...</div>} 320 <form onSubmit={e => { 321 e.preventDefault(); 322 sendMessage({ text: input }); 323 setInput(''); 324 }}> 325 <input 326 value={input} 327 onChange={e => setInput(e.target.value)} 328 disabled={status !== 'ready'} 329 /> 330 </form> 331 </> 332 ); 333}`)];var u=e.i(655196),h=e.i(572810);function c({className:e,...i}){return(0,t.jsx)("div",{className:(0,s.cn)("material-large relative flex w-full flex-col overflow-hidden [--browser-header-height:44px]",e),...i})}function d({title:e,className:i}){return(0,t.jsxs)("header",{className:(0,s.cn)("relative flex h-(--browser-header-height) items-center justify-between py-3 shadow-[0_0_0_1px_var(--ds-gray-alpha-200)]",i),children:[(0,t.jsxs)("div",{"aria-hidden":"true",className:"flex min-w-[62px] items-center gap-1 pl-3",children:[(0,t.jsx)("div",{className:"size-2 rounded-full bg-[#EE6D5E]"}),(0,t.jsx)("div",{className:"size-2 rounded-full bg-[#F3BF4A]"}),(0,t.jsx)("div",{className:"size-2 rounded-full bg-[#5DC753]"})]}),(0,t.jsx)("h3",{className:"flex items-center gap-1 text-label-13 text-gray-800",children:e}),(0,t.jsx)("div",{className:"min-w-[62px] pr-1.5"})]})}var p=e.i(695775),m=e.i(515226),f=e.i(58997),g=e.i(189685),v=e.i(450305),x=e.i(6942),y=e.i(833720),b=e.i(631553);function w({size:e=16,className:i}){return(0,t.jsx)("svg",{"aria-hidden":"true",className:i,fill:"none",height:e,role:"img",viewBox:"0 0 16 16",width:e,xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M2.5.5V0h1v.5c0 1.1.9 2 2 2H6v1h-.5a2 2 0 0 0-2 2V6h-1v-.5a2 2 0 0 0-2-2H0v-1h.5a2 2 0 0 0 2-2m12 4V5h-1v-.5a1 1 0 0 0-1-1H12v-1h.5a1 1 0 0 0 1-1V1h1v.5a1 1 0 0 0 1 1h.5v1h-.5a1 1 0 0 0-1 1m-6-.5-.1.93A5 5 0 0 1 3.94 9.4L3 9.5v1l.93.1a5 5 0 0 1 4.48 4.47l.09.93h1l.1-.93a5 5 0 0 1 4.47-4.48l.93-.09v-1l-.93-.1A5 5 0 0 1 9.6 4.94L9.5 4z",fill:"currentColor",fillRule:"evenodd"})})}function j(e,{active:t,reduce:i}){let[n,s]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let n;if(i)return void s(e.length);if(!t)return;let r=0;s(0);let a=()=>{n=r<e.length?setTimeout(()=>{s(r+=1),a()},e[r]):setTimeout(()=>{r=0,s(0),a()},4200)};return a(),()=>clearTimeout(n)},[t,i,e]),n}function S(){return(0,t.jsx)("span",{"aria-hidden":"true",className:"ml-0.5 inline-block h-[0.8em] w-px animate-pulse bg-gray-1000 align-middle"})}function T({text:e,play:i,reduce:n,className:s}){let[a,o]=(0,r.useState)(n?e.length:0);(0,r.useEffect)(()=>{if(n)return void o(e.length);if(o(0),!i)return;let t=0,s=setInterval(()=>{o(t+=1),t>=e.length&&clearInterval(s)},26);return()=>clearInterval(s)},[e,i,n]);let l=a>=e.length;return(0,t.jsxs)("span",{className:s,children:[e.slice(0,a),!i||l||n?null:(0,t.jsx)(S,{}),a<e.length?(0,t.jsx)("span",{"aria-hidden":"true",className:"opacity-0",children:e.slice(a)}):null]})}function C({show:e,children:i,className:n}){return(0,t.jsx)("div",{className:(0,s.cn)("transition-all duration-500 ease-out",e?"translate-y-0 opacity-100":"translate-y-2 opacity-0",n),children:i})}function k({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:(0,s.cn)("absolute [--tail-background:var(--ds-background-100)] [--tail-border:var(--ds-gray-alpha-400)] [--tail-bubble:white] dark:[--tail-background:var(--ds-background-200)] dark:[--tail-border:#252525] dark:[--tail-bubble:var(--ds-background-100)]",e),fill:"none",height:24,overflow:"hidden",viewBox:"0 0 24 24",width:24,children:[(0,t.jsx)("path",{d:"M0 0H24V24H0z",fill:"var(--tail-background)"}),(0,t.jsx)("g",{style:{filter:"drop-shadow(0 1px 2px rgb(0 0 0 / 4%))"},children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M27-19C15.954-19 7-10.046 7 1c0 .335.008.669.025 1H7v10a15 15 0 01-3 9c4.116 0 7.845-1.658 10.555-4.342A19.915 19.915 0 0027 21c11.046 0 20-8.954 20-20s-8.954-20-20-20z",fill:"var(--tail-bubble)",fillRule:"evenodd",paintOrder:"stroke fill",stroke:"var(--tail-border)",strokeWidth:2})})]})}function P(){return(0,t.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center self-end rounded-full bg-background-100 text-gray-1000 shadow-[var(--ds-shadow-border-small)] [&_svg]:size-3.5",children:(0,t.jsx)(w,{"aria-hidden":"true"})})}function M({children:e,flipped:i}){return(0,t.jsxs)("div",{className:"relative rounded-[18px] bg-background-100 px-4 py-2.5 text-label-12 leading-relaxed text-gray-1000 shadow-[var(--ds-shadow-border-small)]",children:[e,i?(0,t.jsx)(k,{className:"right-[-7px] bottom-[-3px] -scale-x-100"}):(0,t.jsx)(k,{className:"bottom-[-3px] left-[-7px]"})]})}function A({children:e}){return(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)("div",{className:"max-w-[85%]",children:(0,t.jsx)(M,{flipped:!0,children:e})})})}function E({children:e,className:i}){return(0,t.jsxs)("div",{className:"flex items-end gap-2.5",children:[(0,t.jsx)(P,{}),(0,t.jsx)("div",{className:(0,s.cn)("max-w-[85%]",i),children:(0,t.jsx)(M,{children:e})})]})}function V({label:e,children:i}){return(0,t.jsx)("div",{"aria-label":e,className:"flex h-[309px] flex-col gap-3 overflow-hidden p-4 sm:p-6",role:"img",children:i})}function R({value:e}){return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-gray-alpha-200 bg-background-200 py-1.5 pr-1.5 pl-3",children:[(0,t.jsx)("span",{className:"flex-1 truncate text-label-12 text-gray-900",children:e}),(0,t.jsx)("span",{className:"flex size-6 items-center justify-center rounded bg-gray-1000 text-background-100 [&_svg]:size-3",children:(0,t.jsx)(b.IconArrowUp,{"aria-hidden":"true"})})]})}let N=[-900,-800,-700,-600,-500,-400,-300,-200,-100,0];function I({label:e}){return(0,t.jsx)("span",{"aria-label":e,className:"relative inline-block aspect-square size-3.5 text-gray-700",role:"status",children:N.map((e,i)=>(0,t.jsx)("span",{"aria-hidden":"true",className:"absolute top-1/2 left-1/2 h-[1.5px] w-1 -translate-x-1/2 -translate-y-1/2 roun
333ded-full bg-current",style:{animation:"spinner-opacity 1000ms linear infinite",animationDelay:`${e}ms`,transform:`rotate(${36*i}deg) translate(146%)`}},e))})}function L(e){let t=(0,r.useRef)(null),[i,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let i=t.current;if(!i)return;let s=new IntersectionObserver(([e])=>n(e.isIntersecting),{threshold:e});return s.observe(i),()=>s.disconnect()},[e]),{ref:t,inView:i}}function D(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=window.matchMedia("(prefers-reduced-motion: reduce)");t(e.matches);let i=()=>t(e.matches);return e.addEventListener("change",i),()=>e.removeEventListener("change",i)},[]),e}let B=[500,700];function F(e,t){let[i,n]=(0,r.useState)(t&&e?1:0),s=(0,r.useRef)(i);(0,r.useEffect)(()=>{let i=+!!e,r=e=>{s.current=e,n(e)};if(t)return void r(i);let a=s.current,o=performance.now(),l=requestAnimationFrame(function e(t){let n=Math.min(1,(t-o)/1500);r(a+(i-a)*(1-(1-n)**3)),n<1&&(l=requestAnimationFrame(e))});return()=>cancelAnimationFrame(l)},[e,t]);let a=e&&i>=1;return{progress:i,done:a,blur:a?0:20*(1-i)}}function z({progress:e,hidden:i}){return(0,t.jsxs)("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-3 right-3 inline-flex items-center justify-end rounded-md bg-gray-1000 px-3 py-1.5 text-label-12 font-medium text-background-100 tabular-nums transition-opacity duration-300 ease-out",style:{opacity:+!i},children:[Math.round(100*e),"% complete"]})}function _({label:e,children:i}){return(0,t.jsx)("div",{"aria-label":e,className:"h-[309px] overflow-hidden p-2",role:"img",children:(0,t.jsx)("div",{className:"relative size-full overflow-hidden rounded-[4px]",children:i})})}function O(e){let t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i.toString().padStart(2,"0")}`}let $=[{start:.119,text:"You"},{start:.259,text:" can"},{start:.459,text:" build"},{start:.72,text:" and"},{start:.879,text:" host"},{start:1.36,text:" many"},{start:1.6,text:" different"},{start:1.899,text:" types"},{start:2.119,text:" of"},{start:2.259,text:" applications"},{start:3.48,text:" from"},{start:3.779,text:" static"},{start:4.179,text:" sites"},{start:4.539,text:" with"},{start:4.799,text:" your"},{start:4.96,text:" favorite"},{start:5.319,text:" framework,"},{start:5.96,text:" multi-tenant"},{start:6.559,text:" applications"},{start:7.699,text:" or"},{start:7.859,text:" micro-frontends"},{start:8.78,text:" to"},{start:9.099,text:" AI-powered"},{start:9.82,text:" agents."}],U={text:function({active:e,reduce:i}){let n=j(B,{active:e,reduce:i});return(0,t.jsxs)(V,{label:"Live preview of text generation",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col justify-center gap-3",children:[(0,t.jsx)(C,{show:n>=1,children:(0,t.jsx)(A,{children:"Explain quantum entanglement."})}),(0,t.jsx)(C,{show:n>=2,children:(0,t.jsx)(E,{children:(0,t.jsx)(T,{play:n>=2,reduce:i,text:"Two particles stay linked, so measuring one instantly determines the other â even across a great distance."})})})]}),(0,t.jsx)(R,{value:"Ask a questionâ¦"})]})},image:function({active:e,reduce:i}){let{progress:n,done:s,blur:a}=F(e,i),[o,l]=(0,r.useState)(i);return(0,r.useEffect)(()=>{if(!s||i)return;let e=setTimeout(()=>l(!0),1e3);return()=>clearTimeout(e)},[s,i]),(0,t.jsxs)(_,{label:"Live preview of image generation",children:[(0,t.jsx)("img",{alt:"AI-generated teddy bear hiking in the mountains",className:"size-full object-cover",src:y.IMAGE_SRC,style:{filter:`blur(${a}px)`}}),(0,t.jsx)(z,{hidden:o,progress:n})]})},video:function({active:e,reduce:i}){let{progress:n,done:s,blur:a}=F(e,i),o=(0,r.useRef)(null);return(0,r.useEffect)(()=>{s&&!i&&o.current?.play().catch(()=>{})},[s,i]),(0,t.jsxs)(_,{label:"Live preview of video generation",children:[(0,t.jsx)("video",{className:"size-full object-cover",loop:!0,muted:!0,playsInline:!0,preload:"auto",ref:o,src:y.VIDEO_SRC,style:{filter:`blur(${a}px)`}}),(0,t.jsx)(z,{hidden:s,progress:n})]})},speech:function({active:e,reduce:i}){let n=(0,r.useRef)(null),[s,a]=(0,r.useState)(!1),[o,l]=(0,r.useState)(!0),[u,h]=(0,r.useState)(0),[c,d]=(0,r.useState)(0);(0,r.useEffect)(()=>{let t=n.current;t&&(t.currentTime=0,t.muted=!0,l(!0),e&&!i&&t.play().catch(()=>{}))},[e,i]);let b=e=>{let t=n.current;t&&(t.currentTime=Math.min(t.duration||0,Math.max(0,t.currentTime+e)))};return(0,t.jsx)(V,{label:"Live preview of speech generation",children:(0,t.jsxs)("div",{className:"relative flex flex-1 flex-col items-center justify-center gap-3",children:[(0,t.jsx)("audio",{onEnded:()=>a(!1),onLoadedMetadata:()=>d(n.current?.duration??0),onPause:()=>a(!1),onPlay:()=>a(!0),onTimeUpdate:()=>h(n.current?.currentTime??0),ref:n,src:y.SPEECH_AUDIO_SRC,children:(0,t.jsx)("track",{default:!0,kind:"captions",label:"English",src:"/images/home/speech.vtt",srcLang:"en"})}),(0,t.jsxs)("div",{className:"flex w-full items-center gap-3 font-mono text-label-13 text-gray-900",children:[(0,t.jsx)("span",{children:O(u)}),(0,t.jsx)("div",{className:"relative h-1 flex-1 rounded-full bg-gray-200",children:(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 rounded-full bg-gray-1000",style:{width:c?`${u/c*100}%`:"0%"}})}),(0,t.jsx)("span",{children:c?O(c):"0:00"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("button",{"aria-label":"Rewind 10 seconds",className:"flex shrink-0 items-center justify-center rounded-full border border-gray-400 bg-background-100 p-2 text-gray-900 shadow-sm",onClick:()=>b(-10),type:"button",children:(0,t.jsx)(g.IconRewind10Seconds,{size:12})}),(0,t.jsx)("button",{"aria-label":s?"Pause":"Play",className:"flex shrink-0 items-center justify-center rounded-full border border-gray-400 bg-background-100 p-3 shadow-sm [&_svg]:size-4",onClick:()=>{let e=n.current;e&&(e.paused?e.play().catch(()=>{}):e.pause())},type:"button",children:s?(0,t.jsx)(m.IconPause,{}):(0,t.jsx)(f.IconPlayFill,{className:"pl-0.5"})}),(0,t.jsx)("button",{"aria-label":"Forward 10 seconds",className:"flex shrink-0 items-center justify-center rounded-full border border-gray-400 bg-background-100 p-2 text-gray-900 shadow-sm",onClick:()=>b(10),type:"button",children:(0,t.jsx)(p.IconForward10Seconds10,{size:12})})]}),(0,t.jsx)("button",{"aria-label":o?"Unmute":"Mute",className:"absolute right-0 bottom-0 text-gray-600",onClick:()=>{let e=n.current;e&&(e.muted=!e.muted,l(e.muted))},type:"button",children:o?(0,t.jsx)(v.IconSpeakerOff,{size:16}):(0,t.jsx)(x.IconSpeakerVolumeLoud,{size:16})})]})})},transcription:function({active:e,reduce:i}
333){let[n,a]=(0,r.useState)(i?$.length:0);(0,r.useEffect)(()=>{if(i)return void a($.length);if(a(0),!e)return;let t=$.map((e,t)=>setTimeout(()=>a(t+1),700*e.start));return()=>t.forEach(clearTimeout)},[e,i]);let o=n>0&&n<$.length;return(0,t.jsx)(V,{label:"Live preview of audio transcription",children:(0,t.jsxs)("div",{className:"flex flex-1 flex-col justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-copy-14 leading-relaxed",children:$.map((e,i)=>(0,t.jsx)("span",{className:(0,s.cn)("transition-opacity duration-500",i<n?"opacity-100":"opacity-0",i===n-1?"text-gray-1000":"text-gray-900"),children:e.text},e.start))}),(0,t.jsxs)("div",{"aria-hidden":"true",className:(0,s.cn)("flex items-end gap-[3px] self-end transition-opacity duration-300",o?"opacity-100":"opacity-0"),children:[(0,t.jsx)("span",{className:"h-[18px] w-[4.5px] origin-bottom animate-[barPulse_0.8s_ease-in-out_infinite] rounded-full bg-gray-400"}),(0,t.jsx)("span",{className:"h-[24px] w-[4.5px] origin-bottom animate-[barPulse_0.8s_ease-in-out_0.25s_infinite] rounded-full bg-gray-400"}),(0,t.jsx)("span",{className:"h-[15px] w-[4.5px] origin-bottom animate-[barPulse_0.8s_ease-in-out_0.5s_infinite] rounded-full bg-gray-400"})]})]})})}};function W({previewId:e}){let{ref:i,inView:n}=L(.35),s=D(),r=U[e];return(0,t.jsx)("div",{ref:i,children:r?(0,t.jsx)(r,{active:n,reduce:s},e):null})}function H({label:e,items:i,value:n,onValueChange:a}){let o=(0,r.useRef)(null),[l,u]=(0,r.useState)();return(0,r.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=()=>{let t=e.querySelector("[data-active]");t&&u({left:t.offsetLeft,width:t.offsetWidth})};t();let i=new ResizeObserver(t);return i.observe(e),()=>i.disconnect()},[n]),(0,t.jsxs)("div",{"aria-label":e,className:"relative inline-flex w-full max-w-full gap-1 overflow-x-auto overflow-y-hidden overscroll-x-contain p-1 [scrollbar-width:none] lg:w-fit lg:max-w-none",onKeyDown:e=>{let t=i.findIndex(e=>e.id===n),s="ArrowRight"===e.key?(t+1)%i.length:"ArrowLeft"===e.key?(t+i.length-1)%i.length:"Home"===e.key?0:"End"===e.key?i.length-1:void 0;if(void 0===s)return;e.preventDefault(),a(i[s].id);let r=o.current?.querySelectorAll('[role="tab"]');r?.[s]?.focus()},ref:o,role:"tablist",children:[i.map(e=>{let i=e.id===n;return(0,t.jsx)("button",{"aria-selected":i,className:"relative z-10 min-w-max flex-none rounded-[6px] whitespace-nowrap focus-visible:shadow-[var(--ds-focus-ring)] focus-visible:outline-none","data-active":i?"":void 0,onClick:()=>a(e.id),role:"tab",tabIndex:i?0:-1,type:"button",children:(0,t.jsxs)("span",{className:(0,s.cn)("relative inline-flex items-center justify-center rounded-[6px] px-3.5 py-1.5 text-center text-copy-14 transition-colors hover:text-gray-1000",i?"text-gray-1000":"text-gray-900"),children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"invisible font-medium",children:e.label}),(0,t.jsx)("span",{className:(0,s.cn)("pointer-events-none absolute inset-0 flex items-center justify-center",i&&"font-medium"),children:e.label})]})},e.id)}),l?(0,t.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1 bottom-1 z-0 rounded-[6px] bg-gray-200 transition-[left,width] duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] motion-reduce:transition-none",style:l}):null]})}var q=e.i(579403);function G(e){return(0,t.jsx)(q.BaseIcon,{$generated:Y,...e,children:X})}let Y={height:16,aspectRatio:1,viewBox:"0 0 16 16"},X=(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M12 5.5v2.72c0 .87.36 1.7.98 2.28H3.01c.62-.59.98-1.4.98-2.27V5.5a4 4 0 1 1 8.01 0m2.23 4.09c-.46-.3-.73-.82-.73-1.37V5.51a5.5 5.5 0 0 0-11.01 0v2.72c0 .54-.28 1.05-.73 1.36l-.43.29-.33.22V12h14v-1.9l-.33-.22zm-3.48 3.91H9.17v.01q-.1.31-.45.54-.3.19-.72.2-.42-.01-.72-.2a1 1 0 0 1-.44-.54v-.01H5.24l.16.49q.31.85 1.08 1.33a2.9 2.9 0 0 0 3.02 0c.5-.3.89-.77 1.08-1.33z",fill:"currentColor",fillRule:"evenodd"})});function K(e){return(0,t.jsx)(q.BaseIcon,{$generated:Z,...e,children:Q})}let Z={height:16,aspectRatio:1,viewBox:"0 0 16 16",glyph:"circular"},Q=(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-4.47-1.47.53-.53L11 4.94l-.53.53L6.5 9.44l-.97-.97L5 7.94 3.94 9l.53.53 1.5 1.5c.3.3.77.3 1.06 0z",fill:"
333currentColor",fillRule:"evenodd"})});function J(e){return(0,t.jsx)(q.BaseIcon,{$generated:ee,...e,children:et})}let ee={height:16,aspectRatio:1,viewBox:"0 0 16 16"},et=(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M11.53 10.26 8 13.86l-3.53-3.6a5.2 5.2 0 0 1 0-7.27 4.9 4.9 0 0 1 7.06 0 5.2 5.2 0 0 1 0 7.27m1.07 1.05-3.55 3.62L8 16l-1.05-1.07L3.4 11.3a6.7 6.7 0 0 1 0-9.37 6.4 6.4 0 0 1 9.2 0 6.7 6.7 0 0 1 0 9.37M9 6.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0M8 9a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5",fill:"currentColor",fillRule:"evenodd"})});var ei=e.i(282313);let en=[500,700],es=[600],er=[{name:"Study Group",message:"Finals week session moved to 6:00 PM."},{name:"Library",message:"Extended hours all weekend before exams."}];function ea({name:e,message:i,showMessage:n,reduce:s}){return(0,t.jsxs)("div",{className:"material-small flex items-start gap-2.5 px-3 py-2.5",children:[(0,t.jsx)("span",{className:"mt-0.5 flex size-6 items-center justify-center rounded-full bg-gray-100 text-gray-1000 [&_svg]:size-3",children:(0,t.jsx)(G,{"aria-hidden":"true"})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-label-12 font-medium text-gray-1000",children:e}),(0,t.jsx)("span",{className:"min-h-[1rem] text-label-12 text-gray-900",children:(0,t.jsx)(T,{play:n,reduce:s,text:i})})]})]})}let eo=[450,1350,800,1350];function el({resolved:e}){return(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 font-mono text-[11px]",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-gray-900 [&_svg]:size-3",children:[(0,t.jsx)(J,{"aria-hidden":"true"}),"getLocation"]}),(0,t.jsx)("span",{className:"text-gray-500",children:"â"}),e?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-gray-900 [&_svg]:size-3",children:[(0,t.jsx)(K,{"aria-hidden":"true"}),"San Francisco"]}):(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-gray-900",children:[(0,t.jsx)(I,{label:"Calling tool"}),"Locatingâ¦"]})]})}let eu=[500,650,1100,500];function eh(){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 overflow-hidden rounded-xl border border-gray-alpha-200 bg-background-200 px-3.5 py-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-label-12 text-gray-800",children:"San Francisco"}),(0,t.jsx)("span",{className:"text-heading-24 font-semibold text-gray-1000",children:"72°F"}),(0,t.jsx)("span",{className:"text-label-12 text-gray-900",children:"Sunny"})]}),(0,t.jsx)(ei.IconSun,{"aria-hidden":"true",className:"text-amber-800",size:24})]})}let ec=[500,700,1e3],ed={"use-chat":function({active:e,reduce:i}){let n=j(en,{active:e,reduce:i});return(0,t.jsxs)(V,{label:"Live preview of a chat interface built with useChat",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col justify-center gap-3",children:[(0,t.jsx)(C,{show:n>=1,children:(0,t.jsx)(A,{children:"How does streaming work?"})}),(0,t.jsx)(C,{show:n>=2,children:(0,t.jsx)(E,{className:"lg:w-[75%]",children:(0,t.jsx)(T,{play:n>=2,reduce:i,text:"Tokens arrive incrementally, so the interface updates in real time as the model responds."})})})]}),(0,t.jsx)(R,{value:"Ask a questionâ¦"})]})},"use-completion":function({active:e,reduce:i}){let n=j(es,{active:e,reduce:i});return(0,t.jsx)(V,{label:"Live preview of a text completion built with useCompletion",children:(0,t.jsxs)("div",{className:"flex flex-1 flex-col justify-center gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-label-12 font-medium text-gray-700",children:"Prompt"}),(0,t.jsx)(R,{value:"Write a tagline for a coffee shop"})]}),(0,t.jsx)(C,{show:n>=1,children:(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-label-12 font-medium text-gray-700",children:"Completion"}),(0,t.jsx)("div",{className:"material-small w-full px-3 py-2.5 text-label-12 text-gray-1000 lg:w-[30%]",children:(0,t.jsx)(T,{play:n>=1,reduce:i,text:"Where every cup tells a story."})})]})})]})})},"use-object":function({active:e,reduce:i}){let n=j(eo,{active:e,reduce:i});return(0,t.jsxs)(V,{label:"Live preview of a structured object streaming in with useObject",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-gray-700",children:[(0,t.jsx)("span",{className:"text-label-12 font-medium",children:"Notifications"}),n>0&&n<eo.length&&!i?(0,t.jsx)(I,{label:"Streaming"}):null]}),(0,t.jsxs)("div",{className:"flex w-full flex-col justify-center gap-2.5 lg:w-1/2",children:[(0,t.jsx)(C,{show:n>=1,children:(0,t.jsx)(ea,{message:er[0].message,name:er[0].name,reduce:i,showMessage:n>=2})}),(0,t.jsx)(C,{show:n>=3,children:(0,t.jsx)(ea,{message:er[1].message,name:er[1].name,reduce:i,showMessage:n>=4})})]})]})},"chat-tools":function({active:e,reduce:i}){let n=j(eu,{active:e,reduce:i});return(0,t.jsxs)(V,{label:"Live preview of a chat calling a tool built with useChat and tools",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col justify-center gap-3",children:[(0,t.jsx)(C,{show:n>=1,children:(0,t.jsx)(A,{children:"What's the weather near me?"})}),(0,t.jsx)(C,{show:n>=2,children:(0,t.jsx)(el,{resolved:n>=3})}),(0,t.jsx)(C,{show:n>=4,children:(0,t.jsx)(E,{children:(0,t.jsx)(T,{play:n>=4,reduce:i,text:"It's 72°F and sunny in San Francisco."})})})]}),(0,t.jsx)(R,{value:"Ask a questionâ¦"})]})},"generative-ui":function({active:e,reduce:i}){let n=j(ec,{active:e,reduce:i});return(0,t.jsxs)(V,{label:"Live preview of a chat rendering a React component built with generative UI",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col justify-center gap-3",children:[(0,t.jsx)(C,{show:n>=1,children:(0,t.jsx)(A,{children:"What's the weather in San Francisco?"})}),(0,t.jsx)(C,{show:n>=2,children:(0,t.jsx)(E,{children:(0,t.jsx)(T,{play:n>=2,reduce:i,text:"Here's the current weather:"})})}),(0,t.jsx)(C,{show:n>=3,children:(0,t.jsx)("div",{className:"ml-[2.375rem] w-fit",children:(0,t.jsx)(eh,{})})})]}),(0,t.jsx)(R,{value:"Ask a questionâ¦"})]})}};function ep({previewId:e}){let{ref:i,inView:n}=L(.35),s=D(),r=ed[e];return(0,t.jsx)("div",{ref:i,children:r?(0,t.jsx)(r,{active:n,reduce:s},e):null})}let em={"chat.tsx":"use-chat","completion.tsx":"use-completion","object-generation.tsx":"use-object","chat-tools.tsx":"chat-tools","generative-ui.tsx":"generative-ui"},ef=[{id:"core",label:"AI SDK Core",description:"A unified API for generating text, structured objects, tool calls, and building agents with LLMs.",hasModes:!0,examples:a.CORE_EXAMPLES.slice(0,5).map(e=>({id:e.filename,label:e.label,filename:e.filename,previewId:e.kind,getCode:t=>e.getCode("openai",t)}))},{id:"ui",label:"AI SDK UI",description:"A set of framework-agnostic hooks for quickly building chat and generative user interfaces.",hasModes:!1,examples:l.filter(e=>em[e.filename]).map(e=>({id:e.filename,label:e.label,filename:e.filename,previewId:em[e.filename],getCode:t=>e.getCode("openai",t)}))}];function eg({view:e,onChange:i}){return(0,t.jsx)("div",{"aria-label":"View",className:"flex h-7 items-center rounded-[4px] bg-background-100 p-0.5 shadow-[0_0_0_1px_var(--ds-gray-alpha-400)]",role:"radiogroup",children:["code","preview"].map(n=>(0,t.jsx)("button",{"aria-checked":e===n,className:(0,s.cn)("flex h-full items-center rounded-[2px] px-2.5 text-[13px] font-medium capitalize transition-colors",e===n?"bg-gray-100 text-gray-1000":"text-gray-900 hover:text-gray-1000"),onClick:()=>i(n),role:"radio",type:"button",children:n},n))})}e.s(["CodeExamplesSection",0,function(){let[e,a]=(0,r.useState)("core"),o=ef.find(t=>
333t.id===e)??ef[0],[l,p]=(0,r.useState)(o.examples[0].id),m=o.examples.find(e=>e.id===l)??o.examples[0],[f,g]=(0,r.useState)("gateway"),[v,x]=(0,r.useState)("preview"),y=m.getCode(f),b="preview"===v,w=e=>{a(e),p(ef.find(t=>t.id===e)?.examples[0].id??""),x("preview")};return(0,t.jsxs)("section",{"aria-label":"Explore the AI SDK",className:"grid grid-cols-1 gap-10 py-12 md:py-20 lg:grid-cols-12 lg:gap-8","data-testid":"home-code-examples",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-10 lg:col-span-4 lg:col-start-1 lg:self-center",children:[ef.map((e,i)=>{let n=e.id===o.id;return(0,t.jsxs)(r.Fragment,{children:[i>0?(0,t.jsx)("div",{"aria-hidden":"true",className:"h-px w-full bg-[linear-gradient(to_right,var(--ds-gray-200)_0%,var(--ds-gray-200)_90%,transparent_100%)]"}):null,(0,t.jsxs)("button",{"aria-pressed":n,className:"group text-left",onClick:()=>w(e.id),type:"button",children:[(0,t.jsx)("h2",{className:(0,s.cn)("text-heading-16 font-medium! transition-colors duration-250 sm:text-heading-24",n?"text-gray-1000":"text-gray-700 group-hover:text-gray-1000"),children:e.label}),(0,t.jsx)("p",{className:(0,s.cn)("mt-3 text-copy-16 transition-colors duration-250",n?"text-gray-900":"text-gray-700 group-hover:text-gray-900"),children:e.description})]})]},e.id)}),(0,t.jsx)(n.Button,{className:"self-start rounded-full",Component:"a",href:"https://playground.ai-sdk.dev",rel:"noopener noreferrer",suffix:(0,t.jsx)(i.IconArrowUpRightSmall,{"aria-hidden":"true"}),target:"_blank",children:"AI Playground"})]}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-4 lg:col-span-6 lg:col-start-7",children:[(0,t.jsx)(H,{items:o.examples,label:`${o.label} examples`,onValueChange:p,value:m.id}),(0,t.jsxs)(c,{className:"group",children:[(0,t.jsx)(d,{className:"mb-px [&>h3]:hidden sm:[&>h3]:flex",title:m.filename}),(0,t.jsx)("div",{className:"absolute top-0 right-2 z-20 flex h-(--browser-header-height) items-center",children:(0,t.jsx)(eg,{onChange:x,view:v})}),b?"core"===o.id?(0,t.jsx)(W,{previewId:m.previewId}):(0,t.jsx)(ep,{previewId:m.previewId}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.HighlightedCode,{className:"h-[309px] [&_pre]:min-h-[309px] [&_pre]:px-2 [&_pre]:py-6",code:y},`${m.id}-${f}`),(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-background-100 to-transparent"}),o.hasModes?(0,t.jsxs)("label",{className:"absolute right-4 bottom-4 z-10 flex items-center gap-2 text-copy-13 text-gray-900",children:[(0,t.jsx)("span",{className:"max-sm:hidden",children:"Use with"}),(0,t.jsxs)(h.Select,{"aria-label":"Use with",onChange:e=>g(e.target.value),value:f,children:[(0,t.jsx)("option",{value:"gateway",children:"AI Gateway"}),(0,t.jsx)("option",{value:"provider",children:"Provider"}),(0,t.jsx)("option",{value:"custom",children:"Custom provider"})]})]}):null]})]}),(0,t.jsx)("div",{"aria-label":"Select SDK",className:"flex items-center justify-center",role:"tablist",children:ef.map((e,i)=>{let n=e.id===o.id;return(0,t.jsx)("button",{"aria-label":e.label,"aria-selected":n,className:(0,s.cn)("flex items-center justify-center p-2",i===ef.length-1&&"-ml-1"),onClick:()=>w(e.id),role:"tab",type:"button",children:(0,t.jsx)("span",{className:(0,s.cn)("size-2 rounded-full transition-colors",n?"bg-gray-900":"bg-gray-500")})},e.id)})})]})]})}],308754)},106325,e=>{"use strict";var t=e.i(194690),i=e.i(195889),n=e.i(11969),s=e.i(347164),r=e.i(851842),a=e.i(655196),o=e.i(750472);function l({activeTab:e,onTabChange:n,className:s}){return(0,t.jsx)("div",{"aria-label":"AI capabilities",className:(0,i.cn)("mx-auto flex flex-wrap items-center justify-center gap-1",s),role:"group",children:r.HERO_EXAMPLES.map((s,r)=>(0,t.jsxs)("button",{"aria-pressed":e===r,className:(0,i.cn)("relative rounded-md px-4 py-2 text-center text-[13px] font-medium whitespace-nowrap transition-colors",e===r?"text-gray-1000 shadow-sm":"text-gray-900 hover:text-gray-1000"),onClick:()=>n(r),type:"button",children:[e===r&&(0,t.jsx)(o.motion.span,{className:"absolute inset-0 rounded-md border border-gray-400 bg-background-100",layoutId:"capability-tab-indicator",transition:{type:"spring",bounce:.15,duration:.4}}),(0,t.jsx)("span",{className:"relative z-10",children:s.label})]},s.label))})}var u=e.i(370856),h=e.i(176608),c=e.i(628729),d=e.i(579403);let p={height:16,aspectRatio:1,viewBox:"0 0 16 16"},m=(0,t.jsx)("g",{children:(0,t.jsx)("path",{d:"M11.54 2H9.09l4.46 11.27H16zM4.46 2 0 13.27h2.5l.92-2.36h4.67l.9 2.36h2.5L7.03 2zm-.24 6.81 1.52-3.95 1.53 3.95z",fill:"
333currentColor"})}),f={height:16,aspectRatio:1,viewBox:"0 0 16 16"},g=(0,t.jsx)("g",{children:(0,t.jsx)("path",{d:"M15.83 3.07c-.17-.08-.24.08-.34.16l-.1.09c-.24.27-.53.44-.9.42a1.8 1.8 0 0 0-1.45.57 1.3 1.3 0 0 0-.83-1.04c-.23-.1-.47-.2-.64-.44-.11-.16-.14-.34-.2-.51-.04-.11-.07-.22-.2-.24s-.18.1-.23.19q-.31.58-.28 1.23.02 1.45 1.22 2.28.14.08.09.21l-.18.56q-.05.18-.22.1a4 4 0 0 1-1.16-.8C9.84 5.3 9.33 4.68 8.68 4.2l-.46-.31c-.65-.64.09-1.17.26-1.23s.06-.3-.52-.29c-.58 0-1.11.2-1.79.46l-.3.1a6 6 0 0 0-1.93-.08 4.1 4.1 0 0 0-3 1.76A5.2 5.2 0 0 0 .1 8.68a6.2 6.2 0 0 0 2.24 3.8 6 6 0 0 0 4.3 1.43c.98-.06 2.08-.19 3.32-1.25.32.16.64.22 1.19.27.42.04.82-.02 1.14-.09.49-.1.45-.56.28-.64-1.44-.67-1.13-.4-1.41-.62.73-.87 1.83-1.77 2.26-4.7.03-.23 0-.38 0-.56 0-.12.02-.16.15-.18q.54-.06 1.03-.32c.93-.5 1.3-1.35 1.4-2.35 0-.16 0-.32-.17-.4m-8.11 9.07c-1.4-1.1-2.07-1.47-2.35-1.45-.26.01-.21.31-.15.51s.14.33.24.5c.08.1.13.27-.07.4-.45.28-1.23-.1-1.27-.11a6 6 0 0 1-2.2-2.22 7 7 0 0 1-.86-3c-.01-.26.06-.36.32-.4q.5-.1 1.02-.03 2.13.33 3.64 1.86c.58.58 1.02 1.27 1.47 1.94.48.72 1 1.4 1.65 1.95q.34.3.6.46c-.54.06-1.43.07-2.04-.41m.67-4.32a.2.2 0 1 1 .4 0 .2.2 0 1 1-.4 0m2.07 1.07q-.2.09-.4.1a1 1 0 0 1-.52-.16c-.19-.16-.32-.24-.37-.51-.03-.12-.01-.3 0-.4q.08-.31-.15-.49-.2-.14-.46-.13a.4.4 0 0 1-.17-.05.17.17 0 0 1-.08-.24c.02-.04.11-.13.13-.14.24-.14.51-.1.77 0 .23.1.4.28.66.53.26.3.31.39.46.62q.18.25.3.57.06.2-.17.3",fill:"currentColor"})}),v={height:16,aspectRatio:1,viewBox:"0 0 16 16"},x=(0,t.jsx)("g",{children:(0,t.jsx)("path",{d:"M3 0h3.33v16H3zM9.61 0h3.33v16H9.61z",fill:"currentColor"})}),y={height:16,aspectRatio:1,viewBox:"0 0 16 16"},b=(0,t.jsx)("g",{children:(0,t.jsx)("path",{d:"M8.15.4a7.3 7.3 0 0 1 5.09 1.98l-2.18 2.18a4.2 4.2 0 0 0-2.9-1.13A4.54 4.54 0 0 0 3.65 8q0 .76.24 1.44l-.07.05.06-.04a4.54 4.54 0 0 0 6.83 2.4 3.5 3.5 0 0 0 1.52-2.29H8.15V6.62h7.16q.14.75.14 1.55c0 2.32-.83 4.27-2.27 5.6a7.3 7.3 0 0 1-5.03 1.83 7.6 7.6 0 0 1-6.66-3.96l-.12-.23-.19-.4a7.5 7.5 0 0 1 .19-6.42A7.6 7.6 0 0 1 8.15.4",fill:"currentColor"})}),w={height:16,aspectRatio:1,viewBox:"0 0 16 16"},j=(0,t.jsx)("g",{children:(0,t.jsx)("path",{d:"m6.18 10.19 5.32-3.95c.26-.2.63-.12.76.18.65 1.59.36 3.5-.94 4.8a4.3 4.3 0 0 1-4.77.94l-1.8.85a6 6 0 0 0 9.3-6.28c-.66-2.83.16-3.96 1.83-6.28L16 .3l-2.2 2.2zM5.08 11.15C3.22 9.36 3.54 6.59 5.13 5a4.4 4.4 0 0 1 4.78-.95l1.8-.84a5.96 5.96 0 0 0-7.72.65 6.1 6.1 0 0 0-1.3 6.53c.67 1.67-.44 2.85-1.57 4.04-.4.42-.8.84-1.12 1.28z",fill:"currentColor"})}),S={height:16,aspectRatio:1,viewBox:"0 0 16 16"},T=(0,t.jsx)("g",{children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M1.73 9.69c0 .6.13
3331.08.3 1.36.24.37.58.53.93.53.45 0 .86-.11 1.66-1.2.45-.63.95-1.43 1.39-2.12l.5-.78.65-1q-.52-.75-.84-1.09c-.41-.43-.94-.96-1.78-.96q-.2 0-.4.06c-.5.15-.93.57-1.3 1.14a7.7 7.7 0 0 0-1.11 4.06M0 9.63q0 1.42.56 2.4a2.6 2.6 0 0 0 2.4 1.28c1 0 1.75-.45 2.64-1.63.5-.68.77-1.09 1.78-2.88l.5-.9.1-.17.1.17 1.44 2.4c.48.8 1.1 1.7 1.64 2.2.7.67 1.33.82 2.05.82q.45 0 .82-.12c.69-.2 1.13-.65 1.4-1.1.36-.63.57-1.42.57-2.5 0-1.81-.45-3.57-1.39-4.97-.85-1.27-1.97-1.95-3.14-1.95q-1.06.01-2.04.87-.66.6-1.24 1.4-.7-.88-1.32-1.39A3.5 3.5 0 0 0 4.6 2.7v-.01q-.45 0-.9.13c-.95.28-1.78 1-2.4 1.96l.03.01A9 9 0 0 0 0 9.63m9.8-2.3-.82-1.3.17-.25c.74-1.1 1.4-1.73 2.23-1.73.77 0 1.46.5 2 1.33a8 8 0 0 1 1.1 4.27v.01h-.05c0 .88-.18 1.67-.84 1.88q-.15.04-.34.04v.01h-.04c-.4 0-.69-.15-1.11-.66-.33-.4-.9-1.26-1.9-2.91z",fill:"currentColor",fillRule:"evenodd"})}),C={height:16,aspectRatio:1,viewBox:"0 0 16 16"},k=(0,t.jsx)("g",{children:(0,t.jsx)("path",{d:"M0 13.65h6.86V11.4H4.57V9.13h2.29v2.26h2.28V9.13h2.29v2.26H9.14v2.26H16V11.4h-2.29V2.35h-2.28V4.6H9.14v2.26H6.86V4.6H4.57V2.35H2.3v9.04H0z",fill:"
333currentColor"})}),P={height:16,aspectRatio:1,viewBox:"0 0 16 16"},M=(0,t.jsx)("g",{children:(0,t.jsx)("path",{d:"M6.45 12.61q0 .9.16 1.7l4.16 1.2A7.97 7.97 0 0 1 .55 10.91zM6.97 9.15l-.04.14q-.2.71-.32 1.41l7.71 2.21q-.51.65-1.13 1.18L.38 10.42a8 8 0 0 1-.34-3.26zM8.45 5.96q-.45.66-.8 1.43l8.17 2.34a8 8 0 0 1-.44 1.38L.1 6.73a8 8 0 0 1 1.05-2.86zM11.63 3.27q-.95.32-1.84 1.12l5.99 1.72q.18.75.22 1.57L1.4 3.48A8 8 0 0 1 4 1.09zM10.2.31a8 8 0 0 1 4.56 3.4L4.56.78A8 8 0 0 1 10.2.31",fill:"currentColor"})}),A={height:16,aspectRatio:1,viewBox:"0 0 16 16"},E=(0,t.jsx)("g",{children:(0,t.jsx)("path",{d:"M6.14 5.84v-1.5q-.01-.2.16-.29l3.02-1.74q.63-.35 1.42-.35c1.9 0 3.1 1.47 3.1 3.04l-.01.37-3.14-1.84a.5.5 0 0 0-.57 0zm7.07 5.87v-3.6q0-.32-.29-.5l-3.98-2.3 1.3-.75q.16-.09.32 0L13.6 6.3c.87.51 1.46 1.59 1.46 2.64 0 1.2-.71 2.31-1.84 2.77m-8-3.17-1.3-.76q-.17-.1-.17-.29V4c0-1.7 1.3-2.98 3.06-2.98q1.02.01 1.81.62L5.5 3.44a.5.5 0 0 0-.29.5zM8 10.16 6.14 9.1V6.89L8 5.84 9.86 6.9v2.22zm1.2 4.82q-1.02-.01-1.81-.62l3.12-1.8a.5.5 0 0 0 .29-.5v-4.6l1.31.76q.17.1.16.29V12c0 1.7-1.31 2.98-3.07 2.98m-3.76-3.54L2.4 9.7A3.1 3.1 0 0 1 .95 7.06c0-1.22.73-2.31 1.86-2.77V7.9q0 .34.28.5l3.97 2.3-1.3.74a.3.3 0 0 1-.32 0m-.18 2.6c-1.79 0-3.1-1.35-3.1-3.01q0-.19.03-.38l3.12 1.8q.3.18.57 0l3.98-2.3v1.51q.01.2-.16.29l-3.02 1.74q-.63.35-1.42.35m3.94 1.89a3.96 3.96 0 0 0 3.88-3.17 3.97 3.97 0 0 0 1.59-6.79q.12-.5.12-1a3.96 3.96 0 0 0-5.21-3.76 3.97 3.97 0 0 0-6.66 2.03 3.97 3.97 0 0 0-1.59 6.79q-.12.5-.12 1a3.96 3.96 0 0 0 5.21 3.76c.72.7 1.7 1.14 2.78 1.14",fill:"currentColor"})}),V={height:16,aspectRatio:1,viewBox:"0 0 16 16"},R=(0,t.jsx)("g",{children:(0,t.jsx)("path",{clipRule:"evenodd",d:"m2.87 0 4.56 4.2V0h.89v4.2L12.89 0v4.79h1.88v6.9H12.9v4.26l-4.58-4.02V16h-.89v-4l-4.55 4v-4.31H1v-6.9h1.87zm3.9 5.66H1.88v5.15h.99V9.2zm-3 3.92v4.47l3.66-3.23V6.25zm4.57 1.2V6.24l3.67 3.33V14zm4.56.03h.99V5.66H9.05l3.85 3.5zM12 4.8V2.02L9 4.79zm-5.23 0h-3V2.02z",fill:"currentColor",fillRule:"evenodd"})}),N={height:16,aspectRatio:1,viewBox:"0 0 16 16"},I=(0,t.jsx)("g",{children:(0,t.jsx)("path",{d:"M8.4 1.2 7.3 2.8a1 1 0 0 1-.78.4H.41v-2zM16 1.2 6.4 14.8H0L9.6 1.2zM7.6 14.8l1.12-1.6c.17-.25.47-.4.78-.4h6.1v2z",fill:"currentColor"})}),L={grok:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:w,...e,children:j})},openai:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:A,...e,children:E})},anthropic:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:p,...e,children:m})},google:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:y,...e,children:b})}
333,mistral:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:C,...e,children:k})},meta:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:S,...e,children:T})},perplexity:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:V,...e,children:R})},deepseek:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:f,...e,children:g})},moonshot:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:P,...e,children:M})},zai:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:N,...e,children:I})},elevenlabs:function(e){return(0,t.jsx)(d.BaseIcon,{$generated:v,...e,children:x})}};function D({provider:e,muted:n=!1,className:s}){let r=L[e];return(0,t.jsx)(r,{"aria-hidden":"true",className:(0,i.cn)(n?"text-gray-900":"text-gray-1000",s),size:16})}function B({selectedProvider:e,onSelect:n,allowedProviders:a,className:l}){let[d,p]=(0,s.useState)(1),m=(0,s.useRef)(!1),f=r.PROVIDERS.filter(e=>a.includes(e.id)),g=Math.max(0,f.findIndex(t=>t.id===e)),v=f[g];function x(e){m.current||f.length<2||(m.current=!0,p(e),n(f[(g+e+f.length)%f.length].id))}return(0,t.jsxs)("div",{className:(0,i.cn)("flex items-center gap-1",l),children:[(0,t.jsx)("button",{"aria-label":"Previous provider",className:"cursor-pointer p-1.5 text-gray-900 transition-colors hover:text-gray-1000 disabled:cursor-default disabled:opacity-40",disabled:f.length<2,onClick:()=>x(-1),type:"button",children:(0,t.jsx)(u.IconChevronLeft,{size:16})}),(0,t.jsx)("span",{"aria-label":`Provider: ${v.label}`,"aria-live":"polite",className:"relative flex size-10 items-center justify-center overflow-hidden rounded-full border border-gray-400 bg-background-100 shadow-sm",role:"img",children:(0,t.jsx)(c.AnimatePresence,{custom:d,initial:!1,mode:"sync",children:(0,t.jsx)(o.motion.span,{animate:"center",className:"absolute flex items-center justify-center",custom:d,exit:"exit",initial:"enter",onAnimationComplete:()=>{m.current=!1},transition:{type:"tween",ease:"easeOut",duration:.15},variants:{enter:e=>({x:e>0?20:-20,opacity:0}),center:{x:0,opacity:1},exit:e=>({x:e>0?-20:20,opacity:0})},children:(0,t.jsx)(D,{provider:v.id})},v.id)})}),(0,t.jsx)("button",{"aria-label":"Next provider",className:"cursor-pointer p-1.5 text-gray-900 transition-colors hover:text-gray-1000 disabled:cursor-default disabled:opacity-40",disabled:f.length<2,onClick:()=>x(1),type:"button",children:(0,t.jsx)(h.IconChevronRight,{size:16})})]})}function F({selectedProvider:e,onSelect:n,allowedProviders:s,className:a}){let l=r.PROVIDERS.filter(e=>s.includes(e.id));return(0,t.jsx)("div",{"aria-label":"Model provider",className:(0,i.cn)("flex flex-wrap items-center justify-center gap-1 sm:gap-2",a),role:"group",children:l.map(({id:s,label:r},a)=>(0,t.jsxs)("button",{"aria-label":r,"aria-pressed":e===s,className:(0,i.cn)("relative cursor-pointer rounded-full p-3 transition-colors",a>=8&&"hidden sm:block"),onClick:()=>n(s),type:"button",children:[e===s&&(0,t.jsx)(o.motion.span,{className:"absolute inset-0 rounded-full border border-gray-200 bg-background-100 shadow-sm",layoutId:"llm-provider-tab-indicator",transition:{type:"spring",bounce:.15,duration:.4}}),(0,t.jsx)("span",{className:"relative z-10 flex size-4 items-center justify-center",children:(0,t.jsx)(D,{muted:e!==s,provider:s})})]},s))})}var z=e.i(450305),_=e.i(6942),O=e.i(833720);function $(e){let[t,i]=(0,s.useState)(0),[n,r]=(0,s.useState)(!1),a=(0,s.useRef)(0),o=(0,s.useCallback)(()=>{if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){i(1),r(!0);return}let e=performance.now();a.current=requestAnimationFrame(function t(n){let s=Math.min(1,(n-e)/1500);i(1-(1-s)**3),s<1?a.current=requestAnimationFrame(t):r(!0)})},[]);return(0,s.useEffect)(()=>(i(0),r(!1),o(),()=>cancelAnimationFrame(a.current)),[e,o]),{progress:t,done:n,blurAmount:n?0:20*(1-t)}}function U({progress:e,hidden:i}){return(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute top-3 right-3 transition-opacity duration-300 ease-out",style:{opacity:+!i},children:(0,t.jsx)("span",{className:"inline-flex w-[115px] items-center justify-end rounded-md bg-gray-1000 px-3 py-1.5 text-xs font-medium text-background-100 tabular-nums",children:0===e?"Starting":e>=1?"100% Complete":`${Math.round(100*e)}% Complete`})})}function W({children:e}){return(0,t.jsx)("div",{className:"size-full p-4",children:(0,t.jsx)("div",{className:"relative size-full overflow-hidden rounded",children:e})})}function H({animationKey:e}){let{progress:i,done:n,blurAmount:r}
333=$(e),[a,o]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{o(!1)},[e]),(0,s.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>o(!0),1e3);return()=>clearTimeout(e)},[n]),(0,t.jsxs)(W,{children:[(0,t.jsx)("img",{alt:"AI-generated teddy bear hiking in the mountains",className:"size-full object-cover",loading:"eager",src:O.IMAGE_SRC,style:{filter:`blur(${r}px)`}},e),(0,t.jsx)(U,{hidden:a,progress:i})]})}var q=e.i(695775),G=e.i(515226),Y=e.i(58997),X=e.i(189685);let K=e=>{let t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${i.toString().padStart(2,"0")}`};function Z({animationKey:e,audioRef:i}){let[n,r]=(0,s.useState)(!1),[a,o]=(0,s.useState)(0),[l,u]=(0,s.useState)(0);(0,s.useEffect)(()=>{let e=i.current;e&&(e.currentTime=0,e.muted=!0,e.play().catch(()=>{}))},[e,i]);let h=(0,s.useCallback)(()=>{let e=i.current;e&&(n?e.pause():e.play().catch(()=>{}))},[n,i]),c=e=>{let t=i.current;t&&(t.currentTime=Math.min(t.duration||0,Math.max(0,t.currentTime+e)))};return(0,t.jsxs)("div",{className:"relative flex size-full flex-col items-center justify-center px-6",children:[(0,t.jsx)("audio",{onEnded:()=>r(!1),onLoadedMetadata:()=>u(i.current?.duration??0),onPause:()=>r(!1),onPlay:()=>r(!0),onTimeUpdate:()=>o(i.current?.currentTime??0),ref:i,src:O.SPEECH_AUDIO_SRC,children:(0,t.jsx)("track",{default:!0,kind:"captions",label:"English",src:"/images/home/speech.vtt",srcLang:"en"})}),(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-2.5 px-4",children:[(0,t.jsxs)("div",{className:"flex w-full animate-[fadein-inplace_400ms_ease-out_both] items-center gap-3 font-mono text-xs text-gray-900",children:[(0,t.jsx)("span",{children:K(a)}),(0,t.jsx)("div",{"aria-label":"Audio progress","aria-valuemax":Math.round(l),"aria-valuemin":0,"aria-valuenow":Math.round(a),"aria-valuetext":`${K(a)} of ${K(l)}`,className:"relative h-1 flex-1 cursor-pointer rounded-full bg-gray-200",onClick:e=>{let t=i.current;if(!t||!l)return;let n=e.currentTarget.getBoundingClientRect();t.currentTime=(e.clientX-n.left)/n.width*l},onKeyDown:e=>{"ArrowLeft"===e.key&&c(-2),"ArrowRight"===e.key&&c(2)},role:"slider",tabIndex:0,children:(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 rounded-full bg-gray-1000",style:{width:l?`${a/l*100}%`:"0%"}})}),(0,t.jsx)("span",{children:l?K(l):"0:00"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("button",{"aria-label":"Back 2 seconds",className:"shrink-0 animate-[fadein-inplace_400ms_ease-out_200ms_both] rounded-full border border-gray-400 bg-background-100 p-2 text-gray-900 shadow-sm",onClick:()=>c(-2),type:"button",children:(0,t.jsx)(X.IconRewind10Seconds,{size:12})}),(0,t.jsx)("button",{"aria-label":n?"Pause":"Play",className:"shrink-0 animate-[fadein-inplace_400ms_ease-out_350ms_both] rounded-full border border-gray-400 bg-background-100 p-3 shadow-sm",onClick:h,type:"button",children:n?(0,t.jsx)(G.IconPause,{}):(0,t.jsx)(Y.IconPlayFill,{className:"pl-0.5"})}),(0,t.jsx)("button",{"aria-label":"Forward 2 seconds",className:"shrink-0 animate-[fadein-inplace_400ms_ease-out_500ms_both] rounded-full border border-gray-400 bg-background-100 p-2 text-gray-900 shadow-sm",onClick:()=>c(2),type:"button",children:(0,t.jsx)(q.IconForward10Seconds10,{size:12})})]})]})]})}function Q({message:e,delay:n,animationKey:r,skipAnimation:a=!1}){let[o,l]=(0,s.useState)(a);(0,s.useEffect)(()=>{if(a)return void l(!0);l(!1);let e=setTimeout(()=>l(!0),n);return()=>clearTimeout(e)},[r,n,a]);let u="user"===e.role;return(0,t.jsxs)("div",{className:(0,i.cn)("relative transition-[opacity,transform] duration-500 ease-out will-change-[opacity,transform] motion-reduce:transition-none",u?"self-end":"self-start",o?"translate-y-0 opacity-100":"translate-y-2 opacity-0"),children:[(0,t.jsx)("div",{className:(0,i.cn)("max-w-[240px] rounded-xl px-3 py-2 text-[13px] leading-snug",u?"bg-gray-1000 text-background-100":"rounded-bl-sm border border-gray-200 bg-background-100 text-gray-900"),children:e.content}),u&&(0,t.jsx)("svg",{"aria-hidden":"true",className:"absolute right-[2.5px] -bottom-[0.5px] z-10 translate-x-1/2 fill-gray-1000",height:"14",viewBox:"0 0 18 14",width:"18",children:(0,t.jsx)("path",{d:"M0.866025 8.80383L11.2583 0.803833C11.2583 0.803833 12.0621 9.5 17.2583 13.1961C12.0621 13.1961 0.866025 8.80383 0.866025 8.80383Z"})})]})}let J=[{start:.119,text:"You"},{start:.259,text:" can"},{start:.459,text:" build"},{start:.72,text:" and"},{start:.879,text:" host"},{start:1.36,text:" many"},{start:1.6,text:" different"},{start:1.899,text:" types"},{start:2.119,text:" of"},{start:2.259,text:" applications"},{start:3.48,text:" from"},{start:3.779,text:" static"},{start:4.179,text:" sites"},{start:4.539,text:" with"},{start:4.799,text:" your"},{start:4.96,text:" favorite"},{start:5.319,text:" framework,"},{start:5.96,text:" multi-tenant"},{start:6.559,text:" applications"},{start:7.699,text:" or"},{start:7.859,text:" micro-frontends"},{start:8.78,text:" to"},{start:9.099,text:" AI-powered"},{start:9.82,text:" agents."}];function ee({animationKey:e}
333){let[n,r]=(0,s.useState)(0);(0,s.useEffect)(()=>{if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return void r(J.length);r(0);let e=J.map((e,t)=>setTimeout(()=>r(t+1),700*e.start));return()=>e.forEach(clearTimeout)},[e]);let a=n>0&&n<J.length;return(0,t.jsxs)("div",{className:"flex size-full flex-col justify-between gap-3",children:[(0,t.jsx)("div",{className:"flex size-full flex-col justify-center gap-3",children:(0,t.jsxs)("p",{className:"text-copy-14 leading-relaxed text-gray-900",children:[(0,t.jsx)("span",{className:"sr-only",children:J.map(e=>e.text).join("")}),J.map((e,s)=>(0,t.jsx)("span",{"aria-hidden":"true",className:(0,i.cn)("transition-all duration-500",s<n?"opacity-100":"opacity-0",s===n-1?"text-gray-1000":"text-gray-900"),children:e.text},e.start))]})}),(0,t.jsxs)("div",{"aria-hidden":"true",className:(0,i.cn)("flex items-end gap-[3px] self-end transition-opacity duration-300",a?"opacity-100":"opacity-0"),children:[(0,t.jsx)("span",{className:"w-[4.5px] animate-[barPulse_0.8s_ease-in-out_infinite] rounded-full bg-gray-400 dark:bg-gray-500",style:{height:18}}),(0,t.jsx)("span",{className:"w-[4.5px] animate-[barPulse_0.8s_ease-in-out_0.25s_infinite] rounded-full bg-gray-400 dark:bg-gray-500",style:{height:24}}),(0,t.jsx)("span",{className:"w-[4.5px] animate-[barPulse_0.8s_ease-in-out_0.5s_infinite] rounded-full bg-gray-400 dark:bg-gray-500",style:{height:15}})]})]})}function et({animationKey:e}){let{progress:i,done:n,blurAmount:r}=$(e),a=(0,s.useRef)(null);return(0,s.useEffect)(()=>{n&&a.current?.play().catch(()=>{})},[n]),(0,t.jsxs)(W,{children:[(0,t.jsx)("video",{"aria-label":"AI-generated video of a hippo chasing a cheetah through New York",className:"size-full object-cover",loop:!0,muted:!0,playsInline:!0,preload:"auto",ref:a,src:O.VIDEO_SRC,style:{filter:`blur(${r}px)`}},e),(0,t.jsx)(U,{hidden:n,progress:i})]})}function ei({kind:e,selectedProvider:n,className:a}){let[o,l]=(0,s.useState)(0),[u,h]=(0,s.useState)(!1),c=(0,s.useRef)(e),d=(0,s.useRef)(n),p=(0,s.useRef)(null),[m,f]=(0,s.useState)(!0);(0,s.useEffect)(()=>{let t=c.current!==e,i=d.current!==n;(t||i)&&(c.current=e,d.current=n,h(i&&!t),l(e=>e+1),t&&(f(!0),p.current&&(p.current.muted=!0)))},[e,n]),(0,s.useEffect)(()=>{new Image().src=O.IMAGE_SRC;let e=document.createElement("video");e.preload="auto",e.muted=!0,e.src=O.VIDEO_SRC},[]),(0,s.useEffect)(()=>{let e=()=>{document.hidden&&(p.current&&(p.current.muted=!0),f(!0))};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]);let g=(0,s.useCallback)(()=>{let e=p.current;e&&(e.muted=!e.muted,f(e.muted))},[]);return(0,t.jsxs)("div",{"aria-label":`${e} generation preview`,className:(0,i.cn)("relative min-w-0",a),role:"region",children:[(0,t.jsx)("div",{className:"flex h-full flex-col overflow-hidden rounded-lg border border-gray-200 bg-background-100 shadow-sm",children:function(){switch(e){case"image":return(0,t.jsx)("div",{className:"flex min-w-0 flex-1 items-center justify-center overflow-hidden",children:(0,t.jsx)(H,{animationKey:o})});case"video":return(0,t.jsx)("div",{className:"flex min-w-0 flex-1 items-center justify-center overflow-hidden",children:(0,t.jsx)(et,{animationKey:o})});case"speech":return(0,t.jsx)("div",{className:"flex h-full flex-1 animate-[slideUpFadeIn_500ms_ease-out_both]",children:(0,t.jsx)(Z,{animationKey:o,audioRef:p})},o);case"transcription":return(0,t.jsx)("div",{className:"flex flex-1 animate-[slideUpFadeIn_500ms_ease-out_both] items-start p-6",children:(0,t.jsx)(ee,{animationKey:o})},o);default:return(0,t.jsx)("div",{className:"flex flex-1 flex-col justify-start gap-4 p-6",children:(0,r.getChatPreview)(n).map((e,i)=>
333(0,t.jsx)(Q,{animationKey:o,delay:u?0:400*i,message:e,skipAnimation:u&&"user"===e.role},`${o}-${e.role}`))})}}()}),"speech"===e&&(0,t.jsx)("button",{"aria-label":m?"Unmute":"Mute",className:"absolute right-6 bottom-6 animate-[fadein-inplace_500ms_ease-out_both] text-gray-600",onClick:g,type:"button",children:m?(0,t.jsx)(z.IconSpeakerOff,{size:16}):(0,t.jsx)(_.IconSpeakerVolumeLoud,{size:16})},`mute-${o}`)]})}class en{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return es(this.animations,"duration")}get iterationDuration(){return es(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function es(e,t){let i=0;for(let n=0;n<e.length;n++){let s=e[n][t];null!==s&&s>i&&(i=s)}return i}class er extends en{then(e,t){return this.finished.finally(e).then(()=>{})}}var ea=e.i(926935),eo=e.i(706221),el=e.i(102710),eu=e.i(140926),eh=e.i(973626),ec=e.i(855397),ed=e.i(10875),ep=e.i(302461),em=e.i(470934),ef=e.i(633836),eg=e.i(725542),ev=e.i(991388),ex=e.i(577182);function ey(e,t){var i;let n;return(0,ex.isEasingArray)(e)?e[i=e.length,((t-0)%(n=i-0)+n)%n+0]:e}var eb=e.i(513038);function ew(e){return"object"==typeof e&&!Array.isArray(e)}function ej(e,t,i,n){return null==e?[]:"string"==typeof e&&ew(t)?(0,eb.resolveElements)(e,i,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>null!=e):[e]}function eS(e,t,i,n){return"number"==typeof t?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):"<"===t?i:t.startsWith("<")?Math.max(0,i+parseFloat(t.slice(1))):n.get(t)??e}var eT=e.i(327745);function eC(e,t){return e.at!==t.at?e.at-t.at:null===e.value?1:null===t.value?-1:0}function ek(e,t){return t.has(e)||t.set(e,{}),t.get(e)}function eP(e,t){return t[e]||(t[e]=[]),t[e]}let eM=e=>"number"==typeof e,eA=e=>e.every(eM);var eE=e.i(754497),eV=e.i(368623),eR=e.i(530754),eN=e.i(256650),eI=e.i(570615),eL=e.i(565274),eD=e.i(777074),eB=e.i(301219),eF=e.i(453311);class ez extends eF.VisualElement{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(t in e){let i=e[t];if("string"==typeof i||"number"==typeof i)return i}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return(0,eB.createBox)()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}function e_(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},i=(0,eN.isSVGElement)(e)&&!(0,eI.isSVGSVGElement)(e)?new eL.SVGVisualElement(t):new eD.HTMLVisualElement(t);i.mount(e),eV.visualElementStore.set(e,i)}function eO(e){let t=new ez({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),eV.visualElementStore.set(e,t)}function e$(e,t,i,n){let s=[];if((0,eu.isMotionValue)(e)||"number"==typeof e||"string"==typeof e&&!ew(t))s.push((0,eE.animateSingleValue)(e,ew(t)&&t.default||t,i&&i.default||i));else{if(null==e)return s;let r=ej(e,t,n),a=r.length;(0,eg.invariant)(!!a,"No valid elements provided.","no-valid-elements");for(let e=0;e<a;e++){let n=r[e],o=n instanceof Element?e_:eO;eV.visualElementStore.has(n)||o(n);let l=eV.visualElementStore.get(n),u={...i};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(e,a)),s.push(...(0,eR.animateTarget)(l,{...t,transition:u},{}))}}return s}let eU=function(e={}){let{scope:t,reduceMotion:i,skipAnimations:n}=e;return function(e,s,r){var a;let o,l=[],u={};if(void 0!==i&&(u.reduceMotion=i),void 0!==n&&(u.skipAnimations=n),Array.isArray(e)&&e.some(Array.isArray)){let i,{onComplete:n,...r}=s||{};"function"==typeof n&&(o=n),a={...u,...r},i=[],(function(e,{defaultTransition:t={},...i}={},n,s){let r=t.duration||.3,a=new Map,o=new Map,l={},u=new Map,h=0,c=0,d=0;for(let i=0;i<e.length;i++){let a=e[i];if("string"==typeof a){u.set(a,c);continue}if(!Array.isArray(a)){u.set(a.name,eS(c,a.at,h,u));continue}let[f,g,v={}]=a;void 0!==v.at&&(c=eS(c,v.at,h,u));let x=0,y=(e,i,n,a=0,o=0)=>{var l;let u=Array.isArray(l=e)?l:[l],{delay:h=0,times:p=(0,eh.defaultOffset)(u),type:m=t.type||"ke
333yframes",repeat:f,repeatType:g,repeatDelay:v=0,...y}=i,{ease:b=t.ease||"easeOut",duration:w}=i,j="function"==typeof h?h(a,o):h,S=u.length,T=(0,ec.isGenerator)(m)?m:s?.[m||"keyframes"];if(S<=2&&T){let e=100;2===S&&eA(u)&&(e=Math.abs(u[1]-u[0]));let i={...t,...y};void 0!==w&&(i.duration=(0,ef.secondsToMilliseconds)(w));let n=(0,ed.createGeneratorEasing)(i,e,T);b=n.ease,w=n.duration}w??(w=r);let C=c+j;1===p.length&&0===p[0]&&(p[1]=1);let k=p.length-u.length;if(k>0&&(0,ep.fillOffset)(p,k),1===u.length&&u.unshift(null),f&&(0,eg.warning)(f<20,`Sequence segments can't repeat ${f} times â ignoring repeat option. Use a value below 20 or apply repeat at the sequence level instead.`),f&&f<20){let e=w>0?v/w:0;w=w*(f+1)+v*f;let t=[...u],i=[...p],n=[...b=Array.isArray(b)?[...b]:[b]],s="reverse"===g||"mirror"===g,r=t,a=n;s&&(r=[...t].reverse(),"reverse"===g&&(a=[...n].reverse().map(e=>"function"==typeof e?(0,ev.reverseEasing)(e):e)));for(let o=0;o<f;o++){let l=s&&o%2==0,h=l?r:t,c=l?a:n,d=(o+1)*(1+e);e>0&&(u.push(u[u.length-1]),p.push(d),b.push("linear")),u.push(...h);for(let e=0;e<h.length;e++)p.push(i[e]+d),b.push(0===e?"linear":ey(c,e-1))}!function(e,t,i=0){let n=t+1+t*i;for(let t=0;t<e.length;t++)e[t]=e[t]/n}(p,f,e)}let P=C+w;!function(e,t,i,n,s,r){for(let t=0;t<e.length;t++){let i=e[t];i.at>s&&i.at<r&&((0,ea.removeItem)(e,i),t--)}for(let a=0;a<t.length;a++)e.push({value:t[a],at:(0,eT.mixNumber)(s,r,n[a]),easing:ey(i,a)})}(n,u,b,p,C,P),x=Math.max(j+w,x),d=Math.max(P,d)};if((0,eu.isMotionValue)(f))y(g,v,eP("default",ek(f,o)));else{let e=ej(f,g,n,l),t=e.length;for(let i=0;i<t;i++){let n=ek(e[i],o);for(let e in g){var p,m;y(g[e],(p=v,m=e,p&&p[m]?{...p,...p[m]}:{...p}),eP(e,n),i,t)}}}h=c,c+=x}return o.forEach((e,n)=>{for(let s in e){let r=e[s];r.sort(eC);let o=[],l=[],u=[];for(let e=0;e<r.length;e++){let{at:t,value:i,easing:n}=r[e];o.push(i),l.push((0,em.progress)(0,d,t)),u.push(n||"easeOut")}0!==l[0]&&(l.unshift(0),o.unshift(o[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),o.push(null)),a.has(n)||a.set(n,{keyframes:{},transition:{}});let h=a.get(n);h.keyframes[s]=o;let{type:c,...p}=t;h.transition[s]={...p,duration:d,ease:u,times:l,...i}}}),a})(e.map(e=>{if(Array.isArray(e)&&"function"==typeof e[0]){let t=e[0],i=(0,eo.motionValue)(0);return(i.on("change",t),1===e.length)?[i,[0,1]]:2===e.length?[i,[0,1],e[1]]:[i,e[1],e[2]]}return e}),a,t,{spring:el.spring}).forEach(({keyframes:e,transition:t},n)=>{i.push(...e$(n,e,t))}),l=i}else{let{onComplete:i,...n}=r||{};"function"==typeof i&&(o=i),l=e$(e,s,{...u,...n},t)}let h=new er(l);return o&&h.finished.then(o),t&&(t.animations.push(h),h.finished.then(()=>{(0,ea.removeItem)(t.animations,h)})),h}}();e.s(["HeroInteractive",0,function({className:e}
333){let o,u,[h,c]=(0,s.useState)("grok"),[d,p]=(0,s.useState)(0),[m,f]=(0,s.useState)("gateway"),{ref:g,reveal:v}=(o=(0,s.useRef)(null),u=(0,s.useCallback)(()=>{let e=o.current;if(!e)return;let t=e.getBoundingClientRect(),i=window.innerHeight;if(t.top>=24&&t.bottom<=i-24)return;let n=window.scrollY,s=Math.max(0,n+t.top-.4*i);window.matchMedia("(prefers-reduced-motion: reduce)").matches?window.scrollTo(0,s):eU(n,s,{type:"spring",bounce:.35,duration:.6,onUpdate:e=>window.scrollTo(0,e)})},[]),{ref:o,reveal:u}),x=r.HERO_EXAMPLES[d],y=(0,r.providersFor)(x.kind,m),b=(0,r.resolveProvider)(x.kind,m,h),w=e=>{c(e),v()};return(0,t.jsxs)("div",{className:(0,i.cn)("mx-auto flex max-w-4xl flex-col gap-4",e),"data-testid":"home-hero-demo",children:[(0,t.jsxs)("div",{className:"mx-auto flex w-fit items-center justify-center gap-8",children:[(0,t.jsx)(l,{activeTab:d,onTabChange:e=>{p(e),v()}}),(0,t.jsx)(B,{allowedProviders:y,className:"max-md:hidden",onSelect:w,selectedProvider:b})]}),(0,t.jsxs)("div",{className:"gap-4 md:grid md:grid-cols-[2fr_1fr]",ref:g,children:[(0,t.jsx)(a.CodeWindow,{code:x.getCode(b,m),filename:x.filename,mode:m,onModeChange:f}),(0,t.jsx)(ei,{className:"max-md:hidden",kind:x.kind,selectedProvider:b})]}),(0,t.jsx)(F,{allowedProviders:y,className:"md:hidden",onSelect:w,selectedProvider:b}),(0,t.jsxs)("p",{className:"mx-auto text-copy-14 text-gray-900",children:["See all"," ",(0,t.jsxs)("a",{className:"inline-flex items-center font-medium text-gray-1000 hover:underline hover:underline-offset-4",href:"https://vercel.com/ai-gateway/models",rel:"noopener noreferrer",target:"_blank",children:["supported LLM models",(0,t.jsx)(n.IconArrowUpRightSmall,{"aria-hidden":"true"})]})]})]})}],106325)},851842,572810,655196,450305,6942,833720,695775,515226,58997,189685,e=>{"use strict";let t,i=[{id:"grok",label:"Grok"},{id:"openai",label:"OpenAI"},{id:"anthropic",label:"Anthropic"},{id:"google",label:"Google"},{id:"mistral",label:"Mistral"},{id:"meta",label:"Meta"},{id:"perplexity",label:"Perplexity"},{id:"deepseek",label:"DeepSeek"},{id:"moonshot",label:"Moonshot"},{id:"zai",label:"Z.ai"},{id:"elevenlabs",label:"ElevenLabs"}],n={grok:["xai","grok-4.7","spacexai/grok-4.7"],openai:["openai","gpt-6-astra","openai/gpt-6-astra"],anthropic:["anthropic","claude-sonnet-5.5","anthropic/claude-sonnet-5.5"],google:["google","gemini-3.1-pro-preview","google/gemini-3.1-pro-preview"],mistral:["mistral","mistral-large-3","mistral/mistral-large-3"],meta:["togetherai","meta-llama/Llama-3.3-70B-Instruct-Turbo","meta/llama-3.3-70b"],perplexity:["perplexity","sonar","perplexity/sonar"],deepseek:["deepseek","deepseek-v4-pro","deepseek/deepseek-v4-pro"],moonshot:["moonshotai","kimi-k2.6","moonshotai/kimi-k2.6"],zai:["zai","glm-5.2","zai/glm-5.2"],elevenlabs:["elevenlabs","eleven_multilingual_v2","elevenlabs/eleven_multilingual_v2"]},s={text:i.filter(e=>"elevenlabs"!==e.id).map(e=>e.id),image:["grok","openai","google"],speech:["openai","elevenlabs"],transcription:["openai"],video:["grok","google"]};function r(e,t){return"speech"===e&&"gateway"===t?["openai"]:s[e]}function a(e,t,i){let n=r(e,t);return n.includes(i)?i:n[0]}function o({imports:e,body:t,kind:i,provider:s,mode:r,extraImports:l=""}){var u,h;let[c,d,p]=(u=i,h=a(i,r,s),"image"===u?"grok"===h?["xai","grok-imagine-image-2.0","spacexai/grok-imagine-image-2.0"]:"google"===h?["google","gemini-3.1-flash-image-preview","google/gemini-3.1-flash-image"]:["openai","gpt-image-2.5-sunburst","openai/gpt-image-2.5-sunburst"]:"video"===u?"grok"===h?["xai","grok-imagine-video-1.5","spacexai/grok-imagine-video-1.5"]:["google","veo-3.1-generate","google/veo-3.1-generate-001"]:"speech"===u?"elevenlabs"===h?n.elevenlabs:["openai","tts-1","openai/tts-1"]:"transcription"===u?["openai","whisper-1","openai/whisper-1"]:n[h]),m="text"===i?"languageModel":i,f=`'${p}'`,g="",v="";if("gateway"!==r&&(v=` 334import { ${c} } from '@ai-sdk/${c}';`,f="text"===i?`${c}('${d}')`:`${c}.${m}('${d}')`),"custom"===r){e+=", customProvider";let t="text"===i?"languageModels":`${i}Models`;g=`const provider = customProvider({ 335 ${t}: { 'my-model': ${f} }, 336}); 337 338`,f=`provider.${"text"===i?"languageModel":`${i}Model`}('my-model')`}return`import { ${e} } from 'ai';${v}${l} 339 340${g}${t.replaceAll("__MODEL__",f)}`}let l=(e,t,i,n,s,r="")=>({label:e,filename:t,kind:i,getCode:(e,t)=>o({imports:n,body:s,kind:i,provider:e,mode:t,extraImports:r})}),u=[l("Text Generation","generate-text.ts","text","generateText",`const { text } = await generateText({ 341 model: __MODEL__, 342 prompt: 'Explain the concept of quantum entanglement.', 343}); 344 345console.log(text);`),l("Speech","generate-speech.ts","speech","generateSpeech",`const { audio } = await generateSpeech({ 346 model: __MODEL__, 347 text: 'You can build and host many different types of applications.', 348}); 349 350console.log(audio);`),l("Transcription","transcribe.ts","transcription","transcribe",`const { text } = await transcribe({ 351 model: __MODEL__, 352 audio: new URL('https://example.com/audio.mp3'), 353}); 354 355console.log(text);`),l("Image Generation","generate-image.ts","image","generateImage",`const { image } = await generateImage({ 356 model: __MODEL__, 357 prompt: 'A teddy bear wearing a black hat hiking in the mountains', 358}); 359 360console.log(image.base64);`),l("Video Generation","generate-video.ts","video","experimental_generateVideo as generateVideo",`const { videos } = await generateVideo({ 361 model: __MODEL__, 362 prompt: 'A hippo chasing a cheetah through New York', 363}); 364 365console.log(videos[0].base64);`),l("Tool Calling","tool-calling.ts","text","generateText, tool, stepCountIs",`const { text } = await generateText({ 366 model: __MODEL__, 367 prompt: 'What is the weather in San Francisco?', 368 stopWhen: stepCountIs(2), 369 tools: { 370 getWeather: tool({ 371 description: 'Get the weather for a location', 372 inputSchema: z.object({ location: z.string() }), 373 execute: async ({ location }) => ({ 374 location, temperature: 72, condition: 'sunny', 375 }), 376 }), 377 }, 378}); 379 380console.log(text);`,"\nimport { z } from 'zod/v4';"),l("Error Handling","error-handling.ts","text","streamText",`const result = streamText({ 381 model: __MODEL__, 382 prompt: 'Write a short story.', 383}); 384 385for await (const part of result.fullStream) { 386 if (part.type === 'error') { 387 console.error('Stream error:', part.error); 388 } else if (part.type === 'text-delta') { 389 process.stdout.write(part.text); 390 } 391}`),{label:"DevTools",filename:"devtools.ts",kind:"text",getCode:(e,t)=>{let i=o({imports:"generateText, wrapLanguageModel",kind:"text",provider:e,mode:t,extraImports:"\nimport { devToolsMiddleware } from '@ai-sdk/devtools';",body:`const model = wrapLanguageModel({ 392 model: __MODEL__, 393 middleware: devToolsMiddleware(), 394}); 395 396const { text } = await generateText({ 397 model, 398 prompt: 'Why is the sky blue?', 399}); 400 401console.log(text);`});return"gateway"===t?i.replace("generateText, wrapLanguageModel","generateText, wrapLanguageModel, gateway").replace(/model: ('[^']+'),/,"model: gateway($1),"):i}}],h=[u[0],u[3],u[1],u[2],u[4]],c={openai:"Quantum entanglement is
401when two particles become connected so that the state of one instantly influences the state of the other, regardless of the distance separating them.",anthropic:"Quantum entanglement is when two particles become linked so that measuring one instantly affects the other, no matter the distance between them.",google:"Think of two coins that always land on opposite sides. Quantum entanglement is similar â measuring one particle immediately determines the state of its partner, even across vast distances.",grok:"Entanglement is nature's way of keeping a secret between two particles. Once entangled, observing one instantly reveals information about the other â no signal needed, no matter how far apart they are.",mistral:"When two particles are entangled, they share a quantum state. A measurement on one particle instantaneously constrains the possible outcomes for the other, regardless of separation distance.",meta:"Imagine two dice that are magically linked â whenever one rolls a six, the other always rolls a one. Quantum entanglement works similarly, connecting particles so their measurements are always correlated.",perplexity:"Quantum entanglement occurs when particles interact and become correlated. After separation, measuring one particle's property instantly determines the corresponding property of the other, defying classical expectations about locality.",deepseek:'Entanglement means two particles share a joint quantum state. When you measure one, the other\'s state is determined simultaneously â a phenomenon Einstein famously called "spooky action at a distance."',moonshot:"Two entangled particles behave as a single system. No matter how far apart they are, measuring one instantly defines the other's properties â faster than light could travel between them.",zai:"Quantum entanglement links two particles at a fundamental level. Once entangled, a change observed in one is reflected in the other instantaneously, even across the entire universe.",elevenlabs:"Quantum entanglement is when two particles become linked so that measuring one instantly affects the other, no matter the distance between them."};e.s(["CORE_EXAMPLES",0,u,"HERO_EXAMPLES",0,h,"PROVIDERS",0,i,"getChatPreview",0,function(e){return[{role:"user",content:"Explain quantum entanglement in simple terms."},{role:"assistant",content:c[e]}]},"providersFor",0,r,"resolveProvider",0,a],851842);var d=e.i(194690),p=e.i(796822),m=e.i(891879),f=e.i(195889),g=e.i(347164),v=e.i(108985);function x({className:e,...t}){return(0,d.jsxs)("span",{className:"group relative inline-flex items-center",children:[(0,d.jsx)("select",{className:(0,f.cn)("h-8 cursor-pointer appearance-none truncate rounded-md border-none bg-background-100 pr-9 pl-3 text-sm text-gray-1000 shadow-[0_0_0_1px_var(--ds-gray-alpha-400)] transition-[box-shadow,color] duration-200 hover:shadow-[0_0_0_1px_var(--ds-gray-alpha-500)] focus:shadow-[var(--ds-focus-border)] focus:outline-hidden [&_option]:text-gray-1000",e),...t}),(0,d.jsx)(v.IconChevronDown,{"aria-hidden":"true",className:"pointer-events-none absolute right-3 size-(--ds-control-decoration-size) text-gray-700 transition-colors duration-150 ease-in group-hover:text-gray-1000"})]})}function y({code:i,className:n}){let[s,r]=(0,g.useState)();return(0,g.useEffect)(()=>{let n=!1;return(t??=Promise.all([e.A(131661),e.A(587072)]).then(([{createHighlighterCore:t},{createJavaScriptRegexEngine:i}])=>t({engine:i(),langs:[e.A(324096)],themes:[m.geistShikiTheme]}))).then(e=>{n||r({code:i,tokens:e.codeToTokensBase(i,{lang:"tsx",theme:m.geistShikiTheme})})}).catch(()=>{}),()=>{n=!0}},[i]),(0,d.jsx)("div",{className:(0,f.cn)("overflow-auto text-left [&_pre]:m-0 [&_pre]:rounded-none! [&_pre]:border-0 [&_.line]:px-4 [&>div]:my-0 [&>div]:rounded-none [&>div>div]:rounded-none [&>div>div]:border-0",n),children:(0,d.jsx)(p.CodeBlock,{children:s?.code===i?s.tokens.map((e,t)=>(0,d.jsxs)("span",{className:"line",children:[e.map(e=>(0,d.jsx)("span",{style:{color:e.color},children:e.content},e.offset)),"\n"]},t)):i})})}e.s(["Select",0,x],572810),e.s(["CodeWindow",0,function({code:e,filename:t,mode:i,onModeChange:n}){return(0,d.jsxs)("div",{className:"min-w-0 overflow-hidden rounded-lg border border-gray-400 bg-background-100 shadow-sm",children:[(0,d.jsxs)("div",{className:"flex min-h-12 flex-wrap items-center justify-between gap-2 border-b border-gray-400 px-4 py-2",children:[(0,d.jsxs)("span",{className:"flex items-center gap-3",children:[(0,d.jsxs)("span",{"aria-hidden":"true",className:"flex gap-1.5",children:[(0,d.jsx)("span",{className:"size-2 roun
401ded-full bg-[#ee6d5e]"}),(0,d.jsx)("span",{className:"size-2 rounded-full bg-[#f3bf4a]"}),(0,d.jsx)("span",{className:"size-2 rounded-full bg-[#5dc753]"})]}),(0,d.jsx)("span",{className:"font-mono text-xs text-gray-900",children:t})]}),i&&n?(0,d.jsxs)("label",{className:"flex items-center gap-2 text-xs text-gray-900",children:["Run it with",(0,d.jsxs)(x,{"aria-label":"Model source",onChange:e=>n(e.target.value),value:i,children:[(0,d.jsx)("option",{value:"gateway",children:"AI Gateway"}),(0,d.jsx)("option",{value:"provider",children:"Provider"}),(0,d.jsx)("option",{value:"custom",children:"Custom"})]})]}):null]}),(0,d.jsx)(y,{className:"h-72 [&_pre]:min-h-72",code:e})]})},"HighlightedCode",0,y],655196);var b=e.i(579403);let w={height:16,aspectRatio:1,viewBox:"0 0 16 16"},j=(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{clipRule:"evenodd",d:"M14 1.25V.05l-1.08.52L5.82 4H2.69l-1.34-.67-.68-.34L0 4.34l.67.33 14 7 .68.34.67-1.35-.67-.33L14 9.66V1.25m-1.5 7.66V2.44L6.38 5.4a1 1 0 0 1-.44.1h-.26zM3.5 8v-.75H2V11a1 1 0 0 0 1 1h2.83l7.1 3.43 1.07.51v-3.19h-1.5v.81L6.38 10.6a1 1 0 0 0-.44-.1H3.5z",fill:"currentColor",fillRule:"evenodd"})});e.s(["IconSpeakerOff",0,function(e){return(0,d.jsx)(b.BaseIcon,{$generated:w,...e,children:j})}],450305);let S={height:16,aspectRatio:1,viewBox:"0 0 16 16"},T=(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{clipRule:"evenodd",d:"M3.74 10.7 3 10.5H1.5v-5H3l.74-.2L8.5 2.58v10.84zM3 4 8.5.86 10 0v16l-1.5-.86L3 12H1a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm11.26-1.04.41.63a8 8 0 0 1 0 8.82l-.41.63-1.25-.83.41-.62a6.5 6.5 0 0 0 0-7.18l-.41-.62zM12.06 5l.35.66a5 5 0 0 1 0 4.7l-.35.66-1.32-.7.35-.66a3.5 3.5 0 0 0 0-3.3l-.35-.66z",fill:"currentColor",fillRule:"evenodd"})});e.s(["IconSpeakerVolumeLoud",0,function(e){return(0,d.jsx)(b.BaseIcon,{$generated:S,...e,children:T})}],6942);let C="https://e742qlubrjnjqpp0.public.blob.vercel-storage.com/ai-sdk",k=`${C}/teddy-bear-hiking.png`,P=`${C}/hippo-chases-cheetah.mp4`;
401e.s(["IMAGE_SRC",0,k,"SPEECH_AUDIO_SRC",0,"https://ejiidnob33g9ap1r.public.blob.vercel-storage.com/ElevenLabs_2025-11-10T22_10_24_Hayden_pvc_sp110_s50_sb75_se0_b_m2.mp3","VIDEO_SRC",0,P],833720);let M={height:16,aspectRatio:1,viewBox:"0 0 16 16"},A=(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{clipRule:"evenodd",d:"M0 7.95A7 7 0 0 1 4.26 1.5H1V0h4.92a1 1 0 0 1 1 1v4.93h-1.5V2.68A5.5 5.5 0 0 0 7 13.44h.75v1.5H7a7 7 0 0 1-7-7m14.37-2.32c-.9 0-1.62.72-1.62 1.62v2.13a1.62 1.62 0 0 0 3.24 0V7.25c0-.9-.72-1.62-1.62-1.62m-.38 1.62a.38.38 0 1 1 .76 0v2.13a.38.38 0 1 1-.76 0zm-2.75-.88a.62.62 0 0 0-.77-.6l-1 .25-.6.15.3 1.2.6-.14.23-.06v2.58H9V11h3.24V9.75h-1z",fill:"currentColor",fillRule:"evenodd"})});e.s(["IconForward10Seconds10",0,function(e){return(0,d.jsx)(b.BaseIcon,{$generated:M,...e,children:A})}],695775);let E={height:16,aspectRatio:1,viewBox:"0 0 16 16"},V=(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{d:"M5.75 14.75H4V1.25h1.75zM12 1.25v13.5h-1.75V1.25z",fill:"currentColor"})});e.s(["IconPause",0,function(e){return(0,d.jsx)(b.BaseIcon,{$generated:E,...e,children:V})}],515226);let R={height:16,aspectRatio:1,viewBox:"0 0 16 16"},N=(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{d:"M2 1.4c0-.18.2-.3.36-.22l13.2 6.6c.18.09.18.35 0 .44l-13.2 6.6A.25.25 0 0 1 2 14.6z",fill:"currentColor"})});e.s(["IconPlayFill",0,function(e){return(0,d.jsx)(b.BaseIcon,{$generated:R,...e,children:N})}],58997);let I={height:16,aspectRatio:1,viewBox:"0 0 16 16"},L=(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{clipRule:"evenodd",d:"M16 7.95a7 7 0 0 0-4.26-6.45H15V0h-4.92a1 1 0 0 0-1 1v4.93h1.5V2.68A5.5 5.5 0 0 1 9 13.44h-.75v1.5H9a7 7 0 0 0 7-7M5.37 5.63c-.9 0-1.62.72-1.62 1.62v2.13a1.62 1.62 0 0 0 3.24 0V7.25c0-.9-.72-1.62-1.62-1.62m-.38 1.62a.38.38 0 0 1 .76 0v2.13a.38.38 0 1 1-.76 0zm-2.75-.88a.62.62 0 0 0-.77-.6l-1 .25-.6.15.3 1.2.6-.14.23-.06v2.58H0V11h3.24V9.75h-1z",fill:"currentColor",fillRule:"evenodd"})});e.s(["IconRewind10Seconds",0,function(e){return(0,d.jsx)(b.BaseIcon,{$generated:I,...e,children:L})}],189685)},941191,e=>{"use strict";var t=e.i(194690),i=e.i(628729),n=e.i(750472),s=e.i(876009),r=e.i(494004),a=e.i(347164);function o(){s.hasReducedMotionListener.current||(0,r.initPrefersReducedMotion)();let[e]=(0,a.useState)(s.prefersReducedMotion.current);return e}var l=e.i(207939),u=e.i(926838),h=e.i(292772),c=e.i(195889);let d=(0,a.createContext)(null);function p(e){let t=(0,a.useContext)(d);if(!t)throw Error(`${e} must be used within CommandPrompt.Root`);return t}e.s(["CommandPromptContent",0,function(e){return null},"CommandPromptCopy",0,function({className:e,onClick:s,...r}){let a=p("CommandPrompt.Copy"),l=o();return(0,t.jsxs)("button",{"aria-label":a.copied?"Copied":"Copy command",className:(0,c.cn)("relative flex size-8 shrink-0 translate-x-0.5 cursor-pointer items-center justify-center rounded-full border-none bg-transparent text-gray-1000","hover:!bg-gray-alpha-200 touch-manipulation transition-colors group-hover:bg-gray-alpha-100","outline-2 outline-transparent outline-offset-2 focus-visible:outline-[var(--ds-focus-color)]",e),onClick:e=>{s?.(e),e.defaultPrevented||(e.stopPropagation(),a.copyActiveValue())},type:"button",...r,children:[(0,t.jsx)(i.AnimatePresence,{initial:!1,children:!a.copied&&(0,t.jsx)(n.motion.span,{animate:{opacity:1,transform:"scale(1)",filter:"blur(0px)"},className:"absolute inset-0 flex items-center justify-center",exit:{opacity:0,transform:"scale(0.5)",filter:"blur(1px)"},initial:{opacity:0,transform:"scale(0.5)",filter:"blur(1px)"},transition:l?{duration:0}:{duration:.2,ease:[.23,1,.32,1]},children:(0,t.jsx)(h.IconCopy,{className:"block",size:16})},"copy")}),(0,t.jsx)(i.AnimatePresence,{initial:!1,children:a.copied&&(0,t.jsx)(n.motion.span,{animate:{opacity:1,transform:"scale(1)",filter:"blur(0px)"},className:"absolute inset-0 flex items-center justify-center",exit:{opacity:0,transform:"scale(0.5)",filter:"blur(1px)"},initial:{opacity:0,transform:"scale(0.5)",filter:"blur(1px)"},transition:l?{duration:0}:{duration:.2,ease:[.23,1,.32,1]},children:(0,t.jsx)(u.IconCheck,{className:"block",size:16})},"check")})]})},"CommandPromptList",0,function({className:e,...i}
401){return(0,t.jsx)("div",{className:(0,c.cn)("flex items-center",e),...i})},"CommandPromptPrefix",0,function({className:e,...i}){return(0,t.jsx)("span",{className:(0,c.cn)("block pr-1 text-gray-500 text-label-16-mono!",e),...i})},"CommandPromptRoot",0,function({value:e,defaultValue:i,onValueChange:n,className:s,children:r,...o}){let[l,u]=(0,a.useState)(i??""),[h,p]=(0,a.useState)(!1),[m,f]=(0,a.useState)(""),[g,v]=(0,a.useState)(),[x,y]=(0,a.useState)(!1),[b,w]=(0,a.useState)(!0),j=(0,a.useRef)(null);return(0,a.useEffect)(()=>()=>{j.current&&clearTimeout(j.current)},[]),(0,t.jsx)(d.Provider,{value:{value:e??l,setValue:function(t){void 0===e&&u(t),p(!1),j.current&&clearTimeout(j.current),n?.(t)},copied:h,copyActiveValue:function(){m&&(navigator.clipboard.writeText(m),p(!0),j.current&&clearTimeout(j.current),j.current=setTimeout(()=>p(!1),1e3))},activeCopyValue:m,setActiveCopyValue:f,commandWidth:g,setCommandWidth:v,isOverflowing:x,setIsOverflowing:y,canShowGradient:b,setCanShowGradient:w},children:(0,t.jsx)("div",{className:(0,c.cn)("flex w-full flex-col items-center gap-2",s),...o,children:r})})},"CommandPromptSurface",0,function({className:e,onClick:i,children:s}){let r=p("CommandPrompt.Surface"),a=o();return(0,t.jsx)(n.motion.div,{className:(0,c.cn)("group material-small relative flex max-w-[calc(100vw-48px)] items-center gap-1 rounded-full py-2 pr-3 pl-5 transition-colors",e),layout:!0,onClick:e=>{i?.(e),e.defaultPrevented||window.getSelection()?.toString()||r.copyActiveValue()},transition:a?{duration:0}:{type:"spring",bounce:0,duration:.4},children:s})},"CommandPromptTrigger",0,function({value:e,className:i,onClick:n,children:s,...r}){let a=p("CommandPrompt.Trigger"),o=a.value===e;return(0,t.jsx)("button",{"aria-pressed":o,className:(0,c.cn)("cursor-pointer px-3 py-2 text-gray-900 hover:text-gray-1000","touch-manipulation rounded-sm border-none bg-transparent font-medium! text-label-13!","outline outline-2 outline-transparent outline-offset-2 focus-visible:outline-[var(--ds-focus-color)]","text-gray-900 data-[active]:font-medium data-[active]:text-gray-1000","flex items-center gap-1.5 whitespace-nowrap",i),"data-active":o?"":void 0,onClick:t=>{n?.(t),t.defaultPrevented||a.setValue(e)},type:"button",...r,children:s})},"CommandPromptTriggerDivider",0,function({className:e,...i}){return(0,t.jsx)("div",{"aria-hidden":!0,className:(0,c.cn)("h-3 w-px bg-gray-400",e),...i})},"CommandPromptViewport",0,function({className:e,children:s}){let r=p("CommandPrompt.Viewport"),u=o(),{commandWidth:h,canShowGradient:d,isOverflowing:m,setActiveCopyValue:f,setCanShowGradient:g,setCommandWidth:v,setIsOverflowing:x}=r,{ref:y}=(0,l.useSize)({onResize:({width:e})=>v(e)}),{ref:b}=(0,l.useSize)({onResize:()=>{let e=b.current;e&&x(e.scrollWidth>e.clientWidth)}}),w=a.Children.toArray(s).filter(e=>(0,a.isValidElement)(e)).map(e=>e.props).find(e=>e.value===r.value),j=w?.children??null,S="string"==typeof j||"number"==typeof j?String(j):a.Children.toArray(j).filter(e=>"string"==typeof e||"number"==typeof e).join(""),T=w?.copyValue??S;return(0,a.useLayoutEffect)(()=>{x(!1),g(!!u)},[T,g,x,u]),(0,a.useEffect)(()=>(f(T),()=>{x(!1)}),[T,f,x]),(0,t.jsxs)(n.motion.span,{animate:void 0===h?void 0:{width:u?"auto":h},className:(0,c.cn)("relative block min-w-0 overflow-hidden text-gray-1000 text-label-14-mono!",e),initial:!1,onAnimationComplete:()=>{g(!0)},transition:u?{duration:0}:{type:"spring",bounce:0,duration:.4},children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none invisible absolute whitespace-nowrap",ref:y,children:j}),(0,t.jsx)(i.AnimatePresence,{initial:!1,mode:"wait",children:a.Children.toArray(s).map(e=>(0,a.isValidElement)(e)&&e.props.value===r.value?(0,t.jsx)(n.motion.span,{animate:{opacity:1,filter:"blur(0px)"}
401,className:(0,c.cn)("block min-w-0 whitespace-nowrap py-2",d&&m?"overflow-x-auto":"overflow-x-hidden",e.props.className),exit:{opacity:0,filter:"blur(1px)"},initial:{opacity:0,filter:"blur(1px)"},ref:e=>{b.current=e,e&&x(e.scrollWidth>e.clientWidth)},transition:u?{duration:0}:{duration:.15},children:e.props.children},T):null)}),(0,t.jsx)(i.AnimatePresence,{children:d&&m&&(0,t.jsx)(n.motion.span,{animate:{opacity:1},"aria-hidden":!0,className:"pointer-events-none absolute top-0 right-0 bottom-0 z-10 block w-4 bg-gradient-to-r from-transparent to-background-100",exit:{opacity:0},initial:{opacity:0},transition:u?{duration:0}:{duration:.2}})})]})}],941191)},750472,301219,140926,725542,633836,926935,855397,706221,368623,876009,494004,453311,327745,565274,777074,10875,102710,577182,991388,470934,302461,973626,530754,256650,513038,754497,570615,628729,e=>{"use strict";let t,i,n,s=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],r=new Set([...s,"pathRotation"]),a=(e,t,i)=>i>t?t:i<e?e:i,o={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},l={...o,transform:e=>a(0,1,e)},u={...o,default:1},h=e=>Math.round(1e5*e)/1e5,c=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,d=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,p=(e,t)=>i=>!!("string"==typeof i&&d.test(i)&&i.startsWith(e)||t&&null!=i&&Object.prototype.hasOwnProperty.call(i,t)),m=(e,t,i)=>n=>{if("string"!=typeof n)return n;let[s,r,a,o]=n.match(c);return{[e]:parseFloat(s),[t]:parseFloat(r),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},f={...o,transform:e=>Math.round(a(0,255,e))},g={test:p("rgb","red"),parse:m("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:n=1})=>"rgba("+f.transform(e)+", "+f.transform(t)+", "+f.transform(i)+", "+h(l.transform(n))+")"},v={test:p("#"),parse:function(e){let t="",i="",n="",s="";return e.length>5?(t=e.substring(1,3),i=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),i=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),t+=t,i+=i,n+=n,s+=s),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}},transform:g.transform},x=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),y=x("deg"),b=x("%"),w=x("px"),j=x("vh"),S=x("vw"),T={...b,parse:e=>b.parse(e)/100,transform:e=>b.transform(100*e)},C={test:p("hsl","hue"),parse:m("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:i,alpha:n=1})=>"hsla("+Math.round(e)+", "+b.transform(h(t))+", "+b.transform(h(i))+", "+h(l.transform(n))+")"},k={test:e=>g.test(e)||v.test(e)||C.test(e),parse:e=>g.test(e)?g.parse(e):C.test(e)?C.parse(e):v.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?g.transform(e):C.transform(e),getAnimatableNone:e=>{let t=k.parse(e);return t.alpha=0,k.transform(t)}},P=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,M="number",A="color",E=/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 V(e){let t=e.toString(),i=[],n={color:[],number:[],var:[]},s=[],r=0,a=t.replace(E,e=>(k.test(e)?(n.color.push(r),s.push(A),i.push(k.parse(e))):e.startsWith("var(")?(n.var.push(r),s.push("var"),i.push(e)):(n.number.push(r),s.push(M),i.push(parseFloat(e))),++r,"${}")).split("${}");return{values:i,split:a,indexes:n,types:s}}function R({split:e,types:t}){let i=e.length;return n=>{let s="";for(let r=0;r<i;r++)if(s+=e[r],void 0!==n[r]){let e=t[r];e===M?s+=h(n[r]):e===A?s+=k.transform(n[r]):s+=n[r]}return s}}let N={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(c)?.length||0)+(e.match(P)?.length||0)>0},parse:function(e){return V(e).values},createTransformer:function(e){return R(V(e))},getAnimatableNone:function(e){let t=V(e);return R(t)(t.values.map((e,i)=>((e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof e?0:k.test(e)?k.getAnimatableNone(e):e)(e,t.split[i])))}},I=new Set(["brightness","contrast","saturate","opacity"]);function L(e){let[t,i]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[n]=i.match(c)||[];
401if(!n)return e;let s=i.replace(n,""),r=+!!I.has(t);return n!==i&&(r*=100),t+"("+r+s+")"}let D=/\b([a-z-]*)\(.*?\)/gu,B={...N,getAnimatableNone:e=>{let t=e.match(D);return t?t.map(L).join(" "):e}},F={...N,getAnimatableNone:e=>{let t=N.parse(e);return N.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},z={...o,transform:Math.round},_={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,top:w,right:w,bottom:w,left:w,inset:w,insetBlock:w,insetBlockStart:w,insetBlockEnd:w,insetInline:w,insetInlineStart:w,insetInlineEnd:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,paddingBlock:w,paddingBlockStart:w,paddingBlockEnd:w,paddingInline:w,paddingInlineStart:w,paddingInlineEnd:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,marginBlock:w,marginBlockStart:w,marginBlockEnd:w,marginInline:w,marginInlineStart:w,marginInlineEnd:w,fontSize:w,backgroundPositionX:w,backgroundPositionY:w,rotate:y,pathRotation:y,rotateX:y,rotateY:y,rotateZ:y,scale:u,scaleX:u,scaleY:u,scaleZ:u,skew:y,skewX:y,skewY:y,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:l,originX:T,originY:T,originZ:w,zIndex:z,fillOpacity:l,strokeOpacity:l,numOctaves:z},O={..._,color:k,backgroundColor:k,outlineColor:k,fill:k,stroke:k,borderColor:k,borderTopColor:k,borderRightColor:k,borderBottomColor:k,borderLeftColor:k,filter:B,WebkitFilter:B,mask:F,WebkitMask:F},$=e=>O[e],U=()=>({translate:0,scale:1,origin:0,originPoint:0}),W=()=>({x:U(),y:U()}),H=()=>({min:0,max:0}),q=()=>({x:H(),y:H()});e.s(["createBox",0,q,"createDelta",0,W],301219);let G=e=>!!(e&&e.getVelocity);e.s(["isMotionValue",0,G],140926);let Y=new Set(["width","height","top","left","right","bottom",...s]),X=e=>t=>t.test(e),K=[o,w,b,y,S,j,{test:e=>"auto"===e,parse:e=>e}],Z=e=>K.find(X(e));var Q,J=e.i(826177);let ee=()=>{},et=()=>{};J.default,e.s(["invariant",0,et,"warning",0,ee],725542);let ei=e=>t=>"string"==typeof t&&t.startsWith(e),en=ei("--"),es=ei("var(--"),er=e=>!!es(e)&&ea.test(e.split("/*")[0].trim()),ea=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function eo(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let el=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,eu=e=>180*e/Math.PI,eh=e=>ed(eu(Math.atan2(e[1],e[0]))),ec={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:eh,rotateZ:eh,skewX:e=>eu(Math.atan(e[1])),skewY:e=>eu(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ed=e=>((e%=360)<0&&(e+=360),e),ep=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),em=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ef={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ep,scaleY:em,scale:e=>(ep(e)+em(e))/2,rotateX:e=>ed(eu(Math.atan2(e[6],e[5]))),rotateY:e=>ed(eu(Math.atan2(-e[2],e[0]))),rotateZ:eh,rotate:eh,skewX:e=>eu(Math.atan(e[4])),skewY:e=>eu(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function eg(e){return+!!e.includes("scale")}function ev(e,t){let i,n;if(!e||"none"===e)return eg(t);let s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(s)i=ef,n=s;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=ec,n=t}if(!n)return eg(t);let r=i[t],a=n[1].split(",").map(ex);return"function"==typeof r?r(a):a[r]}function ex(e){return parseFloat(e.trim())}let ey=e=>e===o||e===w,eb=new Set(["x","y","z"]),ew=s.filter(e=>!eb.has(e)),ej={width:({x:e},{paddingLeft:t="0",paddingRight:i="0",boxSizing:n})=>{let s=e.max-e.min;return"border-box"===n?s:s-parseFloat(t)-parseFloat(i)},height:({y:e},{paddingTop:t="0",paddingBottom:i="0",boxSizing:n})=>{let s=e.max-e.min;return"border-box"===n?s:s-parseFloat(t)-parseFloat(i)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ev(t,"x"),y:(e,{transform:t})=>ev(t,"y")};ej.translateX=ej.x,ej.translateY=ej.y;let eS=e=>e,eT={},eC=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ek(e,t){let i=!1,n=!0,s={delta:0,timestamp:0,isProcessing:!1},r=()=>i=!0,a=eC.reduce((e,t)=>
401(e[t]=function(e){let t=new Set,i=new Set,n=!1,s=!1,r=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1};function o(t){r.has(t)&&(l.schedule(t),e()),t(a)}let l={schedule:(e,s=!1,a=!1)=>{let o=a&&n?t:i;return s&&r.add(e),o.add(e),e},cancel:e=>{i.delete(e),r.delete(e)},process:e=>{if(a=e,n){s=!0;return}n=!0;let r=t;t=i,i=r,t.forEach(o),t.clear(),n=!1,s&&(s=!1,l.process(e))}};return l}(r),e),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:h,update:c,preRender:d,render:p,postRender:m}=a,f=()=>{let r=eT.useManualTiming,a=r?s.timestamp:performance.now();i=!1,r||(s.delta=n?1e3/60:Math.max(Math.min(a-s.timestamp,40),1)),s.timestamp=a,s.isProcessing=!0,o.process(s),l.process(s),u.process(s),h.process(s),c.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,i&&t&&(n=!1,e(f))};return{schedule:eC.reduce((t,r)=>{let o=a[r];return t[r]=(t,r=!1,a=!1)=>(!i&&(i=!0,n=!0,s.isProcessing||e(f)),o.schedule(t,r,a)),t},{}),cancel:e=>{for(let t=0;t<eC.length;t++)a[eC[t]].cancel(e)},state:s,steps:a}}let{schedule:eP,cancel:eM,state:eA,steps:eE}=ek("u">typeof requestAnimationFrame?requestAnimationFrame:eS,!0),eV=new Set,eR=!1,eN=!1,eI=!1;function eL(){if(eN){let e=Array.from(eV).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),i=new Map;t.forEach(e=>
401{let t,n=(t=[],ew.forEach(i=>{let n=e.getValue(i);void 0!==n&&(t.push([i,n.get()]),n.set(+!!i.startsWith("scale")))}),t);n.length&&(i.set(e,n),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=i.get(e);t&&t.forEach(([t,i])=>{e.getValue(t)?.set(i)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}eN=!1,eR=!1,eV.forEach(e=>e.complete(eI)),eV.clear()}function eD(){eV.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eN=!0)})}class eB{constructor(e,t,i,n,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=i,this.motionValue=n,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(eV.add(this),eR||(eR=!0,eP.read(eD),eP.resolveKeyframes(eL))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:i,motionValue:n}=this;if(null===e[0]){let s=n?.get(),r=e[e.length-1];if(void 0!==s)e[0]=s;else if(i&&t){let n=i.readValue(t,r);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=r),n&&void 0===s&&n.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),eV.delete(this)}cancel(){"scheduled"===this.state&&(eV.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let eF=new Set([B,F]);function ez(e,t){let i=$(e);return eF.has(i)||(i=N),i.getAnimatableNone?i.getAnimatableNone(t):void 0}let e_=new Set(["auto","none","0"]);class eO extends eB{constructor(e,t,i,n,s){super(e,t,i,n,s,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:i}=this;if(!t||!t.current)return;super.readKeyframes();for(let i=0;i<e.length;i++){let n=e[i];if("string"==typeof n&&er(n=n.trim())){let s=function e(t,i,n=1){et(`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[s,r]=function(e){let t=el.exec(e);if(!t)return[,];let[,i,n,s]=t;return[`--${i??n}`,s]}(t);if(!s)return;let a=window.getComputedStyle(i).getPropertyValue(s);if(a){let e=a.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return er(r)?e(r,i,n+1):r}(n,t.current);void 0!==s&&(e[i]=s),i===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Y.has(i)||2!==e.length)return;let[n,s]=e,r=Z(n),a=Z(s);if(eo(n)!==eo(s)&&ej[i]){this.needsMeasurement=!0;return}if(r!==a)if(ey(r)&&ey(a))for(let t=0;t<e.length;t++){let i=e[t];"string"==typeof i&&(e[t]=parseFloat(i))}else ej[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,i=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&i.push(t);i.length&&function(e,t,i){let n,s=0;for(;s<e.length&&!n;){let t=e[s];"string"==typeof t&&!e_.has(t)&&V(t).values.length&&(n=e[s]),s++}if(n&&i)for(let s of t)e[s]=ez(i,n)}(e,i,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:i}=this;if(!e||!e.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ej[i](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let n=t[t.length-1];void 0!==n&&e.getValue(i,n).jump(n,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:i}=this;if(!e||!e.current)return;let n=e.getValue(t);n&&n.jump(this.measuredOrigin,!1);let s=i.length-1,r=i[s];i[s]=ej[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEac
401h(([t,i])=>{e.getValue(t).set(i)}),this.resolveNoneKeyframes()}}let e$=e=>1e3*e,eU=e=>e/1e3;function eW(e,t){-1===e.indexOf(t)&&e.push(t)}function eH(e,t){let i=e.indexOf(t);i>-1&&e.splice(i,1)}e.s(["millisecondsToSeconds",0,eU,"secondsToMilliseconds",0,e$],633836),e.s(["addUniqueItem",0,eW,"removeItem",0,eH],926935);class eq{constructor(){this.subscriptions=[]}add(e){return eW(this.subscriptions,e),()=>eH(this.subscriptions,e)}notify(e,t,i){let n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,i);else for(let s=0;s<n;s++){let n=this.subscriptions[s];n&&n(e,t,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function eG(e,t,i){t.startsWith("--")?e.style.setProperty(t,i):e.style[t]=i}function eY(e){let t;return()=>(void 0===t&&(t=e()),t)}let eX={};function eK(e,t){let i=eY(e);return()=>eX[t]??i()}let eZ=eK(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),eQ=e=>null!==e;function eJ(e,{repeat:t,repeatType:i="loop"},n,s=1){let r=e.filter(eQ),a=s<0||t&&"loop"!==i&&t%2==1?0:r.length-1;return a&&void 0!==n?n:r[a]}class e0{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let e1=e=>Array.isArray(e)&&"number"==typeof e[0],e2=eK(()=>{try{document.createElement("div").animate({opacity:0}
401,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),e5=(e,t,i=10)=>{let n="",s=Math.max(Math.round(t/i),2);for(let t=0;t<s;t++)n+=Math.round(1e4*e(t/(s-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},e3=([e,t,i,n])=>`cubic-bezier(${e}, ${t}, ${i}, ${n})`,e6={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:e3([0,.65,.55,1]),circOut:e3([.55,0,1,.45]),backIn:e3([.31,.01,.66,-.59]),backOut:e3([.33,1.53,.69,.99])};function e4(e){return"function"==typeof e&&"applyToOptions"in e}e.s(["isGenerator",0,e4],855397);class e9 extends e0{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:i,keyframes:n,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:a,onComplete:o}=e;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=e,et(e.type);const l=function({type:e,...t}){return e4(e)&&e2()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,i,{delay:n=0,duration:s=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:l}={},u){let h={[t]:i};l&&(h.offset=l);let c=function e(t,i){if(t)return"function"==typeof t?e2()?e5(t,i):"ease-out":e1(t)?e3(t):Array.isArray(t)?t.map(t=>e(t,i)||e6.easeOut):e6[t]}(o,s);Array.isArray(c)&&(h.easing=c);let d={delay:n,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};return u&&(d.pseudoElement=u),e.animate(h,d)}(t,i,n,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let e=eJ(n,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(e),eG(t,i,e),this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return eU(Number(this.animation.effect?.getComputedTiming?.().duration||0))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+eU(e)}get time(){return eU(Number(this.animation.currentTime)||0)}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=e$(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:i,observe:n}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&eZ())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),i&&(this.animation.rangeEnd=i),eS):n(this)}}let e7=new Set(["opacity","clipPath","filter","transform"]),{schedule:e8}=ek(queueMicrotask,!1);function te(){t=void 0}let tt={now:()=>(void 0===t&&tt.set(eA.isProcessing||eT.useManualTiming?eA.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(te)}},ti=(e,t)=>t?1e3/t*e:0,tn;class ts{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=tt.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=tt.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new eq);let i=this.events[e].add(t);return"change"===e?()=>{i(),eP.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,i){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return tn&&tn.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=tt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ti(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tr(e,t){return new ts(e,t)}e.s(["motionValue",0,tr],706221);let ta=[...K,k,N],to=new WeakMap;function tl(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function tu(e){return"string"==typeof e||Array.isArray(e)}e.s(["visualElementStore",0,to],368623);let th=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tc=["initial",...th];function td(e){return tl(e.animate)||tc.some(t=>tu(e[t]))}function tp(e){return!!(td(e)||e.variants)}let tm={current:null},tf={current:!1};e.s(["hasReducedMotionListener",0,tf,"prefersReducedMotion",0,tm],876009);let tg="u">typeof window;function tv(){if(tf.current=!0,tg)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tm.current=e.matches;e.addEventListener("change",t),t()}else tm.current=!1}function tx(e){let t=[{},{}];
401return e?.values.forEach((e,i)=>{t[0][i]=e.get(),t[1][i]=e.getVelocity()}),t}function ty(e,t,i,n){if("function"==typeof t){let[s,r]=tx(n);t=t(void 0!==i?i:e.custom,s,r)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[s,r]=tx(n);t=t(void 0!==i?i:e.custom,s,r)}return t}e.s(["initPrefersReducedMotion",0,tv],494004);let tb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tw={};function tj(e){tw=e}function tS(){return tw}class tT{scrapeMotionValuesFromProps(e,t,i){return{}}constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:n,skipAnimations:s,blockInitialAnimation:r,visualState:a},o={}){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=eB,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=()=>{let e=tt.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,eP.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=s,this.options=o,this.blockInitialAnimation=!!r,this.isControllingVariants=td(t),this.isVariantNode=tp(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in c){const t=c[e];void 0!==l[e]&&G(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,to.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(tf.current||tv(),this.shouldReduceMotion=tm.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),eM(this.notifyUpdate),eM(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let i;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&e7.has(e)&&this.current instanceof HTMLElement){let{factory:i,keyframes:n,times:s,ease:r,duration:a}=t.accelerate,o=new e9({element:this.current,name:e,keyframes:n,times:s,ease:r,duration:e$(a)}),l=i(o);this.valueSubscriptions.set(e,()=>{l(),o.cancel()});return}let n=r.has(e);n&&this.onBindTransform&&this.onBindTransform();let s=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&eP.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{s(),i&&i()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in tw){let t=tw[e];if(!t)continue;let{isEnabled:i,Feature:n}=t;if(!this.features[e]&&n&&i(this.props)&&(this.features[e]=new n(this)),this.features[e]){let t=this.features[e];
401t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):q()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tb.length;t++){let i=tb[t];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let n=e["on"+i];n&&(this.propEventSubscriptions[i]=this.on(i,n))}this.prevMotionValues=function(e,t,i){for(let n in t){let s=t[n],r=i[n];if(G(s))e.addValue(n,s);else if(G(r))e.addValue(n,tr(s,{owner:e}));else if(r!==s)if(e.hasValue(n)){let t=e.getValue(n);!0===t.liveStyle?t.jump(s):t.hasAnimated||t.set(s)}else{let t=e.getStaticValue(n);e.addValue(n,tr(void 0!==t?t:s,{owner:e}))}}for(let n in i)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let i=this.values.get(e);t!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return void 0===i&&void 0!==t&&(i=tr(null===t?void 0:t,{owner:this}),this.addValue(e,i)),i}readValue(e,t){let i=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=i){let n,s;if("string"==typeof i&&(n=i,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(s=i,/^0[^.\s]+$/u.test(s))))i=parseFloat(i);else{let n;n=i,!ta.find(X(n))&&N.test(t)&&(i=ez(e,t))}this.setBaseTarget(e,G(i)?i.get():i)}return G(i)?i.get():i}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let n=ty(this.props,i,this.presenceContext?.custom);n&&(t=n[e])}if(i&&void 0!==t)return t;let n=this.getBaseTargetFromProps(this.props,e);return void 0===n||G(n)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:n}on(e,t){return this.events[e]||(this.events[e]=new eq),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){e8.render(this.render)}}e.s(["VisualElement",0,tT,"getFeatureDefinitions",0,tS,"setFeatureDefinitions",0,tj],453311);class tC extends tT{constructor(){super(...arguments),this.KeyframeResolver=eO}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let i=e.style;return i?i[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;G(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function tk(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let tP=(e,t)=>t&&"number"==typeof e?t.transform(e):e,tM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tA=s.length;function tE(e,t,i){let{style:n,vars:a,transformOrigin:o}=e,l=!1,u=!1;for(let e in t){let i=t[e];if(r.has(e)){l=!0;continue}if(en(e)){a[e]=i;continue}{let t=tP(i,_[e]);e.startsWith("origin")?(u=!0,o[e]=t):n[e]=t}}if(!t.transform&&(l||i?n.transform=function(e,t,i){let n="",r=!0;for(let a=0;a<tA;a++){let o=s[a],l=e[o];if(void 0===l)continue;let u=!0;
401if("number"==typeof l)u=l===+!!o.startsWith("scale");else{let e=parseFloat(l);u=o.startsWith("scale")?1===e:0===e}if(!u||i){let e=tP(l,_[o]);if(!u){r=!1;let t=tM[o]||o;n+=`${t}(${e}) `}i&&(t[o]=e)}}let a=e.pathRotation;return a&&(r=!1,n+=`rotate(${tP(a,_.pathRotation)}) `),n=n.trim(),i?n=i(t,r?"":n):r&&(n="none"),n}(t,e.transform,i):n.transform&&(n.transform="none")),u){let{originX:e="50%",originY:t="50%",originZ:i=0}=o;n.transformOrigin=`${e} ${t} ${i}`}}let tV={offset:"stroke-dashoffset",array:"stroke-dasharray"},tR={offset:"strokeDashoffset",array:"strokeDasharray"},tN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tI(e,{attrX:t,attrY:i,attrScale:n,pathLength:s,pathSpacing:r=1,pathOffset:a=0,...o},l,u,h){if(tE(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:c,style:d}=e;for(let e of(c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=h?.transformBox??"fill-box",delete c.transformBox),tN))void 0!==c[e]&&(d[e]=c[e],delete c[e]);void 0!==t&&(c.x=t),void 0!==i&&(c.y=i),void 0!==n&&(c.scale=n),void 0!==s&&function(e,t,i=1,n=0,s=!0){e.pathLength=1;let r=s?tV:tR;e[r.offset]=`${-n}`,e[r.array]=`${t} ${i}`}(c,s,r,a,!1)}let tL=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"]),tD=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tB(e,{style:t,vars:i},n,s){let r,a=e.style;for(r in t)a[r]=t[r];for(r in s?.applyProjectionStyles(a,n),i)a.setProperty(r,i[r])}let tF=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function tz(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let t_={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!w.test(e))return e;else e=parseFloat(e);let i=tz(e,t.target.x),n=tz(e,t.target.y);return`${i}% ${n}%`}},tO=(e,t,i)=>e+(t-e)*i;e.s(["mixNumber",0,tO],327745);let t$={borderRadius:{...t_,applyTo:[...tF]},borderTopLeftRadius:t_,borderTopRightRadius:t_,borderBottomLeftRadius:t_,borderBottomRightRadius:t_,boxShadow:{correct:(e,{treeScale:t,projectionDelta:i})=>{let n=N.parse(e);if(n.length>5)return e;let s=N.createTransformer(e),r=+("number"!=typeof n[0]),a=i.x.scale*t.x,o=i.y.scale*t.y;n[0+r]/=a,n[1+r]/=o;let l=tO(a,o,.5);return"number"==typeof n[2+r]&&(n[2+r]/=l),"number"==typeof n[3+r]&&(n[3+r]/=l),s(n)}}};function tU(e,{layout:t,layoutId:i}){return r.has(e)||e.startsWith("origin")||(t||void 0!==i)&&(!!t$[e]||"opacity"===e)}function tW(e,t,i){let n=e.style,s=t?.style,r={};if(!n)return r;for(let t in n)(G(n[t])||s&&G(s[t])||tU(t,e)||i?.getValue(t)?.liveStyle!==void 0)&&(r[t]=n[t]);return r}function tH(e,t,i){let n=tW(e,t,i);for(let i in e)(G(e[i])||G(t[i]))&&(n[-1!==s.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]);return n}class tq extends tC{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=q}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(r.has(t)){let e=$(t);return e&&e.default||0}return t=tL.has(t)?t:tk(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,i){return tH(e,t,i)}build(e,t,i){tI(e,t,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,t,i,n){for(let i in tB(e,t,void 0,n),t.attrs)e.setAttribute(tL.has(i)?i:tk(i),t.attrs[i])}mount(e){this.isSVGTag=tD(e.tagName),super.mount(e)}}function tG({top:e,left:t,right:i,bottom:n}){return{x:{min:t,max:i},y:{min:e,max:n}}}function tY(e){return void 0===e||1===e}function tX({scale:e,scaleX:t,scaleY:i}){return!tY(e)||!tY(t)||!tY(i)}function tK(e){return tX(e)||tZ(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function tZ(e){var t,i;return(t=e.x)&&"0%"!==t||(i=e.y)&&"0%"!==i}e.s(["SVGVisualElement",0,tq],565274);function tQ(e,t,i,n,s){return void 0!==s&&(e=n+s*(e-n)),n+i*(e-n)+t}function tJ(e,t=0,i=1,n,s){e.min=tQ(e.min,t,i,n,s),e.max=tQ(e.max,t,i,n,s)}function t0(e,{x:t,y:i}){tJ(e.x,t.translate,t.scale,t.originPoint),tJ(e.y,i.translate,i.scale,i.originPoint)}function t1(e,t){e.min+=t,e.max+=t}function t2(e,t,i,n,s=.5){let r=tO(e.min,e.max,s);tJ(e,t,i,r,n)}function t5(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function t3(e,t,i){let n=i??e;t2(e.x,t5(t.x,n.x),t.scaleX,t.scale,t.originX),t2(e.y,t5(t.y,n.y),t.scaleY,t.scale,t.originY)}function t6(e,t){return tG(function(e,t){if(!t)return e;let i=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}class t4 extends tC{constructor(){super(...arguments),this.type="html",this.renderInstance=tB}readValueFromInstance(e,t){if(r.has(t))return this.projection?.isProjecting?eg(t):((e,t)=>{let{transform:i="none"}=getComputedStyle(e);return ev(i,t)})(e,t);
401{let i=window.getComputedStyle(e),n=(en(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return t6(e,t)}build(e,t,i){tE(e,t,i.transformTemplate)}scrapeMotionValuesFromProps(e,t,i){return tW(e,t,i)}}e.s(["HTMLVisualElement",0,t4],777074);var t9=e.i(347164);let t7=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function t8(e){if("string"!=typeof e||e.includes("-"));else if(t7.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}var ie=e.i(194690);let it=(0,t9.createContext)({}),ii=(0,t9.createContext)({strict:!1}),is=(0,t9.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ir=(0,t9.createContext)({});function ia(e){return Array.isArray(e)?e.join(" "):e}let io=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function il(e,t,i){for(let n in t)G(t[n])||tU(n,i)||(e[n]=t[n])}let iu=()=>({...io(),attrs:{}}),ih=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ic(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ih.has(e)}let id=e=>!ic(e);try{Q=(()=>{let e=Error("Cannot find module '@emotion/is-prop-valid'");throw e.code="MODULE_NOT_FOUND",e})().default,"function"==typeof Q&&(id=e=>e.startsWith("on")?!ic(e):Q(e))}catch{}function ip(e){return G(e)?e.get():e}let im=(0,t9.createContext)(null);function ig(e){let t=(0,t9.useRef)(null);return null===t.current&&(t.current=e()),t.current}let iv=e=>(t,i)=>{let n=(0,t9.useContext)(ir),s=(0,t9.useContext)(im),r=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},i,n,s){return{latestValues:function(e,t,i,n){let s={},r=n(e,{});for(let e in r)s[e]=ip(r[e]);let{initial:a,animate:o}=e,l=td(e),u=tp(e);t&&u&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===o&&(o=t.animate));let h=!!i&&!1===i.initial,c=(h=h||!1===a)?o:a;if(c&&"boolean"!=typeof c&&!tl(c)){let t=Array.isArray(c)?c:[c];for(let i=0;i<t.length;i++){let n=ty(e,t[i]);if(n){let{transitionEnd:e,transition:t,...i}=n;for(let e in i){let t=i[e];if(Array.isArray(t)){let e=h?t.length-1:0;t=t[e]}null!==t&&(s[e]=t)}for(let t in e)s[t]=e[t]}}}return s}(i,n,s,e),renderState:t()}})(e,t,n,s);return i?r():ig(r)},ix=iv({scrapeMotionValuesFromProps:tW,createRenderState:io}),iy=iv({scrapeMotionValuesFromProps:tH,createRenderState:iu}),ib={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},iw=!1;function ij(){return!function(){if(iw)return;let e={};for(let t in ib)e[t]={isEnabled:e=>ib[t].some(t=>!!e[t])};tj(e),iw=!0}(),tS()}let iS=Symbol.for("motionComponentSymbol"),iT="data-"+tk("framerAppearId"),iC=(0,t9.createContext)({});function ik(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}let iP="u">typeof window?t9.useLayoutEffect:t9.useEffect;function iM(e,{forwardMotionProps:t=!1,type:i}={},n,s){n&&function(e){let t=ij();for(let i in e)t[i]={...t[i],...e[i]};tj(t)}(n);let r=i?"svg"===i:t8(e),a=r?iy:ix;function o(i,n){var o;let l,u,h,c={...(0,t9.useContext)(is),...i,layoutId:function({layoutId:e}){let t=(0,t9.useContext)(it).id;return t&&void 0!==e?t+"-"+e:e}(i)},{isStatic:d}=c,p=function(e){let{initial:t,animate:i}=function(e,t){if(td(e)){let{initial:t,animate:i}=e;return{initial:!1===t||tu(t)?t:void 0,animate:tu(i)?i:void 0}}return!1!==e.inherit?t:{}}(e,(0,t9.useContext)(ir));return(0,t9.useMemo)(()=>({initial:t,animate:i}),[ia(t),ia(i)])}(i),m=a(i,d);if(!d&&"u">typeof window){(0,t9.useContext)(ii).strict;let t=function(e){let{drag:t,layout:i}=ij();if(!t&&!i)return{};let n={...t,...i};return{MeasureLayout:t?.isEnabled(e)||i?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}
401(c);l=t.MeasureLayout,p.visualElement=function(e,t,i,n,s,r){let{visualElement:a}=(0,t9.useContext)(ir),o=(0,t9.useContext)(ii),l=(0,t9.useContext)(im),u=(0,t9.useContext)(is),h=u.reducedMotion,c=u.skipAnimations,d=(0,t9.useRef)(null),p=(0,t9.useRef)(!1);n=n||o.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:a,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:h,skipAnimations:c,isSVG:r}),p.current&&d.current&&(d.current.manuallyAnimateOnMount=!0));let m=d.current,f=(0,t9.useContext)(iC);m&&!m.projection&&s&&("html"===m.type||"svg"===m.type)&&function(e,t,i,n){let{layoutId:s,layout:r,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:u,layoutAnchor:h,layoutCrossfade:c}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!a||o&&ik(o),visualElement:e,animationType:"string"==typeof r?r:"both",initialPromotionConfig:n,crossfade:c,layoutScroll:l,layoutRoot:u,layoutAnchor:h})}(d.current,i,s,f);let g=(0,t9.useRef)(!1);(0,t9.useInsertionEffect)(()=>{m&&g.current&&m.update(i,l)});let v=i[iT],x=(0,t9.useRef)(!!v&&"u">typeof window&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return iP(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),(0,t9.useEffect)(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),x.current=!1),m.enteringChildren=void 0)}),m}(e,m,c,s,t.ProjectionNode,r)}return(0,ie.jsxs)(ir.Provider,{value:p,children:[l&&p.visualElement?(0,ie.jsx)(l,{visualElement:p.visualElement,...c}):null,function(e,t,i,{latestValues:n},s,r=!1,a){let o=(a??t8(e)?function(e,t,i,n){let s=(0,t9.useMemo)(()=>{let i=iu();return tI(i,t,tD(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){let t={};il(t,e.style,e),s.style={...t,...s.style}}return s}:function(e,t){let i,n,s={},r=(i=e.style||{},il(n={},i,e),Object.assign(n,function({transformTemplate:e},t){return(0,t9.useMemo)(()=>{let i=io();return tE(i,t,e),Object.assign({},i.vars,i.style)},[t])}(e,t)),n);return e.drag&&!1!==e.dragListener&&(s.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=r,s})(t,n,s,e),l=function(e,t,i){let n={};for(let s in e)("values"!==s||"object"!=typeof e.values)&&!G(e[s])&&(id(s)||!0===i&&ic(s)||!t&&!ic(s)||e.draggable&&s.startsWith("onDrag"))&&(n[s]=e[s]);return n}(t,"string"==typeof e,r),u=e!==t9.Fragment?{...l,...o,ref:i}:{},{children:h}=t,c=(0,t9.useMemo)(()=>G(h)?h.get():h,[h]);return(0,t9.createElement)(e,{...u,children:c})}(e,i,(o=p.visualElement,u=(0,t9.useRef)(n),(0,t9.useInsertionEffect)(()=>{u.current=n}),h=(0,t9.useRef)(null),(0,t9.useCallback)(e=>{e&&m.onMount?.(e),o&&(e?o.mount(e):o.unmount());let t=u.current;if("function"==typeof t)if(e){let i=t(e);"function"==typeof i&&(h.current=i)}else h.current?(h.current(),h.current=null):t(e);else t&&(t.current=e)},[o])),m,d,t,r)]})}o.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let l=(0,t9.forwardRef)(o);return l[iS]=e,l}class iA{constructor(e){this.isMounted=!1,this.node=e}update(){}}function iE(e,t,i){let n=e.getProps();return ty(n,t,void 0!==i?i:n.custom,e)}function iV(e,t){if(e?.inherit&&t){let{inherit:i,...n}=e;return{...t,...n}}return e}function iR(e,t){let i=e?.[t]??e?.default??e;return i!==e?iV(i,e):i}let iN=e=>Array.isArray(e);function iI(e,t){let i=e.getValue("willChange");if(G(i)&&i.add)return i.add(t);if(!i&&eT.WillChange){let i=new eT.WillChange("auto");e.addValue("willChange",i),i.add(t)}}let iL=(...e)=>e.reduce((e,t)=>i=>t(e(i)));function iD(e,t,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?e+(t-e)*6*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function iB(e,t){return i=>i>0?t:e}let iF=(e,t,i)=>{let n=e*e,s=i*(t*t-n)+n;return s<0?0:Math.sqrt(s)},iz=[v,g,C];function i_(e){let t=iz.find(t=>t.test(e));if(ee(`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let i=t.parse(e);return t===C&&(i=function({hue:e,saturation:t,lightness:i,alpha:n}){e/=360,i/=100;let s=0,r=0,a=0;if(t/=100){let n=i<.5?i*(1+t):i+t-i*t,o=2*i-n;s=iD(o,n,e+1/3),r=iD(o,n,e),a=iD(o,n,e-1/3)}else s=r=a=i;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*a),alpha:n}}(i)),i}let iO=(e,t)=>
401{let i=i_(e),n=i_(t);if(!i||!n)return iB(e,t);let s={...i};return e=>(s.red=iF(i.red,n.red,e),s.green=iF(i.green,n.green,e),s.blue=iF(i.blue,n.blue,e),s.alpha=tO(i.alpha,n.alpha,e),g.transform(s))},i$=new Set(["none","hidden"]);function iU(e,t){return i=>tO(e,t,i)}function iW(e){return"number"==typeof e?iU:"string"==typeof e?er(e)?iB:k.test(e)?iO:iG:Array.isArray(e)?iH:"object"==typeof e?k.test(e)?iO:iq:iB}function iH(e,t){let i=[...e],n=i.length,s=e.map((e,i)=>iW(e)(e,t[i]));return e=>{for(let t=0;t<n;t++)i[t]=s[t](e);return i}}function iq(e,t){let i={...e,...t},n={};for(let s in i)void 0!==e[s]&&void 0!==t[s]&&(n[s]=iW(e[s])(e[s],t[s]));return e=>{for(let t in n)i[t]=n[t](e);return i}}let iG=(e,t)=>{let i=N.createTransformer(t),n=V(e),s=V(t);if(!(n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length))return ee(`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),iB(e,t);if(i$.has(e)&&!s.values.length||i$.has(t)&&!n.values.length)return i$.has(e)?i=>i<=0?e:t:i=>i>=1?t:e;return iL(iH(function(e,t){let i=[],n={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){let r=t.types[s],a=e.indexes[r][n[r]],o=e.values[a]??0;i[s]=o,n[r]++}return i}(n,s),s.values),i)};function iY(e,t,i){return"number"==typeof e&&"number"==typeof t&&"number"==typeof i?tO(e,t,i):iW(e)(e,t)}let iX=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>eP.update(t,e),stop:()=>eM(t),now:()=>eA.isProcessing?eA.timestamp:tt.now()}};function iK(e){let t=0,i=e.next(t);for(;!i.done&&t<2e4;)t+=50,i=e.next(t);return t>=2e4?1/0:t}function iZ(e,t=100,i){let n=i({...e,keyframes:[0,t]}),s=Math.min(iK(n),2e4);return{type:"keyframes",ease:e=>n.next(s*e).value/t,duration:eU(s)}}e.s(["createGeneratorEasing",0,iZ],10875);let iQ=.01,iJ=2,i0=.005,i1=.5;function i2(e,t){return e*Math.sqrt(1-t*t)}let i5=["duration","bounce"],i3=["stiffness","damping","mass"];function i6(e,t){return t.some(t=>void 0!==e[t])}function i4(e=.3,t=.3){let i,n,s,r,o,l,u="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:h,restDelta:c}=u,d=u.keyframes[0],p=u.keyframes[u.keyframes.length-1],m={done:!1,value:d},{stiffness:f,damping:g,mass:v,duration:x,velocity:y,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!i6(e,i3)&&i6(e,i5))if(t.velocity=0,e.visualDuration){let i=2*Math.PI/(1.2*e.visualDuration),n=i*i,s=2*a(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:1,stiffness:n,damping:s}}else{let i=function({duration:e=800,bounce:t=.3,velocity:i=0,mass:n=1}){let s,r;ee(e$(10));let o=1-t;o=a(.05,1,o),e=a(.01,10,eU(e)),o<1?(s=t=>{let n=t*o,s=n*e;return .001-(n-i)/i2(t,o)*Math.exp(-s)},r=t=>{let n=t*o*e,r=Math.pow(o,2)*Math.pow(t,2)*e,a=Math.exp(-n),l=i2(Math.pow(t,2),o);return(n*i+i-r)*a*(-s(t)+.001>0?-1:1)/l}):(s=t=>-.001+Math.exp(-t*e)*((t-i)*e+1),r=t=>e*e*(i-t)*Math.exp(-t*e));let l=function(e,t,i){let n=i;for(let i=1;i<12;i++)n-=e(n)/t(n);return n}(s,r,5/e);if(e=e$(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(l,2)*n;return{stiffness:t,damping:2*o*Math.sqrt(n*t),duration:e}}}({...e,velocity:0});(t={...t,...i,mass:1}).isResolvedFromDuration=!0}return t}({...u,velocity:-eU(u.velocity||0)}),w=y||0,j=g/(2*Math.sqrt(f*v)),S=p-d,T=eU(Math.sqrt(f/v)),C=5>Math.abs(S);if(h||(h=C?iQ:iJ),c||(c=C?i0:i1),j<1)s=i2(T,j),r=(w+j*T*S)/s,i=e=>p-Math.exp(-j*T*e)*(r*Math.sin(s*e)+S*Math.cos(s*e)),o=j*T*r+S*s,l=j*T*S-r*s,n=e=>Math.exp(-j*T*e)*(o*Math.sin(s*e)+l*Math.cos(s*e));else if(1===j){i=e=>p-Math.exp(-T*e)*(S+(w+T*S)*e);let e=w+T*S;n=t=>Math.exp(-T*t)*(T*e*t-w)}else{let e=T*Math.sqrt(j*j-1);i=t=>{let i=Math.exp(-j*T*t),n=Math.min(e*t,300);return p-i*((w+j*T*S)*Math.sinh(n)+e*S*Math.cosh(n))/e};let t=(w+j*T*S)/e,s=j*T*t-S*e,r=j*T*S-t*e;n=t=>{let i=Math.exp(-j*T*t),n=Math.min(e*t,300);return i*(s*Math.sinh(n)+r*Math.cosh(n))}}let k={calculatedDuration:b&&x||null,velocity:e=>e$(n(e)),next:e=>{if(!b&&j<1){let t=Math.exp(-j*T*e),i=Math.sin(s*e),n=Math.cos(s*e),a=p-t*(r*i+S*n);
401return m.done=Math.abs(e$(t*(o*i+l*n)))<=h&&Math.abs(p-a)<=c,m.value=m.done?p:a,m}let t=i(e);return b?m.done=e>=x:m.done=Math.abs(e$(n(e)))<=h&&Math.abs(p-t)<=c,m.value=m.done?p:t,m},toString:()=>{let e=Math.min(iK(k),2e4),t=e5(t=>k.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return k}function i9(e,t,i){let n=Math.max(t-5,0);return ti(i-e(n),t-n)}function i7({keyframes:e,velocity:t=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:h}){let c,d,p=e[0],m={done:!1,value:p},f=i*t,g=p+f,v=void 0===a?g:a(g);v!==g&&(f=v-p);let x=e=>-f*Math.exp(-e/n),y=e=>v+x(e),b=e=>{let t=x(e),i=y(e);m.done=Math.abs(t)<=u,m.value=m.done?v:i},w=e=>{let t;if(t=m.value,void 0!==o&&t<o||void 0!==l&&t>l){var i;c=e,d=i4({keyframes:[m.value,(i=m.value,void 0===o?l:void 0===l||Math.abs(o-i)<Math.abs(l-i)?o:l)],velocity:i9(y,e,m.value),damping:s,stiffness:r,restDelta:u,restSpeed:h})}};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return(d||void 0!==c||(t=!0,b(e),w(e)),void 0!==c&&e>=c)?d.next(e-c):(t||b(e),m)}}}i4.applyToOptions=e=>{let t=iZ(e,100,i4);return e.ease=t.ease,e.duration=e$(t.duration),e.type="keyframes",e},e.s(["spring",0,i4],102710);let i8=(e,t,i)=>(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e;function ne(e,t,i,n){return e===t&&i===n?eS:s=>0===s||1===s?s:i8(function(e,t,i,n,s){let r,a,o=0;do(r=i8(a=t+(i-t)/2,n,s)-e)>0?i=a:t=a;while(Math.abs(r)>1e-7&&++o<12)return a}(s,0,1,e,i),t,n)}let nt=ne(.42,0,1,1),ni=ne(0,0,.58,1),nn=ne(.42,0,.58,1),ns=e=>Array.isArray(e)&&"number"!=typeof e[0];e.s(["isEasingArray",0,ns],577182);let nr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,na=e=>t=>1-e(1-t);e.s(["reverseEasing",0,na],991388);let no=ne(.33,1.53,.69,.99),nl=na(no),nu=nr(nl),nh=e=>e>=1?1:(e*=2)<1?.5*nl(e):.5*(2-Math.pow(2,-10*(e-1))),nc=e=>1-Math.sin(Math.acos(e)),nd=na(nc),np=nr(nc),nm={linear:eS,easeIn:nt,easeInOut:nn,easeOut:ni,circIn:nc,circInOut:np,circOut:nd,backIn:nl,backInOut:nu,backOut:no,anticipate:nh},nf=e=>{if(e1(e)){et(e.length);let[t,i,n,s]=e;return ne(t,i,n,s)}return"string"==typeof e?(et(nm[e],`Invalid easing type '${e}'`),nm[e]):e},ng=(e,t,i)=>{let n=t-e;return n?(i-e)/n:1};function nv(e,t){let i=e[e.length-1];for(let n=1;n<=t;n++){let s=ng(0,t,n);e.push(tO(i,1,s))}}function nx(e){let t=[0];return nv(t,e.length-1),t}function ny({duration:e=300,keyframes:t,times:i,ease:n="easeInOut"}){var s;let r=ns(n)?n.map(nf):nf(n),o={done:!1,value:t[0]},l=function(e,t,{clamp:i=!0,ease:n,mixer:s}={}){let r=e.length;if(et(t.length),1===r)return()=>t[0];if(2===r&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());let l=function(e,t,i){let n=[],s=i||eT.mix||iY,r=e.length-1;for(let i=0;i<r;i++){let r=s(e[i],e[i+1]);t&&(r=iL(Array.isArray(t)?t[i]||eS:t,r)),n.push(r)}return n}(t,n,s),u=l.length,h=i=>{if(o&&i<e[0])return t[0];let n=0;if(u>1)for(;n<e.length-2&&!(i<e[n+1]);n++);let s=ng(e[n],e[n+1],i);return l[n](s)};return i?t=>h(a(e[0],e[r-1],t)):h}((s=i&&i.length===t.length?i:nx(t),s.map(t=>t*e)),t,{ease:Array.isArray(r)?r:t.map(()=>r||nn).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}e.s(["progress",0,ng],470934),e.s(["fillOffset",0,nv],302461),e.s(["defaultOffset",0,nx],973626);let nb={decay:i7,inertia:i7,tween:ny,keyframes:ny,spring:i4};function nw(e){"string"==typeof e.type&&(e.type=nb[e.type])}let nj=e=>e/100;class nS extends e0{constructor(e){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=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==tt.now()&&this.tick(tt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;nw(e);let{type:t=ny,repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:r=0}=e,{keyframes:a}=e,o=t||ny;o!==ny&&"number"!=typeof a[0]&&(this.mixKeyframes=iL(nj,iY(a[0],a[1])),a=[0,100]);let l=o({...e,keyframes:a});"mirror"===s&&(this.mirroredGenerator=o({...e,keyframes:[...a].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=iK(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let i,{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:u}=this;if(null===this.startTime)return n.next(0);
401let{delay:h=0,keyframes:c,repeat:d,repeatType:p,repeatDelay:m,type:f,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let x=this.currentTime-h*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?x<0:x>s;this.currentTime=Math.max(x,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let b=this.currentTime,w=n;if(d){let e=Math.min(this.currentTime,s)/l,t=Math.floor(e),i=e%1;!i&&e>=1&&(i=1),1===i&&t--,(t=Math.min(t,d+1))%2&&("reverse"===p?(i=1-i,m&&(i-=m/l)):"mirror"===p&&(w=o)),b=a(0,1,i)*l}y?(this.delayState.value=c[0],i=this.delayState):i=w.next(b),r&&!y&&(i.value=r(i.value));let{done:j}=i;y||null===u||(j=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);let S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&j);return S&&f!==i7&&(i.value=eJ(c,this.options,v,this.speed)),g&&g(i.value),S&&this.finish(),i}then(e,t){return this.finished.then(e,t)}get duration(){return eU(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+eU(e)}get time(){return eU(this.currentTime)}set time(e){e=e$(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return i9(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(tt.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=eU(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=iX,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=t??i),"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(tt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}let nT={anticipate:nh,backInOut:nu,circInOut:np};class nC extends e9{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in nT&&(e.ease=nT[e.ease])}(e),nw(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:i,onComplete:n,element:s,...r}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let o=new nS({...r,autoplay:!1}),l=Math.max(10,tt.now()-this.startTime),u=a(0,10,l-10),h=o.sample(l).value,{name:c}=this.options;s&&c&&eG(s,c,h),t.setWithVelocity(o.sample(Math.max(0,l-u)).value,h,u),o.stop()}}let nk=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(N.test(e)||"0"===e)&&!e.startsWith("url("));function nP(e){e.duration=0,e.type="keyframes"}let nM=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,nA=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),nE=eY(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));
401class nV extends e0{constructor({autoplay:e=!0,delay:t=0,type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r="loop",keyframes:a,name:o,motionValue:l,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tt.now();const c={autoplay:e,delay:t,type:i,repeat:n,repeatDelay:s,repeatType:r,name:o,motionValue:l,element:u,...h},d=u?.KeyframeResolver||eB;this.keyframeResolver=new d(a,(e,t,i)=>this.onKeyframesResolved(e,t,c,!i),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,i,n){let s;this.keyframeResolver=void 0;let{name:r,type:a,velocity:o,delay:l,isHandoff:u,onUpdate:h}=i;this.resolvedAt=tt.now();let c=!0;!function(e,t,i,n){let s=e[0];if(null===s)return!1;if("display"===t||"visibility"===t)return!0;let r=e[e.length-1],a=nk(s,t),o=nk(r,t);return ee(`You are trying to animate ${t} from "${s}" to "${r}". "${a?r:s}" is not an animatable value.`),!!a&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let i=0;i<e.length;i++)if(e[i]!==t)return!0}(e)||("spring"===i||e4(i))&&n)}(e,r,a,o)&&(c=!1,(eT.instantAnimations||!l)&&h?.(eJ(e,i,t)),e[0]=e[e.length-1],nP(i),i.repeat=0);let d={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...i,keyframes:e},p=c&&!u&&function(e){let{motionValue:t,name:i,repeatDelay:n,repeatType:s,damping:r,type:a,keyframes:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return nE()&&i&&(e7.has(i)||nA.has(i)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&nM.test(e[t]))return!0;return!1}(o))&&("transform"!==i||!u)&&!l&&!n&&"mirror"!==s&&0!==r&&"inertia"!==a}(d),m=d.motionValue?.owner?.current;if(p)try{s=new nC({...d,element:m})}catch{s=new nS(d)}else s=new nS(d);s.finished.then(()=>{this.notifyFinished()}).catch(eS),this.pendingTimeline&&(this.stopTimeline=s.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=s}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),eI=!0,eD(),eL(),eI=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let nR={type:"spring",stiffness:500,damping:25,restSpeed:10},nN={type:"keyframes",duration:.8},nI={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nL=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),nD=(e,t,i,n={},s,a)=>o=>{let l=iR(n,e)||{},u=l.delay||n.delay||0,{elapsed:h=0}=n;h-=e$(u);let c={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-h,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:s};!function(e){for(let t in e)if(!nL.has(t))return!0;return!1}(l)&&Object.assign(c,((e,{keyframes:t})=>t.length>2?nN:r.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:nR:nI)(e,c)),c.duration&&(c.duration=e$(c.duration)),c.repeatDelay&&(c.repeatDelay=e$(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(nP(c),0===c.delay&&(d=!0)),(eT.instantAnimations||eT.skipAnimations||s?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,nP(c),c.delay=0),c.allowFlatten=!l.type&&!l.ease,d&&!a&&void 0!==t.get()){let e=eJ(c.keyframes,l);if(void 0!==e)return void eP.update(()=>{c.onUpdate(e),c.onComplete()})}return l.isSync?new nS(c):new nV(c)};function nB(e,t,{delay:i=0,transitionOverride:n,type:s}={}){let{transition:r,transitionEnd:a,...o}=t,l=e.getDefaultTransition();r=r?iV(r,l):l;let u=r?.reduceMotion,h=r?.skipAnimations;n&&(r=n);let c=[],d=s&&e.animationState&&e.animationState.getState()[s],p=r?.path;for(let t in p&&p.animateVisualElement(e,o,r,i,c),o){let n=e.getValue(t,e.latestValues[t]??null),s=o[t];if(void 0===s||d&&function({protectedKeys:e,needsAnimating:t},i){let n=e.hasOwnProperty(i)&&!0!==t[i];return t[i]=!1,n}(d,t))continue;let a={delay:i,...iR(r||{},t)};h&&(a.skipAnimations=!0);let l=n.get();if(void 0!==l&&!n.isAnimating()&&!Array.isArray(s)&&s===l&&!a.velocity){eP.update(()=>n.set(s));continue}let p=!1;if(window.MotionHandoffAnimation){let i=e.props[iT];if(i){let e=window.MotionHandoffAnimation(i,t,eP);null!==e&&(a.startTime=e,p=!0)}}iI(e,t);let m=u??e.shouldReduceMotion;
401n.start(nD(t,n,s,m&&Y.has(t)?{type:!1}:a,e,p));let f=n.animation;f&&c.push(f)}if(a){let t=()=>eP.update(()=>{a&&function(e,t){let{transitionEnd:i={},transition:n={},...s}=iE(e,t)||{};for(let t in s={...s,...i}){var r;let i=iN(r=s[t])?r[r.length-1]||0:r;e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,tr(i))}}(e,a)});c.length?Promise.all(c).then(t):t()}return c}function nF(e,t,i,n=0,s=1){let r=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,o=(a-1)*n;return"function"==typeof i?i(r,a):1===s?r*n:o-r*n}function nz(e,t,i={}){let n=iE(e,t,"exit"===i.type?e.presenceContext?.custom:void 0),{transition:s=e.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(s=i.transitionOverride);let r=n?()=>Promise.all(nB(e,n,i)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(n=0)=>{let{delayChildren:r=0,staggerChildren:a,staggerDirection:o}=s;return function(e,t,i=0,n=0,s=0,r=1,a){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(nz(l,t,{...a,delay:i+("function"==typeof n?0:n)+nF(e.variantChildren,l,n,s,r)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,n,r,a,o,i)}:()=>Promise.resolve(),{when:o}=s;if(!o)return Promise.all([r(),a(i.delay)]);{let[e,t]="beforeChildren"===o?[r,a]:[a,r];return e().then(()=>t())}}e.s(["animateTarget",0,nB],530754);let n_=tc.length;function nO(e,t){if(!Array.isArray(t))return!1;let i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}let n$=[...th].reverse(),nU=th.length;function nW(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nH(){return{animate:nW(!0),whileInView:nW(),whileHover:nW(),whileTap:nW(),whileDrag:nW(),whileFocus:nW(),exit:nW()}}let nq=0;function nG(e){return[e("x"),e("y")]}function nY(e,t,i,n={passive:!0}){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}let nX={x:!1,y:!1};function nK(e){return e.max-e.min}function nZ(e,t,i,n=.5){e.origin=n,e.originPoint=tO(t.min,t.max,e.origin),e.scale=nK(i)/nK(t),e.translate=tO(i.min,i.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function nQ(e,t,i,n){nZ(e.x,t.x,i.x,n?n.originX:void 0),nZ(e.y,t.y,i.y,n?n.originY:void 0)}function nJ(e,t,i,n=0){e.min=(n?tO(i.min,i.max,n):i.min)+t.min,e.max=e.min+nK(t)}function n0(e,t,i,n=0){let s=n?tO(i.min,i.max,n):i.min;e.min=t.min-s,e.max=e.min+nK(t)}function n1(e,t,i,n){n0(e.x,t.x,i.x,n?.x),n0(e.y,t.y,i.y,n?.y)}let n2=e=>"object"==typeof e&&null!==e;function n5(e){return n2(e)&&"ownerSVGElement"in e}function n3(e,t,i){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let n=document;t&&(n=t.current);let s=i?.[e]??n.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(e=>null!=e)}e.s(["isSVGElement",0,n5],256650),e.s(["resolveElements",0,n3],513038);let n6=new WeakMap,n4=(e,t,i)=>(n,s)=>s&&s[0]?s[0][e+"Size"]:n5(n)&&"getBBox"in n?n.getBBox()[t]:n[i],n9=n4("inline","width","offsetWidth"),n7=n4("block","height","offsetHeight");function n8({target:e,borderBoxSize:t}){n6.get(e)?.forEach(i=>{i(e,{get width(){return n9(e,t)},get height(){return n7(e,t)}})})}function se(e){e.forEach(n8)}let st=new Set;function si(e,t){let s;return"function"==typeof e?(st.add(e),n||(n=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};st.forEach(t=>t(e))},window.addEventListener("resize",n)),()=>{st.delete(e),st.size||"function"!=typeof n||(window.removeEventListener("resize",n),n=void 0)}):(!i&&"u">typeof ResizeObserver&&(i=new ResizeObserver(se)),(s=n3(e)).forEach(e=>{let n=n6.get(e);n||(n=new Set,n6.set(e,n)),n.add(t),i?.observe(e)}),()=>{s.forEach(e=>{let n=n6.get(e);n?.delete(t),n?.size||i?.unobserve(e)})})}let sn=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),ss=new Set(["INPUT","SELECT","TEXTAREA"]),sr=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function sa(e){return{point:{x:e.pageX,y:e.pageY}}}function so(e,t,i,n){return nY(e,t,e=>sr(e)&&i(e,sa(e)),n)}let sl=({current:e})=>
401e?e.ownerDocument.defaultView:null,su=(e,t)=>Math.abs(e-t),sh=new Set(["auto","scroll"]);class sc{constructor(e,t,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:s=!1,distanceThreshold:r=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=sd(this.lastRawMoveEventInfo,this.transformPagePoint));let i=sm(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,s=(e=i.offset,t={x:0,y:0},Math.sqrt(su(e.x,t.x)**2+su(e.y,t.y)**2)>=this.distanceThreshold);if(!n&&!s)return;let{point:r}=i,{timestamp:a}=eA;this.history.push({...r,timestamp:a});let{onStart:o,onMove:l}=this.handlers;n||(o&&o(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=sd(t,this.transformPagePoint),eP.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:s}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&s&&s(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=sm("pointercancel"===e.type?this.lastMoveEventInfo:sd(t,this.transformPagePoint),this.history);this.startEvent&&i&&i(e,r),n&&n(e,r)},!sr(e))return;this.dragSnapToOrigin=s,this.handlers=t,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=n||window;const o=sd(sa(e),this.transformPagePoint),{point:l}=o,{timestamp:u}=eA;this.history=[{...l,timestamp:u}];const{onSessionStart:h}=t;h&&h(e,sm(o,this.history));const c={passive:!0,capture:!0};this.removeListeners=iL(so(this.contextWindow,"pointermove",this.handlePointerMove,c),so(this.contextWindow,"pointerup",this.handlePointerUp,c),so(this.contextWindow,"pointercancel",this.handlePointerUp,c)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(sh.has(e.overflowX)||sh.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let i=e===window,n=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:n.x-t.x,y:n.y-t.y};(0!==s.x||0!==s.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,n),eP.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),eM(this.updatePoint)}}function sd(e,t){return t?{point:t(e.point)}:e}function sp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sm({point:e},t){return{point:e,delta:sp(e,sf(t)),offset:sp(e,t[0]),velocity:function(e){if(e.length<2)return{x:0,y:0};let t=e.length-1,i=null,n=sf(e);for(;t>=0&&(i=e[t],!(n.timestamp-i.timestamp>e$(.1)));)t--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&n.timestamp-i.timestamp>2*e$(.1)&&(i=e[1]);let s=eU(n.timestamp-i.timestamp);if(0===s)return{x:0,y:0};let r={x:(n.x-i.x)/s,y:(n.y-i.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}(t)}}function sf(e){return e[e.length-1]}function sg(e,t,i){return{min:void 0!==t?e.min+t:void 0,max:void 0!==i?e.max+i-(e.max-e.min):void 0}}function sv(e,t){let i=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,n]=[n,i]),{min:i,max:n}}function sx(e,t,i){return{min:sy(e,t),max:sy(e,i)}}function sy(e,t){return"number"==typeof e?e:e[t]||0}let sb=new WeakMap;class sw{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=q(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:i}={}){let{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;let s=e=>{t&&this.snapToCursor(sa(e).point),this.stopAnimation()},r=(e,t)=>{let{drag:i,dragPropagation:n,onDragStart:s}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"
401y"===e)if(nX[e])return null;else return nX[e]=!0,()=>{nX[e]=!1};return nX.x||nX.y?null:(nX.x=nX.y=!0,()=>{nX.x=nX.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nG(e=>{let t=this.getAxisMotionValue(e).get()||0;if(b.test(t)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[e];n&&(t=nK(n)*(parseFloat(t)/100))}}this.originPoint[e]=t}),s&&eP.update(()=>s(e,t),!1,!0),iI(this.visualElement,"transform");let{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:s,onDrag:r}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:a}=t;if(n&&null===this.currentDirection){this.currentDirection=function(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}(a),null!==this.currentDirection&&s&&s(this.currentDirection);return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),r&&eP.update(()=>r(e,t),!1,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new sc(e,{onSessionStart:s,onStart:r,onMove:a,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:sl(this.visualElement),element:this.visualElement.current})}stop(e,t){let i=e||this.latestPointerEvent,n=t||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!n||!i)return;let{velocity:r}=n;this.startAnimation(r);let{onDragEnd:a}=this.getProps();a&&eP.postRender(()=>a(i,n))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,i){let{drag:n}=this.getProps();if(!i||!sS(e,n,this.currentDirection))return;let s=this.getAxisMotionValue(e),r=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(r=function(e,{min:t,max:i},n){return void 0!==t&&e<t?e=n?tO(t,e,n.min):Math.max(e,t):void 0!==i&&e>i&&(e=n?tO(i,e,n.max):Math.min(e,i)),e}(r,this.constraints[e],this.elastic[e])),s.set(r)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&ik(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=function(e,{top:t,left:i,bottom:n,right:s}){return{x:sg(e.x,i,s),y:sg(e.y,t,n)}}(i.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:sx(e,"left","right"),y:sx(e,"top","bottom")}}(t),n!==this.constraints&&!ik(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&nG(e=>{var t,n;let s;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=i.layoutBox[e],n=this.constraints[e],s={},void 0!==n.min&&(s.min=n.min-t.min),void 0!==n.max&&(s.max=n.max-t.min),s))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!ik(t))return!1;let n=t.current;et();let{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());let r=function(e,t,i){let n=t6(e,i),{scroll:s}=t;return s&&(t1(n.x,s.offset.x),t1(n.y,s.offset.y)),n}(n,s.root,this.visualElement.getTransformPagePoint()),a=(e=s.layout.layoutBox,{x:sv(e.x,r.x),y:sv(e.y,r.y)});if(i){let e=i(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=tG(e))}return a}startAnimation(e){let{drag:t,dragMomentum:i,dragElastic:n,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),o=this.constraints||{};return Promise.all(nG(a=>{if(!sS(a,t,this.currentDirection))return;let l=o&&o[a]||{};(!0===r||r===a)&&(l={min:0,max:0});let u={type:"inertia",velocity:i?e[a]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(a,u)})).then(a)}startAxisValueAnimation(e,t){let i=this.getAxisMotionValue(e);return iI(this.visualElement,e),i.start(nD(e,i,0,t,this.visualElement,!1))}stopAnimation(){nG(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){nG(t=>{let{drag:i}=this.getProps();if(!sS(t,i,this.currentDirection))return;let{projection:n}=this.visualElement,s=this.getAxisMotionValue(t);if(n&&n.layout){let{min:i,max:r}=n.layout.layoutBox[t],a=s.get()||0;s.set(e[t]-tO(i,r,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!ik(t)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};nG(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var i,s;let r,o,l,u=t.get();n[e]=(i={min:u,max:u},s=this.constraints[e],r=.5,o=nK(i),(l=nK(s))>o?r=ng(s.min,s.max-o,i.min):o>l&&(r=ng(i.min,i.max-l,s.min)),a(0,1,r))}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),nG(t=>{if(!sS(t,e,null))return;let i=this.getAxisMotionValue(t),{min:s,max:r}=this.constraints[t];i.set(tO(s,r,n[t]))}),this.visualElement.render()}addListeners(){let e;if(!this.visualElement.current)return;sb.set(this.visualElement,this);let t=this.visualElement.current,i=so(t,"pointerdown",e=>{let{drag:i,dragListener:n=!0}
401=this.getProps(),s=e.target,r=s!==t&&(ss.has(s.tagName)||!0===s.isContentEditable);i&&n&&!r&&this.start(e)}),n=()=>{var i,n,s;let r,a,{dragConstraints:o}=this.getProps();ik(o)&&o.current&&(this.constraints=this.resolveRefConstraints(),e||(i=t,n=o.current,r=si(i,sj(s=()=>this.scalePositionWithinConstraints())),a=si(n,sj(s)),e=()=>{r(),a()}))},{projection:s}=this.visualElement,r=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),eP.read(n);let a=nY(window,"resize",()=>this.scalePositionWithinConstraints()),o=s.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(nG(t=>{let i=this.getAxisMotionValue(t);i&&(this.originPoint[t]+=e[t].translate,i.set(i.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),i(),r(),o&&o(),e&&e()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:s=!1,dragElastic:r=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:n,dragConstraints:s,dragElastic:r,dragMomentum:a}}}function sj(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function sS(e,t,i){return(!0===t||t===e)&&(null===i||i===e)}let sT=e=>(t,i)=>{e&&eP.update(()=>e(t,i),!1,!0)},sC={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var sk=t9;function sP(e=!0){let t=(0,t9.useContext)(im);if(null===t)return[!0,null];let{isPresent:i,onExitComplete:n,register:s}=t,r=(0,t9.useId)();(0,t9.useEffect)(()=>{if(e)return s(r)},[e]);let a=(0,t9.useCallback)(()=>e&&n&&n(r),[r,n,e]);return!i&&n?[!1,a]:[!0]}let sM=!1;class sA extends sk.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:n}=this.props,{projection:s}=e;s&&(t.group&&t.group.add(s),i&&i.register&&n&&i.register(s),sM&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sC.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:i,drag:n,isPresent:s}=this.props,{projection:r}=i;return r&&(r.isPresent=s,e.layoutDependency!==t&&r.setOptions({...r.options,layoutDependency:t}),sM=!0,n||e.layoutDependency!==t||void 0===t||e.isPresent!==s?r.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?r.promote():r.relegate()||eP.postRender(()=>{let e=r.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:i}=e;i&&(i.options.layoutAnchor=t,i.root.didUpdate(),e8.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:n}=e;sM=!0,n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function sE(e){let[t,i]=sP(),n=(0,sk.useContext)(it);return(0,ie.jsx)(sA,{...e,layoutGroup:n,switchLayoutGroup:(0,sk.useContext)(iC),isPresent:t,safeToRemove:i})}function sV(e,t,i){let n=G(e)?e:tr(e);return n.start(nD("",n,t,i)),n.animation}e.s(["animateSingleValue",0,sV],754497);function sR(e){return n5(e)&&"svg"===e.tagName}e.s(["isSVGSVGElement",0,sR],570615);let sN=tF.length,sI=e=>"string"==typeof e?parseFloat(e):e,sL=e=>"number"==typeof e||w.test(e);function sD(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let sB=sz(0,.5,nd),sF=sz(.5,.95,eS);function sz(e,t,i){return n=>n<e?0:n>t?1:i(ng(e,t,n))}function s_(e,t){e.min=t.min,e.max=t.max}function sO(e,t){s_(e.x,t.x),s_(e.y,t.y)}function s$(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sU(e,t,i,n,s){return e-=t,e=n+1/i*(e-n),void 0!==s&&(e=n+1/s*(e-n)),e}function sW(e,t,[i,n,s],r,a){!function(e,t=0,i=1,n=.5,s,r=e,a=e){if(b.test(t)&&(t=parseFloat(t),t=tO(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let o=tO(r.min,r.max,n);e===r&&(o-=t),e.min=sU(e.min,t,i,o,s),e.max=sU(e.max,t,i,o,s)}(e,t[i],t[n],t[s],t.scale,r,a)}let sH=["x","scaleX","originX"],sq=["y","scaleY","originY"];function sG(e,t,i,n){sW(e.x,t,sH,i?i.x:void 0,n?n.x:void 0),sW(e.y,t,sq,i?i.y:void 0,n?n.y:void 0)}function sY(e){return 0===e.translate&&1===e.scale}function sX(e){return sY(e.x)&&sY(e.y)}function sK(e,t){return e.min===t.min&&e.max===t.max}function sZ(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function sQ(e,t){return sZ(e.x,t.x)&&sZ(e.y,t.y)}function sJ(e){return nK(e.x)/nK(e.y)}function s0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class s1{constructor(){this.members=[]}add(e){eW(this.members,e);for(let t=this.members.length-1;t>=0;t--){let i=this.members[t];if(i===e||i===this.lead||i===this.prevLead)continue;let n=i.instance;n&&!1!==n.isConnected||i.snapshot||(eH(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(eH(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();let{layoutDependency:n}=i.options,{layoutDependency:s}=e.options;(void 0===n||n!==s)&&(e.resumeFrom=i,t&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isU
401pdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let s2=(e,t)=>e.depth-t.depth;class s5{constructor(){this.children=[],this.isDirty=!1}add(e){eW(this.children,e),this.isDirty=!0}remove(e){eH(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(s2),this.isDirty=!1,this.children.forEach(e)}}let s3=["","X","Y","Z"],s6=0;function s4(e,t,i,n){let{latestValues:s}=t;s[e]&&(i[e]=s[e],t.setStaticValue(e,0),n&&(n[e]=0))}function s9({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(e={},i=t?.()){this.id=s6++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(re),this.nodes.forEach(ru),this.nodes.forEach(rh),this.nodes.forEach(rt)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new s5)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new eq),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let i=this.eventHandlers.get(e);i&&i.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=n5(t)&&!sR(t),this.instance=t;let{layoutId:i,layout:n,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(n||i)&&(this.isLayoutDirty=!0),e){let i,n=0,s=()=>this.root.updateBlockedByResize=!1;eP.read(()=>{n=window.innerWidth}),e(t,()=>{let e=window.innerWidth;if(e!==n){let t,r;n=e,this.root.updateBlockedByResize=!0,i&&i(),t=tt.now(),r=({timestamp:e})=>{let i=e-t;i>=250&&(eM(r),s())},eP.setup(r,!0),i=()=>eM(r),sC.hasAnimatedSinceResize&&(sC.hasAnimatedSinceResize=!1,this.nodes.forEach(rl))}})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||n)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||s.getDefaultTransition()||rg,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=s.getProps(),l=!this.targetLayout||!sQ(this.targetLayout,n),u=!t&&i;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...iR(r,"layout"),onPlay:a,onComplete:o};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u,t.path)}else t||rl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),eM(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.forEac
401h(rc),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:i}=t.options;if(!i)return;let n=i.props[iT];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",eP,!(e||i))}let{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&e(s)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:i}=this.options;if(void 0===t&&!i)return;let n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(rs),this.nodes.forEach(rn);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(rr);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ra),this.nodes.forEach(ro),this.nodes.forEach(s7),this.nodes.forEach(s8)):this.nodes.forEach(rr),this.clearAllSnapshots();let e=tt.now();eA.delta=a(0,1e3/60,e-eA.timestamp),eA.timestamp=e,eA.isProcessing=!0,eE.update.process(eA),eE.preRender.process(eA),eE.render.process(eA),eA.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,e8.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ri),this.sharedNodes.forEach(rd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,eP.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){eP.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||nK(this.snapshot.measuredBox.x)||nK(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=q()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!s)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!sX(this.projectionDelta),i=this.getTransformTemplate(),n=i?i(this.latestValues,""):void 0,r=n!==this.prevTransformTemplateValue;e&&this.instance&&(t||tK(this.latestValues)||r)&&(s(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let i=this.measurePageBox(),n=this.removeElementScroll(i);return e&&(n=this.removeTransform(n)),ry((t=n).x),ry(t.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return q();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(rw))){let{scroll:e}=this.root;e&&(t1(t.x,e.offset.x),t1(t.y,e.offset.y))}return t}removeElementScroll(e){let t=q();if(sO(t,e),this.scroll?.wasRoot)return t;for(let i=0;i<this.path.length;i++){let n=this.path[i],{scroll:s,options:r}=n;n!==this.root&&s&&r.layoutScroll&&(s.wasRoot&&sO(t,e),t1(t.x,s.offset.x),t1(t.y,s.offset.y))}return t}applyTransform(e,t=!1,i){let n=i||q();sO(n,e);for(let e=0;e<this.path.length;e++){let i=this.path[e];!t&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(t1(n.x,-i.scroll.offset.x),t1(n.y,-i.scroll.offset.y)),tK(i.latestValues)&&t3(n,i.latestValues,i.layout?.layoutBox)}return tK(this.latestValues)&&t3(n,this.latestValues,this.layout?.layoutBox),n}removeTransform(e){let t=q();sO(t,e);for(let e=0;e<this.path.length;e++){let i,n=this.path[e];tK(n.latestValues)&&(n.instance&&(tX(n.latestValues)&&n.updateSnapshot(),sO(i=q(),n.measurePageBox())),sG(t,n.latestValues,n.snapshot?.layoutBox,i))}return tK(this.latestValues)&&sG(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==eA.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
401isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let i=!!this.resumingFrom||this!==t;if(!(e||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:n,layoutId:s}=this.options;if(!this.layout||!(n||s))return;this.resolvedRelativeTargetAt=eA.timestamp;let r=this.getClosestProjectingParent();if(r&&this.linkedParentVersion!==r.layoutVersion&&!r.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&r&&r.layout?this.createRelativeTarget(r,this.layout.layoutBox,r.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=q(),this.targetWithTransforms=q()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var a,o,l,u;this.forceRelativeParentToResolveTarget(),a=this.target,o=this.relativeTarget,l=this.relativeParent.target,u=this.options.layoutAnchor||void 0,nJ(a.x,o.x,l.x,u?.x),nJ(a.y,o.y,l.y,u?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):sO(this.target,this.layout.layoutBox),t0(this.target,this.targetDelta)):sO(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&r&&!!r.resumingFrom==!!this.resumingFrom&&!r.options.layoutScroll&&r.target&&1!==this.animationProgress?this.createRelativeTarget(r,this.target,r.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||tX(this.parent.latestValues)||tZ(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,i){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=q(),this.relativeTargetOrigin=q(),n1(this.relativeTargetOrigin,t,i,this.options.layoutAnchor||void 0),sO(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===eA.timestamp&&(i=!1),i)return;let{layout:n,layoutId:s}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(n||s))return;sO(this.layoutCorrected,this.layout.layoutBox);let r=this.treeScale.x,a=this.treeScale.y;!function(e,t,i,n=!1){let s,r,a=i.length;if(a){t.x=t.y=1;for(let o=0;o<a;o++){r=(s=i[o]).projectionDelta;let{visualElement:a}=s.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(n&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(t1(e.x,-s.scroll.offset.x),t1(e.y,-s.scroll.offset.y)),r&&(t.x*=r.x.scale,t.y*=r.y.scale,t0(e,r)),n&&tK(s.latestValues)&&t3(e,s.latestValues,s.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=q());let{target:o}=e;if(!o){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(s$(this.prevProjectionDelta.x,this.projectionDelta.x),s$(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),nQ(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&s0(this.projectionDelta.x,this.prevProjectionDelta.x)&&s0(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=W(),this.projectionDelta=W(),this.projectionDeltaWithTransform=W()}setAnimationOrigin(e,t=!1,i){let n,s=this.snapshot,r=s?s.latestValues:{},a={...this.latestValues},o=W();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let l=q(),u=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),c=!h||h.members.length<=1,d=!!(u&&!c&&!0===this.options.crossfade&&!this.path.some(rf));this.animationProgress=0;let p=i?.interpolateProjection(e);this.mixTargetDelta=t=>{let i=t/1e3,s=p?.(i);if(s?(o.x.translate=s.x,o.x.scale=tO(e.x.scale,1,i),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=s.y,o.y.scale=tO(e.y.scale,1,i),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(rp(o.x,e.x,i),rp(o.y,e.y,i)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,m,f,g,v,x;n1(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),f=this.relativeTarget,g=this.relativeTargetOrigin,v=l,x=i,rm(f.x,g.x,v.x,x),rm(f.y,g.y,v.y,x),n&&(h=this.relativeTarget,m=n,sK(h.x,m.x)&&sK(h.y,m.y))&&(this.isProjectionDirty=!1),n||(n=q()),sO(n,this.relativeTarget)}u&&(this.animationValues=a,function(e,t,i,n,s,r){s?(e.opacity=tO(0,i.opacity??1,sB(n)),e.opacityExit=tO(t.opacity??1,0,sF(n))):r&&(e.opacity=tO(t.opacity??1,i.opacity??1,n));for(let s=0;s<sN;s++){let r=tF[s],a=sD(t,r),o=sD(i,r);(void 0!==a||void 0!==o)&&(a||(a=0),o||(o=0),0===a||0===o||sL(a)===sL(o)?(e[r]=Math.max(tO(sI(a),sI(o),n),0),(b.test(o)||b.test(a))&&(e[r]+="%")):e[r]=o)}(t.rotate||i.rotate)&&(e.rotate=tO(t.rotate||0,i.rotate||0,n))}(a,r,this.latestValues,i,d,c)),s&&void 0!==s.rotate&&(this.animationValues||(this.animationValues=a),this.animationValues.pathRotation=s.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(eM(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=eP.update(()=>{sC.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=tr(0)),this.motionValue.jump(0,!1),this.currentAnimation=sV(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:i,layout:n,latestValues:s}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&rb(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||q();let t=nK(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=nK(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}sO(t,i),t3(t,s),nQ(this.projectionDeltaWithTransform,this.layoutCorrected,t,s)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new s1),this.sharedNodes.get(e).add(t);let i=t.options.initialPromotionConfig;t.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;
401return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:i}=e;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(t=!0),!t)return;let n={};i.z&&s4("z",e,n,this.animationValues);for(let t=0;t<s3.length;t++)s4(`rotate${s3[t]}`,e,n,this.animationValues),s4(`skew${s3[t]}`,e,n,this.animationValues);for(let t in e.render(),n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let i=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=ip(t?.pointerEvents)||"",e.transform=i?i(this.latestValues,""):"none";return}let n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ip(t?.pointerEvents)||""),this.hasProjected&&!tK(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1);return}e.visibility="";let s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let r=function(e,t,i){let n="",s=e.x.translate/t.x,r=e.y.translate/t.y,a=i?.z||0;if((s||r||a)&&(n=`translate3d(${s}px, ${r}px, ${a}px) `),(1!==t.x||1!==t.y)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),i){let{transformPerspective:e,rotate:t,pathRotation:s,rotateX:r,rotateY:a,skewX:o,skewY:l}=i;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),s&&(n+=`rotate(${s}deg) `),r&&(n+=`rotateX(${r}deg) `),a&&(n+=`rotateY(${a}deg) `),o&&(n+=`skewX(${o}deg) `),l&&(n+=`skewY(${l}deg) `)}let o=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==o||1!==l)&&(n+=`scale(${o}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,s);i&&(r=i(s,r)),e.transform=r;let{x:a,y:o}=this.projectionDelta;for(let t in e.transformOrigin=`${100*a.origin}% ${100*o.origin}% 0`,n.animationValues?e.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0,t$){if(void 0===s[t])continue;let{correct:i,applyTo:a,isCSSVariable:o}=t$[t],l="none"===r?s[t]:i(s[t],n);if(a){let t=a.length;for(let i=0;i<t;i++)e[a[i]]=l}else o?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=n===this?ip(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(rn),this.root.sharedNodes.clear()}}}function s7(e){e.updateLayout()}function s8(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:n}=e.layout,{animationType:s}=e.options,r=t.source!==e.layout.source;if("size"===s)nG(e=>{let n=r?t.measuredBox[e]:t.layoutBox[e],s=nK(n);n.min=i[e].min,n.max=n.min+s});else if("x"===s||"y"===s){let e="x"===s?"y":"x";s_(r?t.measuredBox[e]:t.layoutBox[e],i[e])}else rb(s,t.layoutBox,i)&&nG(n=>{let s=r?t.measuredBox[n]:t.layoutBox[n],a=nK(i[n]);s.max=s.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+a)});let a=W();nQ(a,i,t.layoutBox);let o=W();r?nQ(o,e.applyTransform(n,!0),t.measuredBox):nQ(o,i,t.layoutBox);let l=!sX(a),u=!1;if(!e.resumeFrom){let n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:s,layout:r}=n;if(s&&r){let a=e.options.layoutAnchor||void 0,o=q();n1(o,t.layoutBox,s.layoutBox,a);let l=q();n1(l,i,r.layoutBox,a),sQ(o,l)||(u=!0),n.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=o,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:o,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function re(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function rt(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ri(e){e.clearSnapshot()}function rn(e){e.clearMeasurements()}function rs(e){e.isLayoutDirty=!0,e.updateLayout()}function rr(e){e.isLayoutDirty=!1}function ra(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function ro(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function rl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ru(e){e.resolveTargetDelta()}function rh(e){e.calcProjection()}
401function rc(e){e.resetSkewAndRotation()}function rd(e){e.removeLeadSnapshot()}function rp(e,t,i){e.translate=tO(t.translate,0,i),e.scale=tO(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function rm(e,t,i,n){e.min=tO(t.min,i.min,n),e.max=tO(t.max,i.max,n)}function rf(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let rg={duration:.45,ease:[.4,0,.1,1]},rv=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rx=rv("applewebkit/")&&!rv("chrome/")?Math.round:eS;function ry(e){e.min=rx(e.min),e.max=rx(e.max)}function rb(e,t,i){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(sJ(t)-sJ(i)))}function rw(e){return e!==e.root&&e.scroll?.wasRoot}let rj=s9({attachResizeListener:(e,t)=>nY(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),rS={current:void 0},rT=s9({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rS.current){let e=new rj({});e.mount(window),e.setOptions({layoutScroll:!0}),rS.current=e}return rS.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function rC(e,t){let i=n3(e),n=new AbortController;return[i,{passive:!0,...t,signal:n.signal},()=>n.abort()]}function rk(e,t,i){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover","Start"===i);let s=n["onHover"+i];s&&eP.postRender(()=>s(t,sa(t)))}function rP(e){return n2(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}let rM=(e,t)=>!!t&&(e===t||rM(e,t.parentElement)),rA=new WeakSet;function rE(e){return t=>{"Enter"===t.key&&e(t)}}function rV(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function rR(e){return sr(e)&&!(nX.x||nX.y)}let rN=new WeakSet;function rI(e,t,i){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap","Start"===i);let s=n["onTap"+("End"===i?"":i)];s&&eP.postRender(()=>s(t,sa(t)))}let rL=new WeakMap,rD=new WeakMap,rB=e=>{let t=rL.get(e.target);t&&t(e)},rF=e=>{e.forEach(rB)},rz={some:0,all:1},r_=function(e,t){if("u"<typeof Proxy)return iM;let i=new Map,n=(i,n)=>iM(i,n,e,t);return new Proxy((e,t)=>n(e,t),{get:(s,r)=>"create"===r?n:(i.has(r)||i.set(r,iM(r,void 0,e,t)),i.get(r))})}({animation:{Feature:class extends iA{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:i})=>(function(e,t,i={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t))n=Promise.all(t.map(t=>nz(e,t,i)));else if("string"==typeof t)n=nz(e,t,i);else{let s="function"==typeof t?iE(e,t,i.custom):t;n=Promise.all(nB(e,s,i))}return n.then(()=>{e.notify("AnimationComplete",t)})})(e,t,i))),i=nH(),n=!0,s=!1,r=t=>(i,n)=>{let s=iE(e,n,"exit"===t?e.presenceContext?.custom:void 0);if(s){let{transition:e,transitionEnd:t,...n}=s;i={...i,...n,...t}}return i};function a(a){let{props:o}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let i=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(i.initial=t.props.initial),i}let i={};for(let e=0;e<n_;e++){let n=tc[e],s=t.props[n];(tu(s)||!1===s)&&(i[n]=s)}return i}(e.parent)||{},u=[],h=new Set,c={},d=1/0;for(let t=0;t<nU;t++){var p,m;let f=n$[t],g=i[f],v=void 0!==o[f]?o[f]:l[f],x=tu(v),y=f===a?g.isActive:null;!1===y&&(d=t);let b=v===l[f]&&v!==o[f]&&x;if(b&&(n||s)&&e.manuallyAnimateOnMount&&(b=!1),g.protectedKeys={...c},!g.isActive&&null===y||!v&&!g.prevProp||tl(v)||"boolean"==typeof v)continue;if("exit"===f&&g.isActive&&!0!==y){g.prevResolvedValues&&(c={...c,...g.prevResolvedValues});continue}let w=(p=g.prevProp,"string"==typeof(m=v)?m!==p:!!Array.isArray(m)&&!nO(m,p)),j=w||f===a&&g.isActive&&!b&&x||t>d&&x,S=!1,T=Array.isArray(v)?v:[v],C=T.reduce(r(f),{});!1===y&&(C={});let{prevResolvedValues:k={}}=g,P={...k,...C},M=t=>{j=!0,h.has(t)&&(S=!0,h.delete(t)),g.needsAnimating[t]=!0;let i=e.getValue(t);i&&(i.liveStyle=!1)};for(let e in P){let t=C[e],i=k[e];if(!c.hasOwnProperty(e))(iN(t)&&iN(i)?!nO(t,i)||w:t!==i)?null!=t?M(e):h.add(e):void 0!==t&&h.has(e)?M(e):g.protectedKeys[e]=!0}g.prevProp=v,g.prevResolvedValues=C,g.isActive&&(c={...c,...C}),(n||s)&&e.blockInitialAnimation&&(j=!1);let A=b&&w,E=!A||S;j&&E&&u.push(...T.map(t=>{let i={type:f};if("string"==typeof t&&(n||s)&&!A&&e.manuallyAnimateOnMount&&e.parent){let{parent:n}=e,s=iE(n,t);if(n.enteringChildren&&s){let{delayChildren:t}=s.transition||{};i.delay=nF(n.enteringChildren,e,t)}}return{animation:t,options:i}}))}if(h.size){let t={};if("boolean"!=typeof o.initial){let i=iE(e,Array.isArray(o.initial)?o.initial[0]:o.initial);i&&i.transition&&(t.transition=i.transition)}
401h.forEach(i=>{let n=e.getBaseTarget(i),s=e.getValue(i);s&&(s.liveStyle=!0),t[i]=n??null}),u.push({animation:t})}let f=!!u.length;return n&&(!1===o.initial||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),n=!1,s=!1,f?t(u):Promise.resolve()}return{animateChanges:a,setActive:function(t,n){if(i[t].isActive===n)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,n)),i[t].isActive=n;let s=a(t);for(let e in i)i[e].protectedKeys={};return s},setAnimateFunction:function(i){t=i(e)},getState:()=>i,reset:()=>{i=nH(),s=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();tl(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends iA{constructor(){super(...arguments),this.id=nq++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;if(e&&!1===i){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){let i=iE(this.node,e,t);if(i){let{transition:e,transitionEnd:t,...n}=i;for(let e in n)this.node.getValue(e)?.jump(n[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends iA{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.stopObserver?.();let{viewport:i={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:a}=i,o={root:n?n.current:void 0,rootMargin:s,threshold:"number"==typeof r?r:rz[r]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,a&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),s=t?i:n;s&&s(e)};this.stopObserver=(e=this.node.current,t=function({root:e,...t}){let i=e||document;rD.has(i)||rD.set(i,{});let n=rD.get(i),s=JSON.stringify(t);return n[s]||(n[s]=new IntersectionObserver(rF,{root:e,...t})),n[s]}(o),rL.set(e,l),t.observe(e),()=>{rL.delete(e),t.unobserve(e)})}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends iA{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:i}=this.node.props;this.unmount=function(e,t,i={}){let[n,s,r]=rC(e,i),a=e=>{let n=e.currentTarget;if(!rR(e)||rN.has(e))return;rA.add(n),i.stopPropagation&&rN.add(e);let r=t(n,e),a={...s,capture:!0},o=(e,t)=>{window.removeEventListener("pointerup",l,a),window.removeEventListener("pointercancel",u,a),rA.has(n)&&rA.delete(n),rR(e)&&"function"==typeof r&&r(e,{success:t})},l=e=>{o(e,n===window||n===document||i.useGlobalTarget||rM(n,e.target))},u=e=>{o(e,!1)};window.addEventListener("pointerup",l,a),window.addEventListener("pointercancel",u,a)};return n.forEach(e=>{((i.useGlobalTarget?window:e).addEventListener("pointerdown",a,s),rP(e))&&(e.addEventListener("focus",e=>((e,t)=>{let i=e.currentTarget;if(!i)return;let n=rE(()=>{if(rA.has(i))return;rV(i,"down");let e=rE(()=>{rV(i,"up")});i.addEventListener("keyup",e,t),i.addEventListener("blur",()=>rV(i,"cancel"),t)});i.addEventListener("keydown",n,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),t)}
401)(e,s)),sn.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),r}(e,(e,t)=>(rI(this.node,t,"Start"),(e,{success:t})=>rI(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:i?.tap===!1})}unmount(){}}},focus:{Feature:class extends iA{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=iL(nY(this.node.current,"focus",()=>this.onFocus()),nY(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends iA{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,i={}){let[n,s,r]=rC(e,i);return n.forEach(e=>{let i,n=!1,r=!1,a=t=>{i&&(i(t),i=void 0),e.removeEventListener("pointerleave",l)},o=e=>{n=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),r&&(r=!1,a(e))},l=e=>{if("touch"!==e.pointerType){if(n){r=!0;return}a(e)}};e.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||nX.x||nX.y)return;r=!1;let a=t(e,n);"function"==typeof a&&(i=a,e.addEventListener("pointerleave",l,s))},s),e.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",o,s),window.addEventListener("pointercancel",o,s)},s)}),r}(e,(e,t)=>(rk(this.node,t,"Start"),e=>rk(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends iA{constructor(){super(...arguments),this.removePointerDownListener=eS}onPointerDown(e){this.session=new sc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sl(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:sT(e),onStart:sT(t),onMove:sT(i),onEnd:(e,t)=>{delete this.session,n&&eP.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=so(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends iA{constructor(e){super(e),this.removeGroupControls=eS,this.removeListeners=eS,this.controls=new sw(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||eS}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:rT,MeasureLayout:sE},layout:{ProjectionNode:rT,MeasureLayout:sE}},(e,t)=>t.isSVG??t8(e)?new tq(t):new t4(t,{allowProjection:e!==t9.Fragment}));e.s(["motion",0,r_],750472);var rO=t9;function r$(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class rU extends rO.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(rP(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,i=rP(e)&&e.offsetWidth||0,n=rP(e)&&e.offsetHeight||0,s=getComputedStyle(t),r=this.props.sizeRef.current;r.height=parseFloat(s.height),r.width=parseFloat(s.width),r.top=t.offsetTop,r.left=t.offsetLeft,r.right=i-r.width-r.left,r.bottom=n-r.height-r.top,r.direction=s.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function rW({children:e,isPresent:t,anchorX:i,anchorY:n,root:s,pop:r}){let a=(0,rO.useId)(),o=(0,rO.useRef)(null),l=(0,rO.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:u}=(0,rO.useContext)(is),h=function(...e){return t9.useCallback(function(...e){return t=>{let i=!1,n=e.map(e=>{let n=r$(e,t);return i||"function"!=typeof n||(i=!0),n});if(i)return()=>{for(let t=0;t<n.length;t++){let i=n[t];"function"==typeof i?i():r$(e[t],null)}}}}(...e),e)}(o,e.props?.ref??e?.ref);return(0,rO.useInsertionEffect)(()=>{let{width:e,height:h,top:c,left:d,right:p,bottom:m,direction:f}=l.current;if(t||!1===r||!o.current||!e||!h)return;
401let g="rtl"===f,v="left"===i?g?`right: ${p}`:`left: ${d}`:g?`left: ${d}`:`right: ${p}`,x="bottom"===n?`bottom: ${m}`:`top: ${c}`;o.current.dataset.motionPopId=a;let y=document.createElement("style");u&&(y.nonce=u);let b=s??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(` 402 [data-motion-pop-id="${a}"] { 403 position: absolute !important; 404 width: ${e}px !important; 405 height: ${h}px !important; 406 ${v}px !important; 407 ${x}px !important; 408 } 409 `),()=>{o.current?.removeAttribute("data-motion-pop-id"),b.contains(y)&&b.removeChild(y)}},[t]),(0,ie.jsx)(rU,{isPresent:t,childRef:o,sizeRef:l,pop:r,children:!1===r?e:rO.cloneElement(e,{ref:h})})}let rH=({children:e,initial:t,isPresent:i,onExitComplete:n,custom:s,presenceAffectsLayout:r,mode:a,anchorX:o,anchorY:l,root:u})=>{let h=ig(rq),c=(0,t9.useId)(),d=(0,t9.useRef)(i),p=(0,t9.useRef)(n);iP(()=>{d.current=i,p.current=n});let m=!0,f=(0,t9.useMemo)(()=>(m=!1,{id:c,initial:t,isPresent:i,custom:s,onExitComplete:e=>{for(let t of(h.set(e,!0),h.values()))if(!t)return;n&&n()},register:e=>(h.set(e,!1),()=>{h.delete(e),d.current||h.size||p.current?.()})}),[i,h,n]);return r&&m&&(f={...f}),(0,t9.useMemo)(()=>{h.forEach((e,t)=>h.set(t,!1))},[i]),t9.useEffect(()=>{i||h.size||!n||n()},[i]),e=(0,ie.jsx)(rW,{pop:"popLayout"===a,isPresent:i,anchorX:o,anchorY:l,root:u,children:e}),(0,ie.jsx)(im.Provider,{value:f,children:e})};function rq(){return new Map}let rG=e=>e.key||"";function rY(e){let t=[];return t9.Children.forEach(e,e=>{(0,t9.isValidElement)(e)&&t.push(e)}),t}e.s(["AnimatePresence",0,({children:e,custom:t,initial:i=!0,onExitComplete:n,presenceAffectsLayout:s=!0,mode:r="sync",propagate:a=!1,anchorX:o="left",anchorY:l="top",root:u})=>{let[h,c]=sP(a),d=(0,t9.useMemo)(()=>rY(e),[e]),p=a&&!h?[]:d.map(rG),m=(0,t9.useRef)(!0),f=(0,t9.useRef)(d),g=ig(()=>new Map),v=(0,t9.useRef)(new Set),[x,y]=(0,t9.useState)(d),[b,w]=(0,t9.useState)(d);iP(()=>{m.current=!1,f.current=d;for(let e=0;e<b.length;e++){let t=rG(b[e]);p.includes(t)?(g.delete(t),v.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[b,p.length,p.join("-")]);let j=[];if(d!==x){let e=[...d];for(let t=0;t<b.length;t++){let i=b[t],n=rG(i);p.includes(n)||(e.splice(t,0,i),j.push(i))}return"wait"===r&&j.length&&(e=j),w(rY(e)),y(d),null}let{forceRender:S}=(0,t9.useContext)(it);return(0,ie.jsx)(ie.Fragment,{children:b.map(e=>{let x=rG(e),y=(!a||!!h)&&(d===b||p.includes(x));return(0,ie.jsx)(rH,{isPresent:y,initial:(!m.current||!!i)&&void 0,custom:t,presenceAffectsLayout:s,mode:r,root:u,onExitComplete:y?void 0:()=>{if(v.current.has(x)||!g.has(x))return;v.current.add(x),g.set(x,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(S?.(),w(f.current),a&&c?.(),n&&n())},anchorX:o,anchorY:l,children:e},x)})})}],628729)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.