1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[57501],{285:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});var r=t(95155);function s(e){var a=e.text,t=e.onClick,s=e.disabled,i=e.loading,n=void 0!==i&&i,d=e.className;return(0,r.jsx)("button",{onClick:t,disabled:void 0!==s&&s||n,className:"\n google-signin-button\n relative w-full flex items-center justify-center\n h-12\n bg-white dark:bg-white\n border-2 border-gray-300 dark:border-gray-300\n rounded-lg\n font-roboto font-medium text-sm text-[#1F1F1F]\n transition-all duration-200\n hover:bg-[#F8F9FA] hover:shadow-md hover:border-gray-400\n active:bg-[#F1F3F4]\n disabled:opacity-50 disabled:cursor-not-allowed\n focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 dark:focus:ring-offset-[#0a0d14]\n ".concat(void 0===d?"":d,"\n "),style:{paddingLeft:"12px",paddingRight:"12px",gap:"10px"},"aria-label":"Sign in with Google",children:n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.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"})]}),(0,r.jsx)("span",{children:"Loading..."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"w-5 h-5 flex-shrink-0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,r.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,r.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC04"}),(0,r.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),(0,r.jsx)("span",{children:void 0===a?"Continue with Google":a})]})})}t(12115)},9056:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>k});var r=t(61975),s=t(22043),i=t(71450),n=t(95155),d=t(12115),c=t(20063),l=t(46955),o=t(15239),h=t(73195),x=t(285),y=t(78519),u=t(6132),m=t(56154),g=t(17910),p=t(42529);function f(){var e=(0,c.useRouter)(),a=(0,c.useSearchParams)(),t=(0,s._)((0,d.useState)(null),2),f=t[0],k=t[1],v=(0,s._)((0,d.useState)(!1),2),b=v[0],j=v[1],w=(0,s._)((0,d.useState)(!0),2),A=w[0],N=w[1],M="purchase"===a.get("from"),F=a.get("email"),z=a.get("redirect");return((0,d.useEffect)(function(){z&&z.startsWith("/")&&sessionStorage.setItem("audit_login_redirect",z)},[z]),(0,d.useEffect)(function(){(0,r._)(function(){var a;return(0,i.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,4,5]),[4,fetch("/api/audit/auth/check")];case 1:return[4,t.sent().json()];case 2:return t.sent().authenticated&&((a=sessionStorage.getItem("audit_login_redirect"))&&a.startsWith("/")?(sessionStorage.removeItem("audit_login_redirect"),e.push(a)):e.push("/audit/dashboard")),[3,5];case 3:return console.error("Auth check failed:",t.sent()),[3,5];case 4:return N(!1),[7];case 5:return[2]}})})()},[e]),A)?(0,n.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-white via-white to-[#f0f4ff] dark:from-[#0a0d14] dark:via-[#0a0d14] dark:to-[#0a0d14] flex items-center justify-center",children:(0,n.jsxs)(l.P.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"flex flex-col items-center gap-4",children:[(0,n.jsx)("div",{className:"w-12 h-12 border-4 border-[#10B981] border-t-transparent rounded-full animate-spin"}),(0,n.jsx)("p",{className:"text-gray-600 dark:text-gray-400",children:"Checking authentication..."})]})}):(0,n.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-white via-white to-[#f0f4ff] dark:from-[#0a0d14] dark:via-[#0a0d14] dark:to-[#0a0d14] flex items-center justify-center p-4",children:(0,n.jsxs)(l.P.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.5},className:"w-full max-w-md",children:[(0,n.jsxs)("div",{className:"text-center mb-8",children:[(0,n.jsx)(l.P.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring",stiffness:200},className:"inline-flex items-center justify-center mb-6",children:(0,n.jsx)(o.default,{src:"/logo.avif",alt:"PerfoAds",width:64,height:64,className:"rounded-2xl",priority:!0})}),(0,n.jsx)("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2 tracking-tight",children:"PerfoAds"}),(0,n.jsx)("p",{className:"text-gray-600 dark:text-gray-400",children:"AI-powered analysis of your ad performance"})]}),M&&(0,n.jsx)(l.P.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mb-4 p-4 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-xl",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(y.A,{className:"w-5 h-5 text-amber-600 dark:text-amber-400 flex-shrink-0 mt-0.5"}),(0,n.jsxs)("p",{className:"text-sm text-amber-800 dark:text-amber-200",children:[(0,n.jsx)("strong",{children:"Important:"})," Sign in with the same Google account as your purchase email",F&&(0,n.jsxs)(n.Fragment,{children:[" (",(0,n.jsx)("strong",{children:F}),")"]})," to access your credits."]})]})}),(0,n.jsxs)(h.Y4,{variant:"elevated",className:"p-8",children:[f&&(0,n.jsx)(l.P.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mb-6 p-4 bg-[#E55A4F]/10 dark:bg-[#E55A4F]/20 border border-[#E55A4F]/20 dark:border-[#E55A4F]/30 rounded-lg",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)(u.A,{className:"w-5 h-5 text-[#E55A4F] dark:text-[#F5998F] flex-shrink-0 mt-0.5"}),(0,n.jsx)("p",{className:"text-[#E55A4F] dark:text-[#F5998F] text-sm",children:f})]})}),(0,n.jsx)(x.A,{onClick:function(){return(0,r._)(function(){var e;return(0,i.YH)(this,function(a){switch(a.label){case 0:k(null),j(!0),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,fetch("/api/audit/google-auth/signin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})];case 2:return[4,a.sent().json()];case 3:return(e=a.sent()).success&&e.authUrl?window.location.href=e.authUrl:(k(e.error||"Failed to initiate Google Sign-In"),j(!1)),[3,5];case 4:return console.error("Google Sign-In error:",a.sent()),k("Network error. Please check your connection and try again."),j(!1),[3,5];case 5:return[2]}})})()},disabled:b,loading:b}),(0,n.jsxs)("div",{className:"my-6 flex items-center",children:[(0,n.jsx)("div",{className:"flex-1 border-t border-gray-200 dark:border-white/10"}),(0,n.jsx)("span",{className:"px-4 text-sm text-gray-500 dark:text-gray-400",children:"Benefits"}),(0,n.jsx)("div",{className:"flex-1 border-t border-gray-200 dark:border-white/10"})]}),(0,n.jsx)("div",{className:"space-y-3",children:[{icon:m.A,text:"Instant access - no password needed"},{icon:g.A,text:"Secure Google authentication"},{icon:p.A,text:"Your data stays private"}].map(function(e,a){return(0,n.jsxs)(l.P.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.3+.1*a},className:"flex items-center gap-3 text-sm text-gray-600 dark:text-gray-400",children:[(0,n.jsx)("div",{className:"w-6 h-6 bg-[#52B86E]/10 dark:bg-[#52B86E]/20 rounded-full flex items-center justify-center flex-shrink-0",children:(0,n.jsx)(e.icon,{className:"w-3.5 h-3.5 text-[#52B86E] dark:text-[#6FCF8E]"})}),(0,n.jsx)("span",{children:e.text})]},a)})})]}),(0,n.jsx)(l.P.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.5},className:"mt-6 text-center",children:(0,n.jsxs)("p",{className:"text-xs text-gray-500 dark:text-gray-400 leading-relaxed",children:["By signing in, you agree to our"," ",(0,n.jsx)("a",{href:"/terms",className:"text-[#10B981] dark:text-[#34D399] hover:underline",children:"Terms of Service"})," ","and"," ",(0,n.jsx)("a",{href:"/privacy",className:"text-[#10B981] dark:text-[#34D399] hover:underline",children:"Privacy Policy"}),".",(0,n.jsx)("br",{}),"We only access your Google profile information for authentication."]})})]})})}function k(){return(0,n.jsx)(d.Suspense,{fallback:(0,n.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-white via-white to-[#f0f4ff] dark:from-[#0a0d14] dark:via-[#0a0d14] dark:to-[#0a0d14] flex items-center justify-center",children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)("div",{className:"w-12 h-12 border-4 border-[#10B981] border-t-transparent rounded-full animate-spin"}),(0,n.jsx)("p",{className:"text-gray-600 dark:text-gray-400",children:"Loading..."})]})}),children:(0,n.jsx)(f,{})})}},9540:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},11716:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("package-search",[["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}],["circle",{cx:"18.5",cy:"15.5",r:"2.5",key:"b5zd12"}],["path",{d:"M20.27 17.27 22 19",key:"1l4muz"}]])},17910:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},23664:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},24722:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("file-spreadsheet",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]])},36168:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},39068:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},47937:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},55335:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("file-chart-column-increasing",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]])},56154:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},59384:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});
1var r=(0,t(71847).A)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])},78519:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},84926:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var r=(0,t(71847).A)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]])},85904:(e,a,t)=>{Promise.resolve().then(t.bind(t,9056))}},e=>{e.O(0,[52619,48657,31668,31461,15239,62266,1513,87240,45039,42610,7744,52735,5508,50141,73195,28441,31255,77358],()=>e(e.s=85904)),_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.