1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32365,54746,63579,84627],{389:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>F,default:()=>G});var n=s(37876),r=s(77328),a=s.n(r),i=s(89099),l=s(14232),o=s(48230),c=s.n(o),d=s(14e3);function x(e){let{model:t}=e,s=(0,d.useParams)(),r=null==s?void 0:s.cid,a=null==s?void 0:s.mid;return(0,n.jsxs)("header",{className:"flex flex-col px-4 md:px-8 py-8 border-b border-zinc-700 md:flex-row md:items-center gap-lh pb-4 bg-gradient-to-br from-zinc-800/50 via-zinc-800/30 to-primary-900/30","aria-label":t.title,children:[(0,n.jsxs)("hgroup",{className:"flex-grow flex flex-col",children:[(0,n.jsx)("div",{className:"flex flex-col md:flex-row md:items-center gap-2 md:gap-3",children:(0,n.jsxs)("h3",{translate:"no",className:"font-medium tracking-wide",children:[(0,n.jsx)("span",{className:"text-primary-500",children:(0,n.jsx)(c(),{href:"/ai-api/".concat(r),className:"underline",children:r})}),(0,n.jsx)("span",{className:"text-zinc-300 mx-1",children:"/"}),(0,n.jsx)("span",{className:"block md:inline-block",children:a})]})}),(0,n.jsx)("p",{className:"mt-1 max-w-xl text-zinc-300",children:t.description}),(0,n.jsxs)("ul",{className:"mt-3 flex gap-4 items-center flex-wrap",children:[(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)("div",{"data-component":"ModelStatusIndicator","data-props":"react-component-props-f21afa87-a38a-47d9-8764-5a50fc2f4d35",children:(0,n.jsxs)("a",{className:"relative overflow-hidden flex font-semibold no-default no-focus rounded-full px-3 py-1 items-center gap-2 text-sm hover:text-zinc-200 focus:text-zinc-200 bg-green-700/35 focus:bg-green-700/50 hover:bg-green-700/50 text-green-500",href:"https://replicate.com/docs/reference/how-does-replicate-work#cold-boots",children:[(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",className:"inline-block fill-current w-2 h-2 relative z-1",children:(0,n.jsx)("path",{d:"M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z"})}),(0,n.jsx)("span",{className:"relative z-1",children:"Warm"})]})})}),(0,n.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("span",{children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),(0,n.jsx)("path",{d:"M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z"})]})}),(0,n.jsx)("span",{className:"text-sm",children:"Public"})]}),(0,n.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("svg",{className:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:(0,n.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.322.75a10.75 10.75 0 00-7.373 2.926l-1.304 1.23A23.743 23.743 0 0010.103 6.5H5.066a1.75 1.75 0 00-1.5.85l-2.71 4.514a.75.75 0 00.49 1.12l4.571.963c.039.049.082.096.129.14L8.04 15.96l1.872 1.994c.044.047.091.09.14.129l.963 4.572a.75.75 0 001.12.488l4.514-2.709a1.75 1.75 0 00.85-1.5v-5.038a23.741 23.741 0 001.596-1.542l1.228-1.304a10.75 10.75 0 002.925-7.374V2.499A1.75 1.75 0 0021.498.75h-1.177zM16 15.112c-.333.248-.672.487-1.018.718l-3.393 2.262.678 3.223 3.612-2.167a.25.25 0 00.121-.214v-3.822zm-10.092-2.7L8.17 9.017c.23-.346.47-.685.717-1.017H5.066a.25.25 0 00-.214.121l-2.167 3.612 3.223.679zm8.07-7.644a9.25 9.25 0 016.344-2.518h1.177a.25.25 0 01.25.25v1.176a9.25 9.25 0 01-2.517 6.346l-1.228 1.303a22.248 22.248 0 01-3.854 3.257l-3.288 2.192-1.743-1.858a.764.764 0 00-.034-.034l-1.859-1.744 2.193-3.29a22.248 22.248 0 013.255-3.851l1.304-1.23zM17.5 8a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zm-11 13c.9-.9.9-2.6 0-3.5-.9-.9-2.6-.9-3.5 0-1.209 1.209-1.445 3.901-1.49 4.743a.232.232 0 00.247.247c.842-.045 3.534-.281 4.743-1.49z"})}),(0,n.jsx)("span",{className:"text-sm",children:"95.3M runs"})]}),(0,n.jsx)("li",{children:(0,n.jsx)("div",{"data-component":"ModelPricePopover","data-props":"react-component-props-a3f2251c-4e19-4f6d-9b2b-bd92f8b6e825",children:(0,n.jsxs)("div",{className:"text-sm flex gap-2 items-center",children:[(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"
1currentColor",viewBox:"0 0 256 256",className:"w-4 h-4",children:(0,n.jsx)("path",{d:"M128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152ZM240,56H16a8,8,0,0,0-8,8V192a8,8,0,0,0,8,8H240a8,8,0,0,0,8-8V64A8,8,0,0,0,240,56ZM193.65,184H62.35A56.78,56.78,0,0,0,24,145.65v-35.3A56.78,56.78,0,0,0,62.35,72h131.3A56.78,56.78,0,0,0,232,110.35v35.3A56.78,56.78,0,0,0,193.65,184ZM232,93.37A40.81,40.81,0,0,1,210.63,72H232ZM45.37,72A40.81,40.81,0,0,1,24,93.37V72ZM24,162.63A40.81,40.81,0,0,1,45.37,184H24ZM210.63,184A40.81,40.81,0,0,1,232,162.63V184Z"})}),(0,n.jsx)("div",{className:"inline-flex items-center gap-1",children:"$0.003 per image"})]})})}),(0,n.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("i",{children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,n.jsx)("div",{className:"text-sm",children:(0,n.jsx)("div",{"data-component":"TextTooltip","data-props":"react-component-props-31876b58-09b1-4b45-9179-b81534e5c378",children:(0,n.jsx)("div",{className:"underline decoration-dotted cursor-help ",tabIndex:0,children:"Commercial use"})})})]}),(0,n.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("i",{children:(0,n.jsx)("svg",{className:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0020 4.77 5.07 5.07 0 0019.91 1S18.73.65 16 2.48a13.38 13.38 0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 005 4.77a5.44 5.44 0 00-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 009 18.13V22"})})}),(0,n.jsx)("a",{className:"text-sm",href:"https://github.com/replicate/cog-flux",target:"_blank",children:"GitHub"})]}),(0,n.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("i",{children:(0,n.jsxs)("svg",{className:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z"}),(0,n.jsx)("path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z"}),(0,n.jsx)("path",{d:"M7 21h10"}),(0,n.jsx)("path",{d:"M12 3v18"}),(0,n.jsx)("path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2"})]})}),(0,n.jsx)("a",{className:"text-sm",href:"https://github.com/black-forest-labs/flux/blob/main/model_licenses/LICENSE-FLUX1-schnell",target:"_blank",children:"License"})]})]})]}),(0,n.jsx)("div",{className:"flex flex-col lg:flex-row gap-4 flex-shrink-0 sm:mt-0 mt-6",children:(0,n.jsx)(c(),{className:"w-full inline-flex items-center justify-center gap-2 border rounded-lg border-transparent px-3 py-2 text-base leading-6 font-semibold text-white bg-gradient-to-r from-indigo-500 to-purple-500 transition-all duration-150 ease-in-out",href:"/ai-api/".concat(r,"/").concat(a,"/api"),children:(0,n.jsx)("span",{children:"Run with an API"})})})]})}var m=s(39817);let h=()=>{let[e,t]=(0,l.useState)("npm"),s={npm:"npm install --save @basedlabs/client",yarn:"yarn add @basedlabs/client",pnpm:"pnpm add @basedlabs/client",bun:"bun add @basedlabs/client"};return(0,n.jsxs)("div",{className:"not-prose w-full space-y-2",children:[(0,n.jsx)("div",{dir:"ltr","data-orientation":"horizontal",children:(0,n.jsx)("div",{role:"tablist","aria-orientation":"horizontal",className:"inline-flex items-center justify-center [&_span.tab-indicator]:hidden rounded border border-zinc-700 bg-surface-50 p-0.5 [&>button]:rounded data-[state=active]:[&>button]:bg-zinc-700 data-[state=active]:[&>button]:text-primary text-sm [&>button]:px-2 [&>button]:py-1.5",tabIndex:0,"data-orientation":"horizontal",children:Object.keys(s).map(s=>(0,n.jsxs)("button",{type:"button",role:"tab","aria-selected":e===s,"data-state":e===s?"active":"inactive",className:"inline-flex items-center justify-center whitespace-nowrap px-6 transition-all md:px-4 min-w-fit md:min-w-[6rem] font-medium text-content-light hover:bg-zinc-800/50 hover:text-primary disabled:pointer-events-none disabled:opacity-50 focus-ring group/tab relative",onClick:()=>t(s),children:[s,(0,n.jsx)("span",{"data-role":"tab-indicator",className:"tab-indicator absolute bottom-[-1px] left-0 right-0 h-[2px] opacity-0 group-data-[state=active]/tab:opacity-100 duration-250 transition-opacity ease-in bg-primary"})]},s))})}),(0,n.jsxs)("div",{className:"group relative rounded border border-zinc-700 bg-surface-200 w-full font-mono text-sm",children:[(0,n.jsx)("div",{className:"absolute right-0 top-0 p-2 opacity-50 transition-opacity group-hover:opacity-100",children:(0,n.jsx)("button",{className:"inline-flex items-center justify-center whitespace-nowrap rounded border font-heading font-medium transition-all focus-ring disabled:pointer-events-none disabled:opacity-50 border-transparent bg-transparent text-content-base hover:bg-surface-alpha-strong hover:text-content-strong data-[state=open]:bg-surface-alpha-strong h-9 w-9 [&>svg]:w-4 [&>svg]:h-4 [&>svg]:stroke-current opacity-70 hover:opacity-100",name:"copyCode","aria-label":"Copy",children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-files icon-icon-sm me-1",children:[(0,n.jsx)("path",{d:"M20 7h-3a2 2 0 0 1-2-2V2"}),(0,n.jsx)("path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"}),(0,n.jsx)("path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"})]})})}),(0,n.jsx)("pre",{className:"p-4",children:(0,n.jsx)("code",{children:s[e]})})]})]})};var p=s(70008),u=s.n(p);s(81778),s(65791),s(73974),s(79892),s(97291);let g=e=>{let{text:t,language:s="javascript"}=e,[r,a]=(0,l.useState)(!1);(0,l.useEffect)(()=>{u().highlightAll()},[t,s]);let i=async()=>{try{await navigator.clipboard.writeText(t),a(!0),setTimeout(()=>a(!1),2e3)}catch(e){console.error("Failed to copy text:",e)}};return(0,n.jsx)("div",{className:"not-prose w-full space-y-2",children:(0,n.jsxs)("div",{className:"group relative rounded border border-zinc-700 bg-surface-200 w-full font-mono text-sm",children:[(0,n.jsx)("div",{className:"absolute right-0 top-0 p-2 opacity-50 transition-opacity group-hover:opacity-100",children:(0,n.jsx)("button",{onClick:i,className:"inline-flex items-center justify-center whitespace-nowrap rounded border font-heading font-medium transition-all focus-ring disabled:pointer-events-none disabled:opacity-50 border-transparent bg-transparent text-content-base hover:bg-surface-alpha-strong hover:text-content-strong data-[state=open]:bg-surface-alpha-strong h-9 w-9 [&>svg]:w-4 [&>svg]:h-4 [&>svg]:stroke-current opacity-70 hover:opacity-100",name:"copyCode","aria-label":r?"Copied!":"Copy",children:r?(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M20 6L9 17l-5-5"})}):(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-files icon-icon-sm me-1",children:[(0,n.jsx)("path",{d:"M20 7h-3a2 2 0 0 1-2-2V2"}),(0,n.jsx)("path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"}),(0,n.jsx)("path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"})]})})}),(0,n.jsx)("pre",{className:'!whitespace-pre-wrap !break-words !overflow-x-hidden background-trans
1parent text-[hsl(220,14%,71%)] text-shadow-[0_1px_rgba(0,0,0,0.3)] font-["Fira_Code","Fira_Mono",Menlo,Consolas,"DejaVu_Sans_Mono",monospace] direction-ltr text-left word-spacing-normal leading-[1.25rem] tab-[2] [-webkit-hyphens:none] [-moz-hyphens:none] [-ms-hyphens:none] hyphens-none p-4 m-0 rounded-[0.3em]',children:(0,n.jsx)("code",{className:"language-".concat(s," !whitespace-pre-wrap !break-words !overflow-x-hidden text-sm block w-full"),children:t})})]})})},f=()=>(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsxs)("h3",{id:"api-call",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 text-content-strong",children:[(0,n.jsx)("span",{children:"1. Calling the API"}),(0,n.jsx)(c(),{href:"#api-call-install",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsxs)("h3",{id:"api-call-install",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-strong text-lg",children:[(0,n.jsx)("span",{children:"Install the client"}),(0,n.jsx)(c(),{href:"#api-call-install",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsx)("div",{className:"max-w-full",children:(0,n.jsx)("p",{className:"text-zinc-400",children:"The client provides a convenient way to interact with the model API."})}),(0,n.jsx)(h,{}),(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsxs)("h3",{id:"api-call-setup",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-strong text-lg",children:[(0,n.jsx)("span",{children:"Setup your API Key"}),(0,n.jsx)("a",{href:"#api-call-setup",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsx)("div",{className:"max-w-full",children:(0,n.jsxs)("p",{className:"text-zinc-400",children:["Get your API key from the"," ",(0,n.jsx)(c(),{href:"/dashboard/api-keys",className:"text-primary-400 hover:text-primary-300 underline",target:"_blank",rel:"noopener noreferrer",children:"API Keys dashboard"})," ","and set"," ",(0,n.jsx)("code",{className:'text-zinc-100 font-bold before:content-["`"] after:content-["`"]',children:"BASEDLABS_KEY"})," ","as an environment variable in your runtime."]})}),(0,n.jsx)("div",{className:"not-prose w-full space-y-2",children:(0,n.jsxs)("div",{className:"group relative rounded border border-zinc-700 bg-surface-200 w-full font-mono text-sm",children:[(0,n.jsx)("div",{className:"absolute right-0 top-0 p-2 opacity-50 transition-opacity group-hover:opacity-100",children:(0,n.jsx)("button",{className:"inline-flex items-center justify-center whitespace-nowrap rounded border font-heading font-medium transition-all focus-ring disabled:pointer-events-none disabled:opacity-50 border-transparent bg-transparent text-content-base hover:bg-surface-alpha-strong hover:text-content-strong data-[state=open]:bg-surface-alpha-strong h-9 w-9 [&>svg]:w-4 [&>svg]:h-4 [&>svg]:stroke-current opacity-70 hover:opacity-100",name:"copyCode","aria-label":"Copy",children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-files icon-icon-sm me-1",children:[(0,n.jsx)("path",{d:"M20 7h-3a2 2 0 0 1-2-2V2"}),(0,n.jsx)("path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"}),(0,n.jsx)("path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"})]})})}),(0,n.jsx)(g,{text:'export BASEDLABS_KEY="YOUR_API_KEY"'})]})})]}),(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsxs)("h3",{id:"api-call-submit-request",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-strong text-lg",children:[(0,n.jsx)("span",{children:"Submit a request"}),(0,n.jsx)("a",{href:"#api-call-submit-request",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsx)("div",{className:"max-w-full",children:(0,n.jsx)("p",{className:"text-zinc-400",children:"The client API handles the API submit protocol. It will handle the request status updates and return the result when the request is completed."})}),(0,n.jsx)("div",{className:"not-prose w-full space-y-2",children:(0,n.jsxs)("div",{className:"group relative rounded border border-zinc-700 bg-surface-200 w-full font-mono text-sm",children:[(0,n.jsx)("div",{className:"absolute right-0 top-0 p-2 opacity-50 transition-opacity group-hover:opacity-100",children:(0,n.jsx)("button",{className:"inline-flex items-center justify-center whitespace-nowrap rounded border font-heading font-medium transition-all focus-ring disabled:pointer-events-none disabled:opacity-50 border-transparent bg-transparent text-content-base hover:bg-surface-alpha-strong hover:text-content-strong data-[state=open]:bg-surface-alpha-strong h-9 w-9 [&>svg]:w-4 [&>svg]:h-4 [&>svg]:stroke-current opacity-70 hover:opacity-100",name:"copyCode","aria-label":"Copy",children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-files icon-icon-sm me-1",children:[(0,n.jsx)("path",{d:"M20 7h-3a2 2 0 0 1-2-2V2"}),(0,n.jsx)("path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"}),(0,n.jsx)("path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"})]})})}),(0,n.jsx)(g,{text:'import { basedlabs } from "@basedlabs/client";\n\nconst result = await basedlabs.subscribe("basedlabs/flux/dev", {\n input: {\n prompt: "Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word \\"FLUX\\" is painted over it in big, white brush strokes with visible texture."\n },\n logs: true,\n onQueueUpdate: (update) => {\n if (update.status === "IN_PROGRESS") {\n update.logs.map((log) => log.message).forEach(console.log);\n }\n },\n});\nconsole.log(result.data);\nconsole.log(result.requestId);'})]})})]})]})]}),b=()=>(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-triangle-alert icon-md min-w-fit flex-none",children:[(0,n.jsx)("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),(0,n.jsx)("path",{d:"M12 9v4"}),(0,n.jsx)("path",{d:"M12 17h.01"})]}),j=()=>(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-files icon-icon-sm me-1",children:[(0,n.jsx)("path",{d:"M20 7h-3a2 2 0 0 1-2-2V2"}),(0,n.jsx)("path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"}),(0,n.jsx)("path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"})]}),v=()=>(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsx)("div",{"data-orientation":"horizontal",role:"none",className:"shrink-0 bg-zinc-700 h-[1px] min-w-full"}),(0,n.jsxs)("h3",{id:"auth",className:"flex flex-row scroll-mt-20 space-x-2 pt-2",children:[(0,n.jsx)("span",{children:"2. Authentication"}),(0,n.jsx)("a",{href:"#auth",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsx)("div",{className:"max-w-full",children:(0,n.jsxs)("p",{className:"text-zinc-400",children:["The API uses an API Key for authentication. You can get your API key from the"," ",(0,n.jsx)(c(),{href:"/dashboard/api-keys",className:"text-primary-400 hover:text-primary-300 underline",target:"_blank",rel:"noopener noreferrer",children:"API Keys dashboard"}),". Once you have your key, it is recommended to set the"," ",(0,n.jsx)("code",{className:'text-zinc-100 font-bold before:content-["`"] after:content-["`"]',children:"BASEDLABS_KEY"})," ","environment variable in your runtime when possible."]})}),(0,n.jsxs)("h3",{id:"auth-api-key",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-strong text-lg",children:[(0,n.jsx)("span",{children:"API Key"}),(0,n.jsx)("a",{href:"#auth-api-key",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsx)("div",{className:"space-y-8 text-zinc-400",children:"In case your app is running in an environment where you cannot set environment variables, you can set the API Key manually as a client configuration."}),(0,n.jsx)("div",{className:"space-y-8",children:(0,n.jsx)("div",{className:"not-prose w-full space-y-2",children:(0,n.jsxs)("div",{className:"group relative rounded border border-zinc-700 bg-surface-200 w-full font-mono text-sm",children:[(0,n.jsx)("div",{className:"absolute right-0 top-0 p-2 opacity-50 transition-opacity group-hover:opacity-100",children:(0,n.jsx)("button",{className:"inline-flex items-center justify-center whitespace-nowrap rounded border font-heading font-medium transition-all focus-ring disabled:pointer-events-none disabled:opacity-50 border-transparent bg-transparent text-content-base hover:bg-surface-alpha-strong hover:text-content-strong data-[state=open]:bg-surface-alpha-strong h-9 w-9 [&>svg]:w-4 [&>svg]:h-4 [&>svg]:stroke-current opacity-70 hover:opacity-100",name:"copyCode","aria-label":"Copy",children:(0,n.jsx)(j,{})})}),(0,n.jsx)(g,{text:'import { basedlabs } from "@basedlabs/client";\n\nbasedlabs.config({\n credentials: "YOUR_BASEDLABS_KEY"\n});'})]})})}),(0,n.jsxs)("div",{role:"alert",className:"space-x-2 text-content-base [&>svg]:icon-lg [&>svg]:text-current relative w-full flex flex-row items-start justify-start [&>svg]:stroke-warning [&_.alert-title]:text-amber-500 [&_.alert-title]:dark:text-warning rounded border border-zinc-700 p-4 bg-black/[1%] dark:bg-black/5",children:[(0,n.jsx)(b,{}),(0,n.jsxs)("div",{className:"flex-1 overflow-hidden",children:[(0,n.jsx)("h5",{className:"alert-title mb-2 pt-1 font-heading text-lg font-medium leading-none tracking-tight",children:"Protect your API Key"}),(0,n.jsx)("div",{className:"text-content-light [&_p]:leading-relaxed text-sm max-w-full",children:(0,n.jsxs)("p",{className:"text-zinc-400",children:["When running code on the client-side (e.g. in a browser, mobile app or GUI applications), make sure to not expose your"," ",(0,n.jsx)("code",{className:'text-zinc-100 font-bold before:content-["`"] after:content-["`"]',children:"BASEDLABS_KEY"}),". Instead, ",(0,n.jsx)("strong",{children:"use a server-side proxy"})," to make requests to the API. For more information, check out our"," ",(0,n.jsx)(c(),{href:"/docs/model-endpoints/server-side",children:"server-side integration guide"}),"."]})})]})]})]}),w=()=>(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsx)("div",{className:"shrink-0 bg-zinc-700 h-[1px] min-w-full",role:"none"}),(0,n.jsxs)("h3",{id:"files",className:"flex flex-row scroll-mt-20 space-x-2 pt-2",children:[(0,n.jsx)("span",{children:"4. Files"}),(0,n.jsx)("a",{href:"#files",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]})]}),y=()=>(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsx)("div",{className:"shrink-0 bg-zinc-700 h-[1px] min-w-full",role:"none"}),(0,n.jsxs)("h3",{id:"queue",className:"flex scroll-mt-20 flex-row space-x-2 pt-2",children:[(0,n.jsx)("span",{children:"3. Queue"}),(0,n.jsx)("a",{href:"#queue",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsxs)("div",{role:"alert",className:"space-x-2 text-content-base [&>svg]:icon-lg [&>svg]:text-current relative w-full flex flex-row items-start justify-start [&>svg]:stroke-warning [&_.alert-title]:text-amber-500 [&_.alert-title]:dark:text-warning rounded border border-zinc-700 p-4 bg-black/[1%] dark:bg-black/5",children:[(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-lightbulb icon-md min-w-fit flex-none",children:[(0,n.jsx)("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"}),(0,n.jsx)("path",{d:"M9 18h6"}),(0,n.jsx)("path",{d:"M10 22h4"})]}),(0,n.jsxs)("div",{className:"flex-1 overflow-hidden",children:[(0,n.jsx)("h5",{className:"alert-title mb-2 pt-1 font-heading text-lg font-medium leading-none tracking-tight",children:"Long-running requests"}),(0,n.jsx)("div",{className:"text-content-light [&_p]:leading-relaxed text-sm max-w-full",children:(0,n.jsxs)("p",{className:"text-zinc-400",children:["For long-running requests, such as ",(0,n.jsx)("em",{children:"training"})," jobs or models with slower inference times, it is recommended to check the"," ",(0,n.jsx)(c(),{href:"/docs/model-endpoints/queue",children:"Queue"})," status and rely on"," ",(0,n.jsx)(c(),{href:"/docs/model-endpoints/webhooks",children:"Webhooks"}),"instead of blocking while waiting for the result."]})})]})]}),(0,n.jsxs)("h3",{id:"queue-submit",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-strong text-lg",children:[(0,n.jsx)("span",{children:"Submit a request"}),(0,n.jsx)("a",{href:"#queue-submit",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsx)("div",{className:"max-w-full",children:(0,n.jsx)("p",{className:"text-zinc-400",children:"The client API provides a convenient way to submit requests to the model."})}),(0,n.jsx)(g,{text:'import { basedlabs } from "@basedlabs/client";\n\nconst { request_id } = await basedlabs.queue.submit("basedlabs/flux/dev", {\n input: {\n prompt: "Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word \\"FLUX\\" is painted over it in big, white brush strokes with visible texture."\n },\n webhookUrl: "https://optional.webhook.url/for/results",\n});'}),(0,n.jsxs)("h3",{id:"queue-status",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-strong text-lg",children:[(0,n.jsx)("span",{children:"Fetch request status"}),(0,n.jsx)("a",{href:"#queue-status",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsx)("div",{className:"max-w-full",children:(0,n.jsx)("p",{className:"text-zinc-400",children:"You can fetch the status of a request to check if it is completed or still in progress."})}),(0,n.jsx)(g,{text:'import { basedlabs } from "@basedlabs/client";\n\nconst status = await basedlabs.queue.status("basedlabs/flux/dev", {\n requestId: "764cabcf-b745-4b3e-ae38-1200304cf45b",\n logs: true,\n});'}),(0,n.jsxs)("h3",{id:"queue-result",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-strong text-lg",children:[(0,n.jsx)("span",{children:"Get the result"}),(0,n.jsx)("a",{href:"#queue-result",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsx)("div",{className:"max-w-full",children:(0,n.jsxs)("p",{className:"text-zinc-400",children:["Once the request is completed, you can fetch the result. See the"," ",(0,n.jsx)("a",{href:"#schema-output",children:"Output Schema"})," for the expected result format."]})}),(0,n.jsx)(g,{text:'import { basedlabs } from "@basedlabs/client";\n\nconst result = await basedlabs.queue.result("basedlabs/flux/dev", {\n requestId: "764cabcf-b745-4b3e-ae38-1200304cf45b"\n});\nconsole.log(result.data);\nconsole.log(result.requestId);'})]}),N={Image:{name:"Image",properties:[{name:"url",type:"string",description:"URL of the image"},{name:"width",type:"integer",description:"Width of the image"},{name:"height",type:"integer",description:"Height of the image"},{name:"content_type",type:"string"
1,description:"Content type of the image",default:"image/jpeg"}]},ImageSize:{name:"ImageSize",properties:[{name:"width",type:"integer",description:"The width of the generated image",default:512},{name:"height",type:"integer",description:"The height of the generated image",default:512}]}},k=e=>{var t;let{param:s,isInput:r=!1}=e,a=r?s:null,i=r?null:s,l=s.type in N;return(0,n.jsxs)("div",{className:"flex flex-col items-start justify-start space-y-2",children:[(0,n.jsxs)("div",{className:"select-none space-x-1",children:[(0,n.jsx)("code",{className:"leading-2 select-text rounded bg-primary-900/90 px-2 py-1 align-middle text-sm font-semibold text-content-base",children:s.name}),(0,n.jsx)("span",{className:"select-auto",children:"\xa0"}),l?(0,n.jsx)("a",{href:"#type-".concat(s.type.toLowerCase()),className:"border-b border-dotted border-zinc-400 hover:border-zinc-200",children:(0,n.jsxs)("code",{className:"select-text text-sm text-zinc-400",children:[s.type,!r&&(null==i?void 0:i.isList)&&"[]"]})}):(0,n.jsxs)("code",{className:"select-text text-sm text-zinc-400",children:[s.type,!r&&(null==i?void 0:i.isList)&&"[]"]}),r&&(null==a?void 0:a.required)&&(0,n.jsx)("span",{className:"font-mono text-xs text-primary-400",children:"* required"})]}),(0,n.jsxs)("div",{className:"max-w-full ps-2 dark:prose-invert md:ps-3 lg:ps-4",children:[(0,n.jsx)("p",{className:"mb-2 text-zinc-300 text-sm",children:s.description}),r&&a&&(0,n.jsxs)(n.Fragment,{children:[("number"===a.type||"float"===a.type)&&(void 0!==a.min||void 0!==a.max)&&(0,n.jsxs)("p",{className:"mb-2 text-zinc-300 text-sm",children:[void 0!==a.min&&"Minimum: ".concat(a.min),void 0!==a.min&&void 0!==a.max&&", ",void 0!==a.max&&"Maximum: ".concat(a.max)]}),("select"===a.type&&a.choices||"enum"===a.type&&a.choices)&&(0,n.jsxs)("p",{className:"mb-2 text-zinc-400 text-sm",children:["Possible values:"," ",(0,n.jsxs)("code",{className:"text-zinc-200",children:["`",null==(t=a.choices)?void 0:t.join(", "),"`"]})]}),void 0!==a.default&&(0,n.jsxs)("p",{className:"mb-2 text-zinc-400 text-sm",children:["Default value:"," ",(0,n.jsx)("code",{className:"text-zinc-200",children:String(a.default)})]})]})]})]})},z=e=>{let{property:t}=e;return(0,n.jsxs)("div",{className:"flex flex-col items-start justify-start space-y-2",children:[(0,n.jsxs)("div",{className:"select-none space-x-1",children:[(0,n.jsx)("code",{className:"leading-2 select-text rounded bg-primary-900/90 px-2 py-1 align-middle text-sm font-semibold text-content-base",children:t.name}),(0,n.jsx)("span",{className:"select-auto",children:"\xa0"}),(0,n.jsx)("code",{className:"select-text text-sm text-zinc-400",children:t.type})]}),(0,n.jsxs)("div",{className:"max-w-full ps-2 dark:prose-invert md:ps-3 lg:ps-4",children:[t.description&&(0,n.jsx)("p",{className:"mb-2 text-zinc-300 text-sm",children:t.description}),void 0!==t.default&&(0,n.jsxs)("p",{className:"mb-2 text-zinc-300 text-sm",children:["Default value: ",(0,n.jsx)("code",{children:String(t.default)})]})]})]})},_=e=>{var t,s;let{model:r}=e,a=new Set;return r.inputs.forEach(e=>{e.type in N&&a.add(e.type)}),null==(t=r.outputs)||t.forEach(e=>{e.type in N&&a.add(e.type)}),(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsx)("div",{className:"shrink-0 bg-zinc-700 h-[1px] min-w-full",role:"none"}),(0,n.jsxs)("h3",{id:"schema",className:"flex flex-row scroll-mt-20 space-x-2 pt-2",children:[(0,n.jsx)("span",{children:"5. Schema"}),(0,n.jsx)("a",{href:"#schema",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),(0,n.jsxs)("h3",{id:"schema-input",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-strong text-lg",children:[(0,n.jsx)("span",{children:"Input"}),(0,n.jsx)("a",{href:"#schema-input",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),r.inputs.map(e=>(0,n.jsx)(k,{param:e,isInput:!0},e.name)),(0,n.jsxs)("h3",{id:"schema-output",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-strong text-lg",children:[(0,n.jsx)("span",{children:"Output"}),(0,n.jsx)("a",{href:"#schema-output",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),null==(s=r.outputs)?void 0:s.map(e=>(0,n.jsx)(k,{param:e,isInput:!1},e.name)),a.size>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("h3",{id:"schema-other",className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-strong text-lg",children:[(0,n.jsx)("span",{children:"Other Types"}),(0,n.jsx)("a",{href:"#schema-other",className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),Array.from(a).map(e=>{let t=N[e];return(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("h4",{id:"type-".concat(t.name.toLowerCase()),className:"flex flex-row scroll-mt-20 space-x-2 pt-2 font-heading font-medium text-content-base",children:[(0,n.jsx)("span",{children:t.name}),(0,n.jsx)("a",{href:"#".concat(t.name.toLowerCase()),className:"font-mono font-extralight text-content-muted transition-colors hover:text-content-lighter",children:"#"})]}),t.properties.map(e=>(0,n.jsx)(z,{property:e},e.name))]},t.name)}
1)]})]})},A=e=>{let{model:t}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"max-w-full",children:[(0,n.jsx)("h3",{children:"About"}),(0,n.jsx)("p",{children:"FLUX.1 [dev], next generation text-to-image model."})]}),(0,n.jsx)(f,{}),(0,n.jsx)(v,{}),(0,n.jsx)(y,{}),(0,n.jsx)(w,{}),(0,n.jsx)(_,{model:t})]})},E=()=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(c(),{href:"#api-call",children:(0,n.jsx)("h4",{className:"rounded-md px-3 py-2 text-base font-medium bg-surface-alpha-strong text-content-stronger",children:"1. Calling the API"})}),(0,n.jsxs)("ul",{className:"ms-4 border-l-2 border-zinc-700 text-sm",children:[(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#api-call-install",children:"Install the client"})}),(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#api-call-setup",children:"Setup your API Key"})}),(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#api-call-submit-request",children:"Submit a request"})})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(c(),{href:"#auth",children:(0,n.jsx)("h4",{className:"rounded-md px-3 text-base py-2 font-medium text-content-strong",children:"2. Authentication"})}),(0,n.jsx)("ul",{className:"ms-4 border-l-2 border-zinc-700 text-sm",children:(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#auth-api-key",children:"API Key"})})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(c(),{href:"#queue",children:(0,n.jsx)("h4",{className:"rounded-md px-3 text-base py-2 font-medium text-content-strong",children:"3. Queue"})}),(0,n.jsxs)("ul",{className:"ms-4 border-l-2 border-zinc-700 text-sm",children:[(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#queue-submit",children:"Submit a request"})}),(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#queue-status",children:"Fetch request status"})}),(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#queue-result",children:"Get the result"})})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(c(),{href:"#files",children:(0,n.jsx)("h4",{className:"rounded-md px-3 text-base py-2 font-medium text-content-strong",children:"4. Files"})}),(0,n.jsxs)("ul",{className:"ms-4 border-l-2 border-zinc-700 text-sm",children:[(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#files-data-uri",children:"Data URI (base64)"})}),(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#files-from-url",children:"Hosted files (URL)"})}),(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#files-upload",children:"Uploading files"})})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(c(),{href:"#schema",children:(0,n.jsx)("h4",{className:"rounded-md px-3 text-base py-2 font-medium text-content-strong",children:"5. Schema"})}),(0,n.jsxs)("ul",{className:"ms-4 border-l-2 border-zinc-700 text-sm",children:[(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#schema-input",children:"Input"})}),(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#schema-output",children:"Output"})}),(0,n.jsx)("li",{className:"px-4 py-1 text-zinc-400 hover:text-content-strong",children:(0,n.jsx)(c(),{href:"#schema-other",children:"Other"})})]})]})]}),C=e=>{let{model:t}=e;return(0,n.jsx)("div",{"data-state":"active","data-orientation":"horizontal",role:"tabpanel","aria-labelledby":"radix-:R3lhj6:-trigger-api",id:"radix-:R3lhj6:-content-api",tabIndex:0,className:"ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",children:(0,n.jsxs)("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-12",children:[(0,n.jsx)("div",{className:"col-span-1 lg:col-span-3",children:(0,n.jsx)("div",{className:"sticky top-4",children:(0,n.jsx)("div",{className:"",style:{transform:"translateZ(0px)"},children:(0,n.jsxs)("div",{"data-layout":"default",className:"flex flex-col rounded-lg bg-gradient-to-br from-zinc-800/50 via-zinc-800/30 to-primary-900/30 bg-surface group",children:[(0,n.jsxs)("div",{className:"p-6",children:[(0,n.jsx)("div",{children:(0,n.jsx)("h3",{className:"font-heading text-lg leading-none tracking-tight text-content-base lg:text-xl flex-1",children:"Table of contents"})}),(0,n.jsxs)("button",{type:"button",role:"combobox","aria-controls":"radix-:R4lblhj6:","aria-expanded":"false","aria-autocomplete":"none",dir:"ltr","data-state":"closed",className:"flex h-8 mt-2 text-sm items-center justify-between rounded-lg bg-surface-alpha font-heading text-content-strong border border-zinc-700 hover:border-stroke-stronger px-3 py-1.5 font-medium transition-colors placeholder:text-content-lighter focus-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 w-fit",children:[(0,n.jsx)("span",{style:{pointerEvents:"none"},children:"JavaScript / Node.js"}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-down icon-xs icon-strong ms-2 stroke-content-strong","aria-hidden":"true",children:(0,n.jsx)("path",{d:"m6 9 6 6 6-6"})})]})]}),(0,n.jsx)("div",{className:"flex-1 p-6 pt-0 group-data-[layout=compact]:m-0 group-data-[layout=compact]:p-0 group-data-[layout=compact]:rounded-xl group-data-[layout=compact]:border-none",children:(0,n.jsx)(E,{})})]})})})}),(0,n.jsx)("div",{"data-layout":"compact",className:"flex flex-col rounded-lg bg-gradient-to-br from-zinc-800/50 via-zinc-800/30 to-primary-900/30 bg-surface group col-span-1 lg:col-span-9",children:(0,n.jsx)("div",{className:"flex-1 pt-0 group-data-[layout=compact]:m-0 group-data-[layout=compact]:p-0 group-data-[layout=compact]:rounded-xl group-data-[layout=compact]:border-none space-y-8 !p-6",children:(0,n.jsx)(A,{model:t})})})]})})};var I=s(20736),S=s.n(I);function L(e){var t,s;let{model:r}=e,[a,i]=(0,l.useState)(()=>{var e;let t={};
1return null==(e=r.inputs)||e.forEach(e=>{if("number"===e.type||"float"===e.type){let s=e.default;t[e.name]=0===s?0:void 0!==s?Number(s):""}else{var s,n;t[e.name]="object"==typeof e.default?null==(s=e.default)?void 0:s.value:null!=(n=e.default)?n:""}}),t}),[o,c]=(0,l.useState)("Preview"),[d,x]=(0,l.useState)(P(r)),[h,p]=(0,l.useState)(!1),u=(e,t)=>{i(s=>({...s,[e]:""===t?"":t}))},g=(0,l.useCallback)(async e=>{e.preventDefault(),p(!0);try{let e=await fetch("/api/v1/create/".concat(r.title),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer sk-7646afd61971edbbf12c2d0bca4db8428bcd921ebb63254cede71ce69ccc9cbd"},body:JSON.stringify(a)});if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));let t=await e.json();x(t)}catch(e){console.error("Error generating image:",e)}finally{p(!1)}},[a,r.title]);return(0,l.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),g(e))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[g]),(0,n.jsxs)("div",{className:"grid md:grid-cols-2 gap-6",children:[(0,n.jsx)("div",{className:"flex-1 bg-gradient-to-br from-zinc-800/50 via-zinc-800/30 to-primary-900/30 md:rounded-lg",children:(0,n.jsxs)("form",{id:"input-form",onSubmit:g,className:"flex flex-col h-full",children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("div",{className:"px-4 md:px-6 pt-6",children:(0,n.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"Input"})}),(0,n.jsx)("div",{className:"h-full",children:(0,n.jsx)("div",{className:"px-4 md:px-6 pb-6 space-y-4",children:null==(t=r.inputs)?void 0:t.map(e=>(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("label",{className:"block text-sm font-mono",children:[e.name," ",e.required&&(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),e.description&&(0,n.jsx)("p",{className:"text-sm text-zinc-400",children:e.description}),(e=>{var t,s;let{name:r,type:i,required:l,min:o,max:c,choices:d,options:x}=e,m=null!=(t=a[r])?t:"";switch(i.toLowerCase()){case"number":case"float":{let e,t=""===m?"":0===m?0:null!=m?m:"";return(0,n.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,n.jsx)("input",{type:"number",min:o,max:c,step:"float"===i?"0.1":"1",value:t,onChange:e=>{let t=e.target.value;u(r,""===t?"":Number(t))},className:"w-20 p-2 border border-zinc-700 rounded bg-transparent",required:l}),(0,n.jsx)("input",{type:"range",min:o||0,max:c||100,step:"float"===i?"0.1":"1",value:""===t?o||0:0===t||t?t:o||0,onChange:e=>u(r,Number(e.target.value)),className:"flex-1 ".concat(S().rangeInput),style:{"--range-progress":"".concat(((""===t?o||0:t)-(e=o||0))/((c||100)-e)*100,"%")}})]})}case"text":return(0,n.jsx)("textarea",{value:a[r]||"",onChange:e=>u(r,e.target.value),className:"w-full h-24 p-2 border border-zinc-700 rounded-lg bg-transparent focus:ring-primary-600",placeholder:"Enter ".concat(r,"..."),required:l});case"enum":case"select":return(0,n.jsx)("select",{value:a[r]||"",onChange:e=>u(r,e.target.value),className:"w-full p-2 border border-zinc-700 rounded bg-transparent focus:ring-primary-600",required:l,children:null==(s=x||d)?void 0:s.map(e=>(0,n.jsx)("option",{value:e,children:e},e))});case"file":return(0,n.jsx)("input",{type:"file",onChange:e=>{var t;return u(r,null==(t=e.target.files)?void 0:t[0])},className:"w-full p-2 border border-zinc-700 rounded bg-transparent",required:l});default:return null}})(e)]},e.name))})})]}),(0,n.jsx)("div",{className:"sticky bottom-[40px] bg-gradient-to-r from-zinc-800/95 via-zinc-800/85 to-primary-900/30 rounded-b-lg px-6 py-4 border-t border-zinc-700",children:(0,n.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>i({}),className:"inline-flex items-center justify-center gap-2 border border-gray-900 bg-white dark:bg-black text-gray-900 py-2 px-3 text-base leading-6",children:(0,n.jsx)("span",{children:"Reset"})}),(0,n.jsx)("button",{type:"submit",disabled:h,className:"inline-flex items-center justify-center gap-2 border border-black dark:border-white bg-black dark:bg-white text-white dark:text-black py-2 px-3 text-base leading-6 disabled:opacity-50",children:h?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("svg",{className:"-ml-1 mr-3 h-5 w-5 animate-spin text-white dark:text-black",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Processing..."]}):(0,n.jsxs)("span",{children:["Run"," ",(0,n.jsx)("kbd",{className:"text-r8-xs text-r8-gray-8 hidden sm:inline",children:"(cmd+enter)"})]})})]})})]})}),(0,n.jsx)("div",{className:"flex-1 p-4 md:p-6 bg-gradient-to-br from-zinc-800/50 via-zinc-800/30 to-primary-900/30 md:rounded-lg",children:(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"Output"}),(0,n.jsxs)("div",{className:"flex border-b border-zinc-700 mb-4 space-x-4",children:[(0,n.jsxs)("button",{onClick:()=>c("Preview"),className:"flex items-center gap-2 py-2 border-b-2 border-transparent ".concat("Preview"===o?"border-zinc-100":""),children:[(0,n.jsx)(m.dkL,{}),(0,n.jsx)("span",{children:"Preview"})]}),(0,n.jsxs)("button",{onClick:()=>c("JSON"),className:"flex items-center gap-2 px-4 py-2 border-b-2 border-transparent ".concat("JSON"===o?"border-zinc-100":""),children:[(0,n.jsx)(m.FSj,{}),(0,n.jsx)("span",{children:"JSON"})]})]}),(0,n.jsxs)("div",{className:"rounded min-h-[300px]",children:["Preview"===o&&(0,n.jsx)("img",{src:(null==(s=d.images[0])?void 0:s.url)||r.image,alt:"Generated output",className:"max-w-full rounded"}),"JSON"===o&&(0,n.jsx)("pre",{className:"text-sm overflow-auto",children:JSON.stringify(d,null,2)})]})]})})]})}let P=e=>{let t={images:[],timings:{inference:0},seed:0,has_nsfw_concepts:[],prompt:""};
1if(e.outputs&&e.outputs.forEach(s=>{"images"===s.name&&e.coverImage&&(t.images=[{url:e.coverImage,width:1024,height:1024,content_type:"image/jpeg"}])}),e.inputs){let s=e.inputs.find(e=>"prompt"===e.name);s&&s.default&&(t.prompt=s.default)}return t},D=[{name:"playground",icon:(0,n.jsx)(m.gSK,{className:"w-4 h-4"}),label:"Playground"},{name:"api",icon:(0,n.jsx)(m.uoG,{className:"w-4 h-4"}),label:"API"},{name:"inspiration",icon:(0,n.jsx)(m.vd0,{className:"w-4 h-4"}),label:"Inspiration"},{name:"readme",icon:(0,n.jsx)(m.t69,{className:"w-4 h-4"}),label:"README"}],M=()=>(0,n.jsx)("div",{children:"Examples"}),T=()=>(0,n.jsx)("div",{children:"README"});function q(e){let{model:t,activeTab:s}=e,r=(0,d.useRouter)(),a=(0,d.useParams)(),i=null==a?void 0:a.cid,l=null==a?void 0:a.mid;return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"flex border-b px-4 md:px-8 border-zinc-700 space-x-4",children:D.map(e=>(0,n.jsxs)("button",{className:"flex items-center gap-2 py-2 text-sm border-b-2 ".concat(s===e.name?"border-white text-white":"border-transparent text-gray-400"),onClick:()=>{var t;return t=e.name,void r.push("/ai-api/".concat(i,"/").concat(l,"/").concat(t.toLowerCase()))},children:[(0,n.jsx)("span",{children:e.icon}),(0,n.jsx)("span",{children:e.label})]},e.name))}),(0,n.jsxs)("div",{className:"mt-6 rounded-xl md:px-8",children:["playground"===s&&(0,n.jsx)(L,{model:t}),"api"===s&&(0,n.jsx)(C,{model:t}),"inspiration"===s&&(0,n.jsx)(M,{}),"readme"===s&&(0,n.jsx)(T,{})]})]})}var R=s(48078),O=s(97384),B=s(84627),F=!0;function G(e){let{modelData:t}=e,[s,r]=(0,l.useState)(!1),{tab:o}=(0,i.useRouter)().query;return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(l.Suspense,{fallback:(0,n.jsx)("div",{children:"Loading..."}),children:[(0,n.jsxs)(a(),{children:[(0,n.jsx)("title",{children:"".concat(t.title," | BasedLabs.ai")}),(0,n.jsx)("meta",{name:"description",content:t.description})]}),(0,n.jsx)(O.A,{}),(0,n.jsxs)("main",{className:"flex-1 text-zinc-100",children:[(0,n.jsx)(x,{model:t}),(0,n.jsx)(q,{model:t,activeTab:o}),(0,n.jsx)("div",{className:"h-32 px-8 mt-16",children:"Meta Data"})]}),(0,n.jsx)(B.default,{open:s,setOpen:r}),(0,n.jsx)(R.A,{})]})})}},20736:e=>{e.exports={rangeInput:"RangeInput_rangeInput__zRi24"}},28284:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var n=s(14232);let r=n.forwardRef(function(e,t){let{title:s,titleId:r,...a}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},a),s?n.createElement("title",{id:r},s):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"}))})},47050:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/ai-api/[cid]/[mid]/[tab]",function(){return s(389)}])},48078:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var n=s(37876),r=s(48230),a=s.n(r),i=s(32934),l=s(541),o=s(60930),c=s(86989);let d=()=>{var e,t,s,r;let{data:d}=(0,i.useSession)(),{setShowUpgradeModal:x}=(0,o.A)(),m=(0,c.I)(d);return(0,n.jsx)("footer",{className:"sticky bottom-0 z-[99] w-full items-center justify-start overflow-x-auto border-t border-zinc-700 bg-zinc-900 px-4 py-2",children:(0,n.jsxs)("div",{className:"flex min-w-[300px] flex-row flex-nowrap items-center justify-start space-x-4",children:[(0,n.jsxs)("div",{className:"flex flex-row flex-nowrap items-center text-sm font-semibold text-zinc-100 sm:w-2/4 sm:text-base",children:[(0,n.jsxs)(a(),{href:"/",prefetch:!1,className:"whitespace-nowrap text-sm",children:["\xa9 BasedLabs ",new Date().getFullYear()]}),(null==d?void 0:d.user)&&(0,n.jsxs)("button",{onClick:()=>x(!0),className:"ml-2 inline-flex grow-0 items-center whitespace-nowrap rounded-md bg-green-500/10 px-2 py-1 text-xs font-medium text-green-400 ring-1 ring-inset ring-green-500/20 hover:bg-green-500/20 transition-colors cursor-pointer",title:"Click to buy more credits",children:[null==d||null==(e=
1d.user)?void 0:e.planName," (credits:"," ",null!=m?m:"Loading...",")"]}),(0,n.jsx)("a",{href:"https://discord.com/invite/D8wYxUvwTD",target:"_blank",rel:"noopener noreferrer",className:"ml-2 hidden grow-0 items-center whitespace-nowrap rounded-md bg-primary-500/10 px-2 py-1 text-xs font-medium text-primary-200 ring-1 ring-inset ring-primary-500/20",children:"Join our Discord community!"}),(0,n.jsx)(a(),{href:"/enterprise",prefetch:!1,className:"ml-4 whitespace-nowrap text-sm font-normal",children:"Enterprise"}),(0,n.jsx)(a(),{href:"/features",prefetch:!1,className:"ml-4 whitespace-nowrap text-sm font-normal",children:"Features"}),(0,n.jsx)(a(),{href:"/legal",prefetch:!1,className:"ml-4 whitespace-nowrap text-sm font-normal",children:"Legal"}),(0,n.jsx)(a(),{href:"/convert",prefetch:!1,className:"ml-4 whitespace-nowrap text-sm font-normal",children:"Convert"}),(0,n.jsx)(a(),{href:"/changelog",prefetch:!1,className:"ml-4 whitespace-nowrap text-sm font-normal",children:"Changelog"}),(0,n.jsx)(a(),{href:"/articles",prefetch:!1,className:"ml-4 whitespace-nowrap text-sm font-normal",children:"Articles"}),(0,n.jsx)("a",{href:"https://gluely.ai",target:"_blank",rel:"noopener noreferrer nofollow",className:"ml-4 whitespace-nowrap text-sm font-normal",children:"Gluely AI"}),(0,n.jsx)(a(),{href:"/memes/ai-meme-generator",prefetch:!1,className:"ml-4 whitespace-nowrap text-sm font-normal",children:"AI Meme Generator"}),(0,n.jsx)(a(),{href:"/360-maker",prefetch:!1,className:"ml-4 whitespace-nowrap text-sm font-normal",children:"AI 360 Maker"}),(0,n.jsx)("a",{href:"https://basedlabs.getrewardful.com/signup",target:"_blank",rel:"noopener noreferrer",className:"ml-4 whitespace-nowrap text-sm font-normal",children:"Affiliates"}),(null==d||null==(t=d.user)?void 0:t.planName)==="PRO"||(null==d||null==(s=d.user)?void 0:s.planName)==="PREMIUM"||(null==d||null==(r=d.user)?void 0:r.planName)==="CREATOR"?(0,n.jsxs)(a(),{type:"button",className:"ml-4 flex flex-nowrap items-center whitespace-nowrap text-sm text-zinc-100 hover:text-primary-500",href:"/dashboard/billing",prefetch:!1,children:[(0,n.jsx)("span",{className:"whitespace-nowrap text-xs",children:"\uD83D\uDCB0"})," Billing"]}):(0,n.jsx)(n.Fragment,{children:(null==d?void 0:d.user)&&(0,n.jsxs)("button",{type:"button",className:"ml-4 flex flex-nowrap items-center whitespace-nowrap text-sm text-zinc-100 hover:text-primary-500",onClick:()=>x(!0),children:[(0,n.jsx)("span",{className:"whitespace-nowrap text-xs",children:"\uD83C\uDF89"})," Upgrade"]})})]}),(0,n.jsx)("div",{className:"flex flex-1 justify-center"}),(0,n.jsxs)("div",{className:"flex items-center justify-end space-x-2 text-base text-zinc-100 sm:w-1/4",children:[(0,n.jsx)("div",{children:(0,n.jsx)(a(),{href:"https://tally.so/r/w2PevA",target:"_blank",rel:"noopener noreferrer nofollow",className:"ml-2 inline-flex grow-0 items-center whitespace-nowrap rounded-md bg-blue-500/10 px-2 py-1 text-xs font-medium text-blue-400 ring-1 ring-inset ring-blue-500/20 hover:bg-blue-400/30",children:"Become an AI Creator \uD83E\uDDD1â\uD83C\uDFA8"})}),(0,n.jsx)("div",{children:(0,n.jsx)(a(),{href:"https://discord.gg/D8wYxUvwTD",target:"_blank",rel:"noopener noreferrer","aria-label":"Link to our Discord channel",children:(0,n.jsx)(l.r53,{className:"h-5 w-5"})})}),(0,n.jsx)("div",{children:(0,n.jsx)(a(),{href:"https://twitter.com/BasedLabsAI",target:"_blank",rel:"noopener noreferrer","aria-label":"Link to our X account",children:(0,n.jsx)(l.rCx,{className:"h-4 w-4"})})})]})]})})}},84627:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var n=s(37876),r=s(68638),a=s(96911),i=s(14232),l=s(89633),o=s(28284),c=s(48230),d=s.n(c),x=s(32934),m=s(61875),h=s(6631),p=s(49433);let u=e=>{let{text:t,redirectTo:s}=e,[r,a]=(0,i.useState)(""),[c,u]=(0,i.useState)(!1),g=async()=>{(0,l.m2)(l.u3.SIGNUP_STARTED,{method:"magic_link",source:"modal",email_domain:r.split("@")[1]||"unknown"});let e=localStorage.getItem("redirectAfterSignIn")||s;await (0,x.signIn)("email",{email:r,callbackUrl:e||s,redirect:!0})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-start",children:[(0,n.jsx)(o.A,{className:"mb-2 mr-2 inline-block h-6 w-6 text-zinc-100"}),(0,n.jsx)("h2",{className:"mb-6 flex-1 text-sm text-zinc-100",children:t||"Create a free account to start generating. It takes 10 seconds with Google."})]}),(0,n.jsxs)("button",{className:"flex w-full items-center justify-center rounded border border-zinc-700 bg-zinc-700 px-3 py-3 text-zinc-100 hover:bg-zinc-600",onClick:()=>{(0,l.m2)(l.u3.SIGNUP_STARTED,{method:"google",source:"modal"});let e=localStorage.getItem("redirectAfterSignIn")||s;e&&localStorage.setItem("redirectAfterSignIn",e),(0,x.signIn)("google",{callbackUrl:"/auth-complete",redirect:!0})},children:[(0,n.jsx)(h.F4b,{className:"mr-3 h-5 w-5"}),"Sign in with Google"]}),(0,n.jsxs)("div",{className:"mt-4",children:[(0,n.jsxs)("button",{className:"relative m-0 flex w-full appearance-none items-center justify-start whitespace-nowrap rounded border border-zinc-700 bg-zinc-700 px-3 py-3 text-center hover:bg-zinc-600",onClick:()=>{u(!0),(0,l.m2)("discord_signin_attempted",{source:"modal"})},children:[(0,n.jsx)(m.QmS,{className:"absolute left-4 my-auto mr-4 h-5 w-5 text-zinc-200"}),(0,n.jsx)("span",{className:"mx-auto font-medium text-zinc-200",children:"Sign in with Discord"})]}),c&&(0,n.jsxs)("p",{className:"mt-2 text-xs text-zinc-400",children:['If you previously signed up with Discord, please use your Discord email address below where it says "Enter your email for magic link" to log in. ',(0,n.jsx)("br",{})," ",(0,n.jsx)("br",{}
1)," An auth link will be sent to your email and direct you back to BasedLabs and you will be logged in."," ",(0,n.jsx)("a",{rel:"noopener noreferrer",href:"https://x.com/michaelaubry/status/1832191823953195353",target:"_blank",className:"text-primary-600",children:"Read more here"}),".",(0,n.jsx)("br",{}),(0,n.jsx)("br",{})," If you're a new user Discord login is discontinued. You can use Google or Email with magic link below."]})]}),(0,n.jsxs)("div",{className:"flex items-center my-4",children:[(0,n.jsx)("div",{className:"flex-grow border-t border-zinc-700"}),(0,n.jsx)("span",{className:"flex-shrink mx-4 text-zinc-500",children:"or"}),(0,n.jsx)("div",{className:"flex-grow border-t border-zinc-700"})]}),(0,n.jsxs)("div",{className:"mt-4",children:[(0,n.jsx)("input",{type:"email",value:r,onChange:e=>a(e.target.value),onKeyPress:e=>{"Enter"===e.key&&g()},placeholder:"Enter your email for magic link",className:"w-full p-2 mb-2 border border-zinc-700 bg-zinc-800 text-zinc-100 rounded"}),(0,n.jsxs)("button",{className:"flex w-full items-center justify-center rounded border border-zinc-700 bg-zinc-700 px-3 py-3 text-zinc-100 hover:bg-zinc-600",onClick:g,children:[(0,n.jsx)(p.mm2,{className:"mr-2 w-5 h-5"}),"Sign in with Magic Link"]})]}),(0,n.jsxs)("div",{className:"relative mt-4 text-xs text-zinc-200",children:["By signing in you agree to our"," ",(0,n.jsx)(d(),{href:"/legal",className:"text-primary-600",children:"Legal Policies"}),","," ",(0,n.jsx)(d(),{href:"/legal/terms",className:"text-primary-600",children:"Terms of Service"})," ","and"," ",(0,n.jsx)(d(),{href:"/legal/privacy",className:"text-primary-600",children:"Privacy Policy"})]})]})},g=e=>{let{open:t,setOpen:s,redirectTo:o}=e;return(0,i.useEffect)(()=>{t&&((0,l.m2)("signup_modal_opened",{redirect_to:o||"none"}),(0,l.vi)("signup_modal_opened"))},[t,o]),(0,n.jsx)(r.e.Root,{show:t,as:i.Fragment,children:(0,n.jsxs)(a.lG,{as:"div",className:"relative z-[999]",onClose:s,children:[(0,n.jsx)(r.e.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,n.jsx)("div",{className:"fixed inset-0 bg-zinc-900 bg-opacity-90 backdrop-blur-sm transition-opacity"})}),(0,n.jsx)("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:(0,n.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center sm:items-center sm:p-0",children:(0,n.jsx)(r.e.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,n.jsx)(a.lG.Panel,{className:"relative transform overflow-hidden rounded-lg bg-zinc-800 px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-sm sm:p-6",children:(0,n.jsx)(u,{redirectTo:o})})})})})]})})}},89633:(e,t,s)=>{"use strict";s.d(t,{CG:()=>a,VT:()=>i,m2:()=>r,u3:()=>n,vi:()=>l});let n={SIGNUP_STARTED:"signup_started",SIGNUP_COMPLETED:"signup_completed",LOGIN_STARTED:"login_started",LOGIN_COMPLETED:"login_completed",LOGIN_FAILED:"login_failed",UPGRADE_MODAL_OPENED:"upgrade_modal_opened",UPGRADE_MODAL_CLOSED:"upgrade_modal_closed",PAYMENT_STARTED:"payment_started",PAYMENT_PLAN_SELECTED:"payment_plan_selected",CHECKOUT_STARTED:"checkout_started",SUBSCRIPTION_CANCELLED:"subscription_cancelled",CREDITS_PURCHASE_STARTED:"credits_purchase_started",GENERATION_STARTED:"generation_started",GENERATION_COMPLETED:"generation_completed",GENERATION_FAILED:"generation_failed",APP_OPENED:"app_opened",MODEL_SELECTED:"model_selected",FEATURE_USED:"feature_used",DASHBOARD_VIEWED:"dashboard_viewed",BILLING_PAGE_VIEWED:"billing_page_viewed",EXPLORE_PAGE_VIEWED:"explore_page_viewed"};function r(e,t){if(window.clarity)try{window.clarity("event",e),t&&Object.entries(t).forEach(e=>{let[t,s]=e;if(null!=s){let e=Array.isArray(s)?s.map(e=>String(e)):String(s);window.clarity("set",t,e)}})}catch(e){console.error("Error tracking Clarity event:",e)}}function a(e,t,s,n){if(window.clarity)try{window.clarity("identify",e,t,s,n)}catch(e){console.error("Error identifying Clarity user:",e)}}function i(e,t){if(window.clarity)try{window.clarity("set",e,t)}catch(e){console.error("Error setting Clarity tag:",e)}}function l(e){if(window.clarity)try{window.clarity("upgrade",e)}catch(e){console.error("Error upgrading Clarity session:",e)}}},97291:()=>{}},e=>{e.O(0,[3302,96701,72517,87236,30713,74938,96911,6051,97965,91596,40594,97384,90636,46593,38792],()=>e(e.s=47050)),_N_E=e.O()}]);
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.