PageSourceSearch

https://lab.snackz.ai/_next/static/chunks/7404-1ce14167c56b11df.js

js snackz.ai collected 2026-10-05 12:39:33 UTC 9,059 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7404],{67404:(e,r,t)=>{t.d(r,{uA:()=>u,Vr:()=>m,iD:()=>c,ri:()=>f,kz:()=>g,nA:()=>d});var a=t(84353),i=t(30146),o=t(73070);let n=(0,o.createServerReference)("70deaaeb6c81e6ea8398007aaa13116da5ad70f1a9",o.callServer,void 0,o.findSourceMapURL,"createUser"),s=(0,o.createServerReference)("609af013458a4b694e9ea82e361284cf58ba56a049",o.callServer,void 0,o.findSourceMapURL,"sendCustomEmailVerification");var l=t(77556);let c=async(e,r,t)=>{try{let o=e.toLowerCase(),n=(await (0,i.x9)(a.j2,o,r)).user;if(!n.emailVerified)throw await (0,i.CI)(a.j2),Error("Please verify your email before logging in");let s=await n.getIdToken(),c=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({idToken:s})});if(!c.ok){let e=await c.json();if("account_marked_for_deletion"===e.error)throw await (0,i.CI)(a.j2),Error("This account has been marked for deletion. Please contact support if this is a mistake.");throw await (0,i.CI)(a.j2),Error("Failed to set session cookie")}let g=await c.json();if("claims_updated"===g.status){l.vF.info({stage:"auth",action:"login"},"Custom claims updated; refreshing token and retrying login");let e=await n.getIdToken(!0),r=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({idToken:e})});if(!r.ok){let e=await r.json();throw await (0,i.CI)(a.j2),Error(e.error||"Failed to set session cookie on retry")}}return l.vF.info({stage:"auth",action:"login"},"Logged in successfully"),t?.(),!0}catch(e){throw l.vF.error({err:e,stage:"auth",action:"login"},"Login failed"),e}},g=async(e,r,t,o)=>{let c=e.toLowerCase();try{let e=(await (0,i.eJ)(a.j2,c,r)).user;await (0,i.r7)(e,{displayName:t});let l=await e.getIdToken();return await n(l,t,o),await s(c,t),await (0,i.CI)(a.j2),!0}catch(r){l.vF.error({err:r,stage:"auth",action:"register"},"Registration failed");let e=a.j2.currentUser;if(e)try{l.vF.info({stage:"auth",action:"register-rollback",userId:e.uid},"Rolling back Firebase Auth user after registration failure"),await e.delete(),l.vF.info({stage:"auth",action:"register-rollback",userId:e.uid},"Rollback successful: user removed from Firebase Auth")}catch(t){l.vF.error({err:t,stage:"registration-rollback",userId:e.uid,email:c,originalError:r instanceof Error?r.message:String(r)},"ORPHANED USER ALERT: Failed to rollback Firebase Auth after registration failure")}throw r}},d=async(e,r)=>{try{let t=e.toLowerCase(),o=(await (0,i.x9)(a.j2,t,r)).user;if(o.emailVerified)throw await (0,i.CI)(a.j2),Error("Your email is already verified. You can login now.");let n=await s(t,o.displayName??t);if(!n.success)throw Error(n.error||"Failed to send verification email");return await (0,i.CI)(a.j2),!0}catch(e){throw l.vF.error({err:e,stage:"auth",action:"resend-verification"},"Verification email resend failed"),e}},f=async e=>{try{return await fetch("/api/auth/logout",{method:"POST",headers:{"Content-Type":"application/json"}}),await (0,i.CI)(a.j2),l.vF.info({stage:"auth",action:"logout"},"Logged out successfully"),e?.(),!0}catch(e){throw l.vF.error({err:e,stage:"auth",action:"logout"},"Logout failed"),e}},u=async e=>{try{let r=(await (0,i.p)(a.j2,e)).user,t=await r.getIdToken(),o=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({idToken:t})});if(!o.ok){let e=await o.json();throw await (0,i.CI)(a.j2),Error(e.error||"Failed to set session cookie")}let n=await o.json();if("claims_updated"===n.status){l.vF.info({stage:"auth",action:"entry-login"},"Custom claims updated during entry login; refreshing token and retrying");let e=await r.getIdToken(!0),t=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({idToken:e})});if(!t.ok){let e=await t.json();throw await (0,i.CI)(a.j2),Error(e.error||"Failed to set session cookie on retry")}}return l.vF.info({stage:"auth",action:"entry-login"},"Entry integration login successful"),!0}catch(e){throw l.vF.error({err:e,stage:"auth",action:"entry-login"},"Entry integration login failed"),e}},m=async(e,r)=>{try{let t=(await (0,i.p)(a.j2,e)).user,o=await t.getIdToken(),n=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:o,isImpersonation:!0}
1)});if(!n.ok){let e=await n.json();throw await (0,i.CI)(a.j2),Error(e.error||"Failed to set session cookie")}let s=await n.json();if("claims_updated"===s.status){l.vF.info({stage:"auth",action:"impersonate"},"Custom claims updated during impersonation; refreshing token and retrying");let e=await t.getIdToken(!0),r=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:e,isImpersonation:!0})});if(!r.ok){let e=await r.json();throw await (0,i.CI)(a.j2),Error(e.error||"Failed to set session cookie on retry")}}return l.vF.info({stage:"auth",action:"impersonate"},"Impersonation login successful"),r?.(),!0}catch(e){throw l.vF.error({err:e,stage:"auth",action:"impersonate"},"Impersonation login failed"),e}}},77556:(e,r,t)=>{t.d(r,{cS:()=>m,vF:()=>u});var a=t(60319),i=t.n(a),o=t(16886);let n=e=>"object"==typeof e&&null!==e&&!(e instanceof Error),s=(e,r)=>{for(let t of e){if(!n(t))continue;let e=t[r];if("string"==typeof e&&e.trim().length>0)return e.trim()}},l="__publisherClientErrorHandlersInstalled",c=e=>{if(e instanceof Error)return{type:e.name,message:e.message,...e.stack?{stack:e.stack}:{}};if("object"==typeof e&&null!==e&&"string"==typeof e.message&&0!==e.message.trim().length&&(void 0===e.type||"string"==typeof e.type)&&(void 0===e.stack||"string"==typeof e.stack)&&1)return{type:e.type?.trim()||"ClientError",message:e.message.trim(),...e.stack?.trim()?{stack:e.stack.trim()}:{}};if("string"==typeof e&&e.trim().length>0)return{type:"ClientError",message:e.trim()};if(!n(e))return;let r=e.err??e.error;if(null!=r){let e=c(r);if(e)return e}let t="string"==typeof e.message?e.message.trim():"";if(0===t.length)return;let a="string"==typeof e.type&&e.type.trim().length>0?e.type.trim():"string"==typeof e.name&&e.name.trim().length>0?e.name.trim():"ClientError",i="string"==typeof e.stack&&e.stack.trim().length>0?e.stack.trim():void 0;return{type:a,message:t,...i?{stack:i}:{}}},g=new Set(["window-error","window-unhandledrejection"]),d=e=>{let r=e.filename&&e.lineno>0?` (${e.filename}:${e.lineno}${e.colno>0?`:${e.colno}`:""})`:"";u.error({err:c(e.error)??{type:"ClientError",message:e.message.trim()||"Unhandled browser error"},stage:"window-error"},`Unhandled browser error${r}`)},f=e=>{u.error({err:c(e.reason)??{type:"UnhandledRejection",message:(e=>{if("string"==typeof e)return e;if(e instanceof Error)return e.stack??e.message;try{return JSON.stringify(e)}catch{return String(e)}})(e.reason)},stage:"window-unhandledrejection"},"Unhandled promise rejection in browser")},u=i()({level:"info",browser:{asObject:!0,transmit:{level:"error",send:(e,r)=>{let t,a={message:((e,r)=>{for(let r of e)if("string"==typeof r&&r.trim().length>0)return r;for(let r of e)if(n(r)){if("string"==typeof r.msg&&r.msg.trim().length>0)return r.msg;if("string"==typeof r.message&&r.message.trim().length>0)return r.message}return r})(r.messages,"Client error"),error:(e=>{for(let r of e){let e=c(r);if(e)return e}for(let r of e){if(!n(r))continue;let e=c(r.err??r.error);if(e)return e}})(r.messages),pathname:(t=window.location.pathname.trim()).length>0?t:void 0,component:s(r.messages,"component"),stage:s(r.messages,"stage")};fetch("/api/log",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(a),keepalive:!0}).catch(()=>{}),((e,r)=>{var t;let a,i;if(!o.Ay.__loaded||r.stage&&g.has(r.stage))return;let s=(e=>{for(let r of e){if(r instanceof Error)return r;if(n(r)){let e=r.err??r.error;if(e instanceof Error)return e}}})(e.messages)??(r.error?((i=Error(a=(t=r.error).message.trim())).name=t.type?.trim()||"Error",i.stack=t.stack?.trim()||`${i.name}: ${a}`,i):Error(r.message));o.Ay.captureException(s,{message:r.message,...r.component?{component:r.component}:{},...r.stage?{stage:r.stage}:{}})})(r,a)}}}}),m=()=>{window[l]||(window.addEventListener("error",d),window.addEventListener("unhandledrejection",f),window[l]=!0)}},84353:(e,r,t)=>{t.d(r,{j2:()=>c,kA:()=>g,IG:()=>d});var a=t(22461);let i={firebase:{apiKey:"AIzaSyD2xvOgbmx74QMATrXubUY11EmCwBsTIfw",authDomain:"publisherapp-8db99.firebaseapp.com",projectId:"publisherapp-8db99",storageBucket:"publisherapp-8db99-prod",messagingSenderId:t(75800).env.FIREBASE_MESSAGING_SENDER_ID,appId:"1:728338781282:web:8552b08c33ddfd9c82ad3b"},upload:{maxSizeMB:parseInt("100",10),get maxSizeBytes(){return 1024*this.maxSizeMB*1024}}};var o=t(99846),n=t(30146),s=t(62770);let l=0===(0,a.Dk)().length?(0,a.Wp)(i.firebase):(0,a.Dk)()[0],c=(0,n.xI)(l),g=(0,o.aU)(l,"prod"),d=(0,s.c7)(l,"publisherapp-8db99-prod")}}]);

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.