PageSourceSearch

https://www.listening.com/assets/auth-service-DY33SrfL.js

js listening.com collected 2026-10-01 10:24:27 UTC 4,832 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`798154dfe6f02312abe2ebb46dcac5b55267091e`},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:listening-web":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ddc182c5-c4ec-4fd4-8583-1e258a6f7241`,e._sentryDebugIdIdentifier=`sentry-dbid-ddc182c5-c4ec-4fd4-8583-1e258a6f7241`)}catch{}})();import{a as e,n as t}from"./jsx-runtime-HLTtilDO.js";import{i as n,r}from"./searchParams-0VWs_Kq9.js";import{Cr as i,I as a,Sa as o,lt as s,mt as c,p as l,x as u}from"./Schema-BiKO9Vds.js";import{t as d}from"./env-DE6Ouqp8.js";import{t as f}from"./compiler-runtime-UO9gZYRt.js";import{n as p}from"./runtime-BcNrBUy8.js";import{t as m}from"./auth-client-BiNUILty.js";var h=e(t(),1),g=f(),_=e=>s(e).pipe(a(()=>i(void 0))),v=(e,t)=>
1s(e).pipe(a(()=>i(t)));function y(e){let t=JSON.parse(e);if(typeof t==`number`&&String(t)!==e)throw SyntaxError(`numeric search value does not survive a round-trip: ${e}`);return t}var b=r(y),x=n(JSON.stringify,y),S=`listening_signup_language`;function C(){let e=p()===`es`?`es`:`en`;return[`${S}=${encodeURIComponent(e)}`,`Path=/`,`Max-Age=600`,`SameSite=Lax`].join(`; `)}function w(){typeof document<`u`&&Reflect.set(document,`cookie`,C())}var T=class extends o(`BetterAuthError`){},E=[`signup`,`login`],D=[`google`,`apple`],O=[`auth_result`,`auth_provider`],k=e=>Object.fromEntries(Object.entries(e).filter(([e])=>!O.includes(e))),A=e=>{let t=new URLSearchParams(e.searchStr);for(let e of O)t.delete(e);let n=t.toString();return`${e.pathname}${n?`?${n}`:``}`},j=c(u({auth_result:_(l(E)),auth_provider:_(l(D))})),M=`/app/home`,N=(e,t,n=M)=>`${n}${n.includes(`?`)?`&`:`?`}auth_result=${e}&auth_provider=${t}`,P=`/auth-error`,F=`/app/login`,I=(e=F)=>`${P}?return_to=${e}`;async function L(e){let{data:t,error:n}=await m.signIn.email({email:e.email,password:e.password});if(n)throw new T({userMessage:n.message??`Sign in failed`,code:n.code,status:n.status});return{user:{userId:t.user.id,email:t.user.email,createdAt:new Date(t.user.createdAt)}}}async function R(e){w();let{data:t,error:n}=await m.signUp.email({name:e.email,email:e.email,password:e.password});if(n)throw new T({userMessage:n.message??`Sign up failed`,code:n.code,status:n.status});return{user:{userId:t.user.id,email:t.user.email,createdAt:new Date(t.user.createdAt)}}}async function z(e,t={}){w();let{data:n,error:r}=await m.signIn.social({provider:e,callbackURL:N(`login`,e,t.returningUserPath),newUserCallbackURL:N(`signup`,e,t.newUserPath),errorCallbackURL:I(t.errorReturnPath)});if(r)throw new T({userMessage:r.message??`Social sign in failed`,code:r.code,status:r.status});return window.location.href=n&&`url`in n&&typeof n.url==`string`&&n.url?n.url:N(`login`,e,t.returningUserPath),new Promise(()=>{})}async function B(){await m.signOut()}async function V(e){let{error:t}=await m.requestPasswordReset({email:e,redirectTo:`${d.siteUrl}/password-reset`});if(t)throw new T({userMessage:t.message??`Password reset request failed`,code:t.code,status:t.status})}async function H(e){let{error:t}=await m.resetPassword({newPassword:e.newPassword,token:e.token});if(t)throw new T({userMessage:t.message??`Password reset failed`,code:t.code,status:t.status})}async function U(e){let{error:t}=await m.linkSocial({provider:e});if(t)throw new T({userMessage:t.message??`Failed to link account`,code:t.code,status:t.status})}async function W(e){let{error:t}=await m.unlinkAccount({accountId:e});if(t)throw new T({userMessage:t.message??`Failed to unlink account`,code:t.code,status:t.status})}async function G(){let{data:e}=await m.listAccounts();return e?e.map(e=>({accountId:e.id,providerId:e.providerId,label:e.providerId===`google`?`Google`:e.providerId===`apple`?`Apple`:e.providerId})):[]}function K(){m.useSession()}function q(){let e=(0,g.c)(7),{data:t,error:n,isPending:r}=m.useSession(),[i,a]=(0,h.useState)(!r);!r&&!i&&a(!0);let o=typeof n==`object`&&n&&`status`in n&&typeof n.status==`number`?n.status:null,s;e[0]===t?s=e[1]:(s=t?.user?{userId:t.user.id,email:t.user.email,createdAt:new Date(t.user.createdAt)}:null,e[0]=t,e[1]=s);let c=r&&!i,l=n!==null,u;return e[2]!==o||e[3]!==s||e[4]!==c||e[5]!==l?(u={user:s,isPending:c,hasError:l,errorStatus:o},e[2]=o,e[3]=s,e[4]=c,e[5]=l,e[6]=u):u=e[6],u}export{_,G as a,x as b,V as c,B as d,R as f,K as g,q as h,H as i,L as l,W as m,T as n,U as o,k as p,j as r,A as s,F as t,z as u,v,b as y};
2//# sourceMappingURL=auth-service-DY33SrfL.js.map

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.