!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a09b5f-098c-7863-8e0c-367c326654a5")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,191379,e=>{"use strict";let t=(0,e.i(202913).default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["ArrowUpRight",0,t],191379)},387445,e=>{"use strict";let t=(0,e.i(202913).default)("blocks",[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]]);e.s(["Blocks",0,t],387445)},914306,e=>{"use strict";let t=(0,e.i(202913).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,t],914306)},78590,e=>{"use strict";var t,r=((t={}).ProviderCount="80+",t.ModelCount="500+",t.GlobalUserCount="10M+",t.MonthlyTokens="400T+",t);e.s(["MarketingMetrics",()=>r])},956506,e=>{"use strict";var t=e.i(222666),r=e.i(505962),o=e.i(452473);let a=(0,e.i(207298).cva)("overflow-hidden rounded-lg border border-border bg-card text-card-foreground",{variants:{variant:{default:"",secondary:"",flat:"border-border/70",ghost:"border-none"}},defaultVariants:{variant:"default"}});e.s(["Card",0,function(e){let n,i,s,l,c,d,u=(0,r.c)(12);return u[0]!==e?({className:n,variant:l,ref:s,...i}=e,u[0]=e,u[1]=n,u[2]=i,u[3]=s,u[4]=l):(n=u[1],i=u[2],s=u[3],l=u[4]),u[5]!==n||u[6]!==l?(c=(0,o.cn)(a({variant:l}),n),u[5]=n,u[6]=l,u[7]=c):c=u[7],u[8]!==i||u[9]!==s||u[10]!==c?(d=(0,t.jsx)("div",{ref:s,className:c,...i}),u[8]=i,u[9]=s,u[10]=c,u[11]=d):d=u[11],d},"CardContent",0,function(e){let a,n,i,s,l,c=(0,r.c)(10);return c[0]!==e?({className:a,ref:i,...n}=e,c[0]=e,c[1]=a,c[2]=n,c[3]=i):(a=c[1],n=c[2],i=c[3]),c[4]!==a?(s=(0,o.cn)("p-6 pt-0",a),c[4]=a,c[5]=s):s=c[5],c[6]!==n||c[7]!==i||c[8]!==s?(l=(0,t.jsx)("div",{ref:i,className:s,...n}),c[6]=n,c[7]=i,c[8]=s,c[9]=l):l=c[9],l},"CardDescription",0,function(e){let a,n,i,s,l,c=(0,r.c)(10);return c[0]!==e?({className:a,ref:i,...n}=e,c[0]=e,c[1]=a,c[2]=n,c[3]=i):(a=c[1],n=c[2],i=c[3]),c[4]!==a?(s=(0,o.cn)("text-xs text-muted-foreground",a),c[4]=a,c[5]=s):s=c[5],c[6]!==n||c[7]!==i||c[8]!==s?(l=(0,t.jsx)("div",{ref:i,className:s,...n}),c[6]=n,c[7]=i,c[8]=s,c[9]=l):l=c[9],l},"CardFooter",0,function(e){let a,n,i,s,l,c=(0,r.c)(10);return c[0]!==e?({className:a,ref:i,...n}=e,c[0]=e,c[1]=a,c[2]=n,c[3]=i):(a=c[1],n=c[2],i=c[3]),c[4]!==a?(s=(0,o.cn)("flex items-center p-6 pt-0",a),c[4]=a,c[5]=s):s=c[5],c[6]!==n||c[7]!==i||c[8]!==s?(l=(0,t.jsx)("div",{ref:i,className:s,...n}),c[6]=n,c[7]=i,c[8]=s,c[9]=l):l=c[9],l},"CardHeader",0,function(e){let a,n,i,s,l,c=(0,r.c)(10);return c[0]!==e?({className:a,ref:i,...n}=e,c[0]=e,c[1]=a,c[2]=n,c[3]=i):(a=c[1],n=c[2],i=c[3]),c[4]!==a?(s=(0,o.cn)("flex flex-col gap-y-1.5 p-6",a),c[4]=a,c[5]=s):s=c[5],c[6]!==n||c[7]!==i||c[8]!==s?(l=(0,t.jsx)("div",{ref:i,className:s,...n}),c[6]=n,c[7]=i,c[8]=s,c[9]=l):l=c[9],l},"CardTitle",0,function(e){let a,n,i,s,l,c=(0,r.c)(10);return c[0]!==e?({className:a,ref:i,...n}=e,c[0]=e,c[1]=a,c[2]=n,c[3]=i):(a=c[1],n=c[2],i=c[3]),c[4]!==a?(s=(0,o.cn)("text-base font-semibold leading-snug",a),c[4]=a,c[5]=s):s=c[5],c[6]!==n||c[7]!==i||c[8]!==s?(l=(0,t.jsx)("div",{ref:i,className:s,...n}),c[6]=n,c[7]=i,c[8]=s,c[9]=l):l=c[9],l},"cardVariants",0,a])},729648,e=>{"use strict";var t=e.i(222666),r=e.i(505962),o=e.i(452473),a=e.i(270401),n=e.i(528164),i=e.i(732909);e.s(["StaticCodeExampleSwitcher",0,function(e){let s,l,c,d,u,h,f=(0,r.c)(20),{examples:m,align:p}=e,[g,x]=(0,a.useState)(0),v="center"===(void 0===p?"center":p)?"justify-center":"justify-start";if(f[0]!==v?(s=(0,o.cn)("flex flex-wrap gap-2",v),f[0]=v,f[1]=s):s=f[1],f[2]!==g||f[3]!==m){let e;f[5]!==g?(e=(e,r)=>(0,t.jsx)(n.Button,{size:"sm",variant:"outline","aria-pressed":r===g,className:(0,o.cn)(r===g?"bg-selected-bg text-foreground hover:bg-selected-bg hover:text-foreground":"text-muted-foreground hover:bg-card-hover hover:text-accent-foreground"),onClick:()=>x(r),children:e.title},e.title),f[5]=g,f[6]=e):e=f[6],l=m.map(e),f[2]=g,f[3]=m,f[4]=l}else l=f[4];if(f[7]!==s||f[8]!==l?(c=(0,t.jsx)("div",{className:s,children:l}),f[7]=s,f[8]=l,f[9]=c):c=f[9],f[10]!==g||f[11]!==m){let e;f[13]!==g?(e=(e,r)=>(0,t.jsx)("div",{className:(0,o.cn)("col-start-1 row-start-1",r!==g&&"hidden"),children:(0,t.jsx)(i.StaticCodePanel,{tabs:e.tabs})},e.title),f[13]=g,f[14]=e):e=f[14],d=m.map(e),f[10]=g,f[11]=m,f[12]=d}else d=f[12];return f[15]!==d?(u=(0,t.jsx)("div",{className:"grid items-start",children:d}),f[15]=d,f[16]=u):u=f[16],f[17]!==c||f[18]!==u?(h=(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[c,u]}),f[17]=c,f[18]=u,f[19]=h):h=f[19],h}])},732909,e=>{"use strict";var t=e.i(222666),r=e.i(505962),o=e.i(452473),a=e.i(699937),n=e.i(695227),i=e.i(270401),s=e.i(164588),l=e.i(528164),c=e.i(253370);e.s(["StaticCodePanel",0,function(e){let d,u,h,f,m,p,g,x,v,b,y=(0,r.c)(35),{tabs:_,className:k}=e,{isCopied:C,copyToClipboard:w}=(0,s.useCopyToClipboard)(),[S,N]=(0,i.useState)(0),E=(0,i.useId)(),j=_[S]??_[0];if(!j)return null;y[0]!==k?(d=(0,o.cn)("overflow-hidden rounded-lg border border-border bg-card",k),y[0]=k,y[1]=d):d=y[1];let L=_.length>1?"pl-1.5":"h-9 pl-3";y[2]!==L?(u=(0,o.cn)("flex items-center justify-between gap-2 border-b border-border pr-1.5",L),y[2]=L,y[3]=u):u=y[3],y[4]!==j.label||y[5]!==E||y[6]!==_?(h=_.length>1?(0,t.jsx)(c.UnderlineTabs,{ariaLabel:"Code language",className:"-mb-px min-w-0 flex-1 border-b-0",tabs:_.map((e,t)=>({id:e.label,label:e.label,buttonId:`${E}-tab-${t}`,ariaControls:`${E}-panel-${t}`,className:"font-mono text-overline uppercase tracking-wider"})),activeTab:j.label,onTabChange:e=>{let t=_.findIndex(t=>t.label===e);-1!==t&&N(t)}}):(0,t.jsx)("span",{className:"truncate font-mono text-overline uppercase tracking-wider text-muted-foreground",children:j.label}),y[4]=j.label,y[5]=E,y[6]=_,y[7]=h):h=y[7];let P=C?"Copied code":"Copy code";if(y[8]!==j.code||y[9]!==w?(f=()=>void w(j.code),y[8]=j.code,y[9]=w,y[10]=f):f=y[10],y[11]!==C?(m=C?(0,t.jsx)(a.Check,{className:"size-4"}):(0,t.jsx)(n.Copy,{className:"size-4"}),y[11]=C,y[12]=m):m=y[12],y[13]!==P||y[14]!==f||y[15]!==m?(p=(0,t.jsx)(l.Button,{type:"button",variant:"ghost",size:"icon-sm","aria-label":P,onClick:f,className:"shrink-0",children:m}),y[13]=P,y[14]=f,y[15]=m,y[16]=p):p=y[16],y[17]!==u||y[18]!==h||y[19]!==p?(g=(0,t.jsxs)("div",{className:u,children:[h,p]}),y[17]=u,y[18]=h,y[19]=p,y[20]=g):g=y[20],y[21]!==S||y[22]!==E||y[23]!==_){let e;y[25]!==S||y[26]!==E||y[27]!==_.length?(e=(e,r)=>(0,t.jsx)("div",{role:_.length>1?"tabpanel":void 0,id:`${E}-panel-${r}`,"aria-labelledby":_.length>1?`${E}-tab-${r}`:void 0,inert:r!==S,className:(0,o.cn)("shiki-dual col-start-1 row-start-1 overflow-auto p-4 font-mono text-body leading-relaxed",r!==S&&"invisible"),dangerouslySetInnerHTML:{__html:e.html}},e.label),y[25]=S,y[26]=E,y[27]=_.length,y[28]=e):e=y[28],x=_.map(e),y[21]=S,y[22]=E,y[23]=_,y[24]=x}else x=y[24];return y[29]!==x?(v=(0,t.jsx)("div",{className:"grid bg-doc-surface",children:x}),y[29]=x,y[30]=v):v=y[30],y[31]!==d||y[32]!==v||y[33]!==g?(b=(0,t.jsxs)("div",{className:d,children:[g,v]}),y[31]=d,y[32]=v,y[33]=g,y[34]=b):b=y[34],b}])},379684,e=>{"use strict";var t=e.i(222666),r=e.i(505962),o=e.i(734293),a=e.i(452473),n=e.i(654847),i=e.i(191379),s=e.i(551365),l=e.i(971531),c=e.i(639580),d=e.i(664288);let u="text-foreground underline underline-offset-2 decoration-current/40 hover:text-accent-foreground hover:decoration-current transition-colors";e.s(["LINK_CLASSES",0,u,"TextLink",0,function(e){let h,f,m,p,g,x,v,b,y,_,k,C,w,S,N,E,j,L,P,A,R,D,M=(0,r.c)(71);M[0]!==e?({render:b,children:h,className:f,icon:m,iconPosition:y,showExternalIcon:_,prefetch:k,onFocus:p,onMouseEnter:g,onTouchStart:x,...v}=e,M[0]=e,M[1]=h,M[2]=f,M[3]=m,M[4]=p,M[5]=g,M[6]=x,M[7]=v,M[8]=b,M[9]=y,M[10]=_,M[11]=k):(h=M[1],f=M[2],m=M[3],p=M[4],g=M[5],x=M[6],v=M[7],b=M[8],y=M[9],_=M[10],k=M[11]);let T=void 0===y?"end":y,O=void 0!==_&&_,F=void 0===k?"hover":k,U=(0,c.useLocalizedHref)(v.href);M[12]!==U?(C=(0,n.getHrefString)(U),M[12]=U,M[13]=C):C=M[13],M[14]!==F||M[15]!==C?(w={prefetch:F,href:C},M[14]=F,M[15]=C,M[16]=w):w=M[16],M[17]!==p||M[18]!==g||M[19]!==x?(S={onFocus:p,onMouseEnter:g,onTouchStart:x},M[17]=p,M[18]=g,M[19]=x,M[20]=S):S=M[20];let B=(0,l.useLinkPrefetch)(w,S);M[21]!==f?(N=(0,a.cn)(u,"text-xs cursor-pointer",f),M[21]=f,M[22]=N):N=M[22];let I=N;M[23]!==m||M[24]!==O?(E=m??(O?(0,t.jsx)(i.ArrowUpRight,{className:"inline size-3 align-[-1px]"}):null),M[23]=m,M[24]=O,M[25]=E):E=M[25];let H=E;M[26]!==T||M[27]!==H?(j="start"===T&&H?(0,t.jsx)("span",{className:"mr-0.5 inline-flex",children:H}):null,M[26]=T,M[27]=H,M[28]=j):j=M[28];let z=j;M[29]!==T||M[30]!==H?(L="end"===T&&H?(0,t.jsx)("span",{className:"ml-0.5 inline-flex",children:H}):null,M[29]=T,M[30]=H,M[31]=L):L=M[31];let G=L,V=(0,n.isCrossZoneHref)(U);M[32]!==h||M[33]!==b?(P=b?(0,d.getChildContent)(b):h,M[32]=h,M[33]=b,M[34]=P):P=M[34];let K=P;M[35]!==K||M[36]!==G||M[37]!==U||M[38]!==p||M[39]!==g||M[40]!==x||M[41]!==v||M[42]!==b||M[43]!==I||M[44]!==z?(A=b?{className:I,children:(0,t.jsxs)(t.Fragment,{children:[z,K,G]}),...v,onFocus:p,onMouseEnter:g,onTouchStart:x,href:U}:{},M[35]=K,M[36]=G,M[37]=U,M[38]=p,M[39]=g,M[40]=x,M[41]=v,M[42]=b,M[43]=I,M[44]=z,M[45]=A):A=M[45],M[46]!==b||M[47]!==A?(R={render:b,defaultTagName:"a",props:A},M[46]=b,M[47]=A,M[48]=R):R=M[48];let $=(0,o.useRender)(R);if(b){if(V)throw Error(`TextLink: cross-zone href "${(0,n.getHrefString)(U)}" cannot be combined with the render prop. Use a plain element instead.`);return $}if(V){let e,r,o;if(M[49]!==v){let{href:t,replace:r,scroll:o,shallow:a,passHref:n,legacyBehavior:i,locale:s,onNavigate:l,...c}=v;e=c,M[49]=v,M[50]=e}else e=M[50];return M[51]!==U?(r=(0,n.getHrefString)(U),M[51]=U,M[52]=r):r=M[52],M[53]!==e||M[54]!==h||M[55]!==G||M[56]!==p||M[57]!==g||M[58]!==x||M[59]!==I||M[60]!==z||M[61]!==r?(o=(0,t.jsxs)("a",{href:r,className:I,onFocus:p,onMouseEnter:g,onTouchStart:x,...e,children:[z,h,G]}),M[53]=e,M[54]=h,M[55]=G,M[56]=p,M[57]=g,M[58]=x,M[59]=I,M[60]=z,M[61]=r,M[62]=o):o=M[62],o}return M[63]!==h||M[64]!==G||M[65]!==U||M[66]!==B||M[67]!==v||M[68]!==I||M[69]!==z?(D=(0,t.jsxs)(s.default,{className:I,...v,...B,href:U,children:[z,h,G]}),M[63]=h,M[64]=G,M[65]=U,M[66]=B,M[67]=v,M[68]=I,M[69]=z,M[70]=D):D=M[70],D}])},253370,e=>{"use strict";var t=e.i(222666),r=e.i(505962),o=e.i(452473),a=e.i(270401),n=e.i(806024);e.s(["UnderlineTabs",0,function(e){let i,s,l,c,d,u,h,f,m=(0,r.c)(16),{tabs:p,activeTab:g,onTabChange:x,className:v,ariaLabel:b}=e,y=(h=(0,r.c)(2),f=(0,a.useRef)(null),h[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{let e=f.current;if(!e)return;let t=function(){if(!e)return;let t=e.scrollLeft>2,r=e.scrollLeft+e.clientWidth{e.removeEventListener("scroll",t),r.disconnect()}},u=[],h[0]=d,h[1]=u):(d=h[0],u=h[1]),(0,a.useEffect)(d,u),f);if(m[0]!==v?(i=(0,o.cn)("border-b border-border",v),m[0]=v,m[1]=i):i=m[1],m[2]!==g||m[3]!==x||m[4]!==p){let e;m[6]!==g||m[7]!==x?(e=e=>{let r=g===e.id,a={role:"tab",id:e.buttonId,"aria-selected":r,"aria-controls":e.ariaControls,onClick:()=>x?.(e.id),className:(0,o.cn)("shrink-0 border-b-2 px-4 py-2 text-xs font-medium transition-colors cursor-pointer",r?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-accent-foreground",e.className)};return void 0!==e.href?(0,t.jsx)(n.Link,{href:e.href,replace:e.replace,prefetch:"viewport",...a,children:e.label},e.id):(0,t.jsx)("button",{type:"button",...a,children:e.label},e.id)},m[6]=g,m[7]=x,m[8]=e):e=m[8],s=p.map(e),m[2]=g,m[3]=x,m[4]=p,m[5]=s}else s=m[5];return m[9]!==b||m[10]!==y||m[11]!==s?(l=(0,t.jsx)("div",{ref:y,role:"tablist","aria-label":b,className:"flex overflow-x-auto scrollbar-hide -mb-px",children:s}),m[9]=b,m[10]=y,m[11]=s,m[12]=l):l=m[12],m[13]!==i||m[14]!==l?(c=(0,t.jsx)("div",{className:i,children:l}),m[13]=i,m[14]=l,m[15]=c):c=m[15],c}])},664288,e=>{"use strict";e.s(["getChildContent",0,function(e){let{props:t}=e;if("object"==typeof t&&null!==t&&"children"in t)return t.children}])},498711,e=>{"use strict";var t=e.i(222666),r=e.i(505962),o=e.i(553215),a=e.i(528164),n=e.i(252358),i=e.i(378643),s=e.i(33425);e.s(["DevelopersFooterCta",0,function(){let e,l,c,d,u,h,f,m,p,g=(0,r.c)(15),x=(0,n.usePosthogClient)();return g[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("h2",{className:"font-brand text-[length:var(--text-title)] font-bold tracking-tight text-foreground md:text-[length:var(--text-display)]",children:"Start building today"}),l=(0,t.jsx)("p",{className:"max-w-xl text-[length:var(--text-body)] leading-relaxed text-muted-foreground",children:"Free to get started. No subscription, no card required."}),g[0]=e,g[1]=l):(e=g[0],l=g[1]),g[2]!==x?(c=()=>{x.capture(o.PostHogEvent.ClickKeysButton,{variants:o.PostHogElementVariants.PrimaryCta,source:"developers_footer"})},g[2]=x,g[3]=c):c=g[3],g[4]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(i.ApiKeysLink,{children:"Get an API key"}),g[4]=d):d=g[4],g[5]!==c?(u=(0,t.jsx)(a.Button,{size:"lg",className:"w-full gap-2 sm:w-auto",onClick:c,render:d}),g[5]=c,g[6]=u):u=g[6],g[7]!==x?(h=()=>{x.capture(o.PostHogEvent.ClickDocsButton,{variants:o.PostHogElementVariants.SecondaryCta,source:"developers_footer",destination:s.DEVELOPERS_DOCS_URL})},g[7]=x,g[8]=h):h=g[8],g[9]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)("a",{href:s.DEVELOPERS_DOCS_URL,children:"Read the docs"}),g[9]=f):f=g[9],g[10]!==h?(m=(0,t.jsx)(a.Button,{size:"lg",className:"w-full gap-2 text-foreground sm:w-auto",variant:"outline",onClick:h,render:f}),g[10]=h,g[11]=m):m=g[11],g[12]!==u||g[13]!==m?(p=(0,t.jsx)("section",{className:"mb-16 w-full max-w-4xl",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 rounded-xl border border-border bg-card px-6 py-8 text-center md:py-10",children:[e,l,(0,t.jsxs)("div",{className:"mt-2 flex w-full flex-col justify-center gap-3 sm:w-auto sm:flex-row sm:gap-4",children:[u,m]})]})}),g[12]=u,g[13]=m,g[14]=p):p=g[14],p}])},334338,e=>{"use strict";var t=e.i(222666),r=e.i(505962),o=e.i(78590),a=e.i(553215),n=e.i(528164),i=e.i(252358),s=e.i(378643),l=e.i(33425),c=e.i(691038),d=e.i(270401);let u=` attribute vec2 a_position; void main() { gl_Position = vec4(a_position, 0.0, 1.0); } `,h=` #extension GL_OES_standard_derivatives : enable precision highp float; uniform vec2 u_resolution; uniform float u_time; uniform vec3 u_line; uniform vec3 u_pulse; uniform float u_opacity; const float CELL = 1.6; const float SCROLL_SPEED = 1.1; /* Depth units per second, and the distance covered before restarting: the cycle is PULSE_SPAN / PULSE_SPEED ≈ 5s. */ const float PULSE_SPEED = 5.2; const float PULSE_SPAN = 26.0; const float FADE_START = 3.0; const float FADE_END = 34.0; /* * Pushes the vanishing point below the canvas midpoint. Higher than the Ori * page's value because this hero is centre-aligned, so the copy occupies the * middle of the canvas rather than its left half. */ const float HORIZON = 0.48; /* * Where the far field turns to fog, as a fraction of canvas height from the * bottom. Full strength below TEXT_CLEAR, gone by HORIZON_FOG, so the pile-up * of lines at the vanishing point never reaches the hero copy. */ const float TEXT_CLEAR = 0.16; const float HORIZON_FOG = 0.72; /* Distance to the nearest line of a unit lattice, in cell units. */ float latticeDistance(float coord) { return abs(fract(coord) - 0.5); } /* * Line coverage that stays one pixel wide at every depth. Dividing the * lattice distance by its own screen-space derivative cancels perspective * foreshortening, so distant lines thin out in brightness instead of * collapsing into moire. */ float lineCoverage(float coord, float width) { float distance = latticeDistance(coord); float falloff = fwidth(coord) * width; return 1.0 - smoothstep(0.0, falloff, distance); } void main() { vec2 uv = (gl_FragCoord.xy * 2.0 - u_resolution) / u_resolution.y; /* * Drop the eye below centre so the horizon lands under the hero copy * rather than crossing it. Everything at or above the horizon is sky. */ uv.y += HORIZON; if (uv.y >= -0.02) { gl_FragColor = vec4(0.0); return; } /* Ray-plane intersection: eye at origin, ground plane at y = -1. */ float depth = -1.0 / uv.y; float across = uv.x * depth; float along = depth + u_time * SCROLL_SPEED; float acrossLine = lineCoverage(across / CELL, 1.0); float alongLine = lineCoverage(along / CELL, 1.0); float grid = max(acrossLine, alongLine); /* Depth fade, so the lattice dissolves before it reaches the horizon. */ float depthFade = 1.0 - smoothstep(FADE_START, FADE_END, depth); depthFade *= depthFade; /* Fade the near edge too, so the grid emerges rather than being cut off. */ float nearFade = smoothstep(0.0, 1.6, depth); /* * Thin the dense band of lines that piles up near the horizon. Edge * dissolves are a CSS mask on the canvas instead of more screen-space * fades here, because stacked smoothsteps in one alpha term overlap and * cancel each other into a sliver. */ float screenY = gl_FragCoord.y / u_resolution.y; float horizonFog = 1.0 - smoothstep(TEXT_CLEAR, HORIZON_FOG, screenY); /* * Vignette the left and right edges. Measured against the aspect ratio * rather than a constant, so the falloff sits at the same fraction of the * canvas at every width instead of pinching into a narrow strip on wide * viewports. */ float halfWidth = u_resolution.x / u_resolution.y; float sideFade = 1.0 - smoothstep(halfWidth * 0.35, halfWidth * 1.05, abs(uv.x)); /* * A band of brightness sweeping away from the viewer. PULSE_SPEED is depth * units per second and PULSE_SPAN the distance it covers before restarting, * so the wrap keeps the reset out past the depth fade where it is invisible. * Multiplying the two here would make the span control the speed as well, * collapsing the cycle to 1/PULSE_SPEED seconds. */ float travelled = mod(u_time * PULSE_SPEED, PULSE_SPAN); float pulseBand = 1.0 - smoothstep(0.0, 4.5, abs(depth - travelled)); pulseBand *= pulseBand; vec3 color = mix(u_line, u_pulse, pulseBand * 0.85); float alpha = grid * depthFade * nearFade * sideFade * horizonFog * u_opacity; alpha *= 1.0 + pulseBand * 1.4; gl_FragColor = vec4(color * alpha, alpha); } `;function f({gl:e,type:t,source:r}){let o=e.createShader(t);return o?(e.shaderSource(o,r),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS))?o:(e.deleteShader(o),null):null}function m(){return document.documentElement.classList.contains("dark")?{line:[.78,1,0],pulse:[1,1,1],opacity:.28}:{line:[.4,.1,.9],pulse:[.4,.1,.9],opacity:.34}}function p({className:e}){let r=(0,d.useRef)(null),o=(0,c.useMatchMedia)("(prefers-reduced-motion: reduce)"),a=(0,c.useMatchMedia)("(min-width: 640px)");return(0,d.useEffect)(()=>{let e,t,n,i=r.current;if(!i||o||!1===a)return;let s=i.getContext("webgl",{alpha:!0,antialias:!1,premultipliedAlpha:!0});if(!s||s.isContextLost()||!s.getExtension("OES_standard_derivatives"))return;let l=(e=f({gl:s,type:s.VERTEX_SHADER,source:u}),t=f({gl:s,type:s.FRAGMENT_SHADER,source:h}),(n=e&&t?s.createProgram():null)&&e&&t?(s.attachShader(n,e),s.attachShader(n,t),s.linkProgram(n),s.deleteShader(e),s.deleteShader(t),s.getProgramParameter(n,s.LINK_STATUS))?n:(s.deleteProgram(n),null):(e&&s.deleteShader(e),t&&s.deleteShader(t),null));if(!l)return;let c=s.createBuffer();s.bindBuffer(s.ARRAY_BUFFER,c),s.bufferData(s.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),s.STATIC_DRAW);let d=s.getAttribLocation(l,"a_position"),p=s.getUniformLocation(l,"u_resolution"),g=s.getUniformLocation(l,"u_time"),x=s.getUniformLocation(l,"u_line"),v=s.getUniformLocation(l,"u_pulse"),b=s.getUniformLocation(l,"u_opacity");s.useProgram(l),s.enableVertexAttribArray(d),s.vertexAttribPointer(d,2,s.FLOAT,!1,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA);let y=m(),_=0,k=!0,C=performance.now(),w=e=>{if(_=requestAnimationFrame(w),k){let t,r,o;t=Math.min(window.devicePixelRatio||1,2),r=Math.floor(i.clientWidth*t),o=Math.floor(i.clientHeight*t),0!==r&&0!==o&&(i.width!==r||i.height!==o)&&(i.width=r,i.height=o,s.viewport(0,0,r,o)),s.uniform2f(p,i.width,i.height),s.uniform1f(g,(e-C)/1e3),s.uniform3fv(x,y.line),s.uniform3fv(v,y.pulse),s.uniform1f(b,y.opacity),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLES,0,3)}};_=requestAnimationFrame(w);let S=new IntersectionObserver(([e])=>{k=e?.isIntersecting??!0});S.observe(i);let N=new MutationObserver(()=>{y=m()});return N.observe(document.documentElement,{attributeFilter:["class"]}),()=>{cancelAnimationFrame(_),S.disconnect(),N.disconnect(),s.deleteBuffer(c),s.deleteProgram(l)}},[o,a]),(0,t.jsx)("canvas",{ref:r,"aria-hidden":"true",className:e})}e.s(["DevelopersHero",0,function(){let e,c,d,u,h,f,m,g,x,v,b,y=(0,r.c)(17),_=(0,i.usePosthogClient)();return y[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(p,{className:"pointer-events-none absolute bottom-0 left-1/2 -z-10 hidden h-[136%] w-screen -translate-x-1/2 [mask-image:linear-gradient(to_top,transparent_0%,black_8%,black_48%,transparent_74%)] sm:block"}),y[0]=e):e=y[0],y[1]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)("p",{className:"text-overline uppercase tracking-wider text-accent-foreground",children:"Developer Platform"}),y[1]=c):c=y[1],y[2]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsxs)("h1",{className:"font-brand my-0 w-full text-4xl font-bold leading-[1.1] tracking-tight sm:text-5xl md:text-6xl md:tracking-[-0.04em]",children:["Build with every model.",(0,t.jsx)("br",{className:"hidden sm:block"})," From one platform."]}),u=(0,t.jsxs)("p",{className:"mx-auto max-w-2xl text-[length:var(--text-section)] leading-relaxed text-muted-foreground",children:["One OpenAI-compatible API, typed SDKs in three languages, an agent framework, local devtools, and an MCP server — backed by ",o.MarketingMetrics.ModelCount," models across"," ",o.MarketingMetrics.ProviderCount," providers with automatic fallback."]}),y[2]=d,y[3]=u):(d=y[2],u=y[3]),y[4]!==_?(h=()=>{_.capture(a.PostHogEvent.ClickKeysButton,{variants:a.PostHogElementVariants.PrimaryCta,source:"developers_hero"})},y[4]=_,y[5]=h):h=y[5],y[6]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(s.ApiKeysLink,{children:"Get an API key"}),y[6]=f):f=y[6],y[7]!==h?(m=(0,t.jsx)(n.Button,{size:"lg",className:"w-full gap-2 sm:w-auto",onClick:h,render:f}),y[7]=h,y[8]=m):m=y[8],y[9]!==_?(g=()=>{_.capture(a.PostHogEvent.ClickDocsButton,{variants:a.PostHogElementVariants.SecondaryCta,source:"developers_hero",destination:l.DEVELOPERS_DOCS_URL})},y[9]=_,y[10]=g):g=y[10],y[11]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)("a",{href:l.DEVELOPERS_DOCS_URL,children:"Read the docs"}),y[11]=x):x=y[11],y[12]!==g?(v=(0,t.jsx)(n.Button,{size:"lg",className:"relative w-full gap-2 text-foreground before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-background sm:w-auto",variant:"outline",onClick:g,render:x}),y[12]=g,y[13]=v):v=y[13],y[14]!==m||y[15]!==v?(b=(0,t.jsxs)("div",{className:"relative isolate flex w-full max-w-4xl flex-col justify-center pt-8 gap-10 sm:pb-24 md:gap-14 md:pb-32",children:[e,(0,t.jsxs)("div",{className:"flex flex-col gap-5 md:gap-6 text-center",children:[c,d,u,(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 sm:flex-row sm:gap-4",children:[m,v]})]})]}),y[14]=m,y[15]=v,y[16]=b):b=y[16],b}],334338)},726475,e=>{"use strict";var t=e.i(222666),r=e.i(505962),o=e.i(78590),a=e.i(553215),n=e.i(956506),i=e.i(252358),s=e.i(191379),l=e.i(387445),c=e.i(138612),d=e.i(914306),u=e.i(202913);let h=(0,u.default)("microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]),f=(0,u.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var m=e.i(220499),p=e.i(435480),g=e.i(33425),x=e.i(970654),v=e.i(164588),b=e.i(699937),y=e.i(695227),_=e.i(270401);function k(e){let o,a,n,i,s,l,c,d,u,h,f=(0,r.c)(28),{command:m,languages:p,defaultLanguage:g}=e,{isCopied:k,copyToClipboard:C}=(0,v.useCopyToClipboard)(),[w,S]=(0,_.useState)(g);f[0]===Symbol.for("react.memo_cache_sentinel")?(o=[],f[0]=o):o=f[0];let N=(0,_.useRef)(o);f[1]!==p||f[2]!==w?(a=p?.find(e=>e.id===w)?.installCommand,f[1]=p,f[2]=w,f[3]=a):a=f[3];let E=a??m;f[4]!==p||f[5]!==w?(n=e=>{if(!p)return;let t=p.findIndex(e=>e.id===w);if(-1===t)return;let r=null;if("ArrowRight"===e.key||"ArrowDown"===e.key?r=(t+1)%p.length:("ArrowLeft"===e.key||"ArrowUp"===e.key)&&(r=(t-1+p.length)%p.length),null===r)return;e.preventDefault();let o=p[r];o&&(S(o.id),N.current[r]?.focus())},f[4]=p,f[5]=w,f[6]=n):n=f[6];let j=n;f[7]!==j||f[8]!==p||f[9]!==w?(i=p?(0,t.jsx)("div",{className:"flex items-center gap-1 rounded-md border border-border bg-muted p-0.5",role:"radiogroup","aria-label":"Install command language",onKeyDown:j,children:p.map((e,r)=>{let o=e.id===w;return(0,t.jsxs)("button",{ref:e=>{N.current[r]=e},type:"button",role:"radio","aria-checked":o,tabIndex:o?0:-1,onClick:()=>S(e.id),className:`flex flex-1 items-center justify-center gap-1 rounded-sm px-2 py-1.5 text-overline font-medium transition-colors focus-visible:border-focus-border focus-visible:shadow-focus focus-visible:outline-none ${o?"bg-background text-accent-foreground shadow-sm":"text-muted-foreground hover:text-accent-foreground"}`,children:[e.label,e.isBeta?(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)(x.Badge,{size:"sm",variant:"info",className:"py-px font-normal",children:"Beta"})]}):null]},e.id)})}):null,f[7]=j,f[8]=p,f[9]=w,f[10]=i):i=f[10],f[11]!==E?(s=(0,t.jsx)("code",{className:"flex-1 overflow-x-auto bg-transparent font-mono text-overline leading-normal whitespace-nowrap text-foreground",children:E}),f[11]=E,f[12]=s):s=f[12],f[13]!==E||f[14]!==C?(l=()=>void C(E),f[13]=E,f[14]=C,f[15]=l):l=f[15];let L=k?"Copied to clipboard":`Copy ${E} to clipboard`;return f[16]!==k?(c=k?(0,t.jsx)(b.Check,{className:"size-3.5","aria-hidden":"true"}):(0,t.jsx)(y.Copy,{className:"size-3.5","aria-hidden":"true"}),f[16]=k,f[17]=c):c=f[17],f[18]!==l||f[19]!==L||f[20]!==c?(d=(0,t.jsx)("button",{type:"button",onClick:l,"aria-label":L,className:"shrink-0 rounded-sm text-faint transition-colors hover:text-accent-foreground focus-visible:border-focus-border focus-visible:shadow-focus focus-visible:outline-none",children:c}),f[18]=l,f[19]=L,f[20]=c,f[21]=d):d=f[21],f[22]!==s||f[23]!==d?(u=(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-md border border-border bg-doc-surface px-3.5 py-3",children:[s,d]}),f[22]=s,f[23]=d,f[24]=u):u=f[24],f[25]!==u||f[26]!==i?(h=(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[i,u]}),f[25]=u,f[26]=i,f[27]=h):h=f[27],h}let C=[{title:"API",description:`One OpenAI-compatible endpoint for ${o.MarketingMetrics.ModelCount} models across ${o.MarketingMetrics.ProviderCount} providers, with automatic fallback when a provider fails.`,href:"/docs/quickstart",icon:p.Zap,installCommand:"https://openrouter.ai/api/v1"},{title:"Client SDKs",description:"The same typed client in TypeScript, Python, and Go — streaming, tools, and structured output behave identically in every language.",href:"/docs/client-sdks/overview",icon:f,languages:g.CLIENT_SDK_LANGUAGES},{title:"Agent SDK",description:"Type-safe tools, multi-turn loops, streaming, and stop conditions. Build production agents that route across every provider.",href:"/docs/agent-sdk/overview",icon:d.Bot,languages:g.AGENT_SDK_LANGUAGES},{title:"Terraform Provider",description:"Manage OpenRouter as infrastructure-as-code with repeatable, reviewable configuration for your platform.",href:"/docs/guides/overview/terraform",icon:l.Blocks,installCommand:'source = "OpenRouterTeam/openrouter"'},{title:"DevTools",description:"Capture SDK telemetry in development and replay every request, token count, and error in a local web viewer.",href:"/docs/client-sdks/dev-tools/devtools",icon:h,installCommand:"npm install -g @openrouter/cli"},{title:"MCP Server",description:`Give any Model Context Protocol client — Claude Code, Cursor, or your own — access to all ${o.MarketingMetrics.ModelCount} models.`,href:"/docs/guides/overview/mcp-server",icon:m.Plug,installCommand:"https://mcp.openrouter.ai/mcp"},{title:"Cookbook",description:"Working recipes for agent harnesses, human-in-the-loop tools, evals, cost control, and image generation.",href:"/docs/cookbook/get-started/quickstart",icon:c.BookOpen}];function w(e){let o,l,c,d,u,h,f,m,p,g,x=(0,r.c)(27),{product:v}=e,{title:b,description:y,href:_,icon:C,installCommand:w,languages:S}=v,N=(0,i.usePosthogClient)();return x[0]!==C?(o=(0,t.jsx)("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground transition-colors group-hover:bg-accent-subtle group-hover:text-accent-foreground",children:(0,t.jsx)(C,{className:"size-5","aria-hidden":"true"})}),x[0]=C,x[1]=o):o=x[1],x[2]!==_||x[3]!==N||x[4]!==b?(l=()=>{N.capture(a.PostHogEvent.ClickDocsButton,{source:"developers_platform_card",destination:_,product:b})},x[2]=_,x[3]=N,x[4]=b,x[5]=l):l=x[5],x[6]!==_||x[7]!==l||x[8]!==b?(c=(0,t.jsx)("h3",{className:"text-[length:var(--text-heading)] font-semibold leading-snug",children:(0,t.jsx)("a",{href:_,className:'text-foreground no-underline transition-colors after:absolute after:inset-0 after:content-[""] hover:text-accent-foreground focus-visible:outline-none',onClick:l,children:b})}),x[6]=_,x[7]=l,x[8]=b,x[9]=c):c=x[9],x[10]!==o||x[11]!==c?(d=(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o,c]}),x[10]=o,x[11]=c,x[12]=d):d=x[12],x[13]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(s.ArrowUpRight,{className:"size-4 shrink-0 text-faint transition-colors group-hover:text-accent-foreground","aria-hidden":"true"}),x[13]=u):u=x[13],x[14]!==d?(h=(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[d,u]}),x[14]=d,x[15]=h):h=x[15],x[16]!==y?(f=(0,t.jsx)("p",{className:"flex-1 text-[length:var(--text-body)] leading-relaxed text-muted-foreground",children:y}),x[16]=y,x[17]=f):f=x[17],x[18]!==S?(m=S?(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)(k,{command:S[0].installCommand,languages:S,defaultLanguage:S[0].id})}):null,x[18]=S,x[19]=m):m=x[19],x[20]!==w?(p=w?(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)(k,{command:w})}):null,x[20]=w,x[21]=p):p=x[21],x[22]!==h||x[23]!==f||x[24]!==m||x[25]!==p?(g=(0,t.jsxs)(n.Card,{className:"group relative flex h-full flex-col gap-4 p-6 transition-colors hover:bg-card-hover has-[a:focus-visible]:border-focus-border has-[a:focus-visible]:shadow-focus",children:[h,f,m,p]}),x[22]=h,x[23]=f,x[24]=m,x[25]=p,x[26]=g):g=x[26],g}function S(e){return(0,t.jsx)(w,{product:e},e.title)}e.s(["DevelopersPlatform",0,function(){let e,o,a=(0,r.c)(2);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"mx-auto flex max-w-2xl flex-col gap-3 text-center",children:[(0,t.jsx)("h2",{className:"font-brand text-[length:var(--text-display)] font-bold tracking-tight text-foreground md:text-3xl",children:"Everything you need to ship"}),(0,t.jsx)("p",{className:"text-[length:var(--text-section)] leading-relaxed text-muted-foreground",children:"Seven products, one API key. Start with a single request and grow into a production agent without changing providers."})]}),a[0]=e):e=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsxs)("section",{className:"flex w-full max-w-7xl flex-col gap-10 md:gap-12",children:[e,(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:C.map(S)})]}),a[1]=o):o=a[1],o}],726475)},33425,e=>{"use strict";let t="typescript",r="python";e.s(["AGENT_SDK_LANGUAGES",0,[{id:t,label:"TypeScript",installCommand:"npm i @openrouter/agent"},{id:r,label:"Python",installCommand:"pip install openrouter-agent-sdk",isBeta:!0},{id:"go",label:"Go",installCommand:"go get github.com/OpenRouterTeam/go-agent",isBeta:!0}],"CLIENT_SDK_LANGUAGES",0,[{id:t,label:"TypeScript",installCommand:"npm i @openrouter/sdk"},{id:r,label:"Python",installCommand:"pip install openrouter"},{id:"go",label:"Go",installCommand:"go get github.com/OpenRouterTeam/go-sdk",isBeta:!0}],"DEVELOPERS_DOCS_URL",0,"/docs/quickstart"])},378643,e=>{"use strict";var t=e.i(222666),r=e.i(505962),o=e.i(850658),a=e.i(779100);e.i(406201);var n=e.i(806024),i=e.i(462517);let s="/workspaces/default/keys";e.s(["ApiKeysLink",0,function(e){let l,c,d=(0,r.c)(8),{isLoaded:u,isSignedIn:h}=(0,o.useAuth)(),f=(0,a.useLocale)();d[0]!==u||d[1]!==h||d[2]!==f?(l=function(e,t){let r;return e.isLoaded?e.isSignedIn?{href:s,prefetch:void 0}:{href:(r=encodeURIComponent((0,i.localizeHref)(s,t)),`/sign-in?redirect_url=${r}`),prefetch:void 0}:{href:s,prefetch:!1}}({isLoaded:u,isSignedIn:h},f),d[0]=u,d[1]=h,d[2]=f,d[3]=l):l=d[3];let m=l;return d[4]!==e||d[5]!==m.href||d[6]!==m.prefetch?(c=(0,t.jsx)(n.Link,{...e,href:m.href,prefetch:m.prefetch}),d[4]=e,d[5]=m.href,d[6]=m.prefetch,d[7]=c):c=d[7],c}],378643)}]); //# sourceMappingURL=2bt6slvxbeq8_.js.map //# chunkId=01a09b5f-098c-7863-8e0c-367c326654a5