1import{m as t}from"./vue-core-CfN93tgN.js";import{n as s,m as i,bl as e}from"./analytics_events-CF_xO-L0.js";import{p as a}from"./vendor-BLkz7W-5.js";import{aF as o}from"./fontawesome-BYuKbZbz.js";import"./moment-CUW3z3Ml.js";const r=s({components:{FontAwesomeIcon:o},mixins:[i],data(){return{submitting:!1,password:"",password_confirmation:"",showPassword:!1,showPasswordConfirmation:!1,errors:[],validationErrors:[],isLoading:!1,promotionalSignup:null,isRouteOkay:!0,email:"",refCode:this.$route.params.ref||this.$route.query.ref||"kwnadine",facebookRefCode:"kwnadine-facebook"}},computed:{...t({mainPublication:t=>t.publication.mainPublication})},async created(){var t;"kingston-wire"!==(null==(t=this.mainPublication)?void 0:t.slug)&&(this.isRouteOkay=!1),this.refCode!==this.facebookRefCode&&"kwnadine"!==this.refCode&&(this.refCode="kwnadine"),this.isRouteOkay&&e({interaction_type:"page_view",interaction_subtype:this.refCode,tag:"kwnadine",interaction_data:{ref:this.refCode,landingPageName:"kwnadine_finish"}}),this.load()},methods:{async showPopup(){const t="BlinkMacSystemFont, -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue'",s='<p style="color: #666; font-size: 1.2rem; margin-top: 2rem; margin-bottom: 2rem; font-family: '+t+';"><a href="/" class="button is-success" style="'+("background-color: #000000; border: none; margin-top: 2rem; font-family: "+t+";")+';">Continue</a></p>';await this.$swal({title:'<strong><span style="line-height: 1.2;">Thank You! Your One Month free subscription is now activated. Enjoy!</span></strong>',html:s,type:"success",showConfirmButton:!1,showCancelButton:!1,allowEscapeKey:!1,clickOutsideToClose:!1,buttonsStyling:!1})},async showResendActivationLinkPopup(){const t=`<p style='color: #666; font-size: 1.2rem; font-weight: 500; margin-bottom: 3rem; font-family: BlinkMacSystemFont, -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;'>We sent an email to ${this.email} with instructions on how to set your password and activate your subscription.</p>`;await this.$swal({allowEscapeKey:!1,title:"<strong>Thank you!</strong>",html:t,type:"success",showCancelButton:!1,confirmButtonColor:"#000000",confirmButtonText:"Continue",confirmButtonClass:"button is-success",buttonsStyling:!1})},async load(){try{this.isLoading=!0,this.errors=[],this.validationErrors=[],this.promotionalSignup={email:"[email protected]"},this.validationErrors=[];const t=await a.get(`/api/v1/promotional-signups/${this.$route.params.activationToken}`);t.data.success?this.promotionalSignup=t.data.promotionalSignup:(this.errors=t.data.errors,this.validationErrors=t.data.validationErrors)}catch(t){this.errors=["An error occurred while loading the page. Please try again later."]}finally{this.isLoading=!1}},async submit(){try{this.errors=[],this.validationErrors=[],this.submitting=!0;const t={password:this.password,password_confirmation:this.password_confirmation},s=await a.post(`/promotional-signups/${this.$route.params.activationToken}/activate`,t);s.data.success?await this.showPopup():s.data.validationErrors?this.validationErrors=s.data.validationErrors:this.errors=s.data.errors}catch(t){this.errors=["An error occurred while activating your subscription. Please try again later."]}finally{this.submitting=!1}},async sendNewActivationLink(){try{this.submitting=!0;const t=await a.post(`/promotional-signups/${this.$route.params.activationToken}/send-new-activation-link`);t.data.success?(this.errors=[],this.validationErrors=[],this.email=t.data.email??"",this.isLoading=!0,await this.showResendActivationLinkPopup(),this.$router.push({name:"home"})):t.data.isRedirect?(this.isLoading=!0,this.$router.push({name:"kwnadine"})):this.errors=t.data.errors}catch(t){this.errors=["An error occurred while sending a new activation link. Please try again later."]}finally{this.submitting=!1,this.isLoading=!1}}}},function(){var t=this,s=t._self._c;return s("article",{staticClass:"landing-container pt-6",staticStyle:{"background-color":"#00b4ff"}},[s("div",{staticClass:"container px-4"},[s("div",{staticClass:"columns is-centered"},[s("div",{staticClass:"column is-6 is-10-tablet is-12-mobile"},[t.isRouteOkay?t._e():s("div",{staticClass:"column is-6 is-10-tablet is-12-mobile"},[s("h1",{staticClass:"landing-header-text is-size-3 is-size-4-mobile has-text-weight-bold mt-4 mb-4 has-text-centered"},[t._v(" We're sorry, this offer is only available for Kingston Wire. ")]),s("p",{staticClass:"has-text-centered"},[s("router-link",{staticClass:"button is-success has-text-centered",staticStyle:{"background-color":"#000000 !important",color:"#ffffff !important","border-radius":"6px !important",border:"none !important"},attrs:{to:{name:"home"}}},[t._v(" Go back to the home page ")])],1)]),t.isLoading?s("div",[s("h1",{staticClass:"landing-header-text is-size-1 is-size-4-mobile has-text-weight-bold mt-4"},[t._v(" Loading... ")])]):t._e(),t.isRouteOkay&&!t.isLoading?s("div",[t.errors&&t.errors.length?s("div",{staticClass:"mt-4 has-text-centered"},["Invalid or already used activation token"===t.errors[0]?s("div",[s("h1",{staticClass:"landing-header-text is-size-1 is-size-4-mobile has-text-weight-bold mt-4"},[t._v(" We're sorry - this activation link is no longer valid. Please generate a new one. ")]),s("div",{staticClass:"has-text-centered"},[s("button",{staticClass:"button landing-submit-button has-text-weight-bold mt-4",class:{"
1is-loading":t.submitting},staticStyle:{"background-color":"#000000 !important",color:"#ffffff !important","border-radius":"6px !important",border:"none !important"},attrs:{disabled:t.submitting,type:"submit"},on:{click:t.sendNewActivationLink}},[t._v(" Send New Activation Link ")])]),t._m(0)]):s("h1",{staticClass:"landing-header-text is-size-1 is-size-4-mobile has-text-weight-bold mt-4"},[t._v(" We're sorry, but an error occurred while loading the page. Please try again later. "),t.errors.length?s("div",{staticClass:"mt-4 has-text-centered mb-4"},t._l(t.errors,function(i){return s("p",{key:i,staticClass:"help landing-error is-size-5"},[t._v(t._s(i))])}),0):t._e()])]):t._e(),t.errors.length||t.isLoading||!t.promotionalSignup?t._e():s("div",[s("h1",{staticClass:"landing-header-text is-size-2 is-size-4-mobile has-text-weight-bold mt-4 mb-4 has-text-centered"},[t._v(" Almost there - you just need to set your password ")]),s("p",{staticClass:"landing-header-text is-size-5 is-size-6-mobile mb-4 has-text-centered"},[t._v(" To activate your subscription, please create a password for "+t._s(t.promotionalSignup.email)+" ")]),s("div",{staticClass:"columns is-centered mt-4"},[s("div",{staticClass:"column is-5-desktop is-5-tablet is-12-mobile"},[s("form",{on:{submit:function(s){return s.preventDefault(),t.submit.apply(null,arguments)}}},[s("div",{staticClass:"columns is-mobile mb-3"},[s("div",{staticClass:"column"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-right"},[s("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.password,expression:"password",modifiers:{trim:!0}}],staticClass:"input",class:{"is-danger":!!t.errors.length},attrs:{type:t.showPassword?"text":"password",placeholder:"Password",required:"",minlength:"8",maxlength:"200",disabled:t.submitting,autocomplete:"new-password"},domProps:{value:t.password},on:{input:function(s){s.target.composing||(t.password=s.target.value.trim())},blur:function(s){return t.$forceUpdate()}}}),s("span",{staticClass:"icon is-small is-right",staticStyle:{"pointer-events":"all",cursor:"pointer","z-index":"10"},on:{click:function(s){s.preventDefault(),t.showPassword=!t.showPassword}}},[s("font-awesome-icon",{staticClass:"has-text-grey",attrs:{icon:t.showPassword?"eye-slash":"eye"}})],1)])])])]),s("div",{staticClass:"columns is-mobile mb-3"},[s("div",{staticClass:"column"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control has-icons-right"},[s("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.password_confirmation,expression:"password_confirmation",modifiers:{trim:!0}}],staticClass:"input",class:{"is-danger":!!t.errors.length},attrs:{type:t.showPasswordConfirmation?"text":"password",placeholder:"Confirm Password",required:"",minlength:"8",maxlength:"200",disabled:t.submitting,autocomplete:"new-password"},domProps:{value:t.password_confirmation},on:{input:function(s){s.target.composing||(t.password_confirmation=s.target.value.trim())},blur:function(s){return t.$forceUpdate()}}}),s("span",{staticClass:"icon is-small is-right",staticStyle:{"pointer-events":"all",cursor:"pointer","z-index":"10"},on:{click:function(s){s.preventDefault(),t.showPasswordConfirmation=!t.showPasswordConfirmation}}},[s("font-awesome-icon",{staticClass:"has-text-grey",attrs:{icon:t.showPasswordConfirmation?"eye-slash":"eye"}})],1)])])])]),t.validationErrors&&t.validationErrors.length?s("div",{staticClass:"mt-4 has-text-centered mb-4"},[s("p",{staticClass:"help landing-error is-size-5"},[t._v(t._s(t.validationErrors[0]))])]):t._e(),t.errors&&t.errors.length?s("div",{staticClass:"mt-4 has-text-centered mb-4"},[s("p",{staticClass:"help landing-error is-size-5"},[t._v(t._s(t.errors[0]))])]):t._e(),s("div",{staticClass:"columns mb-3 is-gapless"},[s("div",{staticClass:"column"},[s("div",{staticClass:"field is-grouped"},[s("div",{staticClass:"control"},[s("button",{staticClass:"button landing-submit-button has-text-weight-bold",staticStyle:{"background-color":"#000000",color:"#ffffff","border-radius":"6px",border:"none"},attrs:{type:"submit",disabled:t.submitting}},[t._v(" Activate Subscription ")])]),t.submitting?s("div",{staticClass:"control"},[s("span",{staticClass:"icon is-small ml-2"},[s("span",{staticClass:"icon"},[s("fa-icon",{attrs:{icon:"circle-notch",spin:""}})],1)])]):t._e()])])])])])])]),t.isLoading||t.errors.length||t.promotionalSignup?t._e():s("div",[s("h1",{staticClass:"landing-header-text is-size-1 is-size-4-mobile has-text-weight-bold mt-4 has-text-centered"},[t._v(" We're sorry, but an error occurred while loading the page. Please try again later. ")])])]):t._e()])])])])},[function(){var t=this,s=t._self._c;return s("div",{staticClass:"columns is-centered"},[s("div",{staticClass:"column is-8-desktop is-10-tablet is-12-mobile is-flex is-justify-content-center"},[s("h2",{staticClass:"landing-header-text is-size-5 is-size-6-mobile mt-4 is-3 has-text-centered"},[t._v(" If you need assistance activating your subscription, please email "),s("a",{attrs:{href:"mailto:[email protected]"}}
1,[t._v("[email protected]")]),t._v(", or call "),s("a",{attrs:{href:"tel:1-845-481-3431"}},[t._v("845-481-3431")]),t._v(". ")])])])}],!1,null,"2dcbd44b").exports;export{r 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.