1(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"){module.exports=e($||require("jquery"))}else{e(jQuery)}})(function(W){"use strict";var a="styler",i={idSuffix:"-styler",filePlaceholder:"Файл не вÑбÑан",fileBrowse:"ÐбзоÑ...",fileNumber:"ÐÑбÑано Ñайлов: %s",selectPlaceholder:"ÐÑбеÑиÑе...",selectSearch:false,selectSearchIgnore:undefined,selectSearchLimit:10,selectSearchNotFound:"Совпадений не найдено",selectSearchPlaceholder:"ÐоиÑк...",selectVisibleOptions:0,selectSmartPositioning:true,locale:"ru",locales:{en:{filePlaceholder:"No file selected",fileBrowse:"Browse...",fileNumber:"Selected files: %s",selectPlaceholder:"Select...",selectSearchNotFound:"No matches found",selectSearchPlaceholder:"Search..."}},onSelectOpened:function(){},onSelectClosed:function(){},onFormStyled:function(){}};function l(e,t){this.element=e;this.options=W.extend({},i,t);var s=this.options.locale;if(this.options.locales[s]!==undefined){W.extend(this.options,this.options.locales[s])}this.init()}l.prototype={init:function(){var I=W(this.element);var K=this.options;var O=navigator.userAgent.match(/(iPad|iPhone|iPod)/i)&&!navigator.userAgent.match(/(Windows\sPhone)/i)?true:false;var s=navigator.userAgent.match(/Android/i)&&!navigator.userAgent.match(/(Windows\sPhone)/i)?true:false;function M(){if(I.attr("id")!==undefined&&I.attr("id")!==""){this.id=I.attr("id")+K.idSuffix}this.title=I.attr("title");this.classes=I.attr("class");this.data=I.data()}if(I.is(":checkbox")){var e=function(){var e=new M;var t=W('<div class="jq-checkbox"><div class="jq-checkbox__div"></div></div>').attr({id:e.id,title:e.title}).addClass(e.classes).data(e.data);I.after(t).prependTo(t);if(I.is(":checked"))t.addClass("checked");if(I.is(":disabled"))t.addClass("disabled");t.click(function(e){e.preventDefault();I.triggerHandler("click");if(!t.is(".disabled")){if(I.is(":checked")){I.prop("checked",false);t.removeClass("checked")}else{I.prop("checked",true);t.addClass("checked")}I.focus().change()}});I.closest("label").add('label[for="'+I.attr("id")+'"]').on("click.styler",function(e){if(!W(e.target).is("a")&&!W(e.target).closest(t).length){t.triggerHandler("click");e.preventDefault()}});I.on("change.styler",function(){if(I.is(":checked"))t.addClass("checked");else t.removeClass("checked")}).on("keydown.styler",function(e){if(e.which==32)t.click()}).on("focus.styler",function(){if(!t.is(".disabled"))t.addClass("focused")}).on("blur.styler",function(){t.removeClass("focused")})};e();I.on("refresh",function(){I.closest("label").add('label[for="'+I.attr("id")+'"]').off(".styler");I.off(".styler").parent().before(I).remove();e()})}else if(I.is(":radio")){var t=function(){var e=new M;var s=W('<div class="jq-radio"><div class="jq-radio__div"></div></div>').attr({id:e.id,title:e.title}).addClass(e.classes).data(e.data);I.after(s).prependTo(s);if(I.is(":checked"))s.addClass("checked");if(I.is(":disabled"))s.addClass("disabled");W.fn.commonParents=function(){var e=this;return e.first().parents().filter(function(){return W(this).find(e).length===e.length})};W.fn.commonParent=function(){return W(this).commonParents().first()};s.click(function(e){e.preventDefault();I.triggerHandler("click");if(!s.is(".disabled")){var t=W('input[name="'+I.attr("name")+'"]');t.commonParent().find(t).prop("checked",false).parent().removeClass("checked");I.prop("checked",true).parent().addClass("checked");I.focus().change()}});I.closest("label").add('label[for="'+I.attr("id")+'"]').on("click.styler",function(e){if(!W(e.target).is("a")&&!W(e.target).closest(s).length){s.triggerHandler("click");e.preventDefault()}});I.on("change.styler",function(){I.parent().addClass("checked")}).on("focus.styler",function(){if(!s.is(".disabled"))s.addClass("focused")}).on("blur.styler",function(){s.removeClass("focused")})};t();I.on("refresh",function(){I.closest("label").add('label[for="'+I.attr("id")+'"]').off(".styler");I.off(".styler").parent().before(I).remove();t()})}else if(I.is(":file")){var i=function(){var e=new M;var i=I.data("placeholder");if(i===undefined)i=K.filePlaceholder;var t=I.data("browse");if(t===undefined||t==="")t=K.fileBrowse;var l=W('<div class="jq-file">'+'<div class="jq-file__name">'+i+"</div>"+'<div class="jq-file__browse">'+t+"</div>"+"</div>").attr({id:e.id,title:e.title}).addClass(e.classes).data(e.data);I.after(l).appendTo(l);if(I.is(":disabled"))l.addClass("disabled");var s=I.val();var a=W("div.jq-file__name",l);if(s)a.text(s.replace(/.+[\\\/]/,""));I.on("change.styler",function(){var e=I.val();if(I.is("[multiple]")){e="";var t=I[0].files.length;if(t>0){var s=I.data("number");if(s===undefined)s=K.fileNumber;s=s.replace("%s",t);e=s}}a.text(e.replace(/.+[\\\/]/,""));if(e===""){a.text(i);l.removeClass("changed")}else{l.addClass("changed")}}).on("focus.styler",function(){l.addClass("focused")}).on("blur.styler",function(){l.removeClass("focused")}).on("click.styler",function(){l.removeClass("focused")})};i();I.on("refresh",function(){I.off(".styler").parent().before(I).remove();i()})}else if(I.is('input[type="number"]')){var l=function(){var e=new M;var t=W('<div class="jq-number">'+'<div class="jq-number__spin minus"></div>'+'<div class="jq-number__spin plus"></div>'+"</div>").attr({id:e.id,title:e.title}).addClass(e.classes).data(e.data);I.after(t).prependTo(t).wrap('<div class="jq-number__field"></div>');if(I.is(":disabled"))t.addClass("disabled");var a,r,o,s=null,i=null;if(I.attr("min")!==undefined)a=I.attr("min");
1if(I.attr("max")!==undefined)r=I.attr("max");if(I.attr("step")!==undefined&&W.isNumeric(I.attr("step")))o=Number(I.attr("step"));else o=Number(1);var l=function(e){var t=I.val(),s;if(!W.isNumeric(t)){t=0;I.val("0")}if(e.is(".minus")){s=Number(t)-o}else if(e.is(".plus")){s=Number(t)+o}var i=(o.toString().split(".")[1]||[]).length;if(i>0){var l="1";while(l.length<=i)l=l+"0";s=Math.round(s*l)/l}if(W.isNumeric(a)&&W.isNumeric(r)){if(s>=a&&s<=r)I.val(s)}else if(W.isNumeric(a)&&!W.isNumeric(r)){if(s>=a)I.val(s)}else if(!W.isNumeric(a)&&W.isNumeric(r)){if(s<=r)I.val(s)}else{I.val(s)}};if(!t.is(".disabled")){t.on("mousedown","div.jq-number__spin",function(){var e=W(this);l(e);s=setTimeout(function(){i=setInterval(function(){l(e)},40)},350)}).on("mouseup mouseout","div.jq-number__spin",function(){clearTimeout(s);clearInterval(i)}).on("mouseup","div.jq-number__spin",function(){I.change().trigger("input")});I.on("focus.styler",function(){t.addClass("focused")}).on("blur.styler",function(){t.removeClass("focused")})}};l();I.on("refresh",function(){I.off(".styler").closest(".jq-number").before(I).remove();l()})}else if(I.is("select")){var a=function(){function P(t){var s=t.prop("scrollHeight")-t.outerHeight(),i=null,l=null;t.off("mousewheel DOMMouseScroll").on("mousewheel DOMMouseScroll",function(e){i=e.originalEvent.detail<0||e.originalEvent.wheelDelta>0?1:-1;l=t.scrollTop();if(l>=s&&i<0||l<=0&&i>
10){e.stopPropagation();e.preventDefault()}})}var H=W("option",I);var A="";function D(){for(var e=0;e<H.length;e++){var t=H.eq(e);var s="",i="",l="",a="",r="",o="",d="",n="",c="";var f="disabled";var u="selected sel disabled";if(t.prop("selected"))i="selected sel";if(t.is(":disabled"))i=f;if(t.is(":selected:disabled"))i=u;if(t.attr("id")!==undefined&&t.attr("id")!=="")a=' id="'+t.attr("id")+K.idSuffix+'"';if(t.attr("title")!==undefined&&H.attr("title")!=="")r=' title="'+t.attr("title")+'"';if(t.attr("class")!==undefined){d=" "+t.attr("class");c=' data-jqfs-class="'+t.attr("class")+'"'}var h=t.data();for(var v in h){if(h[v]!=="")o+=" data-"+v+'="'+h[v]+'"'}if(i+d!=="")l=' class="'+i+d+'"';s="<li"+c+o+l+r+a+">"+t.html()+"</li>";if(t.parent().is("optgroup")){if(t.parent().attr("class")!==undefined)n=" "+t.parent().attr("class");s="<li"+c+o+' class="'+i+d+" option"+n+'"'+r+a+">"+t.html()+"</li>";if(t.is(":first-child")){s='<li class="optgroup'+n+'">'+t.parent().attr("label")+"</li>"+s}}A+=s}}function e(){var e=new M;var t="";var s=I.data("placeholder");var i=I.data("search");var l=I.data("search-limit");var n=I.data("search-ignore");var a=I.data("search-not-found");var r=I.data("search-placeholder");var c=I.data("smart-positioning");if(s===undefined)s=K.selectPlaceholder;if(i===undefined||i==="")i=K.selectSearch;if(l===undefined||l==="")l=K.selectSearchLimit;if(n===undefined||n==="")n=K.selectSearchIgnore;if(a===undefined||a==="")a=K.selectSearchNotFound;if(r===undefined)r=K.selectSearchPlaceholder;if(c===undefined||c==="")c=K.selectSmartPositioning;var f=W('<div class="jq-selectbox jqselect">'+'<div class="jq-selectbox__select">'+'<div class="jq-selectbox__select-text"></div>'+'<div class="jq-selectbox__trigger">'+'<div class="jq-selectbox__trigger-arrow"></div></div>'+"</div>"+"</div>").attr({id:e.id,title:e.title}).addClass(e.classes).data(e.data);I.after(f).prependTo(f);var u=f.css("z-index");u=u>0?u:1;var o=W("div.jq-selectbox__select",f);var d=W("div.jq-selectbox__select-text",f);var h=H.filter(":selected");D();if(i)t='<div class="jq-selectbox__search"><input type="search" autocomplete="off" placeholder="'+r+'"></div>'+'<div class="jq-selectbox__not-found">'+a+"</div>";var v=W('<div class="jq-selectbox__dropdown">'+t+"<ul>"+A+"</ul>"+"</div>");f.append(v);var p=W("ul",v);var m=W("li",v);var g=W("input",v);var b=W("div.jq-selectbox__not-found",v).hide();if(m.length<l)g.parent().hide();if(H.first().text()===""&&H.first().is(":selected")&&s!==false){d.text(s).addClass("placeholder")}else{d.text(h.text())}var C=0,x=0;m.css({display:"inline-block"});m.each(function(){var e=W(this);if(e.innerWidth()>C){C=e.innerWidth();x=e.width()}});m.css({display:""});if(d.is(".placeholder")&&d.width()>C){d.width(d.width())}else{var y=f.clone().appendTo("body").width("auto");var w=y.outerWidth();y.remove();if(w==f.outerWidth()){d.width(x)}}if(C>f.width())v.width(C);if(H.first().text()===""&&I.data("placeholder")!==""){m.first().hide()}var q=f.outerHeight(true);var _=g.parent().outerHeight(true)||0;var j=p.css("max-height");var k=m.filter(".selected");if(k.length<1)m.first().addClass("selected sel");if(m.data("li-height")===undefined){var S=m.outerHeight();if(s!==false)S=m.eq(1).outerHeight();m.data("li-height",S)}var T=v.css("top");if(v.css("left")=="auto")v.css({left:0});if(v.css("top")=="auto"){v.css({top:q});T=q}v.hide();if(k.length){if(H.first().text()!=h.text()){f.addClass("changed")}f.data("jqfs-class",k.data("jqfs-class"));f.addClass(k.data("jqfs-class"))}if(I.is(":disabled")){f.addClass("disabled");return false}o.click(function(){if(W("div.jq-selectbox").filter(".opened").length){K.onSelectClosed.call(W("div.jq-selectbox").filter(".opened"))}I.focus();if(O)return;var t=W(window);var s=m.data("li-height");var i=f.offset().top;var l=t.height()-q-(i-t.scrollTop());var e=I.data("visible-options");if(e===undefined||e==="")e=K.selectVisibleOptions;var a=s*5;var r=s*e;if(e>0&&e<6)a=r;if(e===0)r="auto";var o=function(){v.height("auto").css({bottom:"auto",top:T});var e=function(){p.css("max-height",Math.floor((l-20-_)/s)*s)};e();p.css("max-height",r);if(j!="none"){p.css("max-height",j)}if(l<v.outerHeight()+20){e()}};var d=function(){v.height("auto").css({top:"auto",bottom:T});var e=function(){p.css("max-height",Math.floor((i-t.scrollTop()-20-_)/s)*s)};e();p.css("max-height",r);if(j!="none"){p.css("max-height",j)}if(i-t.scrollTop()-20<v.outerHeight()+20){e()}};if(c===true||c===1){if(l>a+_+20){o();f.removeClass("dropup").addClass("dropdown")}else{d();f.removeClass("dropdown").addClass("dropup")}}else if(c===false||c===0){if(l>a+_+20){o();f.removeClass("dropup").addClass("dropdown")}}else{v.height("auto").css({bottom:"auto",top:T});p.css("max-height",r);if(j!="none"){p.css("max-height",j)}}if(f.offset().left+v.outerWidth()>t.width()){v.css({left:"auto",right:0})}W("div.jqselect").css({zIndex:u-1}).removeClass("opened");f.css({zIndex:u});if(v.is(":hidden")){W("div.jq-selectbox__dropdown:visible").hide();v.show();f.addClass("opened focused");K.onSelectOpened.call(f)}else{v.hide();f.removeClass("opened dropup dropdown");
1if(W("div.jq-selectbox").filter(".opened").length){K.onSelectClosed.call(f)}}if(g.length){g.val("").keyup();b.hide();g.keyup(function(){var s=W(this).val();m.each(function(){var e=W(this).html(),t;if(n!==undefined&&n!==""){t=n.exec(e);if(t){e=e.replace(t,"")}}if(!e.match(new RegExp("^"+s+".*","i"))){W(this).hide()}else{W(this).show()}});if(H.first().text()===""&&I.data("placeholder")!==""){m.first().hide()}if(m.filter(":visible").length<1){b.show()}else{b.hide()}})}if(m.filter(".selected").length){if(I.val()===""){p.scrollTop(0)}else{if(p.innerHeight()/s%2!==0)s=s/2;p.scrollTop(p.scrollTop()+m.filter(".selected").position().top-p.innerHeight()/2+s)}}P(p)});m.hover(function(){W(this).siblings().removeClass("selected")});var N=m.filter(".selected").text();m.filter(":not(.disabled):not(.optgroup)").click(function(){I.focus();var e=W(this);var t=e.text();if(!e.is(".selected")){var s=e.index();s-=e.prevAll(".optgroup").length;e.addClass("selected sel").siblings().removeClass("selected sel");H.prop("selected",false).eq(s).prop("selected",true);N=t;d.text(t);if(f.data("jqfs-class"))f.removeClass(f.data("jqfs-class"));f.data("jqfs-class",e.data("jqfs-class"));f.addClass(e.data("jqfs-class"));I.change()}v.hide();f.removeClass("opened dropup dropdown");K.onSelectClosed.call(f)});v.mouseout(function(){W("li.sel",v).addClass("selected")});I.on("change.styler",function(){d.text(H.filter(":selected").text()).removeClass("placeholder");m.removeClass("selected sel").not(".optgroup").eq(I[0].selectedIndex).addClass("selected sel");if(H.first().text()!=m.filter(".selected").text()){f.addClass("changed")}else{f.removeClass("changed")}}).on("focus.styler",function(){f.addClass("focused");W("div.jqselect").not(".focused").removeClass("opened dropup dropdown").find("div.jq-selectbox__dropdown").hide()}).on("blur.styler",function(){f.removeClass("focused")}).on("keydown.styler keyup.styler",function(e){var t=m.data("li-height");if(I.val()===""){d.text(s).addClass("placeholder")}else{d.text(H.filter(":selected").text())}m.removeClass("selected sel").not(".optgroup").eq(I[0].selectedIndex).addClass("selected sel");if(e.which==38||e.which==37||e.which==33||e.which==36){if(I.val()===""){p.scrollTop(0)}else{p.scrollTop(p.scrollTop()+m.filter(".selected").position().top)}}if(e.which==40||e.which==39||e.which==34||e.which==35){p.scrollTop(p.scrollTop()+m.filter(".selected").position().top-p.innerHeight()+t)}if(e.which==13){e.preventDefault();v.hide();f.removeClass("opened dropup dropdown");K.onSelectClosed.call(f)}}).on("keydown.styler",function(e){if(e.which==32){e.preventDefault();o.click()}});if(!F.registered){W(document).on("click",F);F.registered=true}}function t(){var e=new M;var t=W('<div class="jq-select-multiple jqselect"></div>').attr({id:e.id,title:e.title}).addClass(e.classes).data(e.data);I.after(t);D();t.append("<ul>"+A+"</ul>");var s=W("ul",t);var l=W("li",t);var i=I.attr("size");var a=s.outerHeight();var r=l.outerHeight();if(i!==undefined&&i>0){s.css({height:r*i})}else{s.css({height:r*4})}if(a>t.height()){s.css("overflowY","scroll");P(s);if(l.filter(".selected").length){s.scrollTop(s.scrollTop()+l.filter(".selected").position().top)}}I.prependTo(t);if(I.is(":disabled")){t.addClass("disabled");H.each(function(){if(W(this).is(":selected"))l.eq(W(this).index()).addClass("selected")})}else{l.filter(":not(.disabled):not(.optgroup)").click(function(e){I.focus();var t=W(this);if(!e.ctrlKey&&!e.metaKey)t.addClass("selected");if(!e.shiftKey)t.addClass("first");
1if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey)t.siblings().removeClass("selected first");if(e.ctrlKey||e.metaKey){if(t.is(".selected"))t.removeClass("selected first");else t.addClass("selected first");t.siblings().removeClass("first")}if(e.shiftKey){var s=false,i=false;t.siblings().removeClass("selected").siblings(".first").addClass("selected");t.prevAll().each(function(){if(W(this).is(".first"))s=true});t.nextAll().each(function(){if(W(this).is(".first"))i=true});if(s){t.prevAll().each(function(){if(W(this).is(".selected"))return false;else W(this).not(".disabled, .optgroup").addClass("selected")})}if(i){t.nextAll().each(function(){if(W(this).is(".selected"))return false;else W(this).not(".disabled, .optgroup").addClass("selected")})}if(l.filter(".selected").length==1)t.addClass("first")}H.prop("selected",false);l.filter(".selected").each(function(){var e=W(this);var t=e.index();if(e.is(".option"))t-=e.prevAll(".optgroup").length;H.eq(t).prop("selected",true)});I.change()});H.each(function(e){W(this).data("optionIndex",e)});I.on("change.styler",function(){l.removeClass("selected");var t=[];H.filter(":selected").each(function(){t.push(W(this).data("optionIndex"))});l.not(".optgroup").filter(function(e){return W.inArray(e,t)>-1}).addClass("selected")}).on("focus.styler",function(){t.addClass("focused")}).on("blur.styler",function(){t.removeClass("focused")});if(a>t.height()){I.on("keydown.styler",function(e){if(e.which==38||e.which==37||e.which==33){s.scrollTop(s.scrollTop()+l.filter(".selected").position().top-r)}if(e.which==40||e.which==39||e.which==34){s.scrollTop(s.scrollTop()+l.filter(".selected:last").position().top-s.innerHeight()+r*2)}})}}}if(I.is("[multiple]")){if(s||O)return;t()}else{e()}};a();I.on("refresh",function(){I.off(".styler").parent().before(I).remove();a()})}else if(I.is(":reset")){I.on("click",function(){setTimeout(function(){I.closest("form").find("input, select").trigger("refresh")},1)})}},destroy:function(){var e=W(this.element);if(e.is(":checkbox")||e.is(":radio")){e.removeData("_"+a).off(".styler refresh").removeAttr("style").parent().before(e).remove();e.closest("label").add('label[for="'+e.attr("id")+'"]').off(".styler")}else if(e.is('input[type="number"]')){e.removeData("_"+a).off(".styler refresh").closest(".jq-number").before(e).remove()}else if(e.is(":file")||e.is("select")){e.removeData("_"+a).off(".styler refresh").removeAttr("style").parent().before(e).remove()}}};W.fn[a]=function(t){var s=arguments;if(t===undefined||typeof t==="object"){this.each(function(){if(!W.data(this,"_"+a)){W.data(this,"_"+a,new l(this,t))}}).promise().done(function(){var e=W(this[0]).data("_"+a);if(e)e.options.onFormStyled.call()});return this}else if(typeof t==="string"&&t[0]!=="_"&&t!=="init"){var i;this.each(function(){var e=W.data(this,"_"+a);if(e instanceof l&&typeof e[t]==="function"){i=e[t].apply(e,Array.prototype.slice.call(s,1))}});return i!==undefined?i:this}};function F(e){if(!W(e.target).parents().hasClass("jq-selectbox")&&e.target.nodeName!="OPTION"){if(W("div.jq-selectbox.opened").length){var t=W("div.jq-selectbox.opened"),s=W("div.jq-selectbox__search input",t),i=W("div.jq-selectbox__dropdown",t),l=t.find("select").data("_"+a).options;l.onSelectClosed.call(t);if(s.length)s.val("").keyup();i.hide().find("li.sel").addClass("selected");t.removeClass("focused opened dropup dropdown")}}}F.registered=false});
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.