1"use strict";(self.webpackChunkinfobip2024=self.webpackChunkinfobip2024||[]).push([[59712],{59712(e,t,n){var i=n(85880),l=function(){var e;function t(e,n){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.FORM_ID=e,this.STORE=null==n?void 0:n.store,this.utils=null==n?void 0:n.utils}return e=[{key:"initAll",value:function(){this.initCustomPhone(),this.initAfterFormSubmitSuccess(),this.initCustomRangeField(),this.initA11yEnhancements()}},{key:"initAfterFormSubmitSuccess",value:function(){var e=this;window.addEventListener("esFormsAfterFormSubmitSuccess",function(t){var n=t.detail;e.initPeopleSdk(n)})}},{key:"initPeopleSdk",value:function(e){var t;if(null==(t=window)?void 0:t.pe){var n,i,l,o,u,s=null==e||null==(i=e.esForms)||null==(n=i.state)?void 0:n["form_".concat(this.FORM_ID)],a=null==s||null==(o=s.elements)||null==(l=o.email)?void 0:l.value,r=null==s||null==(u=s.form)?void 0:u.type;a&&"moments"===r&&window.pe.setPerson({email:a})}}},{key:"initCustomPhone",value:function(){var e,t=null===this||void 0===this||null==(e=this.STORE)?void 0:e.getStateElementInput("phone_number_free",this.FORM_ID);t&&this.mobilePhoneField("mobile_phone",t)}},{key:"mobilePhoneField",value:function(e){var t,n,i,l=this;this.setFreePhoneValue();var o=null===this||void 0===this||null==(t=this.STORE)?void 0:t.getStateElementInputSelect(e,this.FORM_ID);o&&o.addEventListener("change",function(){l.setFreePhoneValue()});var u=null===this||void 0===this||null==(n=this.STORE)?void 0:n.getStateElementInput(e,this.FORM_ID);u&&u.addEventListener("input",function(){l.setFreePhoneValue()});var s=null===this||void 0===this||null==(i=this.STORE)?void 0:i.getStateElementInput("country",this.FORM_ID);s&&s.addEventListener("change",function(){l.setFreePhoneValue()})}},{key:"setFreePhoneValue",value:function(){var e=this;setTimeout(function(){var t,n,i,l="";(null==e||null==(t=e.STORE)?void 0:t.getStateElementValue("mobile_phone",e.FORM_ID))&&(l=null==e||null==(i=e.utils)?void 0:i.getPhoneCombinedValue(e.FORM_ID,"mobile_phone")),null==e||null==(n=e.STORE)||n.setStateElementValue("phone_number_free",l,e.FORM_ID)},200)}},{key:"initCustomRangeField",value:function(){var e,t=null===this||void 0===this||null==(e=this.STORE)?void 0:e.getStateElementByTypeField("input",this.FORM_ID);if(t){var n=t.filter(function(e){return(null==e?void 0:e.typeCustom)==="range"});n.length<1||n.forEach(function(e){var t=e.input,n=function(){var e=t.min||0,n=t.max||100,l=Number((t.value-e)*100/(n-e));i.os.set(t,{"--esf-range-progress":"".concat(l,"%")})};n(),t.addEventListener("input",function(){return n()})})}}},{key:"initA11yEnhancements",value:function(){var e,t=null===this||void 0===this||null==(e=this.STORE)?void 0:e.getStateFormElement(this.FORM_ID);t&&t.querySelectorAll("[data-es-result-output]").forEach(function(e){e.hasAttribute("aria-live")||e.setAttribute("aria-live","polite"),e.hasAttribute("role")||e.setAttribute("role","region")})}}],function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(t.prototype,e),t}();window.addEventListener("esFormsJsFormLoaded",function(e){var t,n=e.detail,i=n.formId,o=n.esForms;(null==o||null==(t=o.store)?void 0:t.getStateFormElement(i))&&new l(i,o).initAll()})}}]);
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.