PageSourceSearch

https://www.aiphotoeditor.ai/_next/static/chunks/2516-f43e676a73768dc8.js

js aiphotoeditor.ai collected 2026-10-05 12:33:46 UTC 16,260 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2516],{71539:function(e,a,t){var s={"./ar.json":[95508,5508],"./de.json":[86788,6788],"./en.json":[83,83],"./es.json":[8332,8332],"./fr.json":[47159,7159],"./hi.json":[35579,5579],"./id.json":[29031,9031],"./it.json":[78187,8187],"./ja.json":[60346,346],"./ko.json":[84363,4363],"./ms.json":[14661,4661],"./pl.json":[10823,823],"./pt.json":[36510,6510],"./ru.json":[61026,1026],"./th.json":[11247,1247],"./tr.json":[47650,7650],"./zh.json":[40641,641]};function webpackAsyncContext(e){if(!t.o(s,e))return Promise.resolve().then(function(){var a=Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a});var a=s[e],r=a[0];return t.e(a[1]).then(function(){return t.t(r,19)})}webpackAsyncContext.keys=function(){return Object.keys(s)},webpackAsyncContext.id=71539,e.exports=webpackAsyncContext},32516:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return landingpage_MainNav}});var s=t(57437),r=t(61396),n=t.n(r),l=t(2265),o=t(37346),i=t(25119),c=t(71738),d=t(73133),u=t(38438),g=t(38244),h=t(68445),x=t(47040),m=t(82549),f=t(68004),p=t(49031),b=t(83523),j=t(24033),v=t(27745),y=t(50116),D=t(53484),ButtonLangeuageNav=()=>{let e=(0,j.useRouter)(),a=(0,y.useLocale)(),[t,r]=(0,l.useTransition)(),[n,o]=(0,l.useState)(!1),i=(0,l.useRef)(null);(0,l.useEffect)(()=>{let handleClickOutside=e=>{i.current&&!i.current.contains(e.target)&&o(!1)};return n&&(document.addEventListener("mousedown",handleClickOutside),document.addEventListener("touchstart",handleClickOutside)),()=>{document.removeEventListener("mousedown",handleClickOutside),document.removeEventListener("touchstart",handleClickOutside)}},[n]);let handleLanguageChange=a=>{o(!1),r(()=>{let t;let s=window.location.pathname||"/";console.log("Current path:",s);let r=s.split("/").filter(Boolean),n=D.k1.includes(r[0]);console.log("New path:",t="/"===s||0===r.length?"/".concat(a):n?"/".concat(a,"/").concat(r.slice(1).join("/")):"/".concat(a).concat(s)),e.push(t)})};return(0,s.jsxs)("div",{className:"relative mr-6",ref:i,children:[(0,s.jsx)("button",{className:"p-2 rounded-full hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-400",onClick:()=>o(!n),children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),n&&(0,s.jsx)("div",{className:"absolute left-0 mt-2 w-36 z-50 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5",children:(0,s.jsx)("div",{className:"py-1",role:"menu","aria-orientation":"vertical","aria-labelledby":"options-menu",children:D.Mj.map(e=>(0,s.jsxs)("button",{className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 w-full text-left ".concat(a===e.lang?"bg-gray-100":""),role:"menuitem",onClick:()=>handleLanguageChange(e.lang),disabled:t,children:[(0,s.jsx)("span",{className:"mr-2",children:e.flag}),e.language]},e.lang))})})]})};let DLogo=()=>(0,s.jsx)("div",{className:"relative w-8 h-8 flex items-center justify-center",children:(0,s.jsx)("img",{src:"https://cdn.aiphotoeditor.ai/icon.png",alt:"AI Photo Editor logo",className:"w-8",placeholder:"blur",priority:"true",width:48,height:48})});var landingpage_MainNav=()=>{let[e,a]=(0,l.useState)(!1),[t,r]=(0,l.useState)(!1),w=(0,j.usePathname)(),N=(0,j.useParams)(),C=(0,y.useTranslations)("Header"),k=N.locale||D.al;(0,l.useEffect)(()=>{let handleScroll=()=>{let e=window.scrollY;r(e>50)};return window.addEventListener("scroll",handleScroll),()=>window.removeEventListener("scroll",handleScroll)},[]);let E=!!w&&("/home"===w||w.startsWith("/text-to-")||w.startsWith("/lipsync")||w.startsWith("/drawing-with-ai")||w.startsWith("/prompt-generator")||w.startsWith("/ai-designer")||w.startsWith("/video-to-audio")||w.startsWith("/".concat(k,"/home"))||w.startsWith("/".concat(k,"/ai-designer"))||w.startsWith("/".concat(k,"/text-to-"))||w.startsWith("/".concat(k,"/lipsync"))||w.startsWith("/".concat(k,"/drawing-with-ai"))||w.startsWith("/".concat(k,"/prompt-generator"))||w.startsWith("/".concat(k,"/video-to-audio"))),F=E?[]:[{label:C("home"),href:"/".concat(k,"/"),icon:o.Z},{label:C("dashboard"),href:"/".concat(k,"/dashboard"),icon:i.Z},{label:C("pricing"),href:"/".concat(k,"/pricing"),icon:c.Z},{label:C("explore"),href:"/".concat(k,"/explore"),icon:d.Z}
1,{label:C("imageToVideo"),href:"/".concat(k,"/image-to-video"),icon:u.Z},{label:C("history"),href:"/".concat(k,"/history"),icon:g.Z}],Z=[{label:"Image to Prompt",description:"Turn images into reusable creative prompts.",href:"/".concat(k,"/image-to-prompt"),icon:h.Z},{label:"Remove Background",description:"Remove image backgrounds cleanly in seconds.",href:"/".concat(k,"/remove-background"),icon:x.Z}],L="inline-flex h-9 items-center gap-1.5 text-sm font-medium leading-none transition-colors duration-300 ".concat("text-black hover:text-gray-600"),z="w-4 h-4 stroke-[2]";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("header",{className:"fixed top-0 left-0 right-0 z-50 transition-all duration-300 ".concat("bg-white backdrop-blur-md border-b border-gray-200"),children:(0,s.jsxs)("div",{className:"max-w-7xl mx-auto px-4 md:px-8 py-4 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 md:w-[220px]",children:[(0,s.jsx)("button",{className:"md:hidden p-2 text-gray-700 hover:bg-gray-100 rounded-lg transition-colors",onClick:()=>a(!e),"aria-label":"Toggle menu",children:e?(0,s.jsx)(m.Z,{size:24}):(0,s.jsx)(f.Z,{size:24})}),(0,s.jsxs)(n(),{href:"/".concat(k),className:"flex items-center gap-2",children:[(0,s.jsx)(DLogo,{}),(0,s.jsx)("span",{className:"hidden md:block text-xl font-bold transition-colors duration-300 ".concat("text-black"),children:"AI Photo Editor"})]})]}),(0,s.jsx)("nav",{className:"hidden md:flex items-center justify-center flex-1",children:(0,s.jsx)("div",{className:"flex items-center gap-5",children:F.map(e=>{let a=e.icon;return e.href==="/".concat(k,"/dashboard")?(0,s.jsxs)("div",{className:"relative group flex h-9 items-center",children:[(0,s.jsxs)("button",{type:"button",className:L,children:[(0,s.jsx)(p.Z,{className:z,"aria-hidden":"true"}),(0,s.jsx)("span",{children:"Free Tools"}),(0,s.jsx)(b.Z,{className:"w-3.5 h-3.5 stroke-[2] transition-transform duration-200 group-hover:rotate-180","aria-hidden":"true"})]}),(0,s.jsx)("div",{className:"invisible absolute left-1/2 top-full z-50 w-[460px] -translate-x-1/2 pt-4 opacity-0 transition-all duration-200 group-hover:visible group-hover:opacity-100",children:(0,s.jsx)("div",{className:"rounded-2xl border border-gray-200 bg-white/90 p-5 shadow-2xl shadow-gray-900/10 backdrop-blur-xl",children:(0,s.jsx)("div",{className:"space-y-4",children:Z.map(e=>{let a=e.icon;return(0,s.jsxs)(n(),{href:e.href,className:"group/item flex items-start gap-4 roun
1ded-xl p-2 transition-colors hover:bg-gray-50",children:[(0,s.jsx)("span",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-xl border border-gray-200 bg-gray-50 text-gray-700 transition-colors group-hover/item:border-gray-300 group-hover/item:bg-white group-hover/item:text-gray-950",children:(0,s.jsx)(a,{className:"h-6 w-6 stroke-[2]","aria-hidden":"true"})}),(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"block text-base font-semibold leading-tight text-gray-950",children:e.label}),(0,s.jsx)("span",{className:"mt-1.5 block text-sm leading-6 text-gray-500",children:e.description})]})]},e.label)})})})})]},"free-tools"):(0,s.jsxs)(n(),{href:e.href,className:L,children:[a&&(0,s.jsx)(a,{className:z,"aria-hidden":"true"}),(0,s.jsx)("span",{children:e.label})]},e.label)})})}),(0,s.jsxs)("div",{className:"flex items-center justify-end gap-3 md:w-[220px]",children:[(0,s.jsx)(ButtonLangeuageNav,{extraStyle:"hidden md:inline-flex"}),(0,s.jsx)(v.Z,{})]})]})}),e&&(0,s.jsxs)("div",{className:"md:hidden fixed inset-0 z-[9999]",style:{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh"},children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>a(!1)}),(0,s.jsx)("div",{className:"absolute left-0 top-0 h-full w-64 sm:w-72 bg-white shadow-2xl transform transition-transform duration-300 overflow-y-auto ".concat(e?"translate-x-0":"-translate-x-full"),style:{maxHeight:"100vh"},children:(0,s.jsxs)("div",{className:"flex flex-col h-full",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-gray-200",children:[(0,s.jsxs)(n(),{href:"/".concat(k),className:"flex items-center gap-2",onClick:()=>a(!1),children:[(0,s.jsx)(DLogo,{}),(0,s.jsx)("span",{className:"text-lg font-bold text-gray-900",children:"AI Photo Editor"})]}),(0,s.jsx)("button",{className:"p-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-all",onClick:()=>a(!1),"aria-label":"Close menu",children:(0,s.jsx)(m.Z,{size:20})})]}),(0,s.jsx)("nav",{className:"flex-1 overflow-y-auto px-4 py-6",children:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"px-4 pb-2 pt-1 text-xs font-semibold uppercase text-gray-400",children:"Free Tools"}),Z.map(e=>{let t=e.icon,r=w===e.href||w.startsWith(e.href);return(0,s.jsxs)(n(),{href:e.href,className:"flex items-center gap-4 px-4 py-3.5 rounded-xl transition-all duration-200 group ".concat(r?"bg-gray-900 text-white border border-gray-900":"text-gray-700 hover:text-gray-900 hover:bg-gray-50"),onClick:()=>a(!1),children:[(0,s.jsx)("div",{className:"p-2 rounded-lg transition-all duration-200 ".concat(r?"bg-white/20":"bg-gray-100 group-hover:bg-gray-200"),children:(0,s.jsx)(t,{className:"w-5 h-5"})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base",children:e.label}),r&&(0,s.jsx)("div",{className:"h-0.5 w-8 bg-white mt-1 rounded-full"})]})]},e.label)})]}),F.map((e,t)=>{let r=e.icon,l=w===e.href||e.href!=="/".concat(k,"/")&&w.startsWith(e.href);return(0,s.jsxs)(n(),{href:e.href,className:"flex items-center gap-4 px-4 py-3.5 rounded-xl transition-all duration-200 group ".concat(l?"bg-gray-900 text-white border border-gray-900":"text-gray-700 hover:text-gray-900 hover:bg-gray-50"),onClick:()=>a(!1),children:[(0,s.jsx)("div",{className:"p-2 rounded-lg transition-all duration-200 ".concat(l?"bg-white/20":"bg-gray-100 group-hover:bg-gray-200"),children:(0,s.jsx)(r,{className:"w-5 h-5"})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("span",{className:"font-medium text-base",children:e.label}),l&&(0,s.jsx)("div",{className:"h-0.5 w-8 bg-white mt-1 rounded-full"})]}),l&&(0,s.jsx)("div",{className:"w-1.5 h-1.5 bg-white rounded-full animate-pulse"})]},e.label)})]})})]})})]})]})}},27745:function(e,a,t){"use strict";var s=t(57437),r=t(2265),n=t(16691),l=t.n(n),o=t(61396),i=t.n(o),c=t(68291),d=t(15234),u=t(37346),g=t(71738),h=t(2882),x=t(65883),m=t(13082),f=t(32273),p=t(45651),b=t(38597),j=t(50116),v=t(24033);a.Z=()=>{var e;let a=(0,j.useTranslations)("Header"),t=(0,v.useParams)(),n=t.locale||"en",o=(0,m.createClientComponentClient)(),[y,D]=(0,r.useState)(!1),[w,N]=(0,r.useState)(null),[C,k]=(0,r.useState)(0),[E,F]=(0,r.useState)(!1),[Z,L]=(0,r.useState)(!1),z=(0,r.useRef)(null);(0,r.useEffect)(()=>{let getUser=async()=>{let{data:e}=await o.auth.getUser();N(e.user)};getUser()},[o]),(0,r.useEffect)(()=>{let getCredits=async()=>
1{if(w){D(!0);try{let{credits:e}=await f.Z.post("/credits",{});k(e)}catch(e){k(0),console.error(e)}D(!1)}};getCredits()},[w]),(0,r.useEffect)(()=>{function handleClickOutside(e){z.current&&!z.current.contains(e.target)&&F(!1)}return document.addEventListener("mousedown",handleClickOutside),()=>{document.removeEventListener("mousedown",handleClickOutside)}},[]);let handleSignOut=async()=>{await o.auth.signOut(),window.location.href="/".concat(n)},handleBilling=async()=>{D(!0);try{let{url:e}=await f.Z.post("checkout/stripe/create-portal",{returnUrl:window.location.href});window.location.href=e}catch(e){console.error(e)}D(!1)};if(!w)return(0,s.jsxs)(i(),{href:"/".concat(n,"/signin?from=/").concat(n,"/dashboard"),className:"flex items-center gap-2 px-5 py-2.5 font-medium text-white bg-gray-900 hover:bg-gray-800 rounded-full transition-all shadow-md hover:shadow-lg",children:[(0,s.jsxs)("span",{children:[" ",a("login")," "]}),(0,s.jsx)(c.Z,{size:16})]});let O=null==w?void 0:null===(e=w.user_metadata)||void 0===e?void 0:e.avatar_url;return(0,s.jsxs)("div",{className:"relative",ref:z,children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("div",{onClick:()=>{L(!1),setTimeout(()=>{L(!0)},100)},className:"flex items-center gap-1.5 px-3 py-1.5 rounded-full border border-gray-900 text-gray-800 cursor-pointer",children:[(0,s.jsx)(d.Z,{size:16,className:"text-gray-900"}),(0,s.jsx)("span",{className:"font-medium",children:C})]}),(0,s.jsx)("button",{onClick:()=>F(!E),className:"relative w-10 h-10 rounded-full overflow-hidden border-2 border-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-500",children:(0,s.jsx)(l(),{src:O,alt:"User avatar",fill:!0,className:"object-cover"})})]}),(0,s.jsx)(p.Z,{isOpen:Z,setIsOpen:L,requiredCredits:2,availableCredits:C}),E&&(0,s.jsx)("div",{className:"absolute right-0 mt-2 w-56 rounded-lg shadow-lg bg-white  border border-gray-200  overflow-hidden z-50",children:(0,s.jsxs)("div",{className:"py-2",children:[(0,s.jsxs)(i(),{href:"/".concat(n),className:"flex items-center gap-3 px-4 py-3 text-gray-700  hover:bg-gray-100  transition-colors",onClick:()=>F(!1),children:[(0,s.jsx)(u.Z,{size:18,className:"text-gray-900"}),(0,s.jsxs)("span",{children:[" ",a("home")," "]})]}),(0,s.jsxs)("button",{onClick:handleBilling,className:"w-full flex items-center gap-3 px-4 py-3 text-gray-700  hover:bg-gray-100 transition-colors",children:[(0,s.jsx)(g.Z,{size:18,className:"text-gray-900"}),(0,s.jsxs)("span",{children:[" ",a("billing")," "]})]}),(0,s.jsxs)(i(),{href:"mailto:".concat(b.Z.mailgun.supportEmail),className:"flex items-center gap-3 px-4 py-3 text-gray-700  hover:bg-gray-100  transition-colors",onClick:()=>F(!1),children:[(0,s.jsx)(h.Z,{size:18,className:"text-gray-900 "}),(0,s.jsxs)("span",{children:[" ",a("support")," "]})]}),(0,s.jsx)("div",{className:"border-t border-gray-200 my-1"}),(0,s.jsxs)("button",{onClick:handleSignOut,className:"w-full flex items-center gap-3 px-4 py-3 text-gray-700  hover:bg-gray-100 transition-colors",children:[(0,s.jsx)(x.Z,{size:18,className:"text-gray-900 "}),(0,s.jsxs)("span",{children:[" ",a("logout")," "]})]})]})})]})}},53484:function(e,a,t){"use strict";t.d(a,{Mj:function(){return o},al:function(){return l},k1:function(){return n}});var s=t(24033),r=t(66137);let n=["en","zh","ja","ko","ar","es","pt","de","fr","ru","id","hi","th","ms","pl","it","tr"],l="en",o=[{lang:"en",language:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},{lang:"zh",language:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},{lang:"ja",language:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},{lang:"ko",language:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},{lang:"ar",language:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},{lang:"es",language:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},{lang:"pt",language:"Portugu\xeas",flag:"\uD83C\uDDF5\uD83C\uDDF9"},{lang:"de",language:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},{lang:"fr",language:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},{lang:"id",language:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},{lang:"hi",language:"Hindi",flag:"\uD83C\uDDEE\uD83C\uDDF3"},{lang:"th",language:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},{lang:"ms",language:"Malay",flag:"\uD83C\uDDF2\uD83C\uDDFE"},{lang:"pl",language:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},{lang:"it",language:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},{lang:"tr",language:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"}];(0,r.cF)(async e=>{let{locale:a}=e;return n.includes(a)||(0,s.notFound)(),{messages:(await t(71539)("./".concat(a,".json"))).default}})}}]);

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.