text: (function(e){function _(e,t,n){var r=(n||0)-1,i=e.length;while(++r<i)if(e[r]===t)return r;return-1}function D(e,t){var n=e.index,r=t.index;e=e.criteria,t=t.criteria;if(e!==t){if(e>t||typeof e=="undefined")return 1;if(e<t||typeof t=="undefined")return-1}return n<r?-1:1}function P(e){return"\\"+L[e]}function H(){}function at(e){return e instanceof at?e:new ft(e)}function ft(e){this.__wrapped__=e}function ct(e,t,n,r){function a(){var r=arguments,f=s?this:t;i||(e=t[o]),n.length&&(r=r.length?(r=st.call(r),u?r.concat(n):n.concat(r)):n);if(this instanceof a){f=ht(e.prototype);var l=e.apply(f,r);return jt(l)?l:f}return e.apply(f,r)}var i=Bt(e),s=!n,o=t;if(s){var u=r;n=t}else if(!i){if(!r)throw new TypeError;t=e}return a}function ht(e){return jt(e)?G(e):{}}function pt(e){return wt[e]}function dt(e,t,n){var r=(r=at.indexOf)===En?_:r;return r}function vt(e){return Et[e]}function mt(e){return K.call(e)==g}function St(e){if(!e)return e;for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];if(r)for(var i in r)e[i]=r[i]}return e}function xt(e){return jt(e)?gt(e)?st.call(e):St({},e):e}function Tt(e){if(!e)return e;for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];if(r)for(var i in r)e[i]==null&&(e[i]=r[i])}return e}function kt(e){var t=[];return Nt(e,function(e,n){Bt(e)&&t.push(n)}),t.sort()}function Lt(e,t){return e?X.call(e,t):!1}function At(e){var t=-1,n=bt(e),r=n.length,i={};while(++t<r){var s=n[t];i[e[s]]=s}return i}function Ot(e){return e===!0||e===!1||K.call(e)==b}function Mt(e){return e?typeof e=="object"&&K.call(e)==w:!1}function _t(e){return e?e.nodeType===1:!1}function Dt(e){if(!e)return!0;if(gt(e)||Ut(e))return!e.length;for(var t in e)if(X.call(e,t))return!1;return!0}function Pt(e,t,n,i){if(e===t)return e!==0||1/e==1/t;var s=typeof e,o=typeof t;if(e===e&&(!e||s!="function"&&s!="object")&&(!t||o!="function"&&o!="object"))return!1;if(e==null||t==null)return e===t;var u=K.call(e),a=K.call(t);if(u!=a)return!1;switch(u){case b:case w:return+e==+t;case x:return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case N:case C:return e==String(t)}var f=u==y;if(!f){if(e instanceof at||t instanceof at)return Pt(e.__wrapped__||e,t.__wrapped__||t,n,i);if(u!=T)return!1;var l=e.constructor,c=t.constructor;if(l!=c&&!(Bt(l)&&l instanceof l&&Bt(c)&&c instanceof c))return!1}n||(n=[]),i||(i=[]);var h=n.length;while(h--)if(n[h]==e)return i[h]==t;var p=!0,d=0;n.push(e),i.push(t);if(f){d=t.length,p=d==e.length;if(p)while(d--)if(!(p=Pt(e[d],t[d],n,i)))break;return p}return Nt(t,function(t,s,o){if(X.call(o,s))return d++,!(p=X.call(e,s)&&Pt(e[s],t,n,i))&&r}),p&&Nt(e,function(e,t,n){if(X.call(n,t))return!(p=--d>-1)&&r}),p}function Ht(e){return Z(e)&&!et(parseFloat(e))}function Bt(e){return typeof e=="function"}function jt(e){return!!e&&!!k[typeof e]}function Ft(e){return qt(e)&&e!=+e}function It(e){return e===null}function qt(e){return typeof e=="number"||K.call(e)==x}function Rt(e){return!!e&&!!k[typeof e]&&K.call(e)==N}function Ut(e){return typeof e=="string"||K.call(e)==C}function zt(e){return typeof e=="undefined"}function Wt(e){var t=dt(),n=z.apply(B,st.call(arguments,1)),r={};return Nt(e,function(e,i){t(n,i)<0&&(r[i]=e)}),r}function Xt(e){var t=-1,n=bt(e),r=n.length,i=Array(r);while(++t<r){var s=n[t];i[t]=[s,e[s]]}return i}function Vt(e){var t=-1,n=z.apply(B,st.call(arguments,1)),r=n.length,i={};while(++t<r){var s=n[t];s in e&&(i[s]=e[s])}return i}function $t(e){var t=-1,n=bt(e),r=n.length,i=Array(r);while(++t<r)i[t]=e[n[t]];return i}function Jt(e,t){var n=dt(),i=e?e.length:0,s=!1;return i&&typeof i=="number"?s=n(e,t)>-1:Ct(e,function(e){return(s=e===t)&&r}),s}function Kt(e,t,n){var r={};return t=In(t,n),en(e,function(e,n,i){n=String(t(e,n,i)),X.call(r,n)?r[n]++:r[n]=1}),r}function Qt(e,t,n){var i=!0;t=In(t,n);var s=-1,o=e?e.length:0;if(typeof o=="number"){while(++s<o)if(!(i=!!t(e[s],s,e)))break}else Ct(e,function(e,n,s){return!(i=!!t(e,n,s))&&r});return i}function Gt(e,t,n){var r=[];t=In(t,n);var i=-1,s=e?e.length:0;if(typeof s=="number")while(++i<s){var o=e[i];t(o,i,e)&&r.push(o)}else Ct(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function Yt(e,t,n){t=In(t,n);var i=-1,s=e?e.length:0;if(typeof s!="number"){var u;return Ct(e,function(e,n,i){if(t(e,n,i))return u=e,r}),u}while(++i<s){var o=e[i];if(t(o,i,e))return o}}function Zt(e,t){return mn(e,t,!0)}function en(e,t,n){var i=-1,s=e?e.length:0;t=t&&typeof n=="undefined"?t:In(t,n);if(typeof s=="number"){while(++i<s)if(t(e[i],i,e)===r)break}else Ct(e,t)}function tn(e,t,n){var r={};return t=In(t,n),en(e,function(e,n,i){n=String(t(e,n,i)),(X.call(r,n)?r[n]:r[n]=[]).push(e)}),r}function nn(e,t){var n=st.call(arguments,2),r=-1,i=typeof t=="function",s=e?e.length:0,o=Array(typeof s=="number"?s:0);return en(e,function(e){o[++r]=(i?t:e[t]).apply(e,n)}),o}function rn(e,t,n){var r=-1,i=e?e.length:0;t=In(t,n);if(typeof i=="number"){var s=Array(i);while(++r<i)s[r]=t(e[r],r,e)}else s=[],Ct(e,function(e,n,i){s[++r]=t(e,n,i)});return s}function sn(e,t,n){var r=-Infinity,i=r,s=-1,o=e?e.length:0;if(!t&&typeof o=="number")while(++s<o){var u=e[s];u>i&&(i=u)}else t=In(t,n),en(e,function(e,n,s){var o=t(e,n,s);o>r&&(r=o,i=e)});return i}function on(e,t,n){var r=Infinity,i=r,s=-1,o=e?e.length:0;if(!t&&typeof o=="number")while(++s<o){var u=e[s];u<i&&(i=u)}else t=In(t,n),en(e,function(e,n,s){var o=t(e,n,s);o<r&&(r=o,i=e)});return i}function un(e,t){var n=-1,r=e?e.length:0;if(typeof r=="number"){var i=Array(r);while(++n<r)i[n]=e[n][t]}return i||rn(e,t)}function an(e,t,n,r){if(!e)return n;var i=arguments.length<3;t=In(t,r,4);var s=-1,o=e.length;if(typeof o=="number"){i&&(n=e[++s]);while(++s<o)n=t(n,e[s],s,e)}else Ct(e,function(e,r,s){n=i?(i=!1,e):t(n,e,r,s)});return n}function fn(e,t,n,r){var i=e,s=e?e.length:0,o=arguments.length<3;if(typeof s!="number"){var u=bt(e);s=u.length}return t=In(t,r,4),en(e,function(e,r,a){r=u?u[--s]:--s,n=o?(o=!1,i[r]):t(n,i[r],r,a)}),n}function ln(e,t,n){return t=In(t,n),Gt(e,function(e,n,r){return!t(e,n,r)})}function cn(e){var t=-1,n=e?e.length:0,r=Array(typeof n=="number"?n:0);return en(e,function(e){var n=W(it()*(++t+1));r[t]=r[n],r[n]=e}),r}function hn(e){var t=e?e.length:0;return typeof t=="number"?t:bt(e).length}function pn(e,t,n){var i;t=In(t,n);var s=-1,o=e?e.length:0;if(typeof o=="number"){while(++s<o)if(i=t(e[s],s,e))break}else Ct(e,function(e,n,s){return(i=t(e,n,s))&&r});return!!i}function dn(e,t,n){var r=-1,i=e?e.length:0,s=Array(typeof i=="number"?i:0);t=In(t,n),en(e,function(e,n,i){s[++r]={criteria:t(e,n,i),index:r,value:e}}),i=s.length,s.sort(D);while(i--)s[i]=s[i].value;return s}function vn(e){return gt(e)?st.call(e):e&&typeof e.length=="number"?rn(e):$t(e)}function mn(e,t,n){return n&&Dt(t)?null:(n?Yt:Gt)(e,t)}function gn(e){var t=-1,n=e?e.length:0,r=[];while(++t<n){var i=e[t];i&&r.push(i)}return r}function yn(e){var t=-1,n=dt(),r=e.length,i=z.apply(B,st.call(arguments,1)),s=[];while(++t<r){var o=e[t];n(i,o)<0&&s.push(o)}return s}function bn(e,t,n){if(e){var r=0,i=e.length;if(typeof t!="number"&&t!=null){var s=-1;t=In(t,n);while(++s<i&&t(e[s],s,e))r++}else{r=t;if(r==null||n)return e[0]}return st.call(e,0,rt(nt(0,r),i))}}function wn(e,t){var n=-1,r=e?e.length:0,i=[];while(++n<r){var s=e[n];gt(s)?V.apply(i,t?s:wn(s)):i.push(s)}return i}function En(e,t,n){if(typeof n=="number"){var r=e?e.length:0;n=n<0?nt(0,r+n):n||0}else if(n){var i=Ln(e,t);return e[i]===t?i:-1}return e?_(e,t,n):-1}function Sn(e,t,n){if(!e)return[];var r=0,i=e.length;if(typeof t!="number"&&t!=null){var s=i;t=In(t,n);while(s--&&t(e[s],s,e))r++}else r=t==null||n?1:t||r;return st.call(e,0,rt(nt(0,i-r),i))}function xn(e){var t=arguments,n=t.length,r=-1,i=dt(),s=e?e.length:0,o=[];e:while(++r<s){var u=e[r];if(i(o,u)<0){var a=n;while(--a)if(i(t[a],u)<0)continue e;o.push(u)}}return o}function Tn(e,t,n){if(e){var r=0,i=e.length;if(typeof t!="number"&&t!=null){var s=i;t=In(t,n);while(s--&&t(e[s],s,e))r++}else{r=t;if(r==null||n)return e[i-1]}return st.call(e,nt(0,i-r))}}function Nn(e,t,n){var r=e?e.length:0;typeof n=="number"&&(r=(n<0?nt(0,r+n):rt(n,r-1))+1);while(r--)if(e[r]===t)return r;return-1}function Cn(e,t,n){e=+e||0,n=+n||1,t==null&&(t=e,e=0);var r=-1,i=nt(0,R((t-e)/n)),s=Array(i);while(++r<i)s[r]=e,e+=n;return s}function kn(e,t,n){if(typeof t!="number"&&t!=null){var r=0,i=-1,s=e?e.length:0;t=In(t,n);while(++i<s&&t(e[i],i,e))r++}else r=t==null||n?1:nt(0,t);return st.call(e,r)}function Ln(e,t,n,r){var i=0,s=e?e.length:i;n=n?In(n,r,1):Kn,t=n(t);while(i<s){var o=i+s>>>1;n(e[o])<t?i=o+1:s=o}return i}function An(e){return gt(e)||(arguments[0]=e?st.call(e):B),On(z.apply(B,arguments))}function On(e,t,n,r){var i=-1,s=dt(),o=e?e.length:0,u=[],a=u;typeof t!="boolean"&&t!=null&&(r=n,n=t,t=!1),n!=null&&(a=[],n=In(n,r));while(++i<o){var f=e[i],l=n?n(f,i,e):f;if(t?!i||a[a.length-1]!==l:s(a,l)<0)n&&a.push(l),u.push(f)}return u}function Mn(e){var t=-1,n=e?sn(un(e,"length")):0,r=Array(n<0?0:n);while(++t<n)r[t]=un(e,t);return r}function _n(e){return yn(e,st.call(arguments,1))}function Dn(e){var t=-1,n=e?sn(un(arguments,"length")):0,r=Array(n<0?0:n);while(++t<n)r[t]=un(arguments,t);return r}function Pn(e,t){var n=-1,r=e?e.length:0,i={};while(++n<r){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i}function Hn(e,t){return e<1?t():function(){if(--e<1)return t.apply(this,arguments)}}function Bn(e,t){return lt.fastBind||Q&&arguments.length>2?Q.call.apply(Q,arguments):ct(e,t,st.call(arguments,2))}function jn(e){var t=arguments.length>1?z.apply(B,st.call(arguments,1)):kt(e),n=-1,r=t.length;while(++n<r){var i=t[n];e[i]=Bn(e[i],e)}return e}function Fn(){var e=arguments;return function(){var t=arguments,n=e.length;while(n--)t=[e[n].apply(this,t)];return t[0]}}function In(e,t,n){if(e==null)return Kn;var r=typeof e;if(r!="function"){if(r!="object")return function(t){return t[e]};var i=bt(e);return function(t){var n=i.length,r=!1;while(n--)if(!(r=t[i[n]]===e[i[n]]))break;return r}}return typeof t=="undefined"?e:n===1?function(n){return e.call(t,n)}:n===2?function(n,r){return e.call(t,n,r)}:n===4?function(n,r,i,s){return e.call(t,n,r,i,s)}:function(n,r,i){return e.call(t,n,r,i)}}function qn(e,t,n){function u(){o=null,n||(i=e.apply(s,r))}var r,i,s,o=null;return function(){var a=n&&!o;return r=arguments,s=this,U(o),o=J(u,t),a&&(i=e.apply(s,r)),i}}function Rn(e){var n=st.call(arguments,1);return J(function(){e.apply(t,n)},1)}function Un(e,n){var r=st.call(arguments,2);return J(function(){e.apply(t,r)},n)}function zn(e,t){var n={};return function(){var r=i+(t?t.apply(this,arguments):arguments[0]);return X.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}}function Wn(e){var t,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}}function Xn(e){return ct(e,st.call(arguments,1))}function Vn(e,t){function u(){s=new Date,o=null,r=e.apply(i,n)}var n,r,i,s=0,o=null;return function(){var a=new Date,f=t-(a-s);return n=arguments,i=this,f<=0?(U(o),o=null,s=a,r=e.apply(i,n)):o||(o=J(u,f)),r}}function $n(e,t){return function(){var n=[e];return V.apply(n,arguments),t.apply(this,n)}}function Jn(e){return e==null?"":String(e).replace(d,pt)}function Kn(e){return e}function Qn(e){en(kt(e),function(t){var n=at[t]=e[t];at.prototype[t]=function(){var e=[this.__wrapped__];V.apply(e,arguments);var t=n.apply(at,e);return this.__chain__&&(t=new ft(t),t.__chain__=!0),t}})}function Gn(){return e._=I,this}function Yn(e,t){e==null&&t==null&&(t=1),e=+e||0,t==null?(t=e,e=0):t=+t||0;var n=it();return e%1||t%1?e+rt(n*(t-e+parseFloat("1e-"+((n+"").length-1))),t):e+W(n*(t-e+1))}function Zn(e,t){var n=e?e[t]:null;return Bt(n)?e[t]():n}function er(e,t,n){var r=at.templateSettings;e||(e=""),n=Tt({},n,r);var i=0,s="__p += '",o=n.variable,u=RegExp((n.escape||p).source+"|"+(n.interpolate||p).source+"|"+(n.evaluate||p).source+"|$","g");e.replace(u,function(t,n,r,o,u){return s+=e.slice(i,u).replace(v,P),n&&(s+="' +\n_.escape("+n+") +\n'"),o&&(s+="';\n"+o+";\n__p += '"),r&&(s+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),i=u+t.length,t}),s+="';\n",o||(o="obj",s="with ("+o+" || {}) {\n"+s+"\n}\n"),s="function("+o+") {\n"+"var __t, __p = '', __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n"+s+"return __p\n}";try{var a=Function("_","return "+s)(at)}catch(f){throw f.source=s,f}return t?a(t):(a.source=s,a)}function tr(e,t,n){var r=-1,i=Array(e>-1?e:0);while(++r<e)i[r]=t.call(n,r);return i}function nr(e){return e==null?"":String(e).replace(f,vt)}function rr(e){var t=++n+"";return e?e+t:t}function ir(e){return e=new ft(e),e.__chain__=!0,e}function sr(e,t){return t(e),e}function or(){return this.__chain__=!0,this}function ur(){return String(this.__wrapped__)}function ar(){return this.__wrapped__}var t,n=0,r={},i=+(new Date)+"",s=75,o=/\b__p \+= '';/g,u=/\b(__p \+=) '' \+/g,a=/(__e\(.*?\)|\b__t\)) \+\n'';/g,f=/&(?:amp|lt|gt|quot|#39);/g,l=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,c=/\w*$/,h=/<%=([\s\S]+?)%>/g,p=/($^)/,d=/[&<>"']/g,v=/['\n\r\t\u2028\u2029\\]/g,m=0,g="[object Arguments]",y="[object Array]",b="[object Boolean]",w="[object Date]",E="[object Error]",S="[object Function]",x="[object Number]",T="[object Object]",N="[object RegExp]",C="[object String]",k={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,"undefined":!1},L={"\\":"\\","'":"'","\n":"n","\r":"r","	":"t","\u2028":"u2028","\u2029":"u2029"},A=k[typeof exports]&&exports,O=k[typeof module]&&module&&module.exports==A&&module,M=k[typeof global]&&global;M&&(M.global===M||M.window===M)&&(e=M);var B=[],j=Object.prototype,F=String.prototype,I=e._,q=RegExp("^"+String(j.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),R=Math.ceil,U=e.clearTimeout,z=B.concat,W=Math.floor,X=j.hasOwnProperty,V=B.push,$=j.propertyIsEnumerable,J=e.setTimeout,K=j.toString,Q=q.test(Q=K.bind)&&Q,G=q.test(G=Object.create)&&G,Y=q.test(Y=Array.isArray)&&Y,Z=e.isFinite,et=e.isNaN,tt=q.test(tt=Object.keys)&&tt,nt=Math.max,rt=Math.min,it=Math.random,st=B.slice,ot=q.test(e.attachEvent),ut=Q&&!/\n|true/.test(Q+ot);ft.prototype=at.prototype;var lt={};(function(){var e={0:1,length:1};lt.fastBind=Q&&!ut,lt.spliceObjects=(B.splice.call(e,0,1),!e[0])})(1),at.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:""};if(!G)var ht=function(e){if(jt(e)){H.prototype=e;var t=new H;H.prototype=null}return t||{}};mt(arguments)||(mt=function(e){return e?X.call(e,"callee"):!1});var gt=Y||function(e){return e?typeof e=="object"&&K.call(e)==y:!1},yt=function(e){var t,n=e,r=[];if(!n)return r;if(!k[typeof e])return r;for(t in n)X.call(n,t)&&r.push(t);return r},bt=tt?function(e){return jt(e)?tt(e):[]}:yt,wt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Et=At(wt),Nt=function(e,t){var n,i=e,s=i;if(!i)return s;if(!k[typeof i])return s;for(n in i)if(t(i[n],n,e)===r)return s;return s},Ct=function(e,t){var n,i=e,s=i;if(!i)return s;if(!k[typeof i])return s;for(n in i)if(X.call(i,n)&&t(i[n],n,e)===r)return s;return s};Bt(/x/)&&(Bt=function(e){return typeof e=="function"&&K.call(e)==S}),at.after=Hn,at.bind=Bn,at.bindAll=jn,at.compact=gn,at.compose=Fn,at.countBy=Kt,at.debounce=qn,at.defaults=Tt,at.defer=Rn,at.delay=Un,at.difference=yn,at.filter=Gt,at.flatten=wn,at.forEach=en,at.functions=kt,at.groupBy=tn,at.initial=Sn,at.intersection=xn,at.invert=At,at.invoke=nn,at.keys=bt,at.map=rn,at.max=sn,at.memoize=zn,at.min=on,at.omit=Wt,at.once=Wn,at.pairs=Xt,at.partial=Xn,at.pick=Vt,at.pluck=un,at.range=Cn,at.reject=ln,at.rest=kn,at.shuffle=cn,at.sortBy=dn,at.tap=sr,at.throttle=Vn,at.times=tr,at.toArray=vn,at.union=An,at.uniq=On,at.values=$t,at.where=mn,at.without=_n,at.wrap=$n,at.zip=Dn,at.collect=rn,at.drop=kn,at.each=en,at.extend=St,at.methods=kt,at.object=Pn,at.select=Gt,at.tail=kn,at.unique=On,at.chain=ir,at.clone=xt,at.contains=Jt,at.escape=Jn,at.every=Qt,at.find=Yt,at.has=Lt,at.identity=Kn,at.indexOf=En,at.isArguments=mt,at.isArray=gt,at.isBoolean=Ot,at.isDate=Mt,at.isElement=_t,at.isEmpty=Dt,at.isEqual=Pt,at.isFinite=Ht,at.isFunction=Bt,at.isNaN=Ft,at.isNull=It,at.isNumber=qt,at.isObject=jt,at.isRegExp=Rt,at.isString=Ut,at.isUndefined=zt,at.lastIndexOf=Nn,at.mixin=Qn,at.noConflict=Gn,at.random=Yn,at.reduce=an,at.reduceRight=fn,at.result=Zn,at.size=hn,at.some=pn,at.sortedIndex=Ln,at.template=er,at.unescape=nr,at.uniqueId=rr,at.all=Qt,at.any=pn,at.detect=Yt,at.findWhere=Zt,at.foldl=an,at.foldr=fn,at.include=Jt,at.inject=an,at.first=bn,at.last=Tn,at.take=bn,at.head=bn,at.VERSION="1.3.1",Qn(at),at.prototype.chain=or,at.prototype.value=ar,en(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=B[e];at.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),!lt.spliceObjects&&e.length===0&&delete e[0],this}}),en(["concat","join","slice"],function(e){var t=B[e];at.prototype[e]=function(){var e=this.__wrapped__,n=t.apply(e,arguments);return this.__chain__&&(n=new ft(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=at,typeof define=="function"&&define.amd&&define("underscore",[],function(){return at})):A&&!A.nodeType?O?(O.exports=at)._=at:A._=at:e._=at})(this),define("jquery",[],function(){return function(window,undefined){function isArraylike(e){var t=e.length,n=jQuery.type(e);return jQuery.isWindow(e)?!1:e.nodeType===1&&t?!0:n==="array"||n!=="function"&&(t===0||typeof t=="number"&&t>0&&t-1 in e)}function createOptions(e){var t=optionsCache[e]={};return jQuery.each(e.match(core_rnotwhite)||[],function(e,n){t[n]=!0}),t}function Data(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=jQuery.expando+Math.random()}function dataAttr(e,t,n){var r;if(n===undefined&&e.nodeType===1){r="data-"+t.replace(rmultiDash,"-$1").toLowerCase(),n=e.getAttribute(r);if(typeof n=="string"){try{n=n==="true"?!0:n==="false"?!1:n==="null"?null:+n+""===n?+n:rbrace.test(n)?JSON.parse(n):n}catch(i){}data_user.set(e,t,n)}else n=undefined}return n}function returnTrue(){return!0}function returnFalse(){return!1}function safeActiveElement(){try{return document.activeElement}catch(e){}}function sibling(e,t){while((e=e[t])&&e.nodeType!==1);return e}function winnow(e,t,n){if(jQuery.isFunction(t))return jQuery.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return jQuery.grep(e,function(e){return e===t!==n});if(typeof t=="string"){if(isSimple.test(t))return jQuery.filter(t,e,n);t=jQuery.filter(t,e)}return jQuery.grep(e,function(e){return core_indexOf.call(t,e)>=0!==n})}function manipulationTarget(e,t){return jQuery.nodeName(e,"table")&&jQuery.nodeName(t.nodeType===1?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function disableScript(e){return e.type=(e.getAttribute("type")!==null)+"/"+e.type,e}function restoreScript(e){var t=rscriptTypeMasked.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function setGlobalEval(e,t){var n=e.length,r=0;for(;r<n;r++)data_priv.set(e[r],"globalEval",!t||data_priv.get(t[r],"globalEval"))}function cloneCopyEvent(e,t){var n,r,i,s,o,u,a,f;if(t.nodeType!==1)return;if(data_priv.hasData(e)){s=data_priv.access(e),o=data_priv.set(t,s),f=s.events;if(f){delete o.handle,o.events={};for(i in f)for(n=0,r=f[i].length;n<r;n++)jQuery.event.add(t,i,f[i][n])}}data_user.hasData(e)&&(u=data_user.access(e),a=jQuery.extend({},u),data_user.set(t,a))}function getAll(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&jQuery.nodeName(e,t)?jQuery.merge([e],n):n}function fixInput(e,t){var n=t.nodeName.toLowerCase();if(n==="input"&&manipulation_rcheckableType.test(e.type))t.checked=e.checked;else if(n==="input"||n==="textarea")t.defaultValue=e.defaultValue}function vendorPropName(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=cssPrefixes.length;while(i--){t=cssPrefixes[i]+n;if(t in e)return t}return r}function isHidden(e,t){return e=t||e,jQuery.css(e,"display")==="none"||!jQuery.contains(e.ownerDocument,e)}function getStyles(e){return window.getComputedStyle(e,null)}function showHide(e,t){var n,r,i,s=[],o=0,u=e.length;for(;o<u;o++){r=e[o];if(!r.style)continue;s[o]=data_priv.get(r,"olddisplay"),n=r.style.display,t?(!s[o]&&n==="none"&&(r.style.display=""),r.style.display===""&&isHidden(r)&&(s[o]=data_priv.access(r,"olddisplay",css_defaultDisplay(r.nodeName)))):s[o]||(i=isHidden(r),(n&&n!=="none"||!i)&&data_priv.set(r,"olddisplay",i?n:jQuery.css(r,"display")))}for(o=0;o<u;o++){r=e[o];if(!r.style)continue;if(!t||r.style.display==="none"||r.style.display==="")r.style.display=t?s[o]||"":"none"}return e}function setPositiveNumber(e,t,n){var r=rnumsplit.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function augmentWidthOrHeight(e,t,n,r,i){var s=n===(r?"border":"content")?4:t==="width"?1:0,o=0;for(;s<4;s+=2)n==="margin"&&(o+=jQuery.css(e,n+cssExpand[s],!0,i)),r?(n==="content"&&(o-=jQuery.css(e,"padding"+cssExpand[s],!0,i)),n!=="margin"&&(o-=jQuery.css(e,"border"+cssExpand[s]+"Width",!0,i))):(o+=jQuery.css(e,"padding"+cssExpand[s],!0,i),n!=="padding"&&(o+=jQuery.css(e,"border"+cssExpand[s]+"Width",!0,i)));return o}function getWidthOrHeight(e,t,n){var r=!0,i=t==="width"?e.offsetWidth:e.offsetHeight,s=getStyles(e),o=jQuery.support.boxSizing&&jQuery.css(e,"boxSizing",!1,s)==="border-box";if(i<=0||i==null){i=curCSS(e,t,s);if(i<0||i==null)i=e.style[t];if(rnumnonpx.test(i))return i;r=o&&(jQuery.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+augmentWidthOrHeight(e,t,n||(o?"border":"content"),r,s)+"px"}function css_defaultDisplay(e){var t=document,n=elemdisplay[e];if(!n){n=actualDisplay(e,t);if(n==="none"||!n)iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(iframe[0].contentWindow||iframe[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=actualDisplay(e,t),iframe.detach();elemdisplay[e]=n}return n}function actualDisplay(e,t){var n=jQuery(t.createElement(e)).appendTo(t.body),r=jQuery.css(n[0],"display");return n.remove(),r}function buildParams(e,t,n,r){var i;if(jQuery.isArray(t))jQuery.each(t,function(t,i){n||rbracket.test(e)?r(e,i):buildParams(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&jQuery.type(t)==="object")for(i in t)buildParams(e+"["+i+"]",t[i],n,r);else r(e,t)}function addToPrefiltersOrTransports(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(core_rnotwhite)||[];if(jQuery.isFunction(n))while(r=s[i++])r[0]==="+"?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function inspectPrefiltersOrTransports(e,t,n,r){function o(u){var a;return i[u]=!0,jQuery.each(e[u]||[],function(e,u){var f=u(t,n,r);if(typeof f=="string"&&!s&&!i[f])return t.dataTypes.unshift(f),o(f),!1;if(s)return!(a=f)}),a}var i={},s=e===transports;return o(t.dataTypes[0])||!i["*"]&&o("*")}function ajaxExtend(e,t){var n,r,i=jQuery.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&jQuery.extend(!0,e,r),e}function ajaxHandleResponses(e,t,n){var r,i,s,o,u=e.contents,a=e.dataTypes;while(a[0]==="*")a.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in u)if(u[i]&&u[i].test(r)){a.unshift(i);break}if(a[0]in n)s=a[0];else{for(i in n){if(!a[0]||e.converters[i+" "+a[0]]){s=i;break}o||(o=i)}s=s||o}if(s)return s!==a[0]&&a.unshift(s),n[s]}function ajaxConvert(e,t,n,r){var i,s,o,u,a,f={},l=e.dataTypes.slice();if(l[1])for(o in e.converters)f[o.toLowerCase()]=e.converters[o];s=l.shift();while(s){e.responseFields[s]&&(n[e.responseFields[s]]=t),!a&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=s,s=l.shift();if(s)if(s==="*")s=a;else if(a!=="*"&&a!==s){o=f[a+" "+s]||f["* "+s];if(!o)for(i in f){u=i.split(" ");if(u[1]===s){o=f[a+" "+u[0]]||f["* "+u[0]];if(o){o===!0?o=f[i]:f[i]!==!0&&(s=u[0],l.unshift(u[1]));break}}}if(o!==!0)if(o&&e["throws"])t=o(t);else try{t=o(t)}catch(c){return{state:"parsererror",error:o?c:"No conversion from "+a+" to "+s}}}}return{state:"success",data:t}}function createFxNow(){return setTimeout(function(){fxNow=undefined}),fxNow=jQuery.now()}function createTween(e,t,n){var r,i=(tweeners[t]||[]).concat(tweeners["*"]),s=0,o=i.length;for(;s<o;s++)if(r=i[s].call(n,t,e))return r}function Animation(e,t,n){var r,i,s=0,o=animationPrefilters.length,u=jQuery.Deferred().always(function(){delete a.elem}),a=function(){if(i)return!1;var t=fxNow||createFxNow(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,s=1-r,o=0,a=f.tweens.length;for(;o<a;o++)f.tweens[o].run(s);return u.notifyWith(e,[f,s,n]),s<1&&a?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:jQuery.extend({},t),opts:jQuery.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:fxNow||createFxNow(),duration:n.duration,tweens:[],createTween:function(t,n){var r=jQuery.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(r),r},stop:function(t){var n=0,r=t?f.tweens.length:0;if(i)return this;i=!0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;propFilter(l,f.opts.specialEasing);for(;s<o;s++){r=animationPrefilters[s].call(f,e,l,f.opts);if(r)return r}return jQuery.map(l,createTween,f),jQuery.isFunction(f.opts.start)&&f.opts.start.call(e,f),jQuery.fx.timer(jQuery.extend(a,{elem:e,anim:f,queue:f.opts.queue})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function propFilter(e,t){var n,r,i,s,o;for(n in e){r=jQuery.camelCase(n),i=t[r],s=e[n],jQuery.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=jQuery.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function defaultPrefilter(e,t,n){var r,i,s,o,u,a,f=this,l={},c=e.style,h=e.nodeType&&isHidden(e),p=data_priv.get(e,"fxshow");n.queue||(u=jQuery._queueHooks(e,"fx"),u.unqueued==null&&(u.unqueued=0,a=u.empty.fire,u.empty.fire=function(){u.unqueued||a()}),u.unqueued++,f.always(function(){f.always(function(){u.unqueued--,jQuery.queue(e,"fx").length||u.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[c.overflow,c.overflowX,c.overflowY],jQuery.css(e,"display")==="inline"&&jQuery.css(e,"float")==="none"&&(c.display="inline-block")),n.overflow&&(c.overflow="hidden",f.always(function(){c.overflow=n.overflow[0],c.overflowX=n.overflow[1],c.overflowY=n.overflow[2]}));for(r in t){i=t[r];if(rfxtypes.exec(i)){delete t[r],s=s||i==="toggle";if(i===(h?"hide":"show")){if(i!=="show"||!p||p[r]===undefined)continue;h=!0}l[r]=p&&p[r]||jQuery.style(e,r)}}if(!jQuery.isEmptyObject(l)){p?"hidden"in p&&(h=p.hidden):p=data_priv.access(e,"fxshow",{}),s&&(p.hidden=!h),h?jQuery(e).show():f.done(function(){jQuery(e).hide()}),f.done(function(){var t;data_priv.remove(e,"fxshow");for(t in l)jQuery.style(e,t,l[t])});for(r in l)o=createTween(h?p[r]:0,r,f),r in p||(p[r]=o.start,h&&(o.end=o.start,o.start=r==="width"||r==="height"?1:0))}}function Tween(e,t,n,r,i){return new Tween.prototype.init(e,t,n,r,i)}function genFx(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=cssExpand[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function getWindow(e){return jQuery.isWindow(e)?e:e.nodeType===9&&e.defaultView}var rootjQuery,readyList,core_strundefined=typeof undefined,location=window.location,document=window.document,docElem=document.documentElement,_jQuery=window.jQuery,_$=window.$,class2type={},core_deletedIds=[],core_version="2.0.1",core_concat=core_deletedIds.concat,core_push=core_deletedIds.push,core_slice=core_deletedIds.slice,core_indexOf=core_deletedIds.indexOf,core_toString=class2type.toString,core_hasOwn=class2type.hasOwnProperty,core_trim=core_version.trim,jQuery=function(e,t){return new jQuery.fn.init(e,t,rootjQuery)},core_pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,core_rnotwhite=/\S+/g,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(e,t){return t.toUpperCase()},completed=function(){document.removeEventListener("DOMContentLoaded",completed,!1),window.removeEventListener("load",completed,!1),jQuery.ready()};jQuery.fn=jQuery.prototype={jquery:core_version,constructor:jQuery,init:function(e,t,n){var r,i;if(!e)return this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?r=[null,e,null]:r=rquickExpr.exec(e);if(r&&(r[1]||!t)){if(r[1]){t=t instanceof jQuery?t[0]:t,jQuery.merge(this,jQuery.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:document,!0));if(rsingleTag.test(r[1])&&jQuery.isPlainObject(t))for(r in t)jQuery.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=document.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=document,this.selector=e,this}return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e)}return e.nodeType?(this.context=this[0]=e,this.length=1,this):jQuery.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),jQuery.makeArray(e,this))},selector:"",length:0,toArray:function(){return core_slice.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=jQuery.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return jQuery.each(this,e,t)},ready:function(e){return jQuery.ready.promise().done(e),this},slice:function(){return this.pushStack(core_slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},map:function(e){return this.pushStack(jQuery.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:core_push,sort:[].sort,splice:[].splice},jQuery.fn.init.prototype=jQuery.fn,jQuery.extend=jQuery.fn.extend=function(){var e,t,n,r,i,s,o=arguments[0]||{},u=1,a=arguments.length,f=!1;typeof o=="boolean"&&(f=o,o=arguments[1]||{},u=2),typeof o!="object"&&!jQuery.isFunction(o)&&(o={}),a===u&&(o=this,--u);for(;u<a;u++)if((e=arguments[u])!=null)for(t in e){n=o[t],r=e[t];if(o===r)continue;f&&r&&(jQuery.isPlainObject(r)||(i=jQuery.isArray(r)))?(i?(i=!1,s=n&&jQuery.isArray(n)?n:[]):s=n&&jQuery.isPlainObject(n)?n:{},o[t]=jQuery.extend(f,s,r)):r!==undefined&&(o[t]=r)}return o},jQuery.extend({expando:"jQuery"+(core_version+Math.random()).replace(/\D/g,""),noConflict:function(e){return window.$===jQuery&&(window.$=_$),e&&window.jQuery===jQuery&&(window.jQuery=_jQuery),jQuery},isReady:!1,readyWait:1,holdReady:function(e){e?jQuery.readyWait++:jQuery.ready(!0)},ready:function(e){if(e===!0?--jQuery.readyWait:jQuery.isReady)return;jQuery.isReady=!0;if(e!==!0&&--jQuery.readyWait>0)return;readyList.resolveWith(document,[jQuery]),jQuery.fn.trigger&&jQuery(document).trigger("ready").off("ready")},isFunction:function(e){return jQuery.type(e)==="function"},isArray:Array.isArray,isWindow:function(e){return e!=null&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):typeof e=="object"||typeof e=="function"?class2type[core_toString.call(e)]||"object":typeof e},isPlainObject:function(e){if(jQuery.type(e)!=="object"||e.nodeType||jQuery.isWindow(e))return!1;try{if(e.constructor&&!core_hasOwn.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t,t=!1),t=t||document;var r=rsingleTag.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=jQuery.buildFragment([e],t,i),i&&jQuery(i).remove(),jQuery.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||typeof e!="string")return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&jQuery.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code),code&&(code.indexOf("use strict")===1?(script=document.createElement("script"),script.text=code,document.head.appendChild(script).parentNode.removeChild(script)):indirect(code))},camelCase:function(e){return e.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=isArraylike(e);if(n)if(o)for(;i<s;i++){r=t.apply(e[i],n);if(r===!1)break}else for(i in e){r=t.apply(e[i],n);if(r===!1)break}else if(o)for(;i<s;i++){r=t.call(e[i],i,e[i]);if(r===!1)break}else for(i in e){r=t.call(e[i],i,e[i]);if(r===!1)break}return e},trim:function(e){return e==null?"":core_trim.call(e)},makeArray:function(e,t){var n=t||[];return e!=null&&(isArraylike(Object(e))?jQuery.merge(n,typeof e=="string"?[e]:e):core_push.call(n,e)),n},inArray:function(e,t,n){return t==null?-1:core_indexOf.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if(typeof n=="number")for(;i<n;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,t,n){var r,i=0,s=e.length,o=isArraylike(e),u=[];if(o)for(;i<s;i++)r=t(e[i],i,n),r!=null&&(u[u.length]=r);else for(i in e)r=t(e[i],i,n),r!=null&&(u[u.length]=r);return core_concat.apply([],u)},guid:1,proxy:function(e,t){var n,r,i;return typeof t=="string"&&(n=e[t],t=e,e=n),jQuery.isFunction(e)?(r=core_slice.call(arguments,2),i=function(){return e.apply(t||this,r.concat(core_slice.call(arguments)))},i.guid=e.guid=e.guid||jQuery.guid++,i):undefined},access:function(e,t,n,r,i,s,o){var u=0,a=e.length,f=n==null;if(jQuery.type(n)==="object"){i=!0;for(u in n)jQuery.access(e,t,u,n[u],!0,s,o)}else if(r!==undefined){i=!0,jQuery.isFunction(r)||(o=!0),f&&(o?(t.call(e,r),t=null):(f=t,t=function(e,t,n){return f.call(jQuery(e),n)}));if(t)for(;u<a;u++)t(e[u],n,o?r:r.call(e[u],u,t(e[u],n)))}return i?e:f?t.call(e):a?t(e[0],n):s},now:Date.now,swap:function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i}}),jQuery.ready.promise=function(e){return readyList||(readyList=jQuery.Deferred(),document.readyState==="complete"?setTimeout(jQuery.ready):(document.addEventListener("DOMContentLoaded",completed,!1),window.addEventListener("load",completed,!1))),readyList.promise(e)},jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){class2type["[object "+t+"]"]=t.toLowerCase()}),rootjQuery=jQuery(document),function(e,t){function st(e,t,n,i){var s,o,u,a,f,l,p,m,g,E;(t?t.ownerDocument||t:w)!==h&&c(t),t=t||h,n=n||[];if(!e||typeof e!="string")return n;if((a=t.nodeType)!==1&&a!==9)return[];if(d&&!i){if(s=Y.exec(e))if(u=s[1]){if(a===9){o=t.getElementById(u);if(!o||!o.parentNode)return n;if(o.id===u)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(u))&&y(t,o)&&o.id===u)return n.push(o),n}else{if(s[2])return P.apply(n,t.getElementsByTagName(e)),n;if((u=s[3])&&r.getElementsByClassName&&t.getElementsByClassName)return P.apply(n,t.getElementsByClassName(u)),n}if(r.qsa&&(!v||!v.test(e))){m=p=b,g=t,E=a===9&&e;if(a===1&&t.nodeName.toLowerCase()!=="object"){l=yt(e),(p=t.getAttribute("id"))?m=p.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",f=l.length;while(f--)l[f]=m+bt(l[f]);g=V.test(e)&&t.parentNode||t,E=l.join(",")}if(E)try{return P.apply(n,g.querySelectorAll(E)),n}catch(S){}finally{p||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function ot(e){return G.test(e+"")}function ut(){function t(n,r){return e.push(n+=" ")>s.cacheLength&&delete t[e.shift()],t[n]=r}var e=[];return t}function at(e){return e[b]=!0,e}function ft(e){var t=h.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t,n){e=e.split("|");var r,i=e.length,o=n?null:t;while(i--)if(!(r=s.attrHandle[e[i]])||r===t)s.attrHandle[e[i]]=o}function ct(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:e[t]===!0?t.toLowerCase():null}function ht(e,t){return e.getAttribute(t,t.toLowerCase()==="type"?1:2)}function pt(e){if(e.nodeName.toLowerCase()==="input")return e.defaultValue}function dt(e,t){var n=t&&e,r=n&&e.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||A)-(~e.sourceIndex||A);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function vt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function mt(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function gt(e){return at(function(t){return t=+t,at(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function yt(e,t){var n,r,i,o,u,a,f,l=T[e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=s.preFilter;while(u){if(!n||(r=W.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(i=[]);n=!1;if(r=X.exec(u))n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),u=u.slice(n.length);for(o in s.filter)(r=Q[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(n=r.shift(),i.push({value:n,type:o,matches:r}),u=u.slice(n.length));if(!n)break}return t?u.length:u?st.error(e):T(e,a).slice(0)}function bt(e){var t=0,n=e.length,r="";for(;t<n;t++)r+=e[t].value;return r}function wt(e,t,n){var r=t.dir,s=n&&r==="parentNode",o=S++;return t.first?function(t,n,i){while(t=t[r])if(t.nodeType===1||s)return e(t,n,i)}:function(t,n,u){var a,f,l,c=E+" "+o;if(u){while(t=t[r])if(t.nodeType===1||s)if(e(t,n,u))return!0}else while(t=t[r])if(t.nodeType===1||s){l=t[b]||(t[b]={});if((f=l[r])&&f[0]===c){if((a=f[1])===!0||a===i)return a===!0}else{f=l[r]=[c],f[1]=e(t,n,u)||i;if(f[1]===!0)return!0}}}}function Et(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function St(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function xt(e,t,n,r,i,s){return r&&!r[b]&&(r=xt(r)),i&&!i[b]&&(i=xt(i,s)),at(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||Ct(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?St(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=St(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?B.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=St(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):P.apply(o,g)})}function Tt(e){var t,n,r,i=e.length,o=s.relative[e[0].type],u=o||s.relative[" "],a=o?1:0,l=wt(function(e){return e===t},u,!0),c=wt(function(e){return B.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];for(;a<i;a++)if(n=s.relative[e[a].type])h=[wt(Et(h),n)];else{n=s.filter[e[a].type].apply(null,e[a].matches);if(n[b]){r=++a;for(;r<i;r++)if(s.relative[e[r].type])break;return xt(a>1&&Et(h),a>1&&bt(e.slice(0,a-1).concat({value:e[a-2].type===" "?"*":""})).replace(z,"$1"),n,a<r&&Tt(e.slice(a,r)),r<i&&Tt(e=e.slice(r)),r<i&&bt(e))}h.push(n)}return Et(h)}function Nt(e,t){var n=0,r=t.length>0,o=e.length>0,u=function(u,a,l,c,p){var d,v,m,g=[],y=0,b="0",w=u&&[],S=p!=null,x=f,T=u||o&&s.find.TAG("*",p&&a.parentNode||a),N=E+=x==null?1:Math.random()||.1;S&&(f=a!==h&&a,i=n);for(;(d=T[b])!=null;b++){if(o&&d){v=0;while(m=e[v++])if(m(d,a,l)){c.push(d);break}S&&(E=N,i=++n)}r&&((d=!m&&d)&&y--,u&&w.push(d))}y+=b;if(r&&b!==y){v=0;while(m=t[v++])m(w,g,a,l);if(u){if(y>0)while(b--)!w[b]&&!g[b]&&(g[b]=_.call(c));g=St(g)}P.apply(c,g),S&&!u&&g.length>0&&y+t.length>1&&st.uniqueSort(c)}return S&&(E=N,f=x),w};return r?at(u):u}function Ct(e,t,n){var r=0,i=t.length;for(;r<i;r++)st(e,t[r],n);return n}function kt(e,t,n,i){var o,u,f,l,c,h=yt(e);if(!i&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&r.getById&&t.nodeType===9&&d&&s.relative[u[1].type]){t=(s.find.ID(f.matches[0].replace(nt,rt),t)||[])[0];if(!t)return n;e=e.slice(u.shift().value.length)}o=Q.needsContext.test(e)?0:u.length;while(o--){f=u[o];if(s.relative[l=f.type])break;if(c=s.find[l])if(i=c(f.matches[0].replace(nt,rt),V.test(u[0].type)&&t.parentNode||t)){u.splice(o,1),e=i.length&&bt(u);if(!e)return P.apply(n,i),n;break}}}return a(e,h)(i,t,!d,n,V.test(e)),n}function Lt(){}var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b="sizzle"+ -(new Date),w=e.document,E=0,S=0,x=ut(),T=ut(),N=ut(),C=!1,k=function(){return 0},L=typeof t,A=1<<31,O={}.hasOwnProperty,M=[],_=M.pop,D=M.push,P=M.push,H=M.slice,B=M.indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",q=I.replace("w","w#"),R="\\["+F+"*("+I+")"+F+"*(?:([*^$|!~]?=)"+F+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+q+")|)|)"+F+"*\\]",U=":("+I+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+R.replace(3,8)+")*)|.*)\\)|)",z=new RegExp("^"+F+"+|((?:^|[^\\\\])(?:\\\\.)*)"+F+"+$","g"),W=new RegExp("^"+F+"*,"+F+"*"),X=new RegExp("^"+F+"*([>+~]|"+F+")"+F+"*"),V=new RegExp(F+"*[+~]"),$=new RegExp("="+F+"*([^\\]'\"]*)"+F+"*\\]","g"),J=new RegExp(U),K=new RegExp("^"+q+"$"),Q={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I.replace("w","w*")+")"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},G=/^[^{]+\{\s*\[native \w/,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=new RegExp("\\\\([\\da-f]{1,6}"+F+"?|("+F+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)};try{P.apply(M=H.call(w.childNodes),w.childNodes),M[w.childNodes.length].nodeType}catch(it){P={apply:M.length?function(e,t){D.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}u=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},r=st.support={},c=st.setDocument=function(e){var t=e?e.ownerDocument||e:w;if(t===h||t.nodeType!==9||!t.documentElement)return h;h=t,p=t.documentElement,d=!u(t),r.attributes=ft(function(e){return e.innerHTML="<a href='#'></a>",lt("type|href|height|width",ht,e.firstChild.getAttribute("href")==="#"),lt(j,ct,e.getAttribute("disabled")==null),e.className="i",!e.getAttribute("className")}),r.input=ft(function(e){return e.innerHTML="<input>",e.firstChild.setAttribute("value",""),e.firstChild.getAttribute("value")===""}),lt("value",pt,r.attributes&&r.input),r.getElementsByTagName=ft(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ft(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",e.getElementsByClassName("i").length===2}),r.getById=ft(function(e){return p.appendChild(e).id=b,!t.getElementsByName||!t.getElementsByName(b).length}),r.getById?(s.find.ID=function(e,t){if(typeof t.getElementById!==L&&d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},s.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete s.find.ID,s.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==L&&e.getAttributeNode("id");return n&&n.value===t}}),s.find.TAG=r.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==L)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if(e==="*"){while(n=s[i++])n.nodeType===1&&r.push(n);return r}return s},s.find.CLASS=r.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==L&&d)return t.getElementsByClassName(e)},m=[],v=[];if(r.qsa=ot(t.querySelectorAll))ft(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||v.push("\\["+F+"*(?:value|"+j+")"),e.querySelectorAll(":checked").length||v.push(":checked")}),ft(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&v.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")});return(r.matchesSelector=ot(g=p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ft(function(e){r.disconnectedMatch=g.call(e,"div"),g.call(e,"[s!='']:x"),m.push("!=",U)}),v=v.length&&new RegExp(v.join("|")),m=m.length&&new RegExp(m.join("|")),y=ot(p.contains)||p.compareDocumentPosition?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&r.nodeType===1&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16)}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},r.sortDetached=ft(function(e){return e.compareDocumentPosition(t.createElement("div"))&1}),k=p.compareDocumentPosition?function(e,n){if(e===n)return C=!0,0;var i=n.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(n);if(i)return i&1||!r.sortDetached&&n.compareDocumentPosition(e)===i?e===t||y(w,e)?-1:n===t||y(w,n)?1:l?B.call(l,e)-B.call(l,n):0:i&4?-1:1;return e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,s=e.parentNode,o=n.parentNode,u=[e],a=[n];if(e===n)return C=!0,0;if(!s||!o)return e===t?-1:n===t?1:s?-1:o?1:l?B.call(l,e)-B.call(l,n):0;if(s===o)return dt(e,n);r=e;while(r=r.parentNode)u.unshift(r);r=n;while(r=r.parentNode)a.unshift(r);while(u[i]===a[i])i++;return i?dt(u[i],a[i]):u[i]===w?-1:a[i]===w?1:0},t},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){(e.ownerDocument||e)!==h&&c(e),t=t.replace($,"='$1']");if(r.matchesSelector&&d&&(!m||!m.test(t))&&(!v||!v.test(t)))try{var n=g.call(e,t);if(n||r.disconnectedMatch||e.document&&e.document.nodeType!==11)return n}catch(i){}return st(t,h,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==h&&c(e),y(e,t)},st.attr=function(e,n){(e.ownerDocument||e)!==h&&c(e);var i=s.attrHandle[n.toLowerCase()],o=i&&O.call(s.attrHandle,n.toLowerCase())?i(e,n,!d):t;return o===t?r.attributes||!d?e.getAttribute(n):(o=e.getAttributeNode(n))&&o.specified?o.value:null:o},st.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],i=0,s=0;C=!r.detectDuplicates,l=!r.sortStable&&e.slice(0),e.sort(k);if(C){while(t=e[s++])t===e[s]&&(i=n.push(s));while(i--)e.splice(n[i],1)}return e},o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(!i)for(;t=e[r];r++)n+=o(t);else if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(i===3||i===4)return e.nodeValue;return n},s=st.selectors={cacheLength:50,createPseudo:at,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[4]||e[5]||"").replace(nt,rt),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)==="nth"?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd")),e[5]=+(e[7]+e[8]||e[3]==="odd")):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=yt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return e==="*"?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&x(e,function(e){return t.test(typeof e.className=="string"&&e.className||typeof e.getAttribute!==L&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return i==null?t==="!=":t?(i+="",t==="="?i===n:t==="!="?i!==n:t==="^="?n&&i.indexOf(n)===0:t==="*="?n&&i.indexOf(n)>-1:t==="$="?n&&i.slice(-n.length)===n:t==="~="?(" "+i+" ").indexOf(n)>-1:t==="|="?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s=e.slice(0,3)!=="nth",o=e.slice(-4)!=="last",u=t==="of-type";return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:c.nodeType===1)return!1;d=v=e==="only"&&!d&&"nextSibling"}return!0}d=[o?m.firstChild:m.lastChild];if(o&&y){l=m[b]||(m[b]={}),f=l[e]||[],p=f[0]===E&&f[1],h=f[0]===E&&f[2],c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if(c.nodeType===1&&++h&&c===t){l[e]=[E,p,h];break}}else if(y&&(f=(t[b]||(t[b]={}))[e])&&f[0]===E)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++h){y&&((c[b]||(c[b]={}))[e]=[E,h]);if(c===t)break}return h-=i,h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,r=s.pseudos[e]||s.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],s.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=B.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(z,"$1"));return r[b]?at(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:at(function(e){return function(t){return st(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){return K.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=d?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||n.indexOf(e+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||e.nodeType===3||e.nodeType===4)return!1;return!0},parent:function(e){return!s.pseudos.empty(e)},header:function(e){return et.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},text:function(e){var t;return e.nodeName.toLowerCase()==="input"&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()===e.type)},first:gt(function(){return[0]}),last:gt(function(e,t){return[t-1]}),eq:gt(function(e,t,n){return[n<0?n+t:n]}),even:gt(function(e,t){var n=0;for(;n<t;n+=2)e.push(n);return e}),odd:gt(function(e,t){var n=1;for(;n<t;n+=2)e.push(n);return e}),lt:gt(function(e,t,n){var r=n<0?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:gt(function(e,t,n){var r=n<0?n+t:n;for(;++r<t;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})s.pseudos[n]=vt(n);for(n in{submit:!0,reset:!0})s.pseudos[n]=mt(n);a=st.compile=function(e,t){var n,r=[],i=[],s=N[e+" "];if(!s){t||(t=yt(e)),n=t.length;while(n--)s=Tt(t[n]),s[b]?r.push(s):i.push(s);s=N(e,Nt(i,r))}return s},s.pseudos.nth=s.pseudos.eq,Lt.prototype=s.filters=s.pseudos,s.setFilters=new Lt,r.sortStable=b.split("").sort(k).join("")===b,c(),[0,0].sort(k),r.detectDuplicates=C,jQuery.find=st,jQuery.expr=st.selectors,jQuery.expr[":"]=jQuery.expr.pseudos,jQuery.unique=st.uniqueSort,jQuery.text=st.getText,jQuery.isXMLDoc=st.isXML,jQuery.contains=st.contains}(window);var optionsCache={};jQuery.Callbacks=function(e){e=typeof e=="string"?optionsCache[e]||createOptions(e):jQuery.extend({},e);var t,n,r,i,s,o,u=[],a=!e.once&&[],f=function(c){t=e.memory&&c,n=!0,o=i||0,i=0,s=u.length,r=!0;for(;u&&o<s;o++)if(u[o].apply(c[0],c[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,u&&(a?a.length&&f(a.shift()):t?u=[]:l.disable())},l={add:function(){if(u){var n=u.length;(function o(t){jQuery.each(t,function(t,n){var r=jQuery.type(n);r==="function"?(!e.unique||!l.has(n))&&u.push(n):n&&n.length&&r!=="string"&&o(n)})})(arguments),r?s=u.length:t&&(i=n,f(t))}return this},remove:function(){return u&&jQuery.each(arguments,function(e,t){var n;while((n=jQuery.inArray(t,u,n))>-1)u.splice(n,1),r&&(n<=s&&s--,n<=o&&o--)}),this},has:function(e){return e?jQuery.inArray(e,u)>-1:!!u&&!!u.length},empty:function(){return u=[],s=0,this},disable:function(){return u=a=t=undefined,this},disabled:function(){return!u},lock:function(){return a=undefined,t||l.disable(),this},locked:function(){return!a},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],u&&(!n||a)&&(r?a.push(t):f(t)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!n}};return l},jQuery.extend({Deferred:function(e){var t=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return jQuery.Deferred(function(n){jQuery.each(t,function(t,s){var o=s[0],u=jQuery.isFunction(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);e&&jQuery.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===r?n.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return e!=null?jQuery.extend(e,r):r}},i={};return r.pipe=r.then,jQuery.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=core_slice.call(arguments),r=n.length,i=r!==1||e&&jQuery.isFunction(e.promise)?r:0,s=i===1?e:jQuery.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?core_slice.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&jQuery.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),jQuery.support=function(e){var t=document.createElement("input"),n=document.createDocumentFragment(),r=document.createElement("div"),i=document.createElement("select"),s=i.appendChild(document.createElement("option"));return t.type?(t.type="checkbox",e.checkOn=t.value!=="",e.optSelected=s.selected,e.reliableMarginRight=!0,e.boxSizingReliable=!0,e.pixelPosition=!1,t.checked=!0,e.noCloneChecked=t.cloneNode(!0).checked,i.disabled=!0,e.optDisabled=!s.disabled,t=document.createElement("input"),t.value="t",t.type="radio",e.radioValue=t.value==="t",t.setAttribute("checked","t"),t.setAttribute("name","t"),n.appendChild(t),e.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,e.focusinBubbles="onfocusin"in window,r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",e.clearCloneStyle=r.style.backgroundClip==="content-box",jQuery(function(){var t,n,i="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",s=document.getElementsByTagName("body")[0];if(!s)return;t=document.createElement("div"),t.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(t).appendChild(r),r.innerHTML="",r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",jQuery.swap(s,s.style.zoom!=null?{zoom:1}:{},function(){e.boxSizing=r.offsetWidth===4}),window.getComputedStyle&&(e.pixelPosition=(window.getComputedStyle(r,null)||{}).top!=="1%",e.boxSizingReliable=(window.getComputedStyle(r,null)||{width:"4px"}).width==="4px",n=r.appendChild(document.createElement("div")),n.style.cssText=r.style.cssText=i,n.style.marginRight=n.style.width="0",r.style.width="1px",e.reliableMarginRight=!parseFloat((window.getComputedStyle(n,null)||{}).marginRight)),s.removeChild(t)}),e):e}({});var data_user,data_priv,rbrace=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,rmultiDash=/([A-Z])/g;Data.uid=1,Data.accepts=function(e){return e.nodeType?e.nodeType===1||e.nodeType===9:!0},Data.prototype={key:function(e){if(!Data.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=Data.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,jQuery.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),s=this.cache[i];if(typeof t=="string")s[t]=n;else if(jQuery.isEmptyObject(s))jQuery.extend(this.cache[i],t);else for(r in t)s[r]=t[r];return s},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){return t===undefined||t&&typeof t=="string"&&n===undefined?this.get(e,t):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,s=this.key(e),o=this.cache[s];if(t===undefined)this.cache[s]={};else{jQuery.isArray(t)?r=t.concat(t.map(jQuery.camelCase)):(i=jQuery.camelCase(t),t in o?r=[t,i]:(r=i,r=r in o?[r]:r.match(core_rnotwhite)||[])),n=r.length;while(n--)delete o[r[n]]}},hasData:function(e){return!jQuery.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},data_user=new Data,data_priv=new Data,jQuery.extend({acceptData:Data.accepts,hasData:function(e){return data_user.hasData(e)||data_priv.hasData(e)},data:function(e,t,n){return data_user.access(e,t,n)},removeData:function(e,t){data_user.remove(e,t)},_data:function(e,t,n){return data_priv.access(e,t,n)},_removeData:function(e,t){data_priv.remove(e,t)}}),jQuery.fn.extend({data:function(e,t){var n,r,i=this[0],s=0,o=null;if(e===undefined){if(this.length){o=data_user.get(i);if(i.nodeType===1&&!data_priv.get(i,"hasDataAttrs")){n=i.attributes;for(;s<n.length;s++)r=n[s].name,r.indexOf("data-")===0&&(r=jQuery.camelCase(r.slice(5)),dataAttr(i,r,o[r]));data_priv.set(i,"hasDataAttrs",!0)}}return o}return typeof e=="object"?this.each(function(){data_user.set(this,e)}):jQuery.access(this,function(t){var n,r=jQuery.camelCase(e);if(i&&t===undefined){n=data_user.get(i,e);if(n!==undefined)return n;n=data_user.get(i,r);if(n!==undefined)return n;n=dataAttr(i,r,undefined);if(n!==undefined)return n;return}this.each(function(){var n=data_user.get(this,r);data_user.set(this,r,t),e.indexOf("-")!==-1&&n!==undefined&&data_user.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){data_user.remove(this,e)})}}),jQuery.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=data_priv.get(e,t),n&&(!r||jQuery.isArray(n)?r=data_priv.access(e,t,jQuery.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=jQuery.queue(e,t),r=n.length,i=n.shift(),s=jQuery._queueHooks(e,t),o=function(){jQuery.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),s.cur=i,i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return data_priv.get(e,n)||data_priv.access(e,n,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(e,[t+"queue",n])})})}}),jQuery.fn.extend({queue:function(e,t){var n=2;return typeof e!="string"&&(t=e,e="fx",n--),arguments.length<n?jQuery.queue(this[0],e):t===undefined?this:this.each(function(){var n=jQuery.queue(this,e,t);jQuery._queueHooks(this,e),e==="fx"&&n[0]!=="inprogress"&&jQuery.dequeue(this,e)})},dequeue:function(e){return this.each(function(){jQuery.dequeue(this,e)})},delay:function(e,t){return e=jQuery.fx?jQuery.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=jQuery.Deferred(),s=this,o=this.length,u=function(){--r||i.resolveWith(s,[s])};typeof e!="string"&&(t=e,e=undefined),e=e||"fx";while(o--)n=data_priv.get(s[o],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(u));return u(),i.promise(t)}});var nodeHook,boolHook,rclass=/[\t\r\n\f]/g,rreturn=/\r/g,rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({attr:function(e,t){return jQuery.access(this,jQuery.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){jQuery.removeAttr(this,e)})},prop:function(e,t){return jQuery.access(this,jQuery.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[jQuery.propFix[e]||e]})},addClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=typeof e=="string"&&e;if(jQuery.isFunction(e))return this.each(function(t){jQuery(this).addClass(e.call(this,t,this.className))});if(a){t=(e||"").match(core_rnotwhite)||[];for(;o<u;o++){n=this[o],r=n.nodeType===1&&(n.className?(" "+n.className+" ").replace(rclass," "):" ");if(r){s=0;while(i=t[s++])r.indexOf(" "+i+" ")<0&&(r+=i+" ");n.className=jQuery.trim(r)}}}return this},removeClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=arguments.length===0||typeof e=="string"&&e;if(jQuery.isFunction(e))return this.each(function(t){jQuery(this).removeClass(e.call(this,t,this.className))});if(a){t=(e||"").match(core_rnotwhite)||[];for(;o<u;o++){n=this[o],r=n.nodeType===1&&(n.className?(" "+n.className+" ").replace(rclass," "):"");if(r){s=0;while(i=t[s++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?jQuery.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return jQuery.isFunction(e)?this.each(function(n){jQuery(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=jQuery(this),u=t,a=e.match(core_rnotwhite)||[];while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n===core_strundefined||n==="boolean")this.className&&data_priv.set(this,"__className__",this.className),this.className=this.className||e===!1?"":data_priv.get(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(rclass," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];if(!arguments.length){if(i)return t=jQuery.valHooks[i.type]||jQuery.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,typeof n=="string"?n.replace(rreturn,""):n==null?"":n);return}return r=jQuery.isFunction(e),this.each(function(n){var i;if(this.nodeType!==1)return;r?i=e.call(this,n,jQuery(this).val()):i=e,i==null?i="":typeof i=="number"?i+="":jQuery.isArray(i)&&(i=jQuery.map(i,function(e){return e==null?"":e+""})),t=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!t||!("set"in t)||t.set(this,i,"value")===undefined)this.value=i})}}),jQuery.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(jQuery.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!jQuery.nodeName(n.parentNode,"optgroup"))){t=jQuery(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n,r,i=e.options,s=jQuery.makeArray(t),o=i.length;while(o--){r=i[o];if(r.selected=jQuery.inArray(jQuery(r).val(),s)>=0)n=!0}return n||(e.selectedIndex=-1),s}}},attr:function(e,t,n){var r,i,s=e.nodeType;if(!e||s===3||s===8||s===2)return;if(typeof e.getAttribute===core_strundefined)return jQuery.prop(e,t,n);if(s!==1||!jQuery.isXMLDoc(e))t=t.toLowerCase(),r=jQuery.attrHooks[t]||(jQuery.expr.match.bool.test(t)?boolHook:nodeHook);if(n===undefined)return r&&"get"in r&&(i=r.get(e,t))!==null?i:(i=jQuery.find.attr(e,t),i==null?undefined:i);if(n!==null)return r&&"set"in r&&(i=r.set(e,n,t))!==undefined?i:(e.setAttribute(t,n+""),n);jQuery.removeAttr(e,t)},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(core_rnotwhite);if(s&&e.nodeType===1)while(n=s[i++])r=jQuery.propFix[n]||n,jQuery.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!jQuery.support.radioValue&&t==="radio"&&jQuery.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,s,o=e.nodeType;if(!e||o===3||o===8||o===2)return;return s=o!==1||!jQuery.isXMLDoc(e),s&&(t=jQuery.propFix[t]||t,i=jQuery.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&(r=i.get(e,t))!==null?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||rfocusable.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),boolHook={set:function(e,t,n){return t===!1?jQuery.removeAttr(e,n):e.setAttribute(n,n),n}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(e,t){var n=jQuery.expr.attrHandle[t]||jQuery.find.attr;jQuery.expr.attrHandle[t]=function(e,t,r){var i=jQuery.expr.attrHandle[t],s=r?undefined:(jQuery.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return jQuery.expr.attrHandle[t]=i,s}}),jQuery.support.optSelected||(jQuery.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this}),jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(e,t){if(jQuery.isArray(t))return e.checked=jQuery.inArray(jQuery(e).val(),t)>=0}},jQuery.support.checkOn||(jQuery.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value})});var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;jQuery.event={global:{},add:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=data_priv.get(e);if(!m)return;n.handler&&(s=n,n=s.handler,i=s.selector),n.guid||(n.guid=jQuery.guid++),(a=m.events)||(a=m.events={}),(o=m.handle)||(o=m.handle=function(e){return typeof jQuery===core_strundefined||!!e&&jQuery.event.triggered===e.type?undefined:jQuery.event.dispatch.apply(o.elem,arguments)},o.elem=e),t=(t||"").match(core_rnotwhite)||[""],f=t.length;while(f--){u=rtypenamespace.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p)continue;c=jQuery.event.special[p]||{},p=(i?c.delegateType:c.bindType)||p,c=jQuery.event.special[p]||{},l=jQuery.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&jQuery.expr.match.needsContext.test(i),namespace:d.join(".")},s),(h=a[p])||(h=a[p]=[],h.delegateCount=0,(!c.setup||c.setup.call(e,r,d,o)===!1)&&e.addEventListener&&e.addEventListener(p,o,!1)),c.add&&(c.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),jQuery.event.global[p]=!0}e=null},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=data_priv.hasData(e)&&data_priv.get(e);if(!m||!(a=m.events))return;t=(t||"").match(core_rnotwhite)||[""],f=t.length;while(f--){u=rtypenamespace.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p){for(p in a)jQuery.event.remove(e,p+t[f],n,r,!0);continue}c=jQuery.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,h=a[p]||[],u=u[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=h.length;while(s--)l=h[s],(i||v===l.origType)&&(!n||n.guid===l.guid)&&(!u||u.test(l.namespace))&&(!r||r===l.selector||r==="**"&&l.selector)&&(h.splice(s,1),l.selector&&h.delegateCount--,c.remove&&c.remove.call(e,l));o&&!h.length&&((!c.teardown||c.teardown.call(e,d,m.handle)===!1)&&jQuery.removeEvent(e,p,m.handle),delete a[p])}jQuery.isEmptyObject(a)&&(delete m.handle,data_priv.remove(e,"events"))},trigger:function(e,t,n,r){var i,s,o,u,a,f,l,c=[n||document],h=core_hasOwn.call(e,"type")?e.type:e,p=core_hasOwn.call(e,"namespace")?e.namespace.split("."):[];s=o=n=n||document;if(n.nodeType===3||n.nodeType===8)return;if(rfocusMorph.test(h+jQuery.event.triggered))return;h.indexOf(".")>=0&&(p=h.split("."),h=p.shift(),p.sort()),a=h.indexOf(":")<0&&"on"+h,e=e[jQuery.expando]?e:new jQuery.Event(h,typeof e=="object"&&e),e.isTrigger=r?2:3,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=n),t=t==null?[e]:jQuery.makeArray(t,[e]),l=jQuery.event.special[h]||{};if(!r&&l.trigger&&l.trigger.apply(n,t)===!1)return;if(!r&&!l.noBubble&&!jQuery.isWindow(n)){u=l.delegateType||h,rfocusMorph.test(u+h)||(s=s.parentNode);for(;s;s=s.parentNode)c.push(s),o=s;o===(n.ownerDocument||document)&&c.push(o.defaultView||o.parentWindow||window)}i=0;while((s=c[i++])&&!e.isPropagationStopped())e.type=i>1?u:l.bindType||h,f=(data_priv.get(s,"events")||{})[e.type]&&data_priv.get(s,"handle"),f&&f.apply(s,t),f=a&&s[a],f&&jQuery.acceptData(s)&&f.apply&&f.apply(s,t)===!1&&e.preventDefault();return e.type=h,!r&&!e.isDefaultPrevented()&&(!l._default||l._default.apply(c.pop(),t)===!1)&&jQuery.acceptData(n)&&a&&jQuery.isFunction(n[h])&&!jQuery.isWindow(n)&&(o=n[a],o&&(n[a]=null),jQuery.event.triggered=h,n[h](),jQuery.event.triggered=undefined,o&&(n[a]=o)),e.result},dispatch:function(e){e=jQuery.event.fix(e);var t,n,r,i,s,o=[],u=core_slice.call(arguments),a=(data_priv.get(this,"events")||{})[e.type]||[],f=jQuery.event.special[e.type]||{};u[0]=e,e.delegateTarget=this;if(f.preDispatch&&f.preDispatch.call(this,e)===!1)return;o=jQuery.event.handlers.call(this,e,a),t=0;while((i=o[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((s=i.handlers[n++])&&!e.isImmediatePropagationStopped())if(!e.namespace_re||e.namespace_re.test(s.namespace))e.handleObj=s,e.data=s.data,r=((jQuery.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,u),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation())}return f.postDispatch&&f.postDispatch.call(this,e),e.result},handlers:function(e,t){var n,r,i,s,o=[],u=t.delegateCount,a=e.target;if(u&&a.nodeType&&(!e.button||e.type!=="click"))for(;a!==this;a=a.parentNode||this)if(a.disabled!==!0||e.type!=="click"){r=[];for(n=0;n<u;n++)s=t[n],i=s.selector+" ",r[i]===undefined&&(r[i]=s.needsContext?jQuery(i,this).index(a)>=0:jQuery.find(i,this,null,[a]).length),r[i]&&r.push(s);r.length&&o.push({elem:a,handlers:r})}return u<t.length&&o.push({elem:this,handlers:t.slice(u)}),o},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return e.pageX==null&&t.clientX!=null&&(n=e.target.ownerDocument||document,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!e.which&&s!==undefined&&(e.which=s&1?1:s&2?3:s&4?2:0),e}},fix:function(e){if(e[jQuery.expando])return e;var t,n,r,i=e.type,s=e,o=this.fixHooks[i];o||(this.fixHooks[i]=o=rmouseEvent.test(i)?this.mouseHooks:rkeyEvent.test(i)?this.keyHooks:{}),r=o.props?this.props.concat(o.props):this.props,e=new jQuery.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=document),e.target.nodeType===3&&(e.target=e.target.parentNode),o.filter?o.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&jQuery.nodeName(this,"input"))return this.click(),!1},_default:function(e){return jQuery.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=jQuery.extend(new jQuery.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?jQuery.event.trigger(i,null,t):jQuery.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},jQuery.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},jQuery.Event=function(e,t){if(!(this instanceof jQuery.Event))return new jQuery.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?returnTrue:returnFalse):this.type=e,t&&jQuery.extend(this,t),this.timeStamp=e&&e.timeStamp||jQuery.now(),this[jQuery.expando]=!0},jQuery.Event.prototype={isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue,this.stopPropagation()}},jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){jQuery.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;if(!i||i!==r&&!jQuery.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),jQuery.support.focusinBubbles||jQuery.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){jQuery.event.simulate(t,e.target,jQuery.event.fix(e),!0)};jQuery.event.special[t]={setup:function(){n++===0&&document.addEventListener(e,r,!0)},teardown:function(){--n===0&&document.removeEventListener(e,r,!0)}}}),jQuery.fn.extend({on:function(e,t,n,r,i){var s,o;if(typeof e=="object"){typeof t!="string"&&(n=n||t,t=undefined);for(o in e)this.on(o,t,n,e[o],i);return this}n==null&&r==null?(r=t,n=t=undefined):r==null&&(typeof t=="string"?(r=n,n=undefined):(r=n,n=t,t=undefined));if(r===!1)r=returnFalse;else if(!r)return this;return i===1&&(s=r,r=function(e){return jQuery().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=jQuery.guid++)),this.each(function(){jQuery.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,jQuery(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if(typeof e=="object"){for(i in e)this.off(i,t,e[i]);return this}if(t===!1||typeof t=="function")n=t,t=undefined;return n===!1&&(n=returnFalse),this.each(function(){jQuery.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){jQuery.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return jQuery.event.trigger(e,t,n,!0)}});var isSimple=/^.[^:#\[\.,]*$/,rparentsprev=/^(?:parents|prev(?:Until|All))/,rneedsContext=jQuery.expr.match.needsContext,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if(typeof e!="string")return this.pushStack(jQuery(e).filter(function(){for(t=0;t<i;t++)if(jQuery.contains(r[t],this))return!0}));for(t=0;t<i;t++)jQuery.find(e,r[t],n);return n=this.pushStack(i>1?jQuery.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t=jQuery(e,this),n=t.length;return this.filter(function(){var e=0;for(;e<n;e++)if(jQuery.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(winnow(this,e||[],!0))},filter:function(e){return this.pushStack(winnow(this,e||[],!1))},is:function(e){return!!winnow(this,typeof e=="string"&&rneedsContext.test(e)?jQuery(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,s=[],o=rneedsContext.test(e)||typeof e!="string"?jQuery(e,t||this.context):0;for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:n.nodeType===1&&jQuery.find.matchesSelector(n,e))){n=s.push(n);break}return this.pushStack(s.length>1?jQuery.unique(s):s)},index:function(e){return e?typeof e=="string"?core_indexOf.call(jQuery(e),this[0]):core_indexOf.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?jQuery(e,t):jQuery.makeArray(e&&e.nodeType?[e]:e),r=jQuery.merge(this.get(),n);return this.pushStack(jQuery.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),jQuery.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return jQuery.dir(e,"parentNode")},parentsUntil:function(e,t,n){return jQuery.dir(e,"parentNode",n)},next:function(e){return sibling(e,"nextSibling")},prev:function(e){return sibling(e,"previousSibling")},nextAll:function(e){return jQuery.dir(e,"nextSibling")},prevAll:function(e){return jQuery.dir(e,"previousSibling")},nextUntil:function(e,t,n){return jQuery.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return jQuery.dir(e,"previousSibling",n)},siblings:function(e){return jQuery.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return jQuery.sibling(e.firstChild)},contents:function(e){return jQuery.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:jQuery.merge([],e.childNodes)}},function(e,t){jQuery.fn[e]=function(n,r){var i=jQuery.map(this,t,n);return e.slice(-5)!=="Until"&&(r=n),r&&typeof r=="string"&&(i=jQuery.filter(r,i)),this.length>1&&(guaranteedUnique[e]||jQuery.unique(i),rparentsprev.test(e)&&i.reverse()),this.pushStack(i)}}),jQuery.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),t.length===1&&r.nodeType===1?jQuery.find.matchesSelector(r,e)?[r]:[]:jQuery.find.matches(e,jQuery.grep(t,function(e){return e.nodeType===1}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&e.nodeType!==9)if(e.nodeType===1){if(i&&jQuery(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,manipulation_rcheckableType=/^(?:checkbox|radio)$/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td,jQuery.fn.extend({text:function(e){return jQuery.access(this,function(e){return e===undefined?jQuery.text(this):this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=manipulationTarget(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=manipulationTarget(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?jQuery.filter(e,this):this,i=0;for(;(n=r[i])!=null;i++)!t&&n.nodeType===1&&jQuery.cleanData(getAll(n)),n.parentNode&&(t&&jQuery.contains(n.ownerDocument,n)&&setGlobalEval(getAll(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++)e.nodeType===1&&(jQuery.cleanData(getAll(e,!1)),e.textContent="");return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return jQuery.clone(this,e,t)})},html:function(e){return jQuery.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&t.nodeType===1)return t.innerHTML;if(typeof e=="string"&&!rnoInnerhtml.test(e)&&!wrapMap[(rtagName.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(rxhtmlTag,"<$1></$2>");try{for(;n<r;n++)t=this[n]||{},t.nodeType===1&&(jQuery.cleanData(getAll(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=jQuery.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],s=e[t++];s&&(r&&r.parentNode!==s&&(r=this.nextSibling),jQuery(this).remove(),s.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=core_concat.apply([],e);var r,i,s,o,u,a,f=0,l=this.length,c=this,h=l-1,p=e[0],d=jQuery.isFunction(p);if(d||!(l<=1||typeof p!="string"||jQuery.support.checkClone||!rchecked.test(p)))return this.each(function(r){var i=c.eq(r);d&&(e[0]=p.call(this,r,i.html())),i.domManip(e,t,n)});if(l){r=jQuery.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,r.childNodes.length===1&&(r=i);if(i){s=jQuery.map(getAll(r,"script"),disableScript),o=s.length;for(;f<l;f++)u=r,f!==h&&(u=jQuery.clone(u,!0,!0),o&&jQuery.merge(s,getAll(u,"script"))),t.call(this[f],u,f);if(o){a=s[s.length-1].ownerDocument,jQuery.map(s,restoreScript);for(f=0;f<o;f++)u=s[f],rscriptType.test(u.type||"")&&!data_priv.access(u,"globalEval")&&jQuery.contains(a,u)&&(u.src?jQuery._evalUrl(u.src):jQuery.globalEval(u.textContent.replace(rcleanScript,"")))}}}return this}}),jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){jQuery.fn[e]=function(e){var n,r=[],i=jQuery(e),s=i.length-1,o=0;for(;o<=s;o++)n=o===s?this:this.clone(!0),jQuery(i[o])[t](n),core_push.apply(r,n.get());return this.pushStack(r)}}),jQuery.extend({clone:function(e,t,n){var r,i,s,o,u=e.cloneNode(!0),a=jQuery.contains(e.ownerDocument,e);if(!jQuery.support.noCloneChecked&&(e.nodeType===1||e.nodeType===11)&&!jQuery.isXMLDoc(e)){o=getAll(u),s=getAll(e);for(r=0,i=s.length;r<i;r++)fixInput(s[r],o[r])}if(t)if(n){s=s||getAll(e),o=o||getAll(u);for(r=0,i=s.length;r<i;r++)cloneCopyEvent(s[r],o[r])}else cloneCopyEvent(e,u);return o=getAll(u,"script"),o.length>0&&setGlobalEval(o,!a&&getAll(e,"script")),u},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l=0,c=e.length,h=t.createDocumentFragment(),p=[];for(;l<c;l++){i=e[l];if(i||i===0)if(jQuery.type(i)==="object")jQuery.merge(p,i.nodeType?[i]:i);else if(!rhtml.test(i))p.push(t.createTextNode(i));else{s=s||h.appendChild(t.createElement("div")),o=(rtagName.exec(i)||["",""])[1].toLowerCase(),u=wrapMap[o]||wrapMap._default,s.innerHTML=u[1]+i.replace(rxhtmlTag,"<$1></$2>")+u[2],f=u[0];while(f--)s=s.firstChild;jQuery.merge(p,s.childNodes),s=h.firstChild,s.textContent=""}}h.textContent="",l=0;while(i=p[l++]){if(r&&jQuery.inArray(i,r)!==-1)continue;a=jQuery.contains(i.ownerDocument,i),s=getAll(h.appendChild(i),"script"),a&&setGlobalEval(s);if(n){f=0;while(i=s[f++])rscriptType.test(i.type||"")&&n.push(i)}}return h},cleanData:function(e){var t,n,r,i,s,o,u=jQuery.event.special,a=0;for(;(n=e[a])!==undefined;a++){if(Data.accepts(n)){s=n[data_priv.expando];if(s&&(t=data_priv.cache[s])){r=Object.keys(t.events||{});if(r.length)for(o=0;(i=r[o])!==undefined;o++)u[i]?jQuery.event.remove(n,i):jQuery.removeEvent(n,i,t.handle);data_priv.cache[s]&&delete data_priv.cache[s]}}delete data_user.cache[n[data_user.expando]]}},_evalUrl:function(e){return jQuery.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),jQuery.fn.extend({wrapAll:function(e){var t;return jQuery.isFunction(e)?this.each(function(t){jQuery(this).wrapAll(e.call(this,t))}):(this[0]&&(t=jQuery(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return jQuery.isFunction(e)?this.each(function(t){jQuery(this).wrapInner(e.call(this,t))}):this.each(function(){var t=jQuery(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=jQuery.isFunction(e);return this.each(function(n){jQuery(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){jQuery.nodeName(this,"body")||jQuery(this).replaceWith(this.childNodes)}).end()}});var curCSS,iframe,rdisplayswap=/^(none|table(?!-c[ea]).+)/,rmargin=/^margin/,rnumsplit=new RegExp("^("+core_pnum+")(.*)$","i"),rnumnonpx=new RegExp("^("+core_pnum+")(?!px)[a-z%]+$","i"),rrelNum=new RegExp("^([+-])=("+core_pnum+")","i"),elemdisplay={BODY:"block"},cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:0,fontWeight:400},cssExpand=["Top","Right","Bottom","Left"],cssPrefixes=["Webkit","O","Moz","ms"];jQuery.fn.extend({css:function(e,t){return jQuery.access(this,function(e,t,n){var r,i,s={},o=0;if(jQuery.isArray(t)){r=getStyles(e),i=t.length;for(;o<i;o++)s[t[o]]=jQuery.css(e,t[o],!1,r);return s}return n!==undefined?jQuery.style(e,t,n):jQuery.css(e,t)},e,t,arguments.length>1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(e){var t=typeof e=="boolean";return this.each(function(){(t?e:isHidden(this))?jQuery(this).show():jQuery(this).hide()})}}),jQuery.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=curCSS(e,"opacity");return n===""?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var i,s,o,u=jQuery.camelCase(t),a=e.style;t=jQuery.cssProps[u]||(jQuery.cssProps[u]=vendorPropName(a,u)),o=jQuery.cssHooks[t]||jQuery.cssHooks[u];if(n===undefined)return o&&"get"in o&&(i=o.get(e,!1,r))!==undefined?i:a[t];s=typeof n,s==="string"&&(i=rrelNum.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(jQuery.css(e,t)),s="number");if(n==null||s==="number"&&isNaN(n))return;s==="number"&&!jQuery.cssNumber[u]&&(n+="px"),!jQuery.support.clearCloneStyle&&n===""&&t.indexOf("background")===0&&(a[t]="inherit");if(!o||!("set"in o)||(n=o.set(e,n,r))!==undefined)a[t]=n},css:function(e,t,n,r){var i,s,o,u=jQuery.camelCase(t);return t=jQuery.cssProps[u]||(jQuery.cssProps[u]=vendorPropName(e.style,u)),o=jQuery.cssHooks[t]||jQuery.cssHooks[u],o&&"get"in o&&(i=o.get(e,!0,n)),i===undefined&&(i=curCSS(e,t,r)),i==="normal"&&t in cssNormalTransform&&(i=cssNormalTransform[t]),n===""||n?(s=parseFloat(i),n===!0||jQuery.isNumeric(s)?s||0:i):i}}),curCSS=function(e,t,n){var r,i,s,o=n||getStyles(e),u=o?o.getPropertyValue(t)||o[t]:undefined,a=e.style;return o&&(u===""&&!jQuery.contains(e.ownerDocument,e)&&(u=jQuery.style(e,t)),rnumnonpx.test(u)&&rmargin.test(t)&&(r=a.width,i=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=u,u=o.width,a.width=r,a.minWidth=i,a.maxWidth=s)),u},jQuery.each(["height","width"],function(e,t){jQuery.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&rdisplayswap.test(jQuery.css(e,"display"))?jQuery.swap(e,cssShow,function(){return getWidthOrHeight(e,t,r)}):getWidthOrHeight(e,t,r)},set:function(e,n,r){var i=r&&getStyles(e);return setPositiveNumber(e,n,r?augmentWidthOrHeight(e,t,r,jQuery.support.boxSizing&&jQuery.css(e,"boxSizing",!1,i)==="border-box",i):0)}}}),jQuery(function(){jQuery.support.reliableMarginRight||(jQuery.cssHooks.marginRight={get:function(e,t){if(t)return jQuery.swap(e,{display:"inline-block"},curCSS,[e,"marginRight"])}}),!jQuery.support.pixelPosition&&jQuery.fn.position&&jQuery.each(["top","left"],function(e,t){jQuery.cssHooks[t]={get:function(e,n){if(n)return n=curCSS(e,t),rnumnonpx.test(n)?jQuery(e).position()[t]+"px":n}}})}),jQuery.expr&&jQuery.expr.filters&&(jQuery.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},jQuery.expr.filters.visible=function(e){return!jQuery.expr.filters.hidden(e)}),jQuery.each({margin:"",padding:"",border:"Width"},function(e,t){jQuery.cssHooks[e+t]={expand:function(n){var r=0,i={},s=typeof n=="string"?n.split(" "):[n];for(;r<4;r++)i[e+cssExpand[r]+t]=s[r]||s[r-2]||s[0];return i}},rmargin.test(e)||(jQuery.cssHooks[e+t].set=setPositiveNumber)});var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=jQuery.prop(this,"elements");return e?jQuery.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(e)&&(this.checked||!manipulation_rcheckableType.test(e))}).map(function(e,t){var n=jQuery(this).val();return n==null?null:jQuery.isArray(n)?jQuery.map(n,function(e){return{name:t.name,value:e.replace(rCRLF,"\r\n")}}):{name:t.name,value:n.replace(rCRLF,"\r\n")}}).get()}}),jQuery.param=function(e,t){var n,r=[],i=function(e,t){t=jQuery.isFunction(t)?t():t==null?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};t===undefined&&(t=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional);if(jQuery.isArray(e)||e.jquery&&!jQuery.isPlainObject(e))jQuery.each(e,function(){i(this.name,this.value)});else for(n in e)buildParams(n,e[n],t,i);return r.join("&").replace(r20,"+")},jQuery.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){jQuery.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),jQuery.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)}});var ajaxLocParts,ajaxLocation,ajax_nonce=jQuery.now(),ajax_rquery=/\?/,rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,_load=jQuery.fn.load,prefilters={},transports={},allTypes="*/".concat("*");try{ajaxLocation=location.href}catch(e){ajaxLocation=document.createElement("a"),ajaxLocation.href="",ajaxLocation=ajaxLocation.href}ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[],jQuery.fn.load=function(e,t,n){if(typeof e!="string"&&_load)return _load.apply(this,arguments);var r,i,s,o=this,u=e.indexOf(" ");return u>=0&&(r=e.slice(u),e=e.slice(0,u)),jQuery.isFunction(t)?(n=t,t=undefined):t&&typeof t=="object"&&(i="POST"),o.length>0&&jQuery.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){s=arguments,o.html(r?jQuery("<div>").append(jQuery.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){o.each(n,s||[e.responseText,t,e])}),this},jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){jQuery.fn[t]=function(e){return this.on(t,e)}}),jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ajaxExtend(ajaxExtend(e,jQuery.ajaxSettings),t):ajaxExtend(jQuery.ajaxSettings,e)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(e,t){function S(e,t,s,u){var f,m,g,b,E,S=t;if(y===2)return;y=2,o&&clearTimeout(o),n=undefined,i=u||"",w.readyState=e>0?4:0,f=e>=200&&e<300||e===304,s&&(b=ajaxHandleResponses(l,w,s)),b=ajaxConvert(l,b,w,f);if(f)l.ifModified&&(E=w.getResponseHeader("Last-Modified"),E&&(jQuery.lastModified[r]=E),E=w.getResponseHeader("etag"),E&&(jQuery.etag[r]=E)),e===204||l.type==="HEAD"?S="nocontent":e===304?S="notmodified":(S=b.state,m=b.data,g=b.error,f=!g);else{g=S;if(e||!S)S="error",e<0&&(e=0)}w.status=e,w.statusText=(t||S)+"",f?p.resolveWith(c,[m,S,w]):p.rejectWith(c,[w,S,g]),w.statusCode(v),v=undefined,a&&h.trigger(f?"ajaxSuccess":"ajaxError",[w,l,f?m:g]),d.fireWith(c,[w,S]),a&&(h.trigger("ajaxComplete",[w,l]),--jQuery.active||jQuery.event.trigger("ajaxStop"))}typeof e=="object"&&(t=e,e=undefined),t=t||{};var n,r,i,s,o,u,a,f,l=jQuery.ajaxSetup({},t),c=l.context||l,h=l.context&&(c.nodeType||c.jquery)?jQuery(c):jQuery.event,p=jQuery.Deferred(),d=jQuery.Callbacks("once memory"),v=l.statusCode||{},m={},g={},y=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(y===2){if(!s){s={};while(t=rheaders.exec(i))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return y===2?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=g[n]=g[n]||e,m[e]=t),this},overrideMimeType:function(e){return y||(l.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)v[t]=[v[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),S(0,t),this}};p.promise(w).complete=d.add,w.success=w.done,w.error=w.fail,l.url=((e||l.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//"),l.type=t.method||t.type||l.method||l.type,l.dataTypes=jQuery.trim(l.dataType||"*").toLowerCase().match(core_rnotwhite)||[""],l.crossDomain==null&&(u=rurl.exec(l.url.toLowerCase()),l.crossDomain=!(!u||u[1]===ajaxLocParts[1]&&u[2]===ajaxLocParts[2]&&(u[3]||(u[1]==="http:"?"80":"443"))===(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443")))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=jQuery.param(l.data,l.traditional)),inspectPrefiltersOrTransports(prefilters,l,t,w);if(y===2)return w;a=l.global,a&&jQuery.active++===0&&jQuery.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!rnoContent.test(l.type),r=l.url,l.hasContent||(l.data&&(r=l.url+=(ajax_rquery.test(r)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=rts.test(r)?r.replace(rts,"$1_="+ajax_nonce++):r+(ajax_rquery.test(r)?"&":"?")+"_="+ajax_nonce++)),l.ifModified&&(jQuery.lastModified[r]&&w.setRequestHeader("If-Modified-Since",jQuery.lastModified[r]),jQuery.etag[r]&&w.setRequestHeader("If-None-Match",jQuery.etag[r])),(l.data&&l.hasContent&&l.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):l.accepts["*"]);for(f in l.headers)w.setRequestHeader(f,l.headers[f]);if(!l.beforeSend||l.beforeSend.call(c,w,l)!==!1&&y!==2){b="abort";for(f in{success:1,error:1,complete:1})w[f](l[f]);n=inspectPrefiltersOrTransports(transports,l,t,w);if(!n)S(-1,"No Transport");else{w.readyState=1,a&&h.trigger("ajaxSend",[w,l]),l.async&&l.timeout>0&&(o=setTimeout(function(){w.abort("timeout")},l.timeout));try{y=1,n.send(m,S)}catch(E){if(!(y<2))throw E;S(-1,E)}}return w}return w.abort()},getJSON:function(e,t,n){return jQuery.get(e,t,n,"json")},getScript:function(e,t){return jQuery.get(e,undefined,t,"script")}}),jQuery.each(["get","post"],function(e,t){jQuery[t]=function(e,n,r,i){return jQuery.isFunction(n)&&(i=i||r,r=n,n=undefined),jQuery.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return jQuery.globalEval(e),e}}}),jQuery.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),jQuery.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=jQuery("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i(e.type==="error"?404:200,e.type)}),document.head.appendChild(t[0])},abort:function(){n&&n()}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=oldCallbacks.pop()||jQuery.expando+"_"+ajax_nonce++;return this[e]=!0,e}}),jQuery.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,s,o=e.jsonp!==!1&&(rjsonp.test(e.url)?"url":typeof e.data=="string"&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(e.data)&&"data");if(o||e.dataTypes[0]==="jsonp")return r=e.jsonpCallback=jQuery.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace(rjsonp,"$1"+r):e.jsonp!==!1&&(e.url+=(ajax_rquery.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||jQuery.error(r+" was not called"),s[0]},e.dataTypes[0]="json",i=window[r],window[r]=function(){s=arguments},n.always(function(){window[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,oldCallbacks.push(r)),s&&jQuery.isFunction(i)&&i(s[0]),s=i=undefined}),"script"}),jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var xhrSupported=jQuery.ajaxSettings.xhr(),xhrSuccessStatus={0:200,1223:204},xhrId=0,xhrCallbacks={};window.ActiveXObject&&jQuery(window).on("unload",function(){for(var e in xhrCallbacks)xhrCallbacks[e]();xhrCallbacks=undefined}),jQuery.support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,jQuery.support.ajax=xhrSupported=!!xhrSupported,jQuery.ajaxTransport(function(e){var t;if(jQuery.support.cors||xhrSupported&&!e.crossDomain)return{send:function(n,r){var i,s,o=e.xhr();o.open(e.type,e.url,e.async,e.username,e.password);if(e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),!e.crossDomain&&!n["X-Requested-With"]&&(n["X-Requested-With"]="XMLHttpRequest");for(i in n)o.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete xhrCallbacks[s],t=o.onload=o.onerror=null,e==="abort"?o.abort():e==="error"?r(o.status||404,o.statusText):r(xhrSuccessStatus[o.status]||o.status,o.statusText,typeof o.responseText=="string"?{text:o.responseText}:undefined,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=xhrCallbacks[s=xhrId++]=t("abort"),o.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}});var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+core_pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=rfxnum.exec(t),s=i&&i[3]||(jQuery.cssNumber[e]?"":"px"),o=(jQuery.cssNumber[e]||s!=="px"&&+r)&&rfxnum.exec(jQuery.css(n.elem,e)),u=1,a=20;if(o&&o[3]!==s){s=s||o[3],i=i||[],o=+r||1;do u=u||".5",o/=u,jQuery.style(n.elem,e,o+s);while(u!==(u=n.cur()/r)&&u!==1&&--a)}return i&&(n.unit=s,n.start=+o||+r||0,n.end=i[1]?o+(i[1]+1)*i[2]:+i[2]),n}]};return jQuery.Animation=jQuery.extend(Animation,{tweener:function(e,t){jQuery.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],tweeners[n]=tweeners[n]||[],tweeners[n].unshift(t)},prefilter:function(e,t){t?animationPrefilters.unshift(e):animationPrefilters.push(e)}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(jQuery.cssNumber[n]?"":"px")},cur:function(){var e=Tween.propHooks[this.prop];return e&&e.get?e.get(this):Tween.propHooks._default.get(this)},run:function(e){var t,n=Tween.propHooks[this.prop];return this.options.duration?this.pos=t=jQuery.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=jQuery.css(e.elem,e.prop,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){jQuery.fx.step[e.prop]?jQuery.fx.step[e.prop](e):e.elem.style&&(e.elem.style[jQuery.cssProps[e.prop]]!=null||jQuery.cssHooks[e.prop])?jQuery.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},jQuery.each(["toggle","show","hide"],function(e,t){var n=jQuery.fn[t];jQuery.fn[t]=function(e,r,i){return e==null||typeof e=="boolean"?n.apply(this,arguments):this.animate(genFx(t,!0),e,r,i)}}),jQuery.fn.extend({fadeTo:function(e,t,n,r){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=jQuery.isEmptyObject(e),s=jQuery.speed(t,n,r),o=function(){var t=Animation(this,jQuery.extend({},e),s);o.finish=function(){t.stop(!0)},(i||data_priv.get(this,"finish"))&&t.stop(!0)};return o.finish=o,i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return typeof e!="string"&&(n=t,t=e,e=undefined),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=e!=null&&e+"queueHooks",s=jQuery.timers,o=data_priv.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&rrun.test(i)&&r(o[i]);for(i=s.length;i--;)s[i].elem===this&&(e==null||s[i].queue===e)&&(s[i].anim.stop(n),t=!1,s.splice(i,1));(t||!n)&&jQuery.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=data_priv.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=jQuery.timers,o=r?r.length:0;n.finish=!0,jQuery.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this);for(t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){jQuery.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),jQuery.speed=function(e,t,n){var r=e&&typeof e=="object"?jQuery.extend({},e):{complete:n||!n&&t||jQuery.isFunction(e)&&e,duration:e,easing:n&&t||t&&!jQuery.isFunction(t)&&t};r.duration=jQuery.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in jQuery.fx.speeds?jQuery.fx.speeds[r.duration]:jQuery.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){jQuery.isFunction(r.old)&&r.old.call(this),r.queue&&jQuery.dequeue(this,r.queue)},r},jQuery.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},jQuery.timers=[],jQuery.fx=Tween.prototype.init,jQuery.fx.tick=function(){var e,t=jQuery.timers,n=0;fxNow=jQuery.now();for(;n<t.length;n++)e=t[n],!e()&&t[n]===e&&t.splice(n--,1);t.length||jQuery.fx.stop(),fxNow=undefined},jQuery.fx.timer=function(e){e()&&jQuery.timers.push(e)&&jQuery.fx.start()},jQuery.fx.interval=13,jQuery.fx.start=function(){timerId||(timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval))},jQuery.fx.stop=function(){clearInterval(timerId),timerId=null},jQuery.fx.speeds={slow:600,fast:200,_default:400},jQuery.fx.step={},jQuery.expr&&jQuery.expr.filters&&(jQuery.expr.filters.animated=function(e){return jQuery.grep(jQuery.timers,function(t){return e===t.elem}).length}),jQuery.fn.offset=function(e){if(arguments.length)return e===undefined?this:this.each(function(t){jQuery.offset.setOffset(this,e,t)});var t,n,r=this[0],i={top:0,left:0},s=r&&r.ownerDocument;if(!s)return;return t=s.documentElement,jQuery.contains(t,r)?(typeof r.getBoundingClientRect!==core_strundefined&&(i=r.getBoundingClientRect()),n=getWindow(s),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i},jQuery.offset={setOffset:function(e,t,n){var r,i,s,o,u,a,f,l=jQuery.css(e,"position"),c=jQuery(e),h={};l==="static"&&(e.style.position="relative"),u=c.offset(),s=jQuery.css(e,"top"),a=jQuery.css(e,"left"),f=(l==="absolute"||l==="fixed")&&(s+a).indexOf("auto")>-1,f?(r=c.position(),o=r.top,i=r.left):(o=parseFloat(s)||0,i=parseFloat(a)||0),jQuery.isFunction(t)&&(t=t.call(e,n,u)),t.top!=null&&(h.top=t.top-u.top+o),t.left!=null&&(h.left=t.left-u.left+i),"using"in t?t.using.call(e,h):c.css(h)}},jQuery.fn.extend({position:function(){if(!this[0])return;var e,t,n=this[0],r={top:0,left:0};return jQuery.css(n,"position")==="fixed"?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),jQuery.nodeName(e[0],"html")||(r=e.offset()),r.top+=jQuery.css(e[0],"borderTopWidth",!0),r.left+=jQuery.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-jQuery.css(n,"marginTop",!0),left:t.left-r.left-jQuery.css(n,"marginLeft",!0)}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||docElem;while(e&&!jQuery.nodeName(e,"html")&&jQuery.css(e,"position")==="static")e=e.offsetParent;return e||docElem})}}),jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;jQuery.fn[e]=function(r){return jQuery.access(this,function(e,r,i){var s=getWindow(e);if(i===undefined)return s?s[t]:e[r];s?s.scrollTo(n?window.pageXOffset:i,n?i:window.pageYOffset):e[r]=i},e,r,arguments.length,null)}}),jQuery.each({Height:"height",Width:"width"},function(e,t){jQuery.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){jQuery.fn[r]=function(r,i){var s=arguments.length&&(n||typeof r!="boolean"),o=n||(r===!0||i===!0?"margin":"border");return jQuery.access(this,function(t,n,r){var i;return jQuery.isWindow(t)?t.document.documentElement["client"+e]:t.nodeType===9?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):r===undefined?jQuery.css(t,n,o):jQuery.style(t,n,r,o)},t,s?r:undefined,s,null)}})}),jQuery.fn.size=function(){return this.length},jQuery.fn.andSelf=jQuery.fn.addBack,typeof module=="object"&&module&&typeof module.exports=="object"?module.exports=jQuery:typeof define=="function"&&define.amd&&define("jquery",[],function(){return jQuery}),typeof window=="object"&&typeof window.document=="object"&&(window.jQuery=window.$=jQuery),window.$=jQuery,function(e,t,n){function c(){s=t[o](function(){r.each(function(){var t=e(this),n=t.width(),r=t.height(),i=e.data(this,a);(n!==i.w||r!==i.h)&&t.trigger(u,[i.w=n,i.h=r])}),c()},i[f])}var r=e([]),i=e.resize=e.extend(e.resize,{}),s,o="setTimeout",u="resize",a=u+"-special-event",f="delay",l="throttleWindow";i[f]=250,i[l]=!0,e.event.special[u]={setup:function(){if(!i[l]&&this[o])return!1;var t=e(this);r=r.add(t),e.data(this,a,{w:t.width(),h:t.height()}),r.length===1&&c()},teardown:function(){if(!i[l]&&this[o])return!1;var t=e(this);r=r.not(t),t.removeData(a),r.length||clearTimeout(s)},add:function(t){function s(t,i,s){var o=e(this),u=e.data(this,a);u.w=i!==n?i:o.width(),u.h=s!==n?s:o.height(),r.apply(this,arguments)}if(!i[l]&&this[o])return!1;var r;if(e.isFunction(t))return r=t,s;r=t.handler,t.handler=s}}}(jQuery,this),jQuery}(window)}),define("backbone",["underscore","jquery"],function(e,t){return function(){var e=this,t=e.Backbone,n=[],r=n.push,i=n.slice,s=n.splice,o;typeof exports!="undefined"?o=exports:o=e.Backbone={},o.VERSION="1.0.0";var u=e._;!u&&typeof require!="undefined"&&(u=require("underscore")),o.$=e.jQuery||e.Zepto||e.ender||e.$,window.Backbone=o,o.noConflict=function(){return e.Backbone=t,this},o.emulateHTTP=!1,o.emulateJSON=!1;var a=o.Events={on:function(e,t,n){if(!l(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var r=this._events[e]||(this._events[e]=[]);return r.push({callback:t,context:n,ctx:n||this}),this},once:function(e,t,n){if(!l(this,"once",e,[t,n])||!t)return this;var r=this,i=u.once(function(){r.off(e,i),t.apply(this,arguments)});return i._callback=t,this.on(e,i,n)},off:function(e,t,n){var r,i,s,o,a,f,c,h;if(!this._events||!l(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events={},this;o=e?[e]:u.keys(this._events);for(a=0,f=o.length;a<f;a++){e=o[a];if(s=this._events[e]){this._events[e]=r=[];if(t||n)for(c=0,h=s.length;c<h;c++)i=s[c],(t&&t!==i.callback&&t!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[e]}}return this},trigger:function(e){if(!this._events)return this;var t=i.call(arguments,1);if(!l(this,"trigger",e,t))return this;var n=this._events[e],r=this._events.all;return n&&c(n,t),r&&c(r,arguments),this},stopListening:function(e,t,n){var r=this._listeners;if(!r)return this;var i=!t&&!n;typeof t=="object"&&(n=this),e&&((r={})[e._listenerId]=e);for(var s in r)r[s].off(t,n,this),i&&delete this._listeners[s];return this}},f=/\s+/,l=function(e,t,n,r){if(!n)return!0;if(typeof n=="object"){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(f.test(n)){var s=n.split(f);for(var o=0,u=s.length;o<u;o++)e[t].apply(e,[s[o]].concat(r));return!1}return!0},c=function(e,t){var n,r=-1,i=e.length,s=t[0],o=t[1],u=t[2];switch(t.length){case 0:while(++r<i)(n=e[r]).callback.call(n.ctx);return;case 1:while(++r<i)(n=e[r]).callback.call(n.ctx,s);return;case 2:while(++r<i)(n=e[r]).callback.call(n.ctx,s,o);return;case 3:while(++r<i)(n=e[r]).callback.call(n.ctx,s,o,u);return;default:while(++r<i)(n=e[r]).callback.apply(n.ctx,t)}},h={listenTo:"on",listenToOnce:"once"};u.each(h,function(e,t){a[t]=function(t,n,r){var i=this._listeners||(this._listeners={}),s=t._listenerId||(t._listenerId=u.uniqueId("l"));return i[s]=t,typeof n=="object"&&(r=this),t[e](n,r,this),this}}),a.bind=a.on,a.unbind=a.off,u.extend(o,a);var p=o.Model=function(e,t){var n,r=e||{};t||(t={}),this.cid=u.uniqueId("c"),this.attributes={},u.extend(this,u.pick(t,d)),t.parse&&(r=this.parse(r,t)||{});if(n=u.result(this,"defaults"))r=u.defaults({},r,n);this.set(r,t),this.changed={},this.initialize.apply(this,arguments)},d=["url","urlRoot","collection"];u.extend(p.prototype,a,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return u.clone(this.attributes)},sync:function(){return o.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return u.escape(this.get(e))},has:function(e){return this.get(e)!=null},set:function(e,t,n){var r,i,s,o,a,f,l,c;if(e==null)return this;typeof e=="object"?(i=e,n=t):(i={})[e]=t,n||(n={});if(!this._validate(i,n))return!1;s=n.unset,a=n.silent,o=[],f=this._changing,this._changing=!0,f||(this._previousAttributes=u.clone(this.attributes),this.changed={}),c=this.attributes,l=this._previousAttributes,this.idAttribute in i&&(this.id=i[this.idAttribute]);for(r in i)t=i[r],u.isEqual(c[r],t)||o.push(r),u.isEqual(l[r],t)?delete this.changed[r]:this.changed[r]=t,s?delete c[r]:c[r]=t;if(!a){o.length&&(this._pending=!0);for(var h=0,p=o.length;h<p;h++)this.trigger("change:"+o[h],this,c[o[h]],n)}if(f)return this;if(!a)while(this._pending)this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,u.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var n in this.attributes)t[n]=void 0;return this.set(t,u.extend({},e,{unset:!0}))},hasChanged:function(e){return e==null?!u.isEmpty(this.changed):u.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?u.clone(this.changed):!1;var t,n=!1,r=this._changing?this._previousAttributes:this.attributes;for(var i in e){if(u.isEqual(r[i],t=e[i]))continue;(n||(n={}))[i]=t}return n},previous:function(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]},previousAttributes:function(){return u.clone(this._previousAttributes)},fetch:function(e){e=e?u.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=this,n=e.success;return e.success=function(r){if(!t.set(t.parse(r,e),e))return!1;n&&n(t,r,e),t.trigger("sync",t,r,e)},j(this,e),this.sync("read",this,e)},save:function(e,t,n){var r,i,s,o=this.attributes;e==null||typeof e=="object"?(r=e,n=t):(r={})[e]=t;if(r&&(!n||!n.wait)&&!this.set(r,n))return!1;n=u.extend({validate:!0},n);if(!this._validate(r,n))return!1;r&&n.wait&&(this.attributes=u.extend({},o,r)),n.parse===void 0&&(n.parse=!0);var a=this,f=n.success;return n.success=function(e){a.attributes=o;var t=a.parse(e,n);n.wait&&(t=u.extend(r||{},t));if(u.isObject(t)&&!a.set(t,n))return!1;f&&f(a,e,n),a.trigger("sync",a,e,n)},j(this,n),i=this.isNew()?"create":n.patch?"patch":"update",i==="patch"&&(n.attrs=r),s=this.sync(i,this,n),r&&n.wait&&(this.attributes=o),s},destroy:function(e){e=e?u.clone(e):{};var t=this,n=e.success,r=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(i){(e.wait||t.isNew())&&r(),n&&n(t,i,e),t.isNew()||t.trigger("sync",t,i,e)};if(this.isNew())return e.success(),!1;j(this,e);var i=this.sync("delete",this,e);return e.wait||r(),i},url:function(){var e=u.result(this,"urlRoot")||u.result(this.collection,"url")||B();return this.isNew()?e:e+(e.charAt(e.length-1)==="/"?"":"/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return this.id==null},isValid:function(e){return this._validate({},u.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=u.extend({},this.attributes,e);var n=this.validationError=this.validate(e,t)||null;return n?(this.trigger("invalid",this,n,u.extend(t||{},{validationError:n})),!1):!0}});var v=["keys","values","pairs","invert","pick","omit"];u.each(v,function(e){p.prototype[e]=function(){var t=i.call(arguments);return t.unshift(this.attributes),u[e].apply(u,t)}});var m=o.Collection=function(e,t){t||(t={}),t.url&&(this.url=t.url),t.model&&(this.model=t.model),t.comparator!==void 0&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,u.extend({silent:!0},t))},g={add:!0,remove:!0,merge:!0},y={add:!0,merge:!1,remove:!1};u.extend(m.prototype,a,{model:p,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return o.sync.apply(this,arguments)},add:function(e,t){return this.set(e,u.defaults(t||{},y))},remove:function(e,t){e=u.isArray(e)?e.slice():[e],t||(t={});var n,r,i,s;for(n=0,r=e.length;n<r;n++){s=this.get(e[n]);if(!s)continue;delete this._byId[s.id],delete this._byId[s.cid],i=this.indexOf(s),this.models.splice(i,1),this.length--,t.silent||(t.index=i,s.trigger("remove",s,this,t)),this._removeReference(s)}return this},set:function(e,t){t=u.defaults(t||{},g),t.parse&&(e=this.parse(e,t)),u.isArray(e)||(e=e?[e]:[]);var n,i,o,a,f,l,c=t.at,h=this.comparator&&c==null&&t.sort!==!1,p=u.isString(this.comparator)?this.comparator:null,d=[],v=[],m={};for(n=0,i=e.length;n<i;n++){if(!(o=this._prepareModel(e[n],t)))continue;(f=this.get(o))?(t.remove&&(m[f.cid]=!0),t.merge&&(f.set(o.attributes,t),h&&!l&&f.hasChanged(p)&&(l=!0))):t.add&&(d.push(o),o.on("all",this._onModelEvent,this),this._byId[o.cid]=o,o.id!=null&&(this._byId[o.id]=o))}if(t.remove){for(n=0,i=this.length;n<i;++n)m[(o=this.models[n]).cid]||v.push(o);v.length&&this.remove(v,t)}d.length&&(h&&(l=!0),this.length+=d.length,c!=null?s.apply(this.models,[c,0].concat(d)):r.apply(this.models,d)),l&&this.sort({silent:!0});if(t.silent)return this;for(n=0,i=d.length;n<i;n++)(o=d[n]).trigger("add",o,this,t);return l&&this.trigger("sort",this,t),this},reset:function(e,t){t||(t={});for(var n=0,r=this.models.length;n<r;n++)this._removeReference(this.models[n]);return t.previousModels=this.models,this._reset(),this.add(e,u.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),this},push:function(e,t){return e=this._prepareModel(e,t),this.add(e,u.extend({at:this.length},t)),e},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return e=this._prepareModel(e,t),this.add(e,u.extend({at:0},t)),e},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(e,t){return this.models.slice(e,t)},get:function(e){return e==null?void 0:this._byId[e.id!=null?e.id:e.cid||e]},at:function(e){return this.models[e]},where:function(e,t){return u.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),u.isString(this.comparator)||this.comparator.length===1?this.models=this.sortBy(this.comparator,this):this.models.sort(u.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},sortedIndex:function(e,t,n){t||(t=this.comparator);var r=u.isFunction(t)?t:function(e){return e.get(t)};return u.sortedIndex(this.models,e,r,n)},pluck:function(e){return u.invoke(this.models,"get",e)},fetch:function(e){e=e?u.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=e.success,n=this;return e.success=function(r){var i=e.reset?"reset":"set";n[i](r,e),t&&t(n,r,e),n.trigger("sync",n,r,e)},j(this,e),this.sync("read",this,e)},create:function(e,t){t=t?u.clone(t):{};if(!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var n=this,r=t.success;return t.success=function(i){t.wait&&n.add(e,t),r&&r(e,i,t)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof p)return e.collection||(e.collection=this),e;t||(t={}),t.collection=this;var n=new this.model(e,t);return n._validate(e,t)?n:(this.trigger("invalid",this,e,t),!1)},_removeReference:function(e){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if((e==="add"||e==="remove")&&n!==this)return;e==="destroy"&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],t.id!=null&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments)}});var b=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];u.each(b,function(e){m.prototype[e]=function(){var t=i.call(arguments);return t.unshift(this.models),u[e].apply(u,t)}});var w=["groupBy","countBy","sortBy"];u.each(w,function(e){m.prototype[e]=function(t,n){var r=u.isFunction(t)?t:function(e){return e.get(t)};return u[e](this.models,r,n)}});var E=o.View=function(e){this.cid=u.uniqueId("view"),this._configure(e||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},S=/^(\S+)\s*(.*)$/,x=["model","collection","el","id","attributes","className","tagName","events"];u.extend(E.prototype,a,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,t){return this.$el&&this.undelegateEvents(),this.$el=e instanceof o.$?e:o.$(e),this.el=this.$el[0],t!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=u.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var n=e[t];u.isFunction(n)||(n=this[e[t]]);if(!n)continue;var r=t.match(S),i=r[1],s=r[2];n=u.bind(n,this),i+=".delegateEvents"+this.cid,s===""?this.$el.on(i,n):this.$el.on(i,s,n)}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(e){this.options&&(e=u.extend({},u.result(this,"options"),e)),u.extend(this,u.pick(e,x)),this.options=e},_ensureElement:function(){if(!this.el){var e=u.extend({},u.result(this,"attributes"));this.id&&(e.id=u.result(this,"id")),this.className&&(e["class"]=u.result(this,"className"));var t=o.$("<"+u.result(this,"tagName")+">").attr(e);this.setElement(t,!1)}else this.setElement(u.result(this,"el"),!1)}}),o.sync=function(e,t,n){var r=T[e];u.defaults(n||(n={}),{emulateHTTP:o.emulateHTTP,emulateJSON:o.emulateJSON});var i={type:r,dataType:"json"};n.url||(i.url=u.result(t,"url")||B()),n.data==null&&t&&(e==="create"||e==="update"||e==="patch")&&(i.contentType="application/json",i.data=JSON.stringify(n.attrs||t.toJSON(n))),n.emulateJSON&&(i.contentType="application/x-www-form-urlencoded",i.data=i.data?{model:i.data}:{});if(n.emulateHTTP&&(r==="PUT"||r==="DELETE"||r==="PATCH")){i.type="POST",n.emulateJSON&&(i.data._method=r);var s=n.beforeSend;n.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",r);if(s)return s.apply(this,arguments)}}i.type!=="GET"&&!n.emulateJSON&&(i.processData=!1),i.type==="PATCH"&&window.ActiveXObject&&(!window.external||!window.external.msActiveXFilteringEnabled)&&(i.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var a=n.xhr=o.ajax(u.extend(i,n));return t.trigger("request",t,a,n),a};var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};o.ajax=function(){return o.$.ajax.apply(o.$,arguments)};var N=o.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},C=/\((.*?)\)/g,k=/(\(\?)?:\w+/g,L=/\*\w+/g,A=/[\-{}\[\]+?.,\\\^$|#\s]/g;u.extend(N.prototype,a,{initialize:function(){},route:function(e,t,n){u.isRegExp(e)||(e=this._routeToRegExp(e)),u.isFunction(t)&&(n=t,t=""),n||(n=this[t]);var r=this;return o.history.route(e,function(i){var s=r._extractParameters(e,i);n&&n.apply(r,s),r.trigger.apply(r,["route:"+t].concat(s)),r.trigger("route",t,s),o.history.trigger("route",r,t,s)}),this},navigate:function(e,t){return o.history.navigate(e,t),this},_bindRoutes:function(){if(!this.routes)return;this.routes=u.result(this,"routes");var e,t=u.keys(this.routes);while((e=t.pop())!=null)this.route(e,this.routes[e])},_routeToRegExp:function(e){return e=e.replace(A,"\\$&").replace(C,"(?:$1)?").replace(k,function(e,t){return t?e:"([^/]+)"}).replace(L,"(.*?)"),new RegExp("^"+e+"$")},_extractParameters:function(e,t){var n=e.exec(t).slice(1);return u.map(n,function(e){return e?decodeURIComponent(e):null})}});var O=o.History=function(){this.handlers=[],u.bindAll(this,"checkUrl"),typeof window!="undefined"&&(this.location=window.location,this.history=window.history)},M=/^[#\/]|\s+$/g,_=/^\/+|\/+$/g,D=/msie [\w.]+/,P=/\/$/;O.started=!1,u.extend(O.prototype,a,{interval:50,getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(e==null)if(this._hasPushState||!this._wantsHashChange||t){e=this.location.pathname;var n=this.root.replace(P,"");e.indexOf(n)||(e=e.substr(n.length))}else e=this.getHash();return e.replace(M,"")},start:function(e){if(O.started)throw new Error("Backbone.history has already been started");O.started=!0,this.options=u.extend({},{root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var t=this.getFragment(),n=document.documentMode,r=D.exec(navigator.userAgent.toLowerCase())&&(!n||n<=7);this.root=("/"+this.root+"/").replace(_,"/"),r&&this._wantsHashChange&&(this.iframe=o.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(t)),this._hasPushState?o.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!r?o.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=t;var i=this.location,s=i.pathname.replace(/[^\/]$/,"$&/")===this.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!s)return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0;this._wantsPushState&&this._hasPushState&&s&&i.hash&&(this.fragment=this.getHash().replace(M,""),this.history.replaceState({},document.title,this.root+this.fragment+i.search));if(!this.options.silent)return this.loadUrl()},stop:function(){o.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),O.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe)));if(t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(e){var t=this.fragment=this.getFragment(e),n=u.any(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0});return n},navigate:function(e,t){if(!O.started)return!1;if(!t||t===!0)t={trigger:t};e=this.getFragment(e||"");if(this.fragment===e)return;this.fragment=e;var n=this.root+e;if(this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}t.trigger&&this.loadUrl(e)},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),o.history=new O;var H=function(e,t){var n=this,r;e&&u.has(e,"constructor")?r=e.constructor:r=function(){return n.apply(this,arguments)},u.extend(r,n,t);var i=function(){this.constructor=r};return i.prototype=n.prototype,r.prototype=new i,e&&u.extend(r.prototype,e),r.__super__=n.prototype,r};p.extend=m.extend=N.extend=E.extend=O.extend=H;var B=function(){throw new Error('A "url" property or function must be specified')},j=function(e,t){var n=t.error;t.error=function(r){n&&n(e,r,t),e.trigger("error",e,r,t)}}}(),Backbone}),define("backbone.wreqr",["backbone"],function(e){return e.Wreqr=function(e,t,n){var r={};return r.Handlers=function(e,t){var n=function(e){this.options=e,this._wreqrHandlers={},t.isFunction(this.initialize)&&this.initialize(e)};return n.extend=e.Model.extend,t.extend(n.prototype,e.Events,{setHandlers:function(e){t.each(e,function(e,n){var r=null;t.isObject(e)&&!t.isFunction(e)&&(r=e.context,e=e.callback),this.setHandler(n,e,r)},this)},setHandler:function(e,t,n){var r={callback:t,context:n};this._wreqrHandlers[e]=r,this.trigger("handler:add",e,t,n)},hasHandler:function(e){return!!this._wreqrHandlers[e]},getHandler:function(e){var t=this._wreqrHandlers[e];if(!t)throw new Error("Handler not found for '"+e+"'");return function(){var e=Array.prototype.slice.apply(arguments);return t.callback.apply(t.context,e)}},removeHandler:function(e){delete this._wreqrHandlers[e]},removeAllHandlers:function(){this._wreqrHandlers={}}}),n}(e,n),r.CommandStorage=function(){var t=function(e){this.options=e,this._commands={},n.isFunction(this.initialize)&&this.initialize(e)};return n.extend(t.prototype,e.Events,{getCommands:function(e){var t=this._commands[e];return t||(t={command:e,instances:[]},this._commands[e]=t),t},addCommand:function(e,t){var n=this.getCommands(e);n.instances.push(t)},clearCommands:function(e){var t=this.getCommands(e);t.instances=[]}}),t}(),r.Commands=function(e){return e.Handlers.extend({storageType:e.CommandStorage,constructor:function(t){this.options=t||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this);var n=Array.prototype.slice.call(arguments);e.Handlers.prototype.constructor.apply(this,n)},execute:function(e,t){e=arguments[0],t=Array.prototype.slice.call(arguments,1),this.hasHandler(e)?this.getHandler(e).apply(this,t):this.storage.addCommand(e,t)},_executeCommands:function(e,t,r){var i=this.storage.getCommands(e);n.each(i.instances,function(e){t.apply(r,e)}),this.storage.clearCommands(e)},_initializeStorage:function(e){var t,r=e.storageType||this.storageType;n.isFunction(r)?t=new r:t=r,this.storage=t}})}(r),r.RequestResponse=function(e){return e.Handlers.extend({request:function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return this.getHandler(e).apply(this,t)}})}(r),r.EventAggregator=function(e,t){var n=function(){};return n.extend=e.Model.extend,t.extend(n.prototype,e.Events),n}(e,n),r}(e,e.Marionette,_)}),define("backbone.babysitter",["backbone"],function(e){return e.ChildViewContainer=function(e,t){var n=function(e){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),t.each(e,this.add,this)};t.extend(n.prototype,{add:function(e,t){var n=e.cid;this._views[n]=e,e.model&&(this._indexByModel[e.model.cid]=n),t&&(this._indexByCustom[t]=n),this._updateLength()},findByModel:function(e){return this.findByModelCid(e.cid)},findByModelCid:function(e){var t=this._indexByModel[e];return this.findByCid(t)},findByCustom:function(e){var t=this._indexByCustom[e];return this.findByCid(t)},findByIndex:function(e){return t.values(this._views)[e]},findByCid:function(e){return this._views[e]},remove:function(e){var n=e.cid;e.model&&delete this._indexByModel[e.model.cid],t.any(this._indexByCustom,function(e,t){if(e===n)return delete this._indexByCustom[t],!0},this),delete this._views[n],this._updateLength()},call:function(e){this.apply(e,t.tail(arguments))},apply:function(e,n){t.each(this._views,function(r){t.isFunction(r[e])&&r[e].apply(r,n||[])})},_updateLength:function(){this.length=t.size(this._views)}});var r=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck"];return t.each(r,function(e){n.prototype[e]=function(){var n=t.values(this._views),r=[n].concat(t.toArray(arguments));return t[e].apply(t,r)}}),n}(e,_)}),function(e,t){if(typeof exports=="object"){var n=require("underscore"),r=require("backbone"),i=require("backbone.wreqr"),s=require("backbone.babysitter");module.exports=t(n,r,i,s)}else typeof define=="function"&&define.amd&&define("marionette",["underscore","backbone","backbone.wreqr","backbone.babysitter"],t)}(this,function(e,t){var n=function(e,t,n){function s(e){return i.call(e)}function o(e,t){var n=new Error(e);throw n.name=t||"Error",n}var r={};t.Marionette=r,r.$=t.$;var i=Array.prototype.slice;return r.extend=t.Model.extend,r.getOption=function(e,t){if(!e||!t)return;var n;return e.options&&t in e.options&&e.options[t]!==undefined?n=e.options[t]:n=e[t],n},r.triggerMethod=function(){function t(e,t,n){return n.toUpperCase()}var e=/(^|:)(\w)/gi,r=function(r){var i="on"+r.replace(e,t),s=this[i];n.isFunction(this.trigger)&&this.trigger.apply(this,arguments);if(n.isFunction(s))return s.apply(this,n.tail(arguments))};return r}(),r.MonitorDOMRefresh=function(){function e(e){e._isShown=!0,r(e)}function t(e){e._isRendered=!0,r(e)}function r(e){e._isShown&&e._isRendered&&n.isFunction(e.triggerMethod)&&e.triggerMethod("dom:refresh")}return function(n){n.listenTo(n,"show",function(){e(n)}),n.listenTo(n,"render",function(){t(n)})}}(),function(e){function t(e,t,r,i){var s=i.split(/\s+/);n.each(s,function(n){var i=e[n];i||o("Method '"+n+"' was configured as an event handler, but does not exist."),e.listenTo(t,r,i,e)})}function r(e,t,n,r){e.listenTo(t,n,r,e)}function i(e,t,r,i){var s=i.split(/\s+/);n.each(s,function(n){var i=e[n];e.stopListening(t,r,i,e)})}function s(e,t,n,r){e.stopListening(t,n,r,e)}function u(e,t,r,i,s){if(!t||!r)return;n.isFunction(r)&&(r=r.call(e)),n.each(r,function(r,o){n.isFunction(r)?i(e,t,o,r):s(e,t,o,r)})}e.bindEntityEvents=function(e,n,i){u(e,n,i,r,t)},e.unbindEntityEvents=function(e,t,n){u(e,t,n,s,i)}}(r),r.Callbacks=function(){this._deferred=r.$.Deferred(),this._callbacks=[]},n.extend(r.Callbacks.prototype,{add:function(e,t){this._callbacks.push({cb:e,ctx:t}),this._deferred.done(function(n,r){t&&(n=t),e.call(n,r)})},run:function(e,t){this._deferred.resolve(t,e)},reset:function(){var e=this._callbacks;this._deferred=r.$.Deferred(),this._callbacks=[],n.each(e,function(e){this.add(e.cb,e.ctx)},this)}}),r.Controller=function(e){this.triggerMethod=r.triggerMethod,this.options=e||{},n.isFunction(this.initialize)&&this.initialize(this.options)},r.Controller.extend=r.extend,n.extend(r.Controller.prototype,t.Events,{close:function(){this.stopListening(),this.triggerMethod("close"),this.unbind()}}),r.Region=function(e){this.options=e||{},this.el=r.getOption(this,"el");if(!this.el){var t=new Error("An 'el' must be specified for a region.");throw t.name="NoElError",t}if(this.initialize){var n=Array.prototype.slice.apply(arguments);this.initialize.apply(this,n)}},n.extend(r.Region,{buildRegion:function(e,t){var r=typeof e=="string",i=typeof e.selector=="string",s=typeof e.regionType=="undefined",o=typeof e=="function";if(!o&&!r&&!i)throw new Error("Region must be specified as a Region type, a selector string or an object with selector property");var u,a;r&&(u=e),e.selector&&(u=e.selector),o&&(a=e),!o&&s&&(a=t),e.regionType&&(a=e.regionType);var f=new a({el:u});return e.parentEl&&(f.getEl=function(t){var r=e.parentEl;return n.isFunction(r)&&(r=r()),r.find(t)}),f}}),n.extend(r.Region.prototype,t.Events,{show:function(e){this.ensureEl();var t=e.isClosed||n.isUndefined(e.$el),i=e!==this.currentView;i&&this.close(),e.render(),(i||t)&&this.open(e),this.currentView=e,r.triggerMethod.call(this,"show",e),r.triggerMethod.call(e,"show")},ensureEl:function(){if(!this.$el||this.$el.length===0)this.$el=this.getEl(this.el)},getEl:function(e){return r.$(e)},open:function(e){this.$el.empty().append(e.el)},close:function(){var e=this.currentView;if(!e||e.isClosed)return;e.close?e.close():e.remove&&e.remove(),r.triggerMethod.call(this,"close"),delete this.currentView},attachView:function(e){this.currentView=e},reset:function(){this.close(),delete this.$el}}),r.Region.extend=r.extend,r.RegionManager=function(e){var t=e.Controller.extend({constructor:function(t){this._regions={},e.Controller.prototype.constructor.call(this,t)},addRegions:function(e,t){var r={};return n.each(e,function(e,i){typeof e=="string"&&(e={selector:e}),e.selector&&(e=n.defaults({},e,t));var s=this.addRegion(i,e);r[i]=s},this),r},addRegion:function(t,r){var i,s=n.isObject(r),o=n.isString(r),u=!!r.selector;return o||s&&u?i=e.Region.buildRegion(r,e.Region):n.isFunction(r)?i=e.Region.buildRegion(r,e.Region):i=r,this._store(t,i),this.triggerMethod("region:add",t,i),i},get:function(e){return this._regions[e]},removeRegion:function(e){var t=this._regions[e];this._remove(e,t)},removeRegions:function(){n.each(this._regions,function(e,t){this._remove(t,e)},this)},closeRegions:function(){n.each(this._regions,function(e,t){e.close()},this)},close:function(){this.removeRegions();var t=Array.prototype.slice.call(arguments);e.Controller.prototype.close.apply(this,t)},_store:function(e,t){this._regions[e]=t,this._setLength()},_remove:function(e,t){t.close(),delete this._regions[e],this._setLength(),this.triggerMethod("region:remove",e,t)},_setLength:function(){this.length=n.size(this._regions)}}),r=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck"];return n.each(r,function(e){t.prototype[e]=function(){var t=n.values(this._regions),r=[t].concat(n.toArray(arguments));return n[e].apply(n,r)}}),t}(r),r.TemplateCache=function(e){this.templateId=e},n.extend(r.TemplateCache,{templateCaches:{},get:function(e){var t=this.templateCaches[e];return t||(t=new r.TemplateCache(e),this.templateCaches[e]=t),t.load()},clear:function(){var e,t=s(arguments),n=t.length;if(n>0)for(e=0;e<n;e++)delete this.templateCaches[t[e]];else this.templateCaches={}}}),n.extend(r.TemplateCache.prototype,{load:function(){if(this.compiledTemplate)return this.compiledTemplate;var e=this.loadTemplate(this.templateId);return this.compiledTemplate=this.compileTemplate(e),this.compiledTemplate},loadTemplate:function(e){var t=window.App.helpers.unescape(r.$(e).html());return(!t||t.length===0)&&o("Could not find template: '"+e+"'","NoTemplateError"),t},compileTemplate:function(e){return n.template(e)}}),r.Renderer={render:function(e,t){if(!e){var n=new Error("Cannot render the template since it's false, null or undefined.");throw n.name="TemplateNotFoundError",n}var i;return typeof e=="function"?i=e:i=r.TemplateCache.get(e),i(t)}},r.View=t.View.extend({constructor:function(){n.bindAll(this,"render");var e=Array.prototype.slice.apply(arguments);t.View.prototype.constructor.apply(this,e),r.MonitorDOMRefresh(this),this.listenTo(this,"show",this.onShowCalled,this)},triggerMethod:r.triggerMethod,getTemplate:function(){return r.getOption(this,"template")},mixinTemplateHelpers:function(e){e=e||{};var t=r.getOption(this,"templateHelpers");return n.isFunction(t)&&(t=t.call(this)),n.extend(e,t)},configureTriggers:function(){if(!this.triggers)return;var e={},t=n.result(this,"triggers");return n.each(t,function(t,n){e[n]=function(e){e&&e.preventDefault&&e.preventDefault(),e&&e.stopPropagation&&e.stopPropagation();var n={view:this,model:this.model,collection:this.collection};this.triggerMethod(t,n)}},this),e},delegateEvents:function(e){this._delegateDOMEvents(e),r.bindEntityEvents(this,this.model,r.getOption(this,"modelEvents")),r.bindEntityEvents(this,this.collection,r.getOption(this,"collectionEvents"))},_delegateDOMEvents:function(e){e=e||this.events,n.isFunction(e)&&(e=e.call(this));var r={},i=this.configureTriggers();n.extend(r,e,i),t.View.prototype.delegateEvents.call(this,r)},undelegateEvents:function(){var e=Array.prototype.slice.call(arguments);t.View.prototype.undelegateEvents.apply(this,e),r.unbindEntityEvents(this,this.model,r.getOption(this,"modelEvents")),r.unbindEntityEvents(this,this.collection,r.getOption(this,"collectionEvents"))},onShowCalled:function(){},close:function(){if(this.isClosed)return;var e=this.triggerMethod("before:close");if(e===!1)return;this.isClosed=!0,this.triggerMethod("close"),this.unbindUIElements(),this.remove()},bindUIElements:function(){if(!this.ui)return;this._uiBindings||(this._uiBindings=this.ui);var e=n.result(this,"_uiBindings");this.ui={},n.each(n.keys(e),function(t){var n=e[t];this.ui[t]=this.$(n)},this)},unbindUIElements:function(){if(!this.ui||!this._uiBindings)return;n.each(this.ui,function(e,t){delete this.ui[t]},this),this.ui=this._uiBindings,delete this._uiBindings}}),r.ItemView=r.View.extend({constructor:function(){r.View.prototype.constructor.apply(this,s(arguments))},serializeData:function(){var e={};return this.model?e=this.model.toJSON():this.collection&&(e={items:this.collection.toJSON()}),e},render:function(){this.isClosed=!1,this.triggerMethod("before:render",this),this.triggerMethod("item:before:render",this);var e=this.serializeData();e=this.mixinTemplateHelpers(e);var t=this.getTemplate(),n=r.Renderer.render(t,e);return this.$el.html(n),this.bindUIElements(),this.triggerMethod("render",this),this.triggerMethod("item:rendered",this),this},close:function(){if(this.isClosed)return;this.triggerMethod("item:before:close"),r.View.prototype.close.apply(this,s(arguments)),this.triggerMethod("item:closed")}}),r.CollectionView=r.View.extend({itemViewEventPrefix:"itemview",constructor:function(e){this._initChildViewStorage(),r.View.prototype.constructor.apply(this,s(arguments)),this._initialEvents()},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this.addChildView,this),this.listenTo(this.collection,"remove",this.removeItemView,this),this.listenTo(this.collection,"reset",this.render,this))},addChildView:function(e,t,n){this.closeEmptyView();var r=this.getItemView(e),i=this.collection.indexOf(e);this.addItemView(e,r,i)},onShowCalled:function(){this.children.each(function(e){r.triggerMethod.call(e,"show")})},triggerBeforeRender:function(){this.triggerMethod("before:render",this),this.triggerMethod("collection:before:render",this)},triggerRendered:function(){this.triggerMethod("render",this),this.triggerMethod("collection:rendered",this)},render:function(){return this.isClosed=!1,this.triggerBeforeRender(),this._renderChildren(),this.triggerRendered(),this},_renderChildren:function(){this.closeEmptyView(),this.closeChildren(),this.collection&&this.collection.length>0?this.showCollection():this.showEmptyView()},showCollection:function(){var e;this.collection.each(function(t,n){e=this.getItemView(t),this.addItemView(t,e,n)},this)},showEmptyView:function(){var e=r.getOption(this,"emptyView");if(e&&!this._showingEmptyView){this._showingEmptyView=!0;var n=new t.Model;this.addItemView(n,e,0)}},closeEmptyView:function(){this._showingEmptyView&&(this.closeChildren(),delete this._showingEmptyView)},getItemView:function(e){var t=r.getOption(this,"itemView");return t||o("An `itemView` must be specified","NoItemViewError"),t},addItemView:function(e,t,i){var s=r.getOption(this,"itemViewOptions");n.isFunction(s)&&(s=s.call(this,e,i));var o=this.buildItemView(e,t,s);this.addChildViewEventForwarding(o),this.triggerMethod("before:item:added",o),this.children.add(o),this.renderItemView(o,i),this._isShown&&r.triggerMethod.call(o,"show"),this.triggerMethod("after:item:added",o)},addChildViewEventForwarding:function(e){var t=r.getOption(this,"itemViewEventPrefix");this.listenTo(e,"all",function(){var n=s(arguments);n[0]=t+":"+n[0],n.splice(1,0,e),r.triggerMethod.apply(this,n)},this)},renderItemView:function(e,t){e.render(),this.appendHtml(this,e,t)},buildItemView:function(e,t,r){var i=n.extend({model:e},r);return new t(i)},removeItemView:function(e){var t=this.children.findByModel(e);this.removeChildView(t),this.checkEmpty()},removeChildView:function(e){e&&(this.stopListening(e),e.close?e.close():e.remove&&e.remove(),this.children.remove(e)),this.triggerMethod("item:removed",e)},checkEmpty:function(){(!this.collection||this.collection.length===0)&&this.showEmptyView()},appendHtml:function(e,t,n){e.$el.append(t.el)},_initChildViewStorage:function(){this.children=new t.ChildViewContainer},close:function(){if(this.isClosed)return;this.triggerMethod("collection:before:close"),this.closeChildren(),this.triggerMethod("collection:closed"),r.View.prototype.close.apply(this,s(arguments))},closeChildren:function(){this.children.each(function(e){this.removeChildView(e)},this),this.checkEmpty()}}),r.CompositeView=r.CollectionView.extend({constructor:function(){r.CollectionView.prototype.constructor.apply(this,s(arguments))},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this.addChildView,this),this.listenTo(this.collection,"remove",this.removeItemView,this),this.listenTo(this.collection,"reset",this._renderChildren,this))},getItemView:function(e){var t=r.getOption(this,"itemView")||this.constructor;return t||o("An `itemView` must be specified","NoItemViewError"),t},serializeData:function(){var e={};return this.model&&(e=this.model.toJSON()),e},render:function(){this.isRendered=!0,this.isClosed=!1,this.resetItemViewContainer(),this.triggerBeforeRender();var e=this.renderModel();return this.$el.html(e),this.bindUIElements(),this.triggerMethod("composite:model:rendered"),this._renderChildren(),this.triggerMethod("composite:rendered"),this.triggerRendered(),this},_renderChildren:function(){this.isRendered&&(r.CollectionView.prototype._renderChildren.call(this),this.triggerMethod("composite:collection:rendered"))},renderModel:function(){var e={};e=this.serializeData(),e=this.mixinTemplateHelpers(e);var t=this.getTemplate();return r.Renderer.render(t,e)},appendHtml:function(e,t,n){var r=this.getItemViewContainer(e);r.append(t.el)},getItemViewContainer:function(e){if("$itemViewContainer"in e)return e.$itemViewContainer;var t,i=r.getOption(e,"itemViewContainer");if(i){var s=n.isFunction(i)?i():i;t=e.$(s),t.length<=0&&o("The specified `itemViewContainer` was not found: "+e.itemViewContainer,"ItemViewContainerMissingError")}else t=e.$el;return e.$itemViewContainer=t,t},resetItemViewContainer:function(){this.$itemViewContainer&&delete this.$itemViewContainer}}),r.Layout=r.ItemView.extend({regionType:r.Region,constructor:function(e){e=e||{},this._firstRender=!0,this._initializeRegions(e),r.ItemView.prototype.constructor.call(this,e)},render:function(){this.isClosed&&this._initializeRegions(),this._firstRender?this._firstRender=!1:this.isClosed||this._reInitializeRegions();var e=Array.prototype.slice.apply(arguments),t=r.ItemView.prototype.render.apply(this,e);return t},close:function(){if(this.isClosed)return;this.regionManager.close();var e=Array.prototype.slice.apply(arguments);r.ItemView.prototype.close.apply(this,e)},addRegion:function(e,t){var n={};return n[e]=t,this._buildRegions(n)[e]},addRegions:function(e){return this.regions=n.extend({},this.regions,e),this._buildRegions(e)},removeRegion:function(e){return delete this.regions[e],this.regionManager.removeRegion(e)},_buildRegions:function(e){var t=this,n={regionType:r.getOption(this,"regionType"),parentEl:function(){return t.$el}};return this.regionManager.addRegions(e,n)},_initializeRegions:function(e){var t;this._initRegionManager(),n.isFunction(this.regions)?t=this.regions(e):t=this.regions||{},this.addRegions(t)},_reInitializeRegions:function(){this.regionManager.closeRegions(),this.regionManager.each(function(e){e.reset()})},_initRegionManager:function(){this.regionManager=new r.RegionManager,this.listenTo(this.regionManager,"region:add",function(e,t){this[e]=t,this.trigger("region:add",e,t)}),this.listenTo(this.regionManager,"region:remove",function(e,t){delete this[e],this.trigger("region:remove",e,t)})}}),r.AppRouter=t.Router.extend({constructor:function(e){t.Router.prototype.constructor.apply(this,s(arguments)),this.options=e||{};var n=r.getOption(this,"appRoutes"),i=this._getController();this.processAppRoutes(i,n)},appRoute:function(e,t){var n=this._getController();this._addAppRoute(n,e,t)},processAppRoutes:function(e,t){if(!t)return;var r=n.keys(t).reverse();n.each(r,function(n){this._addAppRoute(e,n,t[n])},this)},_getController:function(){return r.getOption(this,"controller")},_addAppRoute:function(e,t,r){var i=e[r];if(!i)throw new Error("Method '"+r+"' was not found on the controller");this.route(t,r,n.bind(i,e))}}),r.Application=function(e){this._initRegionManager(),this._initCallbacks=new r.Callbacks,this.vent=new t.Wreqr.EventAggregator,this.commands=new t.Wreqr.Commands,this.reqres=new t.Wreqr.RequestResponse,this.submodules={},n.extend(this,e),this.triggerMethod=r.triggerMethod},n.extend(r.Application.prototype,t.Events,{execute:function(){var e=Array.prototype.slice.apply(arguments);this.commands.execute.apply(this.commands,e)},request:function(){var e=Array.prototype.slice.apply(arguments);return this.reqres.request.apply(this.reqres,e)},addInitializer:function(e){this._initCallbacks.add(e)},start:function(e){this.triggerMethod("initialize:before",e),this._initCallbacks.run(e,this),this.triggerMethod("initialize:after",e),this.triggerMethod("start",e)},addRegions:function(e){return this._regionManager.addRegions(e)},closeRegions:function(){this._regionManager.closeRegions()},removeRegion:function(e){this._regionManager.removeRegion(e)},getRegion:function(e){return this._regionManager.get(e)},module:function(e,t){var n=s(arguments);return n.unshift(this),r.Module.create.apply(r.Module,n)},_initRegionManager:function(){this._regionManager=new r.RegionManager,this.listenTo(this._regionManager,"region:add",function(e,t){this[e]=t}),this.listenTo(this._regionManager,"region:remove",function(e,t){delete this[e]})}}),r.Application.extend=r.extend,r.Module=function(e,t){this.moduleName=e,this.submodules={},this._setupInitializersAndFinalizers(),this.app=t,this.startWithParent=!0,this.triggerMethod=r.triggerMethod},n.extend(r.Module.prototype,t.Events,{addInitializer:function(e){this._initializerCallbacks.add(e)},addFinalizer:function(e){this._finalizerCallbacks.add(e)},start:function(e){if(this._isInitialized)return;n.each(this.submodules,function(t){t.startWithParent&&t.start(e)}),this.triggerMethod("before:start",e),this._initializerCallbacks.run(e,this),this._isInitialized=!0,this.triggerMethod("start",e)},stop:function(){if(!this._isInitialized)return;this._isInitialized=!1,r.triggerMethod.call(this,"before:stop"),n.each(this.submodules,function(e){e.stop()}),this._finalizerCallbacks.run(undefined,this),this._initializerCallbacks.reset(),this._finalizerCallbacks.reset(),r.triggerMethod.call(this,"stop")},addDefinition:function(e,t){this._runModuleDefinition(e,t)},_runModuleDefinition:function(e,i){if(!e)return;var s=n.flatten([this,this.app,t,r,r.$,n,i]);e.apply(this,s)},_setupInitializersAndFinalizers:function(){this._initializerCallbacks=new r.Callbacks,this._finalizerCallbacks=new r.Callbacks}}),n.extend(r.Module,{create:function(e,t,r){var i=e,o=s(arguments);o.splice(0,3),t=t.split(".");var u=t.length,a=[];return a[u-1]=r,n.each(t,function(t,n){var r=i;i=this._getModule(r,t,e),this._addModuleDefinition(r,i,a[n],o)},this),i},_getModule:function(e,t,n,i,s){var o=e[t];return o||(o=new r.Module(t,n),e[t]=o,e.submodules[t]=o),o},_addModuleDefinition:function(e,t,r,i){var s,o;n.isFunction(r)?(s=r,o=!0):n.isObject(r)?(s=r.define,o=r.startWithParent):o=!0,s&&t.addDefinition(s,i),t.startWithParent=t.startWithParent&&o,t.startWithParent&&!t.startWithParentIsConfigured&&(t.startWithParentIsConfigured=!0,e.addInitializer(function(e){t.startWithParent&&t.start(e)}))}}),r}(this,t,e);return t.Marionette}),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/ProtoView",["marionette"],function(e){var n,r;return n=function(e){function n(){return r=n.__super__.constructor.apply(this,arguments),r}return t(n,e),n.prototype.initialize=function(e){return this.o=e!=null?e:{},this.o.$el&&this.setElement(this.o.$el),n.__super__.initialize.apply(this,arguments),this.o.isRender&&this.render(),this},n.prototype.animateIn=function(){return this.$el.addClass("animated fadeInDown")},n.prototype.teardown=function(){var e,t;return this.isClosed=!0,(e=this.collection)!=null&&(e.isClosed=!0),(t=this.model)!=null&&(t.isClosed=!0),this.undelegateEvents()},n}(e.ItemView),n})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("collectionViews/ProtoCollectionView",["marionette","views/ProtoView"],function(e){var n,r;return n=function(e){function n(){return r=n.__super__.constructor.apply(this,arguments),r}return t(n,e),n.prototype.initialize=function(e){return this.o=e!=null?e:{},this.o.$el&&this.setElement(this.o.$el),n.__super__.initialize.apply(this,arguments),this.o.isRender&&this.render(),this},n.prototype.normalizeCollection=function(e){var t,n;if(this.model)return n=function(){var e;e=[];for(t in n=this.model.toJSON())e.push(n[t]);return e}.call(this),this.collection=new e(n),n=null,this.collection.parentCollection=this.model.collection},n.prototype.teardown=function(){var e;return this.isClosed=!0,(e=this.collection)!=null?e.isClosed=!0:void 0},n}(e.CompositeView),n})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("models/ProtoModel",["backbone"],function(e){var n,r;return n=function(e){function n(){return r=n.__super__.constructor.apply(this,arguments),r}return t(n,e),n.prototype.toggleAttr=function(e){return this.set(e,!this.get(e))},n}(e.Model),n})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("models/NotyModel",["models/ProtoModel"],function(e){var n,r;return n=function(e){function n(){return r=n.__super__.constructor.apply(this,arguments),r}return t(n,e),n.prototype.defaults={type:"ok",text:""},n}(e),n})}.call(this),function(){var e=this,t={}.hasOwnProperty,n=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};define("collections/NotiesCollection",["backbone","models/NotyModel"],function(e,t){var r,i;return r=function(e){function t(){return i=t.__super__.constructor.apply(this,arguments),i}return n(t,e),t}(e.Collection),r})}.call(this),function(){function e(e){if(e===null||typeof e=="undefined")return"";var t=e+"",n="",r,i,s=0;r=i=0,s=t.length;for(var o=0;o<s;o++){var u=t.charCodeAt(o),a=null;if(u<128)i++;else if(u>127&&u<2048)a=String.fromCharCode(u>>6|192,u&63|128);else if(u&!0)a=String.fromCharCode(u>>12|224,u>>6&63|128,u&63|128);else{if(u&!0)throw new RangeError("Unmatched trail surrogate at "+o);var f=t.charCodeAt(++o);if(f&!0)throw new RangeError("Unmatched lead surrogate at "+(o-1));u=((u&1023)<<10)+(f&1023)+65536,a=String.fromCharCode(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}a!==null&&(i>r&&(n+=t.slice(r,i)),n+=a,r=i=o+1)}return i>r&&(n+=t.slice(r,s)),n}function t(t){var n,r=function(e,t){return e<<t|e>>>32-t},i=function(e,t){var n,r,i,s,o;return i=e&2147483648,s=t&2147483648,n=e&1073741824,r=t&1073741824,o=(e&1073741823)+(t&1073741823),n&r?o^2147483648^i^s:n|r?o&1073741824?o^3221225472^i^s:o^1073741824^i^s:o^i^s},s=function(e,t,n){return e&t|~e&n},o=function(e,t,n){return e&n|t&~n},u=function(e,t,n){return e^t^n},a=function(e,t,n){return t^(e|~n)},f=function(e,t,n,o,u,a,f){return e=i(e,i(i(s(t,n,o),u),f)),i(r(e,a),t)},l=function(e,t,n,s,u,a,f){return e=i(e,i(i(o(t,n,s),u),f)),i(r(e,a),t)},c=function(e,t,n,s,o,a,f){return e=i(e,i(i(u(t,n,s),o),f)),i(r(e,a),t)},h=function(e,t,n,s,o,u,f){return e=i(e,i(i(a(t,n,s),o),f)),i(r(e,u),t)},p=function(e){var t,n=e.length,r=n+8,i=(r-r%64)/64,s=(i+1)*16,o=new Array(s-1),u=0,a=0;while(a<n)t=(a-a%4)/4,u=a%4*8,o[t]=o[t]|e.charCodeAt(a)<<u,a++;return t=(a-a%4)/4,u=a%4*8,o[t]=o[t]|128<<u,o[s-2]=n<<3,o[s-1]=n>>>29,o},d=function(e){var t="",n="",r,i;for(i=0;i<=3;i++)r=e>>>i*8&255,n="0"+r.toString(16),t+=n.substr(n.length-2,2);return t},v=[],m,g,y,b,w,E,S,x,T,N=7,C=12,k=17,L=22,A=5,O=9,M=14,_=20,D=4,P=11,H=16,B=23,j=6,F=10,I=15,q=21;t=e(t),v=p(t),E=1732584193,S=4023233417,x=2562383102,T=271733878,n=v.length;for(m=0;m<n;m+=16)g=E,y=S,b=x,w=T,E=f(E,S,x,T,v[m+0],N,3614090360),T=f(T,E,S,x,v[m+1],C,3905402710),x=f(x,T,E,S,v[m+2],k,606105819),S=f(S,x,T,E,v[m+3],L,3250441966),E=f(E,S,x,T,v[m+4],N,4118548399),T=f(T,E,S,x,v[m+5],C,1200080426),x=f(x,T,E,S,v[m+6],k,2821735955),S=f(S,x,T,E,v[m+7],L,4249261313),E=f(E,S,x,T,v[m+8],N,1770035416),T=f(T,E,S,x,v[m+9],C,2336552879),x=f(x,T,E,S,v[m+10],k,4294925233),S=f(S,x,T,E,v[m+11],L,2304563134),E=f(E,S,x,T,v[m+12],N,1804603682),T=f(T,E,S,x,v[m+13],C,4254626195),x=f(x,T,E,S,v[m+14],k,2792965006),S=f(S,x,T,E,v[m+15],L,1236535329),E=l(E,S,x,T,v[m+1],A,4129170786),T=l(T,E,S,x,v[m+6],O,3225465664),x=l(x,T,E,S,v[m+11],M,643717713),S=l(S,x,T,E,v[m+0],_,3921069994),E=l(E,S,x,T,v[m+5],A,3593408605),T=l(T,E,S,x,v[m+10],O,38016083),x=l(x,T,E,S,v[m+15],M,3634488961),S=l(S,x,T,E,v[m+4],_,3889429448),E=l(E,S,x,T,v[m+9],A,568446438),T=l(T,E,S,x,v[m+14],O,3275163606),x=l(x,T,E,S,v[m+3],M,4107603335),S=l(S,x,T,E,v[m+8],_,1163531501),E=l(E,S,x,T,v[m+13],A,2850285829),T=l(T,E,S,x,v[m+2],O,4243563512),x=l(x,T,E,S,v[m+7],M,1735328473),S=l(S,x,T,E,v[m+12],_,2368359562),E=c(E,S,x,T,v[m+5],D,4294588738),T=c(T,E,S,x,v[m+8],P,2272392833),x=c(x,T,E,S,v[m+11],H,1839030562),S=c(S,x,T,E,v[m+14],B,4259657740),E=c(E,S,x,T,v[m+1],D,2763975236),T=c(T,E,S,x,v[m+4],P,1272893353),x=c(x,T,E,S,v[m+7],H,4139469664),S=c(S,x,T,E,v[m+10],B,3200236656),E=c(E,S,x,T,v[m+13],D,681279174),T=c(T,E,S,x,v[m+0],P,3936430074),x=c(x,T,E,S,v[m+3],H,3572445317),S=c(S,x,T,E,v[m+6],B,76029189),E=c(E,S,x,T,v[m+9],D,3654602809),T=c(T,E,S,x,v[m+12],P,3873151461),x=c(x,T,E,S,v[m+15],H,530742520),S=c(S,x,T,E,v[m+2],B,3299628645),E=h(E,S,x,T,v[m+0],j,4096336452),T=h(T,E,S,x,v[m+7],F,1126891415),x=h(x,T,E,S,v[m+14],I,2878612391),S=h(S,x,T,E,v[m+5],q,4237533241),E=h(E,S,x,T,v[m+12],j,1700485571),T=h(T,E,S,x,v[m+3],F,2399980690),x=h(x,T,E,S,v[m+10],I,4293915773),S=h(S,x,T,E,v[m+1],q,2240044497),E=h(E,S,x,T,v[m+8],j,1873313359),T=h(T,E,S,x,v[m+15],F,4264355552),x=h(x,T,E,S,v[m+6],I,2734768916),S=h(S,x,T,E,v[m+13],q,1309151649),E=h(E,S,x,T,v[m+4],j,4149444226),T=h(T,E,S,x,v[m+11],F,3174756917),x=h(x,T,E,S,v[m+2],I,718787259),S=h(S,x,T,E,v[m+9],q,3951481745),E=i(E,g),S=i(S,y),x=i(x,b),T=i(T,w);var R=d(E)+d(S)+d(x)+d(T);return R.toLowerCase()}typeof define=="function"&&define.amd&&define("md5",[],function(){return t})}(),function(){define("helpers",["md5"],function(e){var t;return t=function(){function t(){}return t.prototype.isMobile=function(){var e;return e=!1,function(t){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))return e=!0}(navigator.userAgent||navigator.vendor||window.opera),e},t.prototype.prefix=function(){var e,t,n;return n=window.getComputedStyle(document.documentElement,""),t=(Array.prototype.slice.call(n).join("").match(/-(moz|webkit|ms)-/)||n.OLink===""&&["","o"])[1],e="WebKit|Moz|MS|O".match(new RegExp("("+t+")","i"))[1],"-"+t+"-"},t.prototype.getRandom=function(e,t){return Math.floor(Math.random()*(t+1-e)+e)},t.prototype.showLoaderLine=function(e){return e==null&&(e=""),App.$loadingLine.show().addClass(e),this},t.prototype.hideLoaderLine=function(e){return e==null&&(e=""),App.$loadingLine.fadeOut(200,function(){return App.$loadingLine.css({width:"0"}).removeClass(e)}),this},t.prototype.setLoaderLineProgress=function(e){return App.$loadingLine.css({width:""+e+"%"}),this},t.prototype.listenLinks=function(){return $(document.body).on("click","a",function(e){var t;t=$(this);if(t.attr("target")==="_blank"||t.attr("href").match(/mailto:/g)||t.hasClass("js-no-follow"))return;return e.preventDefault(),App.router.navigate(t.attr("href"),{trigger:!0})})},t.prototype.normalizeBoolean=function(e){return e==="false"!==Boolean(e)},t.prototype.unescape=function(e){return e!=null?e.replace(/\&lt;/g,"<").replace(/\&gt;/g,">").replace(/\&quot;/g,'"'):void 0},t.prototype.generateHash=function(){return e(new Date+(new Date).getMilliseconds()+Math.random(9999999999999)+Math.random(9999999999999)+Math.random(9999999999999))},t.prototype.refreshSvg=function(){return App.$svgWrap.html(App.$svgWrap.html())},t.prototype.getFilterIcon=function(e){var t;return(t=this.currIconIndex)==null&&(this.currIconIndex=0),e==="<"?(this.currIconIndex--,this.currIconIndex<0&&(this.currIconIndex=App.iconsSelected.length-1)):(this.currIconIndex++,this.currIconIndex>=App.iconsSelected.length&&(this.currIconIndex=0),this.currIconIndex++,this.currIconIndex>=App.iconsSelected.length&&(this.currIconIndex=0)),App.iconsSelected[this.currIconIndex]?App.iconsSelected[this.currIconIndex].split(":")[1]:this.getStandartIcon(e)},t.prototype.getStandartIcon=function(e){var t,n,r;return t=App.sectionsCollectionView.collection.at(0).get("icons"),(n=this.currStandartIconIndex)==null&&(this.currStandartIconIndex=0),e==="<"?(this.currStandartIconIndex--,this.currStandartIconIndex<0&&(this.currStandartIconIndex=t.length-1)):(this.currStandartIconIndex++,this.currStandartIconIndex>=t.length&&(this.currStandartIconIndex=0)),((r=t[this.currStandartIconIndex])!=null?r.hash:void 0)||"tick-icon"},t.prototype.upsetSvgShape=function(e){var t,n,r;r=!1,e.isReset&&App.$svgWrap.find("#"+e.hash).remove();if(e.isCheck){n=0;while(n<App.loadedHashes.length)String(App.loadedHashes[n])===String(e.hash)&&(r=!0,n=App.loadedHashes.length),n++}if(!r)return t=$("<g>").html(e.shape).attr("id",e.hash),t.find("*").each(function(t,n){var r;r=$(n);if(!e.isMulticolor&&r.attr("fill")!=="none")return r.removeAttr("fill")}),e.$shapes.append(t),App.loadedHashes.push(e.hash)},t.prototype.addToSvg=function(e){var t;return t=e instanceof $?e.html():e,App.$svgWrap.find("#svg-source").append(t),this.refreshSvg()},t.prototype.placeInSvg=function(e){var t,n;return t="js-icons-data-place",App.$svgWrap.find("#js-icons-data-place").remove(),n=App.$svgWrap.html(),n=n.replace(/<!-- icons data marker -->/gi,"<!-- icons data marker --><defs id='"+t+"'>"+e+"</defs>"),App.$svgWrap.html(n),e},t.prototype.toggleArray=function(e,t,n){var r,i;return e==null?void 0:(i=e.slice(0),r=_.indexOf(i,t),r===-1?i.push(t):n?i.splice(r,1):i=_.without(i,t),i)},t}(),new t})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/NotyView",["views/ProtoView","models/NotyModel","underscore","jquery","helpers"],function(e,n,r,i,s){var o,u;return o=function(e){function r(){return u=r.__super__.constructor.apply(this,arguments),u}return t(r,e),r.prototype.model=n,r.prototype.template="#noty-view-template",r.prototype.className="noty-l",r.prototype.leftTransitionTime=250,r.prototype.events={click:"hide",mouseenter:"stopTimer",mouseleave:"startTimer"},r.prototype.initialize=function(e){return this.o=e!=null?e:{},this.bindModelEvents(),r.__super__.initialize.apply(this,arguments),this},r.prototype.bindModelEvents=function(){return this.model.on("change",this.render)},r.prototype.render=function(){var e=this;return r.__super__.render.apply(this,arguments),this.$el.slideDown(),setTimeout(function(){return e.$el.addClass("is-show"),e.startTimer()},400),this},r.prototype.startTimer=function(){var e=this;return clearTimeout(this.timer),this.timer=setTimeout(function(){return e.hide()},this.model.get("delay"))},r.prototype.stopTimer=function(){return clearTimeout(this.timer)},r.prototype.hide=function(){var e=this;return this.$el.removeClass("is-show"),setTimeout(function(){return e.model.destroy(),e.teardown()},this.leftTransitionTime)},r}(e),o})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("collectionViews/NotiesCollectionView",["collectionViews/ProtoCollectionView","collections/NotiesCollection","views/NotyView"],function(e,n,r){var i,s;return i=function(e){function i(){return s=i.__super__.constructor.apply(this,arguments),s}return t(i,e),i.prototype.itemView=r,i.prototype.template="#noties-collection-view-template",i.prototype.initialize=function(e){return this.o=e!=null?e:{},this.setElement($("#js-notifier-place")),this.collection=new n([]),i.__super__.initialize.apply(this,arguments),this},i.prototype.appendHtml=function(e,t,n){return this.$el.prepend(t.el)},i.prototype.show=function(e){var n;return e==null&&(e={}),n={type:"ok",text:"evrything is ok",delay:7e3},e=t(n,e),this.collection.add(e)},i}(e),i})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/pages/PageView",["views/ProtoView"],function(e){var n,r;return n=function(e){function n(){return r=n.__super__.constructor.apply(this,arguments),r}return t(n,e),n.prototype.render=function(){return n.__super__.render.apply(this,arguments),!this.isNoPageAnima&&this.animateIn(),this},n}(e),n})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("models/SectionModel",["models/ProtoModel","helpers"],function(e,n){var r,i;return r=function(e){function n(){return i=n.__super__.constructor.apply(this,arguments),i}return t(n,e),n.prototype.url="section",n.prototype.defaults={name:"",author:"",email:"",website:"",license:"",isMulticolor:!1,isExpanded:!1,isClosed:!1,moderated:!1,isAgree:!1,icons:[]},n.prototype.initialize=function(e){return this.o=e!=null?e:{},n.__super__.initialize.apply(this,arguments),this},n}(e),r})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("models/IconModel",["models/ProtoModel","helpers"],function(e,n){var r,i;return r=function(e){function r(){return i=r.__super__.constructor.apply(this,arguments),i}return t(r,e),r.prototype.defaults={isSelected:!1,isFiltered:!1,hover:!1,active:!1,focus:!1,name:"",shape:null,hash:null,isNameValid:!1,isShapeValid:!1,isValid:!1},r.prototype.toggleSelected=function(){var e,t;return this.toggleAttr("isSelected"),(t=(e=this.collection).selectedCnt)==null&&(e.selectedCnt=0),this.get("isSelected")?this.collection.selectedCnt++:this.collection.selectedCnt--,App.iconsSelected=n.toggleArray(App.iconsSelected,""+this.collection.parentModel.get("name")+":"+this.get("hash")),this.calcSelected()},r.prototype.deselect=function(){return this.select(!1)},r.prototype.select=function(e){var t;return e==null&&(e=!0),this.set("isSelected",e),e?App.iconsSelected.push(""+this.collection.parentModel.get("name")+":"+this.get("hash")):App.iconsSelected=_.without(App.iconsSelected,""+this.collection.parentModel.get("name")+":"+this.get("hash")),e&&(t=_.uniq(App.iconsSelected)),this.calcSelected()},r.prototype.calcSelected=function(){return App.vent.trigger("icon:select")},r}(e),r})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/IconView",["views/ProtoView","models/IconModel","underscore","jquery","helpers"],function(e,n,r,i,s){var o,u;return o=function(e){function i(){return u=i.__super__.constructor.apply(this,arguments),u}return t(i,e),i.prototype.model=n,i.prototype.template="#icon-view-template",i.prototype.className="icon-with-text-b",i.prototype.events={click:"toggleSelected"},i.prototype.initialize=function(e){return this.o=e!=null?e:{},this.bindModelEvents(),i.__super__.initialize.apply(this,arguments),this},i.prototype.bindModelEvents=function(){return this.model.on("change",this.render)},i.prototype.render=function(){return i.__super__.render.apply(this,arguments),this.$el.toggleClass("is-check",this.model.get("isSelected")),this.$el.toggleClass("h-gm",this.model.get("isFiltered")),App.vent.on("icon:deselect",r.bind(this.deselect,this)),this},i.prototype.deselect=function(){return this.model.deselect()},i.prototype.toggleSelected=function(){return this.model.toggleSelected()},i}(e),o})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("collectionViews/IconsCollectionView",["collectionViews/ProtoCollectionView","views/IconView","jquery"],function(e,n,r){var i,s;return i=function(e){function r(){return s=r.__super__.constructor.apply(this,arguments),s}return t(r,e),r.prototype.itemView=n,r.prototype.template="#icons-collection-view-template",r.prototype.initialize=function(e){return this.o=e!=null?e:{},this.collection.mode=this.o.mode,r.__super__.initialize.apply(this,arguments),this},r}(e),i})}.call(this),function(){var e=this,t={}.hasOwnProperty,n=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};define("collections/IconsCollection",["backbone","models/IconModel","underscore","helpers"],function(e,t,r,i){var s,o;return s=function(e){function i(){return o=i.__super__.constructor.apply(this,arguments),o}return n(i,e),i.prototype.model=t,i.prototype.initialize=function(e){return this.o=e!=null?e:{},this.listenToPUBSUB(),i.__super__.initialize.apply(this,arguments),this},i.prototype.listenToPUBSUB=function(){var e=this;return App.vent.on("icon-select-filter:change",function(t){var n,r;return r=new RegExp(t,"gi"),n=0,e.each(function(e){var t;return t=e.get("name").match(r)?!1:!0,e.set("isFiltered",t),t&&n++}),e.filtered=n===e.length,e.onFilter(e.filtered)})},i.prototype.selectAll=function(){return this.setToAll(!0),this.selectedCnt=this.length},i.prototype.deSelectAll=function(){return this.setToAll(!1),this.selectedCnt=0},i.prototype.setToAll=function(e){var t=this;return this.each(function(n){var i,s;if(!n.get("isFiltered"))return n.set("isSelected",e),i=n.get("hash"),s=t.parentModel.get("name"),e?App.iconsSelected.push(""+s+":"+i):App.iconsSelected=r.without(App.iconsSelected,""+s+":"+i)}),App.iconsSelected=r.uniq(App.iconsSelected)},i}(e.Collection),s})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/SectionView",["views/ProtoView","models/SectionModel","collectionViews/IconsCollectionView","collections/IconsCollection","underscore"],function(e,n,r,i,s){var o,u;return o=function(e){function o(){return u=o.__super__.constructor.apply(this,arguments),u}return t(o,e),o.prototype.model=n,o.prototype.template="#section-view-template",o.prototype.className="section-b cf h-gm",o.prototype.events={"click #js-hide":"toggleHide","click #js-select-all":"selectAll","click #js-deselect-all":"deSelectAll","click #js-show-more":"toggleExpand"},o.prototype.initialize=function(){return this.bindModelEvents(),o.__super__.initialize.apply(this,arguments),this.listenToOverflow(),this},o.prototype.bindModelEvents=function(){return this.model.on("change:isFiltered",s.bind(this.toggleClasses,this)),this.model.on("change:isClosed",s.bind(this.toggleClasses,this)),this.model.on("change:isExpanded",s.bind(this.toggleClasses,this))},o.prototype.render=function(){var e=this;return o.__super__.render.apply(this,arguments),this.renderIcons(),this.$content=this.$("#js-icons-place"),this.toggleClasses(!1),s.defer(function(){return e.toggleExpandedBtn()}),this.animateIn(),this},o.prototype.listenToOverflow=function(){return $(window).on("resize",s.bind(this.toggleExpandedBtn,this))},o.prototype.isExpandBtnNeeded=function(){return this.$el.hasClass("is-expanded")||this.$content.outerHeight()<this.$content[0].scrollHeight},o.prototype.toggleExpand=function(){return this.model.toggleAttr("isExpanded")},o.prototype.toggleExpandedBtn=function(){return this.$el.toggleClass("is-no-expanded-btn",!this.isExpandBtnNeeded())},o.prototype.onFilter=function(e){return this.toggleExpandedBtn(),this.model.set("isFiltered",e)},o.prototype.renderIcons=function(){return this.iconsCollectionView=new r({$el:this.$("#js-icons-place"),isRender:!0,collection:new i(this.model.get("icons"))}),this.iconsCollectionView.collection.onFilter=s.bind(this.onFilter,this),this.iconsCollectionView.collection.parentModel=this.model,this.model.iconsCollection=this.iconsCollectionView.collection,this.model.iconsCollectionView=this.iconsCollectionView},o.prototype.toggleClasses=function(e){return e==null&&(e=!0),this.$el.toggleClass("is-closed",!!this.model.get("isClosed")),this.$el.toggleClass("h-gm",!!this.model.get("isFiltered")),this.$el.toggleClass("is-expanded",!!this.model.get("isExpanded")),e&&this.toggleExpandedBtn(),this.$("#js-show-more").text(this.model.get("isExpanded")?"show less":"show more")},o.prototype.selectAll=function(){return this.iconsCollectionView.collection.selectAll(),App.vent.trigger("icon:select")},o.prototype.deSelectAll=function(){return this.iconsCollectionView.collection.deSelectAll(),App.vent.trigger("icon:select")},o.prototype.toggleHide=function(){return this.model.toggleAttr("isClosed"),this.$content.slideToggle()},o}(e),o})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("collectionViews/SectionsCollectionView",["collectionViews/ProtoCollectionView","views/SectionView","helpers"],function(e,n,r){var i,s;return i=function(e){function r(){return s=r.__super__.constructor.apply(this,arguments),s}return t(r,e),r.prototype.itemView=n,r.prototype.template="#sections-collection-view-template",r.prototype.render=function(){var e=this;return _.defer(function(){return r.__super__.render.apply(e,arguments),e.$el.addClass("animated fadeInDown")}),this},r}(e),i})}.call(this),function(){var e=this,t={}.hasOwnProperty,n=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};define("collections/PaginatedCollection",["backbone","helpers"],function(e,t){var r,i;return r=function(e){function r(){return i=r.__super__.constructor.apply(this,arguments),i}return n(r,e),r.prototype.page=1,r.prototype.initialize=function(){return this.perPage=function(){return t.isMobile()?3:5}(),this.options={page:this.page,perPage:this.perPage,total:10},this.o.isPaginated&&(this.fetch=this.fetchFun),this.o.isPaginated&&(this.parse=this.parseFun),r.__super__.initialize.apply(this,arguments),this},r.prototype.fetchFun=function(e){return this.loadFromFile=(e!=null?e.sectionNames:void 0)?!0:!1,Backbone.Collection.prototype.fetch.call(this,{data:$.extend(this.options,e||{})})},r.prototype.parseFun=function(e){return e.total&&(this.options.total=e.total),e.models},r.prototype.pageInfo=function(){var e,t;return e={total:this.options.total,page:this.options.page,perPage:this.options.perPage,pages:Math.ceil(this.options.total/this.options.perPage),prev:!1,next:!1},t=Math.min(this.options.total,this.options.page*this.options.perPage),this.options.total===this.options.pages*this.options.perPage&&(t=this.options.total),e.range=[(this.options.page-1)*this.options.perPage+1,t],this.options.page>1&&(e.prev=this.options.page-1),this.options.page<e.pages&&(e.next=this.options.page+1),e},r.prototype.nextPage=function(){var e=this;return this.loadFromFile&&this.clearSelectedIcons(),this.pageInfo().next?(this.options.page++,this.fetch().then(function(){return!e.isClosed&&e.trigger("afterFetch")})):!1},r.prototype.prevPage=function(){var e=this;return this.pageInfo().prev?(this.options.page--,this.fetch().then(function(){return!e.isClosed&&e.trigger("afterFetch")})):!1},r.prototype.loadPage=function(e){var t=this;return e===this.options.page?!1:(this.options.page=e,this.fetch().then(function(){return!t.isClosed&&t.trigger("afterFetch")}))},r.prototype.clearSelectedIcons=function(){return App.vent.trigger("icon:deselect")},r}(e.Collection),r})}.call(this),function(){var e=this,t={}.hasOwnProperty,n=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};define("collections/SectionsCollection",["collections/PaginatedCollection","models/SectionModel","helpers","underscore"],function(e,t,r,i){var s,o;return s=function(e){function s(){return o=s.__super__.constructor.apply(this,arguments),o}return n(s,e),s.prototype.model=t,s.prototype.url="sections",s.prototype.initialize=function(e){return this.o=e!=null?e:{},this.o.pageNum&&(this.page=this.o.pageNum),this.isPaginated=this.o.paginated,this.on("afterFetch",i.bind(this.generateSvgData,this)),s.__super__.initialize.apply(this,arguments),this},s.prototype.generateSvgData=function(){var e,t=this;return e="",this.each(function(t){var n,r,i,s,o,u,a;i=t.get("isMulticolor"),u=t.get("icons"),a=[];for(n=s=0,o=u.length;s<o;n=++s)r=u[n],r="<g id='"+r.hash+"'>"+r.shape+"</g>",a.push(e+=i?r:r.replace(/fill=\"\s?#[0-9A-Fa-f]{3,6}\s?\"/gi,""));return a}),r.placeInSvg(e)},s}(e),s})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("models/FilterModel",["models/ProtoModel"],function(e){var n,r;return n=function(e){function n(){return r=n.__super__.constructor.apply(this,arguments),r}return t(n,e),n.prototype.defaults={iconHash:"tick-icon"},n.prototype.toggleSelected=function(){return this.toggleAttr("isSelected")},n}(e),n})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/FilterView",["views/ProtoView","models/FilterModel","underscore","jquery","helpers"],function(e,n,r,i,s){var o,u;return o=function(e){function r(){return u=r.__super__.constructor.apply(this,arguments),u}return t(r,e),r.prototype.model=n,r.prototype.template="#filter-view-template",r.prototype.className="filter-b",r.prototype.events={click:"toggleSelected","click #js-left":"left","click #js-right":"right"},r.prototype.initialize=function(e){return this.o=e!=null?e:{},this.bindModelEvents(),r.__super__.initialize.apply(this,arguments),this},r.prototype.left=function(e){return e.stopPropagation(),this.model.set("iconHash",s.getFilterIcon("<"))},r.prototype.right=function(e){return e.stopPropagation(),this.model.set("iconHash",s.getFilterIcon(">"))},r.prototype.bindModelEvents=function(){return this.model.on("change",this.render)},r.prototype.render=function(){return r.__super__.render.apply(this,arguments),this.$el.toggleClass("is-check",!!this.model.get("isSelected")),this},r.prototype.toggleSelected=function(){return this.model.toggleSelected(),App.filtersSelected=s.toggleArray(App.filtersSelected,this.model.get("hash")),App.vent.trigger("icon:select")},r}(e),o})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("collectionViews/FiltersCollectionView",["collectionViews/ProtoCollectionView","views/FilterView","underscore"],function(e,n,r){var i,s;return i=function(e){function i(){return s=i.__super__.constructor.apply(this,arguments),s}return t(i,e),i.prototype.itemView=n,i.prototype.template="#filters-collection-view-template",i.prototype.events={"click #js-left":"left","click #js-right":"right"},i.prototype.initialize=function(e){return this.o=e!=null?e:{},i.__super__.initialize.apply(this,arguments),this},i.prototype.render=function(){return i.__super__.render.apply(this,arguments),this.$container=this.$("#js-filters-place"),this.$leftButton=this.$("#js-left"),this.$rightButton=this.$("#js-right"),this.$el.on("show",r.bind(this.detectArrows,this)),App.$window.on("resize",r.bind(this.detectArrows,this)),this},i.prototype.left=function(){return this.animateScroll(-200)},i.prototype.right=function(){return this.animateScroll(200)},i.prototype.animateScroll=function(e){var t,n=this;return t=this.$container.scrollLeft(),this.$container.animate({scrollLeft:this.$container.scrollLeft()+e},function(){return n.detectArrows()})},i.prototype.detectArrows=function(){return this.$leftButton.toggle(this.$container.scrollLeft()!==0),this.$rightButton.toggle(this.$container.scrollLeft()+this.$container.outerWidth()<this.$container[0].scrollWidth)},i.prototype.appendHtml=function(e,t,n){return this.$("#js-filters-place").append(t.el)},i}(e),i})}.call(this),function(){var e=this,t={}.hasOwnProperty,n=function(e,n){function i(){this.constructor=e}for(var r in n)t.call(n,r)&&(e[r]=n[r]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};define("collections/FiltersCollection",["backbone","models/FilterModel","helpers"],function(e,t,r){var i,s;return i=function(e){function i(){return s=i.__super__.constructor.apply(this,arguments),s}return n(i,e),i.prototype.model=t,i.prototype.url="filters",i.prototype.addSvgFilters=function(){var e;return e="",this.each(function(t){return e+=t.get("filter").replace(/\<filter/,"<filter id='"+t.get("hash")+"' ")}),r.addToSvg(e)},i}(e.Collection),i})}.call(this),function(e){typeof define=="function"&&define.amd?define("jquery.ui.widget",["jquery"],e):e(jQuery)}(function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n=0,r;(r=t[n])!=null;n++)try{e(r).triggerHandler("remove")}catch(s){}i(t)},e.widget=function(t,n,r){var i,s,o,u,a={},f=t.split(".")[0];t=t.split(".")[1],i=f+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[f]=e[f]||{},s=e[f][t],o=e[f][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,s,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),u=new n,u.options=e.widget.extend({},u.options),e.each(r,function(t,r){if(!e.isFunction(r)){a[t]=r;return}a[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},i=function(e){return n.prototype[t].apply(this,e)};return function(){var t=this._super,n=this._superApply,s;return this._super=e,this._superApply=i,s=r.apply(this,arguments),this._super=t,this._superApply=n,s}}()}),o.prototype=e.widget.extend(u,{widgetEventPrefix:s?u.widgetEventPrefix:t},a,{constructor:o,namespace:f,widgetName:t,widgetFullName:i}),s?(e.each(s._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,o,n._proto)}),delete s._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o)},e.widget.extend=function(n){var i=r.call(arguments,1),s=0,o=i.length,u,a;for(;s<o;s++)for(u in i[s])a=i[s][u],i[s].hasOwnProperty(u)&&a!==t&&(e.isPlainObject(a)?n[u]=e.isPlainObject(n[u])?e.widget.extend({},n[u],a):e.widget.extend({},a):n[u]=a);return n},e.widget.bridge=function(n,i){var s=i.prototype.widgetFullName||n;e.fn[n]=function(o){var u=typeof o=="string",a=r.call(arguments,1),f=this;return o=!u&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,u?this.each(function(){var r,i=e.data(this,s);if(!i)return e.error("cannot call methods on "+n+" prior to initialization; "+"attempted to call method '"+o+"'");if(!e.isFunction(i[o])||o.charAt(0)==="_")return e.error("no such method '"+o+"' for "+n+" widget instance");r=i[o].apply(i,a);if(r!==i&&r!==t)return f=r&&r.jquery?f.pushStack(r.get()):r,!1}):this.each(function(){var t=e.data(this,s);t?t.option(o||{})._init():e.data(this,s,new i(o,this))}),f}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i=n,s,o,u;if(arguments.length===0)return e.widget.extend({},this.options);if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);for(u=0;u<s.length-1;u++)o[s[u]]=o[s[u]]||{},o=o[s[u]];n=s.pop();if(r===t)return o[n]===t?null:o[n];o[n]=r}else{if(r===t)return this.options[n]===t?null:this.options[n];i[n]=r}}return this._setOptions(i),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,e==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,r){var i,s=this;typeof t!="boolean"&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,function(r,o){function u(){if(!t&&(s.options.disabled===!0||e(this).hasClass("ui-state-disabled")))return;return(typeof o=="string"?s[o]:o).apply(s,arguments)}typeof o!="string"&&(u.guid=o.guid=o.guid||u.guid||e.guid++);var a=r.match(/^(\w+)\s*(.*)$/),f=a[1]+s.eventNamespace,l=a[2];l?i.delegate(l,f,u):n.bind(f,u)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return(typeof e=="string"?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,s,o=this.options[t];r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent;if(s)for(i in s)i in n||(n[i]=s[i]);return this.element.trigger(n,r),!(e.isFunction(o)&&o.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,s){typeof i=="string"&&(i={effect:i});var o,u=i?i===!0||typeof i=="number"?n:i.effect||n:t;i=i||{},typeof i=="number"&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=s,i.delay&&r.delay(i.delay),o&&e.effects&&e.effects.effect[u]?r[t](i):u!==t&&r[u]?r[u](i.duration,i.easing,s):r.queue(function(n){e(this)[t](),s&&s.call(r[0]),n()})}})}),function(e){typeof define=="function"&&define.amd?define("fileupload",["jquery","jquery.ui.widget"],e):e(window.jQuery)}(function(e){e.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))")).test(window.navigator.userAgent)&&!e('<input type="file">').prop("disabled"),e.support.xhrFileUpload=!!window.XMLHttpRequestUpload&&!!window.FileReader,e.support.xhrFormDataFileUpload=!!window.FormData,e.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),e.widget("blueimp.fileupload",{options:{dropZone:e(document),pasteZone:e(document),fileInput:undefined,replaceFileInput:!0,paramName:undefined,singleFileUploads:!0,limitMultiFileUploads:undefined,sequentialUploads:!1,limitConcurrentUploads:undefined,forceIframeTransport:!1,redirect:undefined,redirectParamName:undefined,postMessage:undefined,multipart:!0,maxChunkSize:undefined,uploadedBytes:undefined,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(t,n){return t=this.messages[t]||t.toString(),n&&e.each(n,function(e,n){t=t.replace("{"+e+"}",n)}),t},formData:function(e){return e.serializeArray()},add:function(t,n){(n.autoUpload||n.autoUpload!==!1&&e(this).fileupload("option","autoUpload"))&&n.process().done(function(){n.submit()})},processData:!1,contentType:!1,cache:!1},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:e.support.blobSlice&&function(){var e=this.slice||this.webkitSlice||this.mozSlice;return e.apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(e,t,n){var r=e-this.timestamp;if(!this.bitrate||!n||r>n)this.bitrate=(t-this.loaded)*(1e3/r)*8,this.loaded=t,this.timestamp=e;return this.bitrate}},_isXHRUpload:function(t){return!t.forceIframeTransport&&(!t.multipart&&e.support.xhrFileUpload||e.support.xhrFormDataFileUpload)},_getFormData:function(t){var n;return typeof t.formData=="function"?t.formData(t.form):e.isArray(t.formData)?t.formData:e.type(t.formData)==="object"?(n=[],e.each(t.formData,function(e,t){n.push({name:e,value:t})}),n):[]},_getTotal:function(t){var n=0;return e.each(t,function(e,t){n+=t.size||1}),n},_initProgressObject:function(t){var n={loaded:0,total:0,bitrate:0};t._progress?e.extend(t._progress,n):t._progress=n},_initResponseObject:function(e){var t;if(e._response)for(t in e._response)e._response.hasOwnProperty(t)&&delete e._response[t];else e._response={}},_onProgress:function(e,t){if(e.lengthComputable){var n=Date.now?Date.now():(new Date).getTime(),r;if(t._time&&t.progressInterval&&n-t._time<t.progressInterval&&e.loaded!==e.total)return;t._time=n,r=Math.floor(e.loaded/e.total*(t.chunkSize||t._progress.total))+(t.uploadedBytes||0),this._progress.loaded+=r-t._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(n,this._progress.loaded,t.bitrateInterval),t._progress.loaded=t.loaded=r,t._progress.bitrate=t.bitrate=t._bitrateTimer.getBitrate(n,r,t.bitrateInterval),this._trigger("progress",e,t),this._trigger("progressall",e,this._progress)}},_initProgressListener:function(t){var n=this,r=t.xhr?t.xhr():e.ajaxSettings.xhr();r.upload&&(e(r.upload).bind("progress",function(e){var r=e.originalEvent;e.lengthComputable=r.lengthComputable,e.loaded=r.loaded,e.total=r.total,n._onProgress(e,t)}),t.xhr=function(){return r})},_isInstanceOf:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},_initXHRData:function(t){var n=this,r,i=t.files[0],s=t.multipart||!e.support.xhrFileUpload,o=t.paramName[0];t.headers=e.extend({},t.headers),t.contentRange&&(t.headers["Content-Range"]=t.contentRange);if(!s||t.blob||!this._isInstanceOf("File",i))t.headers["Content-Disposition"]='attachment; filename="'+encodeURI(i.name)+'"';s?e.support.xhrFormDataFileUpload&&(t.postMessage?(r=this._getFormData(t),t.blob?r.push({name:o,value:t.blob}):e.each(t.files,function(e,n){r.push({name:t.paramName[e]||o,value:n})})):(n._isInstanceOf("FormData",t.formData)?r=t.formData:(r=new FormData,e.each(this._getFormData(t),function(e,t){r.append(t.name,t.value)})),t.blob?r.append(o,t.blob,i.name):e.each(t.files,function(e,i){(n._isInstanceOf("File",i)||n._isInstanceOf("Blob",i))&&r.append(t.paramName[e]||o,i,i.name)})),t.data=r):(t.contentType=i.type,t.data=t.blob||i),t.blob=null},_initIframeSettings:function(t){var n=e("<a></a>").prop("href",t.url).prop("host");t.dataType="iframe "+(t.dataType||""),t.formData=this._getFormData(t),t.redirect&&n&&n!==location.host&&t.formData.push({name:t.redirectParamName||"redirect",value:t.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e)},_getParamName:function(t){var n=e(t.fileInput),r=t.paramName;return r?e.isArray(r)||(r=[r]):(r=[],n.each(function(){var t=e(this),n=t.prop("name")||"files[]",i=(t.prop("files")||[1]).length;while(i)r.push(n),i-=1}),r.length||(r=[n.prop("name")||"files[]"])),r},_initFormSettings:function(t){if(!t.form||!t.form.length)t.form=e(t.fileInput.prop("form")),t.form.length||(t.form=e(this.options.fileInput.prop("form")));t.paramName=this._getParamName(t),t.url||(t.url=t.form.prop("action")||location.href),t.type=(t.type||t.form.prop("method")||"").toUpperCase(),t.type!=="POST"&&t.type!=="PUT"&&t.type!=="PATCH"&&(t.type="POST"),t.formAcceptCharset||(t.formAcceptCharset=t.form.attr("accept-charset"))},_getAJAXSettings:function(t){var n=e.extend({},this.options,t);return this._initFormSettings(n),this._initDataSettings(n),n},_getDeferredState:function(e){return e.state?e.state():e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(t,n,r){var i=e.Deferred(),s=i.promise();return n=n||this.options.context||s,t===!0?i.resolveWith(n,r):t===!1&&i.rejectWith(n,r),s.abort=i.promise,this._enhancePromise(s)},_addConvenienceMethods:function(t,n){var r=this,i=function(t){return e.Deferred().resolveWith(r,[t]).promise()};n.process=function(e,t){if(e||t)n._processQueue=this._processQueue=(this._processQueue||i(this)).pipe(e,t);return this._processQueue||i(this)},n.submit=function(){return this.state()!=="pending"&&(n.jqXHR=this.jqXHR=r._trigger("submit",t,this)!==!1&&r._onSend(t,this)),this.jqXHR||r._getXHRPromise()},n.abort=function(){return this.jqXHR?this.jqXHR.abort():r._getXHRPromise()},n.state=function(){if(this.jqXHR)return r._getDeferredState(this.jqXHR);if(this._processQueue)return r._getDeferredState(this._processQueue)},n.progress=function(){return this._progress},n.response=function(){return this._response}},_getUploadedBytes:function(e){var t=e.getResponseHeader("Range"),n=t&&t.split("-"),r=n&&n.length>1&&parseInt(n[1],10);return r&&r+1},_chunkedUpload:function(t,n){t.uploadedBytes=t.uploadedBytes||0;var r=this,i=t.files[0],s=i.size,o=t.uploadedBytes,u=t.maxChunkSize||s,a=this._blobSlice,f=e.Deferred(),l=f.promise(),c,h;return!(this._isXHRUpload(t)&&a&&(o||u<s))||t.data?!1:n?!0:o>=s?(i.error=t.i18n("uploadedBytes"),this._getXHRPromise(!1,t.context,[null,"error",i.error])):(h=function(){var n=e.extend({},t),l=n._progress.loaded;n.blob=a.call(i,o,o+u,i.type),n.chunkSize=n.blob.size,n.contentRange="bytes "+o+"-"+(o+n.chunkSize-1)+"/"+s,r._initXHRData(n),r._initProgressListener(n),c=(r._trigger("chunksend",null,n)!==!1&&e.ajax(n)||r._getXHRPromise(!1,n.context)).done(function(i,u,a){o=r._getUploadedBytes(a)||o+n.chunkSize,l+n.chunkSize-n._progress.loaded&&r._onProgress(e.Event("progress",{lengthComputable:!0,loaded:o-n.uploadedBytes,total:o-n.uploadedBytes}),n),t.uploadedBytes=n.uploadedBytes=o,n.result=i,n.textStatus=u,n.jqXHR=a,r._trigger("chunkdone",null,n),r._trigger("chunkalways",null,n),o<s?h():f.resolveWith(n.context,[i,u,a])}).fail(function(e,t,i){n.jqXHR=e,n.textStatus=t,n.errorThrown=i,r._trigger("chunkfail",null,n),r._trigger("chunkalways",null,n),f.rejectWith(n.context,[e,t,i])})},this._enhancePromise(l),l.abort=function(){return c.abort()},h(),l)},_beforeSend:function(e,t){this._active===0&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(t),this._initProgressObject(t),t._progress.loaded=t.loaded=t.uploadedBytes||0,t._progress.total=t.total=this._getTotal(t.files)||1,t._progress.bitrate=t.bitrate=0,this._active+=1,this._progress.loaded+=t.loaded,this._progress.total+=t.total},_onDone:function(t,n,r,i){var s=i._progress.total,o=i._response;i._progress.loaded<s&&this._onProgress(e.Event("progress",{lengthComputable:!0,loaded:s,total:s}),i),o.result=i.result=t,o.textStatus=i.textStatus=n,o.jqXHR=i.jqXHR=r,this._trigger("done",null,i)},_onFail:function(e,t,n,r){var i=r._response;r.recalculateProgress&&(this._progress.loaded-=r._progress.loaded,this._progress.total-=r._progress.total),i.jqXHR=r.jqXHR=e,i.textStatus=r.textStatus=t,i.errorThrown=r.errorThrown=n,this._trigger("fail",null,r)},_onAlways:function(e,t,n,r){this._trigger("always",null,r)},_onSend:function(t,n){n.submit||this._addConvenienceMethods(t,n);var r=this,i,s,o,u,a=r._getAJAXSettings(n),f=function(){return r._sending+=1,a._bitrateTimer=new r._BitrateTimer,i=i||((s||r._trigger("send",t,a)===!1)&&r._getXHRPromise(!1,a.context,s)||r._chunkedUpload(a)||e.ajax(a)).done(function(e,t,n){r._onDone(e,t,n,a)}).fail(function(e,t,n){r._onFail(e,t,n,a)}).always(function(e,t,n){r._onAlways(e,t,n,a),r._sending-=1,r._active-=1;if(a.limitConcurrentUploads&&a.limitConcurrentUploads>r._sending){var i=r._slots.shift();while(i){if(r._getDeferredState(i)==="pending"){i.resolve();break}i=r._slots.shift()}}r._active===0&&r._trigger("stop")}),i};return this._beforeSend(t,a),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(o=e.Deferred(),this._slots.push(o),u=o.pipe(f)):(this._sequence=this._sequence.pipe(f,f),u=this._sequence),u.abort=function(){return s=[undefined,"abort","abort"],i?i.abort():(o&&o.rejectWith(a.context,s),f())},this._enhancePromise(u)):f()},_onAdd:function(t,n){var r=this,i=!0,s=e.extend({},this.options,n),o=s.limitMultiFileUploads,u=this._getParamName(s),a,f,l,c;if(!s.singleFileUploads&&!o||!this._isXHRUpload(s))l=[n.files],a=[u];else if(!s.singleFileUploads&&o){l=[],a=[];for(c=0;c<n.files.length;c+=o)l.push(n.files.slice(c,c+o)),f=u.slice(c,c+o),f.length||(f=u),a.push(f)}else a=u;return n.originalFiles=n.files,e.each(l||n.files,function(s,o){var u=e.extend({},n);return u.files=l?o:[o],u.paramName=a[s],r._initResponseObject(u),r._initProgressObject(u),r._addConvenienceMethods(t,u),i=r._trigger("add",t,u),i}),i},_replaceFileInput:function(t){var n=t.clone(!0);e("<form></form>").append(n)[0].reset(),t.after(n).detach(),e.cleanData(t.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(e,r){return r===t[0]?n[0]:r}),t[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(t,n){var r=this,i=e.Deferred(),s=function(e){e&&!e.entry&&(e.entry=t),i.resolve([e])},o;return n=n||"",t.isFile?t._file?(t._file.relativePath=n,i.resolve(t._file)):t.file(function(e){e.relativePath=n,i.resolve(e)},s):t.isDirectory?(o=t.createReader(),o.readEntries(function(e){r._handleFileTreeEntries(e,n+t.name+"/").done(function(e){i.resolve(e)}).fail(s)},s)):i.resolve([]),i.promise()},_handleFileTreeEntries:function(t,n){var r=this;return e.when.apply(e,e.map(t,function(e){return r._handleFileTreeEntry(e,n)})).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(t){t=t||{};var n=t.items;return n&&n.length&&(n[0].webkitGetAsEntry||n[0].getAsEntry)?this._handleFileTreeEntries(e.map(n,function(e){var t;return e.webkitGetAsEntry?(t=e.webkitGetAsEntry(),t&&(t._file=e.getAsFile()),t):e.getAsEntry()})):e.Deferred().resolve(e.makeArray(t.files)).promise()},_getSingleFileInputFiles:function(t){t=e(t);var n=t.prop("webkitEntries")||t.prop("entries"),r,i;if(n&&n.length)return this._handleFileTreeEntries(n);r=e.makeArray(t.prop("files"));if(!r.length){i=t.prop("value");if(!i)return e.Deferred().resolve([]).promise();r=[{name:i.replace(/^.*\\/,"")}]}else r[0].name===undefined&&r[0].fileName&&e.each(r,function(e,t){t.name=t.fileName,t.size=t.fileSize});return e.Deferred().resolve(r).promise()},_getFileInputFiles:function(t){return t instanceof e&&t.length!==1?e.when.apply(e,e.map(t,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(t)},_onChange:function(t){var n=this,r={fileInput:e(t.target),form:e(t.target.form)};this._getFileInputFiles(r.fileInput).always(function(e){r.files=e,n.options.replaceFileInput&&n._replaceFileInput(r.fileInput),n._trigger("change",t,r)!==!1&&n._onAdd(t,r)})},_onPaste:function(t){var n=t.originalEvent&&t.originalEvent.clipboardData&&t.originalEvent.clipboardData.items,r={files:[]};if(n&&n.length){e.each(n,function(e,t){var n=t.getAsFile&&t.getAsFile();n&&r.files.push(n)});if(this._trigger("paste",t,r)===!1||this._onAdd(t,r)===!1)return!1}},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var t=this,n=e.dataTransfer,r={};n&&n.files&&n.files.length&&(e.preventDefault(),this._getDroppedFiles(n).always(function(n){r.files=n,t._trigger("drop",e,r)!==!1&&t._onAdd(e,r)}))},_onDragOver:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var n=t.dataTransfer;if(n){if(this._trigger("dragover",t)===!1)return!1;e.inArray("Files",n.types)!==-1&&(n.dropEffect="copy",t.preventDefault())}},_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop}),this._on(this.options.pasteZone,{paste:this._onPaste})),e.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_setOption:function(t,n){var r=e.inArray(t,this._specialOptions)!==-1;r&&this._destroyEventHandlers(),this._super(t,n),r&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var t=this.options;t.fileInput===undefined?t.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):t.fileInput instanceof e||(t.fileInput=e(t.fileInput)),t.dropZone instanceof e||(t.dropZone=e(t.dropZone)),t.pasteZone instanceof e||(t.pasteZone=e(t.pasteZone))},_getRegExp:function(e){var t=e.split("/"),n=t.pop();return t.shift(),new RegExp(t.join("/"),n)},_isRegExpOption:function(t,n){return t!=="url"&&e.type(n)==="string"&&/^\/.*\/[igm]{0,3}$/.test(n)},_initDataAttributes:function(){var t=this,n=this.options;e.each(e(this.element[0].cloneNode(!1)).data(),function(e,r){t._isRegExpOption(e,r)&&(r=t._getRegExp(r)),n[e]=r})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(t){var n=this;if(!t||this.options.disabled)return;t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always(function(e){t.files=e,n._onAdd(null,t)}):(t.files=e.makeArray(t.files),this._onAdd(null,t))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var n=this,r=e.Deferred(),i=r.promise(),s,o;return i.abort=function(){return o=!0,s?s.abort():(r.reject(null,"abort","abort"),i)},this._getFileInputFiles(t.fileInput).always(function(e){if(o)return;if(!e.length){r.reject();return}t.files=e,s=n._onSend(null,t).then(function(e,t,n){r.resolve(e,t,n)},function(e,t,n){r.reject(e,t,n)})}),this._enhancePromise(i)}t.files=e.makeArray(t.files);if(t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})}),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/IconSelectView",["views/ProtoView","collectionViews/SectionsCollectionView","collections/SectionsCollection","collectionViews/FiltersCollectionView","collections/FiltersCollection","fileupload","underscore","jquery","helpers"],function(e,n,r,i,s,o,u,a,f){var l,c;return l=function(e){function o(){return c=o.__super__.constructor.apply(this,arguments),c}return t(o,e),o.prototype.template="#icon-select-view-template",o.prototype.className="",o.prototype.events={keyup:"debouncedFilter","click #js-add-effects":"toggleEffects","click #js-next":"next","click #js-prev":"prev","click #js-page":"loadPage"},o.prototype.initialize=function(e){return this.o=e!=null?e:{},this.paginationTemplate=u.template(f.unescape(a("#pagination-template").text())),this.buttonCounterTemplate=u.template(f.unescape(a("#button-counter-template").text())),this.bindModelEvents(),this.debouncedFilter=u.debounce(this.filter,250),o.__super__.initialize.apply(this,arguments),this.sectionsCollection.on("afterFetch",u.bind(this.renderPagination,this)),this},o.prototype.next=function(){var e=this;return this.changePageNoty(),u.defer(function(){return e.sectionsCollection.nextPage()})},o.prototype.prev=function(){var e=this;return this.changePageNoty(),u.defer(function(){return e.sectionsCollection.prevPage()})},o.prototype.scrollTop=function(){return App.$bodyHtml.animate({scrollTop:this.$el.position().top})},o.prototype.showLoader=function(){return f.showLoaderLine("is-long").setLoaderLineProgress(100)},o.prototype.changePageNoty=function(){return this.showLoader(),this.scrollTop()},o.prototype.loadPage=function(e){return this.changePageNoty(),this.sectionsCollection.loadPage(parseInt(a(e.target).text(),10)||0)},o.prototype.toggleEffects=function(){return this.$("#js-filter-block").show().addClass("animated fadeInDown").find("#js-filters-place").trigger("show"),this.$el.addClass("is-filter-show")},o.prototype.filter=function(e){return App.vent.trigger("icon-select-filter:change",a.trim(a(e.target).val()))},o.prototype.bindModelEvents=function(){return this.model.on("change:selectedCounter",u.bind(this.renderButton,this))},o.prototype.render=function(){return o.__super__.render.apply(this,arguments),this.renderView(),this.$paginationPlace=this.$("#js-pagination-place"),this.renderButton(),this.initFileUpload(),this},o.prototype.renderPagination=function(){var e=this;return f.hideLoaderLine("is-long"),this.checkSelectedSections(),App.router.navigate(this.sectionsCollection.options.page!==0?"#/page-"+this.sectionsCollection.options.page:"#/page-loaded"),u.defer(function(){return e.$paginationPlace.html(e.paginationTemplate(e.sectionsCollection.pageInfo()))})},o.prototype.renderView=function(){var e=this;return this.filtersCollectionView=new i({collection:new s,isRender:!0,$el:this.$("#js-filters-place")}),this.filtersCollectionView.collection.fetch().then(function(){return e.filtersCollectionView.collection.addSvgFilters()}),this.sectionsCollection=new r({isPaginated:!0,pageNum:this.o.pageNum}),this.sectionsCollection.fetch().then(function(){if(e.isClosed)return;return e.$("#js-loader").fadeOut("fast",function(){return e.sectionsCollection.generateSvgData(),e.sectionsCollectionView=new n({collection:e.sectionsCollection,isRender:!0,$el:e.$("#js-section-collections-place")}),e.renderPagination(),App.sectionsCollectionView=e.sectionsCollectionView,e.model.sectionsView=e.sectionsCollectionView,e.isFooterVisible||e.showFooter(),e})})},o.prototype.showFooter=function(){var e=this;return u.defer(function(){return App.$footer.removeClass("h-gm").addClass("animated fadeInDown"),e.isFooterVisible=!1}),this},o.prototype.hideFooter=function(){return App.$footer.addClass("h-gm")},o.prototype.renderButton=function(){return this.$("#js-counter-btn-place").html(this.buttonCounterTemplate(this.model.toJSON()))},o.prototype.initFileUpload=function(){var e=this;return this.$("#fileupload").fileupload({url:"/file-upload",acceptFileTypes:/(\.|\/)(svg)$/i,dataType:"text",limitMultiFileUploads:999,add:function(t,n){return e.filesDropped=n.originalFiles.length,e.filesLoaded=0,n.submit()},done:function(t,n){return e.filesLoaded++,e.parseFile(n.result),e.filesLoaded===e.filesDropped&&e.finishFilesLoading()},error:function(e,t){return App.notifier.show({text:"loading error",type:"error"})},progressall:function(e,t){var n;return n=parseInt(t.loaded/t.total*100,10),App.$loadingLine.css({width:""+n+"%"})}})},o.prototype.finishFilesLoading=function(){var e=this;return setTimeout(function(){return App.$loadingLine.fadeOut(100,function(){return App.$loadingLine.width("0%"),App.$loadingLine.show()})},2e3)},o.prototype.parseFile=function(e){var t,n,r,i,s,o,a,f,l;r=e.match(/(data\-iconmelon\s?=\s?\")(.+?)\"/gi),s={},i=[];for(t=o=0,a=r.length;o<a;t=++o)n=r[t],n=n.split("data-iconmelon")[1].replace(/[\"\=]/gi,""),n=n.split(":"),(l=s[f=n[0]])==null&&(s[f]=[]),s[n[0]].push(n[1]),i.push(n[0]);return this.checkLoadedIcons(s,u.uniq(i))},o.prototype.checkSelectedSections=function(){var e,t,n,r,i,s,o,u,a,f,l,c,h;o={},l=App.iconsSelected;for(e=u=0,a=l.length;u<a;e=++u)t=l[e],t=t.split(":"),(c=o[f=t[0]])==null&&(o[f]=[]),o[t[0]].push(t[1]);h=[];for(s in o)n=o[s],h.push(function(){var o,u,a;a=[];for(e=o=0,u=n.length;o<u;e=++o)t=n[e],a.push(function(){var e,n,o,u,a,f;o=this.sectionsCollection.where({name:s}),f=[];for(r=e=0,n=o.length;e<n;r=++e)i=o[r],f.push((u=i.iconsCollection.where({hash:t}))!=null?(a=u[0])!=null?a.set("isSelected",!0):void 0:void 0);return f}.call(this));return a}.call(this));return h},o.prototype.checkLoadedIcons=function(e,t){var n=this;return this.loadSections(t).then(function(){var t,r,i,s,o,u,a,f,l;l=[];for(f in e)s=e[f],f!=="filter"?(a=n.sectionsCollectionView.collection.where({name:f}),l.push(function(){var e,t,n;n=[];for(r=e=0,t=a.length;e<t;r=++e)u=a[r],n.push(function(){var e,t,n,r,a;a=[];for(o=e=0,t=s.length;e<t;o=++e)i=s[o],a.push((n=u.iconsCollection.where({hash:i}))!=null?(r=n[0])!=null?r.select():void 0:void 0);return a}());return n}())):l.push(function(){var e,n,i,o,u;u=[];for(r=e=0,n=s.length;e<n;r=++e)t=s[r],u.push((i=this.filtersCollectionView.collection.where({hash:t}))!=null?(o=i[0])!=null?o.set("isSelected",!0):void 0:void 0);return u}.call(n));return l})},o.prototype.loadSections=function(e){var t=this;return this.sectionsCollection.fetch({sectionNames:e}).then(function(){return t.sectionsCollection.generateSvgData(),t.sectionsCollection.options.page=0,t.sectionsCollection.options.sectionNames=null,t.renderPagination()})},o.prototype.teardown=function(){var e;return f.hideLoaderLine("is-long"),(e=this.sectionsCollectionView)!=null&&e.teardown(),this.hideFooter(),o.__super__.teardown.apply(this,arguments)},o}(e),l})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("models/IconSelectModel",["models/ProtoModel"],function(e){var n,r;return n=function(e){function n(){return r=n.__super__.constructor.apply(this,arguments),r}return t(n,e),n.prototype.defaults={selectedCounter:0},n.prototype.initialize=function(){return App.vent.on("icon:select",_.bind(this.refreshCounter,this)),n.__super__.initialize.apply(this,arguments),this},n.prototype.refreshCounter=function(){var e;return e=0,this.set("selectedCounter",App.iconsSelected.length+App.filtersSelected.length)},n}(e),n})}.call(this),define("hammer",["jquery"],function(e){(function(e,t){function r(){if(n.READY)return;n.event.determineEventTypes();for(var e in n.gestures)n.gestures.hasOwnProperty(e)&&n.detection.register(n.gestures[e]);n.event.onTouch(n.DOCUMENT,n.EVENT_MOVE,n.detection.detect),n.event.onTouch(n.DOCUMENT,n.EVENT_END,n.detection.detect),n.READY=!0}var n=function(e,t){return new n.Instance(e,t||{})};n.defaults={stop_browser_behavior:{userSelect:"none",touchAction:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},n.HAS_POINTEREVENTS=navigator.pointerEnabled||navigator.msPointerEnabled,n.HAS_TOUCHEVENTS="ontouchstart"in e,n.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android/i,n.NO_MOUSEEVENTS=n.HAS_TOUCHEVENTS&&navigator.userAgent.match(n.MOBILE_REGEX),n.EVENT_TYPES={},n.DIRECTION_DOWN="down",n.DIRECTION_LEFT="left",n.DIRECTION_UP="up",n.DIRECTION_RIGHT="right",n.POINTER_MOUSE="mouse",n.POINTER_TOUCH="touch",n.POINTER_PEN="pen",n.EVENT_START="start",n.EVENT_MOVE="move",n.EVENT_END="end",n.DOCUMENT=document,n.plugins={},n.READY=!1,n.Instance=function(e,t){var i=this;return r(),this.element=e,this.enabled=!0,this.options=n.utils.extend(n.utils.extend({},n.defaults),t||{}),this.options.stop_browser_behavior&&n.utils.stopDefaultBrowserBehavior(this.element,this.options.stop_browser_behavior),n.event.onTouch(e,n.EVENT_START,function(e){i.enabled&&n.detection.startDetect(i,e)}),this},n.Instance.prototype={on:function(t,n){var r=t.split(" ");for(var i=0;i<r.length;i++)this.element.addEventListener(r[i],n,!1);return this},off:function(t,n){var r=t.split(" ");for(var i=0;i<r.length;i++)this.element.removeEventListener(r[i],n,!1);return this},trigger:function(t,r){var i=n.DOCUMENT.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=r;var s=this.element;return n.utils.hasParent(r.target,s)&&(s=r.target),s.dispatchEvent(i),this},enable:function(t){return this.enabled=t,this}};var i=null,s=!1,o=!1;n.event={bindDom:function(e,t,n){var r=t.split(" ");for(var i=0;i<r.length;i++)e.addEventListener(r[i],n,!1)},onTouch:function(t,r,u){var a=this;this.bindDom(t,n.EVENT_TYPES[r],function(f){var l=f.type.toLowerCase();if(l.match(/mouse/)&&o)return;if(l.match(/touch/)||l.match(/pointerdown/)||l.match(/mouse/)&&f.which===1)s=!0;l.match(/touch|pointer/)&&(o=!0);var c=0;s&&(n.HAS_POINTEREVENTS&&r!=n.EVENT_END?c=n.PointerEvent.updatePointer(r,f):l.match(/touch/)?c=f.touches.length:o||(c=l.match(/up/)?0:1),c>0&&r==n.EVENT_END?r=n.EVENT_MOVE:c||(r=n.EVENT_END),!c&&i!==null?f=i:i=f,u.call(n.detection,a.collectEventData(t,r,f)),n.HAS_POINTEREVENTS&&r==n.EVENT_END&&(c=n.PointerEvent.updatePointer(r,f))),c||(i=null,s=!1,o=!1,n.PointerEvent.reset())})},determineEventTypes:function(){var t;n.HAS_POINTEREVENTS?t=n.PointerEvent.getEvents():n.NO_MOUSEEVENTS?t=["touchstart","touchmove","touchend touchcancel"]:t=["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],n.EVENT_TYPES[n.EVENT_START]=t[0],n.EVENT_TYPES[n.EVENT_MOVE]=t[1],n.EVENT_TYPES[n.EVENT_END]=t[2]},getTouchList:function(t){return n.HAS_POINTEREVENTS?n.PointerEvent.getTouchList():t.touches?t.touches:[{identifier:1,pageX:t.pageX,pageY:t.pageY,target:t.target}]},collectEventData:function(t,r,i){var s=this.getTouchList(i,r),o=n.POINTER_TOUCH;if(i.type.match(/mouse/)||n.PointerEvent.matchType(n.POINTER_MOUSE,i))o=n.POINTER_MOUSE;return{center:n.utils.getCenter(s),timeStamp:(new Date).getTime(),target:i.target,touches:s,eventType:r,pointerType:o,srcEvent:i,preventDefault:function(){this.srcEvent.preventManipulation&&this.srcEvent.preventManipulation(),this.srcEvent.preventDefault&&this.srcEvent.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return n.detection.stopDetect()}}}},n.PointerEvent={pointers:{},getTouchList:function(){var e=this,t=[];return Object.keys(e.pointers).sort().forEach(function(n){t.push(e.pointers[n])}),t},updatePointer:function(e,t){return e==n.EVENT_END?this.pointers={}:(t.identifier=t.pointerId,this.pointers[t.pointerId]=t),Object.keys(this.pointers).length},matchType:function(e,t){if(!t.pointerType)return!1;var r={};return r[n.POINTER_MOUSE]=t.pointerType==t.MSPOINTER_TYPE_MOUSE||t.pointerType==n.POINTER_MOUSE,r[n.POINTER_TOUCH]=t.pointerType==t.MSPOINTER_TYPE_TOUCH||t.pointerType==n.POINTER_TOUCH,r[n.POINTER_PEN]=t.pointerType==t.MSPOINTER_TYPE_PEN||t.pointerType==n.POINTER_PEN,r[e]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}},n.utils={extend:function(n,r,i){for(var s in r){if(n[s]!==t&&i)continue;n[s]=r[s]}return n},hasParent:function(e,t){while(e){if(e==t)return!0;e=e.parentNode}return!1},getCenter:function(t){var n=[],r=[];for(var i=0,s=t.length;i<s;i++)n.push(t[i].pageX),r.push(t[i].pageY);return{pageX:(Math.min.apply(Math,n)+Math.max.apply(Math,n))/2,pageY:(Math.min.apply(Math,r)+Math.max.apply(Math,r))/2}},getVelocity:function(t,n,r){return{x:Math.abs(n/t)||0,y:Math.abs(r/t)||0}},getAngle:function(t,n){var r=n.pageY-t.pageY,i=n.pageX-t.pageX;return Math.atan2(r,i)*180/Math.PI},getDirection:function(t,r){var i=Math.abs(t.pageX-r.pageX),s=Math.abs(t.pageY-r.pageY);return i>=s?t.pageX-r.pageX>0?n.DIRECTION_LEFT:n.DIRECTION_RIGHT:t.pageY-r.pageY>0?n.DIRECTION_UP:n.DIRECTION_DOWN},getDistance:function(t,n){var r=n.pageX-t.pageX,i=n.pageY-t.pageY;return Math.sqrt(r*r+i*i)},getScale:function(t,n){return t.length>=2&&n.length>=2?this.getDistance(n[0],n[1])/this.getDistance(t[0],t[1]):1},getRotation:function(t,n){return t.length>=2&&n.length>=2?this.getAngle(n[1],n[0])-this.getAngle(t[1],t[0]):0},isVertical:function(t){return t==n.DIRECTION_UP||t==n.DIRECTION_DOWN},stopDefaultBrowserBehavior:function(t,n){var r,i=["webkit","khtml","moz","ms","o",""];if(!n||!t.style)return;for(var s=0;s<i.length;s++)for(var o in n)n.hasOwnProperty(o)&&(r=o,i[s]&&(r=i[s]+r.substring(0,1).toUpperCase()+r.substring(1)),t.style[r]=n[o]);n.userSelect=="none"&&(t.onselectstart=function(){return!1})}},n.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,r){if(this.current)return;this.stopped=!1,this.current={inst:t,startEvent:n.utils.extend({},r),lastEvent:!1,name:""},this.detect(r)},detect:function(t){if(!this.current||this.stopped)return;t=this.extendEventData(t);var r=this.current.inst.options;for(var i=0,s=this.gestures.length;i<s;i++){var o=this.gestures[i];if(!this.stopped&&r[o.name]!==!1&&o.handler.call(o,t,this.current.inst)===!1){this.stopDetect();break}}return this.current&&(this.current.lastEvent=t),t.eventType==n.EVENT_END&&!t.touches.length-1&&this.stopDetect(),t},stopDetect:function(){this.previous=n.utils.extend({},this.current),this.current=null,this.stopped=!0},extendEventData:function(t){var r=this.current.startEvent;if(r&&(t.touches.length!=r.touches.length||t.touches===r.touches)){r.touches=[];for(var i=0,s=t.touches.length;i<s;i++)r.touches.push(n.utils.extend({},t.touches[i]))}var o=t.timeStamp-r.timeStamp,u=t.center.pageX-r.center.pageX,a=t.center.pageY-r.center.pageY,f=n.utils.getVelocity(o,u,a);return n.utils.extend(t,{deltaTime:o,deltaX:u,deltaY:a,velocityX:f.x,velocityY:f.y,distance:n.utils.getDistance(r.center,t.center),angle:n.utils.getAngle(r.center,t.center),direction:n.utils.getDirection(r.center,t.center),scale:n.utils.getScale(r.touches,t.touches),rotation:n.utils.getRotation(r.touches,t.touches),startEvent:r}),t},register:function(r){var i=r.defaults||{};return i[r.name]===t&&(i[r.name]=!0),n.utils.extend(n.defaults,i,!0),r.index=r.index||1e3,this.gestures.push(r),this.gestures.sort(function(e,t){return e.index<t.index?-1:e.index>t.index?1:0}),this.gestures}},n.gestures=n.gestures||{},n.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:1},timer:null,handler:function(t,r){switch(t.eventType){case n.EVENT_START:clearTimeout(this.timer),n.detection.current.name=this.name,this.timer=setTimeout(function(){n.detection.current.name=="hold"&&r.trigger("hold",t)},r.options.hold_timeout);break;case n.EVENT_MOVE:t.distance>r.options.hold_threshold&&clearTimeout(this.timer);break;case n.EVENT_END:clearTimeout(this.timer)}}},n.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},handler:function(t,r){if(t.eventType==n.EVENT_END){var i=n.detection.previous,s=!1;if(t.deltaTime>r.options.tap_max_touchtime||t.distance>r.options.tap_max_distance)return;i&&i.name=="tap"&&t.timeStamp-i.lastEvent.timeStamp<r.options.doubletap_interval&&t.distance<r.options.doubletap_distance&&(r.trigger("doubletap",t),s=!0);if(!s||r.options.tap_always)n.detection.current.name="tap",r.trigger(n.detection.current.name,t)}}},n.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_max_touches:1,swipe_velocity:.7},handler:function(t,r){if(t.eventType==n.EVENT_END){if(r.options.swipe_max_touches>0&&t.touches.length>r.options.swipe_max_touches)return;if(t.velocityX>r.options.swipe_velocity||t.velocityY>r.options.swipe_velocity)r.trigger(this.name,t),r.trigger(this.name+t.direction,t)}}},n.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,drag_max_touches:1,drag_block_horizontal:!1,drag_block_vertical:!1,drag_lock_to_axis:!1,drag_lock_min_distance:25},triggered:!1,handler:function(t,r){if(n.detection.current.name!=this.name&&this.triggered){r.trigger(this.name+"end",t),this.triggered=!1;return}if(r.options.drag_max_touches>0&&t.touches.length>r.options.drag_max_touches)return;switch(t.eventType){case n.EVENT_START:this.triggered=!1;break;case n.EVENT_MOVE:if(t.distance<r.options.drag_min_distance&&n.detection.current.name!=this.name)return;n.detection.current.name=this.name;if(n.detection.current.lastEvent.drag_locked_to_axis||r.options.drag_lock_to_axis&&r.options.drag_lock_min_distance<=t.distance)t.drag_locked_to_axis=!0;var i=n.detection.current.lastEvent.direction;t.drag_locked_to_axis&&i!==t.direction&&(n.utils.isVertical(i)?t.direction=t.deltaY<0?n.DIRECTION_UP:n.DIRECTION_DOWN:t.direction=t.deltaX<0?n.DIRECTION_LEFT:n.DIRECTION_RIGHT),this.triggered||(r.trigger(this.name+"start",t),this.triggered=!0),r.trigger(this.name,t),r.trigger(this.name+t.direction,t),(r.options.drag_block_vertical&&n.utils.isVertical(t.direction)||r.options.drag_block_horizontal&&!n.utils.isVertical(t.direction))&&t.preventDefault();break;case n.EVENT_END:this.triggered&&r.trigger(this.name+"end",t),this.triggered=!1}}},n.gestures.Transform={name:"transform",index:45,defaults:{transform_min_scale:.01,transform_min_rotation:1,transform_always_block:!1},triggered:!1,handler:function(t,r){if(n.detection.current.name!=this.name&&this.triggered){r.trigger(this.name+"end",t),this.triggered=!1;return}if(t.touches.length<2)return;r.options.transform_always_block&&t.preventDefault();switch(t.eventType){case n.EVENT_START:this.triggered=!1;break;case n.EVENT_MOVE:var i=Math.abs(1-t.scale),s=Math.abs(t.rotation);if(i<r.options.transform_min_scale&&s<r.options.transform_min_rotation)return;n.detection.current.name=this.name,this.triggered||(r.trigger(this.name+"start",t),this.triggered=!0),r.trigger(this.name,t),s>r.options.transform_min_rotation&&r.trigger("rotate",t),i>r.options.transform_min_scale&&(r.trigger("pinch",t),r.trigger("pinch"+(t.scale<1?"in":"out"),t));break;case n.EVENT_END:this.triggered&&r.trigger(this.name+"end",t),this.triggered=!1}}},n.gestures.Touch={name:"touch",index:-Infinity,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(t,r){if(r.options.prevent_mouseevents&&t.pointerType==n.POINTER_MOUSE){t.stopDetect();return}r.options.prevent_default&&t.preventDefault(),t.eventType==n.EVENT_START&&r.trigger(this.name,t)}},n.gestures.Release={name:"release",index:Infinity,handler:function(t,r){t.eventType==n.EVENT_END&&r.trigger(this.name,t)}},typeof module=="object"&&typeof module.exports=="object"?module.exports=n:(e.Hammer=n,typeof e.define=="function"&&e.define.amd&&e.define("hammer",[],function(){return n}))})(this),function(e,t){if(e===t)return;Hammer.event.bindDom=function(n,r,i){e(n).on(r,function(e){var n=e.originalEvent||e;n.pageX===t&&(n.pageX=e.pageX,n.pageY=e.pageY),n.target||(n.target=e.target),n.which===t&&(n.which=n.button),n.preventDefault||(n.preventDefault=e.preventDefault),n.stopPropagation||(n.stopPropagation=e.stopPropagation),i.call(this,n)})},Hammer.Instance.prototype.on=function(t,n){return e(this.element).on(t,n)},Hammer.Instance.prototype.off=function(t,n){return e(this.element).off(t,n)},Hammer.Instance.prototype.trigger=function(t,n){var r=e(this.element);return r.has(n.target).length&&(r=e(n.target)),r.trigger({type:t,gesture:n})},e.fn.hammer=function(t){return this.each(function(){var n=e(this),r=n.data("hammer");r?r&&t&&Hammer.utils.extend(r.options,t):n.data("hammer",new Hammer(this,t||{}))})}}(window.jQuery||window.Zepto)}),define("tween",[],function(){var e=e||function(){var e=[];return{REVISION:"10",getAll:function(){return e},removeAll:function(){e=[]},add:function(t){e.push(t)},remove:function(t){t=e.indexOf(t),-1!==t&&e.splice(t,1)},update:function(t){if(0===e.length)return!1;for(var n=0,r=e.length,t=void 0!==t?t:void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now();n<r;)e[n].update(t)?n++:(e.splice(n,1),r--);return!0}}}();return e.Tween=function(t){var n={},r={},i={},s=1e3,o=0,u=0,a=null,f=e.Easing.Linear.None,l=e.Interpolation.Linear,c=[],h=null,p=!1,d=null,v=null,m;for(m in t)n[m]=parseFloat(t[m],10);this.to=function(e,t){return void 0!==t&&(s=t),r=e,this},this.start=function(s){e.add(this),p=!1,a=void 0!==s?s:void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now(),a+=u;for(var o in r){if(r[o]instanceof Array){if(0===r[o].length)continue;r[o]=[t[o]].concat(r[o])}n[o]=t[o],0==n[o]instanceof Array&&(n[o]*=1),i[o]=n[o]||0}return this},this.stop=function(){return e.remove(this),this},this.delay=function(e){return u=e,this},this.repeat=function(e){return o=e,this},this.easing=function(e){return f=e,this},this.interpolation=function(e){return l=e,this},this.chain=function(){return c=arguments,this},this.onStart=function(e){return h=e,this},this.onUpdate=function(e){return d=e,this},this.onComplete=function(e){return v=e,this},this.update=function(e){if(e<a)return!0;!1===p&&(null!==h&&h.call(t),p=!0);var m=(e-a)/s,m=1<m?1:m,y=f(m),w;for(w in r){var E=n[w]||0,S=r[w];S instanceof Array?t[w]=l(S,y):("string"==typeof S&&(S=E+parseFloat(S,10)),t[w]=E+(S-E)*y)}null!==d&&d.call(t,y);if(1==m){if(!(0<o)){null!==v&&v.call(t),m=0;for(y=c.length;m<y;m++)c[m].start(e);return!1}isFinite(o)&&o--;for(w in i)"string"==typeof r[w]&&(i[w]+=parseFloat(r[w],10)),n[w]=i[w];a=e+u}return!0}},e.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return 1>(e*=2)?.5*e*e:-0.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return 1>(e*=2)?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return 1>(e*=2)?.5*e*e*e*e:-0.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return 1>(e*=2)?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:1>(e*=2)?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return 1>(e*=2)?-0.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||1>n?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*2*Math.PI/.4)))},Out:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||1>n?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*2*Math.PI/.4)+1)},InOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||1>n?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),1>(e*=2)?-0.5*n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*2*Math.PI/.4):.5*n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*2*Math.PI/.4)+1)}},Back:{In:function(e){return e*e*(2.70158*e-1.70158)},Out:function(e){return--e*e*(2.70158*e+1.70158)+1},InOut:function(e){return 1>(e*=2)?.5*e*e*(3.5949095*e-2.5949095):.5*((e-=2)*e*(3.5949095*e+2.5949095)+2)}},Bounce:{In:function(t){return 1-e.Easing.Bounce.Out(1-t)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(t){return.5>t?.5*e.Easing.Bounce.In(2*t):.5*e.Easing.Bounce.Out(2*t-1)+.5}}},e.Interpolation={Linear:function(t,n){var r=t.length-1,i=r*n,s=Math.floor(i),o=e.Interpolation.Utils.Linear;return 0>n?o(t[0],t[1],i):1<n?o(t[r],t[r-1],r-i):o(t[s],t[s+1>r?r:s+1],i-s)},Bezier:function(t,n){var r=0,i=t.length-1,s=Math.pow,o=e.Interpolation.Utils.Bernstein,u;for(u=0;u<=i;u++)r+=s(1-n,i-u)*s(n,u)*t[u]*o(i,u);return r},CatmullRom:function(t,n){var r=t.length-1,i=r*n,s=Math.floor(i),o=e.Interpolation.Utils.CatmullRom;return t[0]===t[r]?(0>n&&(s=Math.floor(i=r*(1+n))),o(t[(s-1+r)%r],t[s],t[(s+1)%r],t[(s+2)%r],i-s)):0>n?t[0]-(o(t[0],t[0],t[1],t[1],-i)-t[0]):1<n?t[r]-(o(t[r],t[r],t[r-1],t[r-1],i-r)-t[r]):o(t[s?s-1:0],t[s],t[r<s+1?r:s+1],t[r<s+2?r:s+2],i-s)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(t,n){var r=e.Interpolation.Utils.Factorial;return r(t)/r(n)/r(t-n)},Factorial:function(){var e=[1];return function(t){var n=1,r;if(e[t])return e[t];for(r=t;1<r;r--)n*=r;return e[t]=n}}(),CatmullRom:function(e,t,n,r,i){var e=.5*(n-e),r=.5*(r-t),s=i*i;return(2*t-2*n+e+r)*i*s+(-3*t+3*n-2*e-r)*s+e*i+t}}},window.requestAnimationFrame||(window.requestAnimationFrame=function(){return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)}}()),e}),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/pages/main",["views/pages/PageView","views/IconSelectView","models/IconSelectModel","underscore","hammer","tween","helpers"],function(e,n,r,i,s,o,u){var a,f;return a=function(e){function s(){return f=s.__super__.constructor.apply(this,arguments),f}return t(s,e),s.prototype.template="#main-template",s.prototype.className="cf",s.prototype.events={"click .js-download":"download"},s.prototype.initialize=function(e){return this.o=e!=null?e:{},this.isNoPageAnima=!0,s.__super__.initialize.apply(this,arguments),this},s.prototype.render=function(){var e=this;return s.__super__.render.apply(this,arguments),this.iconSelectView=new n({model:new r,$el:this.$("#js-icons-select-view-place"),isRender:!0,pageNum:this.o.pageNum}),this.$mainLogo=this.$(".main-logo-b"),this.$melon=this.$(".logo-large-e"),this.$mainSection=this.$("#js-icons-select-view-place"),this.$browserIcons=this.$mainLogo.find("#js-browsers-icons"),i.defer(function(){return!App.mainAnimated&&e.animate(),App.mainAnimated&&e.show()}),this.hammerTime(),this},s.prototype.hammerTime=function(){var e,t,n,r,i=this;return e=this.$("#js-main-logo-icon"),n=e.hammer(),this.maxDeg=20,t=0,r=u.prefix(),n.on("drag",function(n){return o.removeAll(),t=n.gesture.deltaX,t=i.sliceDeg(t),e.css(""+r+"transform","rotate("+t+"deg)")}),n.on("touch",function(n){return t=-(e.position().left+e.outerWidth()/2-n.gesture.center.pageX),t=i.sliceDeg(t)}),n.on("release",function(n){var s;return s=(new o.Tween({amount:t})).to({amount:0},2e3).easing(function(e){var t;return t=Math.exp(-e*5)*Math.cos(Math.PI*2*e*5),1-t}).onUpdate(function(){return e.css(""+r+"transform","rotate("+this.amount+"deg)")}).start(),s.start(),!i.animateStarted&&i.animateTween()})},s.prototype.sliceDeg=function(e){return e=e>this.maxDeg?this.maxDeg:e,e=e<-this.maxDeg?-this.maxDeg:e},s.prototype.animateTween=function(){var e=this;return this.animateStarted=!0,requestAnimationFrame(function(){return e.animateTween()}),o.update()},s.prototype.download=function(){var e=this;if(App.iconsSelected.length===0){App.notifier.show({type:"error",text:"select at least one icon to download"});return}return this.$downloadBtn=this.$(".js-download"),this.$downloadBtn.addClass("loading-eff"),$.ajax({type:"post",url:"/download-icons",data:{icons:App.iconsSelected,filters:App.filtersSelected},success:function(e){return location.href="/generated-icons/"+e+".zip"},error:function(e){return console.error(e)},complete:function(){return e.$downloadBtn.removeClass("loading-eff")}})},s.prototype.animate=function(){var e=this;return this.$mainLogo.addClass("animated fadeInRightBig"),this.$melon.addClass("animated swing"),setTimeout(function(){return e.$mainSection.addClass("animated fadeInDown"),e.animateIcons(),App.mainAnimated=!0},1e3)},s.prototype.animateIcons=function(){return this.$browserIcons.addClass("animated fadeInDown")},s.prototype.show=function(){return this.$mainLogo.addClass("is-no-translateX"),this.$melon.removeClass("is-rotated"),this.$mainSection.addClass("animated fadeInDown"),this.$mainLogo.addClass("animated fadeInDown")},s.prototype.teardown=function(){return this.iconSelectView.teardown(),s.__super__.teardown.apply(this,arguments),this},s}(e),a})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/IconEditView",["views/ProtoView","models/IconModel","underscore","jquery","helpers"],function(e,n,r,i,s){var o,u;return o=function(e){function o(){return u=o.__super__.constructor.apply(this,arguments),u}return t(o,e),o.prototype.model=n,o.prototype.template="#icon-edit-view-template",o.prototype.events={"click #js-destroy":"destroy","keyup #js-shape":"preSetShape","keyup #js-name":"preSetName"},o.prototype.bindings={"#js-name":{observe:"name",onSet:"setName"},"#js-shape":{observe:"shape",onSet:"setShape"}},o.prototype.preSetShape=function(e){return this.setShape(i(e.target).val()),this.$("#js-shape").toggleClass("is-error",!this.model.get("isShapeValid"))},o.prototype.preSetName=function(e){return this.$("#js-name").toggleClass("is-error",!this.model.get("isNameValid"))},o.prototype.setShape=function(e){var t,n,r;return t=i("<g>").html(e),r=s.generateHash(),t.attr("id",r),this.model.set("hash",r),this.model.collection.parentModel.get("isMulticolor")||t.find("*").each(function(e,t){var n;if(!this.model.get("isMulticolor")){n=i(t);if(n.attr("fill")!=="none"&&!n.attr("fill").match(/url/gi))return n.removeAttr("fill")}}),n=this.$svg.find("#"+r),n.length&&n.remove(),this.$svg.append(t),s.refreshSvg(),this.$svg=i("#svg-source"),this.model.attributes.shape=t.html(),this.model.set("isShapeValid",t.children().length?!0:!1),e},o.prototype.setName=function(e){return this.model.set("isNameValid",i.trim(e).length>0?!0:!1),e!=null?e.toLowerCase():void 0},o.prototype.initialize=function(e){return this.o=e!=null?e:{},this.$svg=i("#svg-source"),this.$svgWrap=App.$svgWrap,this.bindModelEvents(),this.model.on("change:name",r.bind(this.modelChange,this)),this.model.on("change:shape",r.bind(this.modelChange,this)),o.__super__.initialize.apply(this,arguments),this.model.get("shape")&&this.model.collection.mode!=="edit"&&this.setShape(this.model.get("shape")),this},o.prototype.modelChange=function(){return this.model.set("isValid",this.model.get("isNameValid")&&this.model.get("isShapeValid")),App.vent.trigger("edit-collection:change")},o.prototype.render=function(){var e;return e=this.$(":focus").attr("id"),o.__super__.render.apply(this,arguments),this.stickit(),this.$("#"+e).focus(),this},o.prototype.bindModelEvents=function(){return this.model.on("change:shape",this.render),this.model.on("change:isNameValid",this.render),this.model.on("change:isShapeValid",this.render)},o.prototype.destroy=function(){return this.model.collection.length===1&&this.model.collection.add({}),this.model.destroy(),App.vent.trigger("edit-collection:change")},o}(e),o})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/ThanxModalView",["views/ProtoView","underscore","jquery","helpers"],function(e,n,r,i,s){var o,u;return o=function(e){function n(){return u=n.__super__.constructor.apply(this,arguments),u}return t(n,e),n.prototype.template="#thanx-modal-view-template",n.prototype.className="modal-b",n.prototype.events={"click #js-close":"close","click .js-findout":"findout"},n.prototype.initialize=function(e){var t=this;return this.o=e!=null?e:{},n.__super__.initialize.apply(this,arguments),this.blindedClickFun=function(){return t.close(),App.$blinded.off("click",t.blindedClickFun)},this.render(),this},n.prototype.render=function(){return n.__super__.render.apply(this,arguments),this.$el.hide().appendTo(document.body).fadeIn(),App.$blinded.fadeIn("fast").css({border:"1px solid rgba(0,0,0,.75)"}),App.$blinded.on("click",this.blindedClickFun),this},n.prototype.findout=function(){return App.router.navigate("#/support-us",{trigger:!0}),this.close()},n.prototype.close=function(){var e=this;return typeof this.onClose=="function"&&this.onClose(),App.$blinded.hide(),this.teardown(),this.$el.fadeOut("fast",function(){return e.$el.remove()})},n}(e),o})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/EditCollectionView",["views/ProtoView","views/IconEditView","collections/IconsCollection","collectionViews/IconsCollectionView","views/ThanxModalView","fileupload","jquery","helpers"],function(e,n,r,i,s,o,u,a){var f,l;return f=function(e){function o(){return l=o.__super__.constructor.apply(this,arguments),l}return t(o,e),o.prototype.template="#edit-collection-view-template",o.prototype.events={"click #js-add-icon":"addIcon","click .js-submit-btn:not(.is-inactive)":"submit","click .js-submit-btn.is-inactive":"suggestOnSubmition","click .js-delete":"delete","click .js-save":"save"},o.prototype.bindings={"#js-collection-name":{observe:"name",onSet:"nameSet"},"#js-author":{observe:"author",onSet:"authorSet"},"#js-license":{observe:"license",onSet:"licenseSet"},"#js-email":{observe:"email",onSet:"emailSet"},"#js-website":"website","#js-moderated input":"moderated","#js-multicolor  input":{observe:"isMulticolor",onSet:"multicolorChange"}},o.prototype.ui={submitBtn:".js-submit-btn"},o.prototype.initialize=function(e){return this.o=e!=null?e:{},o.__super__.initialize.apply(this,arguments),this.iconsLoaded=[],this.o.mode==="edit"&&this.makeSvgData(),this.initFileUpload(),this},o.prototype.render=function(){return o.__super__.render.apply(this,arguments),this.$submitButton=this.$(this.ui.submitBtn),this.o.mode==="edit"&&this.$(".collection-credits-b").addClass("is-edit"),this.renderIconsCollection(),this.stickit(),this},o.prototype.multicolorChange=function(e){var t=this;return _.defer(function(){return t.makeSvgData(!1,!0),_.defer(function(){return t.renderIcons()})}),e},o.prototype.renderIcons=function(){var e,t,n,r,i,s;i=this.iconsCollection.children.toArray(),s=[];for(e=n=0,r=i.length;n<r;e=++n)t=i[e],s.push(t.render());return s},o.prototype.suggestOnSubmition=function(e){return App.notifier.show({type:"error",text:"You have to fill credentials and have at least one valid icon to make this button active"})},o.prototype.makeSvgData=function(e,t){var n=this;return e==null&&(e=!0),t==null&&(t=!1),console.time("svg load"),this.$shapes=u("<div>"),this.iconsCollection.collection.each(function(r){return a.upsetSvgShape({hash:r.get("hash"),$shapes:n.$shapes,shape:r.get("shape"),isCheck:e,isMulticolor:n.model.get("isMulticolor"),isReset:t})}),a.addToSvg(this.$shapes),console.timeEnd("svg load")},o.prototype.renderIconsCollection=function(){return this.iconsCollection=new i({itemView:n,collection:new r(this.model.get("icons").length?this.model.get("icons"):[{}]),isRender:!0,$el:this.$("#js-icons-place"),mode:this.o.mode}),this.iconsCollection.collection.parentModel=this.model,App.vent.on("edit-collection:change",_.bind(this.checkIfValidCollection,this))},o.prototype.addIcon=function(){return this.iconsCollection.collection.add({})},o.prototype.nameSet=function(e){return this.nameValid=u.trim(e.length)<1?!1:!0,this.$("#js-collection-name").toggleClass("is-error",!this.nameValid),this.checkIfValidCollection(),e},o.prototype.authorSet=function(e){return this.authorValid=u.trim(e.length)<3?!1:!0,this.$("#js-author").toggleClass("is-error",!this.authorValid),this.checkIfValidCollection(),e},o.prototype.emailSet=function(e){var t;return t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,this.emailValid=t.test(e),this.$("#js-email").toggleClass("is-error",!this.emailValid),this.checkIfValidCollection(),e},o.prototype.licenseSet=function(e){return this.licenseValid=u.trim(e).length>=3,this.$("#js-license").toggleClass("is-error",!this.licenseValid),this.checkIfValidCollection(),e},o.prototype.checkIfValidCollection=function(){return this.enableSubmitButton(this.nameValid&&this.authorValid&&this.emailValid&&this.licenseValid&&this.isValidCollection())},o.prototype.isValidCollection=function(){var e,t;e=0,t=!1;while(e<this.iconsCollection.collection.models.length)this.iconsCollection.collection.at(e).get("isValid")&&(e=this.iconsCollection.collection.models.length,t=!0),e++;return t},o.prototype.enableSubmitButton=function(e){return this.$submitButton.toggleClass("is-inactive",!e)},o.prototype.submit=function(){var e=this;return this.$submitButton.addClass("loading-eff is-inactive"),_.defer(function(){return e.model.set("icons",e.iconsCollection.collection.toJSON()),e.model.save().then(function(){return e.$submitButton.removeClass("loading-eff"),(new s).onClose=function(){}}).fail(function(t){return e.$submitButton.removeClass("loading-eff is-inactive")})})},o.prototype["delete"]=function(){if(confirm("Are you sure?"))return this.model.destroy()},o.prototype.save=function(){var e=this;return _.defer(function(){return e.model.set("icons",e.iconsCollection.collection.toJSON()),e.model.save().done(function(){return App.notifier.show({type:"ok",text:"saved happily",delay:4e3})}).fail(function(){return App.notifier.show({type:"error",text:"saving sadness",delay:4e3})})})},o.prototype.initFileUpload=function(){var e=this;return this.$("#fileupload").fileupload({url:"/file-upload",acceptFileTypes:/(\.|\/)(svg)$/i,dataType:"text",limitMultiFileUploads:999,add:function(t,n){return e.filesDropped=n.originalFiles.length,e.filesLoaded=0,n.submit()},done:function(t,n){var r;return e.filesLoaded++,r=n.files[0].name.split(".svg")[0],n={shape:n.result,name:r!=null?r.toLowerCase():void 0,hash:a.generateHash(),isValid:!0},e.iconsLoaded.push(n),e.filesLoaded===e.filesDropped&&e.finishFilesLoading()},error:function(e,t){return App.notifier.show({text:"loading error",type:"error"})},progressall:function(e,t){var n;return n=parseInt(t.loaded/t.total*100,10),App.$loadingLine.css({width:""+n+"%"})}})},o.prototype.finishFilesLoading=function(){var e,t=this;return this.modelToRemove=this.iconsCollection.collection.length===1&&!this.isValidCollection()?this.iconsCollection.collection.at(0):null,this.iconsCollection.collection.mode="edit",this.iconsCollection.collection.add(this.iconsLoaded),(e=this.modelToRemove)!=null&&e.destroy(),this.iconsLoaded=[],this.makeSvgData(!1),this.checkIfValidCollection(),_.defer(function(){return App.$loadingLine.fadeOut(100,function(){return App.$loadingLine.width("0%"),App.$loadingLine.show()})})},o}(e),f})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/pages/submit",["views/pages/PageView","views/EditCollectionView","models/SectionModel"],function(e,n,r){var i,s;return i=function(e){function i(){return s=i.__super__.constructor.apply(this,arguments),s}return t(i,e),i.prototype.template="#submit-page-template",i.prototype.render=function(){return i.__super__.render.apply(this,arguments),this.renderEditCollectionView(),this},i.prototype.renderEditCollectionView=function(){return this.editCollectionView=new n({$el:this.$("#js-edit-collection-view-place"),isRender:!0,model:new r})},i}(e),i})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/SectionLineView",["views/ProtoView","models/SectionModel","collectionViews/IconsCollectionView","collections/IconsCollection","underscore","helpers"],function(e,n,r,i,s,o){var u,a;return u=function(e){function r(){return a=r.__super__.constructor.apply(this,arguments),a}return t(r,e),r.prototype.model=n,r.prototype.template="#section-line-view-template",r.prototype.className="icons-set-b",r.prototype.events={click:"selectMe"},r.prototype.initialize=function(){return this.makePreviewSvg(),this.model.on("change:isSelected",s.bind(this.render,this)),r.__super__.initialize.apply(this,arguments),this},r.prototype.selectMe=function(){var e;return typeof (e=this.model.collection).onSelect=="function"&&e.onSelect(this.model),this.model.set("isSelected",!0)},r.prototype.makePreviewSvg=function(){var e,t,n,r,i;t=0,n=this.model.get("icons"),e=$("<div>");while(t<6)o.upsetSvgShape({hash:(r=n[t])!=null?r.hash:void 0,shape:(i=n[t])!=null?i.shape:void 0,$shapes:e,isMulticolor:this.model.get("isMulticolor")}),t++;return o.addToSvg(e)},r.prototype.render=function(){return r.__super__.render.apply(this,arguments),this.$el.toggleClass("is-check",!!this.model.get("isSelected")),this.$el.toggleClass("is-not-moderated",!this.model.get("moderated")),this.checkIfSelected(),this},r.prototype.checkIfSelected=function(){var e;(e=this.model.collection.currentSelectedModel)!=null&&e.set("isSelected",!1);if(this.model.get("isSelected"))return this.model.collection.currentSelectedModel=this.model},r}(e),u})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("collectionViews/SectionsCollectionLineView",["collectionViews/ProtoCollectionView","views/SectionLineView"],function(e,n){var r,i;return r=function(e){function r(){return i=r.__super__.constructor.apply(this,arguments),i}return t(r,e),r.prototype.itemView=n,r.prototype.template="#sections-collection-line-view-template",r.prototype.appendHtml=function(e,t,n){return this.$("#js-icons-place").append(t.el)},r}(e),r})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/pages/editr",["views/pages/PageView","views/EditCollectionView","models/SectionModel","collections/SectionsCollection","collectionViews/SectionsCollectionLineView"],function(e,n,r,i,s){var o,u;return o=function(e){function o(){return u=o.__super__.constructor.apply(this,arguments),u}return t(o,e),o.prototype.template="#editr-page-template",o.prototype.render=function(){return o.__super__.render.apply(this,arguments),this.renderEditCollectionView(),this.renderCollectionsLine(),this},o.prototype.renderCollectionsLine=function(){var e=this;return this.collectionLine=new s({$el:this.$("#js-collection-line-place"),isRender:!0,collection:new i}),this.collectionLine.collection.url="sections-all",this.collectionLine.collection.fetch().then(function(){return e.showFirstModel()}).fail(function(e){return App.notifier.show({type:"error",text:"np, sorry"})}),this.collectionLine.collection.onSelect=function(t){return e.renderEditCollectionView(t)},this.collectionLine.collection.on("remove",_.bind(this.showFirstModel,this))},o.prototype.showFirstModel=function(){var e;return console.log(this.collectionLine.collection),this.renderEditCollectionView((e=this.collectionLine.collection.at(0))!=null?e.set("isSelected",!0):void 0)},o.prototype.renderEditCollectionView=function(e){var t;return(t=this.editCollectionView)!=null&&t.teardown(),this.editCollectionView=new n({$el:this.$("#js-edit-collection-view-place"),isRender:!0,model:e||new r,mode:"edit"})},o}(e),o})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/pages/support",["views/pages/PageView"],function(e){var n,r;return n=function(e){function n(){return r=n.__super__.constructor.apply(this,arguments),r}return t(n,e),n.prototype.template="#support-page-template",n.prototype.className="support-p",n.prototype.render=function(){var e=this;return n.__super__.render.apply(this,arguments),this.$monthly=this.$(".js-monthly"),this.$budget=this.$(".js-budget"),this.$timeLeft=this.$(".js-time-left"),this.setCounters(),_.defer(function(){return e.addShareWidget()}),this},n.prototype.setCounters=function(){var e=this;return $.ajax({type:"get",url:"/budget-counters",success:function(t){var n;return e.$budget.text(t.budget),e.$monthly.text(t.monthly),n=~~t.budget/~~t.monthly,e.$timeLeft.text(~~(n<0?0:n))},error:function(e){return console.error(e)}})},n.prototype.addShareWidget=function(){return $(document.head).append('<script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher: "183e364f-5cd1-4e73-bfd9-939e94de67a5", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>')},n}(e),n})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/pages/how",["views/pages/PageView"],function(e){var n,r;return n=function(e){function n(){return r=n.__super__.constructor.apply(this,arguments),r}return t(n,e),n.prototype.template="#how-page-template",n.prototype.className="how-p",n}(e),n})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("views/pages/hire",["views/pages/PageView"],function(e){var n,r;return n=function(e){function n(){return r=n.__super__.constructor.apply(this,arguments),r}return t(n,e),n.prototype.template="#hire-page-template",n.prototype.className="hire-p",n.prototype.render=function(){return n.__super__.render.apply(this,arguments),this.loadImage(),this},n.prototype.loadImage=function(){var e,t=this;return e=new Image,e.onload=function(){return t.$("#js-lego-img").addClass("animate fadeInUp").removeClass("op-0-gm")},e.src=window.devicePixelRatio>1?"css/i/legomushroom-@2x.png":"css/i/legomushroom.png"},n}(e),n})}.call(this),function(){define("controllers/PagesController",["views/pages/main","views/pages/submit","views/pages/editr","views/pages/support","views/pages/how","views/pages/hire"],function(e,t,n,r,i,s,o){var u;return u=function(){function o(){this.main=e,this.submit=t,this.editr=n,this.support=r,this.how=i,this.hire=s}return o}(),new u})}.call(this),function(){var e={}.hasOwnProperty,t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t};define("router",["backbone","controllers/PagesController"],function(e,n){var r,i;return r=function(e){function r(){return i=r.__super__.constructor.apply(this,arguments),i}return t(r,e),r.prototype.routes={"":"main","/:pageNum":"main",submit:"submit",editr:"editr","support-us":"support","how-to-use":"how","hire-me":"hire","*path":"main"},r.prototype.main=function(e){var t;return e==null&&(e="1"),e=((t=e.match(/\d/gi))!=null?t[0]:void 0)||1,this.startPage(n.main,{pageNum:~~e}),this.checkMainMenuItem(),this.animateHeader()},r.prototype.submit=function(){return this.startPage(n.submit),this.checkMainMenuItem("#js-submit"),this.showHeader()},r.prototype.editr=function(){return this.startPage(n.editr),this.checkMainMenuItem("#js-editr"),this.showHeader()},r.prototype.support=function(){return this.startPage(n.support),this.checkMainMenuItem("#js-support-us"),this.showHeader()},r.prototype.how=function(){return this.startPage(n.how),this.checkMainMenuItem("#js-how"),this.showHeader()},r.prototype.hire=function(){return this.startPage(n.hire),this.checkMainMenuItem("#js-hire"),this.showHeader()},r.prototype.startPage=function(e,t){var n;t==null&&(t={});if(this.currentPageView===e)return;return this.currentPageView=e,(n=this.currentPage)!=null&&n.teardown(),this.currentPage=new e(t),App.main.show(this.currentPage),App.$bodyHtml.animate({scrollTop:0})},r.prototype.animateHeader=function(){var e=this;return setTimeout(function(){return App.$mainHeader.addClass("animated fadeInDown")},1e3)},r.prototype.showHeader=function(){return App.$mainHeader.css({opacity:1}).addClass("no-animation")},r.prototype.checkMainMenuItem=function(e){return App.$mainHeader.find("a").removeClass("is-check").filter(e).addClass("is-check")},r}(e.Router),r})}.call(this);var io="undefined"==typeof module?{}:module.exports;(function(){(function(e,t){var n=e;n.version="0.9.16",n.protocol=1,n.transports=[],n.j=[],n.sockets={},n.connect=function(e,r){var i=n.util.parseUri(e),s,o;t&&t.location&&(i.protocol=i.protocol||t.location.protocol.slice(0,-1),i.host=i.host||(t.document?t.document.domain:t.location.hostname),i.port=i.port||t.location.port),s=n.util.uniqueUri(i);var u={host:i.host,secure:"https"==i.protocol,port:i.port||("https"==i.protocol?443:80),query:i.query||""};n.util.merge(u,r);if(u["force new connection"]||!n.sockets[s])o=new n.Socket(u);return!u["force new connection"]&&o&&(n.sockets[s]=o),o=o||n.sockets[s],o.of(i.path.length>1?i.path:"")}})("object"==typeof module?module.exports:this.io={},this),function(e,t){var n=e.util={},r=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,i=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];n.parseUri=function(e){var t=r.exec(e||""),n={},s=14;while(s--)n[i[s]]=t[s]||"";return n},n.uniqueUri=function(e){var n=e.protocol,r=e.host,i=e.port;return"document"in t?(r=r||document.domain,i=i||(n=="https"&&document.location.protocol!=="https:"?443:document.location.port)):(r=r||"localhost",!i&&n=="https"&&(i=443)),(n||"http")+"://"+r+":"+(i||80)},n.query=function(e,t){var r=n.chunkQuery(e||""),i=[];n.merge(r,n.chunkQuery(t||""));for(var s in r)r.hasOwnProperty(s)&&i.push(s+"="+r[s]);return i.length?"?"+i.join("&"):""},n.chunkQuery=function(e){var t={},n=e.split("&"),r=0,i=n.length,s;for(;r<i;++r)s=n[r].split("="),s[0]&&(t[s[0]]=s[1]);return t};var s=!1;n.load=function(e){if("document"in t&&document.readyState==="complete"||s)return e();n.on(t,"load",e,!1)},n.on=function(e,t,n,r){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener&&e.addEventListener(t,n,r)},n.request=function(e){if(e&&"undefined"!=typeof XDomainRequest&&!n.ua.hasCORS)return new XDomainRequest;if("undefined"!=typeof XMLHttpRequest&&(!e||n.ua.hasCORS))return new XMLHttpRequest;if(!e)try{return new(window[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}return null},"undefined"!=typeof window&&n.load(function(){s=!0}),n.defer=function(e){if(!n.ua.webkit||"undefined"!=typeof importScripts)return e();n.load(function(){setTimeout(e,100)})},n.merge=function(t,r,i,s){var o=s||[],u=typeof i=="undefined"?2:i,a;for(a in r)r.hasOwnProperty(a)&&n.indexOf(o,a)<0&&(typeof t[a]!="object"||!u?(t[a]=r[a],o.push(r[a])):n.merge(t[a],r[a],u-1,o));return t},n.mixin=function(e,t){n.merge(e.prototype,t.prototype)},n.inherit=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},n.intersect=function(e,t){var r=[],i=e.length>t.length?e:t,s=e.length>t.length?t:e;for(var o=0,u=s.length;o<u;o++)~n.indexOf(i,s[o])&&r.push(s[o]);return r},n.indexOf=function(e,t,n){for(var r=e.length,n=n<0?n+r<0?0:n+r:n||0;n<r&&e[n]!==t;n++);return r<=n?-1:n},n.toArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)t.push(e[n]);return t},n.ua={},n.ua.hasCORS="undefined"!=typeof XMLHttpRequest&&function(){try{var e=new XMLHttpRequest}catch(t){return!1}return e.withCredentials!=undefined}(),n.ua.webkit="undefined"!=typeof navigator&&/webkit/i.test(navigator.userAgent),n.ua.iDevice="undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)}("undefined"!=typeof io?io:module.exports,this),function(e,t){function n(){}e.EventEmitter=n,n.prototype.on=function(e,n){return this.$events||(this.$events={}),this.$events[e]?t.util.isArray(this.$events[e])?this.$events[e].push(n):this.$events[e]=[this.$events[e],n]:this.$events[e]=n,this},n.prototype.addListener=n.prototype.on,n.prototype.once=function(e,t){function r(){n.removeListener(e,r),t.apply(this,arguments)}var n=this;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,n){if(this.$events&&this.$events[e]){var r=this.$events[e];if(t.util.isArray(r)){var i=-1;for(var s=0,o=r.length;s<o;s++)if(r[s]===n||r[s].listener&&r[s].listener===n){i=s;break}if(i<0)return this;r.splice(i,1),r.length||delete this.$events[e]}else(r===n||r.listener&&r.listener===n)&&delete this.$events[e]}return this},n.prototype.removeAllListeners=function(e){return e===undefined?(this.$events={},this):(this.$events&&this.$events[e]&&(this.$events[e]=null),this)},n.prototype.listeners=function(e){return this.$events||(this.$events={}),this.$events[e]||(this.$events[e]=[]),t.util.isArray(this.$events[e])||(this.$events[e]=[this.$events[e]]),this.$events[e]},n.prototype.emit=function(e){if(!this.$events)return!1;var n=this.$events[e];if(!n)return!1;var r=Array.prototype.slice.call(arguments,1);if("function"==typeof n)n.apply(this,r);else{if(!t.util.isArray(n))return!1;var i=n.slice();for(var s=0,o=i.length;s<o;s++)i[s].apply(this,r)}return!0}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(exports,nativeJSON){function f(e){return e<10?"0"+e:e}function date(e,t){return isFinite(e.valueOf())?e.getUTCFullYear()+"-"+f(e.getUTCMonth()+1)+"-"+f(e.getUTCDate())+"T"+f(e.getUTCHours())+":"+f(e.getUTCMinutes())+":"+f(e.getUTCSeconds())+"Z":null}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a instanceof Date&&(a=date(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)typeof rep[n]=="string"&&(r=rep[n],i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}if(nativeJSON&&nativeJSON.parse)return exports.JSON={parse:nativeJSON.parse,stringify:nativeJSON.stringify};var JSON=exports.JSON={},cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")},JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")}}("undefined"!=typeof io?io:module.exports,typeof JSON!="undefined"?JSON:undefined),function(e,t){var n=e.parser={},r=n.packets=["disconnect","connect","heartbeat","message","json","event","ack","error","noop"],i=n.reasons=["transport not supported","client not handshaken","unauthorized"],s=n.advice=["reconnect"],o=t.JSON,u=t.util.indexOf;n.encodePacket=function(e){var t=u(r,e.type),n=e.id||"",a=e.endpoint||"",f=e.ack,l=null;switch(e.type){case"error":var c=e.reason?u(i,e.reason):"",h=e.advice?u(s,e.advice):"";if(c!==""||h!=="")l=c+(h!==""?"+"+h:"");break;case"message":e.data!==""&&(l=e.data);break;case"event":var p={name:e.name};e.args&&e.args.length&&(p.args=e.args),l=o.stringify(p);break;case"json":l=o.stringify(e.data);break;case"connect":e.qs&&(l=e.qs);break;case"ack":l=e.ackId+(e.args&&e.args.length?"+"+o.stringify(e.args):"")}var d=[t,n+(f=="data"?"+":""),a];return l!==null&&l!==undefined&&d.push(l),d.join(":")},n.encodePayload=function(e){var t="";if(e.length==1)return e[0];for(var n=0,r=e.length;n<r;n++){var i=e[n];t+="�"+i.length+"�"+e[n]}return t};var a=/([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/;n.decodePacket=function(e){var t=e.match(a);if(!t)return{};var n=t[2]||"",e=t[5]||"",u={type:r[t[1]],endpoint:t[4]||""};n&&(u.id=n,t[3]?u.ack="data":u.ack=!0);switch(u.type){case"error":var t=e.split("+");u.reason=i[t[0]]||"",u.advice=s[t[1]]||"";break;case"message":u.data=e||"";break;case"event":try{var f=o.parse(e);u.name=f.name,u.args=f.args}catch(l){}u.args=u.args||[];break;case"json":try{u.data=o.parse(e)}catch(l){}break;case"connect":u.qs=e||"";break;case"ack":var t=e.match(/^([0-9]+)(\+)?(.*)/);if(t){u.ackId=t[1],u.args=[];if(t[3])try{u.args=t[3]?o.parse(t[3]):[]}catch(l){}}break;case"disconnect":case"heartbeat":}return u},n.decodePayload=function(e){if(e.charAt(0)=="�"){var t=[];for(var r=1,i="";r<e.length;r++)e.charAt(r)=="�"?(t.push(n.decodePacket(e.substr(r+1).substr(0,i))),r+=Number(i)+1,i=""):i+=e.charAt(r);return t}return[n.decodePacket(e)]}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(e,t){function n(e,t){this.socket=e,this.sessid=t}e.Transport=n,t.util.mixin(n,t.EventEmitter),n.prototype.heartbeats=function(){return!0},n.prototype.onData=function(e){this.clearCloseTimeout(),(this.socket.connected||this.socket.connecting||this.socket.reconnecting)&&this.setCloseTimeout();if(e!==""){var n=t.parser.decodePayload(e);if(n&&n.length)for(var r=0,i=n.length;r<i;r++)this.onPacket(n[r])}return this},n.prototype.onPacket=function(e){return this.socket.setHeartbeatTimeout(),e.type=="heartbeat"?this.onHeartbeat():(e.type=="connect"&&e.endpoint==""&&this.onConnect(),e.type=="error"&&e.advice=="reconnect"&&(this.isOpen=!1),this.socket.onPacket(e),this)},n.prototype.setCloseTimeout=function(){if(!this.closeTimeout){var e=this;this.closeTimeout=setTimeout(function(){e.onDisconnect()},this.socket.closeTimeout)}},n.prototype.onDisconnect=function(){return this.isOpen&&this.close(),this.clearTimeouts(),this.socket.onDisconnect(),this},n.prototype.onConnect=function(){return this.socket.onConnect(),this},n.prototype.clearCloseTimeout=function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)},n.prototype.clearTimeouts=function(){this.clearCloseTimeout(),this.reopenTimeout&&clearTimeout(this.reopenTimeout)},n.prototype.packet=function(e){this.send(t.parser.encodePacket(e))},n.prototype.onHeartbeat=function(e){this.packet({type:"heartbeat"})},n.prototype.onOpen=function(){this.isOpen=!0,this.clearCloseTimeout(),this.socket.onOpen()},n.prototype.onClose=function(){var e=this;this.isOpen=!1,this.socket.onClose(),this.onDisconnect()},n.prototype.prepareUrl=function(){var e=this.socket.options;return this.scheme()+"://"+e.host+":"+e.port+"/"+e.resource+"/"+t.protocol+"/"+this.name+"/"+this.sessid},n.prototype.ready=function(e,t){t.call(this)}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(e,t,n){function r(e){this.options={port:80,secure:!1,document:"document"in n?document:!1,resource:"socket.io",transports:t.transports,"connect timeout":1e4,"try multiple transports":!0,reconnect:!0,"reconnection delay":500,"reconnection limit":Infinity,"reopen delay":3e3,"max reconnection attempts":10,"sync disconnect on unload":!1,"auto connect":!0,"flash policy port":10843,manualFlush:!1},t.util.merge(this.options,e),this.connected=!1,this.open=!1,this.connecting=!1,this.reconnecting=!1,this.namespaces={},this.buffer=[],this.doBuffer=!1;if(this.options["sync disconnect on unload"]&&(!this.isXDomain()||t.util.ua.hasCORS)){var r=this;t.util.on(n,"beforeunload",function(){r.disconnectSync()},!1)}this.options["auto connect"]&&this.connect()}function i(){}e.Socket=r,t.util.mixin(r,t.EventEmitter),r.prototype.of=function(e){return this.namespaces[e]||(this.namespaces[e]=new t.SocketNamespace(this,e),e!==""&&this.namespaces[e].packet({type:"connect"})),this.namespaces[e]},r.prototype.publish=function(){this.emit.apply(this,arguments);var e;for(var t in this.namespaces)this.namespaces.hasOwnProperty(t)&&(e=this.of(t),e.$emit.apply(e,arguments))},r.prototype.handshake=function(e){function s(t){t instanceof Error?(n.connecting=!1,n.onError(t.message)):e.apply(null,t.split(":"))}var n=this,r=this.options,o=["http"+(r.secure?"s":"")+":/",r.host+":"+r.port,r.resource,t.protocol,t.util.query(this.options.query,"t="+ +(new Date))].join("/");if(this.isXDomain()&&!t.util.ua.hasCORS){var u=document.getElementsByTagName("script")[0],a=document.createElement("script");a.src=o+"&jsonp="+t.j.length,u.parentNode.insertBefore(a,u),t.j.push(function(e){s(e),a.parentNode.removeChild(a)})}else{var f=t.util.request();f.open("GET",o,!0),this.isXDomain()&&(f.withCredentials=!0),f.onreadystatechange=function(){f.readyState==4&&(f.onreadystatechange=i,f.status==200?s(f.responseText):f.status==403?n.onError(f.responseText):(n.connecting=!1,!n.reconnecting&&n.onError(f.responseText)))},f.send(null)}},r.prototype.getTransport=function(e){var n=e||this.transports,r;for(var i=0,s;s=n[i];i++)if(t.Transport[s]&&t.Transport[s].check(this)&&(!this.isXDomain()||t.Transport[s].xdomainCheck(this)))return new t.Transport[s](this,this.sessionid);return null},r.prototype.connect=function(e){if(this.connecting)return this;var n=this;return n.connecting=!0,this.handshake(function(r,i,s,o){function u(e){n.transport&&n.transport.clearTimeouts(),n.transport=n.getTransport(e);if(!n.transport)return n.publish("connect_failed");n.transport.ready(n,function(){n.connecting=!0,n.publish("connecting",n.transport.name),n.transport.open(),n.options["connect timeout"]&&(n.connectTimeoutTimer=setTimeout(function(){if(!n.connected){n.connecting=!1;if(n.options["try multiple transports"]){var e=n.transports;while(e.length>0&&e.splice(0,1)[0]!=n.transport.name);e.length?u(e):n.publish("connect_failed")}}},n.options["connect timeout"]))})}n.sessionid=r,n.closeTimeout=s*1e3,n.heartbeatTimeout=i*1e3,n.transports||(n.transports=n.origTransports=o?t.util.intersect(o.split(","),n.options.transports):n.options.transports),n.setHeartbeatTimeout(),u(n.transports),n.once("connect",function(){clearTimeout(n.connectTimeoutTimer),e&&typeof e=="function"&&e()})}),this},r.prototype.setHeartbeatTimeout=function(){clearTimeout(this.heartbeatTimeoutTimer);if(this.transport&&!this.transport.heartbeats())return;var e=this;this.heartbeatTimeoutTimer=setTimeout(function(){e.transport.onClose()},this.heartbeatTimeout)},r.prototype.packet=function(e){return this.connected&&!this.doBuffer?this.transport.packet(e):this.buffer.push(e),this},r.prototype.setBuffer=function(e){this.doBuffer=e,!e&&this.connected&&this.buffer.length&&(this.options.manualFlush||this.flushBuffer())},r.prototype.flushBuffer=function(){this.transport.payload(this.buffer),this.buffer=[]},r.prototype.disconnect=function(){if(this.connected||this.connecting)this.open&&this.of("").packet({type:"disconnect"}),this.onDisconnect("booted");return this},r.prototype.disconnectSync=function(){var e=t.util.request(),n=["http"+(this.options.secure?"s":"")+":/",this.options.host+":"+this.options.port,this.options.resource,t.protocol,"",this.sessionid].join("/")+"/?disconnect=1";e.open("GET",n,!1),e.send(null),this.onDisconnect("booted")},r.prototype.isXDomain=function(){var e=n.location.port||("https:"==n.location.protocol?443:80);return this.options.host!==n.location.hostname||this.options.port!=e},r.prototype.onConnect=function(){this.connected||(this.connected=!0,this.connecting=!1,this.doBuffer||this.setBuffer(!1),this.emit("connect"))},r.prototype.onOpen=function(){this.open=!0},r.prototype.onClose=function(){this.open=!1,clearTimeout(this.heartbeatTimeoutTimer)},r.prototype.onPacket=function(e){this.of(e.endpoint).onPacket(e)},r.prototype.onError=function(e){e&&e.advice&&e.advice==="reconnect"&&(this.connected||this.connecting)&&(this.disconnect(),this.options.reconnect&&this.reconnect()),this.publish("error",e&&e.reason?e.reason:e)},r.prototype.onDisconnect=function(e){var t=this.connected,n=this.connecting;this.connected=!1,this.connecting=!1,this.open=!1;if(t||n)this.transport.close(),this.transport.clearTimeouts(),t&&(this.publish("disconnect",e),"booted"!=e&&this.options.reconnect&&!this.reconnecting&&this.reconnect())},r.prototype.reconnect=function(){function i(){if(e.connected){for(var t in e.namespaces)e.namespaces.hasOwnProperty(t)&&""!==t&&e.namespaces[t].packet({type:"connect"});e.publish("reconnect",e.transport.name,e.reconnectionAttempts)}clearTimeout(e.reconnectionTimer),e.removeListener("connect_failed",s),e.removeListener("connect",s),e.reconnecting=!1,delete e.reconnectionAttempts,delete e.reconnectionDelay,delete e.reconnectionTimer,delete e.redoTransports,e.options["try multiple transports"]=n}function s(){if(!e.reconnecting)return;if(e.connected)return i();if(e.connecting&&e.reconnecting)return e.reconnectionTimer=setTimeout(s,1e3);e.reconnectionAttempts++>=t?e.redoTransports?(e.publish("reconnect_failed"),i()):(e.on("connect_failed",s),e.options["try multiple transports"]=!0,e.transports=e.origTransports,e.transport=e.getTransport(),e.redoTransports=!0,e.connect()):(e.reconnectionDelay<r&&(e.reconnectionDelay*=2),e.connect(),e.publish("reconnecting",e.reconnectionDelay,e.reconnectionAttempts),e.reconnectionTimer=setTimeout(s,e.reconnectionDelay))}this.reconnecting=!0,this.reconnectionAttempts=0,this.reconnectionDelay=this.options["reconnection delay"];var e=this,t=this.options["max reconnection attempts"],n=this.options["try multiple transports"],r=this.options["reconnection limit"];this.options["try multiple transports"]=!1,this.reconnectionTimer=setTimeout(s,this.reconnectionDelay),this.on("connect",s)}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(e,t){function n(e,t){this.socket=e,this.name=t||"",this.flags={},this.json=new r(this,"json"),this.ackPackets=0,this.acks={}}function r(e,t){this.namespace=e,this.name=t}e.SocketNamespace=n,t.util.mixin(n,t.EventEmitter),n.prototype.$emit=t.EventEmitter.prototype.emit,n.prototype.of=function(){return this.socket.of.apply(this.socket,arguments)},n.prototype.packet=function(e){return e.endpoint=this.name,this.socket.packet(e),this.flags={},this},n.prototype.send=function(e,t){var n={type:this.flags.json?"json":"message",data:e};return"function"==typeof t&&(n.id=++this.ackPackets,n.ack=!0,this.acks[n.id]=t),this.packet(n)},n.prototype.emit=function(e){var t=Array.prototype.slice.call(arguments,1),n=t[t.length-1],r={type:"event",name:e};return"function"==typeof n&&(r.id=++this.ackPackets,r.ack="data",this.acks[r.id]=n,t=t.slice(0,t.length-1)),r.args=t,this.packet(r)},n.prototype.disconnect=function(){return this.name===""?this.socket.disconnect():(this.packet({type:"disconnect"}),this.$emit("disconnect")),this},n.prototype.onPacket=function(e){function r(){n.packet({type:"ack",args:t.util.toArray(arguments),ackId:e.id})}var n=this;switch(e.type){case"connect":this.$emit("connect");break;case"disconnect":this.name===""?this.socket.onDisconnect(e.reason||"booted"):this.$emit("disconnect",e.reason);break;case"message":case"json":var i=["message",e.data];e.ack=="data"?i.push(r):e.ack&&this.packet({type:"ack",ackId:e.id}),this.$emit.apply(this,i);break;case"event":var i=[e.name].concat(e.args);e.ack=="data"&&i.push(r),this.$emit.apply(this,i);break;case"ack":this.acks[e.ackId]&&(this.acks[e.ackId].apply(this,e.args),delete this.acks[e.ackId]);break;case"error":e.advice?this.socket.onError(e):e.reason=="unauthorized"?this.$emit("connect_failed",e.reason):this.$emit("error",e.reason)}},r.prototype.send=function(){this.namespace.flags[this.name]=!0,this.namespace.send.apply(this.namespace,arguments)},r.prototype.emit=function(){this.namespace.flags[this.name]=!0,this.namespace.emit.apply(this.namespace,arguments)}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(e,t,n){function r(e){t.Transport.apply(this,arguments)}e.websocket=r,t.util.inherit(r,t.Transport),r.prototype.name="websocket",r.prototype.open=function(){var e=t.util.query(this.socket.options.query),r=this,i;return i||(i=n.MozWebSocket||n.WebSocket),this.websocket=new i(this.prepareUrl()+e),this.websocket.onopen=function(){r.onOpen(),r.socket.setBuffer(!1)},this.websocket.onmessage=function(e){r.onData(e.data)},this.websocket.onclose=function(){r.onClose(),r.socket.setBuffer(!0)},this.websocket.onerror=function(e){r.onError(e)},this},t.util.ua.iDevice?r.prototype.send=function(e){var t=this;return setTimeout(function(){t.websocket.send(e)},0),this}:r.prototype.send=function(e){return this.websocket.send(e),this},r.prototype.payload=function(e){for(var t=0,n=e.length;t<n;t++)this.packet(e[t]);return this},r.prototype.close=function(){return this.websocket.close(),this},r.prototype.onError=function(e){this.socket.onError(e)},r.prototype.scheme=function(){return this.socket.options.secure?"wss":"ws"},r.check=function(){return"WebSocket"in n&&!("__addTask"in WebSocket)||"MozWebSocket"in n},r.xdomainCheck=function(){return!0},t.transports.push("websocket")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(e,t){function n(){t.Transport.websocket.apply(this,arguments)}e.flashsocket=n,t.util.inherit(n,t.Transport.websocket),n.prototype.name="flashsocket",n.prototype.open=function(){var e=this,n=arguments;return WebSocket.__addTask(function(){t.Transport.websocket.prototype.open.apply(e,n)}),this},n.prototype.send=function(){var e=this,n=arguments;return WebSocket.__addTask(function(){t.Transport.websocket.prototype.send.apply(e,n)}),this},n.prototype.close=function(){return WebSocket.__tasks.length=0,t.Transport.websocket.prototype.close.call(this),this},n.prototype.ready=function(e,r){function i(){var t=e.options,i=t["flash policy port"],o=["http"+(t.secure?"s":"")+":/",t.host+":"+t.port,t.resource,"static/flashsocket","WebSocketMain"+(e.isXDomain()?"Insecure":"")+".swf"];n.loaded||(typeof WEB_SOCKET_SWF_LOCATION=="undefined"&&(WEB_SOCKET_SWF_LOCATION=o.join("/")),i!==843&&WebSocket.loadFlashPolicyFile("xmlsocket://"+t.host+":"+i),WebSocket.__initialize(),n.loaded=!0),r.call(s)}var s=this;if(document.body)return i();t.util.load(i)},n.check=function(){return typeof WebSocket!="undefined"&&"__initialize"in WebSocket&&!!swfobject?swfobject.getFlashPlayerVersion().major>=10:!1},n.xdomainCheck=function(){return!0},typeof window!="undefined"&&(WEB_SOCKET_DISABLE_AUTO_INITIALIZATION=!0),t.transports.push("flashsocket")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports);if("undefined"!=typeof window)var swfobject=function(){function C(){if(b)return;try{var e=a.getElementsByTagName("body")[0].appendChild(U("span"));e.parentNode.removeChild(e)}catch(t){return}b=!0;var n=c.length;for(var r=0;r<n;r++)c[r]()}function k(e){b?e():c[c.length]=e}function L(t){if(typeof u.addEventListener!=e)u.addEventListener("load",t,!1);else if(typeof a.addEventListener!=e)a.addEventListener("load",t,!1);else if(typeof u.attachEvent!=e)z(u,"onload",t);else if(typeof u.onload=="function"){var n=u.onload;u.onload=function(){n(),t()}}else u.onload=t}function A(){l?O():M()}function O(){var n=a.getElementsByTagName("body")[0],r=U(t);r.setAttribute("type",i);var s=n.appendChild(r);if(s){var o=0;(function(){if(typeof s.GetVariable!=e){var t=s.GetVariable("$version");t&&(t=t.split(" ")[1].split(","),T.pv=[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)])}else if(o<10){o++,setTimeout(arguments.callee,10);return}n.removeChild(r),s=null,M()})()}else M()}function M(){var t=h.length;if(t>0)for(var n=0;n<t;n++){var r=h[n].id,i=h[n].callbackFn,s={success:!1,id:r};if(T.pv[0]>0){var o=R(r);if(o)if(W(h[n].swfVersion)&&!(T.wk&&T.wk<312))V(r,!0),i&&(s.success=!0,s.ref=_(r),i(s));else if(h[n].expressInstall&&D()){var u={};u.data=h[n].expressInstall,u.width=o.getAttribute("width")||"0",u.height=o.getAttribute("height")||"0",o.getAttribute("class")&&(u.styleclass=o.getAttribute("class")),o.getAttribute("align")&&(u.align=o.getAttribute("align"));var a={},f=o.getElementsByTagName("param"),l=f.length;for(var c=0;c<l;c++)f[c].getAttribute("name").toLowerCase()!="movie"&&(a[f[c].getAttribute("name")]=f[c].getAttribute("value"));P(u,a,r,i)}else H(o),i&&i(s)}else{V(r,!0);if(i){var p=_(r);p&&typeof p.SetVariable!=e&&(s.success=!0,s.ref=p),i(s)}}}}function _(n){var r=null,i=R(n);if(i&&i.nodeName=="OBJECT")if(typeof i.SetVariable!=e)r=i;else{var s=i.getElementsByTagName(t)[0];s&&(r=s)}return r}function D(){return!w&&W("6.0.65")&&(T.win||T.mac)&&!(T.wk&&T.wk<312)}function P(t,n,r,i){w=!0,g=i||null,y={success:!1,id:r};var o=R(r);if(o){o.nodeName=="OBJECT"?(v=B(o),m=null):(v=o,m=r),t.id=s;if(typeof t.width==e||!/%$/.test(t.width)&&parseInt(t.width,10)<310)t.width="310";if(typeof t.height==e||!/%$/.test(t.height)&&parseInt(t.height,10)<137)t.height="137";a.title=a.title.slice(0,47)+" - Flash Player Installation";var f=T.ie&&T.win?["Active"].concat("").join("X"):"PlugIn",l="MMredirectURL="+u.location.toString().replace(/&/g,"%26")+"&MMplayerType="+f+"&MMdoctitle="+a.title;typeof n.flashvars!=e?n.flashvars+="&"+l:n.flashvars=l;if(T.ie&&T.win&&o.readyState!=4){var c=U("div");r+="SWFObjectNew",c.setAttribute("id",r),o.parentNode.insertBefore(c,o),o.style.display="none",function(){o.readyState==4?o.parentNode.removeChild(o):setTimeout(arguments.callee,10)}()}j(t,n,r)}}function H(e){if(T.ie&&T.win&&e.readyState!=4){var t=U("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(B(e),t),e.style.display="none",function(){e.readyState==4?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)}()}else e.parentNode.replaceChild(B(e),e)}function B(e){var n=U("div");if(T.win&&T.ie)n.innerHTML=e.innerHTML;else{var r=e.getElementsByTagName(t)[0];if(r){var i=r.childNodes;if(i){var s=i.length;for(var o=0;o<s;o++)(i[o].nodeType!=1||i[o].nodeName!="PARAM")&&i[o].nodeType!=8&&n.appendChild(i[o].cloneNode(!0))}}}return n}function j(n,r,s){var o,u=R(s);if(T.wk&&T.wk<312)return o;if(u){typeof n.id==e&&(n.id=s);if(T.ie&&T.win){var a="";for(var f in n)n[f]!=Object.prototype[f]&&(f.toLowerCase()=="data"?r.movie=n[f]:f.toLowerCase()=="styleclass"?a+=' class="'+n[f]+'"':f.toLowerCase()!="classid"&&(a+=" "+f+'="'+n[f]+'"'));var l="";for(var c in r)r[c]!=Object.prototype[c]&&(l+='<param name="'+c+'" value="'+r[c]+'" />');u.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+a+">"+l+"</object>",p[p.length]=n.id,o=R(n.id)}else{var h=U(t);h.setAttribute("type",i);for(var d in n)n[d]!=Object.prototype[d]&&(d.toLowerCase()=="styleclass"?h.setAttribute("class",n[d]):d.toLowerCase()!="classid"&&h.setAttribute(d,n[d]));for(var v in r)r[v]!=Object.prototype[v]&&v.toLowerCase()!="movie"&&F(h,v,r[v]);u.parentNode.replaceChild(h,u),o=h}}return o}function F(e,t,n){var r=U("param");r.setAttribute("name",t),r.setAttribute("value",n),e.appendChild(r)}function I(e){var t=R(e);t&&t.nodeName=="OBJECT"&&(T.ie&&T.win?(t.style.display="none",function(){t.readyState==4?q(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))}function q(e){var t=R(e);if(t){for(var n in t)typeof t[n]=="function"&&(t[n]=null);t.parentNode.removeChild(t)}}function R(e){var t=null;try{t=a.getElementById(e)}catch(n){}return t}function U(e){return a.createElement(e)}function z(e,t,n){e.attachEvent(t,n),d[d.length]=[e,t,n]}function W(e){var t=T.pv,n=e.split(".");return n[0]=parseInt(n[0],10),n[1]=parseInt(n[1],10)||0,n[2]=parseInt(n[2],10)||0,t[0]>n[0]||t[0]==n[0]&&t[1]>n[1]||t[0]==n[0]&&t[1]==n[1]&&t[2]>=n[2]?!0:!1}function X(n,r,i,s){if(T.ie&&T.mac)return;var o=a.getElementsByTagName("head")[0];if(!o)return;var u=i&&typeof i=="string"?i:"screen";s&&(E=null,S=null);if(!E||S!=u){var f=U("style");f.setAttribute("type","text/css"),f.setAttribute("media",u),E=o.appendChild(f),T.ie&&T.win&&typeof a.styleSheets!=e&&a.styleSheets.length>0&&(E=a.styleSheets[a.styleSheets.length-1]),S=u}T.ie&&T.win?E&&typeof E.addRule==t&&E.addRule(n,r):E&&typeof a.createTextNode!=e&&E.appendChild(a.createTextNode(n+" {"+r+"}"))}function V(e,t){if(!x)return;var n=t?"visible":"hidden";b&&R(e)?R(e).style.visibility=n:X("#"+e,"visibility:"+n)}function $(t){var n=/[\\\"<>\.;]/,r=n.exec(t)!=null;return r&&typeof encodeURIComponent!=e?encodeURIComponent(t):t}var e="undefined",t="object",n="Shockwave Flash",r="ShockwaveFlash.ShockwaveFlash",i="application/x-shockwave-flash",s="SWFObjectExprInst",o="onreadystatechange",u=window,a=document,f=navigator,l=!1,c=[A],h=[],p=[],d=[],v,m,g,y,b=!1,w=!1,E,S,x=!0,T=function(){var s=typeof a.getElementById!=e&&typeof a.getElementsByTagName!=e&&typeof a.createElement!=e,o=f.userAgent.toLowerCase(),c=f.platform.toLowerCase(),h=c?/win/.test(c):/win/.test(o),p=c?/mac/.test(c):/mac/.test(o),d=/webkit/.test(o)?parseFloat(o.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,v=!1,m=[0,0,0],g=null;if(typeof f.plugins!=e&&typeof f.plugins[n]==t)g=f.plugins[n].description,g&&(typeof f.mimeTypes==e||!f.mimeTypes[i]||!!f.mimeTypes[i].enabledPlugin)&&(l=!0,v=!1,g=g.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),m[0]=parseInt(g.replace(/^(.*)\..*$/,"$1"),10),m[1]=parseInt(g.replace(/^.*\.(.*)\s.*$/,"$1"),10),m[2]=/[a-zA-Z]/.test(g)?parseInt(g.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof u[["Active"].concat("Object").join("X")]!=e)try{var y=new(window[["Active"].concat("Object").join("X")])(r);y&&(g=y.GetVariable("$version"),g&&(v=!0,g=g.split(" ")[1].split(","),m=[parseInt(g[0],10),parseInt(g[1],10),parseInt(g[2],10)]))}catch(b){}return{w3:s,pv:m,wk:d,ie:v,win:h,mac:p}}(),N=function(){if(!T.w3)return;(typeof a.readyState!=e&&a.readyState=="complete"||typeof a.readyState==e&&(a.getElementsByTagName("body")[0]||a.body))&&C(),b||(typeof a.addEventListener!=e&&a.addEventListener("DOMContentLoaded",C,!1),T.ie&&T.win&&(a.attachEvent(o,function(){a.readyState=="complete"&&(a.detachEvent(o,arguments.callee),C())}),u==top&&function(){if(b)return;try{a.documentElement.doScroll("left")}catch(e){setTimeout(arguments.callee,0);return}C()}()),T.wk&&function(){if(b)return;if(!/loaded|complete/.test(a.readyState)){setTimeout(arguments.callee,0);return}C()}(),L(C))}(),J=function(){T.ie&&T.win&&window.attachEvent("onunload",function(){var e=d.length;for(var t=0;t<e;t++)d[t][0].detachEvent(d[t][1],d[t][2]);var n=p.length;for(var r=0;r<n;r++)I(p[r]);for(var i in T)T[i]=null;T=null;for(var s in swfobject)swfobject[s]=null;swfobject=null})}();return{registerObject:function(e,t,n,r){if(T.w3&&e&&t){var i={};i.id=e,i.swfVersion=t,i.expressInstall=n,i.callbackFn=r,h[h.length]=i,V(e,!1)}else r&&r({success:!1,id:e})},getObjectById:function(e){if(T.w3)return _(e)},embedSWF:function(n,r,i,s,o,u,a,f,l,c){var h={success:!1,id:r};T.w3&&!(T.wk&&T.wk<312)&&n&&r&&i&&s&&o?(V(r,!1),k(function(){i+="",s+="";var p={};if(l&&typeof l===t)for(var d in l)p[d]=l[d];p.data=n,p.width=i,p.height=s;var v={};if(f&&typeof f===t)for(var m in f)v[m]=f[m];if(a&&typeof a===t)for(var g in a)typeof v.flashvars!=e?v.flashvars+="&"+g+"="+a[g]:v.flashvars=g+"="+a[g];if(W(o)){var y=j(p,v,r);p.id==r&&V(r,!0),h.success=!0,h.ref=y}else{if(u&&D()){p.data=u,P(p,v,r,c);return}V(r,!0)}c&&c(h)})):c&&c(h)},switchOffAutoHideShow:function(){x=!1},ua:T,getFlashPlayerVersion:function(){return{major:T.pv[0],minor:T.pv[1],release:T.pv[2]}},hasFlashPlayerVersion:W,createSWF:function(e,t,n){return T.w3?j(e,t,n):undefined},showExpressInstall:function(e,t,n,r){T.w3&&D()&&P(e,t,n,r)},removeSWF:function(e){T.w3&&I(e)},createCSS:function(e,t,n,r){T.w3&&X(e,t,n,r)},addDomLoadEvent:k,addLoadEvent:L,getQueryParamValue:function(e){var t=a.location.search||a.location.hash;if(t){/\?/.test(t)&&(t=t.split("?")[1]);if(e==null)return $(t);var n=t.split("&");for(var r=0;r<n.length;r++)if(n[r].substring(0,n[r].indexOf("="))==e)return $(n[r].substring(n[r].indexOf("=")+1))}return""},expressInstallCallback:function(){if(w){var e=R(s);e&&v&&(e.parentNode.replaceChild(v,e),m&&(V(m,!0),T.ie&&T.win&&(v.style.display="block")),g&&g(y)),w=!1}}}}();(function(){if("undefined"==typeof window||window.WebSocket)return;var e=window.console;if(!e||!e.log||!e.error)e={log:function(){},error:function(){}};if(!swfobject.hasFlashPlayerVersion("10.0.0")){e.error("Flash Player >= 10.0.0 is required.");return}location.protocol=="file:"&&e.error("WARNING: web-socket-js doesn't work in file:///... URL unless you set Flash Security Settings properly. Open the page via Web server i.e. http://..."),WebSocket=function(e,t,n,r,i){var s=this;s.__id=WebSocket.__nextId++,WebSocket.__instances[s.__id]=s,s.readyState=WebSocket.CONNECTING,s.bufferedAmount=0,s.__events={},t?typeof t=="string"&&(t=[t]):t=[],setTimeout(function(){WebSocket.__addTask(function(){WebSocket.__flash.create(s.__id,e,t,n||null,r||0,i||null)})},0)},WebSocket.prototype.send=function(e){if(this.readyState==WebSocket.CONNECTING)throw"INVALID_STATE_ERR: Web Socket connection has not been established";var t=WebSocket.__flash.send(this.__id,encodeURIComponent(e));return t<0?!0:(this.bufferedAmount+=t,!1)},WebSocket.prototype.close=function(){if(this.readyState==WebSocket.CLOSED||this.readyState==WebSocket.CLOSING)return;this.readyState=WebSocket.CLOSING,WebSocket.__flash.close(this.__id)},WebSocket.prototype.addEventListener=function(e,t,n){e in this.__events||(this.__events[e]=[]),this.__events[e].push(t)},WebSocket.prototype.removeEventListener=function(e,t,n){if(!(e in this.__events))return;var r=this.__events[e];for(var i=r.length-1;i>=0;--i)if(r[i]===t){r.splice(i,1);break}},WebSocket.prototype.dispatchEvent=function(e){var t=this.__events[e.type]||[];for(var n=0;n<t.length;++n)t[n](e);var r=this["on"+e.type];r&&r(e)},WebSocket.prototype.__handleEvent=function(e){"readyState"in e&&(this.readyState=e.readyState),"protocol"in e&&(this.protocol=e.protocol);var t;if(e.type=="open"||e.type=="error")t=this.__createSimpleEvent(e.type);else if(e.type=="close")t=this.__createSimpleEvent("close");else{if(e.type!="message")throw"unknown event type: "+e.type;var n=decodeURIComponent(e.message);t=this.__createMessageEvent("message",n)}this.dispatchEvent(t)},WebSocket.prototype.__createSimpleEvent=function(e){if(document.createEvent&&window.Event){var t=document.createEvent("Event");return t.initEvent(e,!1,!1),t}return{type:e,bubbles:!1,cancelable:!1}},WebSocket.prototype.__createMessageEvent=function(e,t){if(document.createEvent&&window.MessageEvent&&!window.opera){var n=document.createEvent("MessageEvent");return n.initMessageEvent("message",!1,!1,t,null,null,window,null),n}return{type:e,data:t,bubbles:!1,cancelable:!1}},WebSocket.CONNECTING=0,WebSocket.OPEN=1,WebSocket.CLOSING=2,WebSocket.CLOSED=3,WebSocket.__flash=null,WebSocket.__instances={},WebSocket.__tasks=[],WebSocket.__nextId=0,WebSocket.loadFlashPolicyFile=function(e){WebSocket.__addTask(function(){WebSocket.__flash.loadManualPolicyFile(e)})},WebSocket.__initialize=function(){if(WebSocket.__flash)return;WebSocket.__swfLocation&&(window.WEB_SOCKET_SWF_LOCATION=WebSocket.__swfLocation);if(!window.WEB_SOCKET_SWF_LOCATION){e.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");return}var t=document.createElement("div");t.id="webSocketContainer",t.style.position="absolute",WebSocket.__isFlashLite()?(t.style.left="0px",t.style.top="0px"):(t.style.left="-100px",t.style.top="-100px");var n=document.createElement("div");n.id="webSocketFlash",t.appendChild(n),document.body.appendChild(t),swfobject.embedSWF(WEB_SOCKET_SWF_LOCATION,"webSocketFlash","1","1","10.0.0",null,null,{hasPriority:!0,swliveconnect:!0,allowScriptAccess:"always"},null,function(t){t.success||e.error("[WebSocket] swfobject.embedSWF failed")})},WebSocket.__onFlashInitialized=function(){setTimeout(function(){WebSocket.__flash=document.getElementById("webSocketFlash"),WebSocket.__flash.setCallerUrl(location.href),WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG);for(var e=0;e<WebSocket.__tasks.length;++e)WebSocket.__tasks[e]();WebSocket.__tasks=[]},0)},WebSocket.__onFlashEvent=function(){return setTimeout(function(){try{var t=WebSocket.__flash.receiveEvents();for(var n=0;n<t.length;++n)WebSocket.__instances[t[n].webSocketId].__handleEvent(t[n])}catch(r){e.error(r)}},0),!0},WebSocket.__log=function(t){e.log(decodeURIComponent(t))},WebSocket.__error=function(t){e.error(decodeURIComponent(t))},WebSocket.__addTask=function(e){WebSocket.__flash?e():WebSocket.__tasks.push(e)},WebSocket.__isFlashLite=function(){if(!window.navigator||!window.navigator.mimeTypes)return!1;var e=window.navigator.mimeTypes["application/x-shockwave-flash"];return!e||!e.enabledPlugin||!e.enabledPlugin.filename?!1:e.enabledPlugin.filename.match(/flashlite/i)?!0:!1},window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION||(window.addEventListener?window.addEventListener("load",function(){WebSocket.__initialize()},!1):window.attachEvent("onload",function(){WebSocket.__initialize()}))})(),function(e,t,n){function r(e){if(!e)return;t.Transport.apply(this,arguments),this.sendBuffer=[]}function i(){}e.XHR=r,t.util.inherit(r,t.Transport),r.prototype.open=function(){return this.socket.setBuffer(!1),this.onOpen(),this.get(),this.setCloseTimeout(),this},r.prototype.payload=function(e){var n=[];for(var r=0,i=e.length;r<i;r++)n.push(t.parser.encodePacket(e[r]));this.send(t.parser.encodePayload(n))},r.prototype.send=function(e){return this.post(e),this},r.prototype.post=function(e){function r(){this.readyState==4&&(this.onreadystatechange=i,t.posting=!1,this.status==200?t.socket.setBuffer(!1):t.onClose())}function s(){this.onload=i,t.socket.setBuffer(!1)}var t=this;this.socket.setBuffer(!0),this.sendXHR=this.request("POST"),n.XDomainRequest&&this.sendXHR instanceof XDomainRequest?this.sendXHR.onload=this.sendXHR.onerror=s:this.sendXHR.onreadystatechange=r,this.sendXHR.send(e)},r.prototype.close=function(){return this.onClose(),this},r.prototype.request=function(e){var n=t.util.request(this.socket.isXDomain()),r=t.util.query(this.socket.options.query,"t="+ +(new Date));n.open(e||"GET",this.prepareUrl()+r,!0);if(e=="POST")try{n.setRequestHeader?n.setRequestHeader("Content-type","text/plain;charset=UTF-8"):n.contentType="text/plain"}catch(i){}return n},r.prototype.scheme=function(){return this.socket.options.secure?"https":"http"},r.check=function(e,r){try{var i=t.util.request(r),s=n.XDomainRequest&&i instanceof XDomainRequest,o=e&&e.options&&e.options.secure?"https:":"http:",u=n.location&&o!=n.location.protocol;if(i&&(!s||!u))return!0}catch(a){}return!1},r.xdomainCheck=function(e){return r.check(e,!0)}}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(e,t){function n(e){t.Transport.XHR.apply(this,arguments)}e.htmlfile=n,t.util.inherit(n,t.Transport.XHR),n.prototype.name="htmlfile",n.prototype.get=function(){this.doc=new(window[["Active"].concat("Object").join("X")])("htmlfile"),this.doc.open(),this.doc.write("<html></html>"),this.doc.close(),this.doc.parentWindow.s=this;var e=this.doc.createElement("div");e.className="socketio",this.doc.body.appendChild(e),this.iframe=this.doc.createElement("iframe"),e.appendChild(this.iframe);var n=this,r=t.util.query(this.socket.options.query,"t="+ +(new Date));this.iframe.src=this.prepareUrl()+r,t.util.on(window,"unload",function(){n.destroy()})},n.prototype._=function(e,t){e=e.replace(/\\\//g,"/"),this.onData(e);try{var n=t.getElementsByTagName("script")[0];n.parentNode.removeChild(n)}catch(r){}},n.prototype.destroy=function(){if(this.iframe){try{this.iframe.src="about:blank"}catch(e){}this.doc=null,this.iframe.parentNode.removeChild(this.iframe),this.iframe=null,CollectGarbage()}},n.prototype.close=function(){return this.destroy(),t.Transport.XHR.prototype.close.call(this)},n.check=function(e){if(typeof window!="undefined"&&["Active"].concat("Object").join("X")in window)try{var n=new(window[["Active"].concat("Object").join("X")])("htmlfile");return n&&t.Transport.XHR.check(e)}catch(r){}return!1},n.xdomainCheck=function(){return!1},t.transports.push("htmlfile")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(e,t,n){function r(){t.Transport.XHR.apply(this,arguments)}function i(){}e["xhr-polling"]=r,t.util.inherit(r,t.Transport.XHR),t.util.merge(r,t.Transport.XHR),r.prototype.name="xhr-polling",r.prototype.heartbeats=function(){return!1},r.prototype.open=function(){var e=this;return t.Transport.XHR.prototype.open.call(e),!1},r.prototype.get=function(){function t(){this.readyState==4&&(this.onreadystatechange=i,this.status==200?(e.onData(this.responseText),e.get()):e.onClose())}function r(){this.onload=i,this.onerror=i,e.retryCounter=1,e.onData(this.responseText),e.get()}function s(){e.retryCounter++,!e.retryCounter||e.retryCounter>3?e.onClose():e.get()}if(!this.isOpen)return;var e=this;this.xhr=this.request(),n.XDomainRequest&&this.xhr instanceof XDomainRequest?(this.xhr.onload=r,this.xhr.onerror=s):this.xhr.onreadystatechange=t,this.xhr.send(null)},r.prototype.onClose=function(){t.Transport.XHR.prototype.onClose.call(this);if(this.xhr){this.xhr.onreadystatechange=this.xhr.onload=this.xhr.onerror=i;try{this.xhr.abort()}catch(e){}this.xhr=null}},r.prototype.ready=function(e,n){var r=this;t.util.defer(function(){n.call(r)})},t.transports.push("xhr-polling")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(e,t,n){function i(e){t.Transport["xhr-polling"].apply(this,arguments),this.index=t.j.length;var n=this;t.j.push(function(e){n._(e)})}var r=n.document&&"MozAppearance"in n.document.documentElement.style;e["jsonp-polling"]=i,t.util.inherit(i,t.Transport["xhr-polling"]),i.prototype.name="jsonp-polling",i.prototype.post=function(e){function a(){f(),n.socket.setBuffer(!1)}function f(){n.iframe&&n.form.removeChild(n.iframe);try{u=document.createElement('<iframe name="'+n.iframeId+'">')}catch(e){u=document.createElement("iframe"),u.name=n.iframeId}u.id=n.iframeId,n.form.appendChild(u),n.iframe=u}var n=this,r=t.util.query(this.socket.options.query,"t="+ +(new Date)+"&i="+this.index);if(!this.form){var i=document.createElement("form"),s=document.createElement("textarea"),o=this.iframeId="socketio_iframe_"+this.index,u;i.className="socketio",i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.display="none",i.target=o,i.method="POST",i.setAttribute("accept-charset","utf-8"),s.name="d",i.appendChild(s),document.body.appendChild(i),this.form=i,this.area=s}this.form.action=this.prepareUrl()+r,f(),this.area.value=t.JSON.stringify(e);try{this.form.submit()}catch(l){}this.iframe.attachEvent?u.onreadystatechange=function(){n.iframe.readyState=="complete"&&a()}:this.iframe.onload=a,this.socket.setBuffer(!0)},i.prototype.get=function(){var e=this,n=document.createElement("script"),i=t.util.query(this.socket.options.query,"t="+ +(new Date)+"&i="+this.index);this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),n.async=!0,n.src=this.prepareUrl()+i,n.onerror=function(){e.onClose()};var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(n,s),this.script=n,r&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},i.prototype._=function(e){return this.onData(e),this.isOpen&&this.get(),this},i.prototype.ready=function(e,n){var i=this;if(!r)return n.call(this);t.util.load(function(){n.call(i)})},i.check=function(){return"document"in n},i.xdomainCheck=function(){return!0},t.transports.push("jsonp-polling")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),typeof define=="function"&&define.amd&&define("socketio",[],function(){return io})})(),define("backbone.iosync",["backbone","socketio"],function(e){var t,n,e,r;typeof window=="undefined"||typeof require=="function"?(n=require("jquery"),t=require("underscore"),e=require("backbone"),r=e,typeof module!="undefined"&&(module.exports=r)):(n=this.$,t=this._,e=this.Backbone,r=this),e.sync=function(r,s,o){var u=t.extend({},o);u.url?u.url=t.result(u,"url"):u.url=t.result(s,"url")||i();var a=u.url.split("/"),f=a[0]!==""?a[0]:a[1];!u.data&&s&&(u.data=u.attrs||s.toJSON(o)||{}),u.patch===!0&&u.data.id==null&&s&&(u.data.id=s.id);var l=s.socket||e.socket||window.socket,c=n.Deferred();l.emit(f+":"+r,u.data,function(e,t){e?(o.error&&o.error(e),c.reject()):(o.success&&o.success(t),c.resolve())});var h=c.promise();return s.trigger("request",s,h,o),h};var i=function(){throw new Error('A "url" property or function must be specified')}}),define("backbone.iobind",["backbone","backbone.iosync"],function(e){var t,n,e,r;return typeof window=="undefined"||typeof require=="function"?(n=require("jquery"),t=require("underscore"),e=require("backbone"),r=e,typeof module!="undefined"&&(module.exports=r)):(n=this.$,t=this._,e=this.Backbone,r=this),e.Model.prototype.ioBindVersion="0.4.6",e.Model.prototype.ioBind=function(t,n,r,i){var s=this._ioEvents||(this._ioEvents={}),o=this.url()+":"+t,u=this;"function"==typeof n&&(i=r,r=n,n=this.socket||window.socket||e.socket);var a={name:t,global:o,cbLocal:r,cbGlobal:function(){var e=[t];e.push.apply(e,arguments),u.trigger.apply(u,e)}};return this.bind(a.name,a.cbLocal,i||u),n.on(a.global,a.cbGlobal),s[a.name]?s[a.name].push(a):s[a.name]=[a],this},e.Model.prototype.ioUnbind=function(n,r,i){var s=this._ioEvents||(this._ioEvents={}),o=this.url()+":"+n;"function"==typeof r&&(i=r,r=this.socket||window.socket||e.socket);var u=s[n];if(!t.isEmpty(u)){if(i&&"function"==typeof i){for(var a=0,f=u.length;a<f;a++)i==u[a].cbLocal&&(this.unbind(u[a].name,u[a].cbLocal),r.removeListener(u[a].global,u[a].cbGlobal),u[a]=!1);u=t.compact(u)}else this.unbind(n),r.removeAllListeners(o);u.length===0&&delete s[n]}return this},e.Model.prototype.ioUnbindAll=function(t){var n=this._ioEvents||(this._ioEvents={});t||(t=this.socket||window.socket||e.socket);for(var r in n)this.ioUnbind(r,t);return this},e.Collection.prototype.ioBindVersion="0.4.6",e.Collection.prototype.ioBind=function(t,n,r,i){var s=this._ioEvents||(this._ioEvents={}),o=this.url+":"+t,u=this;"function"==typeof n&&(i=r,r=n,n=this.socket||window.socket||e.socket);var a={name:t,global:o,cbLocal:r,cbGlobal:function(){var e=[t];e.push.apply(e,arguments),u.trigger.apply(u,e)}};return this.bind(a.name,a.cbLocal,i),n.on(a.global,a.cbGlobal),s[a.name]?s[a.name].push(a):s[a.name]=[a],this},e.Collection.prototype.ioUnbind=function(n,r,i){var s=this._ioEvents||(this._ioEvents={}),o=this.url+":"+n;"function"==typeof r&&(i=r,r=this.socket||window.socket||e.socket);var u=s[n];if(!t.isEmpty(u)){if(i&&"function"==typeof i){for(var a=0,f=u.length;a<f;a++)i==u[a].cbLocal&&(this.unbind(u[a].name,u[a].cbLocal),r.removeListener(u[a].global,u[a].cbGlobal),u[a]=!1);u=t.compact(u)}else this.unbind(n),r.removeAllListeners(o);u.length===0&&delete s[n]}return this},e.Collection.prototype.ioUnbindAll=function(t){var n=this._ioEvents||(this._ioEvents={});t||(t=this.socket||window.socket||e.socket);for(var r in n)this.ioUnbind(r,t);return this},e}),define("backbone.stickit",["backbone","jquery"],function(e,t){e.Stickit={_handlers:[],addHandler:function(e){e=_.map(_.flatten([e]),function(e){return _.extend({updateModel:!0,updateView:!0,updateMethod:"text"},e)}),this._handlers=this._handlers.concat(e)}},_.extend(e.View.prototype,{_modelBindings:null,unstickit:function(e){var t=[],n=this;_.each(this._modelBindings,function(r,i){if(e&&r.model!==e)return!1;r.model.off(r.event,r.fn),t.push(r.model),delete n._modelBindings[i]}),_.each(_.uniq(t),function(e){e.trigger("stickit:unstuck",n.cid)}),this._modelBindings=_.compact(this._modelBindings),this.$el.off(".stickit"+(e?"."+e.cid:""))},stickit:function(e,t){var n=this,i=e||this.model,p=".stickit."+i.cid,d=t||this.bindings||{};this._modelBindings||(this._modelBindings=[]),this.unstickit(i),_.each(_.keys(d),function(e){var t,v,m,g,y=d[e]||{},b=_.uniqueId();e!=":el"?t=n.$(e):(t=n.$el,e="");if(!t.length)return;_.isString(y)&&(y={observe:y}),_.isFunction(y.observe)&&(y.observe=y.observe.call(n)),g=f(t,y),m=g.observe,g.bindId=b,g.view=n,v=_.extend({stickitChange:g},g.setOptions||{}),l(n,t,g,i,m),c(n,t,g,i,m),m&&(_.each(g.events||[],function(r){var o=r+p,a=function(e){var r=g.getVal.call(n,t,e,g,_.rest(arguments));s(n,g.updateModel,r,g)&&u(i,m,r,v,n,g)};e===""?n.$el.on(o,a):n.$el.on(o,e,a)}),_.each(_.flatten([m]),function(e){o(i,n,"change:"+e,function(e,r,i){var s=i&&i.stickitChange&&i.stickitChange.bindId||null;s!=b&&h(n,t,g,a(e,m,g,n),e)})}),h(n,t,g,a(i,m,g,n),i,!0)),i.on("stickit:unstuck",function(e){e==n.cid&&r(n,g.destroy,t,i,g)}),r(n,g.initialize,t,i,g)}),this.remove=_.wrap(this.remove,function(e){var t=n;return n.unstickit(),e&&(t=e.apply(n,_.rest(arguments))),t})}});var n=function(e,t){var n=(t||"").split("."),r=_.reduce(n,function(e,t){return e[t]},e);return r==null?e:r},r=function(e,t){if(t)return(_.isString(t)?e[t]:t).apply(e,_.toArray(arguments).slice(2))},i=function(e){return e.find("option").not(function(){return!this.selected})},s=function(e,t){return _.isBoolean(t)?t:_.isFunction(t)||_.isString(t)?r.apply(this,_.toArray(arguments)):!1},o=function(e,t,n,r){e.on(n,r,t),t._modelBindings.push({model:e,event:n,fn:r})},u=function(e,t,n,i,s,o){o.onSet&&(n=r(s,o.onSet,n,o)),e.set(t,n,i)},a=function(e,t,n,i){var s,o=function(t){var r=n.escape?e.escape(t):e.get(t);return _.isUndefined(r)||_.isNull(r)?"":r};return s=_.isArray(t)?_.map(t,o):o(t),n.onGet?r(i,n.onGet,s,n):s},f=e.Stickit.getConfiguration=function(t,n){var r=[{updateModel:!1,updateMethod:"text",update:function(e,t,n,r){e[r.updateMethod]&&e[r.updateMethod](t)},getVal:function(e,t,n){return e[n.updateMethod]()}}];_.each(e.Stickit._handlers,function(e){t.is(e.selector)&&r.push(e)}),r.push(n);var i=_.extend.apply(_,r);return i.visible&&!_.has(i,"updateView")?i.updateView=!1:_.has(i,"updateView")||(i.updateView=!0),delete i.selector,i},l=function(e,t,n,r,i){var s=["autofocus","autoplay","async","checked","controls","defer","disabled","hidden","loop","multiple","open","readonly","required","scoped","selected"];_.each(n.attributes||[],function(n){var u="",f,l;n=_.clone(n),f=n.observe||(n.observe=i),l=function(){var i=_.indexOf(s,n.name,!0)>-1?"prop":"attr",o=a(r,f,n,e);n.name=="class"?(t.removeClass(u).addClass(o),u=o):t[i](n.name,o)},_.each(_.flatten([f]),function(t){o(r,e,"change:"+t,l)}),l()})},c=function(e,t,n,i,s){if(n.visible==null)return;var u=function(){var o=n.visible,u=n.visibleFn,f=a(i,s,n,e),l=!!f;if(_.isFunction(o)||_.isString(o))l=r(e,o,f,n);u?r(e,u,t,l,n):l?t.show():t.hide()};_.each(_.flatten([s]),function(t){o(i,e,"change:"+t,u)}),u()},h=function(e,t,n,i,o,u){if(!s(e,n.updateView,i,n))return;r(e,n.update,t,i,o,n),u||r(e,n.afterUpdate,t,i,n)};e.Stickit.addHandler([{selector:'[contenteditable="true"]',updateMethod:"html",events:["input","change"]},{selector:"input",events:["propertychange","input","change"],update:function(e,t){e.val(t)},getVal:function(e){return e.val()}},{selector:"textarea",events:["propertychange","input","change"],update:function(e,t){e.val(t)},getVal:function(e){return e.val()}},{selector:'input[type="radio"]',events:["change"],update:function(e,t){e.filter('[value="'+t+'"]').prop("checked",!0)},getVal:function(e){return e.filter(":checked").val()}},{selector:'input[type="checkbox"]',events:["change"],update:function(e,n,r,i){e.length>1?(n||(n=[]),_.each(e,function(e){_.indexOf(n,t(e).val())>-1?t(e).prop("checked",!0):t(e).prop("checked",!1)})):_.isBoolean(n)?e.prop("checked",n):e.prop("checked",n==e.val())},getVal:function(e){var n;if(e.length>1)n=_.reduce(e,function(e,n){return t(n).prop("checked")&&e.push(t(n).val()),e},[]);else{n=e.prop("checked");var r=e.val();r!="on"&&r!=null&&(n?n=e.val():n=null)}return n}},{selector:"select",events:["change"],update:function(i,s,o,u){var a,f=u.selectOptions,l=f&&f.collection||undefined,c=i.prop("multiple");if(!f){f={};var h=function(e){return e.map(function(){return{value:this.value,label:this.text}}).get()};i.find("optgroup").length?(l={opt_labels:[]},i.find("> option").length&&(l.opt_labels.push(undefined),_.each(i.find("> option"),function(e){l[undefined]=h(t(e))})),_.each(i.find("optgroup"),function(e){var n=t(e).attr("label");l.opt_labels.push(n),l[n]=h(t(e).find("option"))})):l=h(i.find("option"))}f.valuePath=f.valuePath||"value",f.labelPath=f.labelPath||"label";var p=function(e,r,i){_.each(e,function(e){var s=t("<option/>"),o=e,u=function(e,t){s.text(e),o=t,s.data("stickit_bind_val",o),!_.isArray(o)&&!_.isObject(o)&&s.val(o)};e==="__default__"?u(f.defaultOption.label,f.defaultOption.value):u(n(e,f.labelPath),n(e,f.valuePath)),!c&&o!=null&&i!=null&&o==i||_.isObject(i)&&_.isEqual(o,i)?s.prop("selected",!0):c&&_.isArray(i)&&_.each(i,function(e){_.isObject(e)&&(e=n(e,f.valuePath)),(e==o||_.isObject(e)&&_.isEqual(o,e))&&s.prop("selected",!0)}),r.append(s)})};i.html("");var d=function(e,t){var r=window;return t.indexOf("this.")===0&&(r=e),t=t.replace(/^[a-z]*\.(.+)$/,"$1"),n(r,t)};_.isString(l)?a=d(this,l):_.isFunction(l)?a=r(this,l,i,u):a=l,a instanceof e.Collection&&(a=a.toJSON()),f.defaultOption&&p(["__default__"],i);if(_.isArray(a))p(a,i,s);else if(a.opt_labels)_.each(a.opt_labels,function(e){var n=t("<optgroup/>").attr("label",e);p(a[e],n,s),i.append(n)});else{var v=[],m;for(var g in a)m={},m[f.valuePath]=g,m[f.labelPath]=a[g],v.push(m);p(_.sortBy(v,f.comparator||f.labelPath),i,s)}},getVal:function(e){var n;return e.prop("multiple")?n=t(i(e).map(function(){return t(this).data("stickit_bind_val")})).get():n=i(e).data("stickit_bind_val"),n}}])}),function(){require.config({paths:{jquery:"lib/jquery-2.0.1",backbone:"lib/backbone",underscore:"lib/lodash.underscore",marionette:"lib/backbone.marionette",babysitter:"lib/backbone.babysitter",wreq:"lib/backbone.wreqr",socketio:"lib/socket.io","backbone.iosync":"backbone.iosync","backbone.iobind":"backbone.iobind",fileupload:"lib/jquery.fileupload","jquery.ui.widget":"lib/jquery.ui.widget","backbone.stickit":"backbone.stickit",md5:"lib/md5",hammer:"lib/hammer",tween:"lib/tween.min"},shim:{"backbone.stickit":{deps:["backbone"]},backbone:{exports:"Backbone",deps:["jquery","underscore"]},"backbone.iosync":{exports:"Backbone",deps:["backbone","socketio"]},"backbone.iobind":{exports:"Backbone",deps:["backbone.iosync"]},marionette:{exports:"Backbone.Marionette",deps:["backbone.stickit"]}}}),define("main",["collectionViews/NotiesCollectionView","marionette","router","socketio","helpers","backbone.iobind","backbone.stickit"],function(e,t,n,r,i){var s;return s=function(){function s(){var e,s;e=new t.Application,e.name="iconmelon",window.App=e,e.addRegions({main:"#main-l"}),this.$mainHeader=$("#js-main-header"),this.$loadingLine=$("#js-loadin-line"),e.$loadingLine=this.$loadingLine,e.$mainHeader=this.$mainHeader,e.$footer=$("#js-main-footer"),e.$bodyHtml=$("body, html"),e.$svgWrap=$("#js-svg-wrap"),e.helpers=i,e.loadedHashes=[],e.iconsSelected=[],e.filtersSelected=[],e.isDevMode=window.location.href.match("localhost"),s=e.isDevMode?"http://localhost":"http://iconmelon.com",window.socket=r.connect(s),e.$window=$(window),this.$mainHeader=$("#js-main-header"),e.$blinded=$("#js-blinded"),e.$toTops=$(".js-to-top"),e.router=new n,Backbone.history.start(),e.start(),e.helpers.listenLinks(),this.listenEvents(),this.makeNotyfier()}return s.prototype.makeNotyfier=function(){return App.notifier=new e({isRender:!0})},s.prototype.listenEvents=function(){var e=this;return App.$window.on("scroll",function(){return e.$mainHeader.toggleClass("is-convex",App.$window.scrollTop()>0)}),App.$window.on("scroll",_.throttle(function(){if(App.$window.scrollTop()<App.$window.outerHeight()){if(!e.istoTop)return;return App.$toTops.removeClass("animated fadeInUp").addClass("animated fadeOutDown"),e.istoTop=!1}if(e.istoTop)return;return App.$toTops.removeClass("animated fadeOutDown").addClass("animated fadeInUp"),e.istoTop=!0},2e3)),App.$toTops.on("click",function(){return App.$bodyHtml.animate({scrollTop:300})})},s}(),new s})}.call(this);