package assets var CpScriptsJs = []byte(`!function(t,e){void 0===t&&void 0!==window&&(t=window),"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(t.jQuery)}(this,function(t){!function(k){"use strict";var d=["sanitize","whiteList","sanitizeFn"],s=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function g(t,e){var n=t.nodeName.toLowerCase();if(-1!==k.inArray(n,e))return-1===k.inArray(n,s)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(l));for(var i=k(e).filter(function(t,e){return e instanceof RegExp}),o=0,a=i.length;o]+>/g,"")),i&&(l=y(l)),l=l.toUpperCase(),a="contains"===n?0<=l.indexOf(e):l.startsWith(e)))break}return a}function A(t){return parseInt(t,10)||0}k.fn.triggerNative=function(t){var e,n=this[0];n.dispatchEvent?(p?e=new Event(t,{bubbles:!0}):(e=document.createEvent("Event")).initEvent(t,!0,!1),n.dispatchEvent(e)):n.fireEvent?((e=document.createEventObject()).eventType=t,n.fireEvent("on"+t,e)):this.trigger(t)};var f={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},m=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,v=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");function b(t){return f[t]}function y(t){return(t=t.toString())&&t.replace(m,b).replace(v,"")}var w={"&":"&","<":"<",">":">",'"':""","'":"'"};w[String.fromCharCode(96)]="`";var x,E,D,C,T=(x=w,E="(?:"+Object.keys(x).join("|")+")",D=RegExp(E),C=RegExp(E,"g"),function(t){return t=null==t?"":""+t,D.test(t)?t.replace(C,O):t});function O(t){return x[t]}var M={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},N=27,_=13,L=32,P=9,H=38,F=40,B={success:!1,major:"3"};try{B.full=(k.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split("."),B.major=B.full[0],B.success=!0}catch(t){}var W=0,j=".bs.select",R={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},U={MENU:"."+R.MENU},V={span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" "),fragment:document.createDocumentFragment()};V.a.setAttribute("role","option"),V.subtext.className="text-muted",V.text=V.span.cloneNode(!1),V.text.className="text",V.checkMark=V.span.cloneNode(!1);var Y=new RegExp(H+"|"+F),X=new RegExp("^"+P+"$|"+N),K=function(t,e,n){var i=V.li.cloneNode(!1);return t&&(1===t.nodeType||11===t.nodeType?i.appendChild(t):i.innerHTML=t),void 0!==e&&""!==e&&(i.className=e),null!=n&&i.classList.add("optgroup-"+n),i},G=function(t,e,n){var i=V.a.cloneNode(!0);return t&&(11===t.nodeType?i.appendChild(t):i.insertAdjacentHTML("beforeend",t)),void 0!==e&&""!==e&&(i.className=e),"4"===B.major&&i.classList.add("dropdown-item"),n&&i.setAttribute("style",n),i},q=function(t,e){var n,i,o=V.text.cloneNode(!1);if(t.content)o.innerHTML=t.content;else{if(o.textContent=t.text,t.icon){var a=V.whitespace.cloneNode(!1);(i=(!0===e?V.i:V.span).cloneNode(!1)).className=t.iconBase+" "+t.icon,V.fragment.appendChild(i),V.fragment.appendChild(a)}t.subtext&&((n=V.subtext.cloneNode(!1)).textContent=t.subtext,o.appendChild(n))}if(!0===e)for(;0'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:t},Z.prototype={constructor:Z,init:function(){var n=this,t=this.$element.attr("id");this.selectId=W++,this.$element[0].classList.add("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.options.showTick=this.$element[0].classList.contains("show-tick"),this.$newElement=this.createDropdown(),this.$element.after(this.$newElement).prependTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(U.MENU),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element[0].classList.remove("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(R.MENURIGHT),void 0!==t&&this.$button.attr("data-id",t),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.setStyle(),this.render(),this.setWidth(),this.options.container?this.selectPosition():this.$element.on("hide"+j,function(){if(n.isVirtual()){var t=n.$menuInner[0],e=t.firstChild.cloneNode(!1);t.replaceChild(e,t.firstChild),t.scrollTop=0}}),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(t){n.$menuInner.attr("aria-expanded",!1),n.$element.trigger("hide"+j,t)},"hidden.bs.dropdown":function(t){n.$element.trigger("hidden"+j,t)},"show.bs.dropdown":function(t){n.$menuInner.attr("aria-expanded",!0),n.$element.trigger("show"+j,t)},"shown.bs.dropdown":function(t){n.$element.trigger("shown"+j,t)}}),n.$element[0].hasAttribute("required")&&this.$element.on("invalid"+j,function(){n.$button[0].classList.add("bs-invalid"),n.$element.on("shown"+j+".invalid",function(){n.$element.val(n.$element.val()).off("shown"+j+".invalid")}).on("rendered"+j,function(){this.validity.valid&&n.$button[0].classList.remove("bs-invalid"),n.$element.off("rendered"+j)}),n.$button.on("blur"+j,function(){n.$element.trigger("focus").trigger("blur"),n.$button.off("blur"+j)})}),setTimeout(function(){n.createLi(),n.$element.trigger("loaded"+j)})},createDropdown:function(){var t=this.multiple||this.options.showTick?" show-tick":"",e="",n=this.autofocus?" autofocus":"";B.major<4&&this.$element.parent().hasClass("input-group")&&(e=" input-group-btn");var i,o="",a="",s="",r="";return this.options.header&&(o='
'+this.options.header+"
"),this.options.liveSearch&&(a=''),this.multiple&&this.options.actionsBox&&(s='
"),this.multiple&&this.options.doneButton&&(r='
"),i='",k(i)},setPositionData:function(){this.selectpicker.view.canHighlight=[];for(var t=0;t=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(O,t){t=t||0;var M=this;this.selectpicker.current=O?this.selectpicker.search:this.selectpicker.main;var N,_,L=[];function n(t,e){var n,i,o,a,s,r,l,c,d,u,h=M.selectpicker.current.elements.length,p=[],f=!0,m=M.isVirtual();M.selectpicker.view.scrollTop=t,!0===m&&M.sizeInfo.hasScrollBar&&M.$menu[0].offsetWidth>M.sizeInfo.totalMenuWidth&&(M.sizeInfo.menuWidth=M.$menu[0].offsetWidth,M.sizeInfo.totalMenuWidth=M.sizeInfo.menuWidth+M.sizeInfo.scrollBarWidth,M.$menu.css("min-width",M.sizeInfo.menuWidth)),n=Math.ceil(M.sizeInfo.menuInnerHeight/M.sizeInfo.liHeight*1.5),i=Math.round(h/n)||1;for(var g=0;gh-1?0:M.selectpicker.current.data[h-1].position-M.selectpicker.current.data[M.selectpicker.view.position1-1].position,w.firstChild.style.marginTop=b+"px",w.firstChild.style.marginBottom=y+"px"),w.firstChild.appendChild(x)}if(M.prevActiveIndex=M.activeIndex,M.options.liveSearch){if(O&&e){var k,A=0;M.selectpicker.view.canHighlight[A]||(A=1+M.selectpicker.view.canHighlight.slice(1).indexOf(!0)),k=M.selectpicker.view.visibleElements[A],M.selectpicker.view.currentActive&&(M.selectpicker.view.currentActive.classList.remove("active"),M.selectpicker.view.currentActive.firstChild&&M.selectpicker.view.currentActive.firstChild.classList.remove("active")),k&&(k.classList.add("active"),k.firstChild&&k.firstChild.classList.add("active")),M.activeIndex=(M.selectpicker.current.data[A]||{}).index}}else M.$menuInner.trigger("focus")}this.setPositionData(),n(t,!0),this.$menuInner.off("scroll.createView").on("scroll.createView",function(t,e){M.noScroll||n(this.scrollTop,e),M.noScroll=!1}),k(window).off("resize"+j+"."+this.selectId+".createView").on("resize"+j+"."+this.selectId+".createView",function(){M.$newElement.hasClass(R.SHOW)&&n(M.$menuInner[0].scrollTop)})},setPlaceholder:function(){var t=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option")),t=!0;var e=this.$element[0],n=!1,i=!this.selectpicker.view.titleOption.parentNode;if(i)this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",n=void 0===k(e.options[e.selectedIndex]).attr("selected")&&void 0===this.$element.data("selected");!i&&0===this.selectpicker.view.titleOption.index||e.insertBefore(this.selectpicker.view.titleOption,e.firstChild),n&&(e.selectedIndex=0)}return t},createLi:function(){var l=this,f=this.options.iconBase,m=':not([hidden]):not([data-hidden="true"])',g=[],v=[],c=0,b=0,t=this.setPlaceholder()?1:0;this.options.hideDisabled&&(m+=":not(:disabled)"),!l.options.showTick&&!l.multiple||V.checkMark.parentNode||(V.checkMark.className=f+" "+l.options.tickIcon+" check-mark",V.a.appendChild(V.checkMark));var e=this.$element[0].querySelectorAll("select > *"+m);function y(t){var e=v[v.length-1];e&&"divider"===e.type&&(e.optID||t.optID)||((t=t||{}).type="divider",g.push(K(!1,R.DIVIDER,t.optID?t.optID+"div":void 0)),v.push(t))}function w(t,e){if((e=e||{}).divider="true"===t.getAttribute("data-divider"),e.divider)y({optID:e.optID});else{var n=v.length,i=t.style.cssText,o=i?T(i):"",a=(t.className||"")+(e.optgroupClass||"");e.optID&&(a="opt "+a),e.text=t.textContent,e.content=t.getAttribute("data-content"),e.tokens=t.getAttribute("data-tokens"),e.subtext=t.getAttribute("data-subtext"),e.icon=t.getAttribute("data-icon"),e.iconBase=f;var s=q(e);g.push(K(G(s,a,o),"",e.optID)),t.liIndex=n,e.display=e.content||e.text,e.type="option",e.index=n,e.option=t,e.disabled=e.disabled||t.disabled,v.push(e);var r=0;e.display&&(r+=e.display.length),e.subtext&&(r+=e.subtext.length),e.icon&&(r+=1),c li")},render:function(){this.setPlaceholder();var t,e=this,n=this.$element[0].selectedOptions,i=n.length,o=this.$button[0],a=o.querySelector(".filter-option-inner-inner"),s=document.createTextNode(this.options.multipleSeparator),r=V.fragment.cloneNode(!1),l=!1;if(this.togglePlaceholder(),this.tabIndex(),"static"===this.options.selectedTextFormat)r=q({text:this.options.title},!0);else if(!1===(this.multiple&&-1!==this.options.selectedTextFormat.indexOf("count")&&1")).length&&i>t[1]||1===t.length&&2<=i))){for(var c=0;c option"+p+", optgroup"+p+" option"+p).length,m="function"==typeof this.options.countSelectedText?this.options.countSelectedText(i,f):this.options.countSelectedText;r=q({text:m.replace("{0}",i.toString()).replace("{1}",f.toString())},!0)}if(null==this.options.title&&(this.options.title=this.$element.attr("title")),r.childNodes.length||(r=q({text:void 0!==this.options.title?this.options.title:this.options.noneSelectedText},!0)),o.title=r.textContent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&l&&z([r],e.options.whiteList,e.options.sanitizeFn),a.innerHTML="",a.appendChild(r),B.major<4&&this.$newElement[0].classList.contains("bs3-has-addon")){var g=o.querySelector(".filter-expand"),v=a.cloneNode(!0);v.className="filter-expand",g?o.replaceChild(v,g):o.appendChild(v)}this.$element.trigger("rendered"+j)},setStyle:function(t,e){var n,i=this.$button[0],o=this.$newElement[0],a=this.options.style.trim();this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,"")),B.major<4&&(o.classList.add("bs3"),o.parentNode.classList.contains("input-group")&&(o.previousElementSibling||o.nextElementSibling)&&(o.previousElementSibling||o.nextElementSibling).classList.contains("input-group-addon")&&o.classList.add("bs3-has-addon")),n=t?t.trim():a,"add"==e?n&&i.classList.add.apply(i.classList,n.split(" ")):"remove"==e?n&&i.classList.remove.apply(i.classList,n.split(" ")):(a&&i.classList.remove.apply(i.classList,a.split(" ")),n&&i.classList.add.apply(i.classList,n.split(" ")))},liHeight:function(t){if(t||!1!==this.options.size&&!this.sizeInfo){this.sizeInfo||(this.sizeInfo={});var e=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),o=document.createElement("ul"),a=document.createElement("li"),s=document.createElement("li"),r=document.createElement("li"),l=document.createElement("a"),c=document.createElement("span"),d=this.options.header&&0this.sizeInfo.menuExtras.vert&&r+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot)),"auto"===this.options.size)o=3this.options.size){for(var v=0;vthis.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRightthis.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth,this.$menu.css("min-width",this.sizeInfo.totalMenuWidth)),this.dropdown&&this.dropdown._popper&&this.dropdown._popper.update()},setSize:function(t){if(this.liHeight(t),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var e,n=this,i=k(window),o=0;if(this.setMenuSize(),this.options.liveSearch&&this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return n.setMenuSize()}),"auto"===this.options.size?i.off("resize"+j+"."+this.selectId+".setMenuSize scroll"+j+"."+this.selectId+".setMenuSize").on("resize"+j+"."+this.selectId+".setMenuSize scroll"+j+"."+this.selectId+".setMenuSize",function(){return n.setMenuSize()}):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&i.off("resize"+j+"."+this.selectId+".setMenuSize scroll"+j+"."+this.selectId+".setMenuSize"),t)o=this.$menuInner[0].scrollTop;else if(!n.multiple){var a=n.$element[0];"number"==typeof(e=(a.options[a.selectedIndex]||{}).liIndex)&&!1!==n.options.size&&(o=(o=n.sizeInfo.liHeight*e)-n.sizeInfo.menuInnerHeight/2+n.sizeInfo.liHeight/2)}n.createView(!1,o)}},setWidth:function(){var n=this;"auto"===this.options.width?requestAnimationFrame(function(){n.$menu.css("min-width","0"),n.$element.on("loaded"+j,function(){n.liHeight(),n.setMenuSize();var t=n.$newElement.clone().appendTo("body"),e=t.css("width","auto").children("button").outerWidth();t.remove(),n.sizeInfo.selectWidth=Math.max(n.sizeInfo.totalMenuWidth,e),n.$newElement.css("width",n.sizeInfo.selectWidth+"px")})}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width","")),this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement[0].classList.remove("fit-width")},selectPosition:function(){this.$bsContainer=k('
');function t(t){var e={},n=s.options.display||!!k.fn.dropdown.Constructor.Default&&k.fn.dropdown.Constructor.Default.display;s.$bsContainer.addClass(t.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(R.DROPUP,t.hasClass(R.DROPUP)),i=t.offset(),r.is("body")?o={top:0,left:0}:((o=r.offset()).top+=parseInt(r.css("borderTopWidth"))-r.scrollTop(),o.left+=parseInt(r.css("borderLeftWidth"))-r.scrollLeft()),a=t.hasClass(R.DROPUP)?0:t[0].offsetHeight,(B.major<4||"static"===n)&&(e.top=i.top-o.top+a,e.left=i.left-o.left),e.width=t[0].offsetWidth,s.$bsContainer.css(e)}var i,o,a,s=this,r=k(this.options.container);this.$button.on("click.bs.dropdown.data-api",function(){s.isDisabled()||(t(s.$newElement),s.$bsContainer.appendTo(s.options.container).toggleClass(R.SHOW,!s.$button.hasClass(R.SHOW)).append(s.$menu))}),k(window).off("resize"+j+"."+this.selectId+" scroll"+j+"."+this.selectId).on("resize"+j+"."+this.selectId+" scroll"+j+"."+this.selectId,function(){s.$newElement.hasClass(R.SHOW)&&t(s.$newElement)}),this.$element.on("hide"+j,function(){s.$menu.data("height",s.$menu.height()),s.$bsContainer.detach()})},setOptionStatus:function(){var t=this;if(t.noScroll=!1,t.selectpicker.view.visibleElements&&t.selectpicker.view.visibleElements.length)for(var e=0;e
');x[2]&&(E=E.replace("{var}",x[2][1"+E+"")),l=!1,C.$element.trigger("maxReached"+j)),g&&b&&(D.append(k("
"+S+"
")),l=!1,C.$element.trigger("maxReachedGrp"+j)),setTimeout(function(){C.setSelected(a,!1)},10),D.delay(750).fadeOut(300,function(){k(this).remove()})}}}else c.prop("selected",!1),d.selected=!0,C.setSelected(a,!0);!C.multiple||C.multiple&&1===C.options.maxOptions?C.$button.trigger("focus"):C.options.liveSearch&&C.$searchbox.trigger("focus"),l&&(s!=I(C.$element[0])&&C.multiple||r!=C.$element.prop("selectedIndex")&&!C.multiple)&&($=[d.index,u.prop("selected"),s],C.$element.triggerNative("change"))}}),this.$menu.on("click","li."+R.DISABLED+" a, ."+R.POPOVERHEADER+", ."+R.POPOVERHEADER+" :not(.close)",function(t){t.currentTarget==this&&(t.preventDefault(),t.stopPropagation(),C.options.liveSearch&&!k(t.target).hasClass("close")?C.$searchbox.trigger("focus"):C.$button.trigger("focus"))}),this.$menuInner.on("click",".divider, .dropdown-header",function(t){t.preventDefault(),t.stopPropagation(),C.options.liveSearch?C.$searchbox.trigger("focus"):C.$button.trigger("focus")}),this.$menu.on("click","."+R.POPOVERHEADER+" .close",function(){C.$button.trigger("click")}),this.$searchbox.on("click",function(t){t.stopPropagation()}),this.$menu.on("click",".actions-btn",function(t){C.options.liveSearch?C.$searchbox.trigger("focus"):C.$button.trigger("focus"),t.preventDefault(),t.stopPropagation(),k(this).hasClass("bs-select-all")?C.selectAll():C.deselectAll()}),this.$element.on("change"+j,function(){C.render(),C.$element.trigger("changed"+j,$),$=null}).on("focus"+j,function(){C.options.mobile||C.$button.trigger("focus")})},liveSearchListener:function(){var p=this,f=document.createElement("li");this.$button.on("click.bs.dropdown.data-api",function(){p.$searchbox.val()&&p.$searchbox.val("")}),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(t){t.stopPropagation()}),this.$searchbox.on("input propertychange",function(){var t=p.$searchbox.val();if(p.selectpicker.search.elements=[],p.selectpicker.search.data=[],t){var e=[],n=t.toUpperCase(),i={},o=[],a=p._searchStyle(),s=p.options.liveSearchNormalize;s&&(n=y(n)),p._$lisSelected=p.$menuInner.find(".selected");for(var r=0;r=l.selectpicker.view.canHighlight.length&&(e=0),l.selectpicker.view.canHighlight[e+m]||(e=e+1+l.selectpicker.view.canHighlight.slice(e+m+1).indexOf(!0))),t.preventDefault();var g=m+e;t.which===H?0===m&&e===c.length-1?(l.$menuInner[0].scrollTop=l.$menuInner[0].scrollHeight,g=l.selectpicker.current.elements.length-1):d=(a=(o=l.selectpicker.current.data[g]).position-o.height)p+l.sizeInfo.menuInnerHeight),(i=l.selectpicker.main.elements[v]).classList.add("active"),i.firstChild&&i.firstChild.classList.add("active"),l.activeIndex=y[E],i.firstChild.focus(),d&&(l.$menuInner[0].scrollTop=a),s.trigger("focus")}}n&&(t.which===L&&!l.selectpicker.keydown.keyHistory||t.which===_||t.which===P&&l.options.selectOnTab)&&(t.which!==L&&t.preventDefault(),l.options.liveSearch&&t.which===L||(l.$menuInner.find(".active a").trigger("click",!0),s.trigger("focus"),l.options.liveSearch||(t.preventDefault(),k(document).data("spaceSelect",!0))))}},mobile:function(){this.$element[0].classList.add("mobile-device")},refresh:function(){var t=k.extend({},this.options,this.$element.data());this.options=t,this.checkDisabled(),this.setStyle(),this.render(),this.createLi(),this.setWidth(),this.setSize(!0),this.$element.trigger("refreshed"+j)},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(j).removeData("selectpicker").removeClass("bs-select-hidden selectpicker"),k(window).off(j+"."+this.selectId)}};var tt=k.fn.selectpicker;k.fn.selectpicker=Q,k.fn.selectpicker.Constructor=Z,k.fn.selectpicker.noConflict=function(){return k.fn.selectpicker=tt,this},k(document).off("keydown.bs.dropdown.data-api").on("keydown"+j,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',Z.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(t){t.stopPropagation()}),k(window).on("load"+j+".data-api",function(){k(".selectpicker").each(function(){var t=k(this);Q.call(t,t.data())})})}(t)}),function(t,e){if("function"==typeof define&&define.amd)define(["module","exports"],e);else if("undefined"!=typeof exports)e(module,exports);else{var n={exports:{}};e(n,n.exports),t.autosize=n.exports}}(this,function(t,e){"use strict";var n,i,u="function"==typeof Map?new Map:(n=[],i=[],{has:function(t){return-1"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function Y(t,e,n,i){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&p(t,e):p(t,e))||i&&t===n)return t;if(t===n)break}while(t=(o=t).host&&o!==document&&o.host.nodeType?o.host:o.parentNode)}var o;return null}var f,m=/\s+/g;function X(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(m," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(m," ")}}function K(t,e,n){var i=t&&t.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=n+("string"==typeof n?"":"px")}}function g(t,e){var n="";do{var i=K(t,"transform");i&&"none"!==i&&(n=i+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix;return o&&new o(n)}function v(t,e,n){if(t){var i=t.getElementsByTagName(e),o=0,a=i.length;if(n)for(;o=e.left-n&&a<=e.right+n,o=s>=e.top-n&&s<=e.bottom+n;return n&&i&&o?r=t:void 0}}),r);if(e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[tt]._onDragOver(n)}}var a,s,r}function At(t){it&&it.parentNode[tt]._isOutsideThisEl(t.target)}function Ot(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: el must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=s({},e),t[tt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ct(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ot.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var i in M.initializePlugins(this,t,n),n)i in e||(e[i]=n[i]);for(var o in It(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&St,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?u(t,"pointerdown",this._onTapStart):(u(t,"mousedown",this._onTapStart),u(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(u(t,"dragover",this),u(t,"dragenter",this)),U.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),s(this,$())}function Mt(t,e,n,i,o,a,s,r){var l,c,d=t[tt],u=d.options.onMove;return!window.CustomEvent||w||x?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=i,l.related=o||e,l.relatedRect=a||G(e),l.willInsertAfter=r,l.originalEvent=s,t.dispatchEvent(l),u&&(c=u.call(d,l,s)),c}function Nt(t){t.draggable=!1}function _t(){yt=!1}function Lt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,i=0;n--;)i+=e.charCodeAt(n);return i.toString(36)}function zt(t){return setTimeout(t,0)}function Pt(t){return clearTimeout(t)}Ot.prototype={constructor:Ot,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,it):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,i=this.el,t=this.options,o=t.preventOnFilter,a=e.type,s=e.touches&&e.touches[0],r=(s||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||r,c=t.filter;if(!function(t){wt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var i=e[n];i.checked&&wt.push(i)}}(i),!it&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||t.disabled||l.isContentEditable||(r=Y(r,t.draggable,i,!1))&&r.animated||_===r)){if(P=Z(r),H=Z(r,t.draggable),"function"==typeof c){if(c.call(this,e,r,this))return nt({sortable:n,rootEl:l,name:"filter",targetEl:r,toEl:i,fromEl:i}),et("filter",n,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c=c&&c.split(",").some(function(t){if(t=Y(l,t.trim(),i,!1))return nt({sortable:n,rootEl:t,name:"filter",targetEl:r,fromEl:i,toEl:i}),et("filter",n,{evt:e}),!0}))return void(o&&e.cancelable&&e.preventDefault());t.handle&&!Y(l,t.handle,i,!1)||this._prepareDragStart(e,s,r)}}},_prepareDragStart:function(t,e,n){var i,o=this,a=o.el,s=o.options,r=a.ownerDocument;if(n&&!it&&n.parentNode===a)if(st=a,ot=(it=n).parentNode,rt=it.nextSibling,_=n,dt=s.group,F={target:Ot.dragged=it,clientX:(e||t).clientX,clientY:(e||t).clientY},this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,it.style["will-change"]="all",i=function(){et("delayEnded",o,{evt:t}),Ot.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!l&&o.nativeDraggable&&(it.draggable=!0),o._triggerDragStart(t,e),nt({sortable:o,name:"choose",originalEvent:t}),X(it,s.chosenClass,!0))},s.ignore.split(",").forEach(function(t){v(it,t.trim(),Nt)}),u(r,"dragover",kt),u(r,"mousemove",kt),u(r,"touchmove",kt),u(r,"mouseup",o._onDrop),u(r,"touchend",o._onDrop),u(r,"touchcancel",o._onDrop),l&&this.nativeDraggable&&(this.options.touchStartThreshold=4,it.draggable=!0),et("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(x||w))i();else{if(Ot.eventCanceled)return void this._onDrop();u(r,"mouseup",o._disableDelayedDrag),u(r,"touchend",o._disableDelayedDrag),u(r,"touchcancel",o._disableDelayedDrag),u(r,"mousemove",o._delayedDragTouchMoveHandler),u(r,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&u(r,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(i,s.delay)}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){it&&Nt(it),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;h(t,"mouseup",this._disableDelayedDrag),h(t,"touchend",this._disableDelayedDrag),h(t,"touchcancel",this._disableDelayedDrag),h(t,"mousemove",this._delayedDragTouchMoveHandler),h(t,"touchmove",this._delayedDragTouchMoveHandler),h(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?u(document,"pointermove",this._onTouchMove):u(document,e?"touchmove":"mousemove",this._onTouchMove):(u(it,"dragend",this),u(st,"dragstart",this._onDragStart));try{document.selection?zt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(R=!1,st&&it){et("dragStarted",this,{evt:e}),this.nativeDraggable&&u(document,"dragover",At);var n=this.options;t||X(it,n.dragClass,!1),X(it,n.ghostClass,!0),Ot.active=this,t&&this._appendGhost(),nt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(B){this._lastX=B.clientX,this._lastY=B.clientY,$t();for(var t=document.elementFromPoint(B.clientX,B.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(B.clientX,B.clientY))!==e;)e=t;if(it.parentNode[tt]._isOutsideThisEl(t),e)do{if(e[tt]){if(e[tt]._onDragOver({clientX:B.clientX,clientY:B.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Tt()}},_onTouchMove:function(t){if(F){var e=this.options,n=e.fallbackTolerance,i=e.fallbackOffset,o=t.touches?t.touches[0]:t,a=at&&g(at),s=at&&a&&a.a,r=at&&a&&a.d,l=xt&&j&&y(j),c=(o.clientX-F.clientX+i.x)/(s||1)+(l?l[0]-bt[0]:0)/(s||1),d=(o.clientY-F.clientY+i.y)/(r||1)+(l?l[1]-bt[1]:0)/(r||1),u=t.touches?"translate3d("+c+"px,"+d+"px,0)":"translate("+c+"px,"+d+"px)";if(!Ot.active&&!R){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))B.right+10||P.clientX<=B.right&&P.clientY>B.bottom&&P.clientX>=B.left:P.clientX>B.right&&P.clientY>B.top||P.clientX<=B.right&&P.clientY>B.bottom+10)||m.animated)){if(l.parentNode===r){o=G(l);var g,v,b,y=it.parentNode!==r,w=(T=it.animated&&it.toRect||i,k=l.animated&&l.toRect||o,O=(A=s)?T.left:T.top,M=A?T.right:T.bottom,N=A?T.width:T.height,_=A?k.left:k.top,L=A?k.right:k.bottom,z=A?k.width:k.height,!(O===_||M===L||O+N/2===_+z/2)),x=s?"top":"left",E=q(l,null,"top","top")||q(it,null,"top","top"),S=E?E.scrollTop:void 0;if(ht!==l&&(v=o[x],gt=!1,vt=!w&&e.invertSwap||y),0!==(g=function(t,e,n,i,o,a,s,r){var l=i?t.clientY:t.clientX,c=i?n.height:n.width,d=i?n.top:n.left,u=i?n.bottom:n.right,h=!1;if(!s)if(r&&ft'+t+" "+e+''}function ShowSystemMsg(t,e,n){var i=$(".modal.show .sys-messages");i.length||(i=$("form.alert-here .sys-messages")),i.length?i.html(GetModalAlertTmpl(t,e,n)):ShowSystemMsgModal(t,e,n)}function ShowSystemMsgModal(t,e,n){$("#sys-modal-system-message-placeholder").html("");var i='';$("#sys-modal-system-message-placeholder").html(i),$("#sys-modal-system-message").modal({backdrop:"static",keyboard:!0,show:!1}),$("#sys-modal-system-message").on("hidden.bs.modal",function(t){$("#sys-modal-system-message-placeholder").html("")}),$("#sys-modal-system-message").modal("show")}function AjaxEval(data){try{eval(data)}catch(t){t instanceof SyntaxError&&(console.log(data),console.log("Error: JavaScript code eval error",t.message))}}function AjaxDone(t){AjaxEval(t)}function AjaxFail(t,e,n){"error"===e.toLowerCase()&&"not found"===n.toLowerCase()?AjaxEval(t):(console.log("Error: data sending error, page will be reloaded",t,e,n),setTimeout(function(){window.location.reload(!1)},1e3))}function FormToAjax(n){n.submit(function(t){if(n.hasClass("loading"))t.preventDefault();else{n.addClass("loading").addClass("alert-here");var e=n.find("button[type=submit]");e.addClass("progress-bar-striped").addClass("progress-bar-animated"),""!=e.attr("data-target")&&$("#"+e.attr("data-target")).addClass("progress-bar-striped").addClass("progress-bar-animated"),n.find(".sys-messages").html(""),$.ajax({type:"POST",url:n.attr("action"),data:n.serialize()}).done(function(t){FormDataWasChanged=!1,IsDebugMode()&&console.log("done",t),AjaxDone(t)}).fail(function(t,e,n){IsDebugMode()&&console.log("fail",t,e,n),AjaxFail(t.responseText,e,n)}).always(function(){setTimeout(function(){n.removeClass("loading").removeClass("alert-here"),e.removeClass("progress-bar-striped").removeClass("progress-bar-animated"),""!=e.attr("data-target")&&$("#"+e.attr("data-target")).removeClass("progress-bar-striped").removeClass("progress-bar-animated")},100)}),t.preventDefault()}});var t=n.find("button[type=submit]");""!=t.attr("data-target")&&$("#"+t.attr("data-target")).click(function(){t.click()}),n.hasClass("prev-data-lost")&&n.find("input, textarea, select").on("input",function(){FormDataWasChanged||$(this).hasClass("ignore-lost-data")||(FormDataWasChanged=!0)})}function PreventDataLost(){FormDataWasChanged=FormDataWasChanged||!0}function FormDataIsChanged(){return FormDataWasChanged}function HtmlDecode(t){return(new DOMParser).parseFromString(t,"text/html").documentElement.textContent}function HtmlFixEditorHtml(t){return newValue=t,newValue=newValue.replace(/ /gi,""),newValue}function AllFormsToAjax(){$("form").each(function(){FormToAjax($(this))})}function BindWindowBeforeUnload(){$(window).bind("beforeunload",function(){if(FormDataWasChanged)return"Some data was changed and not saved. Are you sure want to leave page?"})}function MakeTextAreasAutoSized(){autosize($("textarea.autosize"))}function MakeTextAreasWysiwyg(){$("textarea.wysiwyg").each(function(){var e=$(this)[0],t=e.id,n=e.name,i=e.innerHTML;$(e).wrap('
').remove();var o=document.getElementById(t+"_wysiwyg");o.id=t;var a=window.pell.init({element:o,onChange:function(t){e.innerHTML=HtmlFixEditorHtml(t),$(e).val(HtmlFixEditorHtml(t)),FormDataWasChanged=FormDataWasChanged||!0},defaultParagraphSeparator:"p",styleWithCSS:!1,actions:["paragraph","heading1","heading2","bold","italic","underline","strikethrough","ulist","olist","link",{name:"htmlcode",icon:"HTML",title:"HTML Source",result:function(t,e,n){var i=$(t),o=$(e),a=$(n);if(a.hasClass("pell-button-html-pressed")){a.removeClass("pell-button-html-pressed"),i.removeClass("pell-html-mode"),i.find(".pell-actionbar .pell-button").prop("disabled",!1);var s=i.find("textarea.form-control").val();e.innerHTML=HtmlFixEditorHtml(s),$(e).val(HtmlFixEditorHtml(s)),setTimeout(function(){o.focus()},0)}else a.addClass("pell-button-html-pressed"),i.addClass("pell-html-mode"),i.find(".pell-actionbar .pell-button").prop("disabled",!0),a.prop("disabled",!1),setTimeout(function(){i.find("textarea.form-control").focus()},0)}}],classes:{actionbar:"pell-actionbar",button:"pell-button",content:"pell-content",selected:"pell-button-selected"}});a.onfocusin=function(){$(o).addClass("focused")},a.onfocusout=function(){$(o).find(".pell-actionbar button.pell-button-selected").removeClass("pell-button-selected"),$(o).removeClass("focused")},$(o).append(''),e=document.getElementById(t+"_wysiwyg"),$(e).on("input",function(){FormDataWasChanged=FormDataWasChanged||!0}),e.innerHTML=HtmlFixEditorHtml(HtmlDecode(i)),$(e).val(HtmlFixEditorHtml(HtmlDecode(i))),a.content.innerHTML=HtmlFixEditorHtml(HtmlDecode(i))})}function MakeTextAreasTmplEditor(){var i=!0;$("textarea.tmpl-editor").each(function(){var e=$(this)[0],t=$(this).data("emode"),n="text/html";"js"==t?n="javascript":"css"==t&&(n="css"),CodeMirror.fromTextArea(e,{lineNumbers:!0,lineWrapping:!0,viewportMargin:1/0,indentWithTabs:!0,indentUnit:4,tabSize:4,mode:n}).on("change",function(t){e.value=t.getValue(),i||(FormDataWasChanged=FormDataWasChanged||!0)})}),i=!1}function MakeTextAreasNotReactOnTab(){$("textarea.use-tab-key").each(function(){$(this).keydown(function(t){if(9===t.keyCode){var e=this.selectionStart,n=this.selectionEnd,i=$(this),o=i.val();i.val(o.substring(0,e)+"\t"+o.substring(n)),this.selectionStart=this.selectionEnd=e+1,t.preventDefault(),FormDataWasChanged=FormDataWasChanged||!0}})})}function Initialize(){"function"==typeof $?(AllFormsToAjax(),BindWindowBeforeUnload(),MakeTextAreasAutoSized(),MakeTextAreasWysiwyg(),MakeTextAreasTmplEditor(),MakeTextAreasNotReactOnTab()):console.log("Error: jQuery is not loaded!")}return window.addEventListener?window.addEventListener("load",Initialize,!1):window.attachEvent&&window.attachEvent("onload",Initialize),{ShowMsgSuccess:function(t,e){ShowSystemMsg(t,e,!1)},ShowMsgError:function(t,e){ShowSystemMsg(t,e,!0)},FormDataWasChanged:function(){PreventDataLost()},ModalUserProfile:function(){var t='';$("#sys-modal-user-settings-placeholder").html(t),$("#sys-modal-user-settings").modal({backdrop:"static",keyboard:!1,show:!1}),$("#sys-modal-user-settings").on("hidden.bs.modal",function(t){$("#sys-modal-user-settings-placeholder").html("")}),FormToAjax($("#sys-modal-user-settings form")),$("#sys-modal-user-settings").modal("show")},ShopProductsAdd:function(){var selText=$("#lbl_attributes option:selected").text(),selValue=$("#lbl_attributes").val();"0"!=selValue&&($("#lbl_attributes")[0].selectedIndex=0,$("#lbl_attributes").selectpicker("refresh"),0<$("#prod_attr_"+selValue).length||($("#list").append('
'+selText+'
'),PreventDataLost(),$.ajax({type:"POST",url:"/cp/",data:{action:"shop-get-attribute-values",id:selValue}}).done(function(data){try{eval(data)}catch(t){t instanceof SyntaxError&&(console.log(data),console.log("Error: JavaScript code eval error",t.message))}}).fail(function(xhr,status,error){$("#prod_attr_"+selValue).remove();try{eval(xhr.responseText)}catch(t){t instanceof SyntaxError&&(console.log(xhr.responseText),console.log("Error: JavaScript code eval error",t.message))}})))},ShopProductsRemove:function(t){$(t).parent().parent().remove(),PreventDataLost()},ShopAttributesAdd:function(){$("#list").append('
'),PreventDataLost(),setTimeout(function(){$("#list input").last().focus()},100)},ShopAttributesRemove:function(t){$(t).parent().remove(),PreventDataLost()},ShopProductsUploadImage:function(action_name,product_id,input_id){var file_el=$("#"+input_id)[0];if(file_el.files&&!(file_el.files.length<=0)){$("#img-upload-block input").prop("disabled",!0),$("#upload-msg").css("display","block");var fd=new FormData;fd.append("action",action_name),fd.append("id",product_id),fd.append("count",file_el.files.length);for(var i=0;i