-
Notifications
You must be signed in to change notification settings - Fork 1
/
sg.min.js
71 lines (71 loc) · 34.9 KB
/
sg.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
(function(k,f){function x(b){function r(ca,b){z.add(M,ca,b)}function g(b,d){z.rm(M,b,d)}function v(b,d){b&&z.fire(M,b,d)}function e(){return{current:V.curr,recent:V.rcnt,previous:V.prev,value:G,data:P,fullData:W,focused:Q(S),method:ia,selected:Q(fa),result:na(fa),itemData:da(fa),hovered:Q(X),items:d.mkarr(Z)}}function y(b){b=String(b);var d=b.length,a=!0;if(p.valMin&&d<p.valMin||p.valMax&&d>p.valMax)a=!1;d=p.valFilter;a&&d&&(a=d instanceof RegExp?d.test(b):U(d)?d(b):d===b);return a}function A(b,a){y(b)?
(v(u.passFilter,[b]),ra.send(b,function(b,ca){if(a)a("success",b,ca);else if(ca===D.value){var r=p.dataGet;G=ca;P=(W=b)&&U(r)?r.call(M,W):W;r=!1;if(!W||!P||!P.length||p.min&&p.min>P.length)r=!0;if(r)v(u.rejectData,[b,ca]),C(),$();else{v(u.acceptData,[b,ca]);d.empty(ja);Z.length=0;E();v(u.render,[P,G]);var r=p.max?Math.min(P.length,p.max):P.length,g=0,e,R,c=U(p.item)?p.item:x.tmpl(p.item);p.itemExtraData&&d.isObj(p.itemExtraData)&&(R=p.itemExtraData);for(;g<r;g++){e=P[g];e={itemData:e,fullData:W,index:g,
value:G};R&&d.ext(e,R);(e=c.call(M,e))&&"string"===typeof e&&(e=d.cre(e));if(!e||!e.nodeType)break;z.add(e,"click",m);z.add(e,"mouseenter",K);z.add(e,"mouseleave",l);z.add(e,"mousedown",n);z.add(e,"mouseup",Aa);z.add(e,"mousemove",Ba);Z.push(e);ja.appendChild(e)}v(u.renderEnd,[Z,P,G]);sa()}}},function(b,d){a?a("error",b,d):d===D.value&&(C(),$())})):(v(u.failFilter,[b]),a?a("error","filter",b):(C(),$()))}function C(){W=P=G=null;E()}function E(){X=S=fa=ia=null;ka=!1}function f(b){b=b.currentTarget;
p.mousePreview?(b=Q(b),oa(b),Ca(b)):(S=null,Da(b))}function K(b){ka&&f(b)}function l(b){}function n(){}function Aa(){}function Ba(b){ka||f(b);ka=!0}function m(b){b.stopPropagation();b.preventDefault();b=Q(b.currentTarget);-1!=b&&(ia="mouse",ta(b))}function q(){if(/^(?:relative|absolute|fixed)$/i.test(d.css(H,"position"))){var b=ga({},D.getBoundingClientRect());b.left+=k.pageXOffset+(p.shiftX||0);b.top+=k.pageYOffset+D.offsetHeight+(p.shiftY||0);d.css(H,"left",b.left+"px");d.css(H,"top",b.top+"px")}}
function O(b){b=b?"on":"off";d.arrEach(["autocomplete","autocapitalize","autocorrect"],function(a){d.attr(D,a,b)});ea&&(a(ea),ea=null);d.hasFocus(D)&&(D.blur(),ea=s(function(){(!t.activeElement||!/^(?:a|input|textarea|select|button|)$/i.test(t.activeElement.tagName)||d.hasFocus(D))&&D.focus();ea&&(a(ea),ea=null)},25))}function L(){a(la);la=null}function w(){la=s(function(){ua?w():(a(la),la=null,$())},50)}function N(){ua=!0}function J(){ua=!1;z.fire(D,"focus")}function B(){a(pa);pa=null}function I(b){if(229!=
b.keyCode){var d=b.keyCode,a=b.shiftKey,r=!b.ctrlKey&&!a;switch(!0){case r&&(38==d||40==d)&&!aa():b.preventDefault()}if(!pa){pa=s(B,p.keynavDelay);a=!1;switch(!0){case 13==d:!aa()&&S&&(ia="keyboard",d=ta(S,!0),(!p.autoSubmit||!1===d)&&b.preventDefault());break;case 27==d:aa()||($(),qa(),s(qa,15),b.preventDefault());break;case r&&38==d:aa()||(va(-1),a=!0);break;case r&&39==d:!aa()&&(null!=W&&null!=P&&null!=G&&S&&na(S)!==G)&&wa(na(S));break;case r&&40==d:aa()?null!=W&&(null!=P&&null!=G)&&S?(sa(),a=
!0):wa():(va(1),a=!0)}a&&p.preview&&(S?Ca(Q(S)):qa())}}}function Ea(b){B()}function Q(b){var a;"number"===typeof b?a=b:b&&b.nodeType&&(a=d.indexOf(Z,b));return"number"===typeof a&&!isNaN(a)?a:-1}function xa(b){var a;if("number"===typeof b)a=Z[b];else if(b&&b.nodeType&&~(b=d.indexOf(Z,b)))a=Z[b];return a||null}function da(b){b=Q(b);return P&&null!=P[b]?P[b]:null}function Da(b){var a=xa(b),r=p.hover;!X&&!a||X===a||(r&&("string"===typeof r?(X&&d.rmCls(X,r),a&&d.addCls(a,r)):U(r)&&(X&&(b=Q(X),r.call(M,
!1,X,da(b),b,G)),a&&(b=Q(a),r.call(M,!0,a,da(b),b,G)))),X=a)}function oa(b,d){b=Q(b);var a=xa(b),r=da(b);Da(b);v(u.focus,[r,b,G]);S=a;v(u.focusEnd,[r,b,G])}function va(b){var d=S||X,a=d?Q(d):-1,d=Z.length-1;b=a+b;-1>b?b=d:b>d&&(b=-1);oa(b)}function na(b){b=Q(b);var d=da(b);return null!=d?p.result.call(M,d,b,W,G):null}function Ka(b){b=Q(b);(b=na(b))&&V.setIgnore(b);return b}function Ca(b){b=Q(b);var d=da(b);b=null!=d?p.result(d,b,W,G):G;V.setIgnore(b)}function qa(){V.setIgnore(G);D.value=G}function ta(b,
d){b=Q(b);fa=-1==b?null:xa(b);oa(b);da(b);var a=p.select,r,g=!1;v(u.select,e());$();qa();U(a)&&(r=a.call(M,e()));if(!1!==r&&(Ka(b),ba&&p.autoSubmit))if(d)g=!0;else{var R=!1;t.createEvent?(z.natOne(ba,"submit",function(b){b=b||k.event;R=z.natIsDefaultPrevented(b);z.Event.prototype.preventDefault.call({origEvt:b})}),a=t.createEvent("HTMLEvents"),a.initEvent("submit",!1,!0),ba.dispatchEvent(a)):t.createEventObject&&(a=t.createEventObject(),R=!ba.fireEvent("onsubmit",a));!1===R&&ba.submit()}g?"addEventListener"in
t?z.natOne(ba,"submit",ya):z.natOne(ba,"submit",function(){s(ya,50)}):ya();return r}function ya(){var b=p.unselect;U(b)&&b.call(M,e());v(u.selectEnd,e());fa=ia=null}function wa(b){b?V.fireVal(b,!0):V.fire(!0)}function aa(){var b=!0,a=p.switcher,r=p.switchChecker;a?"string"===typeof a?b=!d.hasCls(H,p.switcher):U(a)&&U(r)&&(b=!r.call(M)):b="none"===d.css(H,"display");return b}function sa(){if(aa()){v(u.open,[G]);var b=p.switcher;b?"string"===typeof b?d.addCls(H,b):U(b)&&b.call(M,!0,H):d.css(H,"display",
"block");p.correction&&q();ka=!1;v(u.openEnd,[G])}}function $(){if(!aa()){v(u.close,[G]);var b=p.switcher;b?"string"===typeof b?d.rmCls(H,b):U(b)&&b(!1,H):d.css(H,"display","none");v(u.closeEnd,[G])}}function Fa(b){b.target!==D&&$()}function za(){q()}function Ga(){ma&&(v(u.enable),z.add(t,"click",Fa),z.add(H,"click",Y),z.add(D,"focus",L),z.add(D,"blur",w),z.add(H,"mousedown",N),z.add(H,"mouseup",J),z.add(D,"keydown",I),z.add(D,"keyup",Ea),p.correction&&z.add(k,"resize",za),O(!1),V.init(),ma=!1,v(u.enableEnd))}
function Ha(){ma||(v(u.disable),$(),V.off(),ra.abortAll(),O(!0),z.rm(t,"click",Fa),z.rm(H,"click",Y),z.rm(D,"focus",L),z.rm(D,"blur",w),z.rm(H,"mousedown",N),z.rm(H,"mouseup",J),z.rm(D,"keydown",I),z.rm(D,"keyup",Ea),p.correction&&za&&z.rm(k,"resize",za),d.empty(ja),Z.length=0,E(),ma=!0,v(u.disableEnd))}function La(b){try{console.log(b.type,arguments)}catch(d){}}function Ma(b){if(null==b)return null;var a={};(function Ja(b,r){null!=b&&(d.isObj(b)?d.objEach(b,function(b,d){Ja(b,(r?r+".":"")+d)}):r&&
(a[r]=b))})(b);return a}function Ia(b,a){var e=arguments.length;if(0==e)return p;if(1==e&&"object"!==typeof b)return d.walker(p,b);"object"!==typeof b&&(e={},e[b]=a,b=e);(e=Ma(b))&&d.objEach(e,function(b,a){var e=d.walker(p,a,b);if(/(?:^on[A-Z])/.test(a.substr(0,3))&&U(b)){var v=a.charAt(2).toLowerCase()+a.slice(3);if(v=u[v])e&&g(v,e),r(v,b)}})}var M=this;if(!(M instanceof x))return new x(b);var z=x.Event,V={run:!1,did:null,prev:null,rcnt:null,curr:null,ignr:null,init:function(){this.run||(this.curr=
this.prev=D.value,this.on())},handler:function(b){var d=this.curr=D.value,a=this.prev;if(b||d!==a){!b&&null==this.ignr&&(this.rcnt=a);this.prev=d;if(b||null==this.ignr||this.ignr!==d)v(u.valueChange,[d,a,this.rcnt]),A(d);this.ignr=null}},fire:function(b){this.off();this.handler(b);this.on()},fireVal:function(b,d){this.off();D.value=b;this.handler(d);this.on()},on:function(){if(!this.run){var b=this;b.run=!0;b.did=F(function(){b.handler()},p.delay);b.handler()}},off:function(){this.run&&(this.run=
!1,c(this.did),this.did=null)},setIgnore:function(b){this.ignr=D.value=b}},ha={c:{},i:0,set:function(b,d){v(u.setCache,[b,d]);p.cchLimit&&this.i+1>=p.cchLimit&&this.flush();this.c[b]=d;this.i++;v(u.setCacheEnd,[b,d,this.i])},get:function(b){v(u.getCache,[b]);var d=this.has(b)?this.c[b]:null;v(u.getCacheEnd,[b,d]);return d},has:function(b){return null!=this.c[b]&&d.hasOwn(this.c,b)},flush:function(){v(u.flushCache);var b=this.c,a;for(a in b)d.hasOwn(b,a)&&delete b[a];this.i=0;v(u.flushCacheEnd)}},
ra={act:[],actVals:{},isAct:function(b){return!arguments.length?!!this.act.length:!!this.actVals[b]&&d.hasOwn(this.actVals,b)},add:function(b,d){var a=this.act,r=p.reqMax||p.ajax.stackSize;r&&(a.length&&a.length>=r)&&this.rm(a[0]);this.actVals[d]=b;return a.push(b)},rm:function(b){if(b){b.abort();var a=d.indexOf(this.act,b);~a&&this.act.splice(a,1);var r=this.actVals;for(a in r)if(r[a]===b){delete r[a];break}return this.act.length}},abortAll:function(){for(var b=this.act,d=this.actVals,a=b.length;a--;)b[a]&&
b[a].abort();b.length=0;for(a in d)delete d[a]},stack:function(){return d.mkarr(this.act)},send:function(b,a,r){if(!b)return!1;var e=this,g,R={},c=p.url,y={query:b};if(p.cch&&ha.has(b))return a&&a(ha.get(b),b),!0;if(this.isAct(b))return v(u.blockRequest,["running",b]),!1;"object"===typeof c?c=d.url(d.objFormat(c,y)):(y.query=h(y.query),c=d.format(c,y));p.ajax&&ga(!0,R,p.ajax);var y={dataType:p.reqDataType,timeout:p.reqTimeout,jsonp:p.callbackParam,scriptCharset:p.scriptCharset,data:p.reqData},A;for(A in y)null!=
y[A]&&(R[A]=y[A]);g=x.Ajax(c,R);g.on("success",function(d,r){v(u.successRequest,[r,b]);v(u.completeRequest,[r,b]);var R=p.dataFilter;U(R)&&(r=R.call(e,r,b));e.rm(g)||v(u.stopRequest,[b]);p.cch&&ha.set(b,r);a&&a(r,b)});g.on("error",function(d,a){v(u.errorRequest,[a,b]);v(u.completeRequest,[a,b]);e.rm(g)||v(u.stopRequest,[b]);r&&r(a,b)});1==e.add(g,b)&&v(u.startRequest,[b]);v(u.sendRequest,[b]);g.send();return!0}},W=null,P=null,G=null,ka=!1,ea,la,pa,p={};b=ga(!0,{},x.opts,b);Ia(b);var D=p.field&&d.$(p.field),
ba=D&&D.form,H=d.$(p.cont),ja=p.list&&H?d.$(p.list,H):H,Z=[],X,S,fa,ua,ma=!0,ia=null;if(!D)throw"options.field not found";if(!H)throw"options.cont not found";if(!ja)throw"options.list not found";p.debug&&d.objEach(u,function(b){r(b,La)});ga(M,{_request:ra,_checker:V,_cache:ha,field:D,form:ba,cont:H,list:ja,show:wa,focus:oa,moveFocus:va,select:ta,open:sa,close:$,isClosed:aa,enable:Ga,disable:Ha,isDisabled:function(){return ma},destroy:function(){v(u.destroy);Ha();p.cch&&ha.flush();g();v(u.destroyEnd);
delete x.instances[M.guid]},on:r,off:g,getState:e,opts:Ia,flushCache:function(){ha.flush()}});M.guid=T++;x.instances[M.guid]=M;p.enabled&&Ga()}var t=k.document,w=Object.prototype,n=w.hasOwnProperty,B=w.toString,I=Array.prototype.slice,N=Array.prototype.forEach,J=Array.prototype.indexOf,m=Array.prototype.map,l=String.prototype.trim,q=Function.prototype.bind,w=Object.keys,h=encodeURIComponent,s=k.setTimeout,F=k.setInterval,a=k.clearTimeout,c=k.clearInterval,g=Date.now||function(){return+new Date},y=
/\s+/,A=/\{(\w*)\}/mg,C=/([-\\()^$.?+*\[\]\{\}])/g,K="SG"+g(),T=1,Y=function(){return!1},O=function(){},L;k.getComputedStyle?L=function(b,d){var a,e=k.getComputedStyle(b,null);e&&(a=e.getPropertyValue(d)||e[d]);return a}:t.documentElement.currentStyle&&(L=function(b,d){var a=b.currentStyle&&b.currentStyle[d],e=b.style;null==a&&(e&&e[d])&&(a=e[d]);return""===a?"auto":a});var d={hasOwn:function(b,d){return n.call(b,d)},type:function(b){},isArr:Array.isArray||function(b){return"[object Array]"===B.call(b)},
isFn:function(b){return"[object Function]"===B.call(b)},isWin:function(b){return!!b&&b==b.window},isObj:function(b){if(!b||("[object Object]"!==B.call(b)||d.isArr(b)||d.isFn(b)||b.nodeType||d.isWin(b))||b.constructor&&!d.hasOwn(b,"constructor")&&!d.hasOwn(b.constructor.prototype,"isPrototypeOf"))return!1;for(var a in b);return a===f||d.hasOwn(b,a)},bind:function(b,d){if(q)return q.apply(b,I.call(arguments,1));var a=I.call(arguments,2),e=function(){return b.apply(this instanceof O?this:d||{},a.concat(I.call(arguments)))};
O.prototype=b.prototype;e.prototype=new O;return e},ext:function(){var b,a,e,g,c,y=arguments,A=y[0]||{},h=1,C=y.length,E=!1;"boolean"===typeof A&&(E=A,A=y[1]||{},h=2);for("object"!==typeof A&&!d.isFn(A)&&(A={});h<C;h++)if(null!=(b=y[h]))for(a in b)e=A[a],g=b[a],A!==g&&(E&&g&&(d.isObj(g)||(c=d.isArr(g)))?(c?(c=!1,e=e&&d.isArr(e)?e:[]):e=e&&d.isObj(e)?e:{},A[a]=ga(E,e,g)):g!==f&&(A[a]=g));return A},copy:function(b){return d.ext(!0,d.isArr(b)?[]:{},b)},trim:function(b){b=String(b);return l?l.call(b):
b.replace(/^\s+|\s+$/g,"")},camelCase:function(b){b=String(b);return b.replace(/[\s\-_]+([\w\d])/g,function(b,d){return d.toUpperCase()})},arrEach:function(b,d,a){if(N)N.call(b,d,a);else for(var e=0,g=b.length;e<g;e++)e in b&&d.call(a,b[e],e)},objEach:function(b,a,e){for(var g in b)d.hasOwn(b,g)&&a.call(e,b[g],g)},each:function(b,a,e){d["number"===typeof b.length?"arrEach":"objEach"](b,a,e)},keys:w||function(b){var a=[],e;for(e in b)d.hasOwn(b,e)&&a.push(e);return a},map:function(b,d,a){if(m)return m.call(b,
d,a);for(var e=0,g=b.length>>>0,c=Array(g);e<g;e++)e in b&&(c[e]=d.call(a,b[e],e));return c},indexOf:function(b,d,a){if(J)return J.call(b,d,a);a=a||0;var e=-1,g=0,c=b.length>>>0;if(a<c)for(g=0>a?Math.max(c-Math.abs(a),0):a;g<c;g++)if(b[g]===d){e=g;break}return e},format:function(b,a){var e=b;b&&a?e=String(b).replace(A,function(b,e){return d.hasOwn(a,e)?a[e]:""}):null==b&&(e=null);return e},objFormat:function(b,a){var e={};d.objEach(b,function(b,g){e[g]="string"===typeof b?d.format(b,a):d.isObj(b)?
d.objFormat(b,a):b});return e},walker:function(b,a,e){for(var g=2<arguments.length,c=a.split("."),y=0,A=c.length,h=b,C,E=null,f,K;y<A;y++)if(C=c[y],E=(h=E||h)[C],K=y==A-1,null==E||!K&&!d.isObj(E))if(g)K||(E=h[C]={});else{E=null;break}y==A&&g?(f=h[C],h[C]=e):e=E;return g?f:e},resc:function(b){return String(b).replace(C,"\\$1")},from:function(b){return null==b?[]:d.isArr(b)?b:[b]},mkarr:function(b){var a,d,e="string"===typeof b;if(b&&(d=b.length)!==f){if(!e)try{a=I.call(b)}catch(g){}if(!a||a.length!==
d)if(a=Array(d),e)for(;d--;)a[d]=b.charAt(d);else for(;d--;)d in b&&(a[d]=b[d])}return a||[]},prm:function(b){var a,e,g=[];if(!b)return"";for(a in b)a&&d.hasOwn(b,a)&&((e=b[a])&&d.isFn(e)&&(e=e()),null!=e&&g.push([h(a),h(e)].join("=")));return g.join("&")},aprm:function(b,a){b=String(b);var e,g;(e=a)&&"string"!==typeof a&&(e=d.prm(a));if(!e)return b;e=[b];g=b.charAt(b.length-1);e.push(!~b.indexOf("?")?"?":"?"!==g&&"&"!==g?"&":"");e.push("object"===typeof a?d.prm(a):a);return e.join("")},url:function(b){var a=
[];b.scheme&&b.authority&&a.push(b.scheme,":");b.authority&&a.push("//",b.authority);b.path&&a.push("/",!b.path.indexOf("/")?b.path.slice(1):b.path);b.query&&(!b.path&&b.authority&&a.push("/"),a.push(d.aprm("?",b.query)));b.fragment&&(!b.path&&(b.authority&&!b.query)&&a.push("/"),b=b.fragment,a.push("#","object"===typeof b?d.prm(b):b));return a.join("")},css:function(b,a,e){if(b){var g;a&&(a=d.camelCase(a),2<arguments.length?b.style[a]=e:g=L(b,a));return g}},addCls:function(b,a){for(var e=d.trim(a).split(y),
g=e.length,c=b.className;g--;)a=e[g],d.hasCls(b,a)||(c+=" "+a);b.className=d.trim(c)},rmCls:function(b,a){if(1<arguments.length){for(var e=d.trim(a).split(y),g=e.length,c=b.className;g--;)a=e[g],c=c.replace(RegExp("(?:^|\\s+)"+d.resc(a)+"(?:\\s+|$)","g")," ");b.className=d.trim(c)}else b.className=""},hasCls:function(b,a){a=d.trim(a);return!(!b||!b.nodeType||!a||!~(" "+b.className+" ").indexOf(" "+a+" "))},cres:function(b){b=d.trim(b);var a=t.createDocumentFragment().appendChild(t.createElement("div"));
a.innerHTML=b;return d.mkarr(a.childNodes)},cre:function(b){b=d.trim(b);return"<"===b.charAt(0)&&">"===b.charAt(b.length-1)?d.cres(b)[0]:t.createElement(b)},rme:function(b){b&&b.parentNode&&(x.Event.rm(b),b.parentNode.removeChild(b))},empty:function(b){for(var a;b&&(a=b.firstChild);)d.rme(a)},attr:function(b,a,d){a=a.toLowerCase();2<arguments.length&&b.setAttribute(a,d);var e;e=a in{href:!0,src:!0,width:!0,height:!0}?b.getAttribute(a,2):b.getAttribute(a);null===e&&(e=f);return e},hasFocus:function(b){return!!b&&
b.ownerDocument.activeElement===b},contains:t.documentElement.contains?function(b,a){return b!==a&&(b.contains?b.contains(a):!0)}:t.documentElement.compareDocumentPosition?function(b,a){return!!(b.compareDocumentPosition(a)&16)}:Y,parseXML:function(b){if("string"!==typeof b||!b)return null;var a,d;try{k.DOMParser?(d=new DOMParser,a=d.parseFromString(b,"text/xml")):(a=new ActiveXObject("Microsoft.XMLDOM"),a.async="false",a.loadXML(b))}catch(e){a=f}if(!a||!a.documentElement||a.getElementsByTagName("parsererror").length)throw"Invalid XML: "+
b;return a}},e=/^[\],:{}\s]*$/,E=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,Aa=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ba=/(?:^|:|,)(?:\s*\[)+/g;d.parseJSON=function(b){if("string"!==typeof b||!b)return null;b=d.trim(b);if(k.JSON&&k.JSON.parse)return k.JSON.parse(b);if(e.test(b.replace(E,"@").replace(Aa,"]").replace(Ba,"")))return(new Function("return "+b))();throw"Invalid JSON: "+b;};var ga=d.ext,U=d.isFn,u=x.evt={};d.arrEach("open openEnd close closeEnd enable enableEnd disable disableEnd destroy destroyEnd blockRequest successRequest completeRequest stopRequest errorRequest startRequest sendRequest passFilter failFilter rejectData acceptData render renderEnd focus focusEnd select selectEnd valueChange flushCache flushCacheEnd setCache setCacheEnd getCache getCacheEnd".split(" "),
function(b){this[b]=b},u);x.instances={};x.opts={enabled:!0,cont:"#sg,.sg",delay:250,valMin:1,valMax:255,valFilter:/(?:\S)/,url:"http://suggests.go.mail.ru/sg_u?q={query}",ajax:{dataType:"jsonp",jsonp:"callback",scriptCharset:"utf-8",timeout:5E3,stackSize:2},dataFilter:function(b){return b},dataGet:function(b){return b&&b.items?b.items:[]},cch:!0,cchLimit:128,max:10,min:0,autoSubmit:!0,hover:"sg__item_hover",item:'<div class="sg__item"><%= itemData.textMarked %></div>',result:function(b){return b.text},
select:function(){},keynavDelay:150,preview:!0,mousePreview:!1,debug:!1};x.setup=function(b){ga(!0,x.opts,b)};x.expando=K;x.guid=function(){return T++};x.now=g;x.noop=O;x.utils=d;k.SG=k.SG||x})(window);
(function(k,f){var x=k.document,t=f.utils,w=t.mkarr,n=!!x.getElementsByClassName,B=!!x.querySelectorAll,I=function(f,k){var m=[];k=k?I(k)[0]:x;if(!f)return m;if(f.nodeType||"object"===typeof f&&"setTimeout"in f)return[f];if("object"===typeof f&&(t.isArr(f)||void 0!==f.length))return w(f);if(!k)return m;f=t.trim(f);if(/^[\w#.][\w\-_]*$/.test(f)){var l=0;switch(f.charAt(0)){case "#":l=f.slice(1);(m=x.getElementById(l))&&m.id!==l&&(m=x.all[l]);m=m?[m]:[];break;case ".":var q=f.slice(1);if(n)m=(m=k.getElementsByClassName(q)).length?
m:[];else{for(var q=" "+q+" ",h=k.getElementsByTagName("*"),s=0,F;F=h[s++];)-1!=(" "+F.className+" ").indexOf(q)&&(m[l++]=F);m=l?m:[]}break;default:m=(m=k.getElementsByTagName(f)).length?m:[]}}else{h=!1;s=~f.indexOf("!=");if(B&&!s)try{m=k.querySelectorAll(f.replace(/=([^\]]+)/,'="$1"'))}catch(a){h=!0}if(h||!B||s){F=f.split(/ *, */);for(var c=F.length-1,g=!!c,y,A,C,K,T,Y,O,L,d,e,E;h=F[c--];){A=(y=h.replace(/(\([^)]*)\+/,"$1%").replace(/(\[[^\]]+)~/,"$1&").replace(/(~|>|\+)/," $1 ").split(/ +/)).length;
s=0;C=" ";for(h=[k];l=y[s++];)if(" "!==l&&">"!==l&&"~"!==l&&"+"!==l&&h){l=l.match(/([^[:.#]+)?(?:#([^[:.#]+))?(?:\.([^[:.]+))?(?:\[([^!&^*|$[:=]+)([!$^*|&]?=)?([^:\]]+)?\])?(?:\:([^(]+)(?:\(([^)]+)\))?)?/);K=l[1]||"*";T=l[2];q=l[3]?" "+l[3]+" ":"";Y=[];l=O=0;for(d=s==A;L=h[O++];)switch(C){case " ":L=L.getElementsByTagName(K);for(E=0;e=L[E++];)if((!T||e.id===T)&&(!q||-1!=(" "+e.className+" ").indexOf(q))&&!e.yeasss)d&&(e.yeasss=1),Y[l++]=e}h=Y}else C=l;if(g){if(!h.concat){Y=[];for(E=0;e=h[E];)Y[E++]=
e;h=Y}m=h.concat(1==m.length?m[0]:m)}else m=h}for(l=m.length;l--;)m[l].yeasss=m[l].nodeIndex=m[l].nodeIndexLast=null}}return w(m)};f.$=t.$=function(f,k){return I(f,k)[0]||null};f.yass=f.$$=t.$$=I})(window,SG);
(function(k){k(function(){function f(a,c,A,h){return k(a).then(c,A,h)}function k(a){var c;a instanceof t||(I(a)?(c=B(),a.then(function(a){c.resolve(a)},function(a){c.reject(a)},function(a){c.progress(a)}),a=c.promise):a=w(a));return a}function t(a){this.then=a}function w(a){return new t(function(c){try{return k(c?c(a):a)}catch(h){return n(h)}})}function n(a){return new t(function(c,h){try{return h?k(h(a)):n(a)}catch(f){return n(f)}})}function B(){function a(d,g,c){return m(d,g,c)}function y(a){return d(a)}
function f(a){return d(n(a))}function C(a){return s(a)}var K,T,q,m,s,d;K=new t(a);K={then:a,resolve:y,reject:f,progress:C,promise:K,resolver:{resolve:y,reject:f,progress:C}};T=[];q=[];m=function(a,d,g){var c,y;c=B();y="function"===typeof g?function(a){try{c.progress(g(a))}catch(d){c.progress(d)}}:function(a){c.progress(a)};T.push(function(g){g.then(a,d).then(c.resolve,c.reject,y)});q.push(y);return c.promise};s=function(a){l(q,a);return a};d=function(a){a=k(a);m=a.then;d=k;s=h;l(T,a);q=T=c;return a};
return K}function I(a){return a&&"function"===typeof a.then}function N(a,c,A,C,k){q(2,arguments);return f(a,function(a){function g(b){s(b)}function q(b){n(b)}var l,d,e,E,m,n,s,t,u,b;u=a.length>>>0;l=Math.max(0,Math.min(c,u));e=[];d=u-l+1;E=[];m=B();if(l){t=m.progress;s=function(b){E.push(b);--d||(n=s=h,m.reject(E))};n=function(b){e.push(b);--l||(n=s=h,m.resolve(e))};for(b=0;b<u;++b)b in a&&f(a[b],q,g,t)}else m.resolve(e);return m.then(A,C,k)})}function J(a,c,h,f){q(1,arguments);return m(a,s).then(c,
h,f)}function m(a,c){return f(a,function(a){var g,h,k,m,l,n;k=h=a.length>>>0;g=[];n=B();if(k){m=function(a,e){f(a,c).then(function(a){g[e]=a;--k||n.resolve(g)},n.reject)};for(l=0;l<h;l++)l in a?m(a[l],l):--k}else n.resolve(g);return n.promise})}function l(a,c){for(var h,f=0;h=a[f++];)h(c)}function q(a,c){for(var h,f=c.length;f>a;)if(h=c[--f],null!=h&&"function"!=typeof h)throw Error("arg "+f+" must be a function");}function h(){}function s(a){return a}var F,a,c;f.defer=B;f.resolve=k;f.reject=function(a){return f(a,
n)};f.join=function(){return m(arguments,s)};f.all=J;f.map=m;f.reduce=function(c,h){var k=a.call(arguments,1);return f(c,function(a){var c;c=a.length;k[0]=function(a,g,k){return f(a,function(a){return f(g,function(d){return h(a,d,k,c)})})};return F.apply(a,k)})};f.any=function(a,c,h,f){return N(a,1,function(a){return c?c(a[0]):a[0]},h,f)};f.some=N;f.chain=function(a,c,h){var k=2<arguments.length;return f(a,function(a){a=k?h:a;c.resolve(a);return a},function(a){c.reject(a);return n(a)},c.progress)};
f.isPromise=I;t.prototype={always:function(a,c){return this.then(a,a,c)},otherwise:function(a){return this.then(c,a)},spread:function(a){return this.then(function(h){return J(h,function(h){return a.apply(c,h)})})}};a=[].slice;F=[].reduce||function(a){var c,h,f,k,l;l=0;c=Object(this);k=c.length>>>0;h=arguments;if(1>=h.length)for(;;){if(l in c){f=c[l++];break}if(++l>=k)throw new TypeError;}else f=h[1];for(;l<k;++l)l in c&&(f=a(f,c[l],l,c));return f};return f})})(function(k){SG.when=k()});
(function(k,f){function x(a){var c=a.relatedTarget,g=!1,f=a.type;a.type=F[f];c!==this&&(c&&(g=n.contains(this,c)),g||(c=n.mkarr(arguments),h.fire(this,c.shift(),c),a.type=f))}var t=k.document,w=f.expando,n=f.utils,B=/\s+/,I="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
N=t.addEventListener?function(a,c,g){a.addEventListener(c,g,!1)}:t.attachEvent?function(a,c,g){a.attachEvent("on"+c,g)}:emptyFn,J=t.addEventListener?function(a,c,g){a.removeEventListener(c,g,!1)}:t.attachEvent?function(a,c,g){a.detachEvent("on"+c,g)}:emptyFn,m=function(a){return"defaultPrevented"in a?a.defaultPrevented:"returnValue"in a?!a.returnValue:"getPreventDefault"in a?a.getPreventDefault():!1},l=function(){return!0},q=function(){return!1},h={fired:null,c:{},custom:{},hlink:function(a,c){c[w]=
a[w]=a[w]||f.guid();return c},fix:function(a){if(a[w])return a;var c=a;a=new h.Event(a);for(var g=0,f;f=I[g++];)a[f]=c[f];a.target||(a.target=a.srcElement||t);3===a.target.nodeType&&(a.target=a.target.parentNode);!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);null==a.pageX&&null!=a.clientX&&(g=a.target.ownerDocument||t,c=g.documentElement,g=g.body,a.pageX=a.clientX+(c&&c.scrollLeft||g&&g.scrollLeft||0)-(c&&c.clientLeft||g&&g.clientLeft||0),a.pageY=
a.clientY+(c&&c.scrollTop||g&&g.scrollTop||0)-(c&&c.clientTop||g&&g.clientTop||0));if(null==a.which&&(null!=a.charCode||null!=a.keyCode))a.which=null!=a.charCode?a.charCode:a.keyCode;!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey);!a.which&&void 0!==a.button&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},handler:function(a,c){a=h.fix(a||k.event);a.currentTarget=this;var g=h.c[this[w]][a.type],f;(c=c&&n.isArr(c)?n.mkarr(c):null)&&c.unshift(a);for(var l=0,m=g.length;l<m&&!(f=g[l],f=c?f.apply(this,
c):f.call(this,a),!1===f&&(a.preventDefault(),a.stopPropagation()),a.isImmediatePropagationStopped());l++);},add:function(a,c,g,l){if(a&&c){a.setInterval&&(a!=k&&!a.frameElement)&&(a=k);var m=n.from(g),q=l?"unshift":"push";n.arrEach(c.split(B),function(c){c&&n.arrEach(m,function(g){if(g&&n.isFn(g)){g[w]||(g[w]=f.guid());var k=a[w]=a[w]||f.guid(),k=h.c[k]=h.c[k]||{},k=k[c]=k[c]||[],l=k.handle=function(a,d){if(!a||a.type!==h.fired)return h.handler.call(l.elem,a,d)};l.elem=a;if(1==k[q](g)&&(a.nodeType||
a.setInterval))g=h.custom&&h.custom[c]&&h.custom[c].setup,(!g||!1===g.call(a,l))&&N(a,c,k.handle)}})})}},one:function(a,c,g){h.add(a,c,h.hlink(g,function(){h.rm(this,c,arguments.callee);return g.apply(this,arguments)}))},first:function(a,c,g){h.add(a,c,g,!0)},rm:function(a,c,g){if(a)if(c)a.setInterval&&(a!=k&&!a.frameElement)&&(a=k),n.arrEach(c.split(B),function(c){if(c){var f=a[w],k=f&&h.c[f],l=k&&k[c];if(f&&k&&l){if(n.isFn(g)&&g[w])for(var m=l.length;m--;){if(l[m][w]==g[w]){l.splice(m,1);break}}else l.length=
0;if(!l.length){if(a.nodeType||a.setInterval)m=h.custom&&h.custom[c]&&h.custom[c].teardown,(!m||!1===m.call(a,l.handle))&&J(a,c,l.handle);delete k[c];for(c in k)return;delete h.c[f]}}}});else{c=(c=a[w])&&h.c[c];var f=[],l;if(c){for(l in c)n.hasOwn(c,l)&&f.push(l);h.rm(a,f.join(" "))}}},fire:function(a,c,g){if(a&&c){g=n.from(g);var f=c.type||c,k,l="on"+f,m=a[w];if(m=(m=m&&h.c[m])&&m[f])k=c[w]?c:"object"===typeof c?new h.Event(f,c):new h.Event(c),k.type=f,k.target=k.currentTarget=a,m.handle.call(a,
k,g);if(!k||!k.isDefaultPrevented()){var q;try{if((a.nodeType||a.setInterval)&&l&&a[f])(q=a[l])&&(a[l]=null),h.fired=f,a[f]()}catch(s){}q&&(a[l]=q)}h.fired=null}},copy:function(a,c,g){a=(a=a[w])&&h.c[a];var f=null;null!=g&&a&&a[g]?(f={},f[g]=a[g]):a&&(f=a);n.objEach(f,function(a,g){h.add(c,g,a)})},Event:function(a,c){a&&a.type?(this.origEvent=a,this.type=a.type,this.isDefaultPrevented=m(a)?l:q):this.type=a;c&&extend(this,c);this.timeStamp=f.now();this[w]=!0}},s=h.Event.prototype;s.preventDefault=
function(){this.isDefaultPrevented=l;var a=this.origEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)};s.stopPropagation=function(){this.isPropagationStopped=l;var a=this.origEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)};s.stopImmediatePropagation=function(){this.isImmediatePropagationStopped=l;this.stopPropagation()};s.isDefaultPrevented=q;s.isPropagationStopped=q;s.isImmediatePropagationStopped=q;var F={mouseover:"mouseenter",mouseout:"mouseleave"};n.objEach(F,
function(a,c){h.custom[a]={setup:function(){h.add(this,c,x)},teardown:function(){h.rm(this,c,x)}}});h.protoMixin={on:function(a,c){h.add(this,a,c)},off:function(a,c){h.rm(this,a,c)},fire:function(a,c){h.fire(this,a,c)}};h.natAdd=N;h.natRm=J;h.natOne=function(a,c,g){N(a,c,function(){J(a,c,arguments.callee);return g.apply(a,arguments)})};h.natIsDefaultPrevented=m;f.Event=h;n.Event=h})(window,SG);
(function(k,f,x){function t(){try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return null}function w(a){return function(){var e=this._transport,c=e[a];return arguments.length?c.apply(e,arguments):c.call(e)}}function n(a,e){if(!(this instanceof n))return new n(a,e);this._init(a,e)}function B(a){this._wrap=a;this._url=a.url;this._resolvedUrl=null;this._options=a.options;this._defer=a._defer}function I(a){B.call(this,a);this._xhr=null;this._aborted=
this._completed=this._processing=!1;this._tmid=null;this._reqHeaders={};this._resHeaders=this._resHeadersStr=null}function N(a){B.call(this,a);this._jsonpCallback=this._script=null;this._aborted=this._completed=this._processing=!1;this._tmid=null}function J(a,e,c){a=a.toUpperCase();n[a]=e;L[e]=c}var m=k.document,l=k.location,q=f.utils,h=q.ext,s=q.isFn,F=q.bind,a=f.Event,c=f.when,g=/#.*$/,y=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,C,K,T=1;try{C=l.href}catch(Y){C=
m.createElement("a"),C.href="",C=C.href}K=y.exec(C.toLowerCase())||[];t();n.prototype={_state:0,readyState:0,status:-1,statusText:"",responseText:null,responseXML:null,startTime:0,endTime:0,elapsedTime:0,_init:function(a,e){var f=this,k;a=a.replace(g,"");e=h(!0,{},n.defaults,e);e.method=e.method.toUpperCase();null==e.crossDomain&&(k=y.exec(a.toLowerCase()),e.crossDomain=!(!k||!(k[1]!=K[1]||k[2]!=K[2]||(k[3]||("http:"===k[1]?80:443))!=(K[3]||("http:"===K[1]?80:443)))));if(!e.dataType)throw Error("dataType must be specified");
e.dataType=e.dataType.toLowerCase();f.url=a;f.options=e;q.arrEach(["success","complete","error"],function(a){var d=e[a];if(d&&s(d))f.on(a,d)});k=c.defer();var l=k.promise;l.always(F(f._pAlwaysBefore,f));l.then(F(f._pResolve,f),F(f._pReject,f));l.always(F(f._pAlwaysAfter,f));f._defer=k;f._transport=new ("jsonp"===e.dataType?O.JSONP:O.XHR)(f)},_dataTypes:{json:q.parseJSON,xml:q.parseXML},_handleResponse:function(a){var e=this.options.dataType;if(null!=a)return a=(e=this._dataTypes[e])?e(a):String(a)},
_pAlwaysBefore:function(a){var e=a[0];a=a[1];this.endTime=f.now();this.elapsedTime=this.endTime-this.startTime;this._state=2;this.status=e;this.statusText=a;this.readyState=0<e&&600>e?4:0},_pAlwaysAfter:function(a){this.fire("complete",[this.statusText]);this.off()},_pResolve:function(a){a=a[2];"jsonp"!==this.options.dataType&&(this.responseText=a.text,this.responseXml=a.xml,a=this._handleResponse(a.text));this.fire("success",[a,this.statusText])},_pReject:function(a){this.fire("error",[this.statusText,
a[2]])},send:function(){this.startTime=f.now();this._transport.send();2>this._state&&(this.readyState=this._state=1)},abort:w("abort"),setRequestHeader:w("setRequestHeader"),getAllResponseHeaders:w("getAllResponseHeaders"),getResponseHeader:w("getResponseHeader"),getResolvedUrl:w("getResolvedUrl")};h(n.prototype,a.protoMixin);var O={};n.transports=O;B.prototype={send:function(){},abort:function(){},setRequestHeader:function(a,e){},getAllResponseHeaders:function(){return null},getResponseHeader:function(a){return null},
resolveUrl:function(){var a=this._options,e=this._url;a.data&&(e=q.aprm(e,a.data));return e},getResolvedUrl:function(){var a=this._resolvedUrl;null==a&&(this._resolvedUrl=a=this.resolveUrl());return a}};O._Base=B;I.prototype=h({},B.prototype,{_getXHR:function(){return t()},_onreadystatechange:function(){var a=this._options,e=this._defer,c=this._xhr,g=this._aborted,h,k,l,m,b,r,n={};if(!this._completed){try{l=c.readyState}catch(q){l=0}if(!g&&4===l){h=c.status;try{k=c.statusText}catch(s){k=""}(r=c.responseXML)&&
r.documentElement&&(m=r);try{b=c.responseText}catch(t){}this._resHeadersStr=r=c.getAllResponseHeaders()}if(g||4===l)c.onreadystatechange=f.noop,this._tmid&&clearTimeout(this._tmid),g||(!h&&!a.crossDomain?h=b?200:404:1223===h&&(h=204),a=L[h]||k,200<=h&&300>h||304===h?(204!==h&&(b&&(n.text=b),m&&(n.xml=m)),e.resolve([h,a,n])):e.reject([h,a,""]),this._cleanup()),this._processing=!1,this._completed=!0}},_abort:function(a){var e=this._xhr,c=L[a],f=this._defer;this._aborted=!0;e.abort();this._onreadystatechange();
f.reject([a,c,""]);this._cleanup()},_cleanup:function(){this._tmid=this._xhr=null;this._reqHeaders={}},send:function(){var a=this,e=a._options,c=a._defer,f,g,h,k,l="",b;if(a._processing)throw Error("already processing");f=a._getXHR();if(!f)throw Error("XHR not supported in your browser");a._xhr=f;g=e.method;h=a.getResolvedUrl();"POST"===g&&(k=h.indexOf("?"),~k&&(l=h.slice(k+1),h=h.substring(0,k)));f.open(g,h,!!e.async);f.onreadystatechange=F(a._onreadystatechange,a);"POST"===g&&a.setRequestHeader("Content-Type",
e.contentType);e.cache||a.setRequestHeader("If-Modified-Since","Sat, 1 Jan 1970 00:00:00 GMT");h=a._reqHeaders;!e.crossDomain&&!h["X-Requested-With"]&&(h["X-Requested-With"]="XMLHttpRequest");try{for(b in h)f.setRequestHeader(b,h[b])}catch(m){}if(h=e.xhrFields)for(b in h)try{f[b]=h[b]}catch(q){}e.timeout&&(a._tmid=setTimeout(function(){a._abort(n.TIMEOUT)},e.timeout));a._processing=!0;try{f.send("POST"===g?l:null)}catch(s){c.reject([n.SEND_ERROR,L[n.SEND_ERROR],s])}},abort:function(){this._completed||
this._abort(n.CANCELED)},setRequestHeader:function(a,e){this._reqHeaders[a]=e},getAllResponseHeaders:function(){var a=this._resHeadersStr;return null==a?null:a},getResponseHeader:function(a){var e=a.toLowerCase(),c=this._resHeaders,f=this._resHeadersStr;if(!c)for(c=this._resHeaders={};a=A.exec(f);)c[a[1].toLowerCase()]=a[2];a=c[e];return a===x?null:a}});O.XHR=I;N.prototype=h({},B.prototype,{_onload:function(){var a=this._script,e=this._aborted;if(e||!a.readyState||"loaded"===a.readyState)a.onload=
a.onreadystatechange=null,q.rme(a),this._script=null,this._complete(),e&&this._replGlCb2Rm()},_glCb:function(a){var e=this._defer;this._complete();this._rmGlCb();e.resolve([n.OK,L[n.OK],a]);this._cleanup()},_complete:function(){this._tmid&&clearTimeout(this._tmid);this._completed=!0;this._processing=!1},_addGlCb:function(){k[this._jsonpCallback]=F(this._glCb,this)},_rmGlCb:function(){var a=this._jsonpCallback;try{delete k[a]}catch(e){k[a]=x}},_replGlCb2Rm:function(){k[this._jsonpCallback]=F(this._rmGlCb,
this)},_abort:function(a){var e=this._defer;this._aborted=!0;this._onload();e.reject([a,L[a],""]);this._cleanup()},_cleanup:function(){this._tmid=null},_getNodeToInsert:function(){return m.head||f.$("head")||f.$("body")||m.documentElement},_getJsonpCallback:function(){var a=this._jsonpCallback;a||(a=this._options.jsonpCallback,s(a)&&(a=a()),this._jsonpCallback=a);return a},resolveUrl:function(){var a=this._options,e=a.jsonp,c,g={};c=B.prototype.resolveUrl.call(this);g[e]=this._getJsonpCallback();
a.cache||(g._=f.now());return c=q.aprm(c,g)},send:function(){var a=this;if(a._processing)throw Error("already processing");var c=a._options,f=a._getNodeToInsert(),g=c.scriptCharset,h,k;k=a.getResolvedUrl();h=q.cre("script");h.async=!0;g&&(h.charset=g);h.onload=h.onreadystatechange=F(a._onload,a);h.src=k;a._script=h;a._addGlCb();c.timeout&&(a._tmid=setTimeout(function(){a._abort(n.TIMEOUT)},c.timeout));a._processing=!0;f.insertBefore(h,f.firstChild)},abort:function(){this._completed||this._abort(n.CANCELED)}});
O.JSONP=N;var l=600,L={};J("OK",200,"success");J("NO_CONTENT",204,"No Content");J("NOT_MODIFIED",304,"notmodified");J("CANCELED",l++,"canceled");J("TIMEOUT",l++,"timeout");J("SEND_ERROR",l++,"send error");n.STATUSES=L;n.defaults={dataType:"text",method:"GET",async:!0,contentType:"application/x-www-form-urlencoded; charset=utf-8",xhrFields:{withCredentials:!1},jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+T++},scriptCharset:"utf-8"};f.Ajax=n})(window,SG);
(function(k){function f(q,h){var s,F="string"===typeof q,a=!1,c;F?(q=x.trim(q),a=(!q.indexOf("#")||!q.indexOf("."))&&0>q.indexOf(n)+q.indexOf(B)):q&&(c=!!q.nodeType);if(a||c){if(c&&q[t]?s=l[q[t]]:c||(s=l[q]),!s&&(a=k.$(q)))s=l[a[t]||(a[t]=w())]=f(a.innerHTML||""),F&&(l[q]=s)}else s=q,s=l[s]||(l[s]=Function("_o","_e","var _=[],print=function(){_.push.apply(p,arguments)};with(_o||{}){_.push('"+s.replace(I," ").split(n).join("\t").replace(N,"$1\r").replace(J,function(a,c){c=x.trim(c);return!c?"":["');",
"try{_.push("+c+")}catch(e){_e.push(e)}","_.push('"].join("")}).split("\t").join("');").split(B).join("_.push('").split("\r").join("\\'")+"')}return _.join('')"));s||(s=h?function(){return""}:"");return h?s(h,m):s}var x=k.utils,t=k.expando,w=k.guid,n="<%",B="%>",I=/[\r\t\n]/g,N=RegExp("((^|"+x.resc(B)+")[^\\t]*)'","g"),J=RegExp("\\t=(.*?)"+x.resc(B),"g"),m=[],l={};f.errs=m;f.cch=l;x.tmpl=f;k.tmpl=f})(SG);