PageSourceSearch

https://www.trailsoffroad.com/_nuxt/Bu5d8RXB.js

js trailsoffroad.com collected 2026-10-03 22:09:01 UTC 3,550 bytes, 2 lines download raw bytes

1import{l as w,d as v,Z as T,b as E,o as N,S as u,j as l,k as c,m as a,t as g,r as b,B as U,D as _,T as h,U as f,a_ as $,Y as x}from"./CjSs_pdA.js";const k=new Map,m=(i,r)=>{const n=k.get(i)??r().catch(d=>{throw k.delete(i),d});return k.set(i,n),n},F=()=>m("google",async()=>{await w("https://apis.google.com/js/platform.js")}),O=()=>m("facebook",async()=>{await w("https://connect.facebook.net/en_US/sdk.js"),window.FB.init({appId:"2511418315684872",version:"v18.0"})}),j=()=>m("apple",async()=>{await w("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"),window.AppleID.auth.init({clientId:"com.trailsoffroad.www",scope:"name email",redirectURI:`${window.location.origin}/authorize-apple`,usePopup:!0})}),R={class:"social-auth inline-buttons flex spacing"},B={key:0,class:"flex-1"},G=["disabled","aria-busy"],L={key:1,class:"flex-1"},z=["disabled","aria-busy"],D={key:2,class:"flex-1"},H=["disabled","aria-busy"],M=v({__name:"SocialAuth",emits:["onauth"],setup(i,{emit:r}){const{path:n}=T(),{public:{googleClientId:d}}=E(),t=U({google:"loading",facebook:"loading",apple:"loading"});N(()=>{[{key:"google",load:F},{key:"facebook",load:O},{key:"apple",load:j}].forEach(({key:e,load:s})=>s().then(()=>{t[e]="ready"},S=>{t[e]="failed",u(S)}))});const p=r,y=(o,e)=>{["popup_closed_by_user","access_denied","popup_blocked_by_browser"].includes(o?.error)||typeof o?.error!="string"||(u(new Error(`${e} sign-in failed: ${o.error}`)),f({message:`Couldn't sign in through ${e}`}))},A=()=>{window.gapi.load("auth2",async()=>{try{const o=await window.gapi.auth2.init({client_id:d});await o.signIn();const{id_token:e}=o.currentUser.get().getAuthResponse();e?(_(h.SOCIAL_AUTHENTICATION,{url:n,button_location:"Google"}),p("onauth",{token:e,endpoint:"google-login",provider:"Google"})):f({message:"No user associated with this account"})}catch(o){y(o,"Google")}})},I=()=>{window.FB.login(o=>{if(o.authResponse)try{return _(h.SOCIAL_AUTHENTICATION,{url:n,button_location:"Facebook"}),p("onauth",{token:o.authResponse.accessToken,endpoint:"facebook-login",provider:"Facebook"})}catch(e){u(e)}f({message:"Couldn't sign in through Facebook"})},{scope:"public_profile,email",enable_profile_selector:!0,return_scopes:!0})},C=async()=>{try{const{user:o,authorization:{code:e}}=await window.AppleID.auth.signIn();if(_(h.SOCIAL_AUTHENTICATION,{url:n,button_location:"Apple"}),o)try{localStorage.setItem($.TO_APPLE_USERNAME,`${o.name.firstName} ${o.name.lastName}`)}catch{}p("onauth",{token:e,endpoint:"apple-login",provider:"Apple"})}catch(o){y(o,"Apple")}};return(o,e)=>(l(),c("div",R,[a(t).google!=="failed"?(l(),c("div",B,[g("button",{type:"button",class:"social-btn google google-icon full-width","aria-label":"Continue with Google",disabled:a(t).google==="loading","aria-busy":a(t).google==="loading",onClick:e[0]||(e[0]=s=>A())},null,8,G)])):b("",!0),a(t).facebook!=="failed"?(l(),c("div",L,[g("button",{type:"button",class:"social-btn fb facebook-icon full-width","aria-label":"Continue with Facebook",disabled:a(t).facebook==="loading","aria-busy":a(t).facebook==="loading",onClick:e[1]||(e[1]=s=>I())},null,8,z)])):b("",!0),a(t).apple!=="failed"?(l(),c("div",D,[g("button",{type:"button",class:"social-btn apple apple-icon full-width","aria-label":"Continue with Apple",disabled:a(t).apple==="loading","aria-busy":a(t).apple==="loading",onClick:e[2]||(e[2]=s=>C())},null,8,H)])):b("",!0)]))}}),P=Object.assign(x(M,[["__scopeId","data-v-22e0e2ea"]]),{__name:"UserSocialAuth"});export{P as _};
2//# sourceMappingURL=Bu5d8RXB.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.