1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[711],{2908:(function(T,_,s){s.d(_,{Z:function(){return I}});var S=function(){var t=this,a=t._self._c,N=t._self._setupProxy;return a("validation-provider",{staticClass:"bbnx-input-textarea__wrapper",attrs:{name:t.name,rules:t.rules,vid:t.confirmed},scopedSlots:t._u([{key:"default",fn:function({errors:P}){return[a("div",{staticClass:"bbnx-input-textarea",class:{"bbnx-input-textarea--disabled":t.disabled}},[a("label",{attrs:{name:t.name,id:t.id}},[a("span",{staticClass:"bbnx-input-textarea__label",class:t.brickConfig.components["input-text"].label},[t._v(` 2 `+t._s(t.label)+` 3 `),t.required?a("span",{staticClass:"color-error500"},[t._v("*")]):t._e()]),t._v(" "),a("div",{staticClass:"bbnx-input-textarea__input-wrapper"},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:t.text,expression:"text"}],staticClass:"bbnx-input-textarea__input",class:{"bbnx-input-textarea__input--icon":t.icon,"bbnx-input-textarea__input--error":P.length},attrs:{rows:t.rows,cols:t.cols,type:t.type,for:t.id,disabled:t.disabled,placeholder:t.placeholder,maxlength:t.maxLength},domProps:{value:t.text},on:{input:function(E){E.target.composing||(t.text=E.target.value)}}}),t._v(" "),t.icon?a("button",{staticClass:"bbnx-input-textarea__icon",attrs:{type:"button"},on:{click:t.clickIcon}},[a("nx-icon",{attrs:{icon:t.icon}})],1):t._e()])]),t._v(" "),t.helperText||t.$slots.helper?a("span",{staticClass:"bbnx-input-textarea__helper"},[t._t("helper",function(){return[t._v(t._s(t.helperText))]})],2):t._e(),t._v(" "),P.length?a("span",{staticClass:"bbnx-input-textarea__error"},[t._v(t._s(P[0]))]):t._e()])]}}],null,!0)})},b=[],v=s(3646),m=s(5678),f=s(7382),l=Object.defineProperty,n=Object.defineProperties,o=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,x=(c,t,a)=>t in c?l(c,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):c[t]=a,g=(c,t)=>{for(var a in t||(t={}))p.call(t,a)&&x(c,a,t[a]);if(u)for(var a of u(t))C.call(t,a)&&x(c,a,t[a]);return c},w=(c,t)=>n(c,o(t)),M={name:"nx-input-textarea",components:{NxIcon:m.Z,ValidationProvider:v.d_},props:{value:{type:String},name:{type:String},id:{type:String},label:{type:String},placeholder:{type:String},rules:{type:[String,Object]},helperText:{type:String},type:{type:String,default:"text"},disabled:{type:Boolean,default:!1},confirmed:{type:String},icon:{type:String},rows:{type:String},cols:{type:String},maxLength:{type:Number,default:1e4}},computed:w(g({},(0,f.Se)(["brickConfig"])),{text:{get(){return this.value},set(c){this.$emit("input",c)}},required(){return typeof this.rules=="string"?this.rules.search("required")>=0:this.rules.required}}),methods:{clickIcon(){this.$emit("clickIcon")}}},O=M,$=s(810),L=(0,$.Z)(O,S,b,!1,null,null,null),I=L.exports}),711:(function(T,_,s){s.r(_),s.d(_,{default:function(){return A}});var S=function(){var e=this,r=e._self._c,k=e._self._setupProxy;return r("div",{staticClass:"bbnx-digitalinterview-form"},[!e.anonymous&&!this.currentUser?r("div",{staticClass:"bbnx-digitalinterview-form-closed"},[r("div",{staticClass:"text",domProps:{textContent:e._s(this.$t("digitalinterview.paywall-descripcion",{site:this.site.name}))}}),e._v(" "),r("div",{staticClass:"header"},[r("nx-button",{attrs:{medium:""},domProps:{textContent:e._s(this.$t("digitalinterview.paywall-button"))},on:{click:e.goToLogin}})],1)]):e._e(),e._v(" "),(this.currentUser||e.anonymous)&&e.viewForm?r("validation-observer",{ref:"validator",scopedSlots:e._u([{key:"default",fn:function({valid:h}){return[r("form",{on:{submit:function(d){d.preventDefault(),d.stopPropagation()}}},[r("nx-input-text",{attrs:{label:e.$t("digitalinterview.campo-nombre"),name:"digitalinterview.campo-nombre",rules:"required"},model:{value:e.name,callback:function(d){e.name=d},expression:"name"}}),e._v(" "),r("nx-input-text",{attrs:{label:e.$t("digitalinterview.campo-apellidos"),name:"digitalinterview.campo-apellidos",rules:"required"},model:{value:e.surname,callback:function(d){e.surname=d},expression:"surname"}}),e._v(" "),r("nx-input-textarea",{attrs:{label:e.$t("digitalinterview.campo-pregunta"),name:"digitalinterview.campo-pregunta",rows:"7",cols:"100%",rules:"required",maxLength:500},on:{input:e.change},model:{value:e.text,callback:function(d){e.text=d},expression:"text"}}),e._v(" "),r("span",{ref:"lengthMessage",staticClass:"text-area-control",class:{alert:e.alertMessage,warning:e.warningMessage},domProps:{textContent:e._s(e.textAreaMessage)}}),e._v(" "),r("div",{staticClass:"bbnx-input-captcha__wrapper"},[r("vue-recaptcha",{ref:"recaptcha",attrs:{loadRecaptchaScript:!0,sitekey:e.recaptchaWebKey},on:{verify:e.onCaptchaVerified,expired:e.onCaptchaExpired}})],1),e._v(" "),r("div",{staticClass:"button-wrapper"},[r("nx-button",{staticClass:"user--mt-20",attrs:{text:e.$t("digitalinterview.button"),loading:e.waiting,type:"submit",medium:"",disabled:!h||!e.recaptcha},on:{click:e.sendDigitalinterview}}),e._v(" "),e.stateProgress?r("span",{staticClass:"progress"}
3,[e._v(e._s(e.stateProgress)+"%")]):e._e()],1)],1)]}}],null,!1,3279325767)}):e._e(),e._v(" "),r("nx-modal-window",{attrs:{title:e.$t("digitalinterview.modal-title"),text:e.$t("digitalinterview.modal-text")},scopedSlots:e._u([{key:"actions",fn:function(){return[r("nx-button",{staticClass:"form-user-profile__button",attrs:{text:e.$t("digitalinterview.modal-button"),tabindex:e.showModal?"0":"-1",type:"button",medium:""},on:{click:e.closeModal}})]},proxy:!0}]),model:{value:e.showModal,callback:function(h){e.showModal=h},expression:"showModal"}}),e._v(" "),r("nx-modal-window",{attrs:{title:e.$t("digitalinterview.modal-title"),text:e.$t("digitalinterview.limitePreguntasEnviadas")},scopedSlots:e._u([{key:"actions",fn:function(){return[r("nx-button",{staticClass:"form-user-profile__button",attrs:{text:e.$t("digitalinterview.modal-button"),tabindex:e.showModalyouCantSendMoreMssgs?"0":"-1",type:"button",medium:""},on:{click:e.closeModalyouCantSendMoreMssgs}})]},proxy:!0}]),model:{value:e.showModalyouCantSendMoreMssgs,callback:function(h){e.showModalyouCantSendMoreMssgs=h},expression:"showModalyouCantSendMoreMssgs"}}),e._v(" "),e.showErroryouCantSendMoreMssgs?r("nx-alert-message",{staticClass:"user--mt-20",attrs:{alert:""},scopedSlots:e._u([{key:"content",fn:function(){return[r("p",{domProps:{textContent:e._s(e.$t("digitalinterview.limitePreguntasEnviadas"))}})]},proxy:!0}],null,!1,3894656174)}
3):e._e(),e._v(" "),e.showError?r("nx-alert-message",{staticClass:"user--mt-20",attrs:{alert:""},scopedSlots:e._u([{key:"content",fn:function(){return[r("p",[e._v(e._s(e.translations.notificationAlert))]),e._v(" "),e.registerErrors.length?r("ul",e._l(e.registerErrors,function(h,d){return r("li",{key:d},[r("p",[e._v(e._s(h))])])}),0):e._e()]},proxy:!0}],null,!1,4213828017)}):e._e()],1)},b=[],v=s(3646),m=s(7248),f=s(7382),l=s(5440),n=s(38),o=s(7427),u=s(9329),p=s(2908),C=s(4206),x=s.n(C),g={sendDigitalinterview(i,e,r){return x().create().post(`/api/front/digital-interview/${i}/question`,r)}},w=Object.defineProperty,M=Object.defineProperties,O=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,c=(i,e,r)=>e in i?w(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,t=(i,e)=>{for(var r in e||(e={}))L.call(e,r)&&c(i,r,e[r]);if($)for(var r of $(e))I.call(e,r)&&c(i,r,e[r]);return i},a=(i,e)=>M(i,O(e)),N=(i,e,r)=>new Promise((k,h)=>{var d=y=>{try{j(r.next(y))}catch(R){h(R)}},Z=y=>{try{j(r.throw(y))}catch(R){h(R)}},j=y=>y.done?k(y.value):Promise.resolve(y.value).then(d,Z);j((r=r.apply(i,e)).next())}),P={name:"nx-digitalinterview-form",components:{ValidationObserver:v._j,ValidationProvider:v.d_,VueRecaptcha:m.Z,NxModalWindow:l.Z,NxButton:n.Z,NxAlertMessage:o.Z,NxInputText:u.Z,NxInputTextarea:p.Z},props:{digitalinterviewId:{type:String},recaptchaWebKey:{type:String,required:!0},digitalinterviewType:{type:String},backUrl:{type:String},anonymous:{type:Boolean,default:!1}},data:()=>({waiting:!1,name:null,surname:null,subject:null,text:null,showError:!1,registerErrors:[],showModal:!1,showModalyouCantSendMoreMssgs:!1,showErroryouCantSendMoreMssgs:!1,recaptcha:null,commentLimit:500,commentLength:0,numberOfSends:0,viewForm:!0}),mounted(){var i,e;localStorage.removeItem("backUrl"),window.addEventListener("beforeunload",this.confirmLeaving),this.name=(i=this.currentUser)==null?void 0:i.name,this.surname=(e=this.currentUser)==null?void 0:e.surname;const r={custom:{"digitalinterview.campo-nombre":{required:this.$t("validation.required",{_field_:this.$t("digitalinterview.campo-nombre")})},"digitalinterview.campo-apellidos":{required:this.$t("validation.required",{_field_:this.$t("digitalinterview.campo-apellidos")})},"digitalinterview.campo-pregunta":{required:this.$t("digitalinterview.error-pregunta")}}};v.cX.localize("en",r),v.cX.localize("es",r)},computed:a(t(t(t(t({},(0,f.Se)(["site"])),(0,f.Se)("user",["currentUser"])),(0,f.Se)("digitalinterview",["stateProgress"])),(0,f.Se)(["loginUrl"])),{translations(){return{notificationAlert:this.$t("digitalinterview.error-message")}},payload(){return{type:this.digitalinterviewType,userName:this.name,userSurname:this.surname,question:this.text,captcha:this.recaptcha}},textAreaMessage(){return`${this.commentLength} / ${this.commentLimit}`},canSendComment(){return this.commentLength>1},alertMessage(){return this.commentLength>this.commentLimit-this.commentLimit*.05},warningMessage(){return this.commentLength>this.commentLimit-this.commentLimit*.2}}),methods:{change(i){this.commentLength=i.length},confirmLeaving(i){if(this.waiting){const e=this.$t("digitalinterview.leave-warning");return i.returnValue=e,e}return null},closeModal(){this.showModal=!1},closeModalyouCantSendMoreMssgs(){this.showModalyouCantSendMoreMssgs=!1},onCaptchaVerified(i){this.recaptcha=i},onCaptchaExpired(){this.recaptcha=null},clearForm(){this.text=null,this.showError=!1,this.registerErrors=[],this.recaptcha=null,this.valid=!0,this.$refs.recaptcha.reset(),this.commentLength=0,this.numberOfSends+=1},youCantSendMoreMssgs(){this.registerErrors=[],this.valid=!1,this.showModalyouCantSendMoreMssgs=!0,this.$el.getElementsByTagName("textarea")[0].value="",this.$el.getElementsByTagName("input")[0].value="",this.$el.getElementsByTagName("input")[1].value="",this.viewForm=!1,this.showErroryouCantSendMoreMssgs=!0},goToLogin(){this.backUrl&&localStorage.setItem("backUrl",this.backUrl),window.location=this.loginUrl},sendDigitalinterview(){return N(this,null,function*(){this.waiting=!0,this.digitalinterviewType!=="text"&&(this.waiting=!0),g.sendDigitalinterview(this.digitalinterviewId,this.digitalinterviewType,this.payload).then(i=>{console.debug(i),typeof i.errors!="undefined"?(this.showError=!0,i.errors.forEac
3h(e=>{this.registerErrors.push(this.$t(`register.error-server.${e.errorCode}`))})):(this.numberOfSends>2?this.youCantSendMoreMssgs():(this.clearForm(),this.showModal=!0),this.waiting=!1)}).catch(i=>{console.error(i),i.response.data.errorCode==="userQuestionsQuotaExceeded"?this.youCantSendMoreMssgs():(this.showError=!0,this.waiting=!1,typeof i.apiInfo.data.errors!="undefined"&&i.apiInfo.data.errors.forEach(e=>{this.registerErrors.push(this.$t(`register.error-server.${e.errorCode}`))}))})})}}},E=P,V=s(810),U=(0,V.Z)(E,S,b,!1,null,null,null),A=U.exports}),7248:(function(T,_){function s(){return s=Object.assign||function(l){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(l[u]=o[u])}return l},s.apply(this,arguments)}var S=function(){var n=!1,o=[],u=function(g){if(!n){n=!0;for(var w=0,M=o.length;w<M;w++)o[w](g)}},p=function(g){if(!n){o.push(g);return}g()},C={resolved:function(){return n},resolve:u,promise:{then:p}};return C},b=Object.prototype.hasOwnProperty;function v(){var l=S();return{notify:function(){l.resolve()},wait:function(){return l.promise},render:function(o,u,p){this.wait().then(function(){p(window.grecaptcha.render(o,u))})},reset:function(o){typeof o!="undefined"&&(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.reset(o)}))},execute:function(o){typeof o!="undefined"&&(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.execute(o)}))},checkRecaptchaLoad:function(){b.call(window,"grecaptcha")&&b.call(window.grecaptcha,"render")&&this.notify()},assertLoaded:function(){if(!l.resolved())throw new Error("ReCAPTCHA has not been loaded")}}}var m=v();typeof window!="undefined"&&(window.vueRecaptchaApiLoaded=m.notify);var f={name:"VueRecaptcha",props:{sitekey:{type:String,required:!0},theme:{type:String},badge:{type:String},type:{type:String},size:{type:String},tabindex:{type:String},loadRecaptchaScript:{type:Boolean,default:!1},recaptchaScriptId:{type:String,default:"__RECAPTCHA_SCRIPT"},recaptchaHost:{type:String,default:"www.google.com"},language:{type:String,default:""}},beforeMount:function(){if(this.loadRecaptchaScript&&!document.getElementById(this.recaptchaScriptId)){var n=document.createElement("script");n.id=this.recaptchaScriptId,n.src="https://"+this.recaptchaHost+"/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit&hl="+this.language,n.async=!0,n.defer=!0,document.head.appendChild(n)}},mounted:function(){var n=this;m.checkRecaptchaLoad();var o=s({},this.$props,{callback:this.emitVerify,"expired-callback":this.emitExpired,"error-callback":this.emitError}),u=this.$slots.default?this.$el.children[0]:this.$el;m.render(u,o,function(p){n.$widgetId=p,n.$emit("render",p)})},methods:{reset:function(){m.reset(this.$widgetId)},execute:function(){m.execute(this.$widgetId)},emitVerify:function(n){this.$emit("verify",n)},emitExpired:function(){this.$emit("expired")},emitError:function(){this.$emit("error")}},render:function(n){return n("div",{},this.$slots.default)}};_.Z=f})}]);
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.