PageSourceSearch

https://www.socialscout.ai/_next/static/immutable/chunks/3-nt00raufti3.js

js socialscout.ai collected 2026-10-05 15:08:30 UTC 11,240 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,376359,e=>{"use strict";e.i(247167);var t=e.i(843476),r=e.i(271645);e.i(522016);var a=e.i(705766),s=e.i(618566),o=e.i(217255),n=e.i(846932),i=e.i(766972),l=e.i(107657),c=e.i(683512),d=e.i(885817),g=e.i(521292);function u(){let[e,u]=(0,r.useState)(""),[m,x]=(0,r.useState)(""),[p,h]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),y=(0,s.useRouter)(),v=(0,s.useSearchParams)(),k=v.get("callbackUrl")||"/",w=v.get("auto");async function j(){try{let e=await fetch("/api/auth/session"),t=await e.json();t?.user?._id&&await fetch("https://www.socialscout.ai/api/auth/update-last-login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:t.user._id})})}catch(e){console.error("Failed to update lastLogin:",e)}}(0,r.useEffect)(()=>{"google"===w?(console.log("🔥 Auto-triggering Google OAuth from invite link"),S()):"instagram"===w?(console.log("🔥 Auto-triggering Instagram OAuth from invite link"),I()):"tiktok"===w?(console.log("🔥 Auto-triggering TikTok OAuth from invite link"),C()):"facebook"===w&&(console.log("🔥 Auto-triggering Facebook OAuth from invite link"),T())},[w]);let N=async t=>{if(t.preventDefault(),e&&m){b(!0);try{let t=await (0,o.signIn)("credentials",{email:e,password:m,redirect:!1});if(t?.error){b(!1),a.default.error(t.error);return}await j(),a.default.success("Welcome back"),y.push(k)}catch(e){console.log(e),b(!1),a.default.error("Something went wrong. Try again.")}}},S=async()=>{try{b(!0),await (0,o.signIn)("google",{callbackUrl:k,redirect:!0})}catch(e){console.error("Google sign-in error:",e),b(!1),a.default.error("Google sign-in failed")}},I=async()=>{try{b(!0),await (0,o.signIn)("instagram",{callbackUrl:k,redirect:!0})}catch(e){console.error("Instagram sign-in error:",e),b(!1),a.default.error("Instagram sign-in failed")}},C=async()=>{try{b(!0),await (0,o.signIn)("tiktok",{callbackUrl:k,redirect:!0})}catch(e){console.error("TikTok sign-in error:",e),b(!1),a.default.error("TikTok sign-in failed")}},T=async()=>{try{b(!0),await (0,o.signIn)("facebook",{callbackUrl:k,redirect:!0})}catch(e){console.error("Facebook sign-in error:",e),b(!1),a.default.error("Facebook sign-in failed")}};return(0,t.jsxs)("div",{className:"relative flex items-center justify-center min-h-screen px-4 py-10 overflow-hidden",style:{background:"var(--surface-section, transparent)"},children:[(0,t.jsx)("div",{className:"absolute -top-32 -right-32 w-[420px] h-[420px] rounded-full blur-3xl pointer-events-none animate-orb-drift-a",style:{background:"radial-gradient(circle, rgba(249,115,22,0.22), rgba(236,72,153,0.16) 55%, transparent 75%)",opacity:.85}}),(0,t.jsx)("div",{className:"absolute -bottom-40 -left-32 w-[460px] h-[460px] rounded-full blur-3xl pointer-events-none animate-orb-drift-b",style:{background:"radial-gradient(circle, rgba(139,92,246,0.18), rgba(59,130,246,0.12) 55%, transparent 75%)",opacity:.75}}),(0,t.jsxs)(n.motion.div,{initial:{opacity:0,y:16,scale:.98},animate:{opacity:1,y:0,scale:1},transition:{duration:.5,ease:[.25,.46,.45,.94]},className:"relative w-full max-w-[440px] rounded-3xl overflow-hidden",style:{background:"var(--surface-panel)",backdropFilter:"blur(40px)",boxShadow:"0 32px 80px var(--shadow-ambient-xl), 0 8px 24px var(--surface-softer)",border:"1px solid var(--border-default)"},children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[3px] bg-gradient-to-r from-pink-500 via-rose-500 to-orange-400"}),(0,t.jsxs)("div",{className:"px-7 py-9 sm:px-10 sm:py-11",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5 mb-8",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-pink-500 to-orange-400 rounded-xl opacity-50 blur-md"}),(0,t.jsx)("img",{src:"/images/Q_LOGO_NEW.png",alt:"Social Scout",className:"relative w-9 h-9"})]}),(0,t.jsxs)("span",{className:"text-[15px] font-bold tracking-tight text-gray-900 dark:text-zinc-100",children:["Social",(0,t.jsx)("span",{className:"bg-gradient-to-r from-pink-500 to-orange-400 bg-clip-text text-transparent",children:"Scout"})]})]}),(0,t.jsxs)("h1",{className:"text-3xl sm:text-4xl font-black tracking-tight text-gray-900 dark:text-zinc-100 leading-tight",children:["Welcome"," ",(0,t.jsx)("span",{className:"bg-gradient-to-r from-pink-500 via-rose-500 to-orange-400 bg-clip-text text-transparent",children:"back"})]}),(0,t.jsx)("p",{className:"mt-2 text-sm text-gray-500 dark:text-zinc-400",children:"Sign in to your Social Scout dashboard."}),(0,t.jsxs)("form",{onSubmit:N,className:"mt-8 space-y-3",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i.EnvelopeIcon,{className:"absolute left-3.5 to
1p-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 dark:text-zinc-500 pointer-events-none"}),(0,t.jsx)("input",{type:"email",autoComplete:"email",value:e,onChange:e=>u(e.target.value),placeholder:"[email protected]",className:"w-full pl-10 pr-4 py-3 rounded-xl text-sm text-gray-900 dark:text-zinc-100 placeholder-gray-400 dark:placeholder-zinc-500 transition-all focus:outline-none focus:ring-2 focus:ring-pink-300/50",style:{background:"var(--surface-soft)",border:"1px solid var(--border-default)"}})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(l.LockClosedIcon,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 dark:text-zinc-500 pointer-events-none"}),(0,t.jsx)("input",{type:p?"text":"password",autoComplete:"current-password",value:m,onChange:e=>x(e.target.value),placeholder:"Password",className:"w-full pl-10 pr-11 py-3 rounded-xl text-sm text-gray-900 dark:text-zinc-100 placeholder-gray-400 dark:placeholder-zinc-500 transition-all focus:outline-none focus:ring-2 focus:ring-pink-300/50",style:{background:"var(--surface-soft)",border:"1px solid var(--border-default)"}}),(0,t.jsx)("button",{type:"button",onClick:()=>h(e=>!e),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-zinc-500 hover:text-gray-700 dark:hover:text-zinc-300 transition-colors",tabIndex:-1,"aria-label":p?"Hide password":"Show password",children:p?(0,t.jsx)(d.EyeSlashIcon,{className:"w-4 h-4"}):(0,t.jsx)(c.EyeIcon,{className:"w-4 h-4"})})]})]}),(0,t.jsx)("div",{className:"mt-12 border-b border-b-gray-300"}),(0,t.jsx)("p",{className:"py-6 text-sm font-thin text-center text-gray-400",children:"or login with"}),(0,t.jsxs)("button",{className:"flex w-full items-center justify-center py-2 space-x-3 border border-gray-300 rounded shadow-sm hover:bg-opacity-30 hover:shadow-lg hover:-translate-y-0.5 transition duration-150 md:w-full",onClick:S,children:[(0,t.jsx)("img",{src:"/images/google.png",alt:"Google Sign In",className:"w-9"}),(0,t.jsx)("span",{children:"Google"})]}),(0,t.jsxs)("button",{className:"mt-3 flex w-full items-center justify-center py-2 space-x-3 border border-gray-300 rounded shadow-sm hover:bg-opacity-30 hover:shadow-lg hover:-translate-y-0.5 transition duration-150 md:w-full",onClick:C,children:[(0,t.jsx)("img",{src:"/images/tiktok_black_logo.png",alt:"TikTok Sign In",className:"w-9"}),(0,t.jsx)("span",{children:"TikTok"})]}),(0,t.jsxs)("button",{className:"mt-3 flex w-full items-center justify-center py-2 space-x-3 border border-gray-300 rounded shadow-sm hover:bg-opacity-30 hover:shadow-lg hover:-translate-y-0.5 transition duration-150 md:w-full",onClick:I,children:[(0,t.jsx)("img",{src:"/images/instagram_logo.png",alt:"Instagram Sign In",className:"w-9"}),(0,t.jsx)("span",{children:"Instagram"})]}),(0,t.jsxs)("button",{className:"mt-3 flex w-full items-center justify-center py-2 space-x-3 border border-gray-300 rounded shadow-sm hover:bg-opacity-30 hover:shadow-lg hover:-translate-y-0.5 transition duration-150 md:w-full",onClick:T,children:[(0,t.jsx)("img",{src:"/images/facebook_logo.png",alt:"Facebook Sign In",className:"w-9"}),(0,t.jsx)("span",{children:"Facebook"})]}),(0,t.jsx)("div",{className:"mt-6 text-center",children:(0,t.jsxs)("button",{type:"button",onClick:N,disabled:f||!e||!m,className:"group relative w-full mt-3 flex items-center justify-center gap-2 rounded-xl text-sm font-bold text-white py-3 transition-all duration-300 hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed disabled:transform-none",style:{background:"linear-gradient(135deg, #ec4899, #f97316)",boxShadow:"0 10px 28px rgba(236,72,153,0.32)"},children:[(0,t.jsx)("span",{children:f?"Signing in…":"Sign in"}),!f&&(0,t.jsx)(g.ArrowRightIcon,{className:"w-4 h-4 transition-transform duration-200 group-hover:translate-x-0.5"})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-3 my-6",children:[(0,t.jsx)("div",{className:"flex-1 h-px bg-gradient-to-r from-transparent via-gray-200 dark:via-zinc-800 to-transparent"}),(0,t.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-[0.18em] text-gray-400 dark:text-zinc-500",children:"or"}),(0,t.jsx)("div",{className:"flex-1 h-px bg-gradient-to-r from-transparent via-gray-200 dark:via-zinc-800 to-transparent"})]}),(0,t.jsxs)("button",{type:"button",onClick:S,className:"w-full flex items-center justify-center gap-2.5 py-2.5 rounded-xl text-sm font-semibold text-gray-700 dark:text-zinc-300 transition-all duration-200 hover:-translate-y-0.5",style:{background:"var(--surface-soft)",border:"1px solid var(--border-default)"},children:[(0,t.jsx)("img",{src:"/images/google.png",alt:"",className:"w-5 h-5"}),"Continue with Google"]}),(0,t.jsx)("p",{className:"mt-6 text-center text-[11px] text-gray-400 dark:text-zinc-500",children:"Need an account? Ask your admin to invite you."})]})]})]})}e.s(["default",0,function(){return(0,t.jsx)(r.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:(0,t.jsx)("div",{className:"w-10 h-10 border-3 border-orange-400/30 border-t-orange-500 rounded-full animate-spin"})}),children:(0,t.jsx)(u,{})})}])},521292,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function({title:e,titleId:r,...a},s){return t.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:s,"aria-labelledby":r},a),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))});e.s(["ArrowRightIcon",0,r],521292)},885817,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function({title:e,titleId:r,...a},s){return t.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:s,"aria-labelledby":r},a),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))});e.s(["EyeSlashIcon",0,r],885817)}]);

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.