1import{d as C,a as T,u as q,R as $,S as v,o as I,T as _,e as P,f as b,t as U,p as B,m as x,c as A,s as Q}from"./CUUBFI-L.js";import{u as W}from"./JX96QLAy.js";import{u as K}from"./B9zlBI0q.js";import{u as z}from"./8AO0WNLj.js";import{u as D}from"./PR0BTNvy.js";import{t as F}from"./CgvlbDSs.js";const H={class:"AuthCallbackPage"},S="blatube:sticker-social-unlock:return-to",L="social_unlock",M=C({__name:"callback",setup(N){const r=T(),n=q(),{t:s,locale:m}=$(),f=x(()=>_(m.value)),{ingestOAuthToken:y}=v(),{load:g}=z(),{loadStatus:h}=D(),{load:R}=W(),{loadStatus:w}=K(),l=B("..."),k=()=>{const o=window.sessionStorage.getItem(S);return window.sessionStorage.removeItem(S),o?.startsWith("/")&&!o.startsWith("//")&&!o.startsWith("/auth/callback")?o:f.value},d=(o,e="")=>{const a=k(),t=a.includes("?")?"&":"?",u=e!==""?`&social_unlock_error=${encodeURIComponent(e)}`:"";return`${a}${t}${L}=${encodeURIComponent(o)}${u}`},p=(o="")=>{const e=k(),a=e.includes("?")?"&":"?",t=o!==""?`&social_connection_error=${encodeURIComponent(o)}`:"";return`${e}${a}social_connection=community${t}`};return I(async()=>{const o=String(n.query.token??""),e=n.query.oauth_error,a=String(n.query.social_linked??""),t=String(n.query.social_link_error??""),u=String(n.query.social_purpose??""),c=String(n.query.sticker_pack??"");if(a&&u==="community"){try{await Promise.all([w(),R({force:!0})])}catch(i){console.error(i)}finally{await r.replace(p())}return}if(t&&u==="community"){await r.replace(p(t));return}if(a&&c){try{await Promise.all([h(c),g({force:!0})])}catch(i){console.error(i)}finally{await r.replace(d(c))}return}if(t&&c){await r.replace(d(c,t));return}if(e||!o){l.value=s(e==="consent_required"?"auth.consent.required":e==="google_blocked_in_ru"?"auth.errors.googleBlockedInRu":e==="location_confirmation_required"?"auth.errors.googleConfirmationRequired":"auth.errors.unknown"),setTimeout(()=>r.replace("/login"),1500);return}try{await y(o),await r.replace(F(_(m.value)))}catch(i){console.error(i),l.value=s("auth.errors.unknown"),setTimeout(()=>r.replace("/login"),1500)}}),(o,e)=>(A(),P("main",H,[b("p",null,U(l.value),1)]))}}),X=Q(M,[["__scopeId","data-v-f3125d5a"]]);export{X as default};
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.