New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

litejs

Package Overview
Dependencies
Maintainers
1
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

litejs - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

public/0.js

95

dist/litejs-min.js
/*! litejs.com/MIT-LICENSE.txt */
!function(e,f){function p(g,d,a){if(g&&g.constructor===f){d={};for(a in g)q.call(g,a)&&(d[a]=p(g[a]));g=d}return g}function t(){for(var g=this.length,d=k(arguments),a=-1;g--;)~d.indexOf(this[g])&&this.splice(a=g,1);return a}function h(g){var x=[],b=g.match(/[^"']+?->|.+$/g),c=k(arguments,1),m=c.length+":"+g,e=a[m];if(!e){for(e=g.replace(d,"").match(/\b[a-z_$][\w$]*/ig)||[];1<b.length;)g=b.pop(),x=b.pop().match(/\w+/g)||[],t.apply(e,x),b.length&&b.push("function("+x+"){return("+g+")}"+(c[0]?".bind(this)":
""));g="return("+g+")";c[1]&&(b=f.keys(c.slice(1)).map(h("a->'__'+a")),x.unshift.apply(x,b),g="with("+b.join(")with(")+"){"+g+"}");c[0]&&(g="with(this){"+g+"}",e[0]&&(g="var "+e.uniq().join("='',")+"='';"+g));e=a[m]=Function(x,g)}return c.length?e.bind.apply(e,c):e}function m(g){function d(){!--a&&g&&g.call(this)}var a=1;d.wait=function(){a++;return d};return d}function r(){return!0}function l(){return!1}var n=Array.prototype,c=Function.prototype,b=String.prototype,q=f.prototype.hasOwnProperty,k=
c.call.bind(n.slice),a={},d=/(['\/"])(?:\\?.)*?\1|\b(?:false|in|new|null|this|true|void)\b|\.\w+|\w+:/g;c.partial=function(){var g=this,d=k(arguments);return function(){return g.apply(this,d.concat.apply(d,arguments))}};c.cache=function(g,d,b){function c(){var b=arguments,y=!!g||this instanceof c,l=d?d.apply(e,b):y+":"+b.length+":"+k(b);if(l in m)l=m[l];else{var n=m;if(y)var y=e,q=void 0,y=(q=b.length)?(a[q]||(a[q]=h("t a->new t(a["+f.keys(b).join("],a[")+"])")))(y,b):new y;else y=e.apply(this,b);
l=n[l]=y}return l}var e=c.origin=this,m=c.cached=b||{};c.extend=function(){return e.extend.apply(e,arguments).cache(g,d,b)};c.prototype=e.prototype;return c};c.extend=function(){function g(){return a.apply(this,arguments)}var d,a=this,b=0;for(g.prototype=f.create(a.prototype);d=arguments[b++];)f.merge(g.prototype,d);return g.prototype.constructor=g};f.each=function(g,d,a,b){if(g)for(b in g)q.call(g,b)&&d.call(a,g[b],b,g)};f.merge=function(g,d){for(var a,b=1;d=arguments[b++];)for(a in d)q.call(d,a)&&
(g[a]=d[a]);return g};f.values=function(g){return f.keys(g||{}).map(function(d){return g[d]})};f.clone=p;n.remove=t;n.each=n.forEach;n.fold=n.reduce;n.foldr=n.reduceRight;n.uniq=n.filter.partial(function(g,d,a){return d==a.indexOf(g)});n.pushUniq=function(g){return-1==this.indexOf(g)?this.push(g):!1};c.fn=function(){return this};b.fn=function(g){return h(this,g)};Boolean.prototype.fn=function(){return this.valueOf()?r:l};e.Fn=h;e.Fn.wait=m;e.Fn.hold=function(g){var d,a=this,b=[],c=[],k=m(function(){for(var d,
g=a,k=c.length;k--;k--)c[k]?a[c[k-1]]=c[k]:delete a[c[k-1]];for(;d=b[++k];)g=g[d].apply(g,b[++k])||g;b=c=null});g=g||a.syncMethods||[];for(d in a)"function"==typeof a[d]&&-1==g.indexOf(d)&&!function(d){c.push(d,q.call(a,d)&&a[d]);a[d]=function(){b.push(d,arguments);return a}}(d);a.wait=k.wait;return k}}(this,Object);
!function(e,f){var p=/("|')((?:\\?.)*?)\1|([YMD])\3\3\3?|([YMDHhmsWSZ])(\4?)|[uUASwoQ]/g,t=/(\d+)[-.\/](\d+)[-.\/](\d+)/,h=/(\d+):(\d+)(?::(\d+))?(\.\d+)?(?:\s*(?:(a)|(p))\.?m\.?)?(\s*(?:Z|GMT|UTC)?(?:([-+]\d\d):?(\d\d)?)?)?/i,m=/\\(.)/g,r={D:"Date",h:"Hours",m:"Minutes",s:"Seconds",S:"Milliseconds"};e[f].date=e[f].format=function(h,f){h=e.masks[h]||h||e.masks["default"];var c,b=this,q=+b,k="get"+("UTC:"==h.slice(0,4)?(h=h.slice(4),"UTC"):""),a=void 0==f?b._z:f;void 0!=a&&"get"==k&&(k="getUTC",b.setTime(q+
36E5*a),c=60*a);h=h.replace(p,function(d,g,a,h,f,l){a="Y"==h?b[k+"FullYear"]():h?e.names[b[k+("M"==h?"Month":"Day")]()+("DDD"==d?24:"D"==h?31:"MMM"==d?0:12)]:"Y"==f?b[k+"FullYear"]()%100:"W"==f?(g=new e(q+864E5*(4-(b[k+"Day"]()||7))),Math.ceil(((g.getTime()-g["s"+k.slice(1)+"Month"](0,1))/864E5+1)/7)):"M"==f?b[k+"Month"]()+1:"H"==f?b[k+"Hours"]()%12||12:"Z"==f?(g=c||"get"==k&&-b.getTimezoneOffset()||0,g?(0>g?(g=-g,"-"):"+")+(600>g?"0":"")+(0|g/60)+((g%=60)?(l?"":":")+g:""):"Z"):f?b[k+r[f]]():"u"==
d?b/1E3>>>0:"U"==d?q:"Q"==d?(b[k+"Month"]()/3|0)+1:"A"==d?e[11<b[k+"Hours"]()?"pm":"am"]:"w"==d?b[k+"Day"]()||7:"o"==d?(new e(q+864E5*(4-(b[k+"Day"]()||7))))[k+"FullYear"]():g?a.replace(m,"$1"):d;"SS"==d&&100>a&&(a="0"+a);return l&&10>a&&"Z"!=f?"0"+a:a});void 0!=c&&b.setTime(q);return h};e[f].tz=function(h){this._z=h;return this};e.am="AM";e.pm="PM";e.masks={"default":"DDD MMM DD YYYY hh:mm:ss",iso:"UTC:YYYY-MM-DD'T'hh:mm:ss'Z'"};e.names="JanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberSunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturday".match(/.[a-z]+/g);
String[f].date=Number[f].date=function(f,m,c){var b,q,k,a=new e,d=+this||""+this;if(isNaN(d)){if(b=d.match(t))q=99<b[1]?1:3,k=e.middleEndian?4-q:2,a.setFullYear(b[q],b[k]-1,b[6-k-q]);b=d.match(h)||[0,0,0];a.setHours(b[6]&&12>b[1]?+b[1]+12:b[5]&&12==b[1]?0:b[1],b[2],b[3]|0,1E3*b[4]|0);b[7]&&(c=(b[8]|0)+(b[9]|0)/(0>b[8]?-60:60))}else a.setTime(4294967296>d?1E3*d:d);void 0!=c&&a.setTime(a-6E4*(60*c+a.getTimezoneOffset()));return f?a.format(f,m):a}}(Date,"prototype");
!function(e,f){function p(h,e,r,l,n,c,b,q,k){l||(l="");if(e&&e.constructor==f)for(n in h&&h.constructor==f||(h={}),e){if(q!==(c=e[n])&&t.call(e,n)&&(q==c?q!==h[n]&&delete h[n]:h[n]!==c)){b=l+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1");if(k=r)k=h[n],k=!!k&&k.constructor==f;k=k&&r.length;q!=c&&(h[n]=p(h[n],c,r,b));!1!==k&&k==r.length||r.push(b)}}else h=e;return h}var t=f.prototype.hasOwnProperty;e.pointer=function(h,e,f){if(e){e=e.split("/");for(var l,n=2<arguments.length,c=1,b=e.length;h&&c<b;){l=
e[c++].replace(/~1/g,"/").replace(/~0/g,"~");if(n){if(c==b)return n=h[l],h[l]=f,n;h[l]&&"object"==typeof h[l]||(h[l]={})}h=h[l]}}return h};e.mergePatch=p}(JSON,Object);
!function(e,f){function p(d,g,a,b){var c=this._e||(this._e={});(c[d]||(c[d]=[])).unshift(a,b,g);return this}function t(d,g,a){var b=this._e&&this._e[d];if(b)if(g)for(d=b.length;d--;d--){if((b[d--]===g||b[d]===g)&&b[d-1]==a){b.splice(d-1,3);break}}else b.length=0;return this}function h(d,g,a){function b(){c.non(d,g,a).non(d,b,a)}var c=this;return c.on(d,b,a).on(d,g,a)}function m(){this.returnValue=!1}function r(){this.cancelBubble=this.cancel=!0}var l=e.Event||(e.Event={}),n=120,c="addEventListener",
b="removeEventListener",q=e[c]?"":(c="attachEvent",b="detachEvent","on"),k=l.fixEv={wheel:"onwheel"in f?"wheel":"onmousewheel"in f?"mousewheel":"DOMMouseScroll"},a=l.fixFn={wheel:function(d,a){return function(b){var c=(b.wheelDelta||-b.detail||-b.deltaY)/n;if(c){if(1>c&&-1<c){var k=(0>c?-1:1)/c,c=c*k;n/=k}a.call(d,b,c)}}}};l.Emitter={on:p,non:t,off:t,once:h,one:h,emit:function(d){var a,b;if(d=this._e&&this._e[d])for(d=d.slice(),b=d.length,a=d.slice.call(arguments,1);b--;)d[b--].apply(d[--b]||this,
a);return this}};l.add=function(d,g,b){var h=a[g]&&a[g](d,b)||b,f=q?function(){var a=e.event;a&&(a.target=a.srcElement,a.preventDefault=m,a.stopPropagation=r);h.call(d,a)}:h;d[c](q+(k[g]||g),f,!1);p.call(d,g,f,d,b)};l.remove=function(a,g,c){var e=a._e&&a._e[g];if(c=e&&e.indexOf(c))a[b](q+(k[g]||g),e[c+1]),e.splice(c-1,3)};l.stop=function(a){a.stopPropagation();a.preventDefault();return!1};l.removeAll=function(a,b,c){if(a._e)for(c in a._e)b&&c!==b||l.remove(a,c)}}(this,document);
!function(){function e(e,f){for(var r,l,n=0,c=e.target||e.srcElement,b=/INPUT|TEXTAREA|SELECT/i.test((3==c.nodeType?c.parentNode:c).tagName);l=p[n++];){if(!b||l.enable_input)r=l[f]||(l.num&&"/"<f&&":">f?(f|=0,l.num):l.all);if(r||!l.bubble)break}r&&r(e,f,c)}function f(e){e=e.keyCode||e.which;95<e&&106>e&&(e-=48);return t[e]||String.fromCharCode(e)||e}var p=[],t={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"caps",27:"esc",33:"pgup",34:"pgdown",35:"end",36:"home",37:"left",
38:"up",39:"right",40:"down",45:"ins",46:"del",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"};Event.setKeyMap=function(e){p.unshift(e)};Event.rmKeyMap=function(e){e=p.indexOf(e||p[0]);-1<e&&p.splice(e,1)};Event.add(document,"keydown",function(e){"backspace"==f(e)&&p[0]&&p[0].backspace&&Event.stop(e)});Event.add(document,"keyup",function(h){var m=f(h);e(h,m);h.ctrlKey&&"ctrl"!=m&&e(h,"ctrl+"+m);h.altKey&&"alt"!=m&&e(h,"alt+"+m)})}();
!function(e,f,p){function t(a){a=(a||b).href.split("#")[1]||"";a=decodeURIComponent(a.replace(/\+/g," "));return a.replace(q,"")}function h(a,d){a=encodeURIComponent(a).replace(/%20/g,"+").replace(/%2F/gi,"/");b[d?"replace":"assign"]("#"+a);if(n&&t()!==t(n.location))n.location[d?"replace":n.document.open().close(),"assign"]("#"+a);m()}function m(){l!=(l=t())&&r&&r(l)}var r,l,n,c,b=location,q=/^[#\/\!]+|[\s\/]+$/g,k=!+"\v1"&&8>(f.documentMode||1);p.getUrl=t;p.setUrl=h;p.start=function(a,b){r||("onhashchange"in
e&&!k?e.onhashchange=m:(k&&(n=f.body.appendChild(f.createElement('<iframe class="hide" tabindex="-1">')).contentWindow),setInterval(function(){var a=t();n&&c===a&&(a=t(n.location));c!==a&&(c=a,n?h(a):m())},60)));r=a;m()}}(this,document,history);
!function(e,f,p){function t(a,b,d){for(var g=[],c=a.firstChild,e=h(b);b=c;){if(e(b)){if(d)return b;g.push(b)}for(c=b.firstChild||b.nextSibling;!c&&(b=b.parentNode)!==a;)c=b.nextSibling}return d?null:g}function h(a){return J[a]||(J[a]=Function("_,v,a,b","return "+a.split(S).map(function(a){var b,v,d=["_&&_.nodeType==1"],g=a.replace(T,function(a,d,g,c){v=c+d.length;b=d.trim();return""});(a=a.slice(v).replace(K,function(a,b,v,g,c,e,k){d.push("((v='"+(g||(k?e.slice(1,-1):e)||"").replace(/'/g,"\\'")+"'),(a='"+
v+"'),1)",L[":"==b?v:b]||"(a=_.getAttribute(a))"+(c?"&&"+L[c]:e?"==v":""));return""}))&&"*"!=a&&(d[0]+="&&_.nodeName=='"+a.toUpperCase()+"'");g&&d.push("+"==b?"(a=_.previousSibling)":"(a=_.parentNode)",(b?"a.matches&&a.matches('":"a.closest&&a.closest('")+g+"')");return d.join("&&")}).join("||")))}function m(a,b,d){var g={};a=a.replace(K,function(a,b,d,v,c,e,k){e=k?e.slice(1,-1):e||d;g[b="."==b?(c="~","class"):"#"==b?"id":d]=c&&g[b]?"^"==c?e+g[b]:g[b]+("~"==c?" ":"")+e:e;return""})||"div";a=(E[a]||
(E[a]=f.createElement(a))).cloneNode(!0).attr(g);return d||!b?a:("object"==typeof b?k:r).call(a,b)}function r(a,b){var d,g=0,c=typeof a;if(a){if("string"==c||"number"==c)a=f.createTextNode(a);else if(!("nodeType"in a)&&"length"in a){c=a.length;for(d=f.createDocumentFragment();g<c;)r.call(d,a[g++]);a=d}a.nodeType&&(c=this.insertBefore?this:this[this.length-1],c.insertBefore(a,(!0===b?c.firstChild:"number"==typeof b?c.childNodes[0>b?c.childNodes.length-b-2:b]:b)||null))}return this}function l(a){return-1<
this.className.split(/\s+/).indexOf(a)}function n(a){var b=this.className;b&&(a=l.call(this,a)?b:b+" "+a);b!=a&&(this.className=a);return this}function c(a){l.call(this,a)&&(this.className=(" "+this.className+" ").replace(" "+a+" "," ").trim());return this}function b(a,b){1==arguments.length&&(b=!l.call(this,a));return(b?n:c).call(this,a),b}function q(){var b;this.emit&&this.emit("kill");this.parentNode&&this.parentNode.removeChild(this);Event.removeAll&&Event.removeAll(this);this.empty&&this.empty();
(b=this.attr&&this.attr("data-scope"))&&delete a[b];this.valObject&&(this.valObject=null);return this}function k(a,b){var d;if(a&&a.constructor==Object){for(b in a)k.call(this,b,a[b]);return this}d=this.getAttribute(a);if(1==arguments.length)return d;!R||"id"!=a&&"name"!=a&&"checked"!=a?"class"==a?n.call(this,b):b||0===b?d!=b&&this.setAttribute(a,b):d&&this.removeAttribute(a):this.mergeAttributes(M("<INPUT "+a+'="'+b+'">'),!1)}function a(b,d,c){if(c=a[k.call(b,"data-scope")])return c;d&&!0!==d||(c=
(c=g.call(b,"[data-scope]"))&&a[k.call(c,"data-scope")]||N);d&&(k.call(b,"data-scope",++O),c=a[O]=Object.create(d=c||d),c._super=d);return c}function d(b,c){var f,h,q;if(1!=this.nodeType)return this;b=a[k.call(this,"data-scope")]||b||(f=g.call(this,"[data-scope]"))&&a[k.call(f,"data-scope")]||N;if(f=!c&&k.call(this,"data-bind")){h=f;q="data b r->data&&("+f.replace(U,function(a,b,d){return A[b]?(V.call(A[b],"once")&&(h=h.replace(a,"")),"(r=b['"+b+"'].call(this,"+(A[b].raw?"data,'"+d+"'":d)+")||r),"):
"this.attr('"+b+"',"+d+"),"})+"r)";f!=h&&k.call(this,"data-bind",h);try{if(Fn(q,this,b)(b,A))return this}catch(l){l.message+=" in binding: "+f;console.error(l);if(e.onerror)e.onerror(l.message,l.fileName,l.lineNumber);return this}}for(f=this.firstChild;f;f=h)h=f.nextSibling,d.call(f,b);D&&"SELECT"==this.nodeName&&this.parentNode.insertBefore(this,this);return this}function g(a){for(var b=this;b;b=b.parentNode)if(b.matches&&b.matches(a))return b;return null}function x(a){for(var b=this.length=a.length;b--;)this[b]=
a[b]}function y(a){function b(a,d,e,f,v,h){for(v=d.length;v<=g[0];)g.shift(),c=c.plugin?c.plugin.done():c.parentNode||c[0].parentNode;e?m.plugins[f]?(c=(new m.plugins[f](c,h)).el,g.unshift(v)):c.append(a):(f&&(c=m(f,0,1).to(c),g.unshift(v)),h&&(v=h.charAt(0),f=h.slice(1),">"==v?(d+" "+f).replace(P,b):"|"==v||"\\"==v?c.append(f):"/"!=v&&("&"!=v&&(f=("INPUT"==c.tagName?"val":"txt")+":_('"+h.replace(/'/g,"\\'")+"').format(data)"),v=k.call(c,"data-bind"),k.call(c,"data-bind",(v?v+";":"")+f))))}var d=
f.createDocumentFragment(),c=d,g=[-1];a.replace(P,b);d=d.childNodes;return 1==d.length?d[0]:d}function B(a,b){this.name=b;this.parent=a;this.el=m("div");this.el.plugin=this;return this}function w(a,b){b=w[C(b)||z];return b[a]||b[a=a.slice(a.indexOf(":")+1)||a]||a}function C(a){return a&&(w[a=(""+a).toLowerCase()]||w[a=a.split("-")[0]])&&a}function H(a){(a=C(a))&&z!=a&&(w[z=w.current=a]=w[z]||{});return z}function I(a,b){-1==w.list.indexOf(a)&&w.list.push(a);Object.merge(w[a]||(w[a]={}),b);z||H(a)}
var z,D=!+"\v1",R=D&&8>(f.documentMode|0),V=Object[p].hasOwnProperty,F=[],Q=f.body,M=f.createElement,G="textContent"in Q?"textContent":"innerText",E=m.cache={},O=0,N=m.data={window:e,_:w},u=(e.HTMLElement||e.Element||m)[p],P=/^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w\:.#\[\]=])*)[ \t]*(.*?)$/gm,U=/[;\s]*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g,A=m.bindings={"class":function(a,d){b.call(this,a,2>arguments.length||d)},css:function(a,b){this.style[a.camelCase()]=b||""},data:function(a,b){this.attr("data-"+
a,b)},html:function(a){this.innerHTML=a}},K=/([.#:[])([-\w]+)(?:\((.+?)\)|([~^$*|]?)=(("|')(?:\\?.)*?\6|[-\w]+))?]?/g,T=/([\s>+]*)(?:("|')(?:\\?.)*?\2|\(.+?\)|[^\s+>])+$/,S=/\s*,\s*(?=(?:[^'"()]|"(?:\\?.)*?"|'(?:\\?.)*?'|\(.+?\))+$)/,J={},L={"first-child":"(a=_.parentNode)&&a.firstChild==_","last-child":"(a=_.parentNode)&&a.lastChild==_",".":"~_.className.split(/\\s+/).indexOf(a)","#":"_.id==a","^":"a.indexOf(v)==0","|":"a.split('-')[0]==v",$:"a.slice(-v.length)==v","~":"~a.split(/\\s+/).indexOf(v)",
"*":"~a.indexOf(v)"};e.El=m;u.append=r;u.after=function(a,b){r.call(a.parentNode,this,b?a:a.nextSibling);return this};u.to=function(a,b){r.call(a,this,b);return this};u.hasClass=l;u.addClass=n;u.rmClass=c;u.toggleClass=b;u.empty=function(){for(var a;a=this.firstChild;)q.call(a);return this};u.kill=q;u.on=function(a,b){Event.add(this,a,b);return this};u.non=function(a,b){Event.remove(this,a,b);return this};u.emit=function(){Event.Emitter.emit.apply(this,arguments)};u.attr=k;m.scope=a;u.render=d;u.txt=
A.txt=function(a){return arguments.length&&this[G]!=a?this[G]=a:this[G]};u.val=A.val=function(a){var b=this,d=b.type,c=b.options;if(arguments.length)return b.value=a;if(c){if("select-multiple"==d){a=[];for(d=0;b=c[d++];)b.selected&&!b.disabled&&a.push(b.valObject||b.value);return a}b=c[b.selectedIndex]||b}return"checkbox"!=d&&"radio"!=d||b.checked?b.valObject||b.value:null};u.matches||(u.matches=function(a){return!!h(a)(this)});u.closest||(u.closest=g);u.find=!D&&u.querySelector||function(a){return t(this,
a,!0)};u.findAll=u.querySelectorAll?function(a){return new x(this.querySelectorAll(a))}:function(a){return new x(t(this,a))};m.wrap=x;x[p]=Object.keys(u).reduce(function(a,b){function d(){for(var a,c=0,g=this.length;c<g;)if(a=u[b].apply(this[c++],arguments),d.first&&a)return a;return d.first?null:this}a[b]=d;return a},F);F.find.first=1;F.cloneNode=function(a){return new x(this.map(function(b){return b.cloneNode(a)}))};u==m[p]&&(f.createElement=function(a){return Object.merge(M(a),u)},Object.merge(Q,
u));m[p]=u;m.get=function(a){"string"==typeof a&&(a=f.getElementById(a));return a&&a.to?a:Object.merge(a,u)};B[p]={_done:function(){var a=1<this.el.childNodes.length?new x(this.el.childNodes):this.el.firstChild;this.el.plugin=this.el=this.parent=null;return a},done:function(){var a=this.parent;E[this.name]=this._done();return a}};m.plugins={template:B};m.create=m.tpl=y;m.include=function(a,b,d){b=m.get(a);(new B(null,a)).el.append(y(b.innerHTML)).plugin.done();b.kill()};m.i18n=w;w.list=[];w.get=C;
w.use=H;w.add=I;w.def=function(a){Object.each(a,function(b,d){I(d,a)})};String[p].lang=function(a){return w(this,a)}}(window,document,"prototype");
!function(e){function f(c,b,e,f,a){c=+c;var d=0;for(f=f||{"default":"{0} {1}{2}"};c>=b[d];)c/=b[d++];if(d==b.length&&a)return a(this);d=e[d];return(f[2>c?d:d+"s"]||f["default"]).format({0:c,1:d,2:2>c?"":"s"})}var p=Array[e],t=Number[e];e=String[e];var h=/{(?!\\)((?:(["'/])(?:\\?.)*?\2|[^}])*)}/g,m=/\|\s*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^|])*))?/g,r=/^\s*\d+/,l=/-?\d+\.?\d*/g,n=/{\\/g;e.format=function(){var c=p.slice.call(arguments);c.unshift(0);return this.replace(h,function(b,e){c[0]=e.replace(r,
"this[$&]").replace(m,".$1($2)");return Fn.apply(null,c)()}).replace(n,"{")};t.format=function(c){return""+this};e.safe=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;")};e.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};e.camelCase=function(){return this.replace(/[ _-]+([a-z])/g,function(c,b){return b.toUpperCase()})};e.lower=e.toLowerCase;e.upper=e.toUpperCase;t.step=function(c,b){var e=(""+c).split("."),f=this/
c,f=~~(f+(void 0==b?.5:1===b&&f==(f|0)?0:+b))*c;return""+(1 in e?f.toFixed(e[1].length):f)};e.step=function(c,b){return this.replace(l,function(e){return(+e).step(c,b)})};t.scale=function(){return f(this,[1E3,1E3,1E3],["","k","M","G"],{"default":"{0}{1}"})};e.scale=function(){return this.replace(l,function(c){return(+c).scale()})};e.pick=t.pick=function(){for(var c=this+"=",b,e=arguments,f=0,a=e.length;f<a;)b=e[f++],0==b.indexOf(c)&&(b=b.slice(c.length),f=a);return b.replace("#",this)};e.plural=t.plural=
function(){return arguments[+Fn("n->"+(String.plural||"n!=1"))(parseFloat(this))].replace("#",this)};p.pluck=function(c){for(var b=this.length,e=[];b--;)e[b]=this[b][c];return e};Number.words=f}("prototype");
!function(e){function f(a,d,g,e){if(n[a])return d&&n[a].init(d,g,e),n[a];if(!(this instanceof f))return new f(a,d,g,e);n[this.route=a]=this;this.init(d,g,e);if("#"!=a.charAt(0)){d=c++;var k=["o._r='"+a+"'"];a=a.replace(q,function(a,d){return d?k.push("o['"+d+"']=a["+c++ +"]")&&"([^/]+?)":a.replace(b,"\\$&")});r+=(r?"||":"")+"(o._u=a["+d+"])&&("+k+")";l+=(l?"|":"")+"("+a+")";p=new Function("o,a","return a&&("+r+"),o");t=new RegExp("^\\/?(?:"+l+")[\\/\\s]*$")}}var p,t,h,m,r="",l="",n={},c=1,b=/[.*+?^=!:${}()|\[\]\/\\]/g,
q=/\{([\w%.]+?)\}|.[^{\\]*?/g;f.prototype={init:function(a,b,c){this.el=a;this.parent="string"==typeof b?f(b):b;this.selector=c},show:function(a){var b,c=h=this;El.data.viewOpts=a=a||{};a._r=c.route;for(c.open&&c.close(a);c;b=c,c=c.parent)c.child&&c.child!=b&&c.child.close(a),c.child=b;b.ping(m=a)},close:function(a,b){this.open&&(this.emit("close",a,b),this.child&&this.child.close(a),this.open.kill(),this.open=this.parent.child=null)},wait:function(a,b){var c=this,e=c.parent;a._p=1+(a._p|0);return function(){--a._p||
m!=a||(c.el&&c.parent==e?c.ping(a,!b):(c.el?h:f("404")).show(a))}},ping:function(a,b){var c=this.parent,e=this.child;if(!this.el&&this.file)return xhr.load(this.file.replace(/^|,/g,"$&"+(f.base||"")).split(","),this.wait(a,1));b||this.emit("ping",a);if(m==a&&!a._p){var k=typeof this.el;"function"==k?this.el=this.el():"string"==k&&(this.el=El.tpl(this.el));c&&!this.open&&(this.open=this.el.cloneNode(!0),c.emit("beforeChild",a),this.open.to(c.selector&&c.open&&c.open.find(c.selector)||c.open||c.el),
this.open.render());e&&e.ping(a)}m!=a||a._p||this.route!=a._r||this.emit("show",a)}};Object.merge(f.prototype,Event.Emitter);f.home="home";f.show=function(a){a=p({_r:"404"},t.exec(a||f.home));var b=f(a._r);b.open&&b._u==a._u||(b._u=a._u,b.show(El.data.route=a))};f.def=function(a){for(var b,c=/(\S+) (\S+)/g;b=c.exec(a);)b[2].split(",").map(function(a){f(a).file=b[1]})};e.View=f;El.plugins.view=El.plugins.template.extend({done:function(){var a=this.parent,b=this.name.split(/\s+/);f(b[0],this._done(),
b[1],b[2]);return a}});var k=El("div");El.plugins["view-link"]=El.plugins.template.extend({done:function(){var a=this.name.split(/\s+/);f(a[0],k,a[2]).on("show",function(){f.show(a[1])});return this.parent}})}(this);
!function(e){function f(c){return c.apply(this,n.call(arguments,1))}function p(c){if(!c)return this.kill()}function t(c,b,e,f){if("string"==typeof b){var a=b;b=function(b){Mediator.emit(a,b,this,e,f)}}this.on(c,b)}function h(c){return this.render(Object.merge(El.scope(this,!0),c))}function m(c,b,e,f,a){this.on("submit",function(d){var g=JSON.serializeForm(this);Mediator.emit(c,d,g,b,e,f,a);return!1})}function r(c,b){var e,f=this._childs;if(!f)for(this._childs=f=[];e=this.firstChild;)f.push(e),this.removeChild(e);
e=f[0];f=/^\s*(\w+) in (\w*)(.*)/.exec(b);f="with(data){var out=[],loop={i:0,offset:0},_1,_2="+f[2]+f[3].replace(/ (limit|offset):\s*(\d+)/ig,";loop.$1=$2")+";if(_2)for(_1 in _2)if(hasOwn.call(_2,_1)&&!(loop.offset&&loop.offset--)){loop.i++;if(loop.limit&&loop.i-loop.offset>loop.limit)break;var clone=el.cloneNode(true),scope=El.scope(clone,data);scope.loopKey=loop.key=_1;scope.loop=loop;scope."+f[1]+"=_2[_1];out.push(clone);};return out}";e=Function("hasOwn,el,data",f)(l,e,c);this.empty().append(e).render();
return this}var l=Object.prototype.hasOwnProperty,n=Array.prototype.slice;f.once=p.once=h.once=t.once=m.once=r.raw=r.once=!0;e.fn=f;e["if"]=p;e.on=t;e["with"]=h;e.emitForm=m;e.each=r}(El.bindings);
!function(c,e){function p(g,d,a){if(g&&g.constructor===e){d={};for(a in g)u.call(g,a)&&(d[a]=p(g[a]));g=d}return g}function q(){for(var g=this.length,d=l(arguments),a=-1;g--;)~d.indexOf(this[g])&&this.splice(a=g,1);return a}function t(g){var x=[],b=g.match(/[^"']+?->|.+$/g),h=l(arguments,1),k=h.length+":"+g,c=a[k];if(!c){for(c=g.replace(d,"").match(/\b[a-z_$][\w$]*/ig)||[];1<b.length;)g=b.pop(),x=b.pop().match(/\w+/g)||[],q.apply(c,x),b.length&&b.push("function("+x+"){return("+g+")}"+(h[0]?".bind(this)":
""));g="return("+g+")";h[1]&&(b=e.keys(h.slice(1)).map(t("a->'__'+a")),x.unshift.apply(x,b),g="with("+b.join(")with(")+"){"+g+"}");h[0]&&(g="with(this){"+g+"}",c[0]&&(g="var "+c.uniq().join("='',")+"='';"+g));c=a[k]=Function(x,g)}return h.length?c.bind.apply(c,h):c}function k(g){function d(){!--a&&g&&g.call(this)}var a=1;d.wait=function(){a++;return d};return d}function n(){return!0}function m(){return!1}var f=Array.prototype,h=Function.prototype,b=String.prototype,u=e.prototype.hasOwnProperty,l=
h.call.bind(f.slice),a={},d=/(['\/"])(?:\\?.)*?\1|\b(?:false|in|new|null|this|true|void)\b|\.\w+|\w+:/g;h.partial=function(){var g=this,d=l(arguments);return function(){return g.apply(this,d.concat.apply(d,arguments))}};h.cache=function(g,d,b){function h(){var b=arguments,y=!!g||this instanceof h,f=d?d.apply(c,b):y+":"+b.length+":"+l(b);if(f in k)f=k[f];else{var m=k;if(y)var y=c,u=void 0,y=(u=b.length)?(a[u]||(a[u]=t("t a->new t(a["+e.keys(b).join("],a[")+"])")))(y,b):new y;else y=c.apply(this,b);
f=m[f]=y}return f}var c=h.origin=this,k=h.cached=b||{};h.extend=function(){return c.extend.apply(c,arguments).cache(g,d,b)};h.prototype=c.prototype;return h};h.extend=function(){function g(){return a.apply(this,arguments)}var d,a=this,b=0;for(g.prototype=e.create(a.prototype);d=arguments[b++];)e.merge(g.prototype,d);return g.prototype.constructor=g};e.each=function(g,d,a,b){if(g)for(b in g)u.call(g,b)&&d.call(a,g[b],b,g)};e.merge=function(g,d){for(var a,b=1;d=arguments[b++];)for(a in d)u.call(d,a)&&
(g[a]=d[a]);return g};e.values=function(g){return e.keys(g||{}).map(function(d){return g[d]})};e.clone=p;f.remove=q;f.each=f.forEach;f.fold=f.reduce;f.foldr=f.reduceRight;f.uniq=f.filter.partial(function(g,d,a){return d==a.indexOf(g)});f.pushUniq=function(d){return-1==this.indexOf(d)?this.push(d):!1};h.fn=function(){return this};b.fn=function(d){return t(this,d)};Boolean.prototype.fn=function(){return this.valueOf()?n:m};c.Fn=t;c.Fn.wait=k;c.Fn.hold=function(d){var a,b=this,h=[],l=[],c=k(function(){for(var d,
g=b,a=l.length;a--;a--)l[a]?b[l[a-1]]=l[a]:delete b[l[a-1]];for(;d=h[++a];)g=g[d].apply(g,h[++a])||g;h=l=null});d=d||b.syncMethods||[];for(a in b)"function"==typeof b[a]&&-1==d.indexOf(a)&&!function(d){l.push(d,u.call(b,d)&&b[d]);b[d]=function(){h.push(d,arguments);return b}}(a);b.wait=c.wait;return c}}(this,Object);
!function(c,e){var p=/("|')((?:\\?.)*?)\1|([YMD])\3\3\3?|([YMDHhmsWSZ])(\4?)|[uUASwoQ]/g,q=/(\d+)[-.\/](\d+)[-.\/](\d+)/,t=/(\d+):(\d+)(?::(\d+))?(\.\d+)?(?:\s*(?:(a)|(p))\.?m\.?)?(\s*(?:Z|GMT|UTC)?(?:([-+]\d\d):?(\d\d)?)?)?/i,k=/\\(.)/g,n={D:"Date",h:"Hours",m:"Minutes",s:"Seconds",S:"Milliseconds"};c[e].date=c[e].format=function(e,f){e=c.masks[e]||e||c.masks["default"];var h,b=this,t=+b,l="get"+("UTC:"==e.slice(0,4)?(e=e.slice(4),"UTC"):""),a=void 0==f?b._z:f;void 0!=a&&"get"==l&&(l="getUTC",b.setTime(t+
36E5*a),h=60*a);e=e.replace(p,function(d,g,a,e,f,m){a="Y"==e?b[l+"FullYear"]():e?c.names[b[l+("M"==e?"Month":"Day")]()+("DDD"==d?24:"D"==e?31:"MMM"==d?0:12)]:"Y"==f?b[l+"FullYear"]()%100:"W"==f?(g=new c(t+864E5*(4-(b[l+"Day"]()||7))),Math.ceil(((g.getTime()-g["s"+l.slice(1)+"Month"](0,1))/864E5+1)/7)):"M"==f?b[l+"Month"]()+1:"H"==f?b[l+"Hours"]()%12||12:"Z"==f?(g=h||"get"==l&&-b.getTimezoneOffset()||0,g?(0>g?(g=-g,"-"):"+")+(600>g?"0":"")+(0|g/60)+((g%=60)?(m?"":":")+g:""):"Z"):f?b[l+n[f]]():"u"==
d?b/1E3>>>0:"U"==d?t:"Q"==d?(b[l+"Month"]()/3|0)+1:"A"==d?c[11<b[l+"Hours"]()?"pm":"am"]:"w"==d?b[l+"Day"]()||7:"o"==d?(new c(t+864E5*(4-(b[l+"Day"]()||7))))[l+"FullYear"]():g?a.replace(k,"$1"):d;"SS"==d&&100>a&&(a="0"+a);return m&&10>a&&"Z"!=f?"0"+a:a});void 0!=h&&b.setTime(t);return e};c[e].tz=function(c){this._z=c;return this};c.am="AM";c.pm="PM";c.masks={"default":"DDD MMM DD YYYY hh:mm:ss",iso:"UTC:YYYY-MM-DD'T'hh:mm:ss'Z'"};c.names="JanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberSunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturday".match(/.[a-z]+/g);
String[e].date=Number[e].date=function(e,f,h){var b,k,l,a=new c,d=+this||""+this;if(isNaN(d)){if(b=d.match(q))k=99<b[1]?1:3,l=c.middleEndian?4-k:2,a.setFullYear(b[k],b[l]-1,b[6-l-k]);b=d.match(t)||[0,0,0];a.setHours(b[6]&&12>b[1]?+b[1]+12:b[5]&&12==b[1]?0:b[1],b[2],b[3]|0,1E3*b[4]|0);b[7]&&(h=(b[8]|0)+(b[9]|0)/(0>b[8]?-60:60))}else a.setTime(4294967296>d?1E3*d:d);void 0!=h&&a.setTime(a-6E4*(60*h+a.getTimezoneOffset()));return e?a.format(e,f):a}}(Date,"prototype");
!function(c,e){function p(c,k,n,m,f,h,b,u,l){m||(m="");if(k&&k.constructor==e)for(f in c&&c.constructor==e||(c={}),k){if(u!==(h=k[f])&&q.call(k,f)&&(u==h?u!==c[f]&&delete c[f]:c[f]!==h)){b=m+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1");if(l=n)l=c[f],l=!!l&&l.constructor==e;l=l&&n.length;u!=h&&(c[f]=p(c[f],h,n,b));!1!==l&&l==n.length||n.push(b)}}else c=k;return c}var q=e.prototype.hasOwnProperty;c.pointer=function(c,e,n){if(e){e=e.split("/");for(var m,f=2<arguments.length,h=1,b=e.length;c&&h<b;){m=
e[h++].replace(/~1/g,"/").replace(/~0/g,"~");if(f){if(h==b)return f=c[m],c[m]=n,f;c[m]&&"object"==typeof c[m]||(c[m]={})}c=c[m]}}return c};c.mergePatch=p}(JSON,Object);
!function(c,e){function p(d,a,b,c){var h=this._e||(this._e={});(h[d]||(h[d]=[])).unshift(b,c,a);return this}function q(d,a,b){var c=this._e&&this._e[d];if(c)if(a)for(d=c.length;d--;d--){if((c[d--]===a||c[d]===a)&&c[d-1]==b){c.splice(d-1,3);break}}else c.length=0;return this}function t(d,a,b){function c(){h.non(d,a,b).non(d,c,b)}var h=this;return h.on(d,c,b).on(d,a,b)}function k(){this.returnValue=!1}function n(){this.cancelBubble=this.cancel=!0}var m=c.Event||(c.Event={}),f=120,h="addEventListener",
b="removeEventListener",u=c[h]?"":(h="attachEvent",b="detachEvent","on"),l=m.fixEv={wheel:"onwheel"in e?"wheel":"onmousewheel"in e?"mousewheel":"DOMMouseScroll"},a=m.fixFn={wheel:function(d,a){return function(b){var c=(b.wheelDelta||-b.detail||-b.deltaY)/f;if(c){if(1>c&&-1<c){var h=(0>c?-1:1)/c,c=c*h;f/=h}a.call(d,b,c)}}}};m.Emitter={on:p,non:q,off:q,once:t,one:t,emit:function(d){var a,b;if(d=this._e&&this._e[d])for(d=d.slice(),b=d.length,a=d.slice.call(arguments,1);b--;)d[b--].apply(d[--b]||this,
a);return this}};m.add=function(d,b,e){var f=a[b]&&a[b](d,e)||e,m=u?function(){var a=c.event;a&&(a.target=a.srcElement,a.preventDefault=k,a.stopPropagation=n);f.call(d,a)}:f;d[h](u+(l[b]||b),m,!1);p.call(d,b,m,d,e)};m.remove=function(a,c,h){var e=a._e&&a._e[c];if(h=e&&e.indexOf(h))a[b](u+(l[c]||c),e[h+1]),e.splice(h-1,3)};m.stop=function(a){a.preventDefault&&(a.stopPropagation(),a.preventDefault());return!1};m.removeAll=function(a,b,c){if(a._e)for(c in a._e)b&&c!==b||m.remove(a,c)}}(this,document);
!function(c){function e(c,e,n){for(var m,f,h=0,b=c.target||c.srcElement,u=/INPUT|TEXTAREA|SELECT/i.test((3==b.nodeType?b.parentNode:b).tagName);f=p[h++];){if(!u||f.enable_input)m=f[e]||f[n]||f.num&&47<e&&58>e&&(n|=0,f.num)||f.all;if(m||!f.bubble)break}m&&m(c,n,b)}var p=[],q={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"caps",27:"esc",33:"pgup",34:"pgdown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",112:"f1",113:"f2",114:"f3",115:"f4",
116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"};c.setKeyMap=p.unshift.bind(p);c.rmKeyMap=function(c){c=p.indexOf(c||p[0]);-1<c&&p.splice(c,1)};c.add(document,"keydown",function(e){8==(e.keyCode||e.which)&&p[0]&&p[0].backspace&&c.stop(e)});c.add(document,"keyup",function(c){var k=c.keyCode||c.which;95<k&&106>k&&(k-=48);var n=q[k]||String.fromCharCode(k)||k;e(c,k,n);c.ctrlKey&&17!=k&&e(c,k,"ctrl+"+n);c.altKey&&18!=k&&e(c,k,"alt+"+n)})}(Event);
!function(c,e,p){function q(a){a=(a||b).href.split("#")[1]||"";a=decodeURIComponent(a.replace(/\+/g," "));return a.replace(u,"")}function t(a,c){a=encodeURIComponent(a).replace(/%20/g,"+").replace(/%2F/gi,"/");b[c?"replace":"assign"]("#"+a);if(f&&q()!==q(f.location))f.location[c?"replace":f.document.open().close(),"assign"]("#"+a);k()}function k(){m!=(m=q())&&n&&n(m)}var n,m,f,h,b=location,u=/^[#\/\!]+|[\s\/]+$/g,l=!+"\v1"&&8>(e.documentMode||1);p.getUrl=q;p.setUrl=t;p.start=function(a,b){n||("onhashchange"in
c&&!l?c.onhashchange=k:(l&&(f=e.body.appendChild(e.createElement('<iframe class="hide" tabindex="-1">')).contentWindow),setInterval(function(){var a=q();f&&h===a&&(a=q(f.location));h!==a&&(h=a,f?t(a):k())},60)));n=a;k()}}(this,document,history);
!function(c,e,p){function q(a,b,c){for(var d=[],g=a.firstChild,h=t(b);b=g;){if(h(b)){if(c)return b;d.push(b)}for(g=b.firstChild||b.nextSibling;!g&&(b=b.parentNode)!==a;)g=b.nextSibling}return c?null:d}function t(a){return L[a]||(L[a]=Function("_,v,a,b","return "+a.split(T).map(function(a){var b,c,v=["_&&_.nodeType==1"],d=a.replace(U,function(a,v,d,g){c=g+v.length;b=v.trim();return""});(a=a.slice(c).replace(M,function(a,b,c,d,g,h,e){v.push("((v='"+(d||(e?h.slice(1,-1):h)||"").replace(/'/g,"\\'")+"'),(a='"+
c+"'),1)",N[":"==b?c:b]||"(a=_.getAttribute(a))"+(g?"&&"+N[g]:h?"==v":""));return""}))&&"*"!=a&&(v[0]+="&&_.nodeName=='"+a.toUpperCase()+"'");d&&v.push("+"==b?"(a=_.previousSibling)":"(a=_.parentNode)",(b?"a.matches&&a.matches('":"a.closest&&a.closest('")+d+"')");return v.join("&&")}).join("||")))}function k(a,b,c){var d={};a=a.replace(M,function(a,b,c,v,g,h,e){h=e?h.slice(1,-1):h||c;d[b="."==b?(g="~","class"):"#"==b?"id":c]=g&&d[b]?"^"==g?h+d[b]:d[b]+("~"==g?" ":"")+h:h;return""})||"div";a=(F[a]||
(F[a]=e.createElement(a))).cloneNode(!0).attr(d);return c||!b?a:("object"==typeof b?l:n).call(a,b)}function n(a,b){var c,d=0,g=typeof a;if(a){if("string"==g||"number"==g)a=e.createTextNode(a);else if(!("nodeType"in a)&&"length"in a){g=a.length;for(c=e.createDocumentFragment();d<g;)n.call(c,a[d++]);a=c}a.nodeType&&(g=this.insertBefore?this:this[this.length-1],g.insertBefore(a,(!0===b?g.firstChild:"number"==typeof b?g.childNodes[0>b?g.childNodes.length-b-2:b]:b)||null))}return this}function m(a){return-1<
this.className.split(/\s+/).indexOf(a)}function f(a){var b=this.className;b&&(a=m.call(this,a)?b:b+" "+a);b!=a&&(this.className=a);return this}function h(a){m.call(this,a)&&(this.className=(" "+this.className+" ").replace(" "+a+" "," ").trim());return this}function b(a,b){1==arguments.length&&(b=!m.call(this,a));return(b?f:h).call(this,a),b}function u(){var b;this.emit&&this.emit("kill");this.parentNode&&this.parentNode.removeChild(this);Event.removeAll&&Event.removeAll(this);this.empty&&this.empty();
(b=this.attr&&this.attr("data-scope"))&&delete a[b];this.valObject&&(this.valObject=null);return this}function l(a,b){var c;if(a&&a.constructor==Object){for(b in a)l.call(this,b,a[b]);return this}c=this.getAttribute(a);if(1==arguments.length)return c;!V||"id"!=a&&"name"!=a&&"checked"!=a?"class"==a?f.call(this,b):b||0===b?c!=b&&this.setAttribute(a,b):c&&this.removeAttribute(a):this.mergeAttributes(O("<INPUT "+a+'="'+b+'">'),!1)}function a(b,c,d){if(d=a[l.call(b,"data-scope")])return d;c&&!0!==c||(d=
(d=g.call(b,"[data-scope]"))&&a[l.call(d,"data-scope")]||P);c&&(l.call(b,"data-scope",++Q),d=a[Q]=Object.create(c=d||c),d._super=c);return d}function d(b,h){var e,f,k;if(1!=this.nodeType)return this;b=a[l.call(this,"data-scope")]||b||(e=g.call(this,"[data-scope]"))&&a[l.call(e,"data-scope")]||P;if(e=!h&&l.call(this,"data-bind")){f=e;k="data b r->data&&("+e.replace(W,function(a,b,c){return z[b]?(X.call(z[b],"once")&&(f=f.replace(a,"")),"(r=b['"+b+"'].call(this,"+(z[b].raw?"data,'"+c+"'":c)+")||r),"):
"this.attr('"+b+"',"+c+"),"})+"r)";e!=f&&l.call(this,"data-bind",f);try{if(Fn(k,this,b)(b,z))return this}catch(m){m.message+=" in binding: "+e;console.error(m);if(c.onerror)c.onerror(m.message,m.fileName,m.lineNumber);return this}}for(e=this.firstChild;e;e=f)f=e.nextSibling,d.call(e,b);G&&"SELECT"==this.nodeName&&this.parentNode.insertBefore(this,this);return this}function g(a){for(var b=this;b;b=b.parentNode)if(b.matches&&b.matches(a))return b;return null}function x(a){for(var b=this.length=a.length;b--;)this[b]=
a[b]}function y(a){function b(a,c,e,h,v,f){for(v=c.length;v<=g[0];)g.shift(),d=d.plugin?d.plugin.done():d.parentNode||d[0].parentNode;d.txtMode?d.txt+=a+"\n":e?k.plugins[h]?(d=(new k.plugins[h](d,f)).el,g.unshift(v)):d.append(a):(h&&(d=k(h,0,1).to(d),g.unshift(v)),f&&(v=f.charAt(0),h=f.slice(1),">"==v?(c+" "+h).replace(R,b):"|"==v||"\\"==v?d.append(h):"/"!=v&&("&"!=v&&(h=("INPUT"==d.tagName?"val":"txt")+":_('"+f.replace(/'/g,"\\'")+"').format(data)"),v=l.call(d,"data-bind"),l.call(d,"data-bind",(v?
v+";":"")+h))))}var c=e.createDocumentFragment(),d=c,g=[-1];a.replace(R,b);c=c.childNodes;return 1==c.length?c[0]:c}function D(a,b){this.name=b;this.parent=a;this.el=k("div");this.el.plugin=this}function C(a){this.txtMode=this.parent=a;this.txt="";this.plugin=this.el=this}function w(a,b){b=w[E(b)||A];return b[a]||b[a=a.slice(a.indexOf(":")+1)||a]||a}function E(a){return a&&(w[a=(""+a).toLowerCase()]||w[a=a.split("-")[0]])&&a}function J(a){(a=E(a))&&A!=a&&(w[A=w.current=a]=w[A]||{});return A}function K(a,
b){-1==w.list.indexOf(a)&&w.list.push(a);Object.merge(w[a]||(w[a]={}),b);A||J(a)}var A,B,G=!+"\v1",V=G&&8>(e.documentMode|0),X=Object[p].hasOwnProperty,H=[],S=e.body,O=e.createElement,I="textContent"in S?"textContent":"innerText",F=k.cache={},Q=0,P=k.data={_:w},r=(c.HTMLElement||c.Element||k)[p],R=/^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w\:.#\[\]=])*)[ \t]*(.*?)$/gm,W=/[;\s]*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g,z=k.bindings={"class":function(a,c){b.call(this,a,2>arguments.length||c)},
css:function(a,b){this.style[a.camelCase()]=b||""},data:function(a,b){this.attr("data-"+a,b)},html:function(a){this.innerHTML=a}},M=/([.#:[])([-\w]+)(?:\((.+?)\)|([~^$*|]?)=(("|')(?:\\?.)*?\6|[-\w]+))?]?/g,U=/([\s>+]*)(?:("|')(?:\\?.)*?\2|\(.+?\)|[^\s+>])+$/,T=/\s*,\s*(?=(?:[^'"()]|"(?:\\?.)*?"|'(?:\\?.)*?'|\(.+?\))+$)/,L={},N={"first-child":"(a=_.parentNode)&&a.firstChild==_","last-child":"(a=_.parentNode)&&a.lastChild==_",".":"~_.className.split(/\\s+/).indexOf(a)","#":"_.id==a","^":"a.indexOf(v)==0",
"|":"a.split('-')[0]==v",$:"a.slice(-v.length)==v","~":"~a.split(/\\s+/).indexOf(v)","*":"~a.indexOf(v)"};c.El=k;r.append=n;r.after=function(a,b){n.call(a.parentNode,this,b?a:a.nextSibling);return this};r.to=function(a,b){n.call(a,this,b);return this};r.hasClass=m;r.addClass=f;r.rmClass=h;r.toggleClass=b;r.empty=function(){for(var a;a=this.firstChild;)u.call(a);return this};r.kill=u;r.on=function(a,b){Event.add(this,a,b);return this};r.non=function(a,b){Event.remove(this,a,b);return this};r.emit=
function(){Event.Emitter.emit.apply(this,arguments)};r.attr=l;k.scope=a;r.render=d;r.txt=z.txt=function(a){return arguments.length&&this[I]!=a?this[I]=a:this[I]};r.val=z.val=function(a){var b=this,c=b.type,d=b.options;if(arguments.length)return b.value=a;if(d){if("select-multiple"==c){a=[];for(c=0;b=d[c++];)b.selected&&!b.disabled&&a.push(b.valObject||b.value);return a}b=d[b.selectedIndex]||b}return"checkbox"!=c&&"radio"!=c||b.checked?b.valObject||b.value:null};r.matches||(r.matches=function(a){return!!t(a)(this)});
r.closest||(r.closest=g);r.find=!G&&r.querySelector||function(a){return q(this,a,!0)};r.findAll=r.querySelectorAll?function(a){return new x(this.querySelectorAll(a))}:function(a){return new x(q(this,a))};k.wrap=x;x[p]=Object.keys(r).reduce(function(a,b){function c(){for(var a,d=0,g=this.length;d<g;)if(a=r[b].apply(this[d++],arguments),c.first&&a)return a;return c.first?null:this}a[b]=c;return a},H);H.find.first=1;H.cloneNode=function(a){return new x(this.map(function(b){return b.cloneNode(a)}))};
r==k[p]&&(e.createElement=function(a){return Object.merge(O(a),r)},Object.merge(S,r));k[p]=r;k.get=function(a){"string"==typeof a&&(a=e.getElementById(a));return a&&a.to?a:Object.merge(a,r)};k.css=function(a){B||(B=k("style").to(e.getElementsByTagName("head")[0]));B.styleSheet?B.styleSheet.cssText+=a:B.appendChild(e.createTextNode(a))};D[p]={_done:function(){var a=1<this.el.childNodes.length?new x(this.el.childNodes):this.el.firstChild;this.el.plugin=this.el=this.parent=null;return a},done:function(){var a=
this.parent;F[this.name]=this._done();return a}};C[p].done=Fn("Function(this.txt)(),this.parent");k.plugins={binding:C.extend({done:function(){Object.merge(z,Function("return({"+this.txt+"})")());return this.parent}}),css:C.extend({done:Fn("El.css(this.txt),this.parent")}),js:C,template:D};k.create=k.tpl=y;k.include=function(a,b,c){b=k.get(a);(new D(null,a)).el.append(y(b.innerHTML)).plugin.done();b.kill()};k.i18n=w;w.list=[];w.get=E;w.use=J;w.add=K;w.def=function(a){Object.each(a,function(b,c){K(c,
a)})};String[p].lang=function(a){return w(this,a)}}(window,document,"prototype");
!function(c){function e(c,b,e,f,a){c=+c;var d=0;for(f=f||{"default":"{0} {1}{2}"};c>=b[d];)c/=b[d++];if(d==b.length&&a)return a(this);d=e[d];return(f[2>c?d:d+"s"]||f["default"]).format({0:c,1:d,2:2>c?"":"s"})}var p=Array[c],q=Number[c];c=String[c];var t=/{(?!\\)((?:(["'/])(?:\\?.)*?\2|[^}])*)}/g,k=/\|\s*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^|])*))?/g,n=/^\s*\d+/,m=/-?\d+\.?\d*/g,f=/{\\/g;c.format=function(){var c=p.slice.call(arguments);c.unshift(0);return this.replace(t,function(b,e){c[0]=e.replace(n,
"this[$&]").replace(k,".$1($2)");return Fn.apply(null,c)()}).replace(f,"{")};q.format=function(c){return""+this};c.safe=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;")};c.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};c.camelCase=function(){return this.replace(/[ _-]+([a-z])/g,function(c,b){return b.toUpperCase()})};c.lower=c.toLowerCase;c.upper=c.toUpperCase;q.step=function(c,b){var e=(""+c).split("."),f=this/
c,f=~~(f+(void 0==b?.5:1===b&&f==(f|0)?0:+b))*c;return""+(1 in e?f.toFixed(e[1].length):f)};c.step=function(c,b){return this.replace(m,function(e){return(+e).step(c,b)})};q.scale=function(){return e(this,[1E3,1E3,1E3],["","k","M","G"],{"default":"{0}{1}"})};c.scale=function(){return this.replace(m,function(c){return(+c).scale()})};c.pick=q.pick=function(){for(var c=this+"=",b,e=arguments,f=0,a=e.length;f<a;)b=e[f++],0==b.indexOf(c)&&(b=b.slice(c.length),f=a);return b.replace("#",this)};c.plural=q.plural=
function(){return arguments[+Fn("n->"+(String.plural||"n!=1"))(parseFloat(this))].replace("#",this)};p.pluck=function(c){for(var b=this.length,e=[];b--;)e[b]=this[b][c];return e};Number.words=e}("prototype");
!function(c){function e(a,c,g,l){if(f[a])return c&&f[a].init(c,g,l),f[a];if(!(this instanceof e))return new e(a,c,g,l);f[this.route=a]=this;this.init(c,g,l);if("#"!=a.charAt(0)){c=h++;var k=["o._r='"+a+"'"];a=a.replace(u,function(a,c){return c?k.push("o['"+c+"']=a["+h++ +"]")&&"([^/]+?)":a.replace(b,"\\$&")});n+=(n?"||":"")+"(o._u=a["+c+"])&&("+k+")";m+=(m?"|":"")+"("+a+")";p=new Function("o,a","return a&&("+n+"),o");q=new RegExp("^\\/?(?:"+m+")[\\/\\s]*$")}}var p,q,t,k,n="",m="",f={},h=1,b=/[.*+?^=!:${}()|\[\]\/\\]/g,
u=/\{([\w%.]+?)\}|.[^{\\]*?/g;e.prototype={init:function(a,b,c){this.el=a;this.parent="string"==typeof b?e(b):b;this.selector=c},show:function(a){var b,c=t=this;El.data.viewOpts=a=a||{};a._r=c.route;for(c.open&&c.close(a);c;b=c,c=c.parent)c.child&&c.child!=b&&c.child.close(a),c.child=b;b.ping(k=a)},close:function(a,b){this.open&&(this.emit("close",a,b),this.child&&this.child.close(a),this.open.kill(),this.open=this.parent.child=null)},wait:function(a,b){var c=this,f=c.parent;a._p=1+(a._p|0);return function(){--a._p||
k!=a||(c.el&&c.parent==f?c.ping(a,!b):(c.el?t:e("404")).show(a))}},ping:function(a,b){var c=this.parent,f=this.child;if(!this.el&&this.file)return xhr.load(this.file.replace(/^|,/g,"$&"+(e.base||"")).split(","),this.wait(a,1));b||this.emit("ping",a);if(k==a&&!a._p){var h=typeof this.el;"function"==h?this.el=this.el():"string"==h&&(this.el=El.tpl(this.el));c&&!this.open&&(this.open=this.el.cloneNode(!0),c.emit("beforeChild",a),this.open.to(c.selector&&c.open&&c.open.find(c.selector)||c.open||c.el),
this.open.render());f&&f.ping(a)}k!=a||a._p||this.route!=a._r||(this.emit("show",a),e.emit("show",a))}};Object.merge(e,Event.Emitter);Object.merge(e.prototype,Event.Emitter);e.home="home";e.show=function(a){a=p({_r:"404"},q.exec(a||e.home));var b=e(a._r);b.open&&b._u==a._u||(b._u=a._u,b.show(El.data.route=a))};e.def=function(a){for(var b,c=/(\S+) (\S+)/g;b=c.exec(a);)b[2].split(",").map(function(a){e(a).file=b[1]})};c.View=e;El.plugins.view=El.plugins.template.extend({done:function(){var a=this.parent,
b=this.name.split(/\s+/);e(b[0],this._done(),b[1],b[2]);return a}});var l=El("div");El.plugins["view-link"]=El.plugins.template.extend({done:function(){var a=this.name.split(/\s+/);e(a[0],l,a[2]).on("show",function(){e.show(a[1])});return this.parent}})}(this);
!function(c){function e(c){return c.apply(this,f.call(arguments,1))}function p(c){if(!c)return this.kill()}function q(c,b,e,f){if("string"==typeof b){var a=b;b=function(b){Mediator.emit(a,b,this,e,f)}}this.on(c,b)}function t(c){return this.render(Object.merge(El.scope(this,!0),c))}function k(c,b,e,f,a){this.on("submit",function(d){var g=JSON.serializeForm(this);Mediator.emit(c,d,g,b,e,f,a);return!1})}function n(c,b){var e,f=this._childs;if(!f)for(this._childs=f=[];e=this.firstChild;)f.push(e),this.removeChild(e);
e=f[0];f=/^\s*(\w+) in (\w*)(.*)/.exec(b);f="with(data){var out=[],loop={i:0,offset:0},_1,_2="+f[2]+f[3].replace(/ (limit|offset):\s*(\d+)/ig,";loop.$1=$2")+";if(_2)for(_1 in _2)if(hasOwn.call(_2,_1)&&!(loop.offset&&loop.offset--)){loop.i++;if(loop.limit&&loop.i-loop.offset>loop.limit)break;var clone=el.cloneNode(true),scope=El.scope(clone,data);scope.loopKey=loop.key=_1;scope.loop=loop;scope."+f[1]+"=_2[_1];out.push(clone);};return out}";e=Function("hasOwn,el,data",f)(m,e,c);this.empty().append(e).render();
return this}var m=Object.prototype.hasOwnProperty,f=Array.prototype.slice;e.once=p.once=t.once=q.once=k.once=n.raw=n.once=!0;c.fn=e;c["if"]=p;c.on=q;c["with"]=t;c.emitForm=k;c.each=n}(El.bindings);
/*! litejs.com/MIT-LICENSE.txt */
!function(f,g){function q(d,e,a){if(d&&d.constructor===g){e={};for(a in d)n.call(d,a)&&(e[a]=q(d[a]));d=e}return d}function r(){for(var d=this.length,e=l(arguments),a=-1;d--;)~e.indexOf(this[d])&&this.splice(a=d,1);return a}function c(d){var b=[],v=d.match(/[^"']+?->|.+$/g),h=l(arguments,1),n=h.length+":"+d,f=a[n];if(!f){for(f=d.replace(e,"").match(/\b[a-z_$][\w$]*/ig)||[];1<v.length;)d=v.pop(),b=v.pop().match(/\w+/g)||[],r.apply(f,b),v.length&&v.push("function("+b+"){return("+d+")}"+(h[0]?".bind(this)":
""));d="return("+d+")";h[1]&&(v=g.keys(h.slice(1)).map(c("a->'__'+a")),b.unshift.apply(b,v),d="with("+v.join(")with(")+"){"+d+"}");h[0]&&(d="with(this){"+d+"}",f[0]&&(d="var "+f.uniq().join("='',")+"='';"+d));f=a[n]=Function(b,d)}return h.length?f.bind.apply(f,h):f}function p(d){function e(){!--a&&d&&d.call(this)}var a=1;e.wait=function(){a++;return e};return e}function t(){return!0}function k(){return!1}var m=Array.prototype,h=Function.prototype,b=String.prototype,n=g.prototype.hasOwnProperty,l=
h.call.bind(m.slice),a={},e=/(['\/"])(?:\\?.)*?\1|\b(?:false|in|new|null|this|true|void)\b|\.\w+|\w+:/g;h.partial=function(){var d=this,e=l(arguments);return function(){return d.apply(this,e.concat.apply(e,arguments))}};h.cache=function(d,e,b){function h(){var b=arguments,v=!!d||this instanceof h,k=e?e.apply(f,b):v+":"+b.length+":"+l(b);if(k in n)k=n[k];else{var m=n;if(v)var v=f,p=void 0,v=(p=b.length)?(a[p]||(a[p]=c("t a->new t(a["+g.keys(b).join("],a[")+"])")))(v,b):new v;else v=f.apply(this,b);
k=m[k]=v}return k}var f=h.origin=this,n=h.cached=b||{};h.extend=function(){return f.extend.apply(f,arguments).cache(d,e,b)};h.prototype=f.prototype;return h};h.extend=function(){function d(){return a.apply(this,arguments)}var e,a=this,b=0;for(d.prototype=g.create(a.prototype);e=arguments[b++];)g.merge(d.prototype,e);return d.prototype.constructor=d};g.each=function(d,e,a,b){if(d)for(b in d)n.call(d,b)&&e.call(a,d[b],b,d)};g.merge=function(d,e){for(var a,b=1;e=arguments[b++];)for(a in e)n.call(e,a)&&
(d[a]=e[a]);return d};g.values=function(d){return g.keys(d||{}).map(function(e){return d[e]})};g.clone=q;m.remove=r;m.each=m.forEach;m.fold=m.reduce;m.foldr=m.reduceRight;m.uniq=m.filter.partial(function(d,e,a){return e==a.indexOf(d)});m.pushUniq=function(d){return-1==this.indexOf(d)?this.push(d):!1};h.fn=function(){return this};b.fn=function(d){return c(this,d)};Boolean.prototype.fn=function(){return this.valueOf()?t:k};f.Fn=c;f.Fn.wait=p;f.Fn.hold=function(d){var e,a=this,b=[],h=[],c=p(function(){for(var e,
d=a,c=h.length;c--;c--)h[c]?a[h[c-1]]=h[c]:delete a[h[c-1]];for(;e=b[++c];)d=d[e].apply(d,b[++c])||d;b=h=null});d=d||a.syncMethods||[];for(e in a)"function"==typeof a[e]&&-1==d.indexOf(e)&&!function(e){h.push(e,n.call(a,e)&&a[e]);a[e]=function(){b.push(e,arguments);return a}}(e);a.wait=c.wait;return c}}(this,Object);
!function(f,g){var q=/("|')((?:\\?.)*?)\1|([YMD])\3\3\3?|([YMDHhmsWSZ])(\4?)|[uUASwoQ]/g,r=/(\d+)[-.\/](\d+)[-.\/](\d+)/,c=/(\d+):(\d+)(?::(\d+))?(\.\d+)?(?:\s*(?:(a)|(p))\.?m\.?)?(\s*(?:Z|GMT|UTC)?(?:([-+]\d\d):?(\d\d)?)?)?/i,p=/\\(.)/g,t={D:"Date",h:"Hours",m:"Minutes",s:"Seconds",S:"Milliseconds"};f[g].date=f[g].format=function(c,g){c=f.masks[c]||c||f.masks["default"];var h,b=this,n=+b,l="get"+("UTC:"==c.slice(0,4)?(c=c.slice(4),"UTC"):""),a=void 0==g?b._z:g;void 0!=a&&"get"==l&&(l="getUTC",b.setTime(n+
36E5*a),h=60*a);c=c.replace(q,function(e,d,a,c,g,k){a="Y"==c?b[l+"FullYear"]():c?f.names[b[l+("M"==c?"Month":"Day")]()+("DDD"==e?24:"D"==c?31:"MMM"==e?0:12)]:"Y"==g?b[l+"FullYear"]()%100:"W"==g?(d=new f(n+864E5*(4-(b[l+"Day"]()||7))),Math.ceil(((d.getTime()-d["s"+l.slice(1)+"Month"](0,1))/864E5+1)/7)):"M"==g?b[l+"Month"]()+1:"H"==g?b[l+"Hours"]()%12||12:"Z"==g?(d=h||"get"==l&&-b.getTimezoneOffset()||0,d?(0>d?(d=-d,"-"):"+")+(600>d?"0":"")+(0|d/60)+((d%=60)?(k?"":":")+d:""):"Z"):g?b[l+t[g]]():"u"==
e?b/1E3>>>0:"U"==e?n:"Q"==e?(b[l+"Month"]()/3|0)+1:"A"==e?f[11<b[l+"Hours"]()?"pm":"am"]:"w"==e?b[l+"Day"]()||7:"o"==e?(new f(n+864E5*(4-(b[l+"Day"]()||7))))[l+"FullYear"]():d?a.replace(p,"$1"):e;"SS"==e&&100>a&&(a="0"+a);return k&&10>a&&"Z"!=g?"0"+a:a});void 0!=h&&b.setTime(n);return c};f[g].tz=function(c){this._z=c;return this};f.am="AM";f.pm="PM";f.masks={"default":"DDD MMM DD YYYY hh:mm:ss",iso:"UTC:YYYY-MM-DD'T'hh:mm:ss'Z'"};f.names="JanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberSunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturday".match(/.[a-z]+/g);
String[g].date=Number[g].date=function(g,p,h){var b,n,l,a=new f,e=+this||""+this;if(isNaN(e)){if(b=e.match(r))n=99<b[1]?1:3,l=f.middleEndian?4-n:2,a.setFullYear(b[n],b[l]-1,b[6-l-n]);b=e.match(c)||[0,0,0];a.setHours(b[6]&&12>b[1]?+b[1]+12:b[5]&&12==b[1]?0:b[1],b[2],b[3]|0,1E3*b[4]|0);b[7]&&(h=(b[8]|0)+(b[9]|0)/(0>b[8]?-60:60))}else a.setTime(4294967296>e?1E3*e:e);void 0!=h&&a.setTime(a-6E4*(60*h+a.getTimezoneOffset()));return g?a.format(g,p):a}}(Date,"prototype");
!function(f,g){function q(c,f,t,k,m,h,b,n,l){k||(k="");if(f&&f.constructor==g)for(m in c&&c.constructor==g||(c={}),f){if(n!==(h=f[m])&&r.call(f,m)&&(n==h?n!==c[m]&&delete c[m]:c[m]!==h)){b=k+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1");if(l=t)l=c[m],l=!!l&&l.constructor==g;l=l&&t.length;n!=h&&(c[m]=q(c[m],h,t,b));!1!==l&&l==t.length||t.push(b)}}else c=f;return c}var r=g.prototype.hasOwnProperty;f.pointer=function(c,f,g){if(f){f=f.split("/");for(var k,m=2<arguments.length,h=1,b=f.length;c&&h<b;){k=
f[h++].replace(/~1/g,"/").replace(/~0/g,"~");if(m){if(h==b)return m=c[k],c[k]=g,m;c[k]&&"object"==typeof c[k]||(c[k]={})}c=c[k]}}return c};f.mergePatch=q}(JSON,Object);
!function(f,g){function q(e,d,a,c){var b=this._e||(this._e={});(b[e]||(b[e]=[])).unshift(a,c,d);return this}function r(e,d,a){var b=this._e&&this._e[e];if(b)if(d)for(e=b.length;e--;e--){if((b[e--]===d||b[e]===d)&&b[e-1]==a){b.splice(e-1,3);break}}else b.length=0;return this}function c(e,d,a){function b(){c.non(e,d,a).non(e,b,a)}var c=this;return c.on(e,b,a).on(e,d,a)}function p(){this.returnValue=!1}function t(){this.cancelBubble=this.cancel=!0}var k=f.Event||(f.Event={}),m=120,h="addEventListener",
b="removeEventListener",n=f[h]?"":(h="attachEvent",b="detachEvent","on"),l=k.fixEv={wheel:"onwheel"in g?"wheel":"onmousewheel"in g?"mousewheel":"DOMMouseScroll"},a=k.fixFn={wheel:function(e,d){return function(a){var b=(a.wheelDelta||-a.detail||-a.deltaY)/m;if(b){if(1>b&&-1<b){var c=(0>b?-1:1)/b,b=b*c;m/=c}d.call(e,a,b)}}}};k.Emitter={on:q,non:r,off:r,once:c,one:c,emit:function(e){var a,b;if(e=this._e&&this._e[e])for(e=e.slice(),b=e.length,a=e.slice.call(arguments,1);b--;)e[b--].apply(e[--b]||this,
a);return this}};k.add=function(e,d,b){var c=a[d]&&a[d](e,b)||b,g=n?function(){var a=f.event;a&&(a.target=a.srcElement,a.preventDefault=p,a.stopPropagation=t);c.call(e,a)}:c;e[h](n+(l[d]||d),g,!1);q.call(e,d,g,e,b)};k.remove=function(a,d,c){var h=a._e&&a._e[d];if(c=h&&h.indexOf(c))a[b](n+(l[d]||d),h[c+1]),h.splice(c-1,3)};k.stop=function(a){a.stopPropagation();a.preventDefault();return!1};k.removeAll=function(a,b,c){if(a._e)for(c in a._e)b&&c!==b||k.remove(a,c)}}(this,document);
!function(){function f(c,f){for(var g,k,m=0,h=c.target||c.srcElement,b=/INPUT|TEXTAREA|SELECT/i.test((3==h.nodeType?h.parentNode:h).tagName);k=q[m++];){if(!b||k.enable_input)g=k[f]||(k.num&&"/"<f&&":">f?(f|=0,k.num):k.all);if(g||!k.bubble)break}g&&g(c,f,h)}function g(c){c=c.keyCode||c.which;95<c&&106>c&&(c-=48);return r[c]||String.fromCharCode(c)||c}var q=[],r={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"caps",27:"esc",33:"pgup",34:"pgdown",35:"end",36:"home",37:"left",
38:"up",39:"right",40:"down",45:"ins",46:"del",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"};Event.setKeyMap=function(c){q.unshift(c)};Event.rmKeyMap=function(c){c=q.indexOf(c||q[0]);-1<c&&q.splice(c,1)};Event.add(document,"keydown",function(c){"backspace"==g(c)&&q[0]&&q[0].backspace&&Event.stop(c)});Event.add(document,"keyup",function(c){var p=g(c);f(c,p);c.ctrlKey&&"ctrl"!=p&&f(c,"ctrl+"+p);c.altKey&&"alt"!=p&&f(c,"alt+"+p)})}();
!function(f,g,q){function r(a){a=(a||b).href.split("#")[1]||"";a=decodeURIComponent(a.replace(/\+/g," "));return a.replace(n,"")}function c(a,e){a=encodeURIComponent(a).replace(/%20/g,"+").replace(/%2F/gi,"/");b[e?"replace":"assign"]("#"+a);if(m&&r()!==r(m.location))m.location[e?"replace":m.document.open().close(),"assign"]("#"+a);p()}function p(){k!=(k=r())&&t&&t(k)}var t,k,m,h,b=location,n=/^[#\/\!]+|[\s\/]+$/g,l=!+"\v1"&&8>(g.documentMode||1);q.getUrl=r;q.setUrl=c;q.start=function(a,b){t||("onhashchange"in
f&&!l?f.onhashchange=p:(l&&(m=g.body.appendChild(g.createElement('<iframe class="hide" tabindex="-1">')).contentWindow),setInterval(function(){var a=r();m&&h===a&&(a=r(m.location));h!==a&&(h=a,m?c(a):p())},60)));t=a;p()}}(this,document,history);
!function(f,g,q){function r(a){return H[a]||(H[a]=Function("_,v,a,b","return "+a.split(O).map(function(a){var b,e,d=["_&&_.nodeType==1"],w=a.replace(P,function(a,d,w,c){e=c+d.length;b=d.trim();return""});(a=a.slice(e).replace(I,function(a,b,e,w,c,h,f){d.push("((v='"+(w||(f?h.slice(1,-1):h)||"").replace(/'/g,"\\'")+"'),(a='"+e+"'),1)",J[":"==b?e:b]||"(a=_.getAttribute(a))"+(c?"&&"+J[c]:h?"==v":""));return""}))&&"*"!=a&&(d[0]+="&&_.nodeName=='"+a.toUpperCase()+"'");w&&d.push("+"==b?"(a=_.previousSibling)":
"(a=_.parentNode)",(b?"a.matches&&a.matches('":"a.closest&&a.closest('")+w+"')");return d.join("&&")}).join("||")))}function c(a,b,e){var d={};a=a.replace(I,function(a,b,e,c,w,h,f){h=f?h.slice(1,-1):h||e;d[b="."==b?(w="~","class"):"#"==b?"id":e]=w&&d[b]?"^"==w?h+d[b]:d[b]+("~"==w?" ":"")+h:h;return""})||"div";a=(D[a]||(D[a]=g.createElement(a))).cloneNode(!0).attr(d);return e||!b?a:("object"==typeof b?n:p).call(a,b)}function p(a,b){var e,d=0,c=typeof a;if(a){if("string"==c||"number"==c)a=g.createTextNode(a);
else if(!("nodeType"in a)&&"length"in a){c=a.length;for(e=g.createDocumentFragment();d<c;)p.call(e,a[d++]);a=e}a.nodeType&&(c=this.insertBefore?this:this[this.length-1],c.insertBefore(a,(!0===b?c.firstChild:"number"==typeof b?c.childNodes[0>b?c.childNodes.length-b-2:b]:b)||null))}return this}function t(a){return-1<this.className.split(/\s+/).indexOf(a)}function k(a){var b=this.className;b&&(a=t.call(this,a)?b:b+" "+a);b!=a&&(this.className=a);return this}function m(a){t.call(this,a)&&(this.className=
(" "+this.className+" ").replace(" "+a+" "," ").trim());return this}function h(a,b){1==arguments.length&&(b=!t.call(this,a));return(b?k:m).call(this,a),b}function b(){var a;this.emit&&this.emit("kill");this.parentNode&&this.parentNode.removeChild(this);Event.removeAll&&Event.removeAll(this);this.empty&&this.empty();(a=this.attr&&this.attr("data-scope"))&&delete l[a];this.valObject&&(this.valObject=null);return this}function n(a,b){var e;if(a&&a.constructor==Object){for(b in a)n.call(this,b,a[b]);
return this}e=this.getAttribute(a);if(1==arguments.length)return e;"class"==a?k.call(this,b):b||0===b?e!=b&&this.setAttribute(a,b):e&&this.removeAttribute(a)}function l(a,b,d){if(d=l[n.call(a,"data-scope")])return d;b&&!0!==b||(d=(d=e.call(a,"[data-scope]"))&&l[n.call(d,"data-scope")]||K);b&&(n.call(a,"data-scope",++L),d=l[L]=Object.create(b=d||b),d._super=b);return d}function a(b,d){var c,h,g;if(1!=this.nodeType)return this;b=l[n.call(this,"data-scope")]||b||(c=e.call(this,"[data-scope]"))&&l[n.call(c,
"data-scope")]||K;if(c=!d&&n.call(this,"data-bind")){h=c;g="data b r->data&&("+c.replace(Q,function(a,b,d){return z[b]?(N.call(z[b],"once")&&(h=h.replace(a,"")),"(r=b['"+b+"'].call(this,"+(z[b].raw?"data,'"+d+"'":d)+")||r),"):"this.attr('"+b+"',"+d+"),"})+"r)";c!=h&&n.call(this,"data-bind",h);try{if(Fn(g,this,b)(b,z))return this}catch(k){k.message+=" in binding: "+c;console.error(k);if(f.onerror)f.onerror(k.message,k.fileName,k.lineNumber);return this}}for(c=this.firstChild;c;c=h)h=c.nextSibling,
a.call(c,b);return this}function e(a){for(var b=this;b;b=b.parentNode)if(b.matches&&b.matches(a))return b;return null}function d(a){for(var b=this.length=a.length;b--;)this[b]=a[b]}function E(a){function b(a,d,f,w,g,l){for(g=d.length;g<=h[0];)h.shift(),e=e.plugin?e.plugin.done():e.parentNode||e[0].parentNode;f?c.plugins[w]?(e=(new c.plugins[w](e,l)).el,h.unshift(g)):e.append(a):(w&&(e=c(w,0,1).to(e),h.unshift(g)),l&&(g=l.charAt(0),w=l.slice(1),">"==g?(d+" "+w).replace(M,b):"|"==g||"\\"==g?e.append(w):
"/"!=g&&("&"!=g&&(w=("INPUT"==e.tagName?"val":"txt")+":_('"+l.replace(/'/g,"\\'")+"').format(data)"),g=n.call(e,"data-bind"),n.call(e,"data-bind",(g?g+";":"")+w))))}var d=g.createDocumentFragment(),e=d,h=[-1];a.replace(M,b);d=d.childNodes;return 1==d.length?d[0]:d}function v(a,b){this.name=b;this.parent=a;this.el=c("div");this.el.plugin=this;return this}function x(a,b){b=x[A(b)||y];return b[a]||b[a=a.slice(a.indexOf(":")+1)||a]||a}function A(a){return a&&(x[a=(""+a).toLowerCase()]||x[a=a.split("-")[0]])&&
a}function F(a){(a=A(a))&&y!=a&&(x[y=x.current=a]=x[y]||{});return y}function G(a,b){-1==x.list.indexOf(a)&&x.list.push(a);Object.merge(x[a]||(x[a]={}),b);y||F(a)}var y,N=Object[q].hasOwnProperty,B=[],C="textContent"in g.body?"textContent":"innerText",D=c.cache={},L=0,K=c.data={window:f,_:x},u=(f.HTMLElement||f.Element||c)[q],M=/^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w\:.#\[\]=])*)[ \t]*(.*?)$/gm,Q=/[;\s]*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g,z=c.bindings={"class":function(a,b){h.call(this,
a,2>arguments.length||b)},css:function(a,b){this.style[a.camelCase()]=b||""},data:function(a,b){this.attr("data-"+a,b)},html:function(a){this.innerHTML=a}},I=/([.#:[])([-\w]+)(?:\((.+?)\)|([~^$*|]?)=(("|')(?:\\?.)*?\6|[-\w]+))?]?/g,P=/([\s>+]*)(?:("|')(?:\\?.)*?\2|\(.+?\)|[^\s+>])+$/,O=/\s*,\s*(?=(?:[^'"()]|"(?:\\?.)*?"|'(?:\\?.)*?'|\(.+?\))+$)/,H={},J={"first-child":"(a=_.parentNode)&&a.firstChild==_","last-child":"(a=_.parentNode)&&a.lastChild==_",".":"~_.className.split(/\\s+/).indexOf(a)","#":"_.id==a",
"^":"a.indexOf(v)==0","|":"a.split('-')[0]==v",$:"a.slice(-v.length)==v","~":"~a.split(/\\s+/).indexOf(v)","*":"~a.indexOf(v)"};f.El=c;u.append=p;u.after=function(a,b){p.call(a.parentNode,this,b?a:a.nextSibling);return this};u.to=function(a,b){p.call(a,this,b);return this};u.hasClass=t;u.addClass=k;u.rmClass=m;u.toggleClass=h;u.empty=function(){for(var a;a=this.firstChild;)b.call(a);return this};u.kill=b;u.on=function(a,b){Event.add(this,a,b);return this};u.non=function(a,b){Event.remove(this,a,b);
return this};u.emit=function(){Event.Emitter.emit.apply(this,arguments)};u.attr=n;c.scope=l;u.render=a;u.txt=z.txt=function(a){return arguments.length&&this[C]!=a?this[C]=a:this[C]};u.val=z.val=function(a){var b=this,d=b.type,e=b.options;if(arguments.length)return b.value=a;if(e){if("select-multiple"==d){a=[];for(d=0;b=e[d++];)b.selected&&!b.disabled&&a.push(b.valObject||b.value);return a}b=e[b.selectedIndex]||b}return"checkbox"!=d&&"radio"!=d||b.checked?b.valObject||b.value:null};u.matches||(u.matches=
function(a){return!!r(a)(this)});u.closest||(u.closest=e);u.find=u.querySelector;u.findAll=function(a){return new d(this.querySelectorAll(a))};c.wrap=d;d[q]=Object.keys(u).reduce(function(a,b){function d(){for(var a,e=0,c=this.length;e<c;)if(a=u[b].apply(this[e++],arguments),d.first&&a)return a;return d.first?null:this}a[b]=d;return a},B);B.find.first=1;B.cloneNode=function(a){return new d(this.map(function(b){return b.cloneNode(a)}))};c[q]=u;c.get=function(a){"string"==typeof a&&(a=g.getElementById(a));
return a};v[q]={_done:function(){var a=1<this.el.childNodes.length?new d(this.el.childNodes):this.el.firstChild;this.el.plugin=this.el=this.parent=null;return a},done:function(){var a=this.parent;D[this.name]=this._done();return a}};c.plugins={template:v};c.create=c.tpl=E;c.include=function(a,b,d){b=c.get(a);(new v(null,a)).el.append(E(b.innerHTML)).plugin.done();b.kill()};c.i18n=x;x.list=[];x.get=A;x.use=F;x.add=G;x.def=function(a){Object.each(a,function(b,d){G(d,a)})};String[q].lang=function(a){return x(this,
a)}}(window,document,"prototype");
!function(f){function g(c,b,f,g,a){c=+c;var e=0;for(g=g||{"default":"{0} {1}{2}"};c>=b[e];)c/=b[e++];if(e==b.length&&a)return a(this);e=f[e];return(g[2>c?e:e+"s"]||g["default"]).format({0:c,1:e,2:2>c?"":"s"})}var q=Array[f],r=Number[f];f=String[f];var c=/{(?!\\)((?:(["'/])(?:\\?.)*?\2|[^}])*)}/g,p=/\|\s*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^|])*))?/g,t=/^\s*\d+/,k=/-?\d+\.?\d*/g,m=/{\\/g;f.format=function(){var h=q.slice.call(arguments);h.unshift(0);return this.replace(c,function(b,c){h[0]=c.replace(t,
"this[$&]").replace(p,".$1($2)");return Fn.apply(null,h)()}).replace(m,"{")};r.format=function(c){return""+this};f.safe=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;")};f.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};f.camelCase=function(){return this.replace(/[ _-]+([a-z])/g,function(c,b){return b.toUpperCase()})};f.lower=f.toLowerCase;f.upper=f.toUpperCase;r.step=function(c,b){var f=(""+c).split("."),g=this/
c,g=~~(g+(void 0==b?.5:1===b&&g==(g|0)?0:+b))*c;return""+(1 in f?g.toFixed(f[1].length):g)};f.step=function(c,b){return this.replace(k,function(g){return(+g).step(c,b)})};r.scale=function(){return g(this,[1E3,1E3,1E3],["","k","M","G"],{"default":"{0}{1}"})};f.scale=function(){return this.replace(k,function(c){return(+c).scale()})};f.pick=r.pick=function(){for(var c=this+"=",b,g=arguments,f=0,a=g.length;f<a;)b=g[f++],0==b.indexOf(c)&&(b=b.slice(c.length),f=a);return b.replace("#",this)};f.plural=r.plural=
function(){return arguments[+Fn("n->"+(String.plural||"n!=1"))(parseFloat(this))].replace("#",this)};q.pluck=function(c){for(var b=this.length,g=[];b--;)g[b]=this[b][c];return g};Number.words=g}("prototype");
!function(f){function g(a,c,d,f){if(m[a])return c&&m[a].init(c,d,f),m[a];if(!(this instanceof g))return new g(a,c,d,f);m[this.route=a]=this;this.init(c,d,f);if("#"!=a.charAt(0)){c=h++;var l=["o._r='"+a+"'"];a=a.replace(n,function(a,c){return c?l.push("o['"+c+"']=a["+h++ +"]")&&"([^/]+?)":a.replace(b,"\\$&")});t+=(t?"||":"")+"(o._u=a["+c+"])&&("+l+")";k+=(k?"|":"")+"("+a+")";q=new Function("o,a","return a&&("+t+"),o");r=new RegExp("^\\/?(?:"+k+")[\\/\\s]*$")}}var q,r,c,p,t="",k="",m={},h=1,b=/[.*+?^=!:${}()|\[\]\/\\]/g,
n=/\{([\w%.]+?)\}|.[^{\\]*?/g;g.prototype={init:function(a,b,c){this.el=a;this.parent="string"==typeof b?g(b):b;this.selector=c},show:function(a){var b,d=c=this;El.data.viewOpts=a=a||{};a._r=d.route;for(d.open&&d.close(a);d;b=d,d=d.parent)d.child&&d.child!=b&&d.child.close(a),d.child=b;b.ping(p=a)},close:function(a,b){this.open&&(this.emit("close",a,b),this.child&&this.child.close(a),this.open.kill(),this.open=this.parent.child=null)},wait:function(a,b){var d=this,f=d.parent;a._p=1+(a._p|0);return function(){--a._p||
p!=a||(d.el&&d.parent==f?d.ping(a,!b):(d.el?c:g("404")).show(a))}},ping:function(a,b){var c=this.parent,f=this.child;if(!this.el&&this.file)return xhr.load(this.file.replace(/^|,/g,"$&"+(g.base||"")).split(","),this.wait(a,1));b||this.emit("ping",a);if(p==a&&!a._p){var h=typeof this.el;"function"==h?this.el=this.el():"string"==h&&(this.el=El.tpl(this.el));c&&!this.open&&(this.open=this.el.cloneNode(!0),c.emit("beforeChild",a),this.open.to(c.selector&&c.open&&c.open.find(c.selector)||c.open||c.el),
this.open.render());f&&f.ping(a)}p!=a||a._p||this.route!=a._r||this.emit("show",a)}};Object.merge(g.prototype,Event.Emitter);g.home="home";g.show=function(a){a=q({_r:"404"},r.exec(a||g.home));var b=g(a._r);b.open&&b._u==a._u||(b._u=a._u,b.show(El.data.route=a))};g.def=function(a){for(var b,c=/(\S+) (\S+)/g;b=c.exec(a);)b[2].split(",").map(function(a){g(a).file=b[1]})};f.View=g;El.plugins.view=El.plugins.template.extend({done:function(){var a=this.parent,b=this.name.split(/\s+/);g(b[0],this._done(),
b[1],b[2]);return a}});var l=El("div");El.plugins["view-link"]=El.plugins.template.extend({done:function(){var a=this.name.split(/\s+/);g(a[0],l,a[2]).on("show",function(){g.show(a[1])});return this.parent}})}(this);
!function(f){function g(c){return c.apply(this,m.call(arguments,1))}function q(c){if(!c)return this.kill()}function r(c,b,f,g){if("string"==typeof b){var a=b;b=function(b){Mediator.emit(a,b,this,f,g)}}this.on(c,b)}function c(c){return this.render(Object.merge(El.scope(this,!0),c))}function p(c,b,f,g,a){this.on("submit",function(e){var d=JSON.serializeForm(this);Mediator.emit(c,e,d,b,f,g,a);return!1})}function t(c,b){var f,g=this._childs;if(!g)for(this._childs=g=[];f=this.firstChild;)g.push(f),this.removeChild(f);
f=g[0];g=/^\s*(\w+) in (\w*)(.*)/.exec(b);g="with(data){var out=[],loop={i:0,offset:0},_1,_2="+g[2]+g[3].replace(/ (limit|offset):\s*(\d+)/ig,";loop.$1=$2")+";if(_2)for(_1 in _2)if(hasOwn.call(_2,_1)&&!(loop.offset&&loop.offset--)){loop.i++;if(loop.limit&&loop.i-loop.offset>loop.limit)break;var clone=el.cloneNode(true),scope=El.scope(clone,data);scope.loopKey=loop.key=_1;scope.loop=loop;scope."+g[1]+"=_2[_1];out.push(clone);};return out}";f=Function("hasOwn,el,data",g)(k,f,c);this.empty().append(f).render();
return this}var k=Object.prototype.hasOwnProperty,m=Array.prototype.slice;g.once=q.once=c.once=r.once=p.once=t.raw=t.once=!0;f.fn=g;f["if"]=q;f.on=r;f["with"]=c;f.emitForm=p;f.each=t}(El.bindings);
!function(c,f){function r(e,d,a){if(e&&e.constructor===f){d={};for(a in e)m.call(e,a)&&(d[a]=r(e[a]));e=d}return e}function t(){for(var e=this.length,d=l(arguments),a=-1;e--;)~d.indexOf(this[e])&&this.splice(a=e,1);return a}function k(e){var b=[],w=e.match(/[^"']+?->|.+$/g),h=l(arguments,1),m=h.length+":"+e,c=a[m];if(!c){for(c=e.replace(d,"").match(/\b[a-z_$][\w$]*/ig)||[];1<w.length;)e=w.pop(),b=w.pop().match(/\w+/g)||[],t.apply(c,b),w.length&&w.push("function("+b+"){return("+e+")}"+(h[0]?".bind(this)":
""));e="return("+e+")";h[1]&&(w=f.keys(h.slice(1)).map(k("a->'__'+a")),b.unshift.apply(b,w),e="with("+w.join(")with(")+"){"+e+"}");h[0]&&(e="with(this){"+e+"}",c[0]&&(e="var "+c.uniq().join("='',")+"='';"+e));c=a[m]=Function(b,e)}return h.length?c.bind.apply(c,h):c}function p(e){function d(){!--a&&e&&e.call(this)}var a=1;d.wait=function(){a++;return d};return d}function q(){return!0}function n(){return!1}var g=Array.prototype,h=Function.prototype,b=String.prototype,m=f.prototype.hasOwnProperty,l=
h.call.bind(g.slice),a={},d=/(['\/"])(?:\\?.)*?\1|\b(?:false|in|new|null|this|true|void)\b|\.\w+|\w+:/g;h.partial=function(){var e=this,d=l(arguments);return function(){return e.apply(this,d.concat.apply(d,arguments))}};h.cache=function(e,d,b){function h(){var b=arguments,w=!!e||this instanceof h,g=d?d.apply(c,b):w+":"+b.length+":"+l(b);if(g in m)g=m[g];else{var n=m;if(w)var w=c,p=void 0,w=(p=b.length)?(a[p]||(a[p]=k("t a->new t(a["+f.keys(b).join("],a[")+"])")))(w,b):new w;else w=c.apply(this,b);
g=n[g]=w}return g}var c=h.origin=this,m=h.cached=b||{};h.extend=function(){return c.extend.apply(c,arguments).cache(e,d,b)};h.prototype=c.prototype;return h};h.extend=function(){function e(){return a.apply(this,arguments)}var d,a=this,b=0;for(e.prototype=f.create(a.prototype);d=arguments[b++];)f.merge(e.prototype,d);return e.prototype.constructor=e};f.each=function(e,d,a,b){if(e)for(b in e)m.call(e,b)&&d.call(a,e[b],b,e)};f.merge=function(e,d){for(var a,b=1;d=arguments[b++];)for(a in d)m.call(d,a)&&
(e[a]=d[a]);return e};f.values=function(e){return f.keys(e||{}).map(function(d){return e[d]})};f.clone=r;g.remove=t;g.each=g.forEach;g.fold=g.reduce;g.foldr=g.reduceRight;g.uniq=g.filter.partial(function(e,d,a){return d==a.indexOf(e)});g.pushUniq=function(e){return-1==this.indexOf(e)?this.push(e):!1};h.fn=function(){return this};b.fn=function(e){return k(this,e)};Boolean.prototype.fn=function(){return this.valueOf()?q:n};c.Fn=k;c.Fn.wait=p;c.Fn.hold=function(e){var d,a=this,b=[],h=[],c=p(function(){for(var d,
e=a,c=h.length;c--;c--)h[c]?a[h[c-1]]=h[c]:delete a[h[c-1]];for(;d=b[++c];)e=e[d].apply(e,b[++c])||e;b=h=null});e=e||a.syncMethods||[];for(d in a)"function"==typeof a[d]&&-1==e.indexOf(d)&&!function(d){h.push(d,m.call(a,d)&&a[d]);a[d]=function(){b.push(d,arguments);return a}}(d);a.wait=c.wait;return c}}(this,Object);
!function(c,f){var r=/("|')((?:\\?.)*?)\1|([YMD])\3\3\3?|([YMDHhmsWSZ])(\4?)|[uUASwoQ]/g,t=/(\d+)[-.\/](\d+)[-.\/](\d+)/,k=/(\d+):(\d+)(?::(\d+))?(\.\d+)?(?:\s*(?:(a)|(p))\.?m\.?)?(\s*(?:Z|GMT|UTC)?(?:([-+]\d\d):?(\d\d)?)?)?/i,p=/\\(.)/g,q={D:"Date",h:"Hours",m:"Minutes",s:"Seconds",S:"Milliseconds"};c[f].date=c[f].format=function(k,g){k=c.masks[k]||k||c.masks["default"];var h,b=this,m=+b,l="get"+("UTC:"==k.slice(0,4)?(k=k.slice(4),"UTC"):""),a=void 0==g?b._z:g;void 0!=a&&"get"==l&&(l="getUTC",b.setTime(m+
36E5*a),h=60*a);k=k.replace(r,function(d,e,a,k,g,f){a="Y"==k?b[l+"FullYear"]():k?c.names[b[l+("M"==k?"Month":"Day")]()+("DDD"==d?24:"D"==k?31:"MMM"==d?0:12)]:"Y"==g?b[l+"FullYear"]()%100:"W"==g?(e=new c(m+864E5*(4-(b[l+"Day"]()||7))),Math.ceil(((e.getTime()-e["s"+l.slice(1)+"Month"](0,1))/864E5+1)/7)):"M"==g?b[l+"Month"]()+1:"H"==g?b[l+"Hours"]()%12||12:"Z"==g?(e=h||"get"==l&&-b.getTimezoneOffset()||0,e?(0>e?(e=-e,"-"):"+")+(600>e?"0":"")+(0|e/60)+((e%=60)?(f?"":":")+e:""):"Z"):g?b[l+q[g]]():"u"==
d?b/1E3>>>0:"U"==d?m:"Q"==d?(b[l+"Month"]()/3|0)+1:"A"==d?c[11<b[l+"Hours"]()?"pm":"am"]:"w"==d?b[l+"Day"]()||7:"o"==d?(new c(m+864E5*(4-(b[l+"Day"]()||7))))[l+"FullYear"]():e?a.replace(p,"$1"):d;"SS"==d&&100>a&&(a="0"+a);return f&&10>a&&"Z"!=g?"0"+a:a});void 0!=h&&b.setTime(m);return k};c[f].tz=function(k){this._z=k;return this};c.am="AM";c.pm="PM";c.masks={"default":"DDD MMM DD YYYY hh:mm:ss",iso:"UTC:YYYY-MM-DD'T'hh:mm:ss'Z'"};c.names="JanFebMarAprMayJunJulAugSepOctNovDecJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberSunMonTueWedThuFriSatSundayMondayTuesdayWednesdayThursdayFridaySaturday".match(/.[a-z]+/g);
String[f].date=Number[f].date=function(f,g,h){var b,m,l,a=new c,d=+this||""+this;if(isNaN(d)){if(b=d.match(t))m=99<b[1]?1:3,l=c.middleEndian?4-m:2,a.setFullYear(b[m],b[l]-1,b[6-l-m]);b=d.match(k)||[0,0,0];a.setHours(b[6]&&12>b[1]?+b[1]+12:b[5]&&12==b[1]?0:b[1],b[2],b[3]|0,1E3*b[4]|0);b[7]&&(h=(b[8]|0)+(b[9]|0)/(0>b[8]?-60:60))}else a.setTime(4294967296>d?1E3*d:d);void 0!=h&&a.setTime(a-6E4*(60*h+a.getTimezoneOffset()));return f?a.format(f,g):a}}(Date,"prototype");
!function(c,f){function r(k,c,q,n,g,h,b,m,l){n||(n="");if(c&&c.constructor==f)for(g in k&&k.constructor==f||(k={}),c){if(m!==(h=c[g])&&t.call(c,g)&&(m==h?m!==k[g]&&delete k[g]:k[g]!==h)){b=n+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1");if(l=q)l=k[g],l=!!l&&l.constructor==f;l=l&&q.length;m!=h&&(k[g]=r(k[g],h,q,b));!1!==l&&l==q.length||q.push(b)}}else k=c;return k}var t=f.prototype.hasOwnProperty;c.pointer=function(c,f,q){if(f){f=f.split("/");for(var n,g=2<arguments.length,h=1,b=f.length;c&&h<b;){n=
f[h++].replace(/~1/g,"/").replace(/~0/g,"~");if(g){if(h==b)return g=c[n],c[n]=q,g;c[n]&&"object"==typeof c[n]||(c[n]={})}c=c[n]}}return c};c.mergePatch=r}(JSON,Object);
!function(c,f){function r(d,e,a,b){var c=this._e||(this._e={});(c[d]||(c[d]=[])).unshift(a,b,e);return this}function t(d,e,a){var b=this._e&&this._e[d];if(b)if(e)for(d=b.length;d--;d--){if((b[d--]===e||b[d]===e)&&b[d-1]==a){b.splice(d-1,3);break}}else b.length=0;return this}function k(d,e,a){function b(){c.non(d,e,a).non(d,b,a)}var c=this;return c.on(d,b,a).on(d,e,a)}function p(){this.returnValue=!1}function q(){this.cancelBubble=this.cancel=!0}var n=c.Event||(c.Event={}),g=120,h="addEventListener",
b="removeEventListener",m=c[h]?"":(h="attachEvent",b="detachEvent","on"),l=n.fixEv={wheel:"onwheel"in f?"wheel":"onmousewheel"in f?"mousewheel":"DOMMouseScroll"},a=n.fixFn={wheel:function(d,e){return function(a){var b=(a.wheelDelta||-a.detail||-a.deltaY)/g;if(b){if(1>b&&-1<b){var c=(0>b?-1:1)/b,b=b*c;g/=c}e.call(d,a,b)}}}};n.Emitter={on:r,non:t,off:t,once:k,one:k,emit:function(d){var a,b;if(d=this._e&&this._e[d])for(d=d.slice(),b=d.length,a=d.slice.call(arguments,1);b--;)d[b--].apply(d[--b]||this,
a);return this}};n.add=function(d,e,b){var k=a[e]&&a[e](d,b)||b,g=m?function(){var a=c.event;a&&(a.target=a.srcElement,a.preventDefault=p,a.stopPropagation=q);k.call(d,a)}:k;d[h](m+(l[e]||e),g,!1);r.call(d,e,g,d,b)};n.remove=function(a,e,c){var h=a._e&&a._e[e];if(c=h&&h.indexOf(c))a[b](m+(l[e]||e),h[c+1]),h.splice(c-1,3)};n.stop=function(a){a.preventDefault&&(a.stopPropagation(),a.preventDefault());return!1};n.removeAll=function(a,b,c){if(a._e)for(c in a._e)b&&c!==b||n.remove(a,c)}}(this,document);
!function(c){function f(c,f,q){for(var n,g,h=0,b=c.target||c.srcElement,m=/INPUT|TEXTAREA|SELECT/i.test((3==b.nodeType?b.parentNode:b).tagName);g=r[h++];){if(!m||g.enable_input)n=g[f]||g[q]||g.num&&47<f&&58>f&&(q|=0,g.num)||g.all;if(n||!g.bubble)break}n&&n(c,q,b)}var r=[],t={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"caps",27:"esc",33:"pgup",34:"pgdown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",112:"f1",113:"f2",114:"f3",115:"f4",
116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"};c.setKeyMap=r.unshift.bind(r);c.rmKeyMap=function(c){c=r.indexOf(c||r[0]);-1<c&&r.splice(c,1)};c.add(document,"keydown",function(k){8==(k.keyCode||k.which)&&r[0]&&r[0].backspace&&c.stop(k)});c.add(document,"keyup",function(c){var p=c.keyCode||c.which;95<p&&106>p&&(p-=48);var q=t[p]||String.fromCharCode(p)||p;f(c,p,q);c.ctrlKey&&17!=p&&f(c,p,"ctrl+"+q);c.altKey&&18!=p&&f(c,p,"alt+"+q)})}(Event);
!function(c,f,r){function t(a){a=(a||b).href.split("#")[1]||"";a=decodeURIComponent(a.replace(/\+/g," "));return a.replace(m,"")}function k(a,d){a=encodeURIComponent(a).replace(/%20/g,"+").replace(/%2F/gi,"/");b[d?"replace":"assign"]("#"+a);if(g&&t()!==t(g.location))g.location[d?"replace":g.document.open().close(),"assign"]("#"+a);p()}function p(){n!=(n=t())&&q&&q(n)}var q,n,g,h,b=location,m=/^[#\/\!]+|[\s\/]+$/g,l=!+"\v1"&&8>(f.documentMode||1);r.getUrl=t;r.setUrl=k;r.start=function(a,b){q||("onhashchange"in
c&&!l?c.onhashchange=p:(l&&(g=f.body.appendChild(f.createElement('<iframe class="hide" tabindex="-1">')).contentWindow),setInterval(function(){var a=t();g&&h===a&&(a=t(g.location));h!==a&&(h=a,g?k(a):p())},60)));q=a;p()}}(this,document,history);
!function(c,f,r){function t(a){return K[a]||(K[a]=Function("_,v,a,b","return "+a.split(R).map(function(a){var b,d,v=["_&&_.nodeType==1"],c=a.replace(S,function(a,v,c,e){d=e+v.length;b=v.trim();return""});(a=a.slice(d).replace(L,function(a,b,d,c,e,h,D){v.push("((v='"+(c||(D?h.slice(1,-1):h)||"").replace(/'/g,"\\'")+"'),(a='"+d+"'),1)",M[":"==b?d:b]||"(a=_.getAttribute(a))"+(e?"&&"+M[e]:h?"==v":""));return""}))&&"*"!=a&&(v[0]+="&&_.nodeName=='"+a.toUpperCase()+"'");c&&v.push("+"==b?"(a=_.previousSibling)":
"(a=_.parentNode)",(b?"a.matches&&a.matches('":"a.closest&&a.closest('")+c+"')");return v.join("&&")}).join("||")))}function k(a,b,d){var c={};a=a.replace(L,function(a,b,d,e,v,h,D){h=D?h.slice(1,-1):h||d;c[b="."==b?(v="~","class"):"#"==b?"id":d]=v&&c[b]?"^"==v?h+c[b]:c[b]+("~"==v?" ":"")+h:h;return""})||"div";a=(E[a]||(E[a]=f.createElement(a))).cloneNode(!0).attr(c);return d||!b?a:("object"==typeof b?m:p).call(a,b)}function p(a,b){var d,c=0,e=typeof a;if(a){if("string"==e||"number"==e)a=f.createTextNode(a);
else if(!("nodeType"in a)&&"length"in a){e=a.length;for(d=f.createDocumentFragment();c<e;)p.call(d,a[c++]);a=d}a.nodeType&&(e=this.insertBefore?this:this[this.length-1],e.insertBefore(a,(!0===b?e.firstChild:"number"==typeof b?e.childNodes[0>b?e.childNodes.length-b-2:b]:b)||null))}return this}function q(a){return-1<this.className.split(/\s+/).indexOf(a)}function n(a){var b=this.className;b&&(a=q.call(this,a)?b:b+" "+a);b!=a&&(this.className=a);return this}function g(a){q.call(this,a)&&(this.className=
(" "+this.className+" ").replace(" "+a+" "," ").trim());return this}function h(a,b){1==arguments.length&&(b=!q.call(this,a));return(b?n:g).call(this,a),b}function b(){var a;this.emit&&this.emit("kill");this.parentNode&&this.parentNode.removeChild(this);Event.removeAll&&Event.removeAll(this);this.empty&&this.empty();(a=this.attr&&this.attr("data-scope"))&&delete l[a];this.valObject&&(this.valObject=null);return this}function m(a,b){var d;if(a&&a.constructor==Object){for(b in a)m.call(this,b,a[b]);
return this}d=this.getAttribute(a);if(1==arguments.length)return d;"class"==a?n.call(this,b):b||0===b?d!=b&&this.setAttribute(a,b):d&&this.removeAttribute(a)}function l(a,b,c){if(c=l[m.call(a,"data-scope")])return c;b&&!0!==b||(c=(c=d.call(a,"[data-scope]"))&&l[m.call(c,"data-scope")]||N);b&&(m.call(a,"data-scope",++O),c=l[O]=Object.create(b=c||b),c._super=b);return c}function a(b,e){var h,f,g;if(1!=this.nodeType)return this;b=l[m.call(this,"data-scope")]||b||(h=d.call(this,"[data-scope]"))&&l[m.call(h,
"data-scope")]||N;if(h=!e&&m.call(this,"data-bind")){f=h;g="data b r->data&&("+h.replace(T,function(a,b,c){return y[b]?(Q.call(y[b],"once")&&(f=f.replace(a,"")),"(r=b['"+b+"'].call(this,"+(y[b].raw?"data,'"+c+"'":c)+")||r),"):"this.attr('"+b+"',"+c+"),"})+"r)";h!=f&&m.call(this,"data-bind",f);try{if(Fn(g,this,b)(b,y))return this}catch(k){k.message+=" in binding: "+h;console.error(k);if(c.onerror)c.onerror(k.message,k.fileName,k.lineNumber);return this}}for(h=this.firstChild;h;h=f)f=h.nextSibling,
a.call(h,b);return this}function d(a){for(var b=this;b;b=b.parentNode)if(b.matches&&b.matches(a))return b;return null}function e(a){for(var b=this.length=a.length;b--;)this[b]=a[b]}function H(a){function b(a,c,h,v,f,g){for(f=c.length;f<=e[0];)e.shift(),d=d.plugin?d.plugin.done():d.parentNode||d[0].parentNode;d.txtMode?d.txt+=a+"\n":h?k.plugins[v]?(d=(new k.plugins[v](d,g)).el,e.unshift(f)):d.append(a):(v&&(d=k(v,0,1).to(d),e.unshift(f)),g&&(f=g.charAt(0),v=g.slice(1),">"==f?(c+" "+v).replace(P,b):
"|"==f||"\\"==f?d.append(v):"/"!=f&&("&"!=f&&(v=("INPUT"==d.tagName?"val":"txt")+":_('"+g.replace(/'/g,"\\'")+"').format(data)"),f=m.call(d,"data-bind"),m.call(d,"data-bind",(f?f+";":"")+v))))}var c=f.createDocumentFragment(),d=c,e=[-1];a.replace(P,b);c=c.childNodes;return 1==c.length?c[0]:c}function w(a,b){this.name=b;this.parent=a;this.el=k("div");this.el.plugin=this}function B(a){this.txtMode=this.parent=a;this.txt="";this.plugin=this.el=this}function x(a,b){b=x[C(b)||z];return b[a]||b[a=a.slice(a.indexOf(":")+
1)||a]||a}function C(a){return a&&(x[a=(""+a).toLowerCase()]||x[a=a.split("-")[0]])&&a}function I(a){(a=C(a))&&z!=a&&(x[z=x.current=a]=x[z]||{});return z}function J(a,b){-1==x.list.indexOf(a)&&x.list.push(a);Object.merge(x[a]||(x[a]={}),b);z||I(a)}var z,A,Q=Object[r].hasOwnProperty,F=[],G="textContent"in f.body?"textContent":"innerText",E=k.cache={},O=0,N=k.data={_:x},u=(c.HTMLElement||c.Element||k)[r],P=/^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w\:.#\[\]=])*)[ \t]*(.*?)$/gm,T=/[;\s]*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g,
y=k.bindings={"class":function(a,b){h.call(this,a,2>arguments.length||b)},css:function(a,b){this.style[a.camelCase()]=b||""},data:function(a,b){this.attr("data-"+a,b)},html:function(a){this.innerHTML=a}},L=/([.#:[])([-\w]+)(?:\((.+?)\)|([~^$*|]?)=(("|')(?:\\?.)*?\6|[-\w]+))?]?/g,S=/([\s>+]*)(?:("|')(?:\\?.)*?\2|\(.+?\)|[^\s+>])+$/,R=/\s*,\s*(?=(?:[^'"()]|"(?:\\?.)*?"|'(?:\\?.)*?'|\(.+?\))+$)/,K={},M={"first-child":"(a=_.parentNode)&&a.firstChild==_","last-child":"(a=_.parentNode)&&a.lastChild==_",
".":"~_.className.split(/\\s+/).indexOf(a)","#":"_.id==a","^":"a.indexOf(v)==0","|":"a.split('-')[0]==v",$:"a.slice(-v.length)==v","~":"~a.split(/\\s+/).indexOf(v)","*":"~a.indexOf(v)"};c.El=k;u.append=p;u.after=function(a,b){p.call(a.parentNode,this,b?a:a.nextSibling);return this};u.to=function(a,b){p.call(a,this,b);return this};u.hasClass=q;u.addClass=n;u.rmClass=g;u.toggleClass=h;u.empty=function(){for(var a;a=this.firstChild;)b.call(a);return this};u.kill=b;u.on=function(a,b){Event.add(this,a,
b);return this};u.non=function(a,b){Event.remove(this,a,b);return this};u.emit=function(){Event.Emitter.emit.apply(this,arguments)};u.attr=m;k.scope=l;u.render=a;u.txt=y.txt=function(a){return arguments.length&&this[G]!=a?this[G]=a:this[G]};u.val=y.val=function(a){var b=this,d=b.type,c=b.options;if(arguments.length)return b.value=a;if(c){if("select-multiple"==d){a=[];for(d=0;b=c[d++];)b.selected&&!b.disabled&&a.push(b.valObject||b.value);return a}b=c[b.selectedIndex]||b}return"checkbox"!=d&&"radio"!=
d||b.checked?b.valObject||b.value:null};u.matches||(u.matches=function(a){return!!t(a)(this)});u.closest||(u.closest=d);u.find=u.querySelector;u.findAll=function(a){return new e(this.querySelectorAll(a))};k.wrap=e;e[r]=Object.keys(u).reduce(function(a,b){function d(){for(var a,c=0,e=this.length;c<e;)if(a=u[b].apply(this[c++],arguments),d.first&&a)return a;return d.first?null:this}a[b]=d;return a},F);F.find.first=1;F.cloneNode=function(a){return new e(this.map(function(b){return b.cloneNode(a)}))};
k[r]=u;k.get=function(a){"string"==typeof a&&(a=f.getElementById(a));return a};k.css=function(a){A||(A=k("style").to(f.getElementsByTagName("head")[0]));A.styleSheet?A.styleSheet.cssText+=a:A.appendChild(f.createTextNode(a))};w[r]={_done:function(){var a=1<this.el.childNodes.length?new e(this.el.childNodes):this.el.firstChild;this.el.plugin=this.el=this.parent=null;return a},done:function(){var a=this.parent;E[this.name]=this._done();return a}};B[r].done=Fn("Function(this.txt)(),this.parent");k.plugins=
{binding:B.extend({done:function(){Object.merge(y,Function("return({"+this.txt+"})")());return this.parent}}),css:B.extend({done:Fn("El.css(this.txt),this.parent")}),js:B,template:w};k.create=k.tpl=H;k.include=function(a,b,d){b=k.get(a);(new w(null,a)).el.append(H(b.innerHTML)).plugin.done();b.kill()};k.i18n=x;x.list=[];x.get=C;x.use=I;x.add=J;x.def=function(a){Object.each(a,function(b,d){J(d,a)})};String[r].lang=function(a){return x(this,a)}}(window,document,"prototype");
!function(c){function f(c,b,f,g,a){c=+c;var d=0;for(g=g||{"default":"{0} {1}{2}"};c>=b[d];)c/=b[d++];if(d==b.length&&a)return a(this);d=f[d];return(g[2>c?d:d+"s"]||g["default"]).format({0:c,1:d,2:2>c?"":"s"})}var r=Array[c],t=Number[c];c=String[c];var k=/{(?!\\)((?:(["'/])(?:\\?.)*?\2|[^}])*)}/g,p=/\|\s*(\w+)(?:\s*\:((?:(["'\/])(?:\\?.)*?\3|[^|])*))?/g,q=/^\s*\d+/,n=/-?\d+\.?\d*/g,g=/{\\/g;c.format=function(){var c=r.slice.call(arguments);c.unshift(0);return this.replace(k,function(b,f){c[0]=f.replace(q,
"this[$&]").replace(p,".$1($2)");return Fn.apply(null,c)()}).replace(g,"{")};t.format=function(c){return""+this};c.safe=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;")};c.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};c.camelCase=function(){return this.replace(/[ _-]+([a-z])/g,function(c,b){return b.toUpperCase()})};c.lower=c.toLowerCase;c.upper=c.toUpperCase;t.step=function(c,b){var f=(""+c).split("."),g=this/
c,g=~~(g+(void 0==b?.5:1===b&&g==(g|0)?0:+b))*c;return""+(1 in f?g.toFixed(f[1].length):g)};c.step=function(c,b){return this.replace(n,function(f){return(+f).step(c,b)})};t.scale=function(){return f(this,[1E3,1E3,1E3],["","k","M","G"],{"default":"{0}{1}"})};c.scale=function(){return this.replace(n,function(c){return(+c).scale()})};c.pick=t.pick=function(){for(var c=this+"=",b,f=arguments,g=0,a=f.length;g<a;)b=f[g++],0==b.indexOf(c)&&(b=b.slice(c.length),g=a);return b.replace("#",this)};c.plural=t.plural=
function(){return arguments[+Fn("n->"+(String.plural||"n!=1"))(parseFloat(this))].replace("#",this)};r.pluck=function(c){for(var b=this.length,f=[];b--;)f[b]=this[b][c];return f};Number.words=f}("prototype");
!function(c){function f(a,c,e,k){if(g[a])return c&&g[a].init(c,e,k),g[a];if(!(this instanceof f))return new f(a,c,e,k);g[this.route=a]=this;this.init(c,e,k);if("#"!=a.charAt(0)){c=h++;var l=["o._r='"+a+"'"];a=a.replace(m,function(a,c){return c?l.push("o['"+c+"']=a["+h++ +"]")&&"([^/]+?)":a.replace(b,"\\$&")});q+=(q?"||":"")+"(o._u=a["+c+"])&&("+l+")";n+=(n?"|":"")+"("+a+")";r=new Function("o,a","return a&&("+q+"),o");t=new RegExp("^\\/?(?:"+n+")[\\/\\s]*$")}}var r,t,k,p,q="",n="",g={},h=1,b=/[.*+?^=!:${}()|\[\]\/\\]/g,
m=/\{([\w%.]+?)\}|.[^{\\]*?/g;f.prototype={init:function(a,b,c){this.el=a;this.parent="string"==typeof b?f(b):b;this.selector=c},show:function(a){var b,c=k=this;El.data.viewOpts=a=a||{};a._r=c.route;for(c.open&&c.close(a);c;b=c,c=c.parent)c.child&&c.child!=b&&c.child.close(a),c.child=b;b.ping(p=a)},close:function(a,b){this.open&&(this.emit("close",a,b),this.child&&this.child.close(a),this.open.kill(),this.open=this.parent.child=null)},wait:function(a,b){var c=this,g=c.parent;a._p=1+(a._p|0);return function(){--a._p||
p!=a||(c.el&&c.parent==g?c.ping(a,!b):(c.el?k:f("404")).show(a))}},ping:function(a,b){var c=this.parent,g=this.child;if(!this.el&&this.file)return xhr.load(this.file.replace(/^|,/g,"$&"+(f.base||"")).split(","),this.wait(a,1));b||this.emit("ping",a);if(p==a&&!a._p){var h=typeof this.el;"function"==h?this.el=this.el():"string"==h&&(this.el=El.tpl(this.el));c&&!this.open&&(this.open=this.el.cloneNode(!0),c.emit("beforeChild",a),this.open.to(c.selector&&c.open&&c.open.find(c.selector)||c.open||c.el),
this.open.render());g&&g.ping(a)}p!=a||a._p||this.route!=a._r||(this.emit("show",a),f.emit("show",a))}};Object.merge(f,Event.Emitter);Object.merge(f.prototype,Event.Emitter);f.home="home";f.show=function(a){a=r({_r:"404"},t.exec(a||f.home));var b=f(a._r);b.open&&b._u==a._u||(b._u=a._u,b.show(El.data.route=a))};f.def=function(a){for(var b,c=/(\S+) (\S+)/g;b=c.exec(a);)b[2].split(",").map(function(a){f(a).file=b[1]})};c.View=f;El.plugins.view=El.plugins.template.extend({done:function(){var a=this.parent,
b=this.name.split(/\s+/);f(b[0],this._done(),b[1],b[2]);return a}});var l=El("div");El.plugins["view-link"]=El.plugins.template.extend({done:function(){var a=this.name.split(/\s+/);f(a[0],l,a[2]).on("show",function(){f.show(a[1])});return this.parent}})}(this);
!function(c){function f(c){return c.apply(this,g.call(arguments,1))}function r(c){if(!c)return this.kill()}function t(c,b,f,g){if("string"==typeof b){var a=b;b=function(b){Mediator.emit(a,b,this,f,g)}}this.on(c,b)}function k(c){return this.render(Object.merge(El.scope(this,!0),c))}function p(c,b,f,g,a){this.on("submit",function(d){var e=JSON.serializeForm(this);Mediator.emit(c,d,e,b,f,g,a);return!1})}function q(c,b){var f,g=this._childs;if(!g)for(this._childs=g=[];f=this.firstChild;)g.push(f),this.removeChild(f);
f=g[0];g=/^\s*(\w+) in (\w*)(.*)/.exec(b);g="with(data){var out=[],loop={i:0,offset:0},_1,_2="+g[2]+g[3].replace(/ (limit|offset):\s*(\d+)/ig,";loop.$1=$2")+";if(_2)for(_1 in _2)if(hasOwn.call(_2,_1)&&!(loop.offset&&loop.offset--)){loop.i++;if(loop.limit&&loop.i-loop.offset>loop.limit)break;var clone=el.cloneNode(true),scope=El.scope(clone,data);scope.loopKey=loop.key=_1;scope.loop=loop;scope."+g[1]+"=_2[_1];out.push(clone);};return out}";f=Function("hasOwn,el,data",g)(n,f,c);this.empty().append(f).render();
return this}var n=Object.prototype.hasOwnProperty,g=Array.prototype.slice;f.once=r.once=k.once=t.once=p.once=q.raw=q.once=!0;c.fn=f;c["if"]=r;c.on=t;c["with"]=k;c.emitForm=p;c.each=q}(El.bindings);
/*! litejs.com/MIT-LICENSE.txt */
!function(b,y,z){function A(){}function u(a,e,b){a[e]||(a[e]=new Function("a,b,c,d",b))}function l(a,e,b,d,f){var c=v.shift()||new XMLHttpRequest;c.open(a,e,!0!==b);c._next=b;!0!==b&&(c.onreadystatechange=function(){4==c.readyState&&(a=c.status||-1,c._next&&c._next.call(c,(200>a||299<a&&304!=a&&1223!=a)&&a,c.responseText,e,d,f),c.onreadystatechange=c._next=A,v.push(c))});return c}function p(a){var e=g[a];if(!e)throw Error("Module not found: "+a);if("string"==typeof e){var f=g[a]={},d={id:a,filename:a,
exports:f};(new Function("exports,module,process,require,global",e)).call(f,f,d,B,p,b);e=g[a]=d.exports}return e}function w(a,e){function b(a,c,d,g){var k=d.split("?")[0].split(".").pop();f[d]=d;n[g]="";a||("tpl"==k?(l[++q]=c,n[g]="El.tpl(xhr["+q+"]);delete xhr["+q+"]"):"css"==k?(m||(m=C.appendChild(r.createElement("style"))),m.styleSheet?m.styleSheet.cssText+=c:m.appendChild(r.createTextNode(c))):n[g]=c);--h||(execScript(";"+n.join("/**/;")),e&&e(),n=null)}"string"==typeof a&&(a=[a]);for(var d,g=
a.length,c=0,h=0,n=[];c<g;c++)(d=a[c])&&d!==f[d]&&(f[d]?f[d]._next=function(a){return function(){a.apply(this,arguments);b.apply(this,arguments)}}(f[d]._next):(f[d]=l("GET",d,b,h),f[d].send()),h+=1);!h&&e&&e()}var m,r=b.document,C=r.getElementsByTagName("head")[0],v=[],f={},q=0,t,k=[],x=b.onerror;b.onerror=function(a,e,f,d,g){var c=arguments,h=g||Error(a),h=h.stack||h.backtrace||h.stacktrace||"";x&&x.apply(this,c);t!==(t=[e,f,d||(b.event||c).errorCharacter||"?",a].join(":"))&&k.push([t,h,+new Date,
b.location].join("\n"))};setInterval(function(){k.length&&l.logErrors&&(l.logErrors(k),k.length=0)},307);u(b,"XMLHttpRequest","return new ActiveXObject('MSXML2.XMLHTTP')");b.execScript||Function("d,Date,w","w.execScript=(1,eval)('(Date)')==d&&eval")(Date,1,b);u(b,"execScript","d=document;b=d.body;c=d.createElement('script');c.text=a;b.removeChild(b.insertBefore(c,b.firstChild))");b.xhr=l;var g={},B={env:{},nextTick:b.setImmediate||b.requestAnimationFrame||b.setTimeout};b.require=p;p.def=function(a,
b){for(b in a)g[b]=a[b]};l.load=w;w(y,z)}(this,[]);
!function(b,v,w){function x(){}function q(a,e,b){a[e]||(a[e]=new Function("a,b,c,d",b))}function m(a,e,b,d,f){var c=r.shift()||new XMLHttpRequest;c.open(a,e,!0!==b);c._next=b;!0!==b&&(c.onreadystatechange=function(){4==c.readyState&&(a=c.status||200,c._next&&c._next.call(c,(200>a||299<a&&304!=a&&1223!=a)&&a,c.responseText,e,d,f),c.onreadystatechange=c._next=x,r.push(c))});return c}function l(a){var e=g[a];if(!e)throw Error("Module not found: "+a);if("string"==typeof e){var f=g[a]={},d={id:a,filename:a,
exports:f};(new Function("exports,module,process,require,global",e)).call(f,f,d,y,l,b);e=g[a]=d.exports}return e}function t(a,e){function b(a,c,d,g){var l=d.split("?")[0].split(".").pop();f[d]=d;k[g]="";if(!a){if("tpl"==l||"css"==l)m[++n]=c,c="El."+l+"(xhr["+n+"]);delete xhr["+n+"]";k[g]=c}--h||(execScript(";"+k.join("/**/;")),e&&e(),k=null)}"string"==typeof a&&(a=[a]);for(var d,g=a.length,c=0,h=0,k=[];c<g;c++)(d=a[c])&&d!==f[d]&&(f[d]?f[d]._next=function(a){return function(){a.apply(this,arguments);
b.apply(this,arguments)}}(f[d]._next):(f[d]=m("GET",d,b,h),f[d].send()),h+=1);!h&&e&&e()}var r=[],f={},n=0,p,k=[],u=b.onerror;b.onerror=function(a,e,f,d,g){var c=arguments,h=g||Error(a),h=h.stack||h.backtrace||h.stacktrace||"";u&&u.apply(this,c);p!==(p=[e,f,d||(b.event||c).errorCharacter||"?",a].join(":"))&&k.push([p,h,+new Date,b.location].join("\n"))};setInterval(function(){k.length&&m.logErrors&&(m.logErrors(k),k.length=0)},307);q(b,"XMLHttpRequest","return new ActiveXObject('MSXML2.XMLHTTP')");
b.execScript||Function("d,Date,w","w.execScript=(1,eval)('(Date)')==d&&eval")(Date,1,b);q(b,"execScript","d=document;b=d.body;c=d.createElement('script');c.text=a;b.removeChild(b.insertBefore(c,b.firstChild))");b.xhr=m;var g={},y={env:{},nextTick:b.setImmediate||b.requestAnimationFrame||b.setTimeout};b.require=l;l.def=function(a,b){for(b in a)g[b]=a[b]};m.load=t;t(v,w)}(this,[]);

@@ -1,2 +0,2 @@

!function(f){function a(a,b){c[a]||(c[a]=e("a,b,c","var P='prototype';"+b),g.push(a))}var b,d,c,e=Function,h=escape,g=f._patched=[];e.nop=function(){};c=e.prototype;a("bind","var t=this;b=[].slice.call(arguments,1);c=function(){return t.apply(this instanceof c?this:a,b.concat(b.slice.call(arguments)))};if(t[P])c[P]=t[P];return c");c=Object;a("create","b=Function.nop;b[P]=a;a=new a;b[P]=null;return a");a("keys","c=[];for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return c");c=Array;
!function(f){function a(a,b){c[a]||(c[a]=e("a,b,c","var P='prototype';"+b),g.push(a))}var b,d,c,e=Function,h=escape,g=f._patched=[];e.nop=function(){};c=e.prototype;a("bind","var t=this;b=[].slice.call(arguments,1);c=function(){return t.apply(this instanceof c?this:a,b.concat(b.slice.call(arguments)))};if(t[P])c[P]=t[P];return c");c=Object;a("create","b=Function.nop;b[P]=a;a=new b;b[P]=null;return a");a("keys","c=[];for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return c");c=Array;
a("isArray","return a instanceof Array");c=c.prototype;d="if(t[i]===a)return i;return -1";a("indexOf","var t=this,l=t.length,o=[],i=-1;i+=b|0;while(++i<l)"+d);a("lastIndexOf","var t=this,l=t.length,o=[],i=-1;i=(b|0)||l;i>--l&&(i=l)||i<0&&(i+=l);++i;while(--i>-1)"+d);b="var t=this,l=t.length,o=[],i=-1;if(arguments.length<2)b=t";d="b=a.call(null,b,t[i],i,t);return b";a("reduce",b+"[++i];while(++i<l)"+d);a("reduceRight",b+"[--l];i=l;while(i--)"+d);b="var t=this,l=t.length,o=[],i=-1;while(++i<l)if(i in t)";

@@ -3,0 +3,0 @@ a("forEach",b+"a.call(b,t[i],i,t)");a("every",b+"if(!a.call(b,t[i],i,t))return!1;return!0");d=";return o";a("map",b+"o[i]=a.call(b,t[i],i,t)"+d);b+="if(a.call(b,t[i],i,t))";a("filter",b+"o.push(t[i])"+d);a("some",b+"return!0;return!1");c=String.prototype;a("trim","return this.replace(/^\\s+|\\s+$/g,'')");c=Date;a("now","return+new Date");c=c.prototype;a("toJSON","return this.format('iso')");f.JSON||(g.push("JSON"),f.JSON={map:{"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t",'"':'\\"',"\\":"\\\\"},

@@ -6,4 +6,4 @@ /*! litejs.com/MIT-LICENSE.txt */

/*
* @version 0.3.2
* @date 2016-01-13
* @version 0.4.0
* @date 2016-01-24
* @stability 1 - Experimental

@@ -277,3 +277,3 @@ * @author Lauri Rooden <lauri@rooden.ee>

/*
* @version 0.3.2
* @version 0.4.0
* @author Lauri Rooden <lauri@rooden.ee>

@@ -418,4 +418,4 @@ * @license MIT License

/*
* @version 0.3.2
* @date 2016-01-13
* @version 0.4.0
* @date 2016-01-24
* @stability 1 - Experimental

@@ -511,4 +511,4 @@ * @author Lauri Rooden <lauri@rooden.ee>

/*
* @version 0.3.2
* @date 2016-01-13
* @version 0.4.0
* @date 2016-01-24
* @stability 1 - Experimental

@@ -643,4 +643,6 @@ * @author Lauri Rooden <lauri@rooden.ee>

Event.stop = function(e) {
e.stopPropagation()
e.preventDefault()
if (e.preventDefault) {
e.stopPropagation()
e.preventDefault()
}
return false

@@ -664,3 +666,3 @@ }

/*
* @version 0.3.2
* @version 0.4.0
* @author Lauri Rooden <lauri@rooden.ee>

@@ -682,3 +684,3 @@ * @license MIT License

//** Event.keymap
!function() {
!function(Event) {
var maps = []

@@ -689,4 +691,6 @@ , keys = {

20:"caps", 27:"esc",
33:"pgup", 34:"pgdown", 35:"end", 36:"home", 37:"left", 38:"up", 39:"right",
40:"down", 45:"ins", 46:"del",
33:"pgup", 34:"pgdown",
35:"end", 36:"home",
37:"left", 38:"up", 39:"right", 40:"down",
45:"ins", 46:"del",
112:"f1", 113:"f2", 114:"f3", 115:"f4", 116:"f5", 117:"f6", 118:"f7", 119:"f8",

@@ -697,3 +701,3 @@ 120:"f9", 121:"f10", 122:"f11", 123:"f12"

function _key(e, chr) {
function _key(e, code, chr) {
var fn, map

@@ -706,20 +710,14 @@ , i = 0

if (!input || map.enable_input) {
fn = map[chr] || ( map.num && chr > "/" && chr < ":" ? (chr|=0, map.num) : map.all )
fn = map[code] ||
map[chr] ||
map.num && code > 47 && code < 58 && (chr|=0, map.num) ||
map.all
}
if (fn || !map.bubble) break
}
fn && fn(e, chr, el)
if (fn) fn(e, chr, el)
}
function getKey(e) {
var code = e.keyCode || e.which
// Numbers in numpad
if (code > 95 && code < 106) code -= 48
return keys[code] || String.fromCharCode(code) || code
}
Event.setKeyMap = maps.unshift.bind(maps)
Event.setKeyMap = function(map) {
maps.unshift(map)
}
Event.rmKeyMap = function(map) {

@@ -731,7 +729,8 @@ var i = maps.indexOf(map||maps[0])

function keydown(e) {
var code = e.keyCode || e.which
// Otherwise IE backspace navigates back
if (getKey(e) == "backspace" && maps[0] && maps[0].backspace) {
if (code == 8 && maps[0] && maps[0].backspace) {
Event.stop(e)
}
// is_down[ getKey(e) ] = 1
// is_down[ code ] = 1
}

@@ -741,12 +740,14 @@ Event.add(document, "keydown", keydown)

function keyup(e) {
var key = getKey(e)
_key(e, key)
e.ctrlKey && key != "ctrl" && _key(e, "ctrl+"+key)
e.altKey && key != "alt" && _key(e, "alt+"+key)
var code = e.keyCode || e.which
if (code > 95 && code < 106) code -= 48
var key = keys[code] || String.fromCharCode(code) || code
_key(e, code, key)
if (e.ctrlKey && code != 17) _key(e, code, "ctrl+" + key)
if (e.altKey && code != 18) _key(e, code, "alt+" + key)
//e.shiftKey
//is_down[ key ] = 0
//is_down.ctrl && _key(e, "ctrl+"+key, el, input)
//is_down.ctrl && _key(e, code, "ctrl+"+key, el, input)
}
Event.add(document, "keyup", keyup)
}()
}(Event)

@@ -762,4 +763,4 @@ //*/

/*
* @version 0.3.2
* @date 2016-01-13
* @version 0.4.0
* @date 2016-01-24
* @stability 1 - Experimental

@@ -892,4 +893,4 @@ * @author Lauri Rooden <lauri@rooden.ee>

/*
* @version 0.3.2
* @date 2016-01-13
* @version 0.4.0
* @date 2016-01-24
* @stability 1 - Experimental

@@ -904,3 +905,3 @@ * @author Lauri Rooden <lauri@rooden.ee>

!function(window, document, protoStr) {
var currentLang
var currentLang, styleNode
// JScript engine in IE<9 does not recognize vertical tabulation character

@@ -916,3 +917,3 @@ , ie678 = !+"\v1"

, scopeSeq = 0
, scopeData = El.data = { window: window, _: i18n }
, scopeData = El.data = { _: i18n }
, proto = (window.HTMLElement || window.Element || El)[protoStr]

@@ -1401,2 +1402,12 @@ , templateRe = /^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w\:.#\[\]=])*)[ \t]*(.*?)$/gm

El.css = function(str) {
if (!styleNode) {
// Safari and IE6-8 requires dynamically created
// <style> elements to be inserted into the <head>
styleNode = El("style").to(document.getElementsByTagName("head")[0])
}
if (styleNode.styleSheet) styleNode.styleSheet.cssText += str
else styleNode.appendChild(document.createTextNode(str))
}
//** templates

@@ -1415,3 +1426,5 @@

if (plugin) {
if (parent.txtMode) {
parent.txt += all + "\n"
} else if (plugin) {
if (El.plugins[name]) {

@@ -1458,3 +1471,2 @@ parent = (new El.plugins[name](parent, text)).el

t.el.plugin = t
return t
}

@@ -1477,4 +1489,23 @@

function js(parent) {
var t = this
t.txtMode = t.parent = parent
t.txt = ""
t.plugin = t.el = t
}
js[protoStr].done = Fn("Function(this.txt)(),this.parent")
El.plugins = {
"template": template
binding: js.extend({
done: function() {
Object.merge(bindings, Function("return({" + this.txt + "})")())
return this.parent
}
}),
css: js.extend({
done: Fn("El.css(this.txt),this.parent")
}),
js: js,
template: template
}

@@ -1547,4 +1578,4 @@

/*
* @version 0.3.2
* @date 2016-01-13
* @version 0.4.0
* @date 2016-01-24
* @stability 1 - Experimental

@@ -1669,4 +1700,4 @@ * @author Lauri Rooden <lauri@rooden.ee>

/*
* @version 0.3.2
* @date 2016-01-13
* @version 0.4.0
* @date 2016-01-24
* @stability 1 - Experimental

@@ -1801,2 +1832,3 @@ * @author Lauri Rooden <lauri@rooden.ee>

view.emit("show", opts)
View.emit("show", opts)
}

@@ -1806,2 +1838,3 @@ }

Object.merge(View, Event.Emitter)
Object.merge(View.prototype, Event.Emitter)

@@ -1808,0 +1841,0 @@

{
"name": "litejs",
"version": "0.3.2",
"version": "0.4.0",
"stability": 1,

@@ -15,3 +15,3 @@ "license": "MIT",

"dist",
"example",
"public",
"litejs.js",

@@ -30,9 +30,9 @@ "src"

"devDependencies": {
"browser-event-lite": "0.3.3",
"browser-event-lite": "0.4.0",
"browser-history-lite": "0.1.4",
"browser-upgrade-lite": "1.2.1",
"browser-upgrade-lite": "1.2.2",
"buildman": "0.2.33",
"testman": "0.3.1",
"date-format-lite": "0.7.4",
"elements-lite": "0.8.2",
"elements-lite": "0.9.0",
"functional-lite": "0.5.3",

@@ -71,5 +71,5 @@ "json-util": "1.0.3"

],
"example/m.css": "example/app.css",
"example/index.html": {
"template": "example/dev.html",
"public/m.css": "public/app.css",
"public/index.html": {
"template": "public/dev.html",
"manifest": "cache.manifest",

@@ -76,0 +76,0 @@ "bootstrap": "dist/load-min.js",

@@ -6,4 +6,4 @@ [npm package]: https://npmjs.org/package/litejs

@version 0.3.2
@date 2016-01-13
@version 0.4.0
@date 2016-01-24
@stability 1 - Experimental

@@ -24,4 +24,4 @@

See a [working example](https://cdn.rawgit.com/litejs/litejs/master/example/example1.html)
with a [source code](https://github.com/litejs/litejs/blob/master/example/example1.html)
See a [working example](https://cdn.rawgit.com/litejs/litejs/master/public/example1.html)
with a [source code](https://github.com/litejs/litejs/blob/master/public/example1.html)
in 60 lines.

@@ -28,0 +28,0 @@

@@ -25,5 +25,3 @@

!function(window, scripts, next) {
var styleNode
, document = window.document
, head = document.getElementsByTagName("head")[0]
var document = window.document
, xhrs = []

@@ -189,7 +187,10 @@ , loaded = {}

// - Opera 8.x passes 304
// - IE<10 returns 1223 and drop all response headers from PUT/POST
// - IE9 returns 1223 and drop all response headers from PUT/POST
// when it should be 204,
// http://www.enhanceie.com/ie/bugs.asp
//
method = xhr.status || -1 // Reuse variable for status
// - File protocol returns status code 0
// - Android 4.1 returns status code 0 when cache manifest is used
// - IE 10-11 returns status code 0 with CORS for codes 401, 403
method = xhr.status || 200 // Reuse variable for status
if (xhr._next) xhr._next.call(

@@ -276,16 +277,7 @@ xhr,

if (!err) {
if (type == "tpl") {
if (type == "tpl" || type == "css") {
xhr[++seq] = str
res[i] = "El.tpl(xhr[" + seq + "]);delete xhr[" + seq + "]"
} else if (type == "css") {
if (!styleNode) {
// Safari and IE6-8 requires dynamically created
// <style> elements to be inserted into the <head>
styleNode = head.appendChild(document.createElement("style"))
}
if (styleNode.styleSheet) styleNode.styleSheet.cssText += str
else styleNode.appendChild(document.createTextNode(str))
} else {
res[i] = str
str = "El." + type + "(xhr[" + seq + "]);delete xhr[" + seq + "]"
}
res[i] = str
}

@@ -292,0 +284,0 @@ if (!--pending) {

@@ -136,2 +136,3 @@

view.emit("show", opts)
View.emit("show", opts)
}

@@ -141,2 +142,3 @@ }

Object.merge(View, Event.Emitter)
Object.merge(View.prototype, Event.Emitter)

@@ -143,0 +145,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc