}functionjd(a,b){varc;returnc=(c=id(a,b))?(c=c.Ic())&&c.name:a.j.Ic(),c?newI(c,a.j.get(c)):null}functionkd(a,b){varc;returnc=(c=id(a,b))?(c=c.Zb())&&c.name:a.j.Zb(),c?newI(c,a.j.get(c)):null}functionid(a,b){returnb===kc?null:a.sb.get(b.toString())}functionJ(a,b){if(null===a)returnK;varc=null;if("object"==typeofa&&".priority"ina?c=a[".priority"]:"undefined"!=typeofb&&(c=b),x(null===c||"string"==typeofc||"number"==typeofc||"object"==typeofc&&".sv"inc,"Invalid priority type found: "+typeofc),"object"==typeofa&&".value"ina&&null!==a[".value"]&&(a=a[".value"]),"object"!=typeofa||".sv"ina)returnnewXc(a,J(c));if(ainstanceofArray){vard=K,e=a;returnA(e,function(a,b){if(u(e,b)&&"."!==b.substring(0,1)){varc=J(a);(c.P()||!c.e())&&(d=d.I(b,c))}}),d.ib(J(c))}varf=[],g=!1,h=a;va(h,function(a){if("string"!=typeofa||"."!==a.substring(0,1)){varb=J(h[a]);b.e()||(g=g||!b.O().e(),f.push(newI(a,b)))}});vari=ed(f,cc,function(a){returna.name},dc);if(g){varj=ed(f,H(L));returnnew$c(i,J(c),newbd({".priority":j},{".priority":L}))}returnnew$c(i,J(c),gd)}functionod(a){this.count=parseInt(Math.log(a+1)/nd,10),this.Ve=this.count-1,this.Jf=a+1&parseInt(Array(this.count+1).join("1"),2)}functionpd(a){varb=!(a.Jf&1<<a.Ve);returna.Ve--,b}functioned(a,b,c,d){functione(b,d){varf=d-b;if(0==f)returnnull;if(1==f){varg=a[b],h=c?c(g):g;returnnewNc(h,g.K,!1,null,null)}varg=parseInt(f/2,10)+b,f=e(b,g),i=e(g+1,d),g=a[g],h=c?c(g):g;returnnewNc(h,g.K,!1,f,i)}a.sort(b);varf=function(b){functiond(b,d){vari=h-b,j=h;h-=b;varj=e(i+1,j),i=a[i],k=c?c(i):i,j=newNc(k,i.K,d,null,j);f?f.left=j:g=j,f=j}for(varf=null,g=null,h=a.length,i=0;i<b.count;++i){varj=pd(b),k=Math.pow(2,b.count-(i+1));j?d(k,!1):(d(k,!1),d(k,!0))}returng}(newod(a.length));returnnull!==f?newJc(d||b,f):newJc(d||b)}functionZc(a){return"number"==typeofa?"number:"+Bb(a):"string:"+a}functionYc(a){if(a.P()){varb=a.N();x("string"==typeofb||"number"==typeofb||"object"==typeofb&&u(b,".sv"),"Priority must be a string or number.")}elsex(a===ic||a.e(),"priority of unexpected type.");x(a===ic||a.O().e(),"Priority nodes can't have a priority of their own.")}functionqd(){$c.call(this,newJc(dc),K,gd)}functionC(a,b,c){this.G=a,this.U=b,this.w=c}functionrd(a){x(ea(a)&&0<a.length,"Requires a non-empty array"),this.Bf=a,this.Gc={}}functionsd(a,b){x(Oa(a.Bf,function(a){returna===b}),"Unknown event: "+b)}functiontd(){rd.call(this,["visible"]);vara,b;if("undefined"!=typeofdocument&&"undefined"!=typeofdocument.addEventListener&&("undefined"!=typeofdocument.hidden?(b="visibilitychange",a="hidden"):"undefined"!=typeofdocument.mozHidden?(b="mozvisibilitychange",a="mozHidden"):"undefined"!=typeofdocument.msHidden?(b="msvisibilitychange",a="msHidden"):"undefined"!=typeofdocument.webkitHidden&&(b="webkitvisibilitychange",a="webkitHidden")),this.qc=!0,b){varc=this;document.addEventListener(b,function(){varb=!document[a];b!==c.qc&&(c.qc=b,c.Td("visible",b))},!1)}}functionud(){if(rd.call(this,["online"]),this.Lc=!0,"undefined"!=typeofwindow&&"undefined"!=typeofwindow.addEventListener){vara=this;window.addEventListener("online",function(){a.Lc||a.Td("online",!0),a.Lc=!0},!1),window.addEventListener("offline",function(){a.Lc&&a.Td("online",!1),a.Lc=!1},!1)}}functionA(a,b){for(varcina)b.call(void0,a[c],c,a)}functiondd(a,b){varc,d={};for(cina)d[c]=b.call(void0,a[c],c,a);returnd}functionKb(a,b){for(varcina)if(!b.call(void0,a[c],c,a))return!1;return!0}functionIb(a){varb,c=0;for(bina)c++;returnc}functionJb(a){for(varbina)returnb}functionvd(a){varb,c=[],d=0;for(bina)c[d++]=a[b];returnc}functionwd(a){varb,c=[],d=0;for(bina)c[d++]=b;returnc}functionld(a,b){for(varcina)if(a[c]==b)return!0;return!1}functionxd(a,b,c){for(vardina)if(b.call(c,a[d],d,a))returnd}functionyd(a,b){varc=xd(a,b,void0);returnc&&a[c]}functionzd(a){for(varbina)return!1;return!0}functionAd(a,b){returnbina?a[b]:void0}functionmd(a){varb,c={};for(bina)c[b]=a[b];returnc}functionCd(a){for(varb,c,d=1;d<arguments.length;d++){c=arg
returnv(a.gc,c)}functionTg(a,b,c){vard=a.ma.get(b);returnx(d,"Missing sync point for query tag that we're tracking"),d.Xa(c,newHg(b,a.Bb),null)}functionQg(a,b){returnbh(a,b,a.ma,null,newHg(S,a.Bb))}functionbh(a,b,c,d,e){if(b.path.e())returnch(a,b,c,d,e);varf=c.get(S);null==d&&null!=f&&(d=f.za(S));varg=[],h=G(b.path),i=b.Mc(h);if((c=c.children.get(h))&&i)varj=d?d.B(h):null,h=e.k(h),g=g.concat(bh(a,i,c,j,h));returnf&&(g=g.concat(f.Xa(b,e,d))),g}functionch(a,b,c,d,e){varf=c.get(S);null==d&&null!=f&&(d=f.za(S));varg=[];returnc.children.Ba(function(c,f){varh=d?d.B(c):null,i=e.k(c),j=b.Mc(c);j&&(g=g.concat(ch(a,j,f,h,i)))}),f&&(g=g.concat(f.Xa(b,e,d))),g}functiondh(a){this.Q=a,this.Pa=Jd(a),this.Z=newRe,this.zd=1,this.S=newve(this.Q,q(this.Cd,this),q(this.Ad,this),q(this.Ee,this)),this.tg=Kd(a,q(function(){returnnewGd(this.Pa,this.S)},this)),this.pc=newDc,this.qe=newQe;varb=this;this.ud=newPg({Le:function(a,c,d,e){returnc=[],d=b.qe.Wc.$(a.path),d.e()||(c=b.ud.Ra(a.path,d),setTimeout(function(){e("ok")},0)),c},Od:ba}),eh(this,"connected",!1),this.ga=newNe,this.T=newrf(a,q(this.S.T,this.S),q(this.S.Pe,this.S),q(this.Be,this)),this.jd=0,this.re=null,this.M=newPg({Le:function(a,c,d,e){returnze(b.S,a,d,c,function(c,d){varf=e(c,d);Ve(b.Z,a.path,f)}),[]},Od:function(a,c){vard=b.S,e=a.path.toString(),f=a.Da();if(d.f("Unlisten called for "+e+" "+f),Be(d,e,f)&&d.da){varg=Bc(a);d.f("Unlisten on "+e+" for "+f),e={p:e},c&&(e.q=g,e.t=c),d.wa("n",e)}}})}functionfh(a){varb=newP(".info/serverTimeOffset");returna=a.qe.Wc.$(b).N()||0,(newDate).getTime()+a}functiongh(a){returna=a={timestamp:fh(a)},a.timestamp=a.timestamp||(newDate).getTime(),a}functioneh(a,b,c){b=newP("/.info/"+b),c=J(c);vard=a.qe;d.Wc=d.Wc.L(b,c),c=a.ud.Ra(b,c),Ve(a.Z,b,c)}functionih(a){a.f("onDisconnectEvents");varb=gh(a),c=[];Pe(Ff(a.ga,b),S,function(b,d){c=c.concat(a.M.Ra(b,d));vare=kh(a,b);hh(a,e)}),a.ga=newNe,Ve(a.Z,S,c)}functionlh(a,b,c,d){vare=J(c);De(a.S,b.toString(),e.N(!0),function(c,f){"ok"===c&&a.ga.ic(b,e),jh(d,c,f)})}functionmh(a,b,c,d,e){varf=J(c,d);De(a.S,b.toString(),f.N(!0),function(c,d){"ok"===c&&a.ga.ic(b,f),jh(e,c,d)})}functionnh(a,b,c,d){vare,f=!0;for(einc)f=!1;f?(ib("onDisconnect().update() called with empty data. Don't do anything."),jh(d,"ok")):Ge(a.S,b.toString(),c,function(e,f){if("ok"===e)for(varginc){varh=J(c[g]);a.ga.ic(b.k(g),h)}jh(d,e,f)})}functionzc(a,b,c){c=".info"===G(b.path)?a.ud.Jb(b,c):a.M.Jb(b,c),Ac(a.Z,b.path,c)}functionjh(a,b,c){a&&Db(function(){if("ok"==b)a(null,c);else{vard=(b||"error").toUpperCase(),e=d;c&&(e+=": "+c),e=Error(e),e.code=d,a(e)}})}functionoh(a,b,c,d,e){functionf(){}a.f("transaction on "+b);varg=newO(a,b);if(g.zb("value",f),c={path:b,update:c,H:d,status:null,lf:fb(),Qe:e,rf:0,Vd:function(){g.bc("value",f)},Yd:null,ra:null,fd:null,gd:null,hd:null},d=a.M.xa(b,void0)||K,c.fd=d,d=c.update(d.N()),n(d)){Rb("transaction failed: Data returned ",d),c.status=1,e=Ec(a.pc,b);varh=e.ta()||[];h.push(c),Fc(e,h),"object"==typeofd&&null!==d&&u(d,".priority")?(h=v(d,".priority"),x(Pb(h),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):h=(a.M.xa(b)||K).O().N(),e=gh(a),d=J(d,h),e=Gf(d,e),c.gd=d,c.hd=e,c.ra=a.zd++,c=a.M.Fa(b,e,c.ra,c.Qe),Ve(a.Z,b,c),ph(a)}elsec.Vd(),c.gd=null,c.hd=null,c.H&&(a=newC(c.fd,newO(a,c.path),L),c.H(null,!1,a))}functionph(a,b){varc=b||a.pc;if(b||qh(a,c),null!==c.ta()){vard=rh(a,c);x(0<d.length,"Sending zero length transaction queue"),Na(d,function(a){return1===a.status})&&sh(a,c.path(),d)}elsec.pd()&&c.fa(function(b){ph(a,b)})}functionsh(a,b,c){for(vard=La(c,function(a){returna.ra}),e=a.M.xa(b,d)||K,d=e,e=e.hash(),f=0;f<c.length;f++){varg=c[f];x(1===g.status,"tryToSendTransactionQueue_: items in queue should all be run."),g.status=2,g.rf++;varh=T(b,g.path),d=d.L(h,g.gd)}d=d.N(!0),a.S.put(b.toString(),d,function(d){a.f("transaction put response",{path:b.toString(),status:d});vare=[];if("ok"===d){for(d=[],f=0;f<c.length;f++){if(c[f].status=3,e=e.concat(a.M.Ea(c[f].
},h=Td.prototype,h.add=function(a,b){this.set[a]=null!==b?b:!0},h.contains=function(a){returnu(this.set,a)},h.get=function(a){returnthis.contains(a)?this.set[a]:void0},h.remove=function(a){deletethis.set[a]},h.clear=function(){this.set={}},h.e=function(){returnzd(this.set)},h.count=function(){returnIb(this.set)};varWd,Xd;Vd.prototype.open=function(a,b){this.Ue=0,this.ga=b,this.gf=newQd(a),this.ub=!1;varc=this;this.ob=setTimeout(function(){c.f("Timed out trying to connect."),c.eb(),c.ob=null},Math.floor(3e4)),ub(function(){if(!c.ub){c.Ma=newYd(function(a,b,d){if(Zd(c,arguments),c.Ma)if(c.ob&&(clearTimeout(c.ob),c.ob=null),c.zc=!0,"start"==a)c.id=b,c.mf=d;else{if("close"!==a)throwError("Unrecognized command received: "+a);b?(c.Ma.Jd=!1,Rd(c.gf,b,function(){c.eb()})):c.eb()}},function(a,b){Zd(c,arguments),Sd(c.gf,a,b)},function(){c.eb()},c.bd);vara={start:"t"};a.ser=Math.floor(1e8*Math.random()),c.Ma.Ud&&(a.cb=c.Ma.Ud),a.v="5",c.Kd&&(a.s=c.Kd),"undefined"!=typeoflocation&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(a.r="f"),a=c.bd(a),c.f("Connecting via long-poll to "+a),$d(c.Ma,a,function(){})}})},Vd.prototype.start=function(){vara=this.Ma,b=this.mf;for(a.Wf=this.id,a.Xf=b,a.Zd=!0;ae(a););a=this.id,b=this.mf,this.$b=document.createElement("iframe");varc={dframe:"t"};c.id=a,c.pw=b,this.$b.src=this.bd(c),this.$b.style.display="none",document.body.appendChild(this.$b)},Vd.isAvailable=function(){return!(Xd||"object"==typeofwindow&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href)||"object"==typeofWindows&&"object"==typeofWindows.yg)},h=Vd.prototype,h.wd=function(){},h.Yc=function(){this.ub=!0,this.Ma&&(this.Ma.close(),this.Ma=null),this.$b&&(document.body.removeChild(this.$b),this.$b=null),this.ob&&(clearTimeout(this.ob),this.ob=null)},h.eb=function(){this.ub||(this.f("Longpoll is closing itself"),this.Yc(),this.ga&&(this.ga(this.zc),this.ga=null))},h.close=function(){this.ub||(this.f("Longpoll is being closed."),this.Yc())},h.send=function(a){a=t(a),this.lb+=a.length,Ed(this.Pa,"bytes_sent",a.length),a=kb(a),a=eb(a,!0),a=zb(a,1840);for(varb=0;b<a.length;b++){varc=this.Ma;c.Qc.push({ng:this.Ue,vg:a.length,We:a[b]}),c.Zd&&ae(c),this.Ue++}},Yd.prototype.close=function(){if(this.Zd=!1,this.va){this.va.$a.body.innerHTML="";vara=this;setTimeout(function(){null!==a.va&&(document.body.removeChild(a.va),a.va=null)},Math.floor(0))}varb=this.fb;b&&(this.fb=null,b())};varee=[Vd,Md];ge.prototype.wa=function(a){re(this,{t:"d",d:a})},ge.prototype.Bd=function(a){oe(this),this.cc(a)},ge.prototype.close=function(){2!==this.Oa&&(this.f("Closing realtime connection."),this.Oa=2,ne(this),this.ga&&(this.ga(),this.ga=null))};varwe=0,ye=0;h=ve.prototype,h.wa=function(a,b,c){vard=++this.mg;a={r:d,a:a,b:b},this.f(t(a)),x(this.da,"sendRequest call when we're not connected not allowed."),this.Ua.wa(a),c&&(this.Tc[d]=c)},h.T=function(a,b,c){this.Lb={Mf:a,Ye:!1,sc:b,cd:c},this.f("Authenticating using credential: "+a),Ce(this),(b=40==a.length)||(a=se(a).fe,b="object"==typeofa&&!0===v(a,"admin")),b&&(this.f("Admin auth credential detected. Reducing max reconnect time."),this.xd=3e4)},h.Pe=function(a){deletethis.Lb,this.da&&this.wa("unauth",{},function(b){a(b.s,b.d)})},h.Ce=function(a,b){this.da?Ee(this,"oc",a,null,b):this.Jc.push({Pc:a,action:"oc",data:null,H:b})},h.put=function(a,b,c,d){He(this,"p",a,b,c,d)},h.Bd=function(a){if("r"ina){this.f("from server: "+t(a));varb=a.r,c=this.Tc[b];c&&(deletethis.Tc[b],c(a.b))}else{if("error"ina)throw"A server-side error has occurred: "+a.error;"a"ina&&(b=a.a,c=a.b,this.f("handleServerMessage",b,c),"d"===b?this.Cd(c.p,c.d,!1,c.t):"m"===b?this.Cd(c.p,c.d,!0,c.t):"c"===b?Ke(this,c.p,c.q):"ac"===b?(a=c.s,b=c.d,c=this.Lb,deletethis.Lb,c&&c.cd&&c.cd(a,b)):"sd"===b?this.Ke?this.Ke(c):"msg"inc&&"undefined"!=typeofconsole&&console.log("FIREBASE: "+c.msg.replace("\n","\nFIREBASE: ")):qb("Unrecognized action received from server: "+t(b)+"\nAre you using the latest client?"))}},h.Kc=function(a){this.f("connection ready"),this.da=!0,this.Dc=(newDat
},O.prototype.parent=O.prototype.parent,O.prototype.root=function(){D("Firebase.ref",0,0,arguments.length);for(vara=this;null!==a.parent();)a=a.parent();returna},O.prototype.root=O.prototype.root,O.prototype.toString=function(){D("Firebase.toString",0,0,arguments.length);vara;if(null===this.parent())a=this.g.toString();else{a=this.parent().toString()+"/";varb=this.key();a+=encodeURIComponent(String(b))}returna},O.prototype.toString=O.prototype.toString,O.prototype.set=function(a,b){D("Firebase.set",1,2,arguments.length),Yb("Firebase.set",this.path),Qb("Firebase.set",a,!1),F("Firebase.set",2,b,!0),this.g.Db(this.path,a,null,b||null)},O.prototype.set=O.prototype.set,O.prototype.update=function(a,b){if(D("Firebase.update",1,2,arguments.length),Yb("Firebase.update",this.path),ea(a)){for(varc={},d=0;d<a.length;++d)c[""+d]=a[d];a=c,z("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}if(Tb("Firebase.update",a),F("Firebase.update",2,b,!0),u(a,".priority"))throwError("update() does not currently support updating .priority.");this.g.update(this.path,a,b||null)},O.prototype.update=O.prototype.update,O.prototype.Db=function(a,b,c){if(D("Firebase.setWithPriority",2,3,arguments.length),Yb("Firebase.setWithPriority",this.path),Qb("Firebase.setWithPriority",a,!1),Ub("Firebase.setWithPriority",2,b),F("Firebase.setWithPriority",3,c,!0),".length"===this.key()||".keys"===this.key())throw"Firebase.setWithPriority failed: "+this.key()+" is a read-only object.";this.g.Db(this.path,a,b,c||null)},O.prototype.setWithPriority=O.prototype.Db,O.prototype.remove=function(a){D("Firebase.remove",0,1,arguments.length),Yb("Firebase.remove",this.path),F("Firebase.remove",1,a,!0),this.set(null,a)},O.prototype.remove=O.prototype.remove,O.prototype.transaction=function(a,b,c){if(D("Firebase.transaction",1,3,arguments.length),Yb("Firebase.transaction",this.path),F("Firebase.transaction",1,a,!1),F("Firebase.transaction",2,b,!0),n(c)&&"boolean"!=typeofc)throwError(E("Firebase.transaction",3,!0)+"must be a boolean.");if(".length"===this.key()||".keys"===this.key())throw"Firebase.transaction failed: "+this.key()+" is a read-only object.";"undefined"==typeofc&&(c=!0),oh(this.g,this.path,a,b||null,c)},O.prototype.transaction=O.prototype.transaction,O.prototype.pg=function(a,b){D("Firebase.setPriority",1,2,arguments.length),Yb("Firebase.setPriority",this.path),Ub("Firebase.setPriority",1,a),F("Firebase.setPriority",2,b,!0),this.g.Db(this.path.k(".priority"),a,null,b)},O.prototype.setPriority=O.prototype.pg,O.prototype.push=function(a,b){D("Firebase.push",0,2,arguments.length),Yb("Firebase.push",this.path),Qb("Firebase.push",a,!0),F("Firebase.push",2,b,!0);varc=fh(this.g),c=Ah(c),c=this.k(c);return"undefined"!=typeofa&&null!==a&&c.set(a,b),c},O.prototype.push=O.prototype.push,O.prototype.fb=function(){returnYb("Firebase.onDisconnect",this.path),newZ(this.g,this.path)},O.prototype.onDisconnect=O.prototype.fb,O.prototype.T=function(a,b,c){z("FirebaseRef.auth() being deprecated. Please use FirebaseRef.authWithCustomToken() instead."),D("Firebase.auth",1,3,arguments.length),Zb("Firebase.auth",a),F("Firebase.auth",2,b,!0),F("Firebase.auth",3,b,!0),xf(this.g.T,a,{},{remember:"none"},b,c)},O.prototype.auth=O.prototype.T,O.prototype.Pe=function(a){D("Firebase.unauth",0,1,arguments.length),F("Firebase.unauth",1,a,!0),yf(this.g.T,a)},O.prototype.unauth=O.prototype.Pe,O.prototype.ne=function(){returnD("Firebase.getAuth",0,0,arguments.length),this.g.T.ne()},O.prototype.getAuth=O.prototype.ne,O.prototype.$f=function(a,b){D("Firebase.onAuth",1,2,arguments.length),F("Firebase.onAuth",1,a,!1),Lb("Firebase.onAuth",2,b),this.g.T.zb("auth_status",a,b)},O.prototype.onAuth=O.prototype.$f,O.prototype.Yf=function(a,b){D("Firebase.offAuth",1,2,arguments.length),F("Firebase.offAuth",1,a,!1),Lb("Firebase.offAuth",2,b),this.g.T.bc("auth_status",a,b)},O.prototype.offAuth=O.prototype.Yf,O.prototype.Df=function(a,b,c){D("Firebase.aut
}functiondb(a,b){varc,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));returnd}functioneb(a){varb,c=a._i;c===d?a._d=newDate:y(c)?a._d=newDate(+c):null!==(b=Nb.exec(c))?a._d=newDate(+b[1]):"string"==typeofc?cb(a):x(c)?(a._a=db(c.slice(0),function(a){returnparseInt(a,10)}),W(a)):"object"==typeofc?X(a):"number"==typeofc?a._d=newDate(c):wb.createFromInputFallback(a)}functionfb(a,b,c,d,e,f,g){varh=newDate(a,b,c,d,e,f,g);return1970>a&&h.setFullYear(a),h}functiongb(a){varb=newDate(Date.UTC.apply(null,arguments));return1970>a&&b.setUTCFullYear(a),b}functionhb(a,b){if("string"==typeofa)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeofa)returnnull}elsea=parseInt(a,10);returna}functionib(a,b,c,d,e){returne.relativeTime(b||1,!!c,a,d)}functionjb(a,b,c){vard=wb.duration(a).abs(),e=Bb(d.as("s")),f=Bb(d.as("m")),g=Bb(d.as("h")),h=Bb(d.as("d")),i=Bb(d.as("M")),j=Bb(d.as("y")),k=e<pc.s&&["s",e]||1===f&&["m"]||f<pc.m&&["mm",f]||1===g&&["h"]||g<pc.h&&["hh",g]||1===h&&["d"]||h<pc.d&&["dd",h]||1===i&&["M"]||i<pc.M&&["MM",i]||1===j&&["y"]||["yy",j];returnk[2]=b,k[3]=+a>0,k[4]=c,ib.apply({},k)}functionkb(a,b,c){vard,e=c-b,f=c-a.day();returnf>e&&(f-=7),e-7>f&&(f+=7),d=wb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}functionlb(a,b,c,d,e){varf,g,h=gb(a,0,1).getUTCDay();returnh=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:G(a-1)+g}}functionmb(a){varb=a._i,c=a._f;returna._locale=a._locale||wb.localeData(a._l),null===b||c===d&&""===b?wb.invalid({nullInput:!0}):("string"==typeofb&&(a._i=b=a._locale.preparse(b)),wb.isMoment(b)?newn(b,!0):(c?x(c)?ab(a):Z(a):eb(a),newn(a)))}functionnb(a,b){varc,d;if(1===b.length&&x(b[0])&&(b=b[0]),!b.length)returnwb();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);returnc}functionob(a,b){varc;return"string"==typeofb&&(b=a.localeData().monthsParse(b),"number"!=typeofb)?a:(c=Math.min(a.date(),E(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}functionpb(a,b){returna._d["get"+(a._isUTC?"UTC":"")+b]()}functionqb(a,b,c){return"Month"===b?ob(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}functionrb(a,b){returnfunction(c){returnnull!=c?(qb(this,a,c),wb.updateOffset(this,b),this):pb(this,a)}}functionsb(a){return400*a/146097}functiontb(a){return146097*a/400}functionub(a){wb.duration.fn[a]=function(){returnthis._data[a]}}functionvb(a){"undefined"==typeofender&&(xb=Ab.moment,Ab.moment=a?i("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",wb):wb)}for(varwb,xb,yb,zb="2.8.3",Ab="undefined"!=typeofc?c:this,Bb=Math.round,Cb=Object.prototype.hasOwnProperty,Db=0,Eb=1,Fb=2,Gb=3,Hb=4,Ib=5,Jb=6,Kb={},Lb=[],Mb="undefined"!=typeofb&&b.exports,Nb=/^\/?Date\((\-?\d+)/i,Ob=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Pb=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Qb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,Rb=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,Sb=/\d\d?/,Tb=/\d{1,3}/,Ub=/\d{1,4}/,Vb=/[+\-]?\d{1,6}/,Wb=/\d+/,Xb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Yb=/Z|[\+\-]\d\d:?\d\d/gi,Zb=/T/i,$b=/[\+\-]?\d+(\.\d{1,3})?/,_b=/\d{1,2}/,ac=/\d/,bc=/\d\d/,cc=/\d{3}/,dc=/\d{4}/,ec=/[+-]?\d{6}/,fc=/[+-]?\d+/,gc=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,hc="YYYY-MM-DDTHH:mm:ssZ",ic=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],jc=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],kc=/([\+\-]|\d\d)/gi,lc=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Se
}).forEach(function(a){returnb.mark(a)}),d.scheduleTask(this.unlock))},bind:function(){this.root.viewmodel.register(this.keypath,this)},rebind:function(a){this.unbind(),this.keypath=a,this.counterpart.otherKeypath=a,this.bind()},unbind:function(){this.root.viewmodel.unregister(this.keypath,this)}},function(a,b,c,d){varf,g,h,i,j;f=c+"="+d,h=a.bindings,h[f]||(g=a.instance,i=newe(b,c,g,d),h.push(i),g.twoway&&(j=newe(g,d,b,c),h.push(j),i.counterpart=j,j.counterpart=i),h[f]=i)}}(f,u),w=function(a,b,c){functiond(a,b){varc;if("."===b)returna;if(c=a?a.split("."):[],"../"===b.substr(0,3)){for(;"../"===b.substr(0,3);){if(!c.length)thrownewError(f);c.pop(),b=b.substring(3)}returnc.push(b),c.join(".")}returna?a+b.replace(/^\.\//,"."):b.replace(/^\.\/?/,"")}vare,f,g;returnf='Could not resolve reference - too many "../" prefixes',g={evaluateWrapped:!0},e=functionh(e,f,i,j){vark,l,m,n,o,p,q,r,s,t;if(f=a(f),"~/"===f.substr(0,2))returnf.substring(2);if("."===f.charAt(0))returnd(b(i),f);l=f.split(".")[0],i=i||{};doif(k=i.context,k&&(p=!0,o=e.viewmodel.get(k,g),o&&("object"==typeofo||"function"==typeofo)&&lino))returnk+"."+f;while(i=i.parent);if(line.data||line.viewmodel.computations)returnf;if(e._parent&&!e.isolated){if(p=!0,i=e.component.parentFragment,i.indexRefs&&void0!==(m=i.indexRefs[f]))returne.component.indexRefBindings[f]=f,voide.viewmodel.set(f,m,!0);if(n=h(e._parent,f,i,!0)){for(q=n.split("."),r=f.split(".");q.length>1&&r.length>1&&q[q.length-1]===r[r.length-1];)q.pop(),r.pop();returns=q.join("."),t=r.join("."),e.viewmodel.set(t,e._parent.viewmodel.get(s),!0),c(e.component,e._parent,s,t),f}}returnj||p?void0!==e.viewmodel.get(f)?f:void0:(e.viewmodel.set(f,void0),f)}}(s,t,v),x=function(a){functionb(a){a.detach()}functionc(a){a.detachNodes()}functiond(a){!a.ready||a.outros.length||a.outroChildren||(a.outrosComplete||(a.parent?a.parent.decrementOutros(a):a.detachNodes(),a.outrosComplete=!0),a.intros.length||a.totalChildren||("function"==typeofa.callback&&a.callback(),a.parent&&a.parent.decrementTotal()))}vare=function(a,b){this.callback=a,this.parent=b,this.intros=[],this.outros=[],this.children=[],this.totalChildren=this.outroChildren=0,this.detachQueue=[],this.outrosComplete=!1,b&&b.addChild(this)};returne.prototype={addChild:function(a){this.children.push(a),this.totalChildren+=1,this.outroChildren+=1},decrementOutros:function(){this.outroChildren-=1,d(this)},decrementTotal:function(){this.totalChildren-=1,d(this)},add:function(a){varb=a.isIntro?this.intros:this.outros;b.push(a)},remove:function(b){varc=b.isIntro?this.intros:this.outros;a(c,b),d(this)},init:function(){this.ready=!0,d(this)},detachNodes:function(){this.detachQueue.forEach(b),this.children.forEach(c)}},e}(q),y=function(a,b,c,d,e,f){functiong(){vara,b,c;for(a=0;a<k.viewmodels.length;a+=1)b=k.viewmodels[a],c=b.applyChanges(),c&&n.fire(b.ractive,c);for(k.viewmodels.length=0,h(),a=0;a<k.views.length;a+=1)k.views[a].update();for(k.views.length=0,a=0;a<k.tasks.length;a+=1)k.tasks[a]();returnk.tasks.length=0,k.viewmodels.length?g():void0}functionh(){vara,b,c,d;for(a=m.length;a--;)b=m[a],b.keypath&&m.splice(a,1),(c=e(b.root,b.ref,b.parentFragment))&&((d||(d=[])).push({item:b,keypath:c}),m.splice(a,1));d&&d.forEach(i)}functioni(a){a.item.resolve(a.keypath)}varj,k,l,m=[],n=newb("change");returnl={start:function(a,b){varc,e;returnb&&(c=newd(function(a){returne=a})),k={previousBatch:k,transitionManager:newf(e,k&&k.transitionManager),views:[],tasks:[],viewmodels:[],instance:a},a&&k.viewmodels.push(a.viewmodel),c},end:function(){g(),k.transitionManager.init(),!k.previousBatch&&k.instance&&(k.instance.viewmodel.changes=[]),k=k.previousBatch},addViewmodel:function(a){returnk?-1===k.viewmodels.indexOf(a)?(k.viewmodels.push(a),!0):!1:(a.applyChanges(),!1)},registerTransition:function(a){a._manager=k.transitionManager,k.transitionManager.add(a)},addView:function(a){k.views.push(a)},addUnresolved:function(a){m.push(a)},removeUnresolved:function(a){c(m,a)},detachWhenReady:function(a){k.transitionManager.detachQueue.push(a)},s
if(!a.matchString(","))returnnull;a.allowWhitespace()}returnnull}]}),function(a,b){varc=newe(a,{values:b});returnc.result}}(qb,$,ab),Gb=function(a,b,c,d){vare,f=/^([a-zA-Z_$][a-zA-Z_$0-9]*)\(/;returne=a.extend({converters:[b]}),function(a){varb,g,h,i,j,k,l,m,n;if("string"==typeofa){if(g=f.exec(a))returnb={m:g[1]},i="["+a.slice(b.m.length+1,-1)+"]",h=newe(i),b.a=c(h.result[0]),b;if(-1===a.indexOf(":"))returna.trim();a=[a]}if(b={},l=[],m=[],a){for(;a.length;)if(j=a.shift(),"string"==typeofj){if(k=j.indexOf(":"),-1!==k){k&&l.push(j.substr(0,k)),j.length>k+1&&(m[0]=j.substring(k+1));break}l.push(j)}elsel.push(j);m=m.concat(a)}returnl.length?m.length||"string"!=typeofl?(b={n:1===l.length&&"string"==typeofl[0]?l[0]:l},1===m.length&&"string"==typeofm[0]?(n=d("["+m[0]+"]"),b.a=n?n.value:m[0].trim()):b.d=m):b=l:b="",b}}(qb,ob,pb,Fb),Hb=function(a,b,c,d,e,f,g,h){functioni(d){vare,f,i,k,m,u,v,w,x,y,z;if(e=d.pos,d.inside||d.inAttribute)returnnull;if(!d.matchString("<"))returnnull;if("/"===d.nextChar())returnnull;if(f={t:a.ELEMENT},d.includeLinePositions&&(f.p=d.getLinePos(e)),d.matchString("!")&&(f.y=1),f.e=d.matchPattern(n),!f.e)returnnull;for(o.test(d.nextChar())||d.error("Illegal tag name"),u=function(a,b){varc=b.n||b;r.test(c)&&(d.pos-=c.length,d.error("Cannot use reserved event names (change, reset, teardown, update, construct, config, init, render, unrender, detach, insert)")),f.v[a]=b},d.allowWhitespace();v=c(d)||g(d);)v.name?(k=s[v.name])?f[k]=h(v.value):(m=q.exec(v.name))?(f.v||(f.v={}),w=h(v.value),u(m[1],w)):d.sanitizeEventAttributes&&p.test(v.name)||(f.a||(f.a={}),f.a[v.name]=v.value||0):(f.m||(f.m=[]),f.m.push(v)),d.allowWhitespace();if(d.allowWhitespace(),d.matchString("/")&&(x=!0),!d.matchString(">"))returnnull;if(i=f.e.toLowerCase(),!x&&!b.test(f.e)){for(("script"===i||"style"===i)&&(d.inside=i),y=[];j(i,d.remaining())&&(z=d.read(l))&&z.t!==a.CLOSING&&z.t!==a.CLOSING_TAG;)y.push(z);y.length&&(f.f=y)}returnd.inside=null,d.sanitizeElements&&-1!==d.sanitizeElements.indexOf(i)?t:f}functionj(a,b){varc,d;returnc=/^<([a-zA-Z][a-zA-Z0-9]*)/.exec(b),d=m[a],c&&d?!~d.indexOf(c[1].toLowerCase()):!0}vark,l,m,n=/^[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/,o=/^[\s\n\/>]/,p=/^on/,q=/^on-([a-zA-Z\\*\\.$_][a-zA-Z\\*\\.$_0-9\-]+)$/,r=/^(?:change|reset|teardown|update|construct|config|init|render|unrender|detach|insert)$/,s={"intro-outro":"t0",intro:"t1",outro:"t2",decorator:"o"},t={exclude:!0};returnl=[c,d,i,e,f],m={li:["li"],dt:["dt","dd"],dd:["dt","dd"],p:"address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul".split(" "),rt:["rt","rp"],rp:["rt","rp"],optgroup:["optgroup"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tfoot:["tbody"],tr:["tr","tbody"],td:["td","th","tr"],th:["td","th","tr"]},k=i}(S,zb,xb,yb,Cb,Db,Eb,Gb),Ib=function(){vara=/^[ \t\f\r\n]+/,b=/[ \t\f\r\n]+$/;returnfunction(c,d,e){varf;d&&(f=c[0],"string"==typeoff&&(f=f.replace(a,""),f?c[0]=f:c.shift())),e&&(f=c[c.length-1],"string"==typeoff&&(f=f.replace(b,""),f?c[c.length-1]=f:c.pop()))}}(),Jb=function(a){functionb(a){return"string"==typeofa}functionc(b){returnb.t===a.COMMENT||b.t===a.DELIMCHANGE}functiond(b){return(b.t===a.SECTION||b.t===a.INVERTED)&&b.f}vare,f=/^\s*\r?\n/,g=/\r?\n\s*$/;returne=function(a){vare,h,i,j,k;for(e=1;e<a.length;e+=1)h=a[e],i=a[e-1],j=a[e-2],b(h)&&c(i)&&b(j)&&g.test(j)&&f.test(h)&&(a[e-2]=j.replace(g,"\n"),a[e]=h.replace(f,"")),d(h)&&b(i)&&g.test(i)&&b(h.f[0])&&f.test(h.f[0])&&(a[e-1]=i.replace(g,"\n"),h.f[0]=h.f[0].replace(f,"")),b(h)&&d(i)&&(k=i.f[i.f.length-1],b(k)&&g.test(k)&&f.test(h)&&(i.f[i.f.length-1]=k.replace(g,"\n"),a[e]=h.replace(f,"")));returna}}(S),Kb=function(){vara=/[-/\\^$*+?.()|[\]{}]/g;returnfunction(b){returnb.replace(a,"\\$&")}}(),Lb=function(a,b,c,d,e,f,g,h,i){functionj(b,c,d,e,f,i){vark,l,m,n,s,t,u,v,w;for(h(b),k=b.length;k--;)l=b[k],l.exclude?b.splice(k,1):c&&l.t===a.COMMENT&&b.splice(k,1);for(g(b,e,f),k=b.length;k--;)if(l=b[k],l.f&&(s=d||l.t===a.ELEMENT&&p.test(l.e),s||
},getValue:function(){returnthis.element.node.files}});returnc}(Ae,Be),Me=function(a,b){functionc(){vara;b.call(this),a=this._ractive.root.viewmodel.get(this._ractive.binding.keypath,f),this.value=void0==a?"":a}vard,e,f;returnf={evaluateWrapped:!0},e=a.extend({getInitialValue:function(){return""},getValue:function(){returnthis.element.node.value},render:function(){vara=this.element.node;a.addEventListener("change",b,!1),this.root.lazy||(a.addEventListener("input",b,!1),a.attachEvent&&a.addEventListener("keyup",b,!1)),a.addEventListener("blur",c,!1)},unrender:function(){vara=this.element.node;a.removeEventListener("change",b,!1),a.removeEventListener("input",b,!1),a.removeEventListener("keyup",b,!1),a.removeEventListener("blur",c,!1)}}),d=e}(Ae,Be),Ne=function(a){returna.extend({getInitialValue:function(){returnvoid0},getValue:function(){vara=parseFloat(this.element.node.value);returnisNaN(a)?void0:a}})}(Me),Oe=function(a,b,c,d,e,f,g,h,i,j,k){functionl(a){returna&&a.isBindable}varm;returnm=function(m){varn,o,p,q,r=m.attributes;returnm.binding&&(m.binding.teardown(),m.binding=null),(m.getAttribute("contenteditable")||r.contenteditable&&l(r.contenteditable))&&l(r.value)?o=b:"input"===m.name?(n=m.getAttribute("type"),"radio"===n||"checkbox"===n?(p=l(r.name),q=l(r.checked),p&&q&&a.error({message:"badRadioInputBinding"}),p?o="radio"===n?d:e:q&&(o="radio"===n?c:f)):"file"===n&&l(r.value)?o=i:l(r.value)&&(o="number"===n||"range"===n?j:k)):"select"===m.name&&l(r.value)?o=m.getAttribute("multiple")?h:g:"textarea"===m.name&&l(r.value)&&(o=k),o?newo(m):void0}}(o,Ce,Ee,Fe,Ge,He,Ie,Ke,Le,Ne,Me),Pe=function(){vara=this.getAction();a&&!this.hasListener?this.listen():!a&&this.hasListener&&this.unrender()},Qe=function(a){returnfunction(b){a(this.root,this.getAction(),{event:b})}}(mc),Re=function(){returnthis.action.toString().trim()},Se=function(a,b,c,d,e){functionf(a){varb,c,d;if(b=this.root,"function"!=typeofb[this.method])thrownewError('Attempted to call a non-existent method ("'+this.method+'")');c=this.keypaths.map(function(c){vard,e,f;if(void0===c)returnvoid0;if(c.eventObject){if(d=a,e=c.refinements.length)for(f=0;e>f;f+=1)d=d[c.refinements[f]]}elsed=b.viewmodel.get(c);returnd}),b.event=a,d=this.fn.apply(null,c),b[this.method].apply(b,d),deleteb.event}functiong(a){d(this.root,this.getAction(),{event:a,args:this.params})}functionh(a){varb=this.dynamicParams.getValue(k);"string"==typeofb&&(b=b.substr(1,b.length-2)),d(this.root,this.getAction(),{event:a,args:b})}vari,j,k={args:!0},l=/^event(?:\.(.+))?/;returnc.push(function(){j=c.Fragment}),i=function(c,d,i){vark,m,n,o=this;o.element=c,o.root=c.root,o.name=d,-1!==d.indexOf("*")&&(e.error({debug:this.root.debug,message:"noElementProxyEventWildcards",args:{element:c.tagName,event:d}}),this.invalid=!0),i.m?(m=i.a.r,o.method=i.m,o.keypaths=[],o.fn=a(i.a.s,m.length),o.parentFragment=c.parentFragment,n=o.root,o.refResolvers=m.map(function(a,c){vard;return(d=l.exec(a))?(o.keypaths[c]={eventObject:!0,refinements:d[1]?d[1].split("."):[]},null):b(o,a,function(a){o.resolve(c,a)})}),this.fire=f):(k=i.n||i,"string"!=typeofk&&(k=newj({template:k,root:this.root,owner:this})),this.action=k,i.d?(this.dynamicParams=newj({template:i.d,root:this.root,owner:this.element}),this.fire=h):i.a&&(this.params=i.a,this.fire=g))}}(cd,bd,f,mc,o),Te=function(a){varb,c;b=this._ractive,c=b.events[a.type],c.fire({node:this,original:a,index:b.index,keypath:b.keypath,context:b.root.get(b.keypath)})},Ue=function(a,b,c){functiond(a){returnf[a]||(f[a]=function(b){varc=b.node._ractive;b.index=c.index,b.keypath=c.keypath,b.context=c.root.get(c.keypath),c.events[a].fire(b)}),f[a]}vare,f={},g={touchstart:!0,touchmove:!0,touchend:!0,touchcancel:!0,touchleave:!0};returne=function(){vare,f=this.name;if(!this.invalid){if(e=a.registries.events.find(this.root,f))this.custom=e(this.node,d(f));else{if(!("on"+finthis.node||window&&"on"+finwindow))returnvoid(g[f]||c.error({debug:this.root.debug,message:"missingPlugin",args:{plugin:"event",name:f}}));this.node.addEventListener(
casea.PARTIAL:returnnewg(l);casea.COMMENT:returnnewj(l);default:thrownewError("Something very strange happened. Please file an issue at https://github.com/ractivejs/ractive/issues. Thanks!")}}}(S,Vc,kd,Bd,Od,Ff,Jf,Kf,dg,eg,fg),hg=function(a,b,c){returnfunction(d){vare,f,g,h=this;if(this.owner=d.owner,e=this.parent=this.owner.parentFragment,this.root=d.root,this.pElement=d.pElement,this.context=d.context,this.owner.type===a.SECTION&&(this.index=d.index),e&&(f=e.indexRefs)){this.indexRefs=b(null);for(ginf)this.indexRefs[g]=f[g]}d.indexRef&&(this.indexRefs||(this.indexRefs={}),this.indexRefs[d.indexRef]=d.index),"string"==typeofd.template?d.template=[d.template]:d.template||(d.template=[]),this.items=d.template.map(function(a,b){returnc({parentFragment:h,pElement:d.pElement,template:a,index:b})}),this.value=this.argsList=null,this.dirtyArgs=this.dirtyValue=!0,this.bound=!0}}(S,T,gg),ig=function(a){returnfunction(b,c,d,e){this.index=c,a(this,"context",d,e),this.indexRefs&&void0!==this.indexRefs[b]&&(this.indexRefs[b]=c),this.items.forEach(function(a){a.rebind&&a.rebind(b,c,d,e)})}}(hf),jg=function(){vara;return1===this.items.length?a=this.items[0].render():(a=document.createDocumentFragment(),this.items.forEach(function(b){a.appendChild(b.render())})),this.rendered=!0,a},kg=function(a){returnthis.items?this.items.map(function(b){returnb.toString(a)}).join(""):""},lg=function(){functiona(a){a.unbind&&a.unbind()}varb;returnb=function(){this.bound&&(this.items.forEach(a),this.bound=!1)}}(),mg=function(a){if(!this.rendered)thrownewError("Attempted to unrender a fragment that was not rendered");this.items.forEach(function(b){returnb.unrender(a)}),this.rendered=!1},ng=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){varr=function(a){this.init(a)};returnr.prototype={bubble:a,detach:b,find:c,findAll:d,findAllComponents:e,findComponent:f,findNextNode:g,firstNode:h,getNode:i,getValue:j,init:k,rebind:l,render:m,toString:n,unbind:o,unrender:p},q.Fragment=r,r}(Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,hg,ig,jg,kg,lg,mg,f),og=function(a,b,c,d){vare=["template","partials","components","decorators","events"],f=newa("reset");returnfunction(a,g){varh,i,j,k,l;if("function"!=typeofa||g?a=a||{}:(g=a,a={}),"object"!=typeofa)thrownewError("The reset method takes either no arguments, or an object containing new data");for((i=this.viewmodel.wrapped[""])&&i.reset?i.reset(a)===!1&&(this.data=a):this.data=a,j=d.reset(this),k=j.length;k--;)if(e.indexOf(j[k])>-1){l=!0;break}if(l){varm;this.viewmodel.mark(""),(m=this.component)&&(m.shouldDestroy=!0),this.unrender(),m&&(m.shouldDestroy=!1),this.fragment.template!==this.template&&(this.fragment.unbind(),this.fragment=newc({template:this.template,root:this,owner:this})),h=this.render(this.el,this.anchor)}elseh=b.start(this,!0),this.viewmodel.mark(""),b.end();returnf.fire(this,a),g&&h.then(g),h}}(p,y,ng,Vb),pg=function(a,b){returnfunction(c){vard,e;a.template.init(null,this,{template:c}),d=this.transitionsEnabled,this.transitionsEnabled=!1,(e=this.component)&&(e.shouldDestroy=!0),this.unrender(),e&&(e.shouldDestroy=!1),this.fragment.unbind(),this.fragment=newb({template:this.template,root:this,owner:this}),this.render(this.el,this.anchor),this.transitionsEnabled=d}}(Vb,ng),qg=function(a){returna("reverse")}(Dc),rg=function(a,b,c,d){vare=/\*/;returnfunction(f,g,h){vari,j,k=this;if(j=a.start(this,!0),b(f)){i=f,h=g;for(fini)i.hasOwnProperty(f)&&(g=i[f],f=c(f),this.viewmodel.set(f,g))}elsef=c(f),e.test(f)?d(this,f).forEach(function(a){k.viewmodel.set(a,g)}):this.viewmodel.set(f,g);returna.end(),h&&j.then(h.bind(this)),j}}(y,i,J,tc),sg=function(a){returna("shift")}(Dc),tg=function(a){returna("sort")}(Dc),ug=function(a){returna("splice")}(Dc),vg=function(a){returnfunction(b,c){returna(this,b,void0===c?-1:-c)}}(H),wg=function(a,b,c){vard=newa("teardown");returnfunction(a){vare;returnthis.fragment.unbind(),this.viewmodel.teardown(),this.fragment.rendered&&this.el.__ractive_instances__&&c(this.el.__ractive_instances__,this),this.shouldDestroy=!0,e=this.fragment.rendered?th
},{}],44:[function(a,b){b.exports={v:1,t:[{t:7,e:"div",a:{id:"projects"},f:[{t:7,e:"div",a:{"class":"header"},f:[{t:7,e:"a",a:{"class":"sort"},v:{click:"sortBy"},f:[{t:7,e:"Icons",a:{icon:"sort"}}," Sorted by ",{t:2,r:"projects.sortBy"}]}," ",{t:7,e:"h2",f:["Projects"]}]}," ",{t:7,e:"table",f:[{t:4,r:"projects.list",f:[{t:4,n:50,r:"errors",f:[{t:7,e:"tr",f:[{t:7,e:"td",a:{colspan:"3","class":"repo"},f:[{t:7,e:"div",a:{"class":"project"},f:[{t:2,r:"owner"},"/",{t:2,r:"name"}," ",{t:7,e:"span",a:{"class":"error",title:[{t:2,x:{r:["errors"],s:'_0.join("\\n")'}}]},f:[{t:7,e:"Icons",a:{icon:"warning"}}]}]}]}]}]}]}," ",{t:4,r:"projects.index",f:[{t:4,x:{r:["."],s:"{index:_0}"},f:[{t:4,x:{r:["index.0","projects.list"],s:"{project:_1[_0]}"},f:[{t:4,n:53,r:"project",f:[{t:4,x:{r:["index.1","project.milestones"],s:"{milestone:_1[_0]}"},f:[{t:7,e:"tr",a:{"class":[{t:4,n:50,r:"milestone.stats.isDone",f:["done"]}]},f:[{t:7,e:"td",a:{"class":"repo"},f:[{t:7,e:"a",a:{"class":"project",href:["#",{t:2,r:"owner"},"/",{t:2,r:"name"}]},f:[{t:2,r:"owner"},"/",{t:2,r:"name"}]}]}," ",{t:7,e:"td",f:[{t:7,e:"a",a:{"class":"milestone",href:["#",{t:2,r:"owner"},"/",{t:2,r:"name"},"/",{t:2,r:"milestone.number"}]},f:[{t:2,r:"milestone.title"}]}]}," ",{t:7,e:"td",a:{style:"width:1%"},f:[{t:7,e:"div",a:{"class":"progress"},f:[{t:7,e:"span",a:{"class":"percent"},f:[{t:2,x:{r:["milestone.stats.progress.points"],s:"Math.floor(_0)"}},"%"]}," ",{t:7,e:"span",a:{"class":["due ",{t:4,n:50,r:"milestone.stats.isOverdue",f:["red"]}]},f:[{t:3,x:{r:["format","milestone.due_on"],s:"_0.due(_1)"}}]}," ",{t:7,e:"div",a:{"class":"outer bar"},f:[{t:7,e:"div",a:{"class":["inner bar ",{t:2,x:{r:["milestone.stats.isOnTime"],s:'(_0)?"green":"red"'}}],style:["width:",{t:2,r:"milestone.stats.progress.points"},"%"]}}]}]}]}]}]}]}]}]}]}]}," ",{t:7,e:"div",a:{"class":"footer"},f:[]}]}]}},{}],45:[function(a,b){varc,d,e;e=a("lodash"),d=a("moment"),c=a("marked"),b.exports={fromNow:e.memoize(function(a){returnd(a).fromNow()}),due:function(a){returna?["due",this.fromNow(a)].join(" "):" "},markdown:function(a){returnc(a)},title:function(a){returna.toLowerCase().indexOf("milestone")>-1?a:["Milestone",a].join(" ")},hexToDec:function(a){returnparseInt(a,16)}}},{lodash:7,marked:9,moment:10}],46:[function(a,b){b.exports={is:function(a){varb;return"keyup"===(b=a.original.type)||"keydown"===b},isEnter:function(a){return13===a.original.which}}},{}],47:[function(a){varb;b=a("lodash"),b.mixin({pluckMany:function(a,c){if(!b.isArray(c))throw"`keys` needs to be an Array";returnb.map(a,function(a){vard;returnd={},b.each(c,function(b){returnd[b]=a[b]}),d})},isInt:function(a){return!isNaN(a)&&parseInt(Number(a))===a&&!isNaN(parseInt(a,10))}})},{lodash:7}],48:[function(a,b){varc,d,e;e=a("lodash"),c=a("ractive"),d=a("../../modules/mediator.coffee"),b.exports=c.extend({subscribe:function(a,b,c){returnnull==c&&(c=this),e.isArray(this._subs)||(this._subs=[]),e.isFunction(b)?this._subs.push(d.on(a,e.bind(b,c))):console.log("Warning: `cb` is not a function")},publish:function(){returnd.fire.apply(d,arguments)},onteardown:function(){vara,b,c,d,f;if(e.isArray(this._subs)){for(d=this._subs,f=[],b=0,c=d.length;c>b;b++)a=d[b],f.push(e.isFunction(a.cancel)?a.cancel():console.log("Warning: `sub.cancel` is not a function"));returnf}}})},{"../../modules/mediator.coffee":30,lodash:7,ractive:13}],49:[function(a,b){varc;c=a("./eventful.coffee"),b.exports=function(a){varb,d;returnb=c.extend(a),d=newb,d.render(),d}},{"./eventful.coffee":48}],50:[function(a,b){varc,d,e,f;c=a("ractive"),e=a("d3"),a("d3-tip")(e),f=a("../modules/chart/lines.coffee"),d=a("../modules/chart/axes.coffee"),b.exports=c.extend({name:"views/chart",template:a("../templates/chart.html"),oncomplete:function(){vara,b,c,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;returno=this.data.milestone,i=o.issues,r=i.open.size+i.closed.size,c=i.closed.list[0].closed_at,i.length&&o.created_at>c&&(o.created_at=c),a=f.actual(i.closed.list,o.created_at,r),h=f.ideal(o.created_at,o.due_on,r),s=f.trend(a,o.created_at,o.due_on),y=this.el.getBounding