');$(s).insertAfter(t),this.b(s.find(".ioselect-button-close")[0],"click",this.HideDropdown.bind(this)),$(this.e[0].parentNode),this.c=$(s)[0],this.d=$(this.c).find(".ioselect-dropdown")[0],null!=(t=this.e[0].getAttribute("data-ioselect-dropdown-class"))&&$(this.d).addClass(t),this.list=$(this.d).find("ul")[0],this.search=$(this.d).find("input[type=text]")[0],this.d_built=this.current_selected=!1,this.select=$(this.c).find(".ioselect-select")[0],$(document.body).append(this.d),this.mask=$('
')[0],this.filter="",this.mutation_listener=this.SelectMutated.bind(this),this.mutation_observer=!1,"undefined"!=typeof MutationObserver&&(this.mutation_observer=new MutationObserver(this.mutation_listener),this.mutation_observer.observe(this.e[0],{childList:!0,attributes:!0})),this.b(this.e.closest("form"),"reset",this.Reset.bind(this)),this.b($(this.d),"click",this.ClickOption.bind(this)),this.b($(this.select),"click",this.ClickSelect.bind(this)),this.b(this.e,"change",this.Update.bind(this)),this.search_timeout=null,this.UpdateSelect(),$(this.e).trigger("ready")}return t.prototype={on:function(t,i){this.b(this.e,t,function(t){var e;void 0!==t.detail&&null!==t.detail&&$.isArray(t.detail.__args)?((e=[t]).push.apply(e,t.detail.__args),i.apply(null,e)):i.apply(i,arguments)})},off:function(t,e){this.u(this.e,t,e)},b:function(t,e,i){this.l.push({element:$(t)[0],event:e,func:i}),$(t).on(e,i)},u:function(t,e,i){t=$(t)[0];for(var s=[],r=0;r
=this.o.mobile_breakpoint&&document.documentElement.clientHeight>=this.o.mobile_breakpoint_vertical?(this.o.dropdown_match_select_width&&(this.d.style.width=this.c.getBoundingClientRect().width+"px"),this.is_mobile=!1,$([this.d,this.c,this.mask]).removeClass("ioselect-mobile")):(this.d.style.width="",this.is_mobile=!0,$([this.d,this.c,this.mask]).addClass("ioselect-mobile")),this.SetDropdownPosition()},Reset:function(){setTimeout(function(){this.Update()}.bind(this),0)},ClickSelect:function(t){$(this.c).hasClass("ioselect-disabled")||($(this.c).hasClass("ioselect-open")?this.HideDropdown():this.ShowDropdown())},ShowDropdown:function(t){this.d_built||this.BuildDropdown(),this.current_selected=!1,this.b(window,"resize",this.Resize.bind(this)),viewportmeta=$('meta[name="viewport"]')[0],this.current_meta=viewportmeta.content.split(",");for(var e=[],i=0;i=this.list.querySelectorAll("li").length)return;$(this.list).find("li:nth-child("+(this.current_selected+1).toString()+")").removeClass("ioselect-current"),this.current_selected++}else{if(!1===this.current_selected||0===this.current_selected)return;$(this.list).find("li:nth-child("+(this.current_selected+1).toString()+")").removeClass("ioselect-current"),this.current_selected--}t=$(this.list).find("li:nth-child("+(this.current_selected+1).toString()+")")[0];$(t).addClass("ioselect-current"),t.offsetTop-t.parentNode.scrollTop<0?t.parentNode.scrollTop=t.offsetTop:t.offsetTop+t.offsetHeight>this.list.scrollTop+this.list.offsetHeight&&(t.parentNode.scrollTop=t.offsetTop+t.offsetHeight-this.list.offsetHeight)}13==e&&!1!==this.current_selected&&$(this.list).find("li:nth-child("+(this.current_selected+1).toString()+")")[0].click()},ClickOption:function(t){if(t.stopPropagation(),!(!this.is_multiple&&$(t.target).hasClass("ioselect-selected")||$(t.target).hasClass("ioselect-disabled")||"INPUT"==t.target.tagName)){var e=$(t.target).closest(".ioselect-option,.ioselect-optgroup");if(0!=e.length)if(e.hasClass("ioselect-optgroup"))$(this.e).trigger("optgroup-click",[e[0],"asd"]);else{var i=e[0].getAttribute("data-value");if(this.is_multiple){if(0==i.length)return;"[object Array]"!==$.isArray(i)&&(i=[i]);for(var s=0;s'+(""!=o.text?o.text:" ")+""):(e+=''+o.innerText+"",i++)}this.list.innerHTML=e,this.d_built=!0,this.list.scrollTop=0},GetDropdown:function(){return this.d},ApplySearchFilter:function(t){return this.o.search_in_text?-1!==t.toLowerCase().indexOf(this.filter.toLowerCase()):0===t.toLowerCase().indexOf(this.filter.toLowerCase())},Update:function(){this.d_built=!1,this.UpdateSelect()},UpdateSelect:function(){var t=this.e[0].querySelectorAll("option:checked");if($(this.select).removeClass("ioselect-placeholder"),this.is_multiple)if(0'+this.o.value_format_function(t[i].text,t[i].value,this)+"");this.select.innerHTML=e;for(var s=$(this.select).find(".ioselect-selected-item"),i=0;i ')[0],$(this.form_element).append(t),this.recaptcha_id=grecaptcha.render(t,{sitekey:this.site_key,callback:this.onValidate.bind(this),"expired-callback":this.onExpired.bind(this),"error-callback":this.onError.bind(this)}),$(this.form_element).find("[type=submit]").each(function(){null!==this.getAttribute("disabled")&&this.removeAttribute("disabled","")}),$(this.form_element).trigger("recaptcha:initialised")))},Validate:function(){this.form.SetValue("recaptcha_id",""),grecaptcha.reset(this.recaptcha_id),grecaptcha.execute(this.recaptcha_id),this.popup_iframe=!1,this.validating=!0,this.popup_interval=setInterval(function(){var t=$('iframe[src*="google.com/recaptcha/api2/bframe"]');if(0