1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,686190,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["default",0,t])},566595,e=>{"use strict";let t=(0,e.i(456420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],566595)},328623,e=>{"use strict";let t=(0,e.i(456420).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],328623)},689664,e=>{"use strict";var t=e.i(643957);e.s(["Check",()=>t.default])},263676,e=>{"use strict";var t=e.i(814387);e.s(["X",()=>t.default])},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},460935,306206,e=>{"use strict";var t=e.i(186532),r=e.i(466557);function o(e){let t=(0,r.slugifyToolName)(e);return t?t.length<=72?t:t.slice(0,72).replace(/-+$/,""):"discussion"}function i(e){var t,r;let i=e.slug?.trim().toLowerCase();return i?i:(t=e.title,r=e.id,`${o(t||"discussion")}-${r.slice(0,8)}`)}function a(e,t){let r=o(e);if(!t.has(r))return r;let i=2;for(;t.has(`${r}-${i}`);)i+=1;return`${r}-${i}`}async function l(e){return a(e,new Set((await s()).map(e=>i(e))))}async function s(){try{let{data:e,errors:r}=await t.amplifyClient.models.Discussion.list({limit:100});if(r?.length)return console.warn("[community] list discussions error",r),[];return e??[]}catch(e){return console.warn("[community] list discussions failed",e),[]}}e.s(["discussionDetailPath",0,function(e){return`/community/${i(e)}`},"ensureUniqueDiscussionSlug",0,a,"getDiscussionSlug",0,i],306206),e.s(["generateDiscussionSlug",0,l],460935)},740686,e=>{"use strict";let t=e=>e.createdAt?new Date(e.createdAt).getTime():0,r=(e,r=Date.now())=>Math.log10(Math.max((e.upvotes??0)+(e.commentCount??0)*1.5,1))-.4*(e.createdAt?Math.max(0,(r-t(e))/864e5):1)+1.2*!!e.hot;e.s(["compactNumber",0,e=>{let t=e??0;return t<1e3?String(t):t<1e4?`${(t/1e3).toFixed(1)}K`:t<1e6?`${Math.round(t/1e3)}K`:`${(t/1e6).toFixed(1)}M`},"formatRelativeTime",0,e=>{if(!e)return"";let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Date.now()-t;if(r<6e4)return"just now";let o=Math.floor(r/6e4);if(o<60)return`${o} minute${1===o?"":"s"} ago`;let i=Math.floor(o/60);if(i<24)return`${i} hour${1===i?"":"s"} ago`;let a=Math.floor(i/24);if(a<7)return`${a} day${1===a?"":"s"} ago`;let l=Math.floor(a/7);if(l<5)return`${l} week${1===l?"":"s"} ago`;let s=Math.floor(a/30);if(s<12)return`${s} month${1===s?"":"s"} ago`;let n=Math.floor(a/365);return`${n} year${1===n?"":"s"} ago`},"sortDiscussionsByHot",0,e=>{let o=Date.now();return[...e].sort((e,i)=>{let a=r(i,o)-r(e,o);return 0!==a?a:t(i)-t(e)})}])},731621,e=>{"use strict";function t(e){return e.replace(/\s*\/\s*/g,"/").replace(/\s+per\s+/gi,"/").replace(/\/month\b/gi,"/mo").replace(/\s+/g," ").trim()}var r=e.i(854875),o=e.i(466557),i=e.i(46980);let a="toolDetail-v3",l=i.CACHE_TTL.SEVEN_DAYS,s=e=>(e??[]).filter(e=>"string"==typeof e&&e.trim().length>0).map(e=>e.trim()),n=(e,t)=>{let o=e.toLowerCase(),i=t?(0,r.domainFromUrl)(t):null;return i?`${o}::${i}`:o},c=(e,t)=>(0,i.readCache)(a,n(e,t),l);e.s(["POPULAR_TOOL_SUGGESTIONS",0,[{name:"ChatGPT",category:"Language Model"},{name:"Claude",category:"Language Model"},{name:"Google Gemini",category:"Language Model"},{name:"Midjourney",category:"Image Generation"},{name:"GitHub Copilot",category:"Developer Tools"},{name:"Cursor",category:"Developer Tools"},{name:"Notion AI",category:"Productivity"},{name:"Perplexity AI",category:"AI Search"},{name:"Runway",category:"Video Generation"},{name:"ElevenLabs",category:"Voice & Audio"}],"getToolLogoProps",0,function(e){let t=(e??"").trim();if(!t)return{};let i=c((0,o.slugifyToolName)(t)),a=(0,r.guessDomainForTool)(t),l=i?.visitUrl?.trim()||(a?`https://${a}`:void 0);return{websiteUrl:l,logoUrl:(0,r.resolveToolLogoUrl)(t,{logoUrl:i?.logoUrl,websiteUrl:l})}},"readToolDetailFromCache",0,c,"toToolDetail",0,e=>{if(!e?.name?.trim())return null;let o=e.visitUrl?.trim()||"";return{name:e.name.trim(),category:e.category?.trim()||"",tagline:e.tagline?.trim()||"",lead:e.lead?.trim()||"",vendor:e.vend
1or?.trim()||"",established:e.established?.trim()||"",reviews:e.reviews?.trim()||"",rating:e.rating?.trim()||"",tags:s(e.tags).slice(0,4),visitUrl:o,logoUrl:(0,r.resolveToolLogoUrl)(e.name.trim(),{websiteUrl:o}),features:s(e.features).slice(0,8),businessHelp:s(e.businessHelp).slice(0,5),pros:s(e.pros).slice(0,5),cons:s(e.cons).slice(0,5),pricing:(()=>{let r=[];for(let o of e.pricing??[]){let e=o?.name?.trim(),i=o?.price?.trim();if(e&&i&&(r.push({name:e,price:function(e){let r=e.trim().replace(/\s+/g," ");if(!r||r.length<=48)return r;if(/^free\b/i.test(r))return"Free";if(/contact\s+(sales|us|for\s+pricing)/i.test(r))return"Contact sales";if(/custom\s+pricing/i.test(r))return"Custom pricing";let o=r.match(/(?:from\s+)?[$â¬Â£]\d[\d,]*(?:\.\d{1,2})?\s*(?:\/|\sper\s)\s*(?:month|mo\b)/i)??r.match(/(?:from\s+)?[$â¬Â£]\d[\d,]*(?:\.\d{1,2})?\s*(?:\/|\sper\s)\s*(?:year|yr\b|annual)/i);if(o){let e=t(o[0]);if(e.length<=48)return e}let i=r.match(/(?:from\s+)?[$â¬Â£]\d[\d,]*(?:\.\d{1,2})?(?:\s*(?:\/|per)\s*(?:mo(?:nth)?|yr|year|user|seat|annual))?/i);if(i){let e=t(i[0]);if(e.length<=48)return e}let a=(r.split(/[.;(]/)[0]??r).trim();return a.length<=48?a:`${a.slice(0,47).trim()}â¦`}(i),features:s(o?.features??null).slice(0,6),popular:!!o?.popular}),r.length>=4))break}return r})(),useCases:s(e.useCases).slice(0,8),similar:s(e.similar).slice(0,5)}},"writeToolDetailToCache",0,(e,t,r)=>(0,i.writeCache)(a,n(e,r??t.visitUrl),t)],731621)},357338,e=>{"use strict";var t=e.i(647163);let r="text-[26px] font-bold text-[#0A0A0A] sm:text-[30px] dark:text-foreground",o=(0,t.cn)(r,"text-center"),i="text-[22px] font-bold tracking-[-0.02em] text-[#0A0A0A] sm:text-[26px] dark:text-foreground",a=(0,t.cn)(i,"mt-1");e.s(["PAGE_TITLE",0,r,"PAGE_TITLE_CENTER",0,o,"PROFILE_SECTION_EYEBROW",0,"text-[12px] font-semibold uppercase tracking-[0.28px] text-[#64748B] dark:text-[#94A3B8]","PROFILE_SECTION_TITLE",0,i,"PROFILE_TAB_TITLE",0,a,"SECTION_TITLE",0,"text-[22px] font-semibold tracking-[-0.03em] text-[#0A0A0A] sm:text-[24px] dark:text-foreground"])},854875,e=>{"use strict";function t(e){let t=e.replace(/^https?:\/\//,"").replace(/^www\./,"").split("/")[0]??e;return`https://www.google.com/s2/favicons?domain=${encodeURIComponent(t)}&sz=128`}function r(e){try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.replace(/^www\./,"")||null}catch{return null}}let o={"open assistant":"openassistant.org",harvey:"harvey.ai",chatgpt:"openai.com",claude:"claude.ai",cursor:"cursor.com",midjourney:"midjourney.com",perplexity:"perplexity.ai",runway:"runwayml.com","notion ai":"notion.so",notion:"notion.so","github copilot":"github.com",gemini:"gemini.google.com","google gemini":"gemini.google.com","gemini ai":"gemini.google.com","perplexity ai":"perplexity.ai","chat gpt":"openai.com","openai chatgpt":"openai.com","microsoft copilot":"copilot.microsoft.com","bing chat":"copilot.microsoft.com",elevenlabs:"elevenlabs.io",jasper:"jasper.ai",replit:"replit.com",linear:"linear.app",framer:"framer.com","framer ai":"framer.com",calendly:"calendly.com","reclaim ai":"reclaim.ai",intercom:"intercom.com",zendesk:"zendesk.com",langchain:"langchain.com",huggingface:"huggingface.co","hugging face":"huggingface.co",stability:"stability.ai","stable diffusion":"stability.ai",dalle:"openai.com","dall-e":"openai.com",sora:"openai.com",anthropic:"anthropic.com",mistral:"mistral.ai",grok:"x.ai",deepl:"deepl.com",otter:"otter.ai",fireflies:"fireflies.ai",descript:"descript.com",synthesia:"synthesia.io",copyai:"copy.ai",writesonic:"writesonic.com",grammarly:"grammarly.com",canva:"canva.com",figma:"figma.com",zapier:"zapier.com",make:"make.com",n8n:"n8n.io",pinecone:"pinecone.io",weaviate:"weaviate.io",tabnine:"tabnine.com",codeium:"codeium.com",windsurf:"codeium.com",v0:"v0.dev",bolt:"bolt.new",lovable:"lovable.dev"};function i(e){let t,r,i;for(let a of(r=(t=e.trim().toLowerCase().replace(/\([^)]*\)/g,"").replace(/['']/g,"").replace(/\s+/g," ").trim()).replace(/\s+ai$/i,"").trim(),i=t.split(" by ")[0]?.trim()??"",[...new Set([t,r,i].filter(Boolean))])){if(o[a])return o[a];for(let[e,t]of Object.entries(o))if(a.includes(e)||e.includes(a))return t}return null}e.s(["domainFromUrl",0,r,"duckDuckGoFaviconUrl",0,function(e){let t=e.replace(/^https?:\/\//,"").replace(/^www\./,"").split("/")[0]??e;return`https://icons.duckduckgo.com/ip3/${encodeURIComponent(t)}.ico`},"guessDomainForTool",0,i,"resolveToolLogoUrl",0,function(e,o){let a=o?.logoUrl?.trim();if(a&&(a.startsWith("community-tool-logos/")||a.startsWith("profile-avatars/")||/^https?:\/\//i.test(a)))return a;let l=o?.websiteUrl?r(o.websiteUrl):null;if(l)return t(l);if(a)return a;let s=i(e);if(s)return t(s)}])},466557,e=>{"use strict";e.s(["slugifyToolName",0,function(e){return e.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}])},632781,e=>{"use strict";var t=e.i(758379);e.s(["Loader2",()=>t.default])},157073,e=>{"use strict";var t=e.i(462265),r=e.i(482500),o=e.i(524729);let i="community-tool-logos";function a(e){return/^https?:\/\//i.test(e?.trim()??"")}function l(e){let t=e?.trim();return!!t&&t.startsWith(`${i}/`)}let s=new Set(["image/jpeg","image/png","image/webp","image/gif"]);async function n(e){let t=e?.trim();if(t){if(a(t))return t;if(l(t)){let{url:e}=await (0,r.getUrl)({path:t});return e.toString()}return t}}async function c(e){if(!s.has(e.type))throw Error("Logo must be a JPG, PNG, WebP, or GIF image.");if(e.size>2097152)throw Error("Logo must be 2 MB or smaller.");let r=await (0,t.fetchAuthSession)(),a=r.identityId?.trim();if(!a)throw Error("Sign in to upload a tool image.");let l=function(e){switch(e){case"image/jpeg":return"jpg";case"image/png":default:return"png";case"image/webp":return"webp";case"image/gif":return"gif"}}(e.type),n=`${i}/${a}/${crypto.randomUUID()}.${l}`;return await (0,o.uploadData)({path:n,data:e,options:{contentType:e.type}}).result,n}e.s(["discussionToolLogoProps",0,function(e,t){let r=e.toolWebsiteUrl?.trim(),o=e.toolLogoUrl?.trim(),i=o&&(l(o)||a(o))?o:void 0;return i||r||o?{websiteUrl:r||void 0,logoUrl:i||o||void 0}:{}}
1,"isHttpLogoUrl",0,a,"isStorageLogoPath",0,l,"resolveCommunityToolLogoDisplayUrl",0,n,"uploadCommunityToolLogo",0,c])},31505,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(595),i=e.i(157073),a=e.i(854875),l=e.i(647163);let s={xs:"size-5 rounded-md text-[10px]",sm:"size-8 rounded-[10px] text-xs",md:"size-10 rounded-xl text-sm"};e.s(["default",0,function({name:e,logoUrl:n,websiteUrl:c,size:u="md",className:m}){let d=(0,a.resolveToolLogoUrl)(e,{logoUrl:n,websiteUrl:c}),g=(0,r.useMemo)(()=>c?(0,a.domainFromUrl)(c):(0,a.guessDomainForTool)(e),[e,c]),[p,f]=(0,r.useState)(()=>{if(d&&((0,i.isHttpLogoUrl)(d)||!(0,i.isStorageLogoPath)(d)))return d}),[h,x]=(0,r.useState)(!d);return(0,r.useEffect)(()=>{let e=n?.trim();if(e&&(0,i.isStorageLogoPath)(e)){let t=!1;return(0,i.resolveCommunityToolLogoDisplayUrl)(e).then(e=>{t||(f(e),x(!e))}),()=>{t=!0}}f(d),x(!d)},[n,d,e]),(0,t.jsx)("div",{className:(0,l.cn)("box-border flex shrink-0 flex-none items-center justify-center overflow-hidden border border-slate-900/8 bg-white font-semibold text-[#0A0A0A] dark:border-white/10 dark:bg-[#2A2D3D] dark:text-[#ECECF3]",s[u],m),children:!h&&p?(0,t.jsx)("img",{src:p,alt:"",className:"size-full object-cover",onError:()=>{g&&p?.includes("google.com/s2/favicons")?f((0,a.duckDuckGoFaviconUrl)(g)):x(!0)}}):(0,o.getToolInitials)(e)})}])},46980,e=>{"use strict";let t=(e,t)=>`aipub-v2:cache:v1:${e}:${t}`;e.s(["CACHE_TTL",0,{ONE_HOUR:36e5,SIX_HOURS:216e5,TWELVE_HOURS:432e5,ONE_DAY:864e5,SEVEN_DAYS:6048e5},"readCache",0,(e,r,o)=>{if(void 0===window.localStorage)return null;try{let i=window.localStorage.getItem(t(e,r));if(!i)return null;let a=JSON.parse(i);if(!a||"number"!=typeof a.writtenAt)return null;if(Date.now()-a.writtenAt>o)return window.localStorage.removeItem(t(e,r)),null;return a.value}catch{return null}},"writeCache",0,(e,r,o)=>{if(void 0!==window.localStorage)try{let i={value:o,writtenAt:Date.now()};window.localStorage.setItem(t(e,r),JSON.stringify(i))}catch{}}])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},456539,e=>{"use strict";var t=e.i(144716);e.s(["ChevronUp",()=>t.default])},513797,e=>{"use strict";let t=(0,e.i(456420).default)("image-plus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);e.s(["ImagePlus",0,t],513797)},474544,e=>{"use strict";let t=(0,e.i(456420).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,t],474544)},203358,e=>{"use strict";let t=(0,e.i(456420).default)("thumbs-up",[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]]);e.s(["ThumbsUp",0,t],203358)},494544,98634,e=>{"use strict";var t=e.i(843476),r=e.i(1018),o=e.i(595),i=e.i(647163);let a={xs:"size-6 text-[10px]",sm:"size-7 text-[14px]",md:"size-8 text-[15px]"};e.s(["default",0,function({name:e,avatarImageUrl:l,size:s="sm",className:n}){return(0,t.jsx)(r.default,{name:e,avatarImageUrl:l,className:(0,i.cn)("shrink-0 shadow-none dark:shadow-none",a[s],n),fallbackClassName:(0,i.cn)((0,o.avatarClassFor)(e),"font-semibold text-white")})}],494544);var l=e.i(186532);let s={SAFE:"safe",SEXUAL:"sexual content",VIOLENCE:"violent content",HATE:"hate speech",HARASSMENT:"harassment",SELF_HARM:"self-harm content",ILLEGAL:"illegal content",UNKNOWN:"community-guideline violation"},n=async e=>{let t=e.map(e=>(e=>{if(!e)return"";let t=window.document.createElement("div");return t.innerHTML=e,(t.textContent??"").replace(/\s+/g," ").trim()})(e??"")).filter(Boolean).join("\n\n").trim();if(!t)return{allowed:!0,category:"SAFE",reason:"",message:""};try{let e,r,o,i,{data:a,errors:n}=await l.amplifyClient.queries.moderateContent({text:t});if(n?.length)return console.warn("[moderation] errors, failing open:",n),{allowed:!0,category:"SAFE",reason:"",message:""};let c=a?.allowed??!0,u=(e=(a?.category??"").toUpperCase(),"SAFE"===e||"SEXUAL"===e||"VIOLENCE"===e||"HATE"===e||"HARASSMENT"===e||"SELF_HARM"===e||"ILLEGAL"===e?e:"UNKNOWN"),m=(a?.reason??"").trim();return{allowed:c,category:u,reason:m,message:c?"":(r=s[u]??"community-guideline violation",o=(m??"").trim(),i=`This looks like ${r} and can't be posted to the community.`,o&&o.toLowerCase()!==r?`${i} ${o.endsWith(".")?o:`${o}.`}`:i)}}catch(e){return console.warn("[moderation] request failed, failing open:",e),{allowed:!0,category:"SAFE",reason:"",message:""}}};e.s(["moderateCommunityText",0,n],98634)},787799,394715,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(689664),i=e.i(716327),a=e.i(513797),l=e.i(632781),s=e.i(77071),n=e.i(566595),c=e.i(328623),u=e.i(263676),m=e.i(186532),d=e.i(31505);function g(){return{name:""}}e.s(["emptyCommunityTool",0,g],394715);var p=e.i(157073),f=e.i(466557),h=e.i(731621);
1e.s(["default",0,function({value:e,onChange:x,placeholder:b="Search any AI toolâ¦",id:y}){let[w,v]=(0,r.useState)(!1),[k,U]=(0,r.useState)(""),[N,L]=(0,r.useState)("idle"),[j,C]=(0,r.useState)(null),[E,T]=(0,r.useState)(),[S,A]=(0,r.useState)(null),[z,$]=(0,r.useState)(!1),[I,D]=(0,r.useState)(null),F=(0,r.useRef)(null),O=(0,r.useRef)(null),M=(0,r.useRef)(null),P=(0,r.useRef)(null),R=(0,r.useRef)(0),_=(0,r.useMemo)(()=>{let e=k.trim().toLowerCase();return e?h.POPULAR_TOOL_SUGGESTIONS.filter(t=>t.name.toLowerCase().includes(e)||t.category.toLowerCase().includes(e)):h.POPULAR_TOOL_SUGGESTIONS},[k]),G=(0,r.useMemo)(()=>{let e=k.trim().toLowerCase();return e?h.POPULAR_TOOL_SUGGESTIONS.find(t=>t.name.toLowerCase()===e)??null:null},[k]),H=!!(k.trim()&&!G);(0,r.useEffect)(()=>{if(!w)return;let e=e=>{let t=e.target;F.current?.contains(t)||O.current?.contains(t)||v(!1)},t=e=>{"Escape"===e.key&&v(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[w]),(0,r.useEffect)(()=>{w&&queueMicrotask(()=>M.current?.focus())},[w]);let B=()=>{T(void 0),A(null),D(null)},W=e=>{x({name:e.name.trim(),logoUrl:e.logoUrl?.trim()||void 0,websiteUrl:e.websiteUrl?.trim()||void 0}),v(!1),U(""),L("idle"),C(null),B()},V=async e=>{let t=e.target.files?.[0];if(e.target.value="",!t)return;let r=URL.createObjectURL(t);A(r),$(!0),D(null);
1try{let e=await (0,p.uploadCommunityToolLogo)(t);T(e)}catch(e){D(e instanceof Error?e.message:"Could not upload image."),T(void 0)}finally{$(!1),URL.revokeObjectURL(r),A(null)}},q=async()=>{let e=k.trim();if(!e)return;let t=(0,f.slugifyToolName)(e)||e.toLowerCase(),r=(0,h.readToolDetailFromCache)(t);if(r)return void W({name:r.name,logoUrl:E??r.logoUrl,websiteUrl:r.visitUrl});L("verifying"),C(null);let o=++R.current;try{let r=await m.amplifyClient.queries.describeTool({slug:t,name:e});if(o!==R.current)return;if(r.errors?.length)throw Error(r.errors[0]?.message||"Verification failed.");let i=(0,h.toToolDetail)(r.data);if(!i)return void L("not-found");(0,h.writeToolDetailToCache)(t,i),W({name:i.name,logoUrl:E??i.logoUrl,websiteUrl:i.visitUrl})}catch(e){if(o!==R.current)return;C(e instanceof Error?e.message:"Could not verify that tool."),L("error")}},K="verifying"===N,X=e.name.trim(),Y=e.logoUrl??(X?(0,h.getToolLogoProps)(X).logoUrl:void 0),J=e.websiteUrl??(X?(0,h.getToolLogoProps)(X).websiteUrl:void 0);return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("button",{type:"button",id:y,ref:O,onClick:()=>v(e=>!e),className:"flex w-full items-center justify-between gap-3 rounded-xl border border-[#0F172A1C] bg-[#F5F8FF] px-[15px] py-3 text-left text-[15px] outline-none transition-colors hover:border-indigo-300 focus:border-indigo-300 focus:ring-2 focus:ring-indigo-200 dark:border-white/10 dark:bg-[#232632]",children:[(0,t.jsx)("span",{className:"flex min-w-0 items-center gap-2.5",children:X?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.default,{name:X,logoUrl:Y,websiteUrl:J,size:"sm",className:"!size-7 !rounded-md"}),(0,t.jsx)("span",{className:"truncate text-neutral-950 dark:text-foreground",children:X})]}):(0,t.jsx)("span",{className:"text-zinc-400",children:b})}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",children:[X?(0,t.jsx)("span",{role:"button",tabIndex:0,"aria-label":"Clear",onClick:e=>{e.stopPropagation(),x(g())},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),x(g()))},className:"flex size-5 cursor-pointer items-center justify-center rounded-full text-zinc-500 hover:bg-zinc-200/70 dark:text-[#9EA3B5] dark:hover:bg-white/10",children:(0,t.jsx)(u.X,{size:12})}):null,(0,t.jsx)(i.ChevronDown,{size:16,className:`text-zinc-500 transition-transform dark:text-[#9EA3B5] ${w?"rotate-180":""}`})]})]}),w?(0,t.jsxs)("div",{ref:F,className:"absolute left-0 right-0 top-[calc(100%+6px)] z-50 max-h-[420px] overflow-hidden rounded-xl border border-[#0F172A1C] bg-white shadow-[0_16px_38px_rgba(15,23,42,0.18)] dark:border-white/10 dark:bg-[#1E1F28]",children:[(0,t.jsx)("div",{className:"border-b border-slate-900/8 p-2 dark:border-white/10",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(n.Search,{size:13,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-zinc-400"}),(0,t.jsx)("input",{ref:M,value:k,onChange:e=>{U(e.target.value),L("idle"),C(null)},placeholder:"Search popular tools or type any AI tool name",className:"h-9 w-full rounded-lg border border-transparent bg-[#F5F8FF] pl-8 pr-3 text-[14px] text-neutral-950 outline-none placeholder:text-zinc-400 focus:border-indigo-300 focus:ring-2 focus:ring-indigo-200 dark:bg-[#232632] dark:text-foreground"})]})}),(0,t.jsxs)("div",{className:"max-h-[320px] space-y-0.5 overflow-y-auto p-1.5",children:[_.length>0?_.map(e=>{let r=X.toLowerCase()===e.name.toLowerCase(),i=(0,h.getToolLogoProps)(e.name);return(0,t.jsxs)("button",{type:"button",onClick:()=>W({name:e.name,logoUrl:i.logoUrl,websiteUrl:i.websiteUrl}),className:"flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left transition-colors hover:bg-slate-100 dark:hover:bg-white/7",children:[(0,t.jsx)(d.default,{name:e.name,logoUrl:i.logoUrl,websiteUrl:i.websiteUrl,size:"sm",className:"!size-7 !rounded-md"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate text-[14px] font-semibold text-neutral-950 dark:text-foreground",children:e.name}),(0,t.jsx)("span",{className:"block truncate text-[14px] text-zinc-500 dark:text-[#9EA3B5]",children:e.category})]}
1),r?(0,t.jsx)(o.Check,{size:14,className:"shrink-0 text-emerald-600"}):null]},e.name)}):null,H?(0,t.jsxs)("div",{className:"mt-1 space-y-1 border-t border-slate-900/8 pt-1.5 dark:border-white/10",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{let e=k.trim();e&&W({name:e,logoUrl:E})},className:"flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left transition-colors hover:bg-slate-100 dark:hover:bg-white/7",children:[S?(0,t.jsx)("img",{src:S,alt:"",className:"size-7 shrink-0 rounded-md border border-slate-900/8 object-cover dark:border-white/10"}):E?(0,t.jsx)(d.default,{name:k.trim(),logoUrl:E,size:"sm",className:"!size-7 !rounded-md"}):(0,t.jsx)("span",{className:"inline-flex size-7 shrink-0 items-center justify-center rounded-md bg-emerald-100 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-300",children:(0,t.jsx)(s.Plus,{size:13})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("span",{className:"block truncate text-[14px] font-semibold text-neutral-950 dark:text-foreground",children:["Use â",k.trim(),"â"]}),(0,t.jsx)("span",{className:"block truncate text-[14px] text-zinc-500 dark:text-[#9EA3B5]",children:"Add as a custom AI tool tag"})]})]}),(0,t.jsxs)("div",{className:"rounded-lg bg-[#F8FAFC] px-2 py-2 dark:bg-white/5",children:[(0,t.jsx)("p",{className:"mb-1.5 text-[12px] font-semibold text-zinc-600 dark:text-[#9EA3B5]",children:"Tool image (optional)"}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(E||S)&&k.trim()?(0,t.jsx)(d.default,{name:k.trim(),logoUrl:E,size:"sm",className:"!size-8 !rounded-md"}):null,(0,t.jsxs)("button",{type:"button",disabled:z,onClick:()=>P.current?.click(),className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-zinc-200 bg-white px-2.5 text-[13px] font-semibold text-zinc-700 hover:bg-zinc-50 disabled:opacity-60 dark:border-white/10 dark:bg-[#232632] dark:text-[#D6D9E3]",children:[z?(0,t.jsx)(l.Loader2,{size:13,className:"animate-spin","aria-hidden":!0}):(0,t.jsx)(a.ImagePlus,{size:13,"aria-hidden":!0}),z?"Uploadingâ¦":E?"Replace image":"Upload image"]}),E?(0,t.jsx)("button",{type:"button",disabled:z,onClick:B,className:"text-[13px] font-semibold text-zinc-500 hover:text-zinc-700 dark:text-[#9EA3B5]",children:"Remove"}):null]}),I?(0,t.jsx)("p",{className:"mt-1.5 text-[12px] text-rose-600 dar
1k:text-rose-300",children:I}):null,(0,t.jsx)("input",{ref:P,type:"file",accept:"image/jpeg,image/png,image/webp,image/gif",className:"hidden",onChange:V})]}),(0,t.jsxs)("button",{type:"button",onClick:q,disabled:K,className:"flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left transition-colors hover:bg-slate-100 disabled:cursor-not-allowed disabled:opacity-60 dark:hover:bg-white/7",children:[(0,t.jsx)("span",{className:"inline-flex size-7 shrink-0 items-center justify-center rounded-md bg-indigo-100 text-indigo-700 dark:bg-indigo-500/20 dark:text-indigo-300",children:K?(0,t.jsx)(l.Loader2,{size:13,className:"animate-spin"}):(0,t.jsx)(c.Sparkles,{size:13})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate text-[14px] font-semibold text-neutral-950 dark:text-foreground",children:K?"Searching the webâ¦":"Verify with AI web search"}),(0,t.jsxs)("span",{className:"block truncate text-[14px] text-zinc-500 dark:text-[#9EA3B5]",children:["Look up â",k.trim(),"â on the web and use the verified name."]})]})]})]}):null,k.trim()||0!==_.length?null:(0,t.jsx)("p",{className:"px-3 py-4 text-center text-[14px] text-zinc-500",children:"No tools to suggest yet."}),"not-found"===N?(0,t.jsx)("p",{className:"mt-1 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-[14px] text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-300",children:"We couldn't verify that as a real AI product, but you can still post it as a custom tag."}):null,j?(0,t.jsx)("p",{className:"mt-1 rounded-lg border border-rose-200 bg-rose-50 px-3 py-2 text-[14px] text-rose-700 dark:border-rose-500/30 dark:bg-rose-500/10 dark:text-rose-300",children:j}):null]})]}):null]})}],787799)}]);
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.