(window.webpackJsonp=window.webpackJsonp||[]).push([[10,193,195,243,245],{1251:function(t,o,e){var content=e(1439);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(72).default)("3d98ec4e",content,!0,{sourceMap:!1})},1372:function(t,o,e){"use strict";e.r(o);var n=e(0),r={name:"AuthSignUp",mixins:[e(836).a],props:{isModal:{type:Boolean,default:!1}},data:function(){return{isCheckedNewsletterSignup:!0}},computed:{formId:function(){return Object(n.a)(this,"isModal",!1)?"sign-up-modal":"sign-up"}},methods:{updateActiveForm:function(form,t){Object(n.a)(this,"isModal",!1)&&("sign-in"===form&&window.dataLayer.push({event:"sign in lightbox impression",prompt:"sign up lightbox"}),t&&t.preventDefault(),this.$store.dispatch("auth/AUTH_UPDATE_ACTIVE_FORM",{form:form}))},onSubmit:function(){var t=this,form=this.formId;this.$store.dispatch("forms/CLEAR_FORM_ERRORS",{form:form}),this.$store.dispatch("forms/VALIDATE_FORM",{form:form}).then((function(){return t.$store.dispatch("auth/AUTH_SIGN_UP",{form:form})})).then(this.authSuccessHandler("native",this.isModal,"sign up")).then(this.checkFavoritedArticle).then(this.finallyDecideIfRedirect(this.isModal)).catch((function(){var o=Object(n.a)(t,"isModal",!1)?"lightbox":"static";window.dataLayer.push({event:"sign up ".concat(o," error"),method:"native",prompt:""})}))},onClickNewsletterSignup:function(){this.$store.dispatch("auth/UPDATE_IS_CHECKED_NEWSLETTER_SIGNUP",!this.isCheckedNewsletterSignup)}}},l=(e(1438),e(37)),component=Object(l.a)(r,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"component-auth-sign-up"},[e(t.isModal?"h2":"h1",{tag:"component",staticClass:"auth-header"},[t._v("\n Create an Account\n ")]),t._v(" "),e("div",{staticClass:"auth-methods"},[e("div",{staticClass:"auth-social"},[e("auth-social-login",{attrs:{"is-modal":t.isModal,type:"sign up"}})],1),t._v(" "),e("div",{staticClass:"auth-separator"},[e("div",{staticClass:"auth-separator__bar"}),t._v(" "),e("div",{staticClass:"auth-separator__or",class:{"is-modal":t.isModal}},[t._v("\n or\n ")])]),t._v(" "),e("div",{staticClass:"auth-form lg-form lg-form--sign-up"},[e("form",{on:{submit:function(o){return o.preventDefault(),t.onSubmit.apply(null,arguments)}}},[e("form-row",{attrs:{form:t.formId,"field-name":"Name",rules:"required|min:4|lg_trim_space|lg_alpha_space"}}),t._v(" "),e("form-row",{attrs:{form:t.formId,"field-name":"Email",rules:"required|email","input-type":"email"}}),t._v(" "),e("form-row",{attrs:{form:t.formId,"field-name":"Password",rules:"required|min:6|lg_number:1|lg_alpha:1","input-type":"password"}}),t._v(" "),e("form-row-submit",{attrs:{label:"Create Account"}})],1)])]),t._v(" "),e("div",{staticClass:"auth-signup-newsletter"},[e("label",{staticClass:"newsletter__label",attrs:{for:"newsletter__input"},on:{click:t.onClickNewsletterSignup}},[t._v("\n Receive weekly Hunker updates\n "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.isCheckedNewsletterSignup,expression:"isCheckedNewsletterSignup"}],staticClass:"newsletter__input",attrs:{id:"newsletter__input",type:"checkbox",checked:""},domProps:{checked:Array.isArray(t.isCheckedNewsletterSignup)?t._i(t.isCheckedNewsletterSignup,null)>-1:t.isCheckedNewsletterSignup},on:{change:function(o){var e=t.isCheckedNewsletterSignup,n=o.target,r=!!n.checked;if(Array.isArray(e)){var l=t._i(e,null);n.checked?l<0&&(t.isCheckedNewsletterSignup=e.concat([null])):l>-1&&(t.isCheckedNewsletterSignup=e.slice(0,l).concat(e.slice(l+1)))}else t.isCheckedNewsletterSignup=r}}}),t._v(" "),t._m(0)])]),t._v(" "),e("div",{staticClass:"auth-lower"},[e("div",{staticClass:"auth-lower__copy"},[t._v("\n Already have an account?\n "),e("a",{attrs:{href:"/signin",target:"_self"},on:{click:function(o){return t.updateActiveForm("sign-in",o)}}},[t._v("\n Sign In\n ")])])])],1)}),[function(){var t=this.$createElement,o=this._self._c||t;return o("div",{staticClass:"newsletter__checkbox"},[o("span",{staticClass:"svg white-checkmark"})])}],!1,null,null,null);o.default=component.exports;installComponents(component,{AuthSocialLogin:e(954).default,FormRow:e(823).default,FormRowSubmit:e(829).default})},1438:function(t,o,e){"use strict";e(1251)},1439:function(t,o,e){var n=e(71)(!1);n.push([t.i,'.component-auth-sign-up .auth-signup-newsletter {\n width: 250px;\n margin: 0 auto 40px auto;\n}\n.component-auth-sign-up .auth-signup-newsletter .newsletter__label {\n position: relative;\n display: block;\n padding-left: 20px;\n color: #999;\n font-size: 14px;\n font-family: "ProximaNovaRegular", Arial, sans-serif;\n line-height: 26px;\n cursor: pointer;\n}\n.component-auth-sign-up .auth-signup-newsletter .newsletter__label .newsletter__input {\n position: absolute;\n z-index: -1;\n opacity: 0;\n}\n.component-auth-sign-up .auth-signup-newsletter .newsletter__label .newsletter__input:checked + .newsletter__checkbox .svg {\n display: block;\n}\n.component-auth-sign-up .auth-signup-newsletter .newsletter__label .newsletter__checkbox {\n position: absolute;\n top: 2px;\n left: 0;\n width: 20px;\n height: 20px;\n background-color: #fadf86;\n}\n.component-auth-sign-up .auth-signup-newsletter .newsletter__label .newsletter__checkbox .svg {\n position: absolute;\n top: 6px;\n left: 4px;\n display: none;\n width: 13px;\n height: 10px;\n}\n',""]),t.exports=n},805:function(t,o,e){var content=e(826);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(72).default)("71de052a",content,!0,{sourceMap:!1})},808:function(t,o,e){var content=e(839);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(72).default)("5f38732b",content,!0,{sourceMap:!1})},823:function(t,o,e){"use strict";e.r(o);e(20),e(24),e(39),e(14),e(40);var n=e(13),r=(e(21),e(16),e(38),e(75),e(19),e(4),e(0)),l=e(63);function c(object,t){var o=Object.keys(object);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(object);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),o.push.apply(o,e)}return o}function f(t){for(var i=1;i1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sign in";return function(l){var c=e?"lightbox":"static",f={event:"".concat(r," ").concat(c," success"),prompt:Object(n.a)(o,"$store.state.auth.GTM.prompt","unknown"),method:t};e||delete f.prompt,window.dataLayer.push(f);var _=Object(n.a)(o,"$store.state.user.tempFavoriteArticleId",!1),d=o.getUserToken();if(!1!==_)return o.$store.dispatch("DO_ARTICLE_FAVORITE",{articleId:_,token:d})}},checkFavoritedArticle:function(t){"saved"===Object(n.a)(t,"action","")?window.dataLayer.push({event:"article save success",method:"",prompt:""}):"deleted"===Object(n.a)(t,"action","")||"error"===Object(n.a)(t,"action","")&&window.dataLayer.push({event:"article save error",error:""})},finallyDecideIfRedirect:function(){var t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=l.extend("finallyDecideIfRedirect()");return function(n){if(e("!isModal: ".concat(!o)),!o)return e("redirecting..."),void(window.location.href="/user/settings");t.$store.dispatch("auth/CLOSE_AUTH_MODAL"),document.querySelector("body").classList.remove("no-scroll")}}}}},837:function(t,o,e){var content=e(924);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(72).default)("759194ab",content,!0,{sourceMap:!1})},838:function(t,o,e){"use strict";e(808)},839:function(t,o,e){var n=e(71)(!1);n.push([t.i,'.component-form-row-submit .lg-form__row {\n margin-top: 30px;\n}\n.component-form-row-submit .lg-form__row .lg-form__button {\n width: 100%;\n padding: 15px;\n color: #fff;\n font-size: 14px;\n font-family: "ProximaNovaRegular", Arial, sans-serif;\n letter-spacing: 0;\n text-transform: uppercase;\n background: #333;\n border: none;\n}\n.component-form-row-submit .lg-form__row .lg-form__button:hover {\n cursor: pointer;\n opacity: 0.9;\n}\n',""]),t.exports=n},915:function(t,o,e){"use strict";e.r(o);e(16);var n={name:"AuthSocialLoginGoogle",props:{clientid:String,label:{default:"Google"},scope:{default:"profile email"}},data:function(){return{googleHandler:null}},beforeMount:function(){var t=this,script=document.createElement("script");script.src="https://apis.google.com/js/platform.js",script.onreadystatechange=script.onload=function(){script.readyState&&!/loaded|complete/.test(script.readyState)||gapi.load("auth2",t.initSignin)},document.getElementsByTagName("head")[0].appendChild(script)},methods:{onClickButton:function(){var t=this;this.googleHandler.signIn().then((function(o){t.$emit("success",o)}),(function(o){t.$emit("error",o)}))},initSignin:function(){var t=this;gapi.auth2.init({client_id:this.clientid,scope:this.scope}).then((function(o){t.googleHandler=o}))}}},r=e(37),component=Object(r.a)(n,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"component-auth-social-login-google",on:{click:t.onClickButton}},[t._t("default"),t._v(" "),e("span",{staticClass:"label"},[t._v("\n "+t._s(t.label)+"\n ")])],2)}),[],!1,null,null,null);o.default=component.exports},923:function(t,o,e){"use strict";e(837)},924:function(t,o,e){var n=e(71)(!1);n.push([t.i,'.component-auth-social-login .auth-social__buttons .auth-social__button {\n position: relative;\n width: 100%;\n max-width: 300px;\n height: 50px;\n padding-top: 16px;\n color: #fff;\n font-size: 16px;\n font-family: "ProximaNovaRegular", Arial, sans-serif;\n letter-spacing: 0;\n}\n.component-auth-social-login .auth-social__buttons .auth-social__button:hover {\n cursor: pointer;\n opacity: 0.9;\n}\n.component-auth-social-login .auth-social__buttons .auth-social__button .label {\n vertical-align: text-bottom;\n}\n.component-auth-social-login .auth-social__buttons .auth-social__button .svg {\n position: absolute;\n left: 30px;\n vertical-align: middle;\n}\n.component-auth-social-login .auth-social__buttons .auth-social__button.auth-social__button--facebook {\n margin-bottom: 20px;\n background: #4d5aa7;\n}\n@media (min-width: 991px) {\n.component-auth-social-login .auth-social__buttons .auth-social__button.auth-social__button--facebook {\n margin-bottom: 30px;\n}\n}\n.component-auth-social-login .auth-social__buttons .auth-social__button.auth-social__button--facebook .svg {\n left: 35px;\n width: 10px;\n height: 20px;\n}\n.component-auth-social-login .auth-social__buttons .auth-social__button.auth-social__button--google {\n background: #4674fb;\n}\n.component-auth-social-login .auth-social__buttons .auth-social__button.auth-social__button--google .svg {\n width: 20px;\n height: 20px;\n}\n',""]),t.exports=n},954:function(t,o,e){"use strict";e.r(o);e(21);var n=e(0),r={name:"AuthSocialLogin",mixins:[e(836).a],props:{isModal:{type:Boolean,default:!1},type:{type:String,default:"sign in"}},computed:{googleClientId:function(){return Object(n.a)(this,"$store.getters.config.social.google.clientId","")},facebookAppId:function(){return Object(n.a)(this,"$store.getters.config.social.facebook.appId","")}},methods:{socialLoginError:function(t,o){var e=this.isModal?"lightbox":"static",n="".concat(this.type," ").concat(e," error");window.dataLayer.push({event:n,method:t,prompt:""})},onEmitFacebookSuccess:function(t){this.$store.dispatch("auth/AUTH_SIGN_IN_FACEBOOK",{response:t}).then(this.authSuccessHandler("facebook",this.isModal,"sign in")).then(this.checkFavoritedArticle).then(this.finallyDecideIfRedirect(this.isModal))},onEmitFacebookError:function(t){this.socialLoginError("facebook",t)},onEmitGoogleSuccess:function(t){var o=t.getAuthResponse(!0).access_token;this.$store.dispatch("auth/AUTH_SIGN_IN_GOOGLE",{accessToken:o}).then(this.authSuccessHandler("google",this.isModal,"sign in")).then(this.checkFavoritedArticle).then(this.finallyDecideIfRedirect(this.isModal))},onEmitGoogleError:function(t){this.socialLoginError("google",t)}}},l=(e(923),e(37)),component=Object(l.a)(r,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"component-auth-social-login"},[e("div",{staticClass:"auth-social__buttons"},[e("auth-social-login-google",{staticClass:"auth-social__button auth-social__button--google",attrs:{clientid:t.googleClientId,label:"Continue with Google"},on:{success:t.onEmitGoogleSuccess,error:t.onEmitGoogleError}},[e("span",{staticClass:"svg google-white"})])],1)])}),[],!1,null,null,null);o.default=component.exports;installComponents(component,{AuthSocialLoginGoogle:e(915).default})}}]);