text: (function(){var w,q,s,C,t,D,E,F,G,H,x,y,A,I,u=Array.prototype.slice,r=Object.prototype.hasOwnProperty,B=function(b,a){function d(){this.constructor=b}for(var c in a)if(r.call(a,c))b[c]=a[c];d.prototype=a.prototype;b.prototype=new d;b.__super__=a.prototype;return b};t=function(){return function(b,a){this.x=b;this.y=a}}();D=function(){function b(a,d,c,f){this.x=a;this.y=d;this.w=c;this.h=f}b.prototype.translated=function(a){return new b(this.x+a.x,this.y+a.y,this.w,this.h)};b.prototype.scaled=function(a){return new b(this.x,
  this.y,this.w*a,this.h*a)};b.prototype.center=function(){return new t(this.x+this.w/2,this.y+this.h/2)};b.prototype.centeredAt=function(a){return new b(a.x-this.w/2,a.y-this.h/2,this.w,this.h)};b.prototype.centeredIn=function(a){return this.centeredAt(a.center())};return b}();H=function(b,a,d){return new D(b.x+(a.x-b.x)*d,b.y+(a.y-b.y)*d,b.w+(a.w-b.w)*d,b.h+(a.h-b.h)*d)};G=function(b,a,d){return new t(b.x+(a.x-b.x)*d,b.y+(a.y-b.y)*d)};C=function(){function b(a){this.e=a}b.prototype.getKeycode=function(){return this.e.charCode||
  this.e.keyCode};b.prototype.isRightButton=function(){if(this.e.which)return this.e.which===3;else if(e.button)return this.e.button===2};b.prototype.getPos=function(){if(this.e.pageX||this.e.pageY)return new t(this.e.pageX,this.e.pageY);else if(this.e.clientX||this.e.clientY)return new t(this.e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.e.clientY+document.body.scrollTop+document.documentElement.scrollTop)};b.prototype.controlDown=function(){return this.e.ctrlKey};b.prototype.altDown=
  function(){return this.e.altKey};b.prototype.shiftDown=function(){return this.e.shiftKey};b.prototype.metaDown=function(){return this.e.metaKey};b.prototype.stop=function(){if(this.e.stopPropagation)this.e.stopPropagation();else this.e.cancelBubble=true;return this.e.preventDefault?this.e.preventDefault():(this.e.returnValue=false)};return b}();s=function(){function b(){var a,d,c,f,g,h,k,j,i;a=arguments[0];d=2<=arguments.length?u.call(arguments,1):[];this._=g=document.createElement(a);h=0;for(j=d.length;h<
  j;h++){a=d[h];if(typeof a==="string")g.className=a;else if(a instanceof Array){k=0;for(i=a.length;k<i;k++){f=a[k];typeof f==="string"?g.appendChild(document.createTextNode(f)):g.appendChild(f._)}}else for(c in a)if(r.call(a,c))g[c]=""+a[c]}}b.prototype.appendChildren=function(a){var d,c,f,g;g=[];c=0;for(f=a.length;c<f;c++){d=a[c];g.push(this.appendChild(d))}return g};b.prototype.appendChild=function(a){return this._.appendChild(a._)};b.prototype.removeChildren=function(){var a,d;a=this._.lastChild;
  for(d=[];a;){this._.removeChild(a);d.push(a=this._.lastChild)}return d};b.prototype.setChildren=function(a){var d,c,f,g;this.removeChildren();g=[];c=0;for(f=a.length;c<f;c++){d=a[c];g.push(this.appendChild(d))}return g};b.prototype.setChild=function(a){return this.setChildren([a])};b.prototype.prependChild=function(a){this._.childNodes.length===0&&this._.appendChild(a._);return this._.insertBefore(a._,this._.firstChild)};b.prototype.insertBefore=function(a,d){return this._.insertBefore(a._,d._)};
  b.prototype.appendToBody=function(){return document.body.appendChild(this._)};b.prototype.appendToHead=function(){return document.getElementsByTagName("head")[0].appendChild(this._)};b.prototype.appendTo=function(a){return a._.appendChild(this._)};b.prototype.prependTo=function(a){return a.prependChild(this)};b.prototype.remove=function(){var a;return(a=this._.parentNode)!=null?a.removeChild(this._):void 0};b.prototype.setTextChild=function(a){this.removeChildren();return this._.appendChild(document.createTextNode(a))};
  b.prototype.setOpacity=function(a){var d;d=Math.round(100*a);return this.setStyles({opacity:a,filter:"alpha(opacity="+d+")","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(opacity="+d+")"})};b.prototype.setStyles=function(a){var d,c,f;f=[];for(d in a)if(r.call(a,d)){c=a[d];f.push(this._.style[d]=c)}return f};b.prototype.setPos=function(a){return this.setStyles({left:Math.round(a.x),top:Math.round(a.y)})};b.prototype.setRect=function(a){return this.setStyles({left:Math.round(a.x)+"px",top:Math.round(a.y)+
  "px",width:Math.round(a.w)+"px",height:Math.round(a.h)+"px"})};b.prototype.on=function(a,d){return this._["on"+a]=function(c){return d(new C(c))}};b.prototype.setClasses=function(a){return this._.className=a.join(" ")};b.prototype.getClasses=function(){return this._.className?this._.className.split(" "):[]};b.prototype.addClass=function(a){var d;d=this.getClasses();if(d.indexOf(a)===-1){d.push(a);return this.setClasses(d)}};b.prototype.removeClass=function(a){var d;d=this.getClasses();a=d.indexOf(a);
  if(a!==-1){d.splice(a,1);return this.setClasses(d)}};b.prototype.getValue=function(){return this._.value};b.prototype.setValue=function(a){return this._.value=a};b.prototype.scrollToBottom=function(){return this._.scrollTop=this._.scrollHeight-this._.clientHeight};return b}();q=function(){var b;b=1<=arguments.length?u.call(arguments,0):[];return function(a,d,c){c.prototype=a.prototype;c=new c;a=a.apply(c,d);return typeof a==="object"?a:c}(s,b,function(){})};w=function(){var b;b=1<=arguments.length?
  u.call(arguments,0):[];return function(a,d,c){c.prototype=a.prototype;c=new c;a=a.apply(c,d);return typeof a==="object"?a:c}(s,["div"].concat(u.call(b)),function(){})};(function(){function b(){var a,d,c,f,g,h,k,j=this;g=arguments[0];a=2<=arguments.length?u.call(arguments,1):[];if(typeof g==="string"){c="whole";d="Button "+g}else if(g.lmr){c="lmr";d="Button "+g.lmr}b.__super__.constructor.call(this,"a",d,[this.overlay=q("div","Boverlay")]);c==="lmr"&&this.appendChildren([q("table",[q("tr",[q("td",
  "BLR BL"),q("td","BM",[" "]),q("td","BLR BR")])])]);this.on("click",function(i){return j.click(i)});f=null;d={};h=0;for(k=a.length;h<k;h++){g=a[h];c=typeof g;if(c==="string")f=g;else if(c==="function")this.onclick=g;else _.extend(d,g)}if(d.id)this._.id=d.id;if(f)this.overlay.appendChild(this.label=w("Blabel",[f]))}B(b,s);b.prototype.setText=function(a){return this.label.setTextChild(a)};b.prototype.click=function(a){a&&a.stop();if(this.onclick)return this.onclick(a)};b.prototype.showLoader=function(){};
  b.prototype.hideLoader=function(){};return b})();y=function(b){return b<16?"0"+b.toString(16):b.toString(16)};A=function(b){return[parseInt(b.substr(1,2),16),parseInt(b.substr(3,2),16),parseInt(b.substr(5,2),16)]};I=function(b,a,d){return"#"+y(b)+y(a)+y(d)};F=function(b,a,d){var c,f,g,h;c=A(b);g=c[0];b=c[1];c=c[2];f=A(a);h=f[0];a=f[1];f=f[2];return I(Math.round(g+(h-g)*d),Math.round(b+(a-b)*d),Math.round(c+(f-c)*d))};E=function(){function b(a,d,c){var f=this;this.duration=a;this.transition=d;this.f=
  c;this.start=(new Date).getTime();this.f(0);setTimeout(function(){return f.step()},0)}b.prototype.step=function(){var a,d=this;a=((new Date).getTime()-this.start)/this.duration;if(a>1)a=1;this.f(this.transition(a));if(a<1)return setTimeout(function(){return d.step()},0)};return b}();(function(){return function(b,a){var d,c,f,g,h,k,j,i;c=a.duration;i=a.transition;g=a.oncomplete;h=a.opacity;j=a.rect;k=a.pos;d=a.background;b instanceof Array||(b=[b]);f=0;new E(c,i,function(o){var l,m,p;f++;m=0;for(p=
  b.length;m<p;m++){l=b[m];h&&l.setOpacity(h[0]+(h[1]-h[0])*o);j&&l.setRect(H(j[0],j[1],o));k&&l.setPos(G(k[0],k[1],o));if(d)l._.style.background=F(d[0],d[1],o)}if(o===1&&g)return g({numFrames:f,info:a})})}})();x=function(b){var a,d,c,f;a=typeof b;if(b===null||a==="undefined")return"null";else if(a==="boolean"||a==="number")return b.valueOf();else if(a==="string")return'"'+b.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/,"\\n")+'"';else if(b instanceof Array){a=[];c=0;for(f=b.length;c<f;c++){d=
  b[c];a.push(x(d))}return"["+a.join(",")+"]"}else{a=[];for(d in b)if(r.call(b,d)){c=b[d];a.push(x(d)+":"+x(c))}return"{"+a.join(",")+"}"}};var J;r=Object.prototype.hasOwnProperty;B=function(b,a){function d(){this.constructor=b}for(var c in a)if(r.call(a,c))b[c]=a[c];d.prototype=a.prototype;b.prototype=new d;b.__super__=a.prototype;return b};J=function(){function b(c){var f,g,h,k,j,i,o,l,m,p,v,n,z,K;g=c.container;f=c.color;k=c.data;p=c.intervals;j=c.day_size;n=c.num_weeks;b.__super__.constructor.call(this,
  "div","Calendar");g&&document.getElementById(g).appendChild(this._);p=p||[4,10,15,20];c=p.length;o=this.makeHolder(k,j,n);g={};l=new Date;i=l.getDay();h=6-(7+i-1)%7;l=new Date(l.getTime()+864E5*h);for(h=i=n-1;i<=0?h<=0:h>=0;i<=0?h++:h--)for(m=6;m>=0;m--){g[d(l)]=""+h+":"+m;l=new Date(l.getTime()-864E5)}l={};for(h=0;0<=n?h<n:h>n;0<=n?h++:h--)for(m=0;m<7;m++){i=w();i.setStyles({width:j+"px",height:j+"px",background:"#ebedf0",position:"absolute",left:1+(j+2)*h+"px",top:1+(j+2)*m+"px",zIndex:2});l[""+
  h+":"+m]=i;o.appendChild(i)}n=0;for(o=k.length;n<o;n++){h=k[n];j=h[0];z=h[1];if((h=g[j])&&z>0){v=i=0;for(K=p.length;v<K;v++){m=p[v];i=v+1;if(m>=z)break}l[h].setStyles({background:f,opacity:1/c*i});l[h]._.setAttribute("title",j+", "+z+" point(s)")}}}var a,d;B(b,s);b.prototype.makeHolder=function(c,f,g){c=f*g+1*(g+1);g=f*7+8;f=w();f.setStyles({width:c+"px",height:g+"px",position:"relative",background:"#FFFFFF"});this.appendChild(f);return f};a=function(c){return c.length===1?"0"+c:c};d=function(c){var f,
  g;f=1900+c.getYear();g=a(""+(c.getMonth()+1));c=a(""+c.getDate());return""+f+"-"+g+"-"+c};return b}();window.Calendar=J})();
  