1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["DqQgdVi1h.js","DB2Eh9QYn.js","awSHzGh6e.js","JnUgJ5wwf.js","ldPiRZg1U.js","CcKA1vPwt.js","DpqQh31jn.js","I6r8UWIVH.js","DIUPfTMZg.js","BtqjNASI3.js","CJ73KGMzh.js","BvNO-_1PS.js","E_BlVqpns.js","LuQ0sRX_p.js","BvIPEahYo.js","C2Ai6QSgC.css","6pEB-A19Y.js","VLrd6Pt7g.js","BuSjZIe6B.js","DyPasZvo2.js","CzssUDBV-.js","D1NREnAWP.js","DXy2kKjLb.js","R5BT6XyJW.js","J6lSChzZ7.js","tpPGfFpyn.js"])))=>i.map(i=>d[i]); 2import{a as e,i as t}from"./DB2Eh9QYn.js";import{D as n,E as r,S as i,_ as a,c as o,p as s,u as c,v as l,w as u}from"./DqQgdVi1h.js";import{t as d}from"./awSHzGh6e.js";import{n as ee,t as te}from"./DyPasZvo2.js";import{c as f,s as p}from"./CcKA1vPwt.js";import{d as m,l as h,n as g}from"./DpqQh31jn.js";import{n as _}from"./I6r8UWIVH.js";import{n as v}from"./CJ73KGMzh.js";import{n as y,t as b}from"./BvIPEahYo.js";import{t as x}from"./LuQ0sRX_p.js";import{n as S}from"./CzssUDBV-.js";import{n as C}from"./DT2HW-B26.js";import{t as w}from"./DLcXH7pX7.js";import{n as T}from"./DXy2kKjLb.js";import{I as E,M as D,g as O,h as k,m as A}from"./Bx9Lo4xjO.js";import{t as j}from"./DRWbNTVKQ.js";import{t as M}from"./BDNMzG2s4.js";import{t as N}
2from"./Bx03nWlvg.js";import{t as P}from"./CvbN36Mj2.js";import{n as F,r as I,t as L}from"./DeKw_kU__.js";import{t as R}from"./Bs3eWpPre.js";var z=window.btoa(`${p.clientId}:${p.clientSecret}`);function B(){return S({url:`/ccapi/v3/third-party-accounts`,method:`GET`})}function V(e,t,n,r){let i=new b(`third-party-token-information`);i.setAttribute(`platformUserToken`,e),i.setAttribute(`platform`,t),i.setAttribute(`action`,n),i.setAttribute(`resourceId`,r);let a=i.serialize();return S({url:`/ccapi/v3/third-party-account-action-confirmation-tokens`,method:`POST`,data:a})}function H(e,t){let n=new b(`deletion-status`);n.setAttribute(`token`,t);let r=n.serialize();return S({url:`/ccapi/1.0.0/user/${e}/delete`,method:`POST`,dataType:`text`,data:r})}async function U(e,t){let n={Authorization:`Basic ${z}`,"Content-Type":`application/json`},r=await ee();return r&&(n[`X-Fingerprint`]=r),C(`/third-party-accounts-login`,{method:`POST`,headers:n,body:JSON.stringify({platform:e,platformUserToken:t})})}function W(e,t){return C(`/ccapi-login`,{method:`POST`,headers:{Authorization:`Bearer ${e}`,"Content-type":`application/json`},body:JSON.stringify({login:{remember_me:t}})})}var G={components:{Notification:N,FacebookSignIn:I,AppleSignIn:F,GoogleSignIn:L},props:{returnUrl:{type:String,required:!0},registrationUrl:{type:String,required:!0},appleSignInClientId:{type:String,required:!0},thirdPartyAccountsRedirectURI:{type:String,required:!0},googleSignInClientId:{type:String,required:!0},xitiTrackingParameters:{type:Object,required:!0}},data(){return{thirdPartyActionsDisabled:!1,thirdPartyNotification:null,thirdPartyPlatform:``,thirdPartyAccessToken:``,rememberMe:!1}},computed:{showFacebookSignIn(){return h()},showAppleSignIn(){return g()},showGoogleSignIn(){return m()},xitiPlatform(){let e;return this.thirdPartyPlatform===`facebook`?e=this.xitiTrackingParameters.login_facebook:this.thirdPartyPlatform===`apple`?e=this.xitiTrackingParameters.login_apple:this.thirdPartyPlatform===`google`&&(e=this.xitiTrackingParameters.login_google),e},genericThirdPartyError(){return{message:P(this.thirdPartyPlatform),isError:!0}},registrationUrlWithReturnUrl(){let e={returnUrl:this.returnUrl};return`${this.registrationUrl}?${new URLSearchParams(e).toString()}`}},created(){i.subscribe(`setRememberMeValue`,e=>{this.rememberMe=e}),i.publish(`thirdPartyLoginIsReady`)},methods:{async handleThirdPartyResponse(e){this.thirdPartyPlatform=e.thirdPartyPlatform,this.thirdPartyAccessToken=e.accessToken;try{let e=await U(this.thirdPartyPlatform,this.thirdPartyAccessToken);if(e.status===200){let{access_token:t}=await e.json();await this.loginUser(t);return}}catch(e){if(e.response.status===401){let e={message:T(`user_identity.third_party_connect.user_login.account_inactive`),isWarning:!0};this.showThirdPartyNotification(e),s(`${this.xitiTrackingParameters.prefix}::${this.xitiPlatform}::${this.xitiTrackingParameters.inactive}`)}else e.response.status===404?window.location.assign(this.registrationUrlWithReturnUrl):this.handleError(this.genericThirdPartyError)}finally{this.disableThirdPartyActions(!1)}},handleError(e){this.showThirdPartyNotification(e),s(`${this.xitiTrackingParameters.prefix}::${this.xitiPlatform}::${this.xitiTrackingParameters.fail}`)},async loginUser(e){try{await W(e,this.rememberMe),window.location.assign(this.generateRedirectUrlWithGATracking())}catch{this.handleError(this.genericThirdPartyError)}},disableThirdPartyActions(e){this.thirdPartyActionsDisabled=e},showThirdPartyNotification(e){this.thirdPartyNotification=e},handleClick(e){this.thirdPartyPlatform=e,this.thirdPartyNotification=null,this.trackXitiAction(e)},trackXitiAction(e){let t;e===`facebook`?t=this.xitiTrackingParameters.action_login_facebook:e===`apple`?t=this.xitiTrackingParameters.action_login_apple:e===`google`&&(t=this.xitiTrackingParameters.action_login_google),c(`${this.xitiTrackingParameters.prefix}::${t}`)},generateRedirectUrlWithGATracking(){let e=new URL(this.returnUrl),t=new URLSearchParams(e.search);return t.has(`loginSuccess`)===!1&&t.append(`loginSuccess`,`1`),e.search=t,e.toString()}}},K={class:`ThirdPartyConnectLogin`};function q(e,t,n,r,i,a){let o=E(`FacebookSignIn`),s=E(`GoogleSignIn`),c=E(`AppleSign
2In`),l=E(`Notification`);return D(),O(`div`,K,[a.showFacebookSignIn?(D(),A(o,{key:0,variation:`login`,actionDisabled:i.thirdPartyActionsDisabled,onDisableAction:a.disableThirdPartyActions,onResponse:a.handleThirdPartyResponse,onError:a.handleError,onClick:t[0]||=e=>a.handleClick(`facebook`)},null,8,[`actionDisabled`,`onDisableAction`,`onResponse`,`onError`])):k(``,!0),a.showGoogleSignIn?(D(),A(s,{key:1,variation:`login`,actionDisabled:i.thirdPartyActionsDisabled,googleSignInClientId:n.googleSignInClientId,onDisableAction:a.disableThirdPartyActions,onResponse:a.handleThirdPartyResponse,onError:a.handleError,onClick:t[1]||=e=>a.handleClick(`google`)},null,8,[`actionDisabled`,`googleSignInClientId`,`onDisableAction`,`onResponse`,`onError`])):k(``,!0),a.showAppleSignIn?(D(),A(c,{key:2,variation:`login`,actionDisabled:i.thirdPartyActionsDisabled,appleSignInClientId:n.appleSignInClientId,thirdPartyAccountsRedirectURI:n.thirdPartyAccountsRedirectURI,onDisableAction:a.disableThirdPartyActions,onResponse:a.handleThirdPartyResponse,onError:a.handleError,onClick:t[2]||=e=>a.handleClick(`apple`)},null,8,[`actionDisabled`,`appleSignInClientId`,`thirdPartyAccountsRedirectURI`,`onDisableAction`,`onResponse`,`onError`])):k(``,!0),i.thirdPartyNotification?(D(),A(l,{key:3,class:`UserRegistration-thirdPartyErrorNotification`,isError:i.thirdPartyNotification.isError,isWarning:i.thirdPartyNotification.isWarning,message:i.thirdPartyNotification.message},null,8,[`isError`,`isWarning`,`message`])):k(``,!0)])}var J=M(G,[[`render`,q]]);e();var Y=class extends j{vueComponentProperties(){return{registrationUrl:this.props.registrationUrl,returnUrl:this.props.returnUrl,thirdPartyAccountsRedirectURI:this.props.thirdPartyAccountsRedirectURI,appleSignInClientId:this.props.appleSignInClientId,googleSignInClientId:this.props.googleSignInClientId,xitiTrackingParameters:this.props.xitiTrackingParameters}}};t(Y,`vueComponent`,J);var X=`downloadArchive`,Z=`delete`,ne={components:{Notification:N,FacebookSignIn:I,AppleSignIn:F,GoogleSignIn:L},props:{appleSignInClientId:{type:String,required:!0},thirdPartyAccountsRedirectURI:{type:String,required:!0},googleSignInClientId:{type:String,required:!0},xitiTrackingParameters:{type:Object,required:!0},userRole:{type:String,required:!0}},data(){return{thirdPartyActionsDisabled:!1,thirdPartyNotification:null,facebookAccountConnected:!1,googleAccountConnected:!1,appleAccountConnected:!1,thirdPartyPlatform:``,thirdPartyAccessToken:``,action:null,resourceId:null,returnUrl:null}},computed:{showFacebookSignIn(){return h()},showAppleSignIn(){return g()},showGoogleSignIn(){return m()},isFacebookActionDisabled(){return this.thirdPartyActionsDisabled||!this.facebookAccountConnected},isGoogleActionDisabled(){return this.thirdPartyActionsDisabled||!this.googleAccountConnected},isAppleActionDisabled(){return this.thirdPartyActionsDisabled||!this.appleAccountConnected},genericThirdPartyError(){return{message:P(this.thirdPartyPlatform),isError:!0}},escrowError(){return{message:T(`user_identity.user_delete_confirmation.pay_protect.error_detail`),isError:!0}}},async created(){this.disableThirdPartyActions(!0),this.parseUrl(),await this.enableConnectedThirdPartyActions(),this.disableThirdPartyActions(!1)},methods:{async handleThirdPartyResponse(e){this.thirdPartyAccessToken=e.accessToken,this.thirdPartyPlatform=e.thirdPartyPlatform;try{let e=await V(this.thirdPartyAccessToken,this.thirdPartyPlatform,this.action,this.resourceId),t=new y;t.sync(e);let{token:n}=t.findAll(`third-party-account-action-confirmation-tokens`)[0],r=a.getUserId();if(this.action===X){let e=window.btoa(JSON.stringify({action:this.action,token:n,resourceId:this.resourceId})),t=new Date,r=t.setTime(t.getTime()+3e4);return x.set(`nuka-verification`,e,{path:`/`,domain:f,expires:r}),window.location.assign(this.returnUrl)}if(this.action===Z)return await H(r,n),window.sessionStorage?.setItem(`userDeletionThirdPartyConfirmationSuccess`,1),window.location.assign(w(`logout`))}catch(e){let t=!1;e.errors?.forEach(({code:e,status:n})=>{e===`0`&&n===`409`&&(t=!0)}),t?this.handleError(this.escrowError):this.handleError(this.genericThirdPartyError)}this.disableThirdPartyActions(!1)},async enableConnectedThirdPartyActions(){let e=await B();
2new y().sync(e).forEach(e=>{e.platform===`facebook`?this.facebookAccountConnected=!0:e.platform===`google`?this.googleAccountConnected=!0:e.platform===`apple`&&(this.appleAccountConnected=!0)})},disableThirdPartyActions(e){this.thirdPartyActionsDisabled=e},async handleError(e){this.trackXitiPage(),this.thirdPartyNotification=e},async handleClick(e){this.thirdPartyNotification=null,this.thirdPartyPlatform=e,this.trackXitiAction()},trackXitiAction(){let{prefix:e,account_management:t,close_account:n}=this.xitiTrackingParameters,r;this.thirdPartyPlatform===`facebook`?r=this.xitiTrackingParameters.action_facebook_confirmation:this.thirdPartyPlatform===`apple`?r=this.xitiTrackingParameters.action_apple_confirmation:this.thirdPartyPlatform===`google`&&(r=this.xitiTrackingParameters.action_google_confirmation),c(`${e}-${this.userRole}::${t}::${n}::${r}`)},trackXitiPage(){let{prefix:e,account_management:t,close_account:n}=this.xitiTrackingParameters,r;this.thirdPartyPlatform===`facebook`?r=this.xitiTrackingParameters.facebook_confirmation_fail:this.thirdPartyPlatform===`apple`?r=this.xitiTrackingParameters.apple_confirmation_fail:this.thirdPartyPlatform===`google`&&(r=this.xitiTrackingParameters.google_confirmation_fail),s(`${e}-${this.userRole}::${t}::${n}::${r}`)},parseUrl(){let e=new URL(document.location).searchParams;this.action=e.get(`action`),this.resourceId=e.get(`resourceId`),this.returnUrl=e.get(`returnUrl`)}}},re={class:`ThirdPartyConnectDeleteConfirmation`};function ie(e,t,n,r,i,a){let o=E(`FacebookSignIn`),s=E(`GoogleSignIn`),c=E(`AppleSignIn`),l=E(`Notification`);return D(),O(`div`,re,[a.showFacebookSignIn?(D(),A(o,{key:0,variation:`confirmation`,actionDisabled:a.isFacebookActionDisabled,onDisableAction:a.disableThirdPartyActions,onResponse:a.handleThirdPartyResponse,onError:a.handleError,onClick:t[0]||=e=>a.handleClick(`facebook`)},null,8,[`actionDisabled`,`onDisableAction`,`onResponse`,`onError`])):k(``,!0),a.showGoogleSignIn?(D(),A(s,{key:1,variation:`confirmation`,actionDisabled:a.isGoogleActionDisabled,googleSignInClientId:n.googleSignInClientId,onDisableAction:a.disableThirdPartyActions,onResponse:a.handleThirdPartyResponse,onError:a.handleError,onClick:t[1]||=e=>a.handleClick(`google`)},null,8,[`actionDisabled`,`googleSignInClientId`,`onDisableAction`,`onResponse`,`onError`])):k(``,!0),a.showAppleSignIn?(D(),A(c,{key:2,variation:`confirmation`,actionDisabled:a.isAppleActionDisabled,appleSignInClientId:n.appleSignInClientId,thirdPartyAccountsRedirectURI:n.thirdPartyAccountsRedirectURI,onDisableAction:a.disableThirdPartyActions,onResponse:a.handleThirdPartyResponse,onError:a.handleError,onClick:t[2]||=e=>a.handleClick(`apple`)},null,8,[`actionDisabled`,`appleSignInClientId`,`thirdPartyAccountsRedirectURI`,`onDisableAction`,`onResponse`,`onError`])):k(``,!0),i.thirdPartyNotification?(D(),A(l,{key:3,class:`UserRegistration-thirdPartyErrorNotification`,isError:i.thirdPartyNotification.isError,isWarning:i.thirdPartyNotification.isWarning,message:i.thirdPartyNotification.message},null,8,[`isError`,`isWarning`,`message`])):k(``,!0)])}var ae=M(ne,[[`render`,ie]]);e();var Q=class extends j{vueComponentProperties(){return{thirdPartyAccountsRedirectURI:this.props.thirdPartyAccountsRedirectURI,appleSignInClientId:this.props.appleSignInClientId,googleSignInClientId:this.props.googleSignInClientId,xitiTrackingParameters:this.props.xitiTrackingParameters,userRole:this.props.userRole}}};t(Q,`vueComponent`,ae),e();var $=class extends l{constructor(e){super(e),this.setupDom(),this.setupEvents(),this.rememberMe=this.props.initialRememberMeValue}setupDom(){this.cacheChildrenEl({username:this.props.fields.username,password:this.props.fields.password})}setupEvents(){this.addSideEffect(()=>{let e=({username:e})=>{this.setState({username:e}),this.$password.focus()};return i.subscribe(`populateLoginFormWithNjuskaloData`,e),()=>{i.unsubscribe(`populateLoginFormWithNjuskaloData`,e)}}),this.addSideEffect(()=>{let e=()=>{i.publish(`setRememberMeValue`,this.rememberMe)};return i.subscribe(`thirdPartyLoginIsReady`,e),()=>{i.unsubscribe(`thirdPartyLoginIsReady`,e)}})}async handleClick(e){if(this.props.isConfirmation){e.preventDefault();let{trackXitiActionClick:t}=await d(async()=>{let{trackXitiActionClick:e}=await import(`./DqQgdVi1h.js`).then(e=>e.h);return{trackXitiActionClick:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])),{prefix:n,account_management:r,close_account:i,login:a}=this.props.xitiTrackingParameters;t(`${n}-${this.props.userRole}::${r}::${i}::${a}`),this.$el.submit()}}
2submitForm(){this.setState({disabled:!0})}render(e,t){e===`username`&&(this.$username.value=t),e===`disabled`&&this.$submit!==null&&(this.$submit.disabled=t)}};t($,`el`,`form`),t($,`events`,{"click #confirmation_form_save":`handleClick`,submit:`submitForm`,"change .UserAuthenticationLogin-rememberMe"(e){this.rememberMe=e.target.checked,i.publish(`setRememberMeValue`,this.rememberMe)}}),t($,`childrenEl`,{submit:`[type="submit"]`}),d(()=>Promise.resolve({}),__vite__mapDeps([15]));var oe=()=>d(()=>import(`./6pEB-A19Y.js`),__vite__mapDeps([16,1,0,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,22,23,24,25]));async function se(){await te();let e=h()||m()||g();if(n(u(`UserLogin`),$),n(u(`Password`),R),e&&n(u(`ThirdPartyConnectLogin`),Y),e&&n(u(`ThirdPartyConnectDeleteConfirmation`),Q),_()){let[e={}]=u(`MobileDeeplinkContextProps`);r(u(`MobileDeeplink`).map(t=>({...t,...e})),oe)}o({pageType:v.pageType.ACCOUNT})}se();
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.