burnchart/public/js/bundle.min.js

39 lines
1.1 MiB
JavaScript
Raw Normal View History

2016-10-01 00:19:39 +00:00
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.burnchart=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){(function(process,global){(function(){var async={};function noop(){}function identity(v){return v}function toBool(v){return!!v}function notId(v){return!v}var previous_async;var root=typeof self==="object"&&self.self===self&&self||typeof global==="object"&&global.global===global&&global||this;if(root!=null){previous_async=root.async}async.noConflict=function(){root.async=previous_async;return async};function only_once(fn){return function(){if(fn===null)throw new Error("Callback was already called.");fn.apply(this,arguments);fn=null}}function _once(fn){return function(){if(fn===null)return;fn.apply(this,arguments);fn=null}}var _toString=Object.prototype.toString;var _isArray=Array.isArray||function(obj){return _toString.call(obj)==="[object Array]"};var _isObject=function(obj){var type=typeof obj;return type==="function"||type==="object"&&!!obj};function _isArrayLike(arr){return _isArray(arr)||typeof arr.length==="number"&&arr.length>=0&&arr.length%1===0}function _arrayEach(arr,iterator){var index=-1,length=arr.length;while(++index<length){iterator(arr[index],index,arr)}}function _map(arr,iterator){var index=-1,length=arr.length,result=Array(length);while(++index<length){result[index]=iterator(arr[index],index,arr)}return result}function _range(count){return _map(Array(count),function(v,i){return i})}function _reduce(arr,iterator,memo){_arrayEach(arr,function(x,i,a){memo=iterator(memo,x,i,a)});return memo}function _forEachOf(object,iterator){_arrayEach(_keys(object),function(key){iterator(object[key],key)})}function _indexOf(arr,item){for(var i=0;i<arr.length;i++){if(arr[i]===item)return i}return-1}var _keys=Object.keys||function(obj){var keys=[];for(var k in obj){if(obj.hasOwnProperty(k)){keys.push(k)}}return keys};function _keyIterator(coll){var i=-1;var len;var keys;if(_isArrayLike(coll)){len=coll.length;return function next(){i++;return i<len?i:null}}else{keys=_keys(coll);len=keys.length;return function next(){i++;return i<len?keys[i]:null}}}function _restParam(func,startIndex){startIndex=startIndex==null?func.length-1:+startIndex;return function(){var length=Math.max(arguments.length-startIndex,0);var rest=Array(length);for(var index=0;index<length;index++){rest[index]=arguments[index+startIndex]}switch(startIndex){case 0:return func.call(this,rest);case 1:return func.call(this,arguments[0],rest)}}}function _withoutIndex(iterator){return function(value,index,callback){return iterator(value,callback)}}var _setImmediate=typeof setImmediate==="function"&&setImmediate;var _delay=_setImmediate?function(fn){_setImmediate(fn)}:function(fn){setTimeout(fn,0)};if(typeof process==="object"&&typeof process.nextTick==="function"){async.nextTick=process.nextTick}else{async.nextTick=_delay}async.setImmediate=_setImmediate?_delay:async.nextTick;async.forEach=async.each=function(arr,iterator,callback){return async.eachOf(arr,_withoutIndex(iterator),callback)};async.forEachSeries=async.eachSeries=function(arr,iterator,callback){return async.eachOfSeries(arr,_withoutIndex(iterator),callback)};async.forEachLimit=async.eachLimit=function(arr,limit,iterator,callback){return _eachOfLimit(limit)(arr,_withoutIndex(iterator),callback)};async.forEachOf=async.eachOf=function(object,iterator,callback){callback=_once(
2016-02-23 08:11:25 +00:00
};function d3_bisector(compare){return{left:function(a,x,lo,hi){if(arguments.length<3)lo=0;if(arguments.length<4)hi=a.length;while(lo<hi){var mid=lo+hi>>>1;if(compare(a[mid],x)<0)lo=mid+1;else hi=mid}return lo},right:function(a,x,lo,hi){if(arguments.length<3)lo=0;if(arguments.length<4)hi=a.length;while(lo<hi){var mid=lo+hi>>>1;if(compare(a[mid],x)>0)hi=mid;else lo=mid+1}return lo}}}var d3_bisect=d3_bisector(d3_ascending);d3.bisectLeft=d3_bisect.left;d3.bisect=d3.bisectRight=d3_bisect.right;d3.bisector=function(f){return d3_bisector(f.length===1?function(d,x){return d3_ascending(f(d),x)}:f)};d3.shuffle=function(array,i0,i1){if((m=arguments.length)<3){i1=array.length;if(m<2)i0=0}var m=i1-i0,t,i;while(m){i=Math.random()*m--|0;t=array[m+i0],array[m+i0]=array[i+i0],array[i+i0]=t}return array};d3.permute=function(array,indexes){var i=indexes.length,permutes=new Array(i);while(i--)permutes[i]=array[indexes[i]];return permutes};d3.pairs=function(array){var i=0,n=array.length-1,p0,p1=array[0],pairs=new Array(n<0?0:n);while(i<n)pairs[i]=[p0=p1,p1=array[++i]];return pairs};d3.transpose=function(matrix){if(!(n=matrix.length))return[];for(var i=-1,m=d3.min(matrix,d3_transposeLength),transpose=new Array(m);++i<m;){for(var j=-1,n,row=transpose[i]=new Array(n);++j<n;){row[j]=matrix[j][i]}}return transpose};function d3_transposeLength(d){return d.length}d3.zip=function(){return d3.transpose(arguments)};d3.keys=function(map){var keys=[];for(var key in map)keys.push(key);return keys};d3.values=function(map){var values=[];for(var key in map)values.push(map[key]);return values};d3.entries=function(map){var entries=[];for(var key in map)entries.push({key:key,value:map[key]});return entries};d3.merge=function(arrays){var n=arrays.length,m,i=-1,j=0,merged,array;while(++i<n)j+=arrays[i].length;merged=new Array(j);while(--n>=0){array=arrays[n];m=array.length;while(--m>=0){merged[--j]=array[m]}}return merged};var abs=Math.abs;d3.range=function(start,stop,step){if(arguments.length<3){step=1;if(arguments.length<2){stop=start;start=0}}if((stop-start)/step===Infinity)throw new Error("infinite range");var range=[],k=d3_range_integerScale(abs(step)),i=-1,j;start*=k,stop*=k,step*=k;if(step<0)while((j=start+step*++i)>stop)range.push(j/k);else while((j=start+step*++i)<stop)range.push(j/k);return range};function d3_range_integerScale(x){var k=1;while(x*k%1)k*=10;return k}function d3_class(ctor,properties){for(var key in properties){Object.defineProperty(ctor.prototype,key,{value:properties[key],enumerable:false})}}d3.map=function(object,f){var map=new d3_Map;if(object instanceof d3_Map){object.forEach(function(key,value){map.set(key,value)})}else if(Array.isArray(object)){var i=-1,n=object.length,o;if(arguments.length===1)while(++i<n)map.set(i,object[i]);else while(++i<n)map.set(f.call(object,o=object[i],i),o)}else{for(var key in object)map.set(key,object[key])}return map};function d3_Map(){this._=Object.create(null)}var d3_map_proto="__proto__",d3_map_zero="\x00";d3_class(d3_Map,{has:d3_map_has,get:function(key){return this._[d3_map_escape(key)]},set:function(key,value){return this._[d3_map_escape(key)]=value},remove:d3_map_remove,keys:d3_map_keys,values:function(){var values=[];for(var key in this._)values.push(this._[key]);return values},entries:function(){var entries=[];for(var key in this._)entries.push({key:d3_map_unescape(key),value:this._[key]});return entries},size:d3_map_size,empty:d3_map_empty,forEach:function(f){for(var key in this._)f.call(this,d3_map_unescape(key),this._[key])}});function d3_map_escape(key){return(key+="")===d3_map_proto||key[0]===d3_map_zero?d3_map_zero+key:key}function d3_map_unescape(key){return(key+="")[0]===d3_map_zero?key.slice(1):key}function d3_map_has(key){return d3_map_escape(key)in this._}function d3_map_remove(key){return(key=d3_map_escape(key))in this._&&delete this._[key]}function d3_map_keys(){var keys=[];for(var key in this._)keys.push(d3_map_unescape(key));return keys}function d3_map_size(){var size=0;for(var key in this._)++size;return size}function d3_map_empty(){for(var key in this._)return false;return tr
d3_selection_interrupt.call(that);zoomstarted(dispatch);function moved(){dragged=1;translateTo(d3.mouse(that),location0);zoomed(dispatch)}function ended(){subject.on(mousemove,null).on(mouseup,null);dragRestore(dragged);zoomended(dispatch)}}function touchstarted(){var that=this,dispatch=event.of(that,arguments),locations0={},distance0=0,scale0,zoomName=".zoom-"+d3.event.changedTouches[0].identifier,touchmove="touchmove"+zoomName,touchend="touchend"+zoomName,targets=[],subject=d3.select(that),dragRestore=d3_event_dragSuppress(that);started();zoomstarted(dispatch);subject.on(mousedown,null).on(touchstart,started);function relocate(){var touches=d3.touches(that);scale0=view.k;touches.forEach(function(t){if(t.identifier in locations0)locations0[t.identifier]=location(t)});return touches}function started(){var target=d3.event.target;d3.select(target).on(touchmove,moved).on(touchend,ended);targets.push(target);var changed=d3.event.changedTouches;for(var i=0,n=changed.length;i<n;++i){locations0[changed[i].identifier]=null}var touches=relocate(),now=Date.now();if(touches.length===1){if(now-touchtime<500){var p=touches[0];zoomTo(that,p,locations0[p.identifier],Math.floor(Math.log(view.k)/Math.LN2)+1);d3_eventPreventDefault()}touchtime=now}else if(touches.length>1){var p=touches[0],q=touches[1],dx=p[0]-q[0],dy=p[1]-q[1];distance0=dx*dx+dy*dy}}function moved(){var touches=d3.touches(that),p0,l0,p1,l1;d3_selection_interrupt.call(that);for(var i=0,n=touches.length;i<n;++i,l1=null){p1=touches[i];if(l1=locations0[p1.identifier]){if(l0)break;p0=p1,l0=l1}}if(l1){var distance1=(distance1=p1[0]-p0[0])*distance1+(distance1=p1[1]-p0[1])*distance1,scale1=distance0&&Math.sqrt(distance1/distance0);p0=[(p0[0]+p1[0])/2,(p0[1]+p1[1])/2];l0=[(l0[0]+l1[0])/2,(l0[1]+l1[1])/2];scaleTo(scale1*scale0)}touchtime=null;translateTo(p0,l0);zoomed(dispatch)}function ended(){if(d3.event.touches.length){var changed=d3.event.changedTouches;for(var i=0,n=changed.length;i<n;++i){delete locations0[changed[i].identifier]}for(var identifier in locations0){return void relocate()}}d3.selectAll(targets).on(zoomName,null);subject.on(mousedown,mousedowned).on(touchstart,touchstarted);dragRestore();zoomended(dispatch)}}function mousewheeled(){var dispatch=event.of(this,arguments);if(mousewheelTimer)clearTimeout(mousewheelTimer);else d3_selection_interrupt.call(this),translate0=location(center0=center||d3.mouse(this)),zoomstarted(dispatch);mousewheelTimer=setTimeout(function(){mousewheelTimer=null;zoomended(dispatch)},50);d3_eventPreventDefault();scaleTo(Math.pow(2,d3_behavior_zoomDelta()*.002)*view.k);translateTo(center0,translate0);zoomed(dispatch)}function dblclicked(){var p=d3.mouse(this),k=Math.log(view.k)/Math.LN2;zoomTo(this,p,location(p),d3.event.shiftKey?Math.ceil(k)-1:Math.floor(k)+1)}return d3.rebind(zoom,event,"on")};var d3_behavior_zoomInfinity=[0,Infinity],d3_behavior_zoomDelta,d3_behavior_zoomWheel;d3.color=d3_color;function d3_color(){}d3_color.prototype.toString=function(){return this.rgb()+""};d3.hsl=d3_hsl;function d3_hsl(h,s,l){return this instanceof d3_hsl?void(this.h=+h,this.s=+s,this.l=+l):arguments.length<2?h instanceof d3_hsl?new d3_hsl(h.h,h.s,h.l):d3_rgb_parse(""+h,d3_rgb_hsl,d3_hsl):new d3_hsl(h,s,l)}var d3_hslPrototype=d3_hsl.prototype=new d3_color;d3_hslPrototype.brighter=function(k){k=Math.pow(.7,arguments.length?k:1);return new d3_hsl(this.h,this.s,this.l/k)};d3_hslPrototype.darker=function(k){k=Math.pow(.7,arguments.length?k:1);return new d3_hsl(this.h,this.s,k*this.l)};d3_hslPrototype.rgb=function(){return d3_hsl_rgb(this.h,this.s,this.l)};function d3_hsl_rgb(h,s,l){var m1,m2;h=isNaN(h)?0:(h%=360)<0?h+360:h;s=isNaN(s)?0:s<0?0:s>1?1:s;l=l<0?0:l>1?1:l;m2=l<=.5?l*(1+s):l+s-l*s;m1=2*l-m2;function v(h){if(h>360)h-=360;else if(h<0)h+=360;if(h<60)return m1+(m2-m1)*h/60;if(h<180)return m2;if(h<240)return m1+(m2-m1)*(240-h)/60;return m1}function vv(h){return Math.round(v(h)*255)}return new d3_rgb(vv(h+120),vv(h),vv(h-120))}d3.hcl=d3_hcl;function d3_hcl(h,c,l){return this instanceof d3_hcl?void(this.h=+h,this.c=+c,this.l=+l):arguments.length<2?h ins
2016-01-21 22:57:53 +00:00
}function d3_time_formatRe(names){return new RegExp("^(?:"+names.map(d3.requote).join("|")+")","i")}function d3_time_formatLookup(names){var map=new d3_Map,i=-1,n=names.length;while(++i<n)map.set(names[i].toLowerCase(),i);return map}function d3_time_parseWeekdayNumber(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i,i+1));return n?(date.w=+n[0],i+n[0].length):-1}function d3_time_parseWeekNumberSunday(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i));return n?(date.U=+n[0],i+n[0].length):-1}function d3_time_parseWeekNumberMonday(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i));return n?(date.W=+n[0],i+n[0].length):-1}function d3_time_parseFullYear(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i,i+4));return n?(date.y=+n[0],i+n[0].length):-1}function d3_time_parseYear(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i,i+2));return n?(date.y=d3_time_expandYear(+n[0]),i+n[0].length):-1}function d3_time_parseZone(date,string,i){return/^[+-]\d{4}$/.test(string=string.slice(i,i+5))?(date.Z=-string,i+5):-1}function d3_time_expandYear(d){return d+(d>68?1900:2e3)}function d3_time_parseMonthNumber(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i,i+2));return n?(date.m=n[0]-1,i+n[0].length):-1}function d3_time_parseDay(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i,i+2));return n?(date.d=+n[0],i+n[0].length):-1}function d3_time_parseDayOfYear(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i,i+3));return n?(date.j=+n[0],i+n[0].length):-1}function d3_time_parseHour24(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i,i+2));return n?(date.H=+n[0],i+n[0].length):-1}function d3_time_parseMinutes(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i,i+2));return n?(date.M=+n[0],i+n[0].length):-1}function d3_time_parseSeconds(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i,i+2));return n?(date.S=+n[0],i+n[0].length):-1}function d3_time_parseMilliseconds(date,string,i){d3_time_numberRe.lastIndex=0;var n=d3_time_numberRe.exec(string.slice(i,i+3));return n?(date.L=+n[0],i+n[0].length):-1}function d3_time_zone(d){var z=d.getTimezoneOffset(),zs=z>0?"-":"+",zh=abs(z)/60|0,zm=abs(z)%60;return zs+d3_time_formatPad(zh,"0",2)+d3_time_formatPad(zm,"0",2)}function d3_time_parseLiteralPercent(date,string,i){d3_time_percentRe.lastIndex=0;var n=d3_time_percentRe.exec(string.slice(i,i+1));return n?i+n[0].length:-1}function d3_time_formatMulti(formats){var n=formats.length,i=-1;while(++i<n)formats[i][0]=this(formats[i][0]);return function(date){var i=0,f=formats[i];while(!f[1](date))f=formats[++i];return f[0](date)}}d3.locale=function(locale){return{numberFormat:d3_locale_numberFormat(locale),timeFormat:d3_locale_timeFormat(locale)}};var d3_locale_enUS=d3.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});d3.format=d3_locale_enUS.numberFormat;d3.geo={};function d3_adder(){}d3_adder.prototype={s:0,t:0,add:function(y){d3_adderSum(y,this.t,d3_adderTemp);d3_adderSum(d3_adderTemp.s,this.s,this);if(this.s)this.t+=d3_adderTemp.t;else this.s=d3_adderTemp.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var d3_adderTemp=new d3_adder;function d3_adderSum(a,b,o){var x=o.s=a+b,bv=x-a,av=x-bv;o.t=a-av+(b-bv)}d3.geo.stream=function(object,listener){if(object&&d3_geo_streamObjectType.hasOwnProperty(object.type)){d3_g
polygonStart:function(){stream.lineEnd=lineEndPolygon},polygonEnd:function(){stream.lineEnd=lineEnd;stream.point=point},pointRadius:function(_){pointCircle=d3_geo_pathBufferCircle(_);return stream},result:function(){if(buffer.length){var result=buffer.join("");buffer=[];return result}}};function point(x,y){buffer.push("M",x,",",y,pointCircle)}function pointLineStart(x,y){buffer.push("M",x,",",y);stream.point=pointLine}function pointLine(x,y){buffer.push("L",x,",",y)}function lineEnd(){stream.point=point}function lineEndPolygon(){buffer.push("Z")}return stream}function d3_geo_pathBufferCircle(radius){return"m0,"+radius+"a"+radius+","+radius+" 0 1,1 0,"+-2*radius+"a"+radius+","+radius+" 0 1,1 0,"+2*radius+"z"}var d3_geo_pathCentroid={point:d3_geo_pathCentroidPoint,lineStart:d3_geo_pathCentroidLineStart,lineEnd:d3_geo_pathCentroidLineEnd,polygonStart:function(){d3_geo_pathCentroid.lineStart=d3_geo_pathCentroidRingStart},polygonEnd:function(){d3_geo_pathCentroid.point=d3_geo_pathCentroidPoint;d3_geo_pathCentroid.lineStart=d3_geo_pathCentroidLineStart;d3_geo_pathCentroid.lineEnd=d3_geo_pathCentroidLineEnd}};function d3_geo_pathCentroidPoint(x,y){d3_geo_centroidX0+=x;d3_geo_centroidY0+=y;++d3_geo_centroidZ0}function d3_geo_pathCentroidLineStart(){var x0,y0;d3_geo_pathCentroid.point=function(x,y){d3_geo_pathCentroid.point=nextPoint;d3_geo_pathCentroidPoint(x0=x,y0=y)};function nextPoint(x,y){var dx=x-x0,dy=y-y0,z=Math.sqrt(dx*dx+dy*dy);d3_geo_centroidX1+=z*(x0+x)/2;d3_geo_centroidY1+=z*(y0+y)/2;d3_geo_centroidZ1+=z;d3_geo_pathCentroidPoint(x0=x,y0=y)}}function d3_geo_pathCentroidLineEnd(){d3_geo_pathCentroid.point=d3_geo_pathCentroidPoint}function d3_geo_pathCentroidRingStart(){var x00,y00,x0,y0;d3_geo_pathCentroid.point=function(x,y){d3_geo_pathCentroid.point=nextPoint;d3_geo_pathCentroidPoint(x00=x0=x,y00=y0=y)};function nextPoint(x,y){var dx=x-x0,dy=y-y0,z=Math.sqrt(dx*dx+dy*dy);d3_geo_centroidX1+=z*(x0+x)/2;d3_geo_centroidY1+=z*(y0+y)/2;d3_geo_centroidZ1+=z;z=y0*x-x0*y;d3_geo_centroidX2+=z*(x0+x);d3_geo_centroidY2+=z*(y0+y);d3_geo_centroidZ2+=z*3;d3_geo_pathCentroidPoint(x0=x,y0=y)}d3_geo_pathCentroid.lineEnd=function(){nextPoint(x00,y00)}}function d3_geo_pathContext(context){var pointRadius=4.5;var stream={point:point,lineStart:function(){stream.point=pointLineStart},lineEnd:lineEnd,polygonStart:function(){stream.lineEnd=lineEndPolygon},polygonEnd:function(){stream.lineEnd=lineEnd;stream.point=point},pointRadius:function(_){pointRadius=_;return stream},result:d3_noop};function point(x,y){context.moveTo(x+pointRadius,y);context.arc(x,y,pointRadius,0,τ)}function pointLineStart(x,y){context.moveTo(x,y);stream.point=pointLine}function pointLine(x,y){context.lineTo(x,y)}function lineEnd(){stream.point=point}function lineEndPolygon(){context.closePath()}return stream}function d3_geo_resample(project){var δ2=.5,cosMinDistance=Math.cos(30*d3_radians),maxDepth=16;function resample(stream){return(maxDepth?resampleRecursive:resampleNone)(stream)}function resampleNone(stream){return d3_geo_transformPoint(stream,function(x,y){x=project(x,y);stream.point(x[0],x[1])})}function resampleRecursive(stream){var λ00,φ00,x00,y00,a00,b00,c00,λ0,x0,y0,a0,b0,c0;var resample={point:point,lineStart:lineStart,lineEnd:lineEnd,polygonStart:function(){stream.polygonStart();resample.lineStart=ringStart},polygonEnd:function(){stream.polygonEnd();resample.lineStart=lineStart}};function point(x,y){x=project(x,y);stream.point(x[0],x[1])}function lineStart(){x0=NaN;resample.point=linePoint;stream.lineStart()}function linePoint(λ,φ){var c=d3_geo_cartesian([λ,φ]),p=project(λ,φ);resampleLineTo(x0,y0,λ0,a0,b0,c0,x0=p[0],y0=p[1],λ0=λ,a0=c[0],b0=c[1],c0=c[2],maxDepth,stream);stream.point(x0,y0)}function lineEnd(){resample.point=point;stream.lineEnd()}function ringStart(){lineStart();resample.point=ringPoint;resample.lineEnd=ringEnd}function ringPoint(λ,φ){linePoint(λ00=λ,φ00=φ),x00=x0,y00=y0,a00=a0,b00=b0,c00=c0;resample.point=linePoint}function ringEnd(){resampleLineTo(x0,y0,λ0,a0,b0,c0,x00,y00,λ00,a00,b00,c00,maxDepth,stream);resample.lineE
y:y0};else if(va.y>=y1)return;vb={x:(y1-fb)/fm,y:y1}}else{if(!va)va={x:(y1-fb)/fm,y:y1};else if(va.y<y0)return;vb={x:(y0-fb)/fm,y:y0}}}else{if(ly<ry){if(!va)va={x:x0,y:fm*x0+fb};else if(va.x>=x1)return;vb={x:x1,y:fm*x1+fb}}else{if(!va)va={x:x1,y:fm*x1+fb};else if(va.x<x0)return;vb={x:x0,y:fm*x0+fb}}}}edge.a=va;edge.b=vb;return true}function d3_geom_voronoiEdge(lSite,rSite){this.l=lSite;this.r=rSite;this.a=this.b=null}function d3_geom_voronoiCreateEdge(lSite,rSite,va,vb){var edge=new d3_geom_voronoiEdge(lSite,rSite);d3_geom_voronoiEdges.push(edge);if(va)d3_geom_voronoiSetEdgeEnd(edge,lSite,rSite,va);if(vb)d3_geom_voronoiSetEdgeEnd(edge,rSite,lSite,vb);d3_geom_voronoiCells[lSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge,lSite,rSite));d3_geom_voronoiCells[rSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge,rSite,lSite));return edge}function d3_geom_voronoiCreateBorderEdge(lSite,va,vb){var edge=new d3_geom_voronoiEdge(lSite,null);edge.a=va;edge.b=vb;d3_geom_voronoiEdges.push(edge);return edge}function d3_geom_voronoiSetEdgeEnd(edge,lSite,rSite,vertex){if(!edge.a&&!edge.b){edge.a=vertex;edge.l=lSite;edge.r=rSite}else if(edge.l===rSite){edge.b=vertex}else{edge.a=vertex}}function d3_geom_voronoiHalfEdge(edge,lSite,rSite){var va=edge.a,vb=edge.b;this.edge=edge;this.site=lSite;this.angle=rSite?Math.atan2(rSite.y-lSite.y,rSite.x-lSite.x):edge.l===lSite?Math.atan2(vb.x-va.x,va.y-vb.y):Math.atan2(va.x-vb.x,vb.y-va.y)}d3_geom_voronoiHalfEdge.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function d3_geom_voronoiRedBlackTree(){this._=null}function d3_geom_voronoiRedBlackNode(node){node.U=node.C=node.L=node.R=node.P=node.N=null}d3_geom_voronoiRedBlackTree.prototype={insert:function(after,node){var parent,grandpa,uncle;if(after){node.P=after;node.N=after.N;if(after.N)after.N.P=node;after.N=node;if(after.R){after=after.R;while(after.L)after=after.L;after.L=node}else{after.R=node}parent=after}else if(this._){after=d3_geom_voronoiRedBlackFirst(this._);node.P=null;node.N=after;after.P=after.L=node;parent=after}else{node.P=node.N=null;this._=node;parent=null}node.L=node.R=null;node.U=parent;node.C=true;after=node;while(parent&&parent.C){grandpa=parent.U;if(parent===grandpa.L){uncle=grandpa.R;if(uncle&&uncle.C){parent.C=uncle.C=false;grandpa.C=true;after=grandpa}else{if(after===parent.R){d3_geom_voronoiRedBlackRotateLeft(this,parent);after=parent;parent=after.U}parent.C=false;grandpa.C=true;d3_geom_voronoiRedBlackRotateRight(this,grandpa)}}else{uncle=grandpa.L;if(uncle&&uncle.C){parent.C=uncle.C=false;grandpa.C=true;after=grandpa}else{if(after===parent.L){d3_geom_voronoiRedBlackRotateRight(this,parent);after=parent;parent=after.U}parent.C=false;grandpa.C=true;d3_geom_voronoiRedBlackRotateLeft(this,grandpa)}}parent=after.U}this._.C=false},remove:function(node){if(node.N)node.N.P=node.P;if(node.P)node.P.N=node.N;node.N=node.P=null;var parent=node.U,sibling,left=node.L,right=node.R,next,red;if(!left)next=right;else if(!right)next=left;else next=d3_geom_voronoiRedBlackFirst(right);if(parent){if(parent.L===node)parent.L=next;else parent.R=next}else{this._=next}if(left&&right){red=next.C;next.C=node.C;next.L=left;left.U=next;if(next!==right){parent=next.U;next.U=node.U;node=next.R;parent.L=node;next.R=right;right.U=next}else{next.U=parent;parent=next;node=next.R}}else{red=node.C;node=next}if(node)node.U=parent;if(red)return;if(node&&node.C){node.C=false;return}do{if(node===this._)break;if(node===parent.L){sibling=parent.R;if(sibling.C){sibling.C=false;parent.C=true;d3_geom_voronoiRedBlackRotateLeft(this,parent);sibling=parent.R}if(sibling.L&&sibling.L.C||sibling.R&&sibling.R.C){if(!sibling.R||!sibling.R.C){sibling.L.C=false;sibling.C=true;d3_geom_voronoiRedBlackRotateRight(this,sibling);sibling=parent.R}sibling.C=parent.C;parent.C=sibling.R.C=false;d3_geom_voronoiRedBlackRotateLeft(this,parent);node=this._;break}}else{sibling=parent.L;if(sibling.C){sibling.C=false;parent.C=true;d3_geom_voronoiRedBlackRotateRight(this,parent);sibling=p
sort=_;return pie};pie.startAngle=function(_){if(!arguments.length)return startAngle;startAngle=_;return pie};pie.endAngle=function(_){if(!arguments.length)return endAngle;endAngle=_;return pie};pie.padAngle=function(_){if(!arguments.length)return padAngle;padAngle=_;return pie};return pie};var d3_layout_pieSortByValue={};d3.layout.stack=function(){var values=d3_identity,order=d3_layout_stackOrderDefault,offset=d3_layout_stackOffsetZero,out=d3_layout_stackOut,x=d3_layout_stackX,y=d3_layout_stackY;function stack(data,index){if(!(n=data.length))return data;var series=data.map(function(d,i){return values.call(stack,d,i)});var points=series.map(function(d){return d.map(function(v,i){return[x.call(stack,v,i),y.call(stack,v,i)]})});var orders=order.call(stack,points,index);series=d3.permute(series,orders);points=d3.permute(points,orders);var offsets=offset.call(stack,points,index);var m=series[0].length,n,i,j,o;for(j=0;j<m;++j){out.call(stack,series[0][j],o=offsets[j],points[0][j][1]);for(i=1;i<n;++i){out.call(stack,series[i][j],o+=points[i-1][j][1],points[i][j][1])}}return data}stack.values=function(x){if(!arguments.length)return values;values=x;return stack};stack.order=function(x){if(!arguments.length)return order;order=typeof x==="function"?x:d3_layout_stackOrders.get(x)||d3_layout_stackOrderDefault;return stack};stack.offset=function(x){if(!arguments.length)return offset;offset=typeof x==="function"?x:d3_layout_stackOffsets.get(x)||d3_layout_stackOffsetZero;return stack};stack.x=function(z){if(!arguments.length)return x;x=z;return stack};stack.y=function(z){if(!arguments.length)return y;y=z;return stack};stack.out=function(z){if(!arguments.length)return out;out=z;return stack};return stack};function d3_layout_stackX(d){return d.x}function d3_layout_stackY(d){return d.y}function d3_layout_stackOut(d,y0,y){d.y0=y0;d.y=y}var d3_layout_stackOrders=d3.map({"inside-out":function(data){var n=data.length,i,j,max=data.map(d3_layout_stackMaxIndex),sums=data.map(d3_layout_stackReduceSum),index=d3.range(n).sort(function(a,b){return max[a]-max[b]}),top=0,bottom=0,tops=[],bottoms=[];for(i=0;i<n;++i){j=index[i];if(top<bottom){top+=sums[j];tops.push(j)}else{bottom+=sums[j];bottoms.push(j)}}return bottoms.reverse().concat(tops)},reverse:function(data){return d3.range(data.length).reverse()},"default":d3_layout_stackOrderDefault});var d3_layout_stackOffsets=d3.map({silhouette:function(data){var n=data.length,m=data[0].length,sums=[],max=0,i,j,o,y0=[];for(j=0;j<m;++j){for(i=0,o=0;i<n;i++)o+=data[i][j][1];if(o>max)max=o;sums.push(o)}for(j=0;j<m;++j){y0[j]=(max-sums[j])/2}return y0},wiggle:function(data){var n=data.length,x=data[0],m=x.length,i,j,k,s1,s2,s3,dx,o,o0,y0=[];y0[0]=o=o0=0;for(j=1;j<m;++j){for(i=0,s1=0;i<n;++i)s1+=data[i][j][1];for(i=0,s2=0,dx=x[j][0]-x[j-1][0];i<n;++i){for(k=0,s3=(data[i][j][1]-data[i][j-1][1])/(2*dx);k<i;++k){s3+=(data[k][j][1]-data[k][j-1][1])/dx}s2+=s3*data[i][j][1]}y0[j]=o-=s1?s2/s1*dx:0;if(o<o0)o0=o}for(j=0;j<m;++j)y0[j]-=o0;return y0},expand:function(data){var n=data.length,m=data[0].length,k=1/n,i,j,o,y0=[];for(j=0;j<m;++j){for(i=0,o=0;i<n;i++)o+=data[i][j][1];if(o)for(i=0;i<n;i++)data[i][j][1]/=o;else for(i=0;i<n;i++)data[i][j][1]=k}for(j=0;j<m;++j)y0[j]=0;return y0},zero:d3_layout_stackOffsetZero});function d3_layout_stackOrderDefault(data){return d3.range(data.length)}function d3_layout_stackOffsetZero(data){var j=-1,m=data[0].length,y0=[];while(++j<m)y0[j]=0;return y0}function d3_layout_stackMaxIndex(array){var i=1,j=0,v=array[0][1],k,n=array.length;for(;i<n;++i){if((k=array[i][1])>v){j=i;v=k}}return j}function d3_layout_stackReduceSum(d){return d.reduce(d3_layout_stackSum,0)}function d3_layout_stackSum(p,d){return p+d[1]}d3.layout.histogram=function(){var frequency=true,valuer=Number,ranger=d3_layout_histogramRange,binner=d3_layout_histogramBinSturges;function histogram(data,i){var bins=[],values=data.map(valuer,this),range=ranger.call(this,values,i),thresholds=binner.call(this,range,values,i),bin,i=-1,n=values.length,m=thresholds.length-1,k=frequency?1:1/n,x;while(++i<m){bin=bins[i]=[];bin.dx=thresho
var h1=(a0+a1)/2;x0=r1*Math.cos(h1);y0=r1*Math.sin(h1);x1=y1=null}}else{x0=y0=0}if(r0){x2=r0*Math.cos(a1-p0);y2=r0*Math.sin(a1-p0);x3=r0*Math.cos(a0+p0);y3=r0*Math.sin(a0+p0);var l0=Math.abs(a0-a1+2*p0)<=π?0:1;if(p0&&d3_svg_arcSweep(x2,y2,x3,y3)===1-cw^l0){var h0=(a0+a1)/2;x2=r0*Math.cos(h0);y2=r0*Math.sin(h0);x3=y3=null}}else{x2=y2=0}if(da>ε&&(rc=Math.min(Math.abs(r1-r0)/2,+cornerRadius.apply(this,arguments)))>.001){cr=r0<r1^cw?0:1;var rc1=rc,rc0=rc;if(da<π){var oc=x3==null?[x2,y2]:x1==null?[x0,y0]:d3_geom_polygonIntersect([x0,y0],[x3,y3],[x1,y1],[x2,y2]),ax=x0-oc[0],ay=y0-oc[1],bx=x1-oc[0],by=y1-oc[1],kc=1/Math.sin(Math.acos((ax*bx+ay*by)/(Math.sqrt(ax*ax+ay*ay)*Math.sqrt(bx*bx+by*by)))/2),lc=Math.sqrt(oc[0]*oc[0]+oc[1]*oc[1]);rc0=Math.min(rc,(r0-lc)/(kc-1));rc1=Math.min(rc,(r1-lc)/(kc+1))}if(x1!=null){var t30=d3_svg_arcCornerTangents(x3==null?[x2,y2]:[x3,y3],[x0,y0],r1,rc1,cw),t12=d3_svg_arcCornerTangents([x1,y1],[x2,y2],r1,rc1,cw);if(rc===rc1){path.push("M",t30[0],"A",rc1,",",rc1," 0 0,",cr," ",t30[1],"A",r1,",",r1," 0 ",1-cw^d3_svg_arcSweep(t30[1][0],t30[1][1],t12[1][0],t12[1][1]),",",cw," ",t12[1],"A",rc1,",",rc1," 0 0,",cr," ",t12[0])}else{path.push("M",t30[0],"A",rc1,",",rc1," 0 1,",cr," ",t12[0])}}else{path.push("M",x0,",",y0)}if(x3!=null){var t03=d3_svg_arcCornerTangents([x0,y0],[x3,y3],r0,-rc0,cw),t21=d3_svg_arcCornerTangents([x2,y2],x1==null?[x0,y0]:[x1,y1],r0,-rc0,cw);if(rc===rc0){path.push("L",t21[0],"A",rc0,",",rc0," 0 0,",cr," ",t21[1],"A",r0,",",r0," 0 ",cw^d3_svg_arcSweep(t21[1][0],t21[1][1],t03[1][0],t03[1][1]),",",1-cw," ",t03[1],"A",rc0,",",rc0," 0 0,",cr," ",t03[0])}else{path.push("L",t21[0],"A",rc0,",",rc0," 0 0,",cr," ",t03[0])}}else{path.push("L",x2,",",y2)}}else{path.push("M",x0,",",y0);if(x1!=null)path.push("A",r1,",",r1," 0 ",l1,",",cw," ",x1,",",y1);path.push("L",x2,",",y2);if(x3!=null)path.push("A",r0,",",r0," 0 ",l0,",",1-cw," ",x3,",",y3)}path.push("Z");return path.join("")}function circleSegment(r1,cw){return"M0,"+r1+"A"+r1+","+r1+" 0 1,"+cw+" 0,"+-r1+"A"+r1+","+r1+" 0 1,"+cw+" 0,"+r1}arc.innerRadius=function(v){if(!arguments.length)return innerRadius;innerRadius=d3_functor(v);return arc};arc.outerRadius=function(v){if(!arguments.length)return outerRadius;outerRadius=d3_functor(v);return arc};arc.cornerRadius=function(v){if(!arguments.length)return cornerRadius;cornerRadius=d3_functor(v);return arc};arc.padRadius=function(v){if(!arguments.length)return padRadius;padRadius=v==d3_svg_arcAuto?d3_svg_arcAuto:d3_functor(v);return arc};arc.startAngle=function(v){if(!arguments.length)return startAngle;startAngle=d3_functor(v);return arc};arc.endAngle=function(v){if(!arguments.length)return endAngle;endAngle=d3_functor(v);return arc};arc.padAngle=function(v){if(!arguments.length)return padAngle;padAngle=d3_functor(v);return arc};arc.centroid=function(){var r=(+innerRadius.apply(this,arguments)+ +outerRadius.apply(this,arguments))/2,a=(+startAngle.apply(this,arguments)+ +endAngle.apply(this,arguments))/2-halfπ;return[Math.cos(a)*r,Math.sin(a)*r]};return arc};var d3_svg_arcAuto="auto";function d3_svg_arcInnerRadius(d){return d.innerRadius}function d3_svg_arcOuterRadius(d){return d.outerRadius}function d3_svg_arcStartAngle(d){return d.startAngle}function d3_svg_arcEndAngle(d){return d.endAngle}function d3_svg_arcPadAngle(d){return d&&d.padAngle}function d3_svg_arcSweep(x0,y0,x1,y1){return(x0-x1)*y0-(y0-y1)*x0>0?0:1}function d3_svg_arcCornerTangents(p0,p1,r1,rc,cw){var x01=p0[0]-p1[0],y01=p0[1]-p1[1],lo=(cw?rc:-rc)/Math.sqrt(x01*x01+y01*y01),ox=lo*y01,oy=-lo*x01,x1=p0[0]+ox,y1=p0[1]+oy,x2=p1[0]+ox,y2=p1[1]+oy,x3=(x1+x2)/2,y3=(y1+y2)/2,dx=x2-x1,dy=y2-y1,d2=dx*dx+dy*dy,r=r1-rc,D=x1*y2-x2*y1,d=(dy<0?-1:1)*Math.sqrt(Math.max(0,r*r*d2-D*D)),cx0=(D*dy-dx*d)/d2,cy0=(-D*dx-dy*d)/d2,cx1=(D*dy+dx*d)/d2,cy1=(-D*dx+dy*d)/d2,dx0=cx0-x3,dy0=cy0-y3,dx1=cx1-x3,dy1=cy1-y3;if(dx0*dx0+dy0*dy0>dx1*dx1+dy1*dy1)cx0=cx1,cy0=cy1;return[[cx0-ox,cy0-oy],[cx0*r1/r,cy0*r1/r]]}function d3_svg_line(projection){var x=d3_geom_pointX,y=d3_geom_pointY,defined=d3_true,interpolate=d3_svg_lineLinear,interpolateKey=interpolate.key,t
2016-10-01 00:19:39 +00:00
}).append("rect").attr("x",function(d){return/[ew]$/.test(d)?-3:null}).attr("y",function(d){return/^[ns]/.test(d)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden");resize.style("display",brush.empty()?"none":null);var gUpdate=d3.transition(g),backgroundUpdate=d3.transition(background),range;if(x){range=d3_scaleRange(x);backgroundUpdate.attr("x",range[0]).attr("width",range[1]-range[0]);redrawX(gUpdate)}if(y){range=d3_scaleRange(y);backgroundUpdate.attr("y",range[0]).attr("height",range[1]-range[0]);redrawY(gUpdate)}redraw(gUpdate)})}brush.event=function(g){g.each(function(){var event_=event.of(this,arguments),extent1={x:xExtent,y:yExtent,i:xExtentDomain,j:yExtentDomain},extent0=this.__chart__||extent1;this.__chart__=extent1;if(d3_transitionInheritId){d3.select(this).transition().each("start.brush",function(){xExtentDomain=extent0.i;yExtentDomain=extent0.j;xExtent=extent0.x;yExtent=extent0.y;event_({type:"brushstart"})}).tween("brush:brush",function(){var xi=d3_interpolateArray(xExtent,extent1.x),yi=d3_interpolateArray(yExtent,extent1.y);xExtentDomain=yExtentDomain=null;return function(t){xExtent=extent1.x=xi(t);yExtent=extent1.y=yi(t);event_({type:"brush",mode:"resize"})}}).each("end.brush",function(){xExtentDomain=extent1.i;yExtentDomain=extent1.j;event_({type:"brush",mode:"resize"});event_({type:"brushend"})})}else{event_({type:"brushstart"});event_({type:"brush",mode:"resize"});event_({type:"brushend"})}})};function redraw(g){g.selectAll(".resize").attr("transform",function(d){return"translate("+xExtent[+/e$/.test(d)]+","+yExtent[+/^s/.test(d)]+")"})}function redrawX(g){g.select(".extent").attr("x",xExtent[0]);g.selectAll(".extent,.n>rect,.s>rect").attr("width",xExtent[1]-xExtent[0])}function redrawY(g){g.select(".extent").attr("y",yExtent[0]);g.selectAll(".extent,.e>rect,.w>rect").attr("height",yExtent[1]-yExtent[0])}function brushstart(){var target=this,eventTarget=d3.select(d3.event.target),event_=event.of(target,arguments),g=d3.select(target),resizing=eventTarget.datum(),resizingX=!/^(n|s)$/.test(resizing)&&x,resizingY=!/^(e|w)$/.test(resizing)&&y,dragging=eventTarget.classed("extent"),dragRestore=d3_event_dragSuppress(target),center,origin=d3.mouse(target),offset;var w=d3.select(d3_window(target)).on("keydown.brush",keydown).on("keyup.brush",keyup);if(d3.event.changedTouches){w.on("touchmove.brush",brushmove).on("touchend.brush",brushend)}else{w.on("mousemove.brush",brushmove).on("mouseup.brush",brushend)}g.interrupt().selectAll("*").interrupt();if(dragging){origin[0]=xExtent[0]-origin[0];origin[1]=yExtent[0]-origin[1]}else if(resizing){var ex=+/w$/.test(resizing),ey=+/^n/.test(resizing);offset=[xExtent[1-ex]-origin[0],yExtent[1-ey]-origin[1]];origin[0]=xExtent[ex];origin[1]=yExtent[ey]}else if(d3.event.altKey)center=origin.slice();g.style("pointer-events","none").selectAll(".resize").style("display",null);d3.select("body").style("cursor",eventTarget.style("cursor"));event_({type:"brushstart"});brushmove();function keydown(){if(d3.event.keyCode==32){if(!dragging){center=null;origin[0]-=xExtent[1];origin[1]-=yExtent[1];dragging=2}d3_eventPreventDefault()}}function keyup(){if(d3.event.keyCode==32&&dragging==2){origin[0]+=xExtent[1];origin[1]+=yExtent[1];dragging=0;d3_eventPreventDefault()}}function brushmove(){var point=d3.mouse(target),moved=false;if(offset){point[0]+=offset[0];point[1]+=offset[1]}if(!dragging){if(d3.event.altKey){if(!center)center=[(xExtent[0]+xExtent[1])/2,(yExtent[0]+yExtent[1])/2];origin[0]=xExtent[+(point[0]<center[0])];origin[1]=yExtent[+(point[1]<center[1])]}else center=null}if(resizingX&&move1(point,x,0)){redrawX(g);moved=true}if(resizingY&&move1(point,y,1)){redrawY(g);moved=true}if(moved){redraw(g);event_({type:"brush",mode:dragging?"move":"resize"})}}function move1(point,scale,i){var range=d3_scaleRange(scale),r0=range[0],r1=range[1],position=origin[i],extent=i?yExtent:xExtent,size=extent[1]-extent[0],min,max;if(dragging){r0-=position;r1-=size+position}min=(i?yClamp:xClamp)?Math.max(r0,Math.min(r1,point[i])):point[i];if(dragging){max=(min+=position)+size}else{if(ce
},{"./ExecutionEnvironment":9}],31:[function(require,module,exports){"use strict";var performance=require("./performance");var performanceNow;if(performance.now){performanceNow=function(){return performance.now()}}else{performanceNow=function(){return Date.now()}}module.exports=performanceNow},{"./performance":30}],32:[function(require,module,exports){"use strict";var hasOwnProperty=Object.prototype.hasOwnProperty;function shallowEqual(objA,objB){if(objA===objB){return true}if(typeof objA!=="object"||objA===null||typeof objB!=="object"||objB===null){return false}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false}var bHasOwnProperty=hasOwnProperty.bind(objB);for(var i=0;i<keysA.length;i++){if(!bHasOwnProperty(keysA[i])||objA[keysA[i]]!==objB[keysA[i]]){return false}}return true}module.exports=shallowEqual},{}],33:[function(require,module,exports){(function(process){"use strict";var invariant=require("./invariant");function toArray(obj){var length=obj.length;!(!Array.isArray(obj)&&(typeof obj==="object"||typeof obj==="function"))?process.env.NODE_ENV!=="production"?invariant(false,"toArray: Array-like object expected"):invariant(false):undefined;!(typeof length==="number")?process.env.NODE_ENV!=="production"?invariant(false,"toArray: Object needs a length property"):invariant(false):undefined;!(length===0||length-1 in obj)?process.env.NODE_ENV!=="production"?invariant(false,"toArray: Object should have keys for indices"):invariant(false):undefined;if(obj.hasOwnProperty){try{return Array.prototype.slice.call(obj)}catch(e){}}var ret=Array(length);for(var ii=0;ii<length;ii++){ret[ii]=obj[ii]}return ret}module.exports=toArray}).call(this,require("_process"))},{"./invariant":23,_process:47}],34:[function(require,module,exports){(function(process){"use strict";var emptyFunction=require("./emptyFunction");var warning=emptyFunction;if(process.env.NODE_ENV!=="production"){warning=function(condition,format){for(var _len=arguments.length,args=Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){args[_key-2]=arguments[_key]}if(format===undefined){throw new Error("`warning(condition, format, ...args)` requires a warning "+"message argument")}if(format.indexOf("Failed Composite propType: ")===0){return}if(!condition){var argIndex=0;var message="Warning: "+format.replace(/%s/g,function(){return args[argIndex++]});if(typeof console!=="undefined"){console.error(message)}try{throw new Error(message)}catch(x){}}}}module.exports=warning}).call(this,require("_process"))},{"./emptyFunction":15,_process:47}],35:[function(require,module,exports){(function(global){var firebase=null;(function(){var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},h="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,l=function(){l=function(){};h.Symbol||(h.Symbol=ba)},ca=0,ba=function(a){return"jscomp_symbol_"+(a||"")+ca++},n=function(){l();var a=h.Symbol.iterator;a||(a=h.Symbol.iterator=h.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return m(this)}});n=function(){}},m=function(a){var b=0;return da(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})},da=function(a){n();a={next:a};a[h.Symbol.iterator]=function(){return this};return a},q=this,r=function(){},t=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefin
w(a,"Listener can not be null.");if(p(a))return a;w(a.handleEvent,"An object listener must have handleEvent method.");a[Yb]||(a[Yb]=function(b){return a.handleEvent(b)});return a[Yb]};var Zb=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;var ac=function(){this.hc="";this.Od=$b};ac.prototype.Pb=!0;ac.prototype.Kb=function(){return this.hc};ac.prototype.toString=function(){return"Const{"+this.hc+"}"};var bc=function(a){if(a instanceof ac&&a.constructor===ac&&a.Od===$b)return a.hc;za("expected object of type Const, got '"+a+"'");return"type_error:Const"},$b={};var B=function(){this.ja="";this.Nd=cc};B.prototype.Pb=!0;B.prototype.Kb=function(){return this.ja};B.prototype.toString=function(){return"SafeUrl{"+this.ja+"}"};var dc=function(a){if(a instanceof B&&a.constructor===B&&a.Nd===cc)return a.ja;za("expected object of type SafeUrl, got '"+a+"' of type "+m(a));return"type_error:SafeUrl"},ec=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i,gc=function(a){if(a instanceof B)return a;a=a.Pb?a.Kb():String(a);ec.test(a)||(a="about:invalid#zClosurez");return fc(a)},cc={},fc=function(a){var b=new B;b.ja=a;return b};fc("about:blank");var hc=function(a){return/^\s*$/.test(a)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))},ic=function(a){a=String(a);if(hc(a))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a)},lc=function(a){var b=[];jc(new kc,a,b);return b.join("")},kc=function(){this.cc=void 0},jc=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(ea(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],jc(a,a.cc?a.cc.call(d,String(f),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),mc(d,c),c.push(":"),jc(a,a.cc?a.cc.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case"string":mc(b,c);break;case"number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case"boolean":c.push(String(b));break;case"function":c.push("null");break;default:throw Error("Unknown type: "+typeof b)}}},nc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\x0B":"\\u000b"},oc=/\uffff/.test("￿")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,mc=function(a,b){b.push('"',a.replace(oc,function(a){var b=nc[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),nc[a]=b);return b}),'"')};var pc=function(){};pc.prototype.Vc=null;pc.prototype.lb=ca;var qc=function(a){return a.Vc||(a.Vc=a.Sb())};pc.prototype.Sb=ca;var rc,sc=function(){};t(sc,pc);sc.prototype.lb=function(){var a=tc(this);return a?new ActiveXObject(a):new XMLHttpRequest};sc.prototype.Sb=function(){var a={};tc(this)&&(a[0]=!0,a[1]=!0);return a};var tc=function(a){if(!a.jd&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.jd=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return a.jd};rc=new sc;var uc=function(){};t(uc,pc);uc.prototype.lb=function(){var a=new XMLHttpRequest;if("withCredentials"in a)return a;if("undefined"!=typeof XDomainRequest)return new vc;throw Error("Unsupported browser")};uc.prototype.Sb=function(){return{}};var vc=function(){this.oa=new XDomainRequest;this.readyState=0;this.onreadystatechange=null;this.responseText="";this.status=-1;this.statusText=this.responseXML=null;this.oa.onload=q(this.he,this);this.oa.onerror=q(this.gd,this);this.oa.onprogress=q(this.ie,this);this.oa.ontimeout=q(this.je,this)};h=vc.prototype;h.open=function(a,b,c){if(null!=c&&!c)throw Error("Only async requ
b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(a=a.P)&&a.log(pe,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},Fe=function(a){a.a&&a.lc&&(a.a.ontimeout=null);ga(a.jc)&&(l.clearTimeout(a.jc),a.jc=null)},Ke=function(a){return a.a?a.a.readyState:0},Le=function(a){try{return 2<Ke(a)?a.a.status:-1}catch(b){return-1}},Ne=function(a){try{return a.a?a.a.responseText:""}catch(b){return L(a.P,"Can not get responseText: "+b.message),""}},Ee=function(a,b){return b+" ["+a.nd+" "+a.Tb+" "+Le(a)+"]"};var Oe=function(a,b){this.ga=this.Ja=this.la="";this.Va=null;this.Ba=this.ra="";this.M=this.re=!1;var c;a instanceof Oe?(this.M=void 0!==b?b:a.M,Pe(this,a.la),c=a.Ja,N(this),this.Ja=c,Qe(this,a.ga),Re(this,a.Va),Se(this,a.ra),Te(this,a.aa.clone()),a=a.Ba,N(this),this.Ba=a):a&&(c=String(a).match(ye))?(this.M=!!b,Pe(this,c[1]||"",!0),a=c[2]||"",N(this),this.Ja=Ue(a),Qe(this,c[3]||"",!0),Re(this,c[4]),Se(this,c[5]||"",!0),Te(this,c[6]||"",!0),a=c[7]||"",N(this),this.Ba=Ue(a)):(this.M=!!b,this.aa=new O(null,0,this.M))};Oe.prototype.toString=function(){var a=[],b=this.la;b&&a.push(Ve(b,We,!0),":");var c=this.ga;if(c||"file"==b)a.push("//"),(b=this.Ja)&&a.push(Ve(b,We,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.Va,null!=c&&a.push(":",String(c));if(c=this.ra)this.ga&&"/"!=c.charAt(0)&&a.push("/"),a.push(Ve(c,"/"==c.charAt(0)?Xe:Ye,!0));(c=this.aa.toString())&&a.push("?",c);(c=this.Ba)&&a.push("#",Ve(c,Ze));return a.join("")};Oe.prototype.resolve=function(a){var b=this.clone(),c=!!a.la;c?Pe(b,a.la):c=!!a.Ja;if(c){var d=a.Ja;N(b);b.Ja=d}else c=!!a.ga;c?Qe(b,a.ga):c=null!=a.Va;d=a.ra;if(c)Re(b,a.Va);else if(c=!!a.ra){if("/"!=d.charAt(0))if(this.ga&&!this.ra)d="/"+d;else{var e=b.ra.lastIndexOf("/");-1!=e&&(d=b.ra.substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(v(e,"./")||v(e,"/.")){for(var d=0==e.lastIndexOf("/",0),e=e.split("/"),f=[],g=0;g<e.length;){var k=e[g++];"."==k?d&&g==e.length&&f.push(""):".."==k?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),d&&g==e.length&&f.push("")):(f.push(k),d=!0)}d=f.join("/")}else d=e}c?Se(b,d):c=""!==a.aa.toString();c?Te(b,Ue(a.aa.toString())):c=!!a.Ba;c&&(a=a.Ba,N(b),b.Ba=a);return b};Oe.prototype.clone=function(){return new Oe(this)};var Pe=function(a,b,c){N(a);a.la=c?Ue(b,!0):b;a.la&&(a.la=a.la.replace(/:$/,""))},Qe=function(a,b,c){N(a);a.ga=c?Ue(b,!0):b},Re=function(a,b){N(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Va=b}else a.Va=null},Se=function(a,b,c){N(a);a.ra=c?Ue(b,!0):b},Te=function(a,b,c){N(a);b instanceof O?(a.aa=b,a.aa.Oc(a.M)):(c||(b=Ve(b,$e)),a.aa=new O(b,0,a.M))},P=function(a,b,c){N(a);a.aa.set(b,c)},N=function(a){if(a.re)throw Error("Tried to modify a read-only Uri")};Oe.prototype.Oc=function(a){this.M=a;this.aa&&this.aa.Oc(a);return this};var af=function(a){return a instanceof Oe?a.clone():new Oe(a,void 0)},bf=function(a,b){var c=new Oe(null,void 0);Pe(c,"https");a&&Qe(c,a);b&&Se(c,b);return c},Ue=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},Ve=function(a,b,c){return n(a)?(a=encodeURI(a).replace(b,cf),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},cf=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},We=/[#\/\?@]/g,Ye=/[\#\?:]/g,Xe=/[\#\?]/g,$e=/[\#\?@]/g,Ze=/#/g,O=function(a,b,c){this.i=this.j=null;this.I=a||null;this.M=!!c},df=function(a){a.j||(a.j=new ee,a.i=0,a.I&&ze(a.I,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))},ff=function(a){var b=je(a);if("undefined"==typeof b)throw Error("Keys are undefined");var c=new O(null,0,void 0);a=ie(a);for(var d=0;d<b.length;d++){var e=b[d],f=a[d];ea(f)?ef(c,e,f):c.add(e,f)}return c};h=O.prototype;h.fd=function(){df(this);return this.i};h.add=function(a,b){df(this);this.I=null;a=this.K(a);var c=this.j.get(a);c||this.j.set(a,c=[]);c.push(b);this.i=Aa(this.i)+1;return this};h.remove=function(a){df(this);a=this.K(a);return this.j.kb(a)?(this.I=null,this.i=Aa(this.i)-this.j.get(a).length,this.j.remove(a)):!1};h.kb=function(a){df(this
throw new R("web-storage-unsupported")}this.u=l.sessionStorage||firebase.INTERNAL.node.sessionStorage},dh=function(){var a="Node"==rf(),a=l.sessionStorage||a&&firebase.INTERNAL.node&&firebase.INTERNAL.node.sessionStorage;if(!a)return!1;try{return a.setItem("__sak","1"),a.removeItem("__sak"),!0}catch(b){return!1}};h=eh.prototype;h.get=function(a){var b=this;return J().then(function(){var c=b.u.getItem(a);return zf(c)})};h.set=function(a,b){var c=this;return J().then(function(){var d=yf(b);null===d?c.remove(a):c.u.setItem(a,d)})};h.remove=function(a){var b=this;return J().then(function(){b.u.removeItem(a)})};h.La=function(){};h.$a=function(){};var fh=function(a,b,c,d,e,f){if(!window.indexedDB)throw new R("web-storage-unsupported");this.Wd=a;this.Dc=b;this.tc=c;this.Hd=d;this.na=e;this.O={};this.xb=[];this.tb=0;this.oe=f||l.indexedDB},gh,hh=function(a){return new I(function(b,c){var d=a.oe.open(a.Wd,a.na);d.onerror=function(a){c(Error(a.target.errorCode))};d.onupgradeneeded=function(b){b=b.target.result;try{b.createObjectStore(a.Dc,{keyPath:a.tc})}catch(f){c(f)}};d.onsuccess=function(a){b(a.target.result)}})},ih=function(a){a.ld||(a.ld=hh(a));return a.ld},jh=function(a,b){return b.objectStore(a.Dc)},kh=function(a,b,c){return b.transaction([a.Dc],c?"readwrite":"readonly")},lh=function(a){return new I(function(b,c){a.onsuccess=function(a){a&&a.target?b(a.target.result):b()};a.onerror=function(a){c(Error(a.target.errorCode))}})};h=fh.prototype;h.set=function(a,b){var c=!1,d,e=this;return xd(ih(this).then(function(b){d=b;b=jh(e,kh(e,d,!0));return lh(b.get(a))}).then(function(f){var g=jh(e,kh(e,d,!0));if(f)return f.value=b,lh(g.put(f));e.tb++;c=!0;f={};f[e.tc]=a;f[e.Hd]=b;return lh(g.add(f))}).then(function(){e.O[a]=b}),function(){c&&e.tb--})};h.get=function(a){var b=this;return ih(this).then(function(c){return lh(jh(b,kh(b,c,!1)).get(a))}).then(function(a){return a&&a.value})};h.remove=function(a){var b=!1,c=this;return xd(ih(this).then(function(d){b=!0;c.tb++;return lh(jh(c,kh(c,d,!0))["delete"](a))}).then(function(){delete c.O[a]}),function(){b&&c.tb--})};h.Ke=function(){var a=this;return ih(this).then(function(b){var c=jh(a,kh(a,b,!1));return c.getAll?lh(c.getAll()):new I(function(a,b){var d=[],e=c.openCursor();e.onsuccess=function(b){(b=b.target.result)?(d.push(b.value),b["continue"]()):a(d)};e.onerror=function(a){b(Error(a.target.errorCode))}})}).then(function(b){var c={},d=[];if(0==a.tb){for(d=0;d<b.length;d++)c[b[d][a.tc]]=b[d][a.Hd];d=kf(a.O,c);a.O=c}return d})};h.La=function(a){0==this.xb.length&&this.Qc();this.xb.push(a)};h.$a=function(a){Ma(this.xb,function(b){return b==a});0==this.xb.length&&this.gc()};h.Qc=function(){var a=this;this.gc();var b=function(){a.Ic=xe(800).then(q(a.Ke,a)).then(function(b){0<b.length&&x(a.xb,function(a){a(b)})}).then(b).l(function(a){"STOP_EVENT"!=a.message&&b()});return a.Ic};b()};h.gc=function(){this.Ic&&this.Ic.cancel("STOP_EVENT")};var ph=function(){this.bd={Browser:mh,Node:nh,ReactNative:oh}[rf()]},qh,mh={V:bh,Sc:eh},nh={V:bh,Sc:eh},oh={V:Zg,Sc:ch};var rh="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" "),U=function(a,b){return{name:a||"",ca:"a valid string",optional:!!b,da:n}},sh=function(a){return{name:a||"",ca:"a valid object",optional:!1,da:ha}},th=function(a,b){return{name:a||"",ca:"a function",optional:!!b,da:p}},uh=function(){return{name:"",ca:"null",optional:!1,da:da}},vh=function(){return{name:"credential",ca:"a valid credential",optional:!1,da:function(a){return!(!a||!a.Ib)}}},wh=function(){return{name:"authProvider",ca:"a valid Auth provider",optional:!1,da:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}},xh=function(a,b,c,d){return{name:c||"",ca:a.ca+" or "+b.ca,optional:!!d,da:function(c){return a.da(c)||b.da(c)}}};var zh=function(a,b){for(var c in b){var d=b[c].name;a[d]=yh(d,a[c],b[c].b)}},V=function(a,b,c,d){a[b]=yh(b,c,d)},yh=function(a,b,c){if(!c)return b;var d=Ah(a);a=function(){var a=Array.prototype.slice.call(arguments),e;a:{e=Array.prototype.slice.call(a);var k;k=0;for(var r=!1,sa=0;sa<c.length
V(a,"GoogleAuthProvider",Uf,[]);V(a,"TwitterAuthProvider",Vf,[]);firebase.INTERNAL.registerService("auth",function(a,c){a=new Y(a);c({INTERNAL:{getToken:q(a.getToken,a),addAuthTokenListener:q(a.addAuthTokenListener,a),removeAuthTokenListener:q(a.removeAuthTokenListener,a)}});return a},a,function(a,c){if("create"===a)try{c.auth()}catch(d){}});firebase.INTERNAL.extendNamespace({User:W})}else throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.")})()})();module.exports=firebase.auth},{"./app":35}],37:[function(require,module,exports){"use strict";var REACT_STATICS={childContextTypes:true,contextTypes:true,defaultProps:true,displayName:true,getDefaultProps:true,mixins:true,propTypes:true,type:true};var KNOWN_STATICS={name:true,length:true,prototype:true,caller:true,arguments:true,arity:true};module.exports=function hoistNonReactStatics(targetComponent,sourceComponent){var keys=Object.getOwnPropertyNames(sourceComponent);for(var i=0;i<keys.length;++i){if(!REACT_STATICS[keys[i]]&&!KNOWN_STATICS[keys[i]]){try{targetComponent[keys[i]]=sourceComponent[keys[i]]}catch(error){}}}return targetComponent}},{}],38:[function(require,module,exports){(function(process){"use strict";var invariant=function(condition,format,a,b,c,d,e,f){if(process.env.NODE_ENV!=="production"){if(format===undefined){throw new Error("invariant requires an error message argument")}}if(!condition){var error;if(format===undefined){error=new Error("Minified exception occurred; use the non-minified dev environment "+"for the full error message and additional helpful warnings.")}else{var args=[a,b,c,d,e,f];var argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++]}));error.name="Invariant Violation"}error.framesToPop=1;throw error}};module.exports=invariant}).call(this,require("_process"))},{_process:47}],39:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],40:[function(require,module,exports){(function(global){(function(){var undefined;var VERSION="3.10.1";var BIND_FLAG=1,BIND_KEY_FLAG=2,CURRY_BOUND_FLAG=4,CURRY_FLAG=8,CURRY_RIGHT_FLAG=16,PARTIAL_FLAG=32,PARTIAL_RIGHT_FLAG=64,ARY_FLAG=128,REARG_FLAG=256;var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION="...";var HOT_COUNT=150,HOT_SPAN=16;var LARGE_ARRAY_SIZE=200;var LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2;var FUNC_ERROR_TEXT="Expected a function";var PLACEHOLDER="__lodash_placeholder__";var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var reEscapedHtml=/&(?:amp|lt|gt|quot|#39|#96);/g,reUnescapedHtml=/[&<>"'`]/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);var reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g;var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;var reRegExpChars=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,reHasRegExpChars=RegExp(reRegExpChars.source);var reComboMark=/[\u0300-\u036f\ufe20-\ufe23]/g;var reEscapeChar=/\\(\\)?/g;var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var reFlags=/\w*$/;var reHasHexPrefix=/^0[xX]/;var r
while(++index<length){result[index]=object[props[index]]}return result}function baseWhile(array,predicate,isDrop,fromRight){var length=array.length,index=fromRight?length:-1;while((fromRight?index--:++index<length)&&predicate(array[index],index,array)){}return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index)}function baseWrapperValue(value,actions){var result=value;if(result instanceof LazyWrapper){result=result.value()}var index=-1,length=actions.length;while(++index<length){var action=actions[index];result=action.func.apply(action.thisArg,arrayPush([result],action.args))}return result}function binaryIndex(array,value,retHighest){var low=0,high=array?array.length:low;if(typeof value=="number"&&value===value&&high<=HALF_MAX_ARRAY_LENGTH){while(low<high){var mid=low+high>>>1,computed=array[mid];if((retHighest?computed<=value:computed<value)&&computed!==null){low=mid+1}else{high=mid}}return high}return binaryIndexBy(array,value,identity,retHighest)}function binaryIndexBy(array,value,iteratee,retHighest){value=iteratee(value);var low=0,high=array?array.length:0,valIsNaN=value!==value,valIsNull=value===null,valIsUndef=value===undefined;while(low<high){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),isDef=computed!==undefined,isReflexive=computed===computed;if(valIsNaN){var setLow=isReflexive||retHighest}else if(valIsNull){setLow=isReflexive&&isDef&&(retHighest||computed!=null)}else if(valIsUndef){setLow=isReflexive&&(retHighest||isDef)}else if(computed==null){setLow=false}else{setLow=retHighest?computed<=value:computed<value}if(setLow){low=mid+1}else{high=mid}}return nativeMin(high,MAX_ARRAY_INDEX)}function bindCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(thisArg===undefined){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function bufferClone(buffer){var result=new ArrayBuffer(buffer.byteLength),view=new Uint8Array(result);view.set(new Uint8Array(buffer));return result}function composeArgs(args,partials,holders){var holdersLength=holders.length,argsIndex=-1,argsLength=nativeMax(args.length-holdersLength,0),leftIndex=-1,leftLength=partials.length,result=Array(leftLength+argsLength);while(++leftIndex<leftLength){result[leftIndex]=partials[leftIndex]}while(++argsIndex<holdersLength){result[holders[argsIndex]]=args[argsIndex]}while(argsLength--){result[leftIndex++]=args[argsIndex++]}return result}function composeArgsRight(args,partials,holders){var holdersIndex=-1,holdersLength=holders.length,argsIndex=-1,argsLength=nativeMax(args.length-holdersLength,0),rightIndex=-1,rightLength=partials.length,result=Array(argsLength+rightLength);while(++argsIndex<argsLength){result[argsIndex]=args[argsIndex]}var offset=argsIndex;while(++rightIndex<rightLength){result[offset+rightIndex]=partials[rightIndex]}while(++holdersIndex<holdersLength){result[offset+holders[holdersIndex]]=args[argsIndex++]}return result}function createAggregator(setter,initializer){return function(collection,iteratee,thisArg){var result=initializer?initializer():{};iteratee=getCallback(iteratee,thisArg,3);if(isArray(collection)){var index=-1,length=collection.length;while(++index<length){var value=collection[index];setter(result,value,iteratee(value,index,collection),collection)}}else{baseEach(collection,function(value,key,collection){setter(result,value,iteratee(value,key,collection),collection)})}return result}}function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=object==null?0:sources.length,customizer=length>2?sources[length-2]:undefined,guard=length>2?sources[2]:undefined,th
return result}function wrapperReverse(){var value=this.__wrapped__;var interceptor=function(value){return wrapped&&wrapped.__dir__<0?value:value.reverse()};if(value instanceof LazyWrapper){var wrapped=value;if(this.__actions__.length){wrapped=new LazyWrapper(this)}wrapped=wrapped.reverse();wrapped.__actions__.push({func:thru,args:[interceptor],thisArg:undefined});return new LodashWrapper(wrapped,this.__chain__)}return this.thru(interceptor)}function wrapperToString(){return this.value()+""}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}var at=restParam(function(collection,props){return baseAt(collection,baseFlatten(props))});var countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:result[key]=1});function every(collection,predicate,thisArg){var func=isArray(collection)?arrayEvery:baseEvery;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=undefined}if(typeof predicate!="function"||thisArg!==undefined){predicate=getCallback(predicate,thisArg,3)}return func(collection,predicate)}function filter(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;predicate=getCallback(predicate,thisArg,3);return func(collection,predicate)}var find=createFind(baseEach);var findLast=createFind(baseEachRight,true);function findWhere(collection,source){return find(collection,baseMatches(source))}var forEach=createForEach(arrayEach,baseEach);var forEachRight=createForEach(arrayEachRight,baseEachRight);var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{result[key]=[value]}});function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;if(!isLength(length)){collection=values(collection);length=collection.length}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex<=length&&collection.indexOf(target,fromIndex)>-1:!!length&&getIndexOf(collection,target,fromIndex)>-1}var indexBy=createAggregator(function(result,value,key){result[key]=value});var invoke=restParam(function(collection,path,args){var index=-1,isFunc=typeof path=="function",isProp=isKey(path),result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value){var func=isFunc?path:isProp&&value!=null?value[path]:undefined;result[++index]=func?func.apply(value,args):invokePath(value,path,args)});return result});function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=getCallback(iteratee,thisArg,3);return func(collection,iteratee)}var partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]});function pluck(collection,path){return map(collection,property(path))}var reduce=createReduce(arrayReduce,baseEach);var reduceRight=createReduce(arrayReduceRight,baseEachRight);function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;predicate=getCallback(predicate,thisArg,3);return func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function sample(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):n==null){collection=toIterable(collection);var length=collection.length;return length>0?collection[baseRandom(0,length-1)]:undefined}var index=-1,result=toArray(collection),length=result.length,lastIndex=length-1;n=nativeMin(n<0?0:+n||0,length);while(++index<n){var rand=baseRandom(index,lastIndex),value=result[rand];result[rand]=result[index];result[index]=value}result.length=n;return result}function shuffle(collection){return sample(collection,POSITIVE_INFINITY)}function size(collection){var length=collection?getLength(collection):0;return isLength(length)?length:keys(collection).length}function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseS
lodash.forOwn=forOwn;lodash.forOwnRight=forOwnRight;lodash.functions=functions;lodash.groupBy=groupBy;lodash.indexBy=indexBy;lodash.initial=initial;lodash.intersection=intersection;lodash.invert=invert;lodash.invoke=invoke;lodash.keys=keys;lodash.keysIn=keysIn;lodash.map=map;lodash.mapKeys=mapKeys;lodash.mapValues=mapValues;lodash.matches=matches;lodash.matchesProperty=matchesProperty;lodash.memoize=memoize;lodash.merge=merge;lodash.method=method;lodash.methodOf=methodOf;lodash.mixin=mixin;lodash.modArgs=modArgs;lodash.negate=negate;lodash.omit=omit;lodash.once=once;lodash.pairs=pairs;lodash.partial=partial;lodash.partialRight=partialRight;lodash.partition=partition;lodash.pick=pick;lodash.pluck=pluck;lodash.property=property;lodash.propertyOf=propertyOf;lodash.pull=pull;lodash.pullAt=pullAt;lodash.range=range;lodash.rearg=rearg;lodash.reject=reject;lodash.remove=remove;lodash.rest=rest;lodash.restParam=restParam;lodash.set=set;lodash.shuffle=shuffle;lodash.slice=slice;lodash.sortBy=sortBy;lodash.sortByAll=sortByAll;lodash.sortByOrder=sortByOrder;lodash.spread=spread;lodash.take=take;lodash.takeRight=takeRight;lodash.takeRightWhile=takeRightWhile;lodash.takeWhile=takeWhile;lodash.tap=tap;lodash.throttle=throttle;lodash.thru=thru;lodash.times=times;lodash.toArray=toArray;lodash.toPlainObject=toPlainObject;lodash.transform=transform;lodash.union=union;lodash.uniq=uniq;lodash.unzip=unzip;lodash.unzipWith=unzipWith;lodash.values=values;lodash.valuesIn=valuesIn;lodash.where=where;lodash.without=without;lodash.wrap=wrap;lodash.xor=xor;lodash.zip=zip;lodash.zipObject=zipObject;lodash.zipWith=zipWith;lodash.backflow=flowRight;lodash.collect=map;lodash.compose=flowRight;lodash.each=forEach;lodash.eachRight=forEachRight;lodash.extend=assign;lodash.iteratee=callback;lodash.methods=functions;lodash.object=zipObject;lodash.select=filter;lodash.tail=rest;lodash.unique=uniq;mixin(lodash,lodash);lodash.add=add;lodash.attempt=attempt;lodash.camelCase=camelCase;lodash.capitalize=capitalize;lodash.ceil=ceil;lodash.clone=clone;lodash.cloneDeep=cloneDeep;lodash.deburr=deburr;lodash.endsWith=endsWith;lodash.escape=escape;lodash.escapeRegExp=escapeRegExp;lodash.every=every;lodash.find=find;lodash.findIndex=findIndex;lodash.findKey=findKey;lodash.findLast=findLast;lodash.findLastIndex=findLastIndex;lodash.findLastKey=findLastKey;lodash.findWhere=findWhere;lodash.first=first;lodash.floor=floor;lodash.get=get;lodash.gt=gt;lodash.gte=gte;lodash.has=has;lodash.identity=identity;lodash.includes=includes;lodash.indexOf=indexOf;lodash.inRange=inRange;lodash.isArguments=isArguments;lodash.isArray=isArray;lodash.isBoolean=isBoolean;lodash.isDate=isDate;lodash.isElement=isElement;lodash.isEmpty=isEmpty;lodash.isEqual=isEqual;lodash.isError=isError;lodash.isFinite=isFinite;lodash.isFunction=isFunction;lodash.isMatch=isMatch;lodash.isNaN=isNaN;lodash.isNative=isNative;lodash.isNull=isNull;lodash.isNumber=isNumber;lodash.isObject=isObject;lodash.isPlainObject=isPlainObject;lodash.isRegExp=isRegExp;lodash.isString=isString;lodash.isTypedArray=isTypedArray;lodash.isUndefined=isUndefined;lodash.kebabCase=kebabCase;lodash.last=last;lodash.lastIndexOf=lastIndexOf;lodash.lt=lt;lodash.lte=lte;lodash.max=max;lodash.min=min;lodash.noConflict=noConflict;lodash.noop=noop;lodash.now=now;lodash.pad=pad;lodash.padLeft=padLeft;lodash.padRight=padRight;lodash.parseInt=parseInt;lodash.random=random;lodash.reduce=reduce;lodash.reduceRight=reduceRight;lodash.repeat=repeat;lodash.result=result;lodash.round=round;lodash.runInContext=runInContext;lodash.size=size;lodash.snakeCase=snakeCase;lodash.some=some;lodash.sortedIndex=sortedIndex;lodash.sortedLastIndex=sortedLastIndex;lodash.startCase=startCase;lodash.startsWith=startsWith;lodash.sum=sum;lodash.template=template;lodash.trim=trim;lodash.trimLeft=trimLeft;lodash.trimRight=trimRight;lodash.trunc=trunc;lodash.unescape=unescape;lodash.uniqueId=uniqueId;lodash.words=words;lodash.all=every;lodash.any=some;lodash.contains=includes;lodash.eq=isEqual;lodash.detect=find;lodash.foldl=reduce;lodash.foldr=reduceRight;lodash.head=first
(function(token){if(token.type!=="code"){return--pending||done()}return highlight(token.text,token.lang,function(err,code){if(err)return done(err);if(code==null||code===token.text){return--pending||done()}token.text=code;token.escaped=true;--pending||done()})})(tokens[i])}return}try{if(opt)opt=merge({},marked.defaults,opt);return Parser.parse(Lexer.lex(src,opt),opt)}catch(e){e.message+="\nPlease report this to https://github.com/chjj/marked.";if((opt||marked.defaults).silent){return"<p>An error occured:</p><pre>"+escape(e.message+"",true)+"</pre>"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}())}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],43:[function(require,module,exports){(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):global.moment=factory()})(this,function(){"use strict";var hookCallback;function utils_hooks__hooks(){return hookCallback.apply(null,arguments)}function setHookCallback(callback){hookCallback=callback}function isArray(input){return Object.prototype.toString.call(input)==="[object Array]"}function isDate(input){return input instanceof Date||Object.prototype.toString.call(input)==="[object Date]"}function map(arr,fn){var res=[],i;for(i=0;i<arr.length;++i){res.push(fn(arr[i],i))}return res}function hasOwnProp(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function extend(a,b){for(var i in b){if(hasOwnProp(b,i)){a[i]=b[i]}}if(hasOwnProp(b,"toString")){a.toString=b.toString}if(hasOwnProp(b,"valueOf")){a.valueOf=b.valueOf}return a}function create_utc__createUTC(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,true).utc()}function defaultParsingFlags(){return{empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false}}function getParsingFlags(m){if(m._pf==null){m._pf=defaultParsingFlags()}return m._pf}function valid__isValid(m){if(m._isValid==null){var flags=getParsingFlags(m);m._isValid=!isNaN(m._d.getTime())&&flags.overflow<0&&!flags.empty&&!flags.invalidMonth&&!flags.invalidWeekday&&!flags.nullInput&&!flags.invalidFormat&&!flags.userInvalidated;if(m._strict){m._isValid=m._isValid&&flags.charsLeftOver===0&&flags.unusedTokens.length===0&&flags.bigHour===undefined}}return m._isValid}function valid__createInvalid(flags){var m=create_utc__createUTC(NaN);if(flags!=null){extend(getParsingFlags(m),flags)}else{getParsingFlags(m).userInvalidated=true}return m}function isUndefined(input){return input===void 0}var momentProperties=utils_hooks__hooks.momentProperties=[];function copyConfig(to,from){var i,prop,val;if(!isUndefined(from._isAMomentObject)){to._isAMomentObject=from._isAMomentObject}if(!isUndefined(from._i)){to._i=from._i}if(!isUndefined(from._f)){to._f=from._f}if(!isUndefined(from._l)){to._l=from._l}if(!isUndefined(from._strict)){to._strict=from._strict}if(!isUndefined(from._tzm)){to._tzm=from._tzm}if(!isUndefined(from._isUTC)){to._isUTC=from._isUTC}if(!isUndefined(from._offset)){to._offset=from._offset}if(!isUndefined(from._pf)){to._pf=getParsingFlags(from)}if(!isUndefined(from._locale)){to._locale=from._locale}if(momentProperties.length>0)
var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN}if(input!=null){if(typeof input==="string"){input=offsetFromString(matchShortOffset,input)}else if(Math.abs(input)<16){input=input*60}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this)}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,"m")}if(offset!==input){if(!keepLocalTime||this._changeInProgress){add_subtract__addSubtract(this,create__createDuration(input-offset,"m"),1,false)}else if(!this._changeInProgress){this._changeInProgress=true;utils_hooks__hooks.updateOffset(this,true);this._changeInProgress=null}}return this}else{return this._isUTC?offset:getDateOffset(this)}}function getSetZone(input,keepLocalTime){if(input!=null){if(typeof input!=="string"){input=-input}this.utcOffset(input,keepLocalTime);return this}else{return-this.utcOffset()}}function setOffsetToUTC(keepLocalTime){return this.utcOffset(0,keepLocalTime)}function setOffsetToLocal(keepLocalTime){if(this._isUTC){this.utcOffset(0,keepLocalTime);this._isUTC=false;if(keepLocalTime){this.subtract(getDateOffset(this),"m")}}return this}function setOffsetToParsedOffset(){if(this._tzm){this.utcOffset(this._tzm)}else if(typeof this._i==="string"){this.utcOffset(offsetFromString(matchOffset,this._i))}return this}function hasAlignedHourOffset(input){if(!this.isValid()){return false}input=input?local__createLocal(input).utcOffset():0;return(this.utcOffset()-input)%60===0}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted)){return this._isDSTShifted}var c={};copyConfig(c,this);c=prepareConfig(c);if(c._a){var other=c._isUTC?create_utc__createUTC(c._a):local__createLocal(c._a);this._isDSTShifted=this.isValid()&&compareArrays(c._a,other.toArray())>0}else{this._isDSTShifted=false}return this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:false}function isUtcOffset(){return this.isValid()?this._isUTC:false}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:false}var aspNetRegex=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/;var isoRegex=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;function create__createDuration(input,key){var duration=input,match=null,sign,ret,diffRes;if(isDuration(input)){duration={ms:input._milliseconds,d:input._days,M:input._months}}else if(typeof input==="number"){duration={};if(key){duration[key]=input}else{duration.milliseconds=input}}else if(!!(match=aspNetRegex.exec(input))){sign=match[1]==="-"?-1:1;duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(match[MILLISECOND])*sign}}else if(!!(match=isoRegex.exec(input))){sign=match[1]==="-"?-1:1;duration={y:parseIso(match[2],sign),M:parseIso(match[3],sign),d:parseIso(match[4],sign),h:parseIso(match[5],sign),m:parseIso(match[6],sign),s:parseIso(match[7],sign),w:parseIso(match[8],sign)}}else if(duration==null){duration={}}else if(typeof duration==="object"&&("from"in duration||"to"in duration)){diffRes=momentsDifference(local__createLocal(duration.from),local__createLocal(duration.to));duration={};duration.ms=diffRes.milliseconds;duration.M=diffRes.months}ret=new Duration(duration);if(isDuration(input)&&hasOwnProp(input,"_locale")){ret._locale=input._locale}return ret}create__createDuration.fn=Duration.prototype;function parseIso(inp,sign){var res=inp&&parseFloat(inp.replace(",","."));return(isNaN(res)?0:res)*sign}function positiveMomentsDifference(base,other){var res={milliseconds:0,months:0};res.months=other.month()-base.month()+(other.year()-base.year())*12;if(base.clone().add(res.months,"M").isAfter(other)){--res.months}res.milliseconds=+other-+base.clone().add(res.months,"M");return res}function momentsDifference(base,other){var res;if(!(base.isValid()&&other.isValid())){return{milliseconds:0,months
this._days=mathAbs(this._days);this._months=mathAbs(this._months);data.milliseconds=mathAbs(data.milliseconds);data.seconds=mathAbs(data.seconds);data.minutes=mathAbs(data.minutes);data.hours=mathAbs(data.hours);data.months=mathAbs(data.months);data.years=mathAbs(data.years);return this}function duration_add_subtract__addSubtract(duration,input,value,direction){var other=create__createDuration(input,value);duration._milliseconds+=direction*other._milliseconds;duration._days+=direction*other._days;duration._months+=direction*other._months;return duration._bubble()}function duration_add_subtract__add(input,value){return duration_add_subtract__addSubtract(this,input,value,1)}function duration_add_subtract__subtract(input,value){return duration_add_subtract__addSubtract(this,input,value,-1)}function absCeil(number){if(number<0){return Math.floor(number)}else{return Math.ceil(number)}}function bubble(){var milliseconds=this._milliseconds;var days=this._days;var months=this._months;var data=this._data;var seconds,minutes,hours,years,monthsFromDays;if(!(milliseconds>=0&&days>=0&&months>=0||milliseconds<=0&&days<=0&&months<=0)){milliseconds+=absCeil(monthsToDays(months)+days)*864e5;days=0;months=0}data.milliseconds=milliseconds%1e3;seconds=absFloor(milliseconds/1e3);data.seconds=seconds%60;minutes=absFloor(seconds/60);data.minutes=minutes%60;hours=absFloor(minutes/60);data.hours=hours%24;days+=absFloor(hours/24);monthsFromDays=absFloor(daysToMonths(days));months+=monthsFromDays;days-=absCeil(monthsToDays(monthsFromDays));years=absFloor(months/12);months%=12;data.days=days;data.months=months;data.years=years;return this}function daysToMonths(days){return days*4800/146097}function monthsToDays(months){return months*146097/4800}function as(units){var days;var months;var milliseconds=this._milliseconds;units=normalizeUnits(units);if(units==="month"||units==="year"){days=this._days+milliseconds/864e5;months=this._months+daysToMonths(days);return units==="month"?months:months/12}else{days=this._days+Math.round(monthsToDays(this._months));switch(units){case"week":return days/7+milliseconds/6048e5;case"day":return days+milliseconds/864e5;case"hour":return days*24+milliseconds/36e5;case"minute":return days*1440+milliseconds/6e4;case"second":return days*86400+milliseconds/1e3;case"millisecond":return Math.floor(days*864e5)+milliseconds;default:throw new Error("Unknown unit "+units)}}}function duration_as__valueOf(){return this._milliseconds+this._days*864e5+this._months%12*2592e6+toInt(this._months/12)*31536e6}function makeAs(alias){return function(){return this.as(alias)}}var asMilliseconds=makeAs("ms");var asSeconds=makeAs("s");var asMinutes=makeAs("m");var asHours=makeAs("h");var asDays=makeAs("d");var asWeeks=makeAs("w");var asMonths=makeAs("M");var asYears=makeAs("y");function duration_get__get(units){units=normalizeUnits(units);return this[units+"s"]()}function makeGetter(name){return function(){return this._data[name]}}var milliseconds=makeGetter("milliseconds");var seconds=makeGetter("seconds");var minutes=makeGetter("minutes");var hours=makeGetter("hours");var days=makeGetter("days");var months=makeGetter("months");var years=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var round=Math.round;var thresholds={s:45,m:45,h:22,d:26,M:11};function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture)}function duration_humanize__relativeTime(posNegDuration,withoutSuffix,locale){var duration=create__createDuration(posNegDuration).abs();var seconds=round(duration.as("s"));var minutes=round(duration.as("m"));var hours=round(duration.as("h"));var days=round(duration.as("d"));var months=round(duration.as("M"));var years=round(duration.as("y"));var a=seconds<thresholds.s&&["s",seconds]||minutes<=1&&["m"]||minutes<thresholds.m&&["mm",minutes]||hours<=1&&["h"]||hours<thresholds.h&&["hh",hours]||days<=1&&["d"]||days<thresholds.d&&["dd",days]||months<=1&&["M"]||months<thresholds.M&&["MM",months]||years<=1&&["y"]||["yy",years];a[2]=withoutSuffix;a[
dispatch((0,_reducerAndActions.updateFocusedSuggestion)(sectionIndex,suggestionIndex,value))},revealSuggestions:function revealSuggestions(){dispatch((0,_reducerAndActions.revealSuggestions)())},closeSuggestions:function closeSuggestions(lastAction){dispatch((0,_reducerAndActions.closeSuggestions)(lastAction))}}}var Autosuggest=function(_Component){_inherits(Autosuggest,_Component);function Autosuggest(){_classCallCheck(this,Autosuggest);var _this=_possibleConstructorReturn(this,Object.getPrototypeOf(Autosuggest).call(this));_this.saveInput=_this.saveInput.bind(_this);return _this}_createClass(Autosuggest,[{key:"componentWillReceiveProps",value:function componentWillReceiveProps(nextProps){if(nextProps.suggestions!==this.props.suggestions){var suggestions=nextProps.suggestions;var inputProps=nextProps.inputProps;var shouldRenderSuggestions=nextProps.shouldRenderSuggestions;var isCollapsed=nextProps.isCollapsed;var revealSuggestions=nextProps.revealSuggestions;var lastAction=nextProps.lastAction;var value=inputProps.value;if(isCollapsed&&lastAction!=="click"&&lastAction!=="enter"&&suggestions.length>0&&shouldRenderSuggestions(value)){revealSuggestions()}}}},{key:"getSuggestion",value:function getSuggestion(sectionIndex,suggestionIndex){var _props=this.props;var suggestions=_props.suggestions;var multiSection=_props.multiSection;var getSectionSuggestions=_props.getSectionSuggestions;if(multiSection){return getSectionSuggestions(suggestions[sectionIndex])[suggestionIndex]}return suggestions[suggestionIndex]}},{key:"getFocusedSuggestion",value:function getFocusedSuggestion(){var _props2=this.props;var focusedSectionIndex=_props2.focusedSectionIndex;var focusedSuggestionIndex=_props2.focusedSuggestionIndex;if(focusedSuggestionIndex===null){return null}return this.getSuggestion(focusedSectionIndex,focusedSuggestionIndex)}},{key:"getSuggestionValueByIndex",value:function getSuggestionValueByIndex(sectionIndex,suggestionIndex){var getSuggestionValue=this.props.getSuggestionValue;return getSuggestionValue(this.getSuggestion(sectionIndex,suggestionIndex))}},{key:"getSuggestionIndices",value:function getSuggestionIndices(suggestionElement){var sectionIndex=suggestionElement.getAttribute("data-section-index");var suggestionIndex=suggestionElement.getAttribute("data-suggestion-index");return{sectionIndex:typeof sectionIndex==="string"?parseInt(sectionIndex,10):null,suggestionIndex:parseInt(suggestionIndex,10)}}},{key:"findSuggestionElement",value:function findSuggestionElement(startNode){var node=startNode;do{if(node.getAttribute("data-suggestion-index")!==null){return node}node=node.parentNode}while(node!==null);console.error("Clicked element:",startNode);throw new Error("Couldn't find suggestion element")}},{key:"maybeEmitOnChange",value:function maybeEmitOnChange(event,newValue,method){var _props$inputProps=this.props.inputProps;var value=_props$inputProps.value;var onChange=_props$inputProps.onChange;if(newValue!==value){onChange&&onChange(event,{newValue:newValue,method:method})}}},{key:"willRenderSuggestions",value:function willRenderSuggestions(){var _props3=this.props;var suggestions=_props3.suggestions;var inputProps=_props3.inputProps;var shouldRenderSuggestions=_props3.shouldRenderSuggestions;var value=inputProps.value;return suggestions.length>0&&shouldRenderSuggestions(value)}},{key:"saveInput",value:function saveInput(autowhatever){if(autowhatever!==null){var input=autowhatever.refs.input;this.input=input;this.props.inputRef(input)}}},{key:"render",value:function render(){var _this2=this;var _props4=this.props;var suggestions=_props4.suggestions;var onSuggestionsUpdateRequested=_props4.onSuggestionsUpdateRequested;var renderSuggestion=_props4.renderSuggestion;var inputProps=_props4.inputProps;var shouldRenderSuggestions=_props4.shouldRenderSuggestions;var onSuggestionSelected=_props4.onSuggestionSelected;var multiSection=_props4.multiSection;var renderSectionTitle=_props4.renderSectionTitle;var id=_props4.id;var getSectionSuggestions=_props4.getSectionSuggestions;var focusInputOnSuggestionClick=_props4.focusInputOnSugg
}},matchRoute:function(path){if(!path){return false}var matchedRoute={};this.state._routes.some(function(route){var matches=route.pattern.exec(path);if(matches){matchedRoute.handler=route.handler;matchedRoute.params=matches.slice(1,route.params.length+1);return true}return false});return matchedRoute.handler?matchedRoute:false}};function getInitialPath(component){var path=component.props.path||component.context.path,hash,url;if(!path&&detect.canUseDOM){url=urllite(window.location.href);if(component.props.history){path=url.pathname+url.search}else if(url.hash){hash=urllite(url.hash.slice(2));path=hash.pathname+hash.search}}return path||"/"}function getHref(evt){if(evt.defaultPrevented){return}if(evt.metaKey||evt.ctrlKey||evt.shiftKey){return}if(evt.button!==0){return}var elt=getEventTarget(evt);while(elt&&elt.nodeName!=="A"){elt=elt.parentNode}if(!elt){return}if(elt.target&&elt.target!=="_self"){return}if(!!elt.attributes.download){return}var linkURL=urllite(elt.href);var windowURL=urllite(window.location.href);if(linkURL.protocol!==windowURL.protocol||linkURL.host!==windowURL.host){return}return linkURL}function processRoutes(root,routes,component){var patterns=[],path,pattern,keys,handler,handlerFn;for(path in routes){if(routes.hasOwnProperty(path)){keys=[];pattern=pathToRegexp(root+path,keys);handler=routes[path];handlerFn=component[handler];patterns.push({pattern:pattern,params:keys,handler:handlerFn})}}return patterns}function parseSearch(str){var parsed={};if(str.indexOf("?")===0)str=str.slice(1);var pairs=str.split("&");pairs.forEach(function(pair){var keyVal=pair.split("=");parsed[decodeURIComponent(keyVal[0])]=decodeURIComponent(keyVal[1])});return parsed}},{"./detect":61,"fbjs/lib/EventListener":64,"path-to-regexp":46,react:210,"react-dom":58,"react/lib/getEventTarget":195,"urllite/lib/core":226}],61:[function(require,module,exports){var canUseDOM=!!(typeof window!=="undefined"&&window.document&&window.document.createElement);module.exports={canUseDOM:canUseDOM,hasPushState:canUseDOM&&window.history&&"pushState"in window.history,hasHashbang:function(){return canUseDOM&&window.location.hash.indexOf("#!")===0},hasEventConstructor:function(){return typeof window.Event=="function"}}},{}],62:[function(require,module,exports){var detect=require("./detect");module.exports={createEvent:function(name){if(detect.hasEventConstructor()){return new window.Event(name)}else{var event=document.createEvent("Event");event.initEvent(name,true,false);return event}}}},{"./detect":61}],63:[function(require,module,exports){var detect=require("./detect");var event=require("./event");module.exports=function triggerUrl(url,silent){if(detect.hasHashbang()){window.location.hash="#!"+url}else if(detect.hasPushState){window.history.pushState({},"",url);if(!silent){window.dispatchEvent(event.createEvent("popstate"))}}else{console.error("Browser does not support pushState, and hash is missing a hashbang prefix!")}}},{"./detect":61,"./event":62}],64:[function(require,module,exports){(function(process){"use strict";var emptyFunction=require("./emptyFunction");var EventListener={listen:function(target,eventType,callback){if(target.addEventListener){target.addEventListener(eventType,callback,false);return{remove:function(){target.removeEventListener(eventType,callback,false)}}}else if(target.attachEvent){target.attachEvent("on"+eventType,callback);return{remove:function(){target.detachEvent("on"+eventType,callback)}}}},capture:function(target,eventType,callback){if(target.addEventListener){target.addEventListener(eventType,callback,true);return{remove:function(){target.removeEventListener(eventType,callback,true)}}}else{if(process.env.NODE_ENV!=="production"){console.error("Attempted to listen to events during the capture phase on a "+"browser that does not support the capture phase. Your application "+"will not receive some events.")}return{remove:emptyFunction}}},registerDefault:function(){}};module.exports=EventListener}).call(this,require("_process"))},{"./emptyFunction":65,_process:47}],65:[function(require,module,exports){arguments[4][15][0
if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return}warnedStyleNames[name]=true;process.env.NODE_ENV!=="production"?warning(false,"Unsupported vendor-prefixed style property %s. Did you mean %s?",name,name.charAt(0).toUpperCase()+name.slice(1)):undefined};var warnStyleValueWithSemicolon=function(name,value){if(warnedStyleValues.hasOwnProperty(value)&&warnedStyleValues[value]){return}warnedStyleValues[value]=true;process.env.NODE_ENV!=="production"?warning(false,"Style property values shouldn't contain a semicolon. "+'Try "%s: %s" instead.',name,value.replace(badStyleValueWithSemicolonPattern,"")):undefined};var warnValidStyle=function(name,value){if(name.indexOf("-")>-1){warnHyphenatedStyleName(name)}else if(badVendoredStyleNamePattern.test(name)){warnBadVendoredStyleName(name)}else if(badStyleValueWithSemicolonPattern.test(value)){warnStyleValueWithSemicolon(name,value)}}}var CSSPropertyOperations={createMarkupForStyles:function(styles){var serialized="";for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue}var styleValue=styles[styleName];if(process.env.NODE_ENV!=="production"){warnValidStyle(styleName,styleValue)}if(styleValue!=null){serialized+=processStyleName(styleName)+":";serialized+=dangerousStyleValue(styleName,styleValue)+";"}}return serialized||null},setValueForStyles:function(node,styles){var style=node.style;for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue}if(process.env.NODE_ENV!=="production"){warnValidStyle(styleName,styles[styleName])}var styleValue=dangerousStyleValue(styleName,styles[styleName]);if(styleName==="float"){styleName=styleFloatAccessor}if(styleValue){style[styleName]=styleValue}else{var expansion=hasShorthandPropertyBug&&CSSProperty.shorthandPropertyExpansions[styleName];if(expansion){for(var individualStyleName in expansion){style[individualStyleName]=""}}else{style[styleName]=""}}}}};ReactPerf.measureMethods(CSSPropertyOperations,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"});module.exports=CSSPropertyOperations}).call(this,require("_process"))},{"./CSSProperty":79,"./ReactPerf":149,"./dangerousStyleValue":186,_process:47,"fbjs/lib/ExecutionEnvironment":9,"fbjs/lib/camelizeStyleName":11,"fbjs/lib/hyphenateStyleName":22,"fbjs/lib/memoizeStringOnly":29,"fbjs/lib/warning":34}],81:[function(require,module,exports){(function(process){"use strict";var PooledClass=require("./PooledClass");var assign=require("./Object.assign");var invariant=require("fbjs/lib/invariant");function CallbackQueue(){this._callbacks=null;this._contexts=null}assign(CallbackQueue.prototype,{enqueue:function(callback,context){this._callbacks=this._callbacks||[];this._contexts=this._contexts||[];this._callbacks.push(callback);this._contexts.push(context)},notifyAll:function(){var callbacks=this._callbacks;var contexts=this._contexts;if(callbacks){!(callbacks.length===contexts.length)?process.env.NODE_ENV!=="production"?invariant(false,"Mismatched list of contexts in callback queue"):invariant(false):undefined;this._callbacks=null;this._contexts=null;for(var i=0;i<callbacks.length;i++){callbacks[i].call(contexts[i])}callbacks.length=0;contexts.length=0}},reset:function(){this._callbacks=null;this._contexts=null},destructor:function(){this.reset()}});PooledClass.addPoolingTo(CallbackQueue);module.exports=CallbackQueue}).call(this,require("_process"))},{"./Object.assign":98,"./PooledClass":99,_process:47,"fbjs/lib/invariant":23}],82:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants");var EventPluginHub=require("./EventPluginHub");var EventPropagators=require("./EventPropagators");var ExecutionEnvironment=require("fbjs/lib/ExecutionEnvironment");var ReactUpdates=require("./ReactUpdates");var SyntheticEvent=require("./SyntheticEvent");var getEventTarget=require("./getEventTarget");var isEventSupported=require("./isEventSupported");var isTextInputElement=require("./isTextInputElement");var keyOf=require("fbjs/lib/keyOf");var topLevelTypes=EventConstants.topLevelTypes;var eventTypes={change:{phasedRe
putListener:function(id,registrationName,listener){!(typeof listener==="function")?process.env.NODE_ENV!=="production"?invariant(false,"Expected %s listener to be a function, instead got type %s",registrationName,typeof listener):invariant(false):undefined;var bankForRegistrationName=listenerBank[registrationName]||(listenerBank[registrationName]={});bankForRegistrationName[id]=listener;var PluginModule=EventPluginRegistry.registrationNameModules[registrationName];if(PluginModule&&PluginModule.didPutListener){PluginModule.didPutListener(id,registrationName,listener)}},getListener:function(id,registrationName){var bankForRegistrationName=listenerBank[registrationName];return bankForRegistrationName&&bankForRegistrationName[id]},deleteListener:function(id,registrationName){var PluginModule=EventPluginRegistry.registrationNameModules[registrationName];if(PluginModule&&PluginModule.willDeleteListener){PluginModule.willDeleteListener(id,registrationName)}var bankForRegistrationName=listenerBank[registrationName];if(bankForRegistrationName){delete bankForRegistrationName[id]}},deleteAllListeners:function(id){for(var registrationName in listenerBank){if(!listenerBank[registrationName][id]){continue}var PluginModule=EventPluginRegistry.registrationNameModules[registrationName];if(PluginModule&&PluginModule.willDeleteListener){PluginModule.willDeleteListener(id,registrationName)}delete listenerBank[registrationName][id]}},extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){var events;var plugins=EventPluginRegistry.plugins;for(var i=0;i<plugins.length;i++){var possiblePlugin=plugins[i];if(possiblePlugin){var extractedEvents=possiblePlugin.extractEvents(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget);if(extractedEvents){events=accumulateInto(events,extractedEvents)}}}return events},enqueueEvents:function(events){if(events){eventQueue=accumulateInto(eventQueue,events)}},processEventQueue:function(simulated){var processingEventQueue=eventQueue;eventQueue=null;if(simulated){forEachAccumulated(processingEventQueue,executeDispatchesAndReleaseSimulated)}else{forEachAccumulated(processingEventQueue,executeDispatchesAndReleaseTopLevel)}!!eventQueue?process.env.NODE_ENV!=="production"?invariant(false,"processEventQueue(): Additional events were enqueued while processing "+"an event queue. Support for this has not yet been implemented."):invariant(false):undefined;ReactErrorUtils.rethrowCaughtError()},__purge:function(){listenerBank={}},__getListenerBank:function(){return listenerBank}};module.exports=EventPluginHub}).call(this,require("_process"))},{"./EventPluginRegistry":92,"./EventPluginUtils":93,"./ReactErrorUtils":134,"./accumulateInto":183,"./forEachAccumulated":191,_process:47,"fbjs/lib/invariant":23,"fbjs/lib/warning":34}],92:[function(require,module,exports){(function(process){"use strict";var invariant=require("fbjs/lib/invariant");var EventPluginOrder=null;var namesToPlugins={};function recomputePluginOrdering(){if(!EventPluginOrder){return}for(var pluginName in namesToPlugins){var PluginModule=namesToPlugins[pluginName];var pluginIndex=EventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?process.env.NODE_ENV!=="production"?invariant(false,"EventPluginRegistry: Cannot inject event plugins that do not exist in "+"the plugin ordering, `%s`.",pluginName):invariant(false):undefined;if(EventPluginRegistry.plugins[pluginIndex]){continue}!PluginModule.extractEvents?process.env.NODE_ENV!=="production"?invariant(false,"EventPluginRegistry: Event plugins must implement an `extractEvents` "+"method, but `%s` does not.",pluginName):invariant(false):undefined;EventPluginRegistry.plugins[pluginIndex]=PluginModule;var publishedEvents=PluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],PluginModule,eventName)?process.env.NODE_ENV!=="production"?invariant(false,"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",eventName,pluginName):invariant(false):undefined}}}function publishEventForPlugin(
if(ReactBrowserEventEmitter.ReactEventListener){ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled)}},isEnabled:function(){return!!(ReactBrowserEventEmitter.ReactEventListener&&ReactBrowserEventEmitter.ReactEventListener.isEnabled())},listenTo:function(registrationName,contentDocumentHandle){var mountAt=contentDocumentHandle;var isListening=getListeningForDocument(mountAt);var dependencies=EventPluginRegistry.registrationNameDependencies[registrationName];var topLevelTypes=EventConstants.topLevelTypes;for(var i=0;i<dependencies.length;i++){var dependency=dependencies[i];if(!(isListening.hasOwnProperty(dependency)&&isListening[dependency])){if(dependency===topLevelTypes.topWheel){if(isEventSupported("wheel")){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel,"wheel",mountAt)}else if(isEventSupported("mousewheel")){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel,"mousewheel",mountAt)}else{ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel,"DOMMouseScroll",mountAt)}}else if(dependency===topLevelTypes.topScroll){if(isEventSupported("scroll",true)){ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll,"scroll",mountAt)}else{ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll,"scroll",ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE)}}else if(dependency===topLevelTypes.topFocus||dependency===topLevelTypes.topBlur){if(isEventSupported("focus",true)){ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus,"focus",mountAt);ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur,"blur",mountAt)}else if(isEventSupported("focusin")){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus,"focusin",mountAt);ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur,"focusout",mountAt)}isListening[topLevelTypes.topBlur]=true;isListening[topLevelTypes.topFocus]=true}else if(topEventMapping.hasOwnProperty(dependency)){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency,topEventMapping[dependency],mountAt)}isListening[dependency]=true}}},trapBubbledEvent:function(topLevelType,handlerBaseName,handle){return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType,handlerBaseName,handle)},trapCapturedEvent:function(topLevelType,handlerBaseName,handle){return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType,handlerBaseName,handle)},ensureScrollValueMonitoring:function(){if(!isMonitoringScrollValue){var refresh=ViewportMetrics.refreshScrollValues;ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);isMonitoringScrollValue=true}},eventNameDispatchConfigs:EventPluginHub.eventNameDispatchConfigs,registrationNameModules:EventPluginHub.registrationNameModules,putListener:EventPluginHub.putListener,getListener:EventPluginHub.getListener,deleteListener:EventPluginHub.deleteListener,deleteAllListeners:EventPluginHub.deleteAllListeners});ReactPerf.measureMethods(ReactBrowserEventEmitter,"ReactBrowserEventEmitter",{putListener:"putListener",deleteListener:"deleteListener"});module.exports=ReactBrowserEventEmitter},{"./EventConstants":90,"./EventPluginHub":91,"./EventPluginRegistry":92,"./Object.assign":98,"./ReactEventEmitterMixin":135,"./ReactPerf":149,"./ViewportMetrics":182,"./isEventSupported":200}],103:[function(require,module,exports){"use strict";var React=require("./React");var assign=require("./Object.assign");var ReactTransitionGroup=require("./ReactTransitionGroup");var ReactCSSTransitionGroupChild=require("./ReactCSSTransitionGroupChild");function createTransitionTimeoutPropValidator(transitionType){var timeoutPropName="transition"+transitionType+"Timeout";var enabledPropName="transition"+transitionType;return function(props){if(props[enabledPropName]){if(props[timeoutPropName]==null){return new Error(timeoutPropName+" wasn't supplied to ReactCSSTransitionGroup: "+"
var shouldUpdateReactComponent=require("./shouldUpdateReactComponent");var warning=require("fbjs/lib/warning");function getDeclarationErrorAddendum(component){var owner=component._currentElement._owner||null;if(owner){var name=owner.getName();if(name){return" Check the render method of `"+name+"`."}}return""}function StatelessComponent(Component){}StatelessComponent.prototype.render=function(){var Component=ReactInstanceMap.get(this)._currentElement.type;return Component(this.props,this.context,this.updater)};var nextMountID=1;var ReactCompositeComponentMixin={construct:function(element){this._currentElement=element;this._rootNodeID=null;this._instance=null;this._pendingElement=null;this._pendingStateQueue=null;this._pendingReplaceState=false;this._pendingForceUpdate=false;this._renderedComponent=null;this._context=null;this._mountOrder=0;this._topLevelWrapper=null;this._pendingCallbacks=null},mountComponent:function(rootID,transaction,context){this._context=context;this._mountOrder=nextMountID++;this._rootNodeID=rootID;var publicProps=this._processProps(this._currentElement.props);var publicContext=this._processContext(context);var Component=this._currentElement.type;var inst;var renderedElement;var canInstantiate="prototype"in Component;if(canInstantiate){if(process.env.NODE_ENV!=="production"){ReactCurrentOwner.current=this;try{inst=new Component(publicProps,publicContext,ReactUpdateQueue)}finally{ReactCurrentOwner.current=null}}else{inst=new Component(publicProps,publicContext,ReactUpdateQueue)}}if(!canInstantiate||inst===null||inst===false||ReactElement.isValidElement(inst)){renderedElement=inst;inst=new StatelessComponent(Component)}if(process.env.NODE_ENV!=="production"){if(inst.render==null){process.env.NODE_ENV!=="production"?warning(false,"%s(...): No `render` method found on the returned component "+"instance: you may have forgotten to define `render`, returned "+"null/false from a stateless component, or tried to render an "+"element whose type is a function that isn't a React component.",Component.displayName||Component.name||"Component"):undefined}else{process.env.NODE_ENV!=="production"?warning(Component.prototype&&Component.prototype.isReactComponent||!canInstantiate||!(inst instanceof Component),"%s(...): React component classes must extend React.Component.",Component.displayName||Component.name||"Component"):undefined}}inst.props=publicProps;inst.context=publicContext;inst.refs=emptyObject;inst.updater=ReactUpdateQueue;this._instance=inst;ReactInstanceMap.set(inst,this);if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(!inst.getInitialState||inst.getInitialState.isReactClassApproved,"getInitialState was defined on %s, a plain JavaScript class. "+"This is only supported for classes created using React.createClass. "+"Did you mean to define a state property instead?",this.getName()||"a component"):undefined;process.env.NODE_ENV!=="production"?warning(!inst.getDefaultProps||inst.getDefaultProps.isReactClassApproved,"getDefaultProps was defined on %s, a plain JavaScript class. "+"This is only supported for classes created using React.createClass. "+"Use a static property to define defaultProps instead.",this.getName()||"a component"):undefined;process.env.NODE_ENV!=="production"?warning(!inst.propTypes,"propTypes was defined as an instance property on %s. Use a static "+"property to define propTypes instead.",this.getName()||"a component"):undefined;process.env.NODE_ENV!=="production"?warning(!inst.contextTypes,"contextTypes was defined as an instance property on %s. Use a "+"static property to define contextTypes instead.",this.getName()||"a component"):undefined;process.env.NODE_ENV!=="production"?warning(typeof inst.componentShouldUpdate!=="function","%s has a method called "+"componentShouldUpdate(). Did you mean shouldComponentUpdate()? "+"The name is phrased as a question because the function is "+"expected to return a value.",this.getName()||"A component"):undefined;process.env.NODE_ENV!=="production"?warning(typeof inst.componentDidUnmount!=="function","%s has a me
if(context[validateDOMNesting.ancestorInfoContextKey]){validateDOMNesting(this._tag,this,context[validateDOMNesting.ancestorInfoContextKey])}}if(process.env.NODE_ENV!=="production"){this._unprocessedContextDev=context;this._processedContextDev=processChildContextDev(context,this);context=this._processedContextDev}var mountImage;if(transaction.useCreateElement){var ownerDocument=context[ReactMount.ownerDocumentContextKey];var el=ownerDocument.createElement(this._currentElement.type);DOMPropertyOperations.setAttributeForID(el,this._rootNodeID);ReactMount.getID(el);this._updateDOMProperties({},props,transaction,el);this._createInitialChildren(transaction,props,context,el);mountImage=el}else{var tagOpen=this._createOpenTagMarkupAndPutListeners(transaction,props);var tagContent=this._createContentMarkup(transaction,props,context);if(!tagContent&&omittedCloseTags[this._tag]){mountImage=tagOpen+"/>"}else{mountImage=tagOpen+">"+tagContent+"</"+this._currentElement.type+">"}}switch(this._tag){case"input":transaction.getReactMountReady().enqueue(mountReadyInputWrapper,this);case"button":case"select":case"textarea":if(props.autoFocus){transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent,this)}break}return mountImage},_createOpenTagMarkupAndPutListeners:function(transaction,props){var ret="<"+this._currentElement.type;for(var propKey in props){if(!props.hasOwnProperty(propKey)){continue}var propValue=props[propKey];if(propValue==null){continue}if(registrationNameModules.hasOwnProperty(propKey)){if(propValue){enqueuePutListener(this._rootNodeID,propKey,propValue,transaction)}}else{if(propKey===STYLE){if(propValue){if(process.env.NODE_ENV!=="production"){this._previousStyle=propValue}propValue=this._previousStyleCopy=assign({},props.style)}propValue=CSSPropertyOperations.createMarkupForStyles(propValue)}var markup=null;if(this._tag!=null&&isCustomComponent(this._tag,props)){if(propKey!==CHILDREN){markup=DOMPropertyOperations.createMarkupForCustomAttribute(propKey,propValue)}}else{markup=DOMPropertyOperations.createMarkupForProperty(propKey,propValue)}if(markup){ret+=" "+markup}}}if(transaction.renderToStaticMarkup){return ret}var markupForID=DOMPropertyOperations.createMarkupForID(this._rootNodeID);return ret+" "+markupForID},_createContentMarkup:function(transaction,props,context){var ret="";var innerHTML=props.dangerouslySetInnerHTML;if(innerHTML!=null){if(innerHTML.__html!=null){ret=innerHTML.__html}}else{var contentToUse=CONTENT_TYPES[typeof props.children]?props.children:null;var childrenToUse=contentToUse!=null?null:props.children;if(contentToUse!=null){ret=escapeTextContentForBrowser(contentToUse)}else if(childrenToUse!=null){var mountImages=this.mountChildren(childrenToUse,transaction,context);ret=mountImages.join("")}}if(newlineEatingTags[this._tag]&&ret.charAt(0)==="\n"){return"\n"+ret}else{return ret}},_createInitialChildren:function(transaction,props,context,el){var innerHTML=props.dangerouslySetInnerHTML;if(innerHTML!=null){if(innerHTML.__html!=null){setInnerHTML(el,innerHTML.__html)}}else{var contentToUse=CONTENT_TYPES[typeof props.children]?props.children:null;var childrenToUse=contentToUse!=null?null:props.children;if(contentToUse!=null){setTextContent(el,contentToUse)}else if(childrenToUse!=null){var mountImages=this.mountChildren(childrenToUse,transaction,context);for(var i=0;i<mountImages.length;i++){el.appendChild(mountImages[i])}}}},receiveComponent:function(nextElement,transaction,context){var prevElement=this._currentElement;this._currentElement=nextElement;this.updateComponent(transaction,prevElement,nextElement,context)},updateComponent:function(transaction,prevElement,nextElement,context){var lastProps=prevElement.props;var nextProps=this._currentElement.props;switch(this._tag){case"button":lastProps=ReactDOMButton.getNativeProps(this,lastProps);nextProps=ReactDOMButton.getNativeProps(this,nextProps);break;case"input":ReactDOMInput.updateWrapper(this);lastProps=ReactDOMInput.getNativeProps(this,lastProps);nextProps=ReactDOMInput.getNativeProps(this,nextProps);break;case"option":lastProps
ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID,"value",""+value)}}};function _handleChange(event){var props=this._currentElement.props;var returnValue=LinkedValueUtils.executeOnChange(props,event);ReactUpdates.asap(forceUpdateIfMounted,this);return returnValue}module.exports=ReactDOMTextarea}).call(this,require("_process"))},{"./LinkedValueUtils":97,"./Object.assign":98,"./ReactDOMIDOperations":118,"./ReactUpdates":164,_process:47,"fbjs/lib/invariant":23,"fbjs/lib/warning":34}],126:[function(require,module,exports){"use strict";var ReactUpdates=require("./ReactUpdates");var Transaction=require("./Transaction");var assign=require("./Object.assign");var emptyFunction=require("fbjs/lib/emptyFunction");var RESET_BATCHED_UPDATES={initialize:emptyFunction,close:function(){ReactDefaultBatchingStrategy.isBatchingUpdates=false}};var FLUSH_BATCHED_UPDATES={initialize:emptyFunction,close:ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)};var TRANSACTION_WRAPPERS=[FLUSH_BATCHED_UPDATES,RESET_BATCHED_UPDATES];function ReactDefaultBatchingStrategyTransaction(){this.reinitializeTransaction()}assign(ReactDefaultBatchingStrategyTransaction.prototype,Transaction.Mixin,{getTransactionWrappers:function(){return TRANSACTION_WRAPPERS}});var transaction=new ReactDefaultBatchingStrategyTransaction;var ReactDefaultBatchingStrategy={isBatchingUpdates:false,batchedUpdates:function(callback,a,b,c,d,e){var alreadyBatchingUpdates=ReactDefaultBatchingStrategy.isBatchingUpdates;ReactDefaultBatchingStrategy.isBatchingUpdates=true;if(alreadyBatchingUpdates){callback(a,b,c,d,e)}else{transaction.perform(callback,null,a,b,c,d,e)}}};module.exports=ReactDefaultBatchingStrategy},{"./Object.assign":98,"./ReactUpdates":164,"./Transaction":181,"fbjs/lib/emptyFunction":15}],127:[function(require,module,exports){(function(process){"use strict";var BeforeInputEventPlugin=require("./BeforeInputEventPlugin");var ChangeEventPlugin=require("./ChangeEventPlugin");var ClientReactRootIndex=require("./ClientReactRootIndex");var DefaultEventPluginOrder=require("./DefaultEventPluginOrder");var EnterLeaveEventPlugin=require("./EnterLeaveEventPlugin");var ExecutionEnvironment=require("fbjs/lib/ExecutionEnvironment");var HTMLDOMPropertyConfig=require("./HTMLDOMPropertyConfig");var ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin");var ReactComponentBrowserEnvironment=require("./ReactComponentBrowserEnvironment");var ReactDefaultBatchingStrategy=require("./ReactDefaultBatchingStrategy");var ReactDOMComponent=require("./ReactDOMComponent");var ReactDOMTextComponent=require("./ReactDOMTextComponent");var ReactEventListener=require("./ReactEventListener");var ReactInjection=require("./ReactInjection");var ReactInstanceHandles=require("./ReactInstanceHandles");var ReactMount=require("./ReactMount");var ReactReconcileTransaction=require("./ReactReconcileTransaction");var SelectEventPlugin=require("./SelectEventPlugin");var ServerReactRootIndex=require("./ServerReactRootIndex");var SimpleEventPlugin=require("./SimpleEventPlugin");var SVGDOMPropertyConfig=require("./SVGDOMPropertyConfig");var alreadyInjected=false;function inject(){if(alreadyInjected){return}alreadyInjected=true;ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles);ReactInjection.EventPluginHub.injectMount(ReactMount);ReactInjection.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:SimpleEventPlugin,EnterLeaveEventPlugin:EnterLeaveEventPlugin,ChangeEventPlugin:ChangeEventPlugin,SelectEventPlugin:SelectEventPlugin,BeforeInputEventPlugin:BeforeInputEventPlugin});ReactInjection.NativeComponent.injectGenericComponentClass(ReactDOMComponent);ReactInjection.NativeComponent.injectTextComponentClass(ReactDOMTextComponent);ReactInjection.Class.injectMixin(ReactBrowserComponentMixin);ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfi
},monitorScrollValue:function(refresh){var callback=scrollValueMonitor.bind(null,refresh);EventListener.listen(window,"scroll",callback)},dispatchEvent:function(topLevelType,nativeEvent){if(!ReactEventListener._enabled){return}var bookKeeping=TopLevelCallbackBookKeeping.getPooled(topLevelType,nativeEvent);try{ReactUpdates.batchedUpdates(handleTopLevelImpl,bookKeeping)}finally{TopLevelCallbackBookKeeping.release(bookKeeping)}}};module.exports=ReactEventListener},{"./Object.assign":98,"./PooledClass":99,"./ReactInstanceHandles":139,"./ReactMount":143,"./ReactUpdates":164,"./getEventTarget":195,"fbjs/lib/EventListener":8,"fbjs/lib/ExecutionEnvironment":9,"fbjs/lib/getUnboundedScrollPosition":20}],137:[function(require,module,exports){"use strict";var DOMProperty=require("./DOMProperty");var EventPluginHub=require("./EventPluginHub");var ReactComponentEnvironment=require("./ReactComponentEnvironment");var ReactClass=require("./ReactClass");var ReactEmptyComponent=require("./ReactEmptyComponent");var ReactBrowserEventEmitter=require("./ReactBrowserEventEmitter");var ReactNativeComponent=require("./ReactNativeComponent");var ReactPerf=require("./ReactPerf");var ReactRootIndex=require("./ReactRootIndex");var ReactUpdates=require("./ReactUpdates");var ReactInjection={Component:ReactComponentEnvironment.injection,Class:ReactClass.injection,DOMProperty:DOMProperty.injection,EmptyComponent:ReactEmptyComponent.injection,EventPluginHub:EventPluginHub.injection,EventEmitter:ReactBrowserEventEmitter.injection,NativeComponent:ReactNativeComponent.injection,Perf:ReactPerf.injection,RootIndex:ReactRootIndex.injection,Updates:ReactUpdates.injection};module.exports=ReactInjection},{"./DOMProperty":85,"./EventPluginHub":91,"./ReactBrowserEventEmitter":102,"./ReactClass":107,"./ReactComponentEnvironment":110,"./ReactEmptyComponent":132,"./ReactNativeComponent":146,"./ReactPerf":149,"./ReactRootIndex":156,"./ReactUpdates":164}],138:[function(require,module,exports){"use strict";var ReactDOMSelection=require("./ReactDOMSelection");var containsNode=require("fbjs/lib/containsNode");var focusNode=require("fbjs/lib/focusNode");var getActiveElement=require("fbjs/lib/getActiveElement");function isInDocument(node){return containsNode(document.documentElement,node)}var ReactInputSelection={hasSelectionCapabilities:function(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();return nodeName&&(nodeName==="input"&&elem.type==="text"||nodeName==="textarea"||elem.contentEditable==="true")},getSelectionInformation:function(){var focusedElem=getActiveElement();return{focusedElem:focusedElem,selectionRange:ReactInputSelection.hasSelectionCapabilities(focusedElem)?ReactInputSelection.getSelection(focusedElem):null}},restoreSelection:function(priorSelectionInformation){var curFocusedElem=getActiveElement();var priorFocusedElem=priorSelectionInformation.focusedElem;var priorSelectionRange=priorSelectionInformation.selectionRange;if(curFocusedElem!==priorFocusedElem&&isInDocument(priorFocusedElem)){if(ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)){ReactInputSelection.setSelection(priorFocusedElem,priorSelectionRange)}focusNode(priorFocusedElem)}},getSelection:function(input){var selection;if("selectionStart"in input){selection={start:input.selectionStart,end:input.selectionEnd}}else if(document.selection&&(input.nodeName&&input.nodeName.toLowerCase()==="input")){var range=document.selection.createRange();if(range.parentElement()===input){selection={start:-range.moveStart("character",-input.value.length),end:-range.moveEnd("character",-input.value.length)}}}else{selection=ReactDOMSelection.getOffsets(input)}return selection||{start:0,end:0}},setSelection:function(input,offsets){var start=offsets.start;var end=offsets.end;if(typeof end==="undefined"){end=start}if("selectionStart"in input){input.selectionStart=start;input.selectionEnd=Math.min(end,input.value.length)}else if(document.selection&&(input.nodeName&&input.nodeName.toLowerCase()==="input")){var range=input.createTextRange();range.collapse(true);range.moveStart("character",
"./ReactUpdates":164,"./instantiateReactComponent":199,"./setInnerHTML":205,"./shouldUpdateReactComponent":207,"./validateDOMNesting":209,_process:47,"fbjs/lib/containsNode":12,"fbjs/lib/emptyObject":16,"fbjs/lib/invariant":23,"fbjs/lib/warning":34}],144:[function(require,module,exports){(function(process){"use strict";var ReactComponentEnvironment=require("./ReactComponentEnvironment");var ReactMultiChildUpdateTypes=require("./ReactMultiChildUpdateTypes");var ReactCurrentOwner=require("./ReactCurrentOwner");var ReactReconciler=require("./ReactReconciler");var ReactChildReconciler=require("./ReactChildReconciler");var flattenChildren=require("./flattenChildren");var updateDepth=0;var updateQueue=[];var markupQueue=[];function enqueueInsertMarkup(parentID,markup,toIndex){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.INSERT_MARKUP,markupIndex:markupQueue.push(markup)-1,content:null,fromIndex:null,toIndex:toIndex})}function enqueueMove(parentID,fromIndex,toIndex){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.MOVE_EXISTING,markupIndex:null,content:null,fromIndex:fromIndex,toIndex:toIndex})}function enqueueRemove(parentID,fromIndex){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.REMOVE_NODE,markupIndex:null,content:null,fromIndex:fromIndex,toIndex:null})}function enqueueSetMarkup(parentID,markup){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.SET_MARKUP,markupIndex:null,content:markup,fromIndex:null,toIndex:null})}function enqueueTextContent(parentID,textContent){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.TEXT_CONTENT,markupIndex:null,content:textContent,fromIndex:null,toIndex:null})}function processQueue(){if(updateQueue.length){ReactComponentEnvironment.processChildrenUpdates(updateQueue,markupQueue);clearQueue()}}function clearQueue(){updateQueue.length=0;markupQueue.length=0}var ReactMultiChild={Mixin:{_reconcilerInstantiateChildren:function(nestedChildren,transaction,context){if(process.env.NODE_ENV!=="production"){if(this._currentElement){try{ReactCurrentOwner.current=this._currentElement._owner;return ReactChildReconciler.instantiateChildren(nestedChildren,transaction,context)}finally{ReactCurrentOwner.current=null}}}return ReactChildReconciler.instantiateChildren(nestedChildren,transaction,context)},_reconcilerUpdateChildren:function(prevChildren,nextNestedChildrenElements,transaction,context){var nextChildren;if(process.env.NODE_ENV!=="production"){if(this._currentElement){try{ReactCurrentOwner.current=this._currentElement._owner;nextChildren=flattenChildren(nextNestedChildrenElements)}finally{ReactCurrentOwner.current=null}return ReactChildReconciler.updateChildren(prevChildren,nextChildren,transaction,context)}}nextChildren=flattenChildren(nextNestedChildrenElements);return ReactChildReconciler.updateChildren(prevChildren,nextChildren,transaction,context)},mountChildren:function(nestedChildren,transaction,context){var children=this._reconcilerInstantiateChildren(nestedChildren,transaction,context);this._renderedChildren=children;var mountImages=[];var index=0;for(var name in children){if(children.hasOwnProperty(name)){var child=children[name];var rootID=this._rootNodeID+name;var mountImage=ReactReconciler.mountComponent(child,rootID,transaction,context);child._mountIndex=index++;mountImages.push(mountImage)}}return mountImages},updateTextContent:function(nextContent){updateDepth++;var errorThrown=true;try{var prevChildren=this._renderedChildren;ReactChildReconciler.unmountChildren(prevChildren);for(var name in prevChildren){if(prevChildren.hasOwnProperty(name)){this._unmountChild(prevChildren[name])}}this.setTextContent(nextContent);errorThrown=false}finally{updateDepth--;if(!updateDepth){if(errorThrown){clearQueue()}else{processQueue()}}}},updateMarkup:function(nextMarkup){updateDepth++;var errorThrown=true;try{var prevChildren=this._renderedChildren;ReactChildReconciler.unmountChildren(prevChildren);for(var name in prevChild
if(endEvents.length===0){return}endEvents.forEach(function(endEvent){removeEventListener(node,endEvent,eventListener)})}};module.exports=ReactTransitionEvents},{"fbjs/lib/ExecutionEnvironment":9}],162:[function(require,module,exports){"use strict";var React=require("./React");var ReactTransitionChildMapping=require("./ReactTransitionChildMapping");var assign=require("./Object.assign");var emptyFunction=require("fbjs/lib/emptyFunction");var ReactTransitionGroup=React.createClass({displayName:"ReactTransitionGroup",propTypes:{component:React.PropTypes.any,childFactory:React.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:emptyFunction.thatReturnsArgument}},getInitialState:function(){return{children:ReactTransitionChildMapping.getChildMapping(this.props.children)}},componentWillMount:function(){this.currentlyTransitioningKeys={};this.keysToEnter=[];this.keysToLeave=[]},componentDidMount:function(){var initialChildMapping=this.state.children;for(var key in initialChildMapping){if(initialChildMapping[key]){this.performAppear(key)}}},componentWillReceiveProps:function(nextProps){var nextChildMapping=ReactTransitionChildMapping.getChildMapping(nextProps.children);var prevChildMapping=this.state.children;this.setState({children:ReactTransitionChildMapping.mergeChildMappings(prevChildMapping,nextChildMapping)});var key;for(key in nextChildMapping){var hasPrev=prevChildMapping&&prevChildMapping.hasOwnProperty(key);if(nextChildMapping[key]&&!hasPrev&&!this.currentlyTransitioningKeys[key]){this.keysToEnter.push(key)}}for(key in prevChildMapping){var hasNext=nextChildMapping&&nextChildMapping.hasOwnProperty(key);if(prevChildMapping[key]&&!hasNext&&!this.currentlyTransitioningKeys[key]){this.keysToLeave.push(key)}}},componentDidUpdate:function(){var keysToEnter=this.keysToEnter;this.keysToEnter=[];keysToEnter.forEach(this.performEnter);var keysToLeave=this.keysToLeave;this.keysToLeave=[];keysToLeave.forEach(this.performLeave)},performAppear:function(key){this.currentlyTransitioningKeys[key]=true;var component=this.refs[key];if(component.componentWillAppear){component.componentWillAppear(this._handleDoneAppearing.bind(this,key))}else{this._handleDoneAppearing(key)}},_handleDoneAppearing:function(key){var component=this.refs[key];if(component.componentDidAppear){component.componentDidAppear()}delete this.currentlyTransitioningKeys[key];var currentChildMapping=ReactTransitionChildMapping.getChildMapping(this.props.children);if(!currentChildMapping||!currentChildMapping.hasOwnProperty(key)){this.performLeave(key)}},performEnter:function(key){this.currentlyTransitioningKeys[key]=true;var component=this.refs[key];if(component.componentWillEnter){component.componentWillEnter(this._handleDoneEntering.bind(this,key))}else{this._handleDoneEntering(key)}},_handleDoneEntering:function(key){var component=this.refs[key];if(component.componentDidEnter){component.componentDidEnter()}delete this.currentlyTransitioningKeys[key];var currentChildMapping=ReactTransitionChildMapping.getChildMapping(this.props.children);if(!currentChildMapping||!currentChildMapping.hasOwnProperty(key)){this.performLeave(key)}},performLeave:function(key){this.currentlyTransitioningKeys[key]=true;var component=this.refs[key];if(component.componentWillLeave){component.componentWillLeave(this._handleDoneLeaving.bind(this,key))}else{this._handleDoneLeaving(key)}},_handleDoneLeaving:function(key){var component=this.refs[key];if(component.componentDidLeave){component.componentDidLeave()}delete this.currentlyTransitioningKeys[key];var currentChildMapping=ReactTransitionChildMapping.getChildMapping(this.props.children);if(currentChildMapping&&currentChildMapping.hasOwnProperty(key)){this.performEnter(key)}else{this.setState(function(state){var newChildren=assign({},state.children);delete newChildren[key];return{children:newChildren}})}},render:function(){var childrenToRender=[];for(var key in this.state.children){var child=this.state.children[key];if(child){childrenToRender.push(React.cloneElement(this.props.childFactory(child),{ref:key,key:key}))}}r
extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent,nativeEventTarget){var dispatchConfig=topLevelEventsToDispatchConfig[topLevelType];if(!dispatchConfig){return null}var EventConstructor;switch(topLevelType){case topLevelTypes.topAbort:case topLevelTypes.topCanPlay:case topLevelTypes.topCanPlayThrough:case topLevelTypes.topDurationChange:case topLevelTypes.topEmptied:case topLevelTypes.topEncrypted:case topLevelTypes.topEnded:case topLevelTypes.topError:case topLevelTypes.topInput:case topLevelTypes.topLoad:case topLevelTypes.topLoadedData:case topLevelTypes.topLoadedMetadata:case topLevelTypes.topLoadStart:case topLevelTypes.topPause:case topLevelTypes.topPlay:case topLevelTypes.topPlaying:case topLevelTypes.topProgress:case topLevelTypes.topRateChange:case topLevelTypes.topReset:case topLevelTypes.topSeeked:case topLevelTypes.topSeeking:case topLevelTypes.topStalled:case topLevelTypes.topSubmit:case topLevelTypes.topSuspend:case topLevelTypes.topTimeUpdate:case topLevelTypes.topVolumeChange:case topLevelTypes.topWaiting:EventConstructor=SyntheticEvent;break;case topLevelTypes.topKeyPress:if(getEventCharCode(nativeEvent)===0){return null}case topLevelTypes.topKeyDown:case topLevelTypes.topKeyUp:EventConstructor=SyntheticKeyboardEvent;break;case topLevelTypes.topBlur:case topLevelTypes.topFocus:EventConstructor=SyntheticFocusEvent;break;case topLevelTypes.topClick:if(nativeEvent.button===2){return null}case topLevelTypes.topContextMenu:case topLevelTypes.topDoubleClick:case topLevelTypes.topMouseDown:case topLevelTypes.topMouseMove:case topLevelTypes.topMouseOut:case topLevelTypes.topMouseOver:case topLevelTypes.topMouseUp:EventConstructor=SyntheticMouseEvent;break;case topLevelTypes.topDrag:case topLevelTypes.topDragEnd:case topLevelTypes.topDragEnter:case topLevelTypes.topDragExit:case topLevelTypes.topDragLeave:case topLevelTypes.topDragOver:case topLevelTypes.topDragStart:case topLevelTypes.topDrop:EventConstructor=SyntheticDragEvent;break;case topLevelTypes.topTouchCancel:case topLevelTypes.topTouchEnd:case topLevelTypes.topTouchMove:case topLevelTypes.topTouchStart:EventConstructor=SyntheticTouchEvent;break;case topLevelTypes.topScroll:EventConstructor=SyntheticUIEvent;break;case topLevelTypes.topWheel:EventConstructor=SyntheticWheelEvent;break;case topLevelTypes.topCopy:case topLevelTypes.topCut:case topLevelTypes.topPaste:EventConstructor=SyntheticClipboardEvent;break}!EventConstructor?process.env.NODE_ENV!=="production"?invariant(false,"SimpleEventPlugin: Unhandled event type, `%s`.",topLevelType):invariant(false):undefined;var event=EventConstructor.getPooled(dispatchConfig,topLevelTargetID,nativeEvent,nativeEventTarget);EventPropagators.accumulateTwoPhaseDispatches(event);return event},didPutListener:function(id,registrationName,listener){if(registrationName===ON_CLICK_KEY){var node=ReactMount.getNode(id);if(!onClickListeners[id]){onClickListeners[id]=EventListener.listen(node,"click",emptyFunction)}}},willDeleteListener:function(id,registrationName){if(registrationName===ON_CLICK_KEY){onClickListeners[id].remove();delete onClickListeners[id]}}};module.exports=SimpleEventPlugin}).call(this,require("_process"))},{"./EventConstants":90,"./EventPropagators":94,"./ReactMount":143,"./SyntheticClipboardEvent":170,"./SyntheticDragEvent":172,"./SyntheticEvent":173,"./SyntheticFocusEvent":174,"./SyntheticKeyboardEvent":176,"./SyntheticMouseEvent":177,"./SyntheticTouchEvent":178,"./SyntheticUIEvent":179,"./SyntheticWheelEvent":180,"./getEventCharCode":192,_process:47,"fbjs/lib/EventListener":8,"fbjs/lib/emptyFunction":15,"fbjs/lib/invariant":23,"fbjs/lib/keyOf":27}],170:[function(require,module,exports){"use strict";var SyntheticEvent=require("./SyntheticEvent");var ClipboardEventInterface={clipboardData:function(event){return"clipboardData"in event?event.clipboardData:window.clipboardData}};function SyntheticClipboardEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget)}SyntheticEvent.augment
node.removeChild(textNode)}else{textNode.deleteData(0,1)}}else{node.innerHTML=html}}}}module.exports=setInnerHTML},{"fbjs/lib/ExecutionEnvironment":9}],206:[function(require,module,exports){"use strict";var ExecutionEnvironment=require("fbjs/lib/ExecutionEnvironment");var escapeTextContentForBrowser=require("./escapeTextContentForBrowser");var setInnerHTML=require("./setInnerHTML");var setTextContent=function(node,text){node.textContent=text};if(ExecutionEnvironment.canUseDOM){if(!("textContent"in document.documentElement)){setTextContent=function(node,text){setInnerHTML(node,escapeTextContentForBrowser(text))}}}module.exports=setTextContent},{"./escapeTextContentForBrowser":188,"./setInnerHTML":205,"fbjs/lib/ExecutionEnvironment":9}],207:[function(require,module,exports){"use strict";function shouldUpdateReactComponent(prevElement,nextElement){var prevEmpty=prevElement===null||prevElement===false;var nextEmpty=nextElement===null||nextElement===false;if(prevEmpty||nextEmpty){return prevEmpty===nextEmpty}var prevType=typeof prevElement;var nextType=typeof nextElement;if(prevType==="string"||prevType==="number"){return nextType==="string"||nextType==="number"}else{return nextType==="object"&&prevElement.type===nextElement.type&&prevElement.key===nextElement.key}return false}module.exports=shouldUpdateReactComponent},{}],208:[function(require,module,exports){(function(process){"use strict";var ReactCurrentOwner=require("./ReactCurrentOwner");var ReactElement=require("./ReactElement");var ReactInstanceHandles=require("./ReactInstanceHandles");var getIteratorFn=require("./getIteratorFn");var invariant=require("fbjs/lib/invariant");var warning=require("fbjs/lib/warning");var SEPARATOR=ReactInstanceHandles.SEPARATOR;var SUBSEPARATOR=":";var userProvidedKeyEscaperLookup={"=":"=0",".":"=1",":":"=2"};var userProvidedKeyEscapeRegex=/[=.:]/g;var didWarnAboutMaps=false;function userProvidedKeyEscaper(match){return userProvidedKeyEscaperLookup[match]}function getComponentKey(component,index){if(component&&component.key!=null){return wrapUserProvidedKey(component.key)}return index.toString(36)}function escapeUserProvidedKey(text){return(""+text).replace(userProvidedKeyEscapeRegex,userProvidedKeyEscaper)}function wrapUserProvidedKey(key){return"$"+escapeUserProvidedKey(key)}function traverseAllChildrenImpl(children,nameSoFar,callback,traverseContext){var type=typeof children;if(type==="undefined"||type==="boolean"){children=null}if(children===null||type==="string"||type==="number"||ReactElement.isValidElement(children)){callback(traverseContext,children,nameSoFar===""?SEPARATOR+getComponentKey(children,0):nameSoFar);return 1}var child;var nextName;var subtreeCount=0;var nextNamePrefix=nameSoFar===""?SEPARATOR:nameSoFar+SUBSEPARATOR;if(Array.isArray(children)){for(var i=0;i<children.length;i++){child=children[i];nextName=nextNamePrefix+getComponentKey(child,i);subtreeCount+=traverseAllChildrenImpl(child,nextName,callback,traverseContext)}}else{var iteratorFn=getIteratorFn(children);if(iteratorFn){var iterator=iteratorFn.call(children);var step;if(iteratorFn!==children.entries){var ii=0;while(!(step=iterator.next()).done){child=step.value;nextName=nextNamePrefix+getComponentKey(child,ii++);subtreeCount+=traverseAllChildrenImpl(child,nextName,callback,traverseContext)}}else{if(process.env.NODE_ENV!=="production"){process.env.NODE_ENV!=="production"?warning(didWarnAboutMaps,"Using Maps as children is not yet fully supported. It is an "+"experimental feature that might be removed. Convert it to a "+"sequence / iterable of keyed ReactElements instead."):undefined;didWarnAboutMaps=true}while(!(step=iterator.next()).done){var entry=step.value;if(entry){child=entry[1];nextName=nextNamePrefix+wrapUserProvidedKey(entry[0])+SUBSEPARATOR+getComponentKey(child,0);subtreeCount+=traverseAllChildrenImpl(child,nextName,callback,traverseContext)}}}}else if(type==="object"){var addendum="";if(process.env.NODE_ENV!=="production"){addendum=" If you meant to render a collection of children, use an array "+"instead or wrap the object using createFragment(obje
if(!m[4])this.prerelease=[];else this.prerelease=m[4].split(".").map(function(id){if(/^[0-9]+$/.test(id)){var num=+id;if(num>=0&&num<MAX_SAFE_INTEGER)return num}return id});this.build=m[5]?m[5].split("."):[];this.format()}SemVer.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length)this.version+="-"+this.prerelease.join(".");return this.version};SemVer.prototype.toString=function(){return this.version};SemVer.prototype.compare=function(other){debug("SemVer.compare",this.version,this.loose,other);if(!(other instanceof SemVer))other=new SemVer(other,this.loose);return this.compareMain(other)||this.comparePre(other)};SemVer.prototype.compareMain=function(other){if(!(other instanceof SemVer))other=new SemVer(other,this.loose);return compareIdentifiers(this.major,other.major)||compareIdentifiers(this.minor,other.minor)||compareIdentifiers(this.patch,other.patch)};SemVer.prototype.comparePre=function(other){if(!(other instanceof SemVer))other=new SemVer(other,this.loose);if(this.prerelease.length&&!other.prerelease.length)return-1;else if(!this.prerelease.length&&other.prerelease.length)return 1;else if(!this.prerelease.length&&!other.prerelease.length)return 0;var i=0;do{var a=this.prerelease[i];var b=other.prerelease[i];debug("prerelease compare",i,a,b);if(a===undefined&&b===undefined)return 0;else if(b===undefined)return 1;else if(a===undefined)return-1;else if(a===b)continue;else return compareIdentifiers(a,b)}while(++i)};SemVer.prototype.inc=function(release,identifier){switch(release){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",identifier);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",identifier);break;case"prepatch":this.prerelease.length=0;this.inc("patch",identifier);this.inc("pre",identifier);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",identifier);this.inc("pre",identifier);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var i=this.prerelease.length;while(--i>=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1)this.prerelease.push(0)}if(identifier){if(this.prerelease[0]===identifier){if(isNaN(this.prerelease[1]))this.prerelease=[identifier,0]}else this.prerelease=[identifier,0]}break;default:throw new Error("invalid increment argument: "+release)}this.format();this.raw=this.version;return this};exports.inc=inc;function inc(version,release,loose,identifier){if(typeof loose==="string"){identifier=loose;loose=undefined}try{return new SemVer(version,loose).inc(release,identifier).version}catch(er){return null}}exports.diff=diff;function diff(version1,version2){if(eq(version1,version2)){return null}else{var v1=parse(version1);var v2=parse(version2);if(v1.prerelease.length||v2.prerelease.length){for(var key in v1){if(key==="major"||key==="minor"||key==="patch"){if(v1[key]!==v2[key]){return"pre"+key}}}return"prerelease"}for(var key in v1){if(key==="major"||key==="minor"||key==="patch"){if(v1[key]!==v2[key]){return key}}}}}exports.compareIdentifiers=compareIdentifiers;var numeric=/^[0-9]+$/;function compareIdentifiers(a,b){var anum=numeric.test(a);var bnum=numeric.test(b);if(anum&&bnum){a=+a;b=+b}return anum&&!bnum?-1:bnum&&!anum?1:a<b?-1:a>b?1:0}exports.rcompareIdentifiers=rcompareIdentifiers;function rcompareIdentifiers(a,b){return compareIdentifiers(b,a)}exports.major=major;function major(a,loose){return new SemVer(a,loose).major}exports.minor=minor;function minor(a,loose){return new SemVer(a,loose).minor}exports.patch=patch;function patch(a,loose){return new SemVer(a,loose).patch}exports.compare=compare;function compare(a,b,loose){return new SemVer(a,loose).compare(b)}exports.com
lodash:40,react:210,"react-mini-router":59}],229:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _EventEmitter=require("../lib/EventEmitter.js");var _EventEmitter2=_interopRequireDefault(_EventEmitter);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.default=new _EventEmitter2.default},{"../lib/EventEmitter.js":247}],230:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"])_i["return"]()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr)){return arr}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _react=require("react");var _react2=_interopRequireDefault(_react);var _reactAutosuggest=require("react-autosuggest");var _reactAutosuggest2=_interopRequireDefault(_reactAutosuggest);var _App=require("../App.jsx");var _App2=_interopRequireDefault(_App);var _appActions=require("../actions/appActions.js");var _appActions2=_interopRequireDefault(_appActions);var _Icon=require("./Icon.jsx");var _Icon2=_interopRequireDefault(_Icon);var _Space=require("./Space.jsx");var _Space2=_interopRequireDefault(_Space);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var AddProjectForm=function(_React$Component){_inherits(AddProjectForm,_React$Component);function AddProjectForm(props){_classCallCheck(this,AddProjectForm);var _this=_possibleConstructorReturn(this,Object.getPrototypeOf(AddProjectForm).call(this,props));_this.state={val:""};_this._onChange=_this._onChange.bind(_this);_this._onAdd=_this._onAdd.bind(_this);return _this}_createClass(AddProjectForm,[{key:"_onSignIn",value:function _onSignIn(){_appActions2.default.emit("user.signin")}},{key:"_onChange",value:function _onChange(evt,_ref){var newValue=_ref.newValue;this.setState({val:newValue})}},{key:"_onGetList",value:function _onGetList(_ref2){var value=_ref2.value;_appActions2.default.emit("projects.search",value)}},{key:"_getListValue",value:function _getListValue(value){return value}},{key:"_renderListValue",value:function _renderListValue(value){return value}},{key:"_onAdd",value:function _onAdd(){var val=this.state.val;if(!/^[^\s\/]+\/[^\s\/]+$/.test(val))return;var _val$split=val.split("/");var _val$split2=_slicedToArray(_val$split,2);var owner=_val$split2[0];var name=_val$
}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Milestones=function(_React$Component){_inherits(Milestones,_React$Component);function Milestones(props){_classCallCheck(this,Milestones);return _possibleConstructorReturn(this,Object.getPrototypeOf(Milestones).call(this,props))}_createClass(Milestones,[{key:"_onSort",value:function _onSort(){_appActions2.default.emit("projects.sort")}},{key:"_onRefresh",value:function _onRefresh(){_appActions2.default.emit("projects.load")}},{key:"render",value:function render(){var _props=this.props;var projects=_props.projects;var project=_props.project;var errors=(0,_lodash2.default)(projects.list).filter("errors").map(function(project,i){var text=project.errors.join("\n");return _react2.default.createElement("tr",{key:"err-"+i},_react2.default.createElement("td",{colSpan:"3",className:"repo"},_react2.default.createElement("div",{className:"project"},project.owner,"/",project.name,_react2.default.createElement("span",{className:"error",title:text},_react2.default.createElement(_Icon2.default,{name:"warning"})))))}).value();var list=[];_lodash2.default.each(projects.index,function(_ref){var _ref2=_slicedToArray(_ref,2);var pI=_ref2[0];var mI=_ref2[1];var _projects$list$pI=projects.list[pI];var owner=_projects$list$pI.owner;var name=_projects$list$pI.name;var milestones=_projects$list$pI.milestones;var milestone=milestones[mI];if(!(!project||project.owner==owner&&project.name==name))return;list.push(_react2.default.createElement("tr",{className:(0,_classnames2.default)({done:milestone.stats.isDone}),key:pI+"-"+mI},_react2.default.createElement("td",{className:"repo"},_react2.default.createElement(_Link2.default,{route:{to:"milestones",params:{owner:owner,name:name}},className:"project"},owner,"/",name)),_react2.default.createElement("td",null,_react2.default.createElement(_Link2.default,{route:{to:"chart",params:{owner:owner,name:name,milestone:milestone.number}},className:"milestone"},milestone.title)),_react2.default.createElement("td",{style:{width:"1%"}},_react2.default.createElement("div",{className:"progress"},_react2.default.createElement("span",{className:"percent"},Math.floor(milestone.stats.progress.points),"%"),_react2.default.createElement("span",{className:(0,_classnames2.default)("due",{red:milestone.stats.isOverdue})},_format2.default.due(milestone.due_on)),_react2.default.createElement("div",{className:"outer bar"},_react2.default.createElement("div",{className:(0,_classnames2.default)("inner","bar",{green:milestone.stats.isOnTime,red:!milestone.stats.isOnTime}),style:{width:milestone.stats.progress.points+"%"}}))))))});if(!errors.length&&!list.length)return false;if(project){return _react2.default.createElement("div",{id:"projects"},_react2.default.createElement("div",{className:"header"},_react2.default.createElement("a",{className:"sort",onClick:this._onSort},_react2.default.createElement(_Icon2.default,{name:"sort"})," Sorted by ",projects.sortBy),_react2.default.createElement("h2",null,"Milestones")),_react2.default.createElement("table",null,_react2.default.createElement("tbody",null,list)),_react2.default.createElement("div",{className:"footer"}))}else{return _react2.default.createElement("div",{id:"projects"},_react2.default.createElement("div",{className:"header"},_react2.default.createElement("a",{className:"sort",onClick:this._onSort},_react2.default.createElement(_Icon2.default,{name:"sort"})," Sorted by ",projects.sortBy),_react2.default.createElement("h2",null,"Projects")),_react2.default.createElement("table",null,_react2.default.createElement("tbody",null,errors,list)),_react2.default.createElement("div",{className:"footer"},_react2.default.createElement("a",{onClick:this.props.onToggleMode},"Edit Projects"),_react2.default.createElement("a",{onClick:this._onRefresh},"Refresh Projects")))}}}]);return Milestones}(_react2.default.Component);exports.d
}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Page=function(_React$Component){_inherits(Page,_React$Component);function Page(props){_classCallCheck(this,Page);var _this=_possibleConstructorReturn(this,Object.getPrototypeOf(Page).call(this,props));_this.state=_this._getData();_this._onChange=_this._onChange.bind(_this);return _this}_createClass(Page,[{key:"_getData",value:function _getData(store){var obj={};if(store){obj[store]=_stores2.default[store].get()}else{for(var key in _stores2.default){obj[key]=_stores2.default[key].get()}}return obj}},{key:"_onChange",value:function _onChange(store,val,key){if(!this._isMounted)return;this.setState(this._getData(store))}},{key:"componentDidMount",value:function componentDidMount(){this._isMounted=true;for(var key in _stores2.default){_stores2.default[key].onAny(_lodash2.default.partial(this._onChange,key))}}},{key:"componentWillUnmount",value:function componentWillUnmount(){this._isMounted=false;for(var key in _stores2.default){_stores2.default[key].clean(this._onChange)}}}]);return Page}(_react2.default.Component);exports.default=Page},{"../stores":258,lodash:40,react:210}],249:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _objectPath=require("object-path");var _objectPath2=_interopRequireDefault(_objectPath);var _objectAssign=require("object-assign");var _objectAssign2=_interopRequireDefault(_objectAssign);var _lodash=require("lodash");var _lodash2=_interopRequireDefault(_lodash);var _deepDiff=require("deep-diff");var _EventEmitter2=require("./EventEmitter.js");var _EventEmitter3=_interopRequireDefault(_EventEmitter2);var _appActions=require("../actions/appActions.js");var _appActions2=_interopRequireDefault(_appActions);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var DATA="data";var Store=function(_EventEmitter){_inherits(Store,_EventEmitter);function Store(data){_classCallCheck(this,Store);var _this=_possibleConstructorReturn(this,Object.getPrototypeOf(Store).call(this));_this[DATA]=data||{};_this._cbs={};return _this}_createClass(Store,[{key:"cb",value:function cb(fn){var _this2=this;var id=_lodash2.default.uniqueId();_appActions2.default.emit("system.loading",true);return this._cbs[id]=function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}if(!(id in _this2._cbs))return;fn.apply(_this2,args);delete _this2._cbs[id];if(!Object.keys(_this2._cbs).length){_appActions2.default.emit("system.loading",false)}}}},{key:"clean",v
var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=arr[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var item=_step.value;for(var key in hash){if(!_objectPath2.default.has(item,key)){_objectPath2.default.set(item,key,hash[key])}}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}};switch(sortBy){case"progress":return deIdx(function(_ref4,_ref5){var _ref7=_slicedToArray(_ref4,2);var aM=_ref7[1];var _ref6=_slicedToArray(_ref5,2);var bM=_ref6[1];defaults([aM,bM],{"stats.progress.points":0});return aM.stats.progress.points-bM.stats.progress.points});case"priority":return deIdx(function(_ref8,_ref9){var _ref11=_slicedToArray(_ref8,2);var aM=_ref11[1];var _ref10=_slicedToArray(_ref9,2);var bM=_ref10[1];defaults([aM,bM],{"stats.progress.time":0,"stats.days":1e3});var _$map=_lodash2.default.map([aM,bM],function(_ref12){var stats=_ref12.stats;return(stats.progress.points-stats.progress.time)*stats.days});var _$map2=_slicedToArray(_$map,2);var $a=_$map2[0];var $b=_$map2[1];return $b-$a});case"name":return deIdx(function(_ref13,_ref14){var _ref16=_slicedToArray(_ref13,2);var aP=_ref16[0];var aM=_ref16[1];var _ref15=_slicedToArray(_ref14,2);var bP=_ref15[0];var bM=_ref15[1];var owner=undefined,name=undefined;if(owner=bP.owner.localeCompare(aP.owner)){return owner}if(name=bP.name.localeCompare(aP.name)){return name}if(_semver2.default.valid(bM.title)&&_semver2.default.valid(aM.title)){return _semver2.default.gt(bM.title,aM.title)}else{return bM.title.localeCompare(aM.title)}});default:return function(){return 0}}}},{key:"getProject",value:function getProject(user,p){var _this5=this;_request2.default.allMilestones(user,p,this.cb(function(err,milestones){if(err)return _this5.saveError(p,err);milestones.forEach(function(milestone){if(!_lodash2.default.find(p.milestones,function(_ref17){var number=_ref17.number;return milestone.number===number})){_this5.getIssues(user,p,milestone)}})}))}},{key:"getMilestone",value:function getMilestone(user,p,m,say){var _this6=this;_request2.default.oneMilestone(user,{owner:p.owner,name:p.name,milestone:m},this.cb(function(err,milestone){if(err)return _this6.saveError(p,err,say);_this6.getIssues(user,p,milestone,say)}))}},{key:"getIssues",value:function getIssues(user,p,m,say){var _this7=this;_issues2.default.fetchAll(user,{owner:p.owner,name:p.name,milestone:m.number},this.cb(function(err,obj){if(err)return _this7.saveError(p,err,say);_lodash2.default.extend(m,{issues:obj});_this7.addMilestone(p,m,say)}))}},{key:"notify",value:function notify(milestone){if(milestone.stats.isEmpty){var left=undefined;if(left=milestone.issues.open.size){return _appActions2.default.emit("system.notify",{text:"No progress has been made, "+left+" point"+(left>1?"s":"")+" left",system:true,ttl:null})}else{return _appActions2.default.emit("system.notify",{text:"This milestone has no issues",type:"warn",system:true,ttl:null})}}if(milestone.stats.isDone){_appActions2.default.emit("system.notify",{text:"This milestone is complete",type:"success"})}if(milestone.stats.isOverdue){_appActions2.default.emit("system.notify",{text:"This milestone is overdue",type:"warn"})}}},{key:"addMilestone",value:function addMilestone(project,milestone,say){var i=undefined,j=undefined;_lodash2.default.extend(milestone,{stats:(0,_stats2.default)(milestone)});if(say)this.notify(milestone);if((i=this.findIndex(project))<0){i=this.push("list",project)}var milestones=undefined;if(milestones=this.get("list."+i+".milestones")){j=_lodash2.default.findIndex(milestones,{number:milestone.number});if(j!=-1){return this.set("list."+i+".milestones."+j,milestone)}}j=this.push("list."+i+".milestones",milestone);this.sort([i,j],[project,milestone])}},{key:"findIndex",value:function findIndex(_ref18){var owner=_ref18.owner;var name=_ref18.name;return _lodash2.default.findIndex(this.get("list"),{owner