(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[8385],{85524:(t,r,o)=>{"use strict";o.r(r),o.d(r,{default:()=>n});vare=o(36357),a=o(35953);constn={components:{InstagramLoader:e.InstagramLoader,RegisterForm:a.default},data:function(){return{loaded:!1,error:!1,prefill:!1,existing:void0,maxUsesReached:void0,tab:"loading",canReload:!1}},mounted:function(){this.validateSession(),window.onbeforeunload=function(){if(!this.canReload)returnalert("You are trying to leave."),!1}},methods:{validateSession:function(){vart=this;axios.post("/auth/raw/mastodon/s/check").then((function(r){if(r||r.hasOwnProperty("action"))switch(r.data.action){case"onboard":returnvoidt.getPrefillData();case"redirect_existing_user":returnt.existing=!0,t.canReload=!0,window.onbeforeunload=void0,voidt.redirectExistingUser();case"max_uses_reached":returnt.maxUsesReached=!0,t.canReload=!0,void(window.onbeforeunload=void0);default:returnvoid(t.error=!0)}elseswal("Oops!","An unexpected error occured, please try again later","error")})).catch((function(r){t.canReload=!0,window.onbeforeunload=void0,t.error=!0}))},setCanReload:function(){this.canReload=!0,window.onbeforeunload=void0},redirectExistingUser:function(){vart=this;this.canReload=!0,setTimeout((function(){t.handleLogin()}),1500)},handleLogin:function(){vart=this;axios.post("/auth/raw/mastodon/s/login").then((function(t){setTimeout((function(){window.location.reload()}),1500)})).catch((function(r){t.canReload=!1,t.error=!0}))},getPrefillData:function(){vart=this;axios.post("/auth/raw/mastodon/s/prefill").then((function(r){t.prefill=r.data})).catch((function(r){t.error=!0})).finally((function(){setTimeout((function(){t.loaded=!0}),1e3)}))}}}},91704:(t,r,o)=>{"use strict";o.r(r),o.d(r,{default:()=>e});conste={props:{config:{type:Object}},data:function(){return{loaded:!1,domains:[]}},mounted:function(){this.fetchDomains()},methods:{fetchDomains:function(){vart=this;axios.post("/auth/raw/mastodon/domains").then((function(r){t.domains=r.data})).finally((function(){setTimeout((function(){t.loaded=!0}),500)}))},handleRedirect:function(t){axios.post("/auth/raw/mastodon/redirect",{domain:t}).then((function(r){r&&r.data.hasOwnProperty("ready")&&(r.data.hasOwnProperty("action")&&"incompatible_domain"===r.data.action?swal("Oops!","This server is not compatible, please choose another or try again later!","error"):r.data.hasOwnProperty("action")&&"blocked_domain"===r.data.action?swal("Server Blocked","This server is blocked by admins and cannot be used, please try another server!","error"):r.data.ready&&(window.location.href="/auth/raw/mastodon/preflight?d="+t+"&dsh="+r.data.dsh))}))},handleOther:function(){vart=this;swal({text:"Enter your mastodon domain (without https://)",content:"input",button:{text:"Next",closeModal:!1}}).then((function(r){if(!r||r.length<2||-1==r.indexOf("."))swal("Oops!","Please enter a valid domain!","error");else{if(!r.startsWith("http"))returnt.handleRedirect(r);swal("Oops!","The domain you enter should not start with http(s://)\nUse the domain format, like mastodon.social","error")}}))}}}},54409:(t,r,o)=>{"use strict";o.r(r),o.d(r,{default:()=>n});vare=o(93410),a=o(36357);constn={props:{initialData:{type:Object}},components:{InstagramLoader:a.InstagramLoader},data:function(){return{step:1,validUsername:!1,usernameError:void0,username:this.initialData.username,email:void0,emailError:void0,validEmail:!1,password:void0,passwordConfirm:void0,passwordValid:!1,following:[],followingFetched:!1,selectedFollowing:[],form:{importAvatar:!0,bio:this.stripTagsPreserveNewlines(this.initialData.note),display_name:this.initialData.display_name},isSubmitting:!1,submitProgress:0,submitMessage:"Please wait...",isImportingFollowing:!1,accountToId:[],followingIds:[],accessToken:void0}},mounted:function(){this.checkUsernameAvailability()},watch:{username:(0,e.debounce)((function(t){this.checkUsernameAvailability()}),500),email:(0,e.debounce)((function(t){this.checkEmailAvailability()}),500),passwordConfirm:function(t){this.checkPasswordConfirm(t)},selectedFollowing