PageSourceSearch

https://ai-wedding-photo.vercel.app/_next/static/chunks/0sg82i54tr3a1.js

js ai-wedding-photo.vercel.app collected 2026-10-03 06:13:46 UTC 15,595 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20882,e=>{"use strict";var t=e.i(47167);let r={appName:"Ai Wedding Photo",auth:{google:{clientId:t.default.env.GOOGLE_CLIENT_ID,clientSecret:t.default.env.GOOGLE_CLIENT_SECRET},secret:t.default.env.NEXTAUTH_SECRET,url:t.default.env.NEXTAUTH_URL||"http://localhost:3000",webhook_url:t.default.env.WEBHOOK_URL||t.default.env.NEXTAUTH_URL||"http://localhost:3000"},stripe:{publishableKey:"your_stripe_publishable_key",secretKey:t.default.env.STRIPE_SECRET_KEY,webhookSecret:t.default.env.STRIPE_WEBHOOK_SECRET,plans:{basic:{id:"basic",name:"Basic Pack",credits:1e3,price:500},standard:{id:"standard",name:"Standard Pack",credits:2e3,price:1e3},pro:{id:"pro",name:"Professional Pack",credits:4e3,price:2e3},business:{id:"business",name:"Business Pack",credits:1e4,price:5e3}}},ai:{apiKey:t.default.env.MUAPIAPP_API_KEY,generationCost:18}};e.s(["default",0,r])},49987,e=>{"use strict";var t=e.i(43476),r=e.i(17255),a=e.i(71645),s=e.i(20882);e.s(["Providers",0,function({children:e}){return(0,a.useEffect)(()=>{{let e=s.default?.theme||"slate-indigo";document.documentElement.setAttribute("data-theme",e)}},[]),(0,t.jsx)(r.SessionProvider,{children:e})}])},90468,e=>{"use strict";var t=e.i(43476),r=e.i(22016),a=e.i(17255),s=e.i(71645),i=e.i(18566),n=e.i(69620),o=e.i(40141);function l(e){return(0,o.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function d(e){return(0,o.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"},child:[]}]})(e)}function c(e){return(0,o.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function x(e){return(0,o.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function u(e){return(0,o.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",y1:"12",x2:"9",y2:"12"},child:[]}]})(e)}function p(e){return(0,o.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"},child:[]}]})(e)}function m(e){return(0,o.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"1",x2:"12",y2:"23"},child:[]},{tag:"path",attr:{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"},child:[]}]})(e)}function h(e){return(0,o.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(e)}function b(e){return(0,o.GenIcon)({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m12 1.608 12 20.784H0Z"},child:[]}]})(e)}var g=e.i(20882),f=e.i(5766);e.s(["default",0,function(){let{data:e,status:o,update:y}
1=(0,a.useSession)(),v=(0,i.usePathname)(),[j,w]=(0,s.useState)(!1),[k,N]=(0,s.useState)(!1),[I,A]=(0,s.useState)(!1),[P,C]=(0,s.useState)(""),[K,S]=(0,s.useState)(!1),E=g.default?.appName||"AI SaaS",L=E.trim().charAt(0).toUpperCase(),T=!!e?.user?.customApiKey;(0,s.useEffect)(()=>{e?.user?.customApiKey&&C(e.user.customApiKey)},[e?.user?.customApiKey]);let _=v?v.match(/^\/app\/([^\/]+)/):null,G=_?_[1]:null,B=G?[{name:"Workspace",path:`/app/${G}`},{name:"Gallery",path:`/app/${G}/gallery`},{name:"Pricing",path:`/app/${G}/pricing`}]:[{name:"Workspace",path:"/"},{name:"Gallery",path:"/gallery"},{name:"Pricing",path:"/pricing"}],O=async e=>{e.preventDefault();let t=P.trim();if(!t)return void f.default.error("Please enter a valid API Key");S(!0);try{if("authenticated"===o){let e=await fetch("/api/user/apikey",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:t})}),r=await e.json();if(!e.ok)throw Error(r.error||"Failed to save API key");await y({customApiKey:t}),f.default.success("Custom API Key updated!"),A(!1),window.location.reload()}else{let e=await (0,a.signIn)("credentials",{apiKey:t,redirect:!1});if(e?.error)throw Error(e.error||"Failed to sign in with API key");f.default.success("Signed in with API Key!"),A(!1),window.location.reload()}}catch(e){f.default.error(e.message||"Failed to save API Key")}finally{S(!1)}},z=async()=>{S(!0);try{let e=await fetch("/api/user/apikey",{method:"DELETE"}),t=await e.json();if(!e.ok)throw Error(t.error||"Failed to remove API key");await y({customApiKey:null}),C(""),f.default.success("Custom API Key removed"),A(!1),window.location.reload()}catch(e){f.default.error(e.message||"Failed to remove API Key")}finally{S(!1)}};return(0,t.jsxs)("header",{className:"sticky top-0 z-50 w-full glass-panel border-b border-divider/50 shadow-md",children:[(0,t.jsxs)("div",{className:"mx-auto flex max-w-7xl items-center justify-between px-4 py-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2 transition-transform hover:scale-[1.02] active:scale-95",children:[(0,t.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-white font-extrabold text-lg shadow-md shadow-primary/30",children:L}),(0,t.jsx)("span",{className:"text-lg font-black tracking-tight text-primary-text text-nowrap",children:E})]}),(0,t.jsx)("nav",{className:"hidden md:flex items-center gap-6",children:B.map(e=>{let a=v===e.path;return(0,t.jsxs)(r.default,{href:e.path,className:`text-[13px] font-semibold transition-all relative py-1 ${a?"text-primary":"text-secondary-text hover:text-primary-text"}`,children:[e.name,a&&(0,t.jsx)("div",{className:"absolute -bottom-[20px] left-0 right-0 h-0.5 bg-primary rounded-full"})]},e.name)})}),(0,t.jsxs)("div",{className:"hidden md:flex items-center gap-3",children:[(0,t.jsxs)("a",{href:"https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FSamurAIGPT%2Fcommon-saas-template",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 rounded-full border border-divider px-4 py-1.5 text-xs font-bold text-secondary-text hover:text-primary-text hover:bg-bg-card transition-colors shadow-sm",children:[(0,t.jsx)(b,{className:"text-xs text-white"}),(0,t.jsx)("span",{children:"Deploy"})]}),(0,t.jsxs)("button",{onClick:()=>A(!0),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-bold border transition-all cursor-pointer ${T?"bg-amber-500/10 border-amber-500/30 text-amber-400 hover:bg-amber-500/20":"bg-bg-page/50 border-divider text-secondary-text hover:text-white hover:border-primary/40"}`,children:[(0,t.jsx)(p,{className:T?"text-amber-400":"text-secondary-text"}),(0,t.jsx)("span",{children:T?"Custom API Key":"Add API Key"})]}),"authenticated"===o?(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("div",{className:"flex items-center h-9 border border-divider rounded-l bg-bg-page/30 overflow-hidden pr-2",children:[(0,t.jsxs)("span",{className:"font-bold text-[13px] px-3 flex items-center text-primary-text gap-1",children:[(0,t.jsx)(m,{className:"text-emerald-500 text-xs"}),T?"∞ (API Key)":void 0!==e.user.credits?e.user.credits:0]}),!T&&(0,t.jsx)(r.default,{href:"/pricing",className:"flex items-center justify-center w-5 h-5 rounded hover:bg-bg-card text-secondary-text transition-colors",children:(0,t.jsx)(x,{size:14})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("button",{onClick:()=>N(!k),onBlur:()=>setTimeout(()=>N(!1),200),className:"h-9 w-9 flex items-center justify-center border-y border-r border-divider rounded-r bg-bg-page/30 hover:bg-bg-page transition-colors cursor-pointer",children:e.user.image?(0,t.jsx)("img",{src:e.user.image,alt:"Profile",className:"h-6 w-6 rounded-full object-cover"}):(0,t.jsx)(d,{className:"text-secondary-text",size:16})}),k&&(0,t.jsxs)("div",{className:"absolute right-0 top-11 w-52 rounded border border-divider bg-bg-card p-1 shadow-lg z-[100] animate-scale-up",children:[(0,t.jsx)("div",{className:"px-3 py-2 text-xs text-secondary-text border-b border-divider/50 mb-1 truncate",children:e.user.email}),(0,t.jsxs)("button",{onClick:()=>A(!0),className:"flex w-full items-center gap-2 rounded px-3 py-2 text-left text-xs font-semibold text-primary-text hover:bg-primary/10 transition-colors",children:[(0,t.jsx)(p,{size:14,className:"text-amber-400"}),(0,t.jsx)("span",{children:T?"Manage API Key":"Add API Key"})]}),(0,t.jsxs)("button",{onClick:()=>(0,a.signOut)({callbackUrl:"/login"}),className:"flex w-full items-center gap-2 rounded px-3 py-2 text-left text-xs font-semibold text-red-500 hover:bg-red-500/10 transition-colors",children:[(0,t.jsx)(u,{size:14}),(0,t.jsx)("span",{children:"Sign Out"})]})]})]})]}):(0,t.jsx)(r.default,{href:"/login",className:"bg-primary text-white px-5 py-1.5 rounded-full text-sm font-bold hover:bg-primary-hover transition-all shadow-md shadow-primary/20",children:"Sign In"})]}),(0,t.jsxs)("div",{className:"flex md:hidden items-center gap-2",children:["authenticated"===o&&(0,t.jsxs)("div",{className:"flex items-center h-8 border border-divider rounded bg-bg-page/30 px-2.5 text-xs font-bold text-primary-text gap-0.5",children:[(0,t.jsx)(m,{className:"text-emerald-500 text-[10px]"}),T?"∞ Key":void 0!==e.user.credits?e.user.credits:0]}),(0,t.jsx)("button",{onClick:()=>w(!j),className:"hover:bg-bg-card p-2 rounded cursor-pointer transition-colors text-primary-text border border-divider/50","aria-label":"Toggle Menu",children:j?(0,t.jsx)(n.IoClose,{size:20}):(0,t.jsx)(n.IoMenu,{size:20})})]})]}),j&&(0,t.jsx)("div",{className:"absolute top-full left-0 right-0 z-[200] glass-dropdown border-b border-divider shadow-2xl py-4 px-6 md:hidden animate-fade-in",children:(0,t.jsxs)("nav",{className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"text-[10px] uppercase font-bold text-secondary-text tracking-widest mb-1",children:"Navigation"}),B.map(e=>(0,t.jsx)(r.default,{href:e.path,onClick:()=>w(!1),className:`flex items-center py-2.5 rounded text-sm font-semibold transition-all ${v===e.path?"bg-primary/10 text-primary px-3 border border-primary/20":"text-primary-text hover:bg-bg-card"}`,children:e.name},e.name)),(0,t.jsx)("button",{onClick:()=>{w(!1),A(!0)},className:"flex w-full items-center justify-between rounded border border-amber-500/30 bg-amber-500/10 px-3 py-2.5 text-xs font-bold text-amber-400",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p,{}),(0,t.jsx)("span",{children:T?"Manage Custom API Key":"Add API Key"})]})}),(0,t.jsx)("div",{className:"h-px bg-divider/50 my-2"}),(0,t.jsxs)("a",{href:"https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FSamurAIGPT%2Fcommon-saas-template",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center justify-center gap-2 rounded-full border border-divider py-3 text-xs font-bold text-secondary-text hover:text-primary-text hover:bg-bg-card transition-all",children:[(0,t.jsx)(b,{className:"text-xs text-white"}),(0,t.jsx)("span",{children:"Clone & Deploy Template"})]}),"authenticated"===o?(0,t.jsxs)("button",{onClick:()=>{w(!1),(0,a.signOut)({callbackUrl:"/login"})},className:"flex w-full items-center justify-center gap-2 rounded bg-red-500/10 text-red-500 py-3 text-sm font-bold hover:bg-red-500/20 transition-all border border-red-500/20 mt-2",children:[(0,t.jsx)(u,{size:16}),(0,t.jsx)("span",{children:"Sign Out"})]}):(0,t.jsx)(r.default,{href:"/login",onClick:()=>w(!1),className:"flex w-full items-center justify-center rounded bg-primary text-white py-3 text-sm font-bold hover:bg-primary-hover transition-all shadow-md shadow-primary/20 mt-2",children:"Sign In"})]})}),I&&(0,t.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",children:(0,t.jsxs)("div",{className:"bg-bg-card border border-divider w-full max-w-md rounded-xl p-6 space-y-5 shadow-2xl animate-scale-up",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-divider/60 pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400 font-black text-sm uppercase",children:[(0,t.jsx)(p,{className:"text-base"}),(0,t.jsx)("span",{children:"Custom API Key Settings"})]}),(0,t.jsx)("button",{onClick:()=>A(!1),className:"text-secondary-text hover:text-white transition-colors cursor-pointer",children:(0,t.jsx)(l,{size:18})})]}),(0,t.jsxs)("p",{className:"text-xs text-secondary-text leading-relaxed",children:["Use your own ",(0,t.jsx)("strong",{children:"MuAPI Key"})," to generate wedding photos directly without consuming or purchasing website credits."]}),(0,t.jsxs)("form",{onSubmit:O,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-[11px] uppercase font-bold text-secondary-text tracking-wider",children:"MuAPI Secret Key"}),(0,t.jsx)("input",{type:"password",value:P,onChange:e=>C(e.target.value),placeholder:"mu_...",className:"w-full bg-bg-page border border-divider rounded-lg px-3.5 py-2.5 text-xs text-white placeholder-secondary-text/50 focus:outline-none focus:border-amber-400 transition-colors"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-2",children:[T&&"authenticated"===o&&(0,t.jsxs)("button",{type:"button",onClick:z,disabled:K,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-red-500/10 hover:bg-red-500/20 text-red-500 text-xs font-bold border border-red-500/20 transition-all cursor-pointer",children:[(0,t.jsx)(c,{}),(0,t.jsx)("span",{children:"Remove Key"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-auto",children:[(0,t.jsx)("button",{type:"button",onClick:()=>A(!1),className:"px-4 py-2 rounded-lg bg-bg-page border border-divider text-xs font-semibold text-secondary-text hover:text-white cursor-pointer",children:"Cancel"}),(0,t.jsxs)("button",{type:"submit",disabled:K||!P.trim(),className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-amber-500 hover:bg-amber-400 text-neutral-950 text-xs font-bold transition-all disabled:opacity-50 cursor-pointer shadow-md shadow-amber-500/20",children:[(0,t.jsx)(h,{}),(0,t.jsx)("span",{children:K?"Processing...":"authenticated"===o?"Save Key":"Sign In with API Key"})]})]})]})]})]})})]})}],90468)}]);

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.