(window.webpackJsonp=window.webpackJsonp||[]).push([[426],{1500:function(e,n,t){var content=t(1840);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,t(94).default)("0d82e26b",content,!0,{sourceMap:!1})},1839:function(e,n,t){"use strict";t(1500)},1840:function(e,n,t){var o=t(93),r=t(188),c=t(543),d=o(!1),l=r(c);d.push([e.i,".feedback-module .feedback-heading {\n margin-bottom: 20px;\n}\n.feedback-module .feedback-container {\n position: relative;\n margin-bottom: 50px;\n}\n.feedback-module .feedback-content {\n position: relative;\n display: none;\n}\n.feedback-module .feedback-content.show {\n display: block;\n}\n@media (min-width: 991px) {\n.feedback-module .feedback-question-container {\n display: flex;\n justify-content: space-between;\n}\n}\n.feedback-module .feedback-selection-wrapper {\n margin-bottom: 20px;\n display: flex;\n}\n@media (min-width: 991px) {\n.feedback-module .feedback-selection-wrapper.hide {\n display: none;\n}\n}\n.feedback-module input[type='radio'] {\n -webkit-border-radius: 0;\n border-radius: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n margin: 0;\n}\n.feedback-module .feedback-selection {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 4px 0;\n width: 100px;\n height: 36px;\n border-radius: 5px;\n}\n.feedback-module .feedback-selection:hover {\n cursor: pointer;\n}\n.feedback-module .feedback-selection.yes {\n margin-right: 20px;\n}\n.feedback-module .feedback-textbox {\n width: 100%;\n height: 130px;\n border-radius: 5px;\n border: 1px solid #CCC;\n padding: 5px;\n margin-bottom: 5px;\n resize: none;\n}\n@media (min-width: 991px) {\n.feedback-module .feedback-textbox {\n height: 75px;\n}\n}\n.feedback-module .text-counter {\n display: flex;\n justify-content: space-between;\n margin-bottom: 15px;\n}\n.feedback-module .submit-button {\n padding: 4px 0;\n width: 150px;\n}\n.feedback-module .submit-button:hover {\n cursor: pointer;\n}\n.feedback-module .thank-you {\n display: none;\n width: 100%;\n border-radius: 5px;\n}\n.feedback-module .thank-you .authority-check {\n width: 30px;\n height: 30px;\n margin-bottom: 10px;\n}\n.feedback-module .thank-you.show {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n flex-direction: column;\n top: -56px;\n bottom: 0;\n}\n@media (min-width: 991px) {\n.feedback-module .thank-you.show {\n top: 0;\n}\n}\n.feedback-module .handle-error {\n display: none;\n width: 100%;\n border-radius: 5px;\n}\n.feedback-module .handle-error.show {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n flex-direction: column;\n top: -56px;\n bottom: 0;\n}\n@media (min-width: 991px) {\n.feedback-module .handle-error.show {\n top: 0;\n}\n}\n.feedback-module .feedback-heading {\n font-family: 'ProximaNovaBold', Arial, sans-serif;\n font-size: 28px;\n line-height: 36px;\n color: #2E2E30;\n}\n.feedback-module .feedback-selection {\n font-family: 'ProximaNovaSemiBold', Arial, sans-serif;\n font-size: 17px;\n line-height: 28px;\n text-align: center;\n color: #007CBE;\n background: #F2F2F2;\n border: 2px solid #F2F2F2;\n}\n.feedback-module input[type='radio']:checked + .feedback-selection {\n border: 2px solid #007CBE;\n}\n.feedback-module input[type='radio']:checked + .feedback-selection::before {\n content: '';\n background-image: url("+l+");\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n height: 18px;\n width: 18px;\n margin-right: 7px;\n}\n.feedback-module .feedback-textbox {\n font-family: 'ProximaNovaRegular', Arial, sans-serif;\n font-size: 17px;\n line-height: 28px;\n color: #2E2E30;\n}\n.feedback-module .feedback-textbox::placeholder {\n color: #606B71;\n}\n.feedback-module .text-counter {\n font-family: 'ProximaNovaRegular', Arial, sans-serif;\n font-size: 10px;\n line-height: 16px;\n color: #606B71;\n}\n.feedback-module .submit-button {\n font-family: 'ProximaNovaSemiBold', Arial, sans-serif;\n font-size: 17px;\n line-height: 28px;\n text-align: center;\n color: #fff;\n background: #007CBE;\n border-radius: 5px;\n border: none;\n}\n.feedback-module .thank-you,\n.feedback-module .handle-error {\n background: #F8F8F8;\n border: 1px solid #EAEAEA;\n border-radius: 5px;\n}\n.feedback-module .thank-text,\n.feedback-module .handle-error-text {\n font-family: 'ProximaNovaBold', Arial, sans-serif;\n font-size: 17px;\n line-height: 28px;\n color: #2E2E30;\n}\n",""]),e.exports=d},2098:function(e,n,t){"use strict";t.r(n);var o=t(18),r=t(12),c=(t(58),t(19),t(5),t(0)),d=t(131),l={name:"FeedbackModule",props:{article:{type:Object,default:function(){}}},data:function(){return{showThankYou:!1,errorFeedback:!1,showFeedbackForm:!1,response:{},counter:0,widgetId:""}},computed:{widgetType:function(){return Object(c.a)(this,"widget.type","")},commerceApi:function(){return Object(c.a)(this,"$config.commerceApi","")}},methods:{countWord:function(e){var n=Object(c.a)(e,"target.value.length",0);this.counter=n},responseFeedback:function(e){var n=this,t="POST",o=Object(c.a)(this,"article",{}),r=Object(c.a)(this,"$config.site.domain",""),d=Object(c.a)(o,"slug",""),l="".concat(this.commerceApi,"/widget"),f={};f[e]=1,this.response=f;var h={site:r,slug:d,type:"article-feedback",prompt:"Was this article helpful?",answer:this.response};this.widgetId&&(t="PATCH",l="".concat(l,"/").concat(this.widgetId)),fetch(l,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(h)}).then((function(e){return e.json()})).then((function(e){n.widgetId=e.id,n.showFeedbackForm=!0})).catch((function(e){n.errorFeedback=!0,console.error(e)}))},submitFeedback:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var t,path,r,l,f,h;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.showThankYou=!0,t=Object(c.a)(e,"$refs.textbox.value",""),path="".concat(e.commerceApi,"/widget/").concat(e.widgetId),n.next=5,Object(d.a)(fetch(path,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({feedback:t})}));case 5:return r=n.sent,l=Object(o.a)(r,2),f=l[0],h=l[1],f&&console.error(f.message),n.abrupt("return",h);case 11:case"end":return n.stop()}}),n)})))()}}},f=(t(1839),t(43)),component=Object(f.a)(l,(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"feedback-module"},[t("div",{staticClass:"feedback-question-container"},[t("h2",{staticClass:"feedback-heading"},[e._v("Was this article helpful?")]),e._v(" "),t("div",{staticClass:"feedback-selection-wrapper",class:{hide:e.showThankYou}},[t("input",{staticClass:"input",attrs:{id:"yes",type:"radio",value:"yes",name:"feedback"},on:{click:function(n){return e.responseFeedback("yes")}}}),e._v(" "),t("label",{staticClass:"feedback-selection yes",attrs:{for:"yes"}},[e._v("Yes")]),e._v(" "),t("input",{staticClass:"input",attrs:{id:"no",type:"radio",value:"no",name:"feedback"},on:{click:function(n){return e.responseFeedback("no")}}}),e._v(" "),t("label",{staticClass:"feedback-selection no",attrs:{for:"no"}},[e._v("No")])])]),e._v(" "),t("div",{staticClass:"feedback-container"},[t("div",{staticClass:"feedback-content",class:{show:e.showFeedbackForm}},[t("textarea",{ref:"textbox",staticClass:"feedback-textbox",attrs:{placeholder:"Please share your feedback here",maxlength:"150"},on:{input:e.countWord}}),e._v(" "),t("div",{staticClass:"text-counter"},[t("p",{staticClass:"max"},[e._v("150 Characters Max")]),e._v(" "),t("p",{staticClass:"counter"},[e._v(e._s(e.counter)+"/150")])]),e._v(" "),t("div",{staticClass:"submit"},[t("input",{staticClass:"submit-button",attrs:{type:"button",value:"Submit"},on:{click:e.submitFeedback}})])]),e._v(" "),t("div",{staticClass:"thank-you",class:{show:e.showThankYou}},[t("span",{staticClass:"svg authority-check"}),e._v(" "),t("p",{staticClass:"thank-text"},[e._v("Thank you for sharing!")])]),e._v(" "),t("div",{staticClass:"handle-error",class:{show:e.errorFeedback}},[t("p",{staticClass:"handle-error-text"},[e._v("Thank you for your feedback!")])])])])}),[],!1,null,null,null);n.default=component.exports}}]);