diff --git a/CHANGELOG.md b/CHANGELOG.md index 53494da..cf3d843 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.4.0 (05/14/2019) + +- Supports postgres instead of mongo + # 1.3.2 (05/14/2019) - fix links to not have $2E but %2E diff --git a/README.md b/README.md index 57739d1..980cdaa 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ It's a lcov server! It stores lcov reports and categorizes them based on their o # Prerequisites -- `mongodb` installed +- `postgres` installed - `nodejs` installed # Install @@ -51,7 +51,7 @@ Commands: Options: - db, -d, --db [db] Set the db connection (default: mongodb://localhost:32768/lcov-server) + db, -d, --db [db] Set the db connection (default: postgres://localhost:5432/lcov-server) parser, -p, --parser Set the parser value [lcov, cobertura, golang, jacoco], defaults to lcov (default: lcov) basePath, -bp, --basePath The path that defines the base directory where the files that were covered will be located ``` @@ -65,5 +65,5 @@ tap test --coverage-report=text-lcov | lcov-server --upload http://... ## Server ``` -lcov-server --serve --db mongodb://localhost:32768/lcov-server +lcov-server --serve --db postgres://localhost:5432/lcov-server ``` diff --git a/bin/lcov-server.js b/bin/lcov-server.js index f0cad23..b9c6b9d 100755 --- a/bin/lcov-server.js +++ b/bin/lcov-server.js @@ -37,7 +37,7 @@ args.forEach((a, i) => { Options: - db, -d, --db [db] Set the db connection (default: mongodb://localhost:32768/lcov-server) + db, -d, --db [db] Set the db connection (default: postgres://localhost:5432/lcov-server) parser, -p, --parser Set the parser value [lcov, cobertura, golang, jacoco], defaults to lcov (default: lcov) basePath, -bp, --basePath The path that defines the base directory where the files that were covered will be located `); @@ -78,7 +78,7 @@ args.forEach((a, i) => { const { parser, upload, serve, db, basePath } = program; if(serve) { - process.env.MONGO_URL = process.env.MONGO_URL || db || 'mongodb://localhost:32768/lcov-server'; + process.env.DB_CONNECTION_STRING = process.env.DB_CONNECTION_STRING || db || 'postgres://localhost:5432/lcov-server'; require('../index'); } else { @@ -98,6 +98,7 @@ if(serve) { console.log('\n coverage sent successfully 💚 \n'); // eslint-disable-line } } catch(ex) { + console.log(ex); console.error(`\n coverage could not be parsed with reason:\n ${ex.toString()}\n`); // eslint-disable-line } })); diff --git a/dist/app.js b/dist/app.js index 744ff9f..c451622 100644 --- a/dist/app.js +++ b/dist/app.js @@ -1 +1 @@ -!function(e){function t(t){for(var r,o,c=t[0],l=t[1],u=t[2],f=0,p=[];f *, .table-fileView td span {\n font-family: monospace;\n}\n",""])},58:function(e){e.exports.parseCoverage=function(e,t){var n=[[],[],[]];return e.forEach(function(e){var r=e.git,o=e.source_files;if(!t||t===(r.branch||r.git_branch)){var a=0,i=0,c=0,l=0;o.forEach(function(e){var t=e.lines,n=void 0===t?{hit:0,found:0}:t,r=e.branches,o=void 0===r?{hit:0,found:0}:r,u=e.functions,s=void 0===u?{hit:0,found:0}:u;n&&o&&s&&(i+=parseInt(100*(n.hit/n.found||1)),c+=parseInt(100*(o.hit/o.found||1)),l+=parseInt(100*(s.hit/s.found||1)),a+=1)}),n[0].push(i/a),n[1].push(c/a),n[2].push(l/a)}}),1==n[0].length&&(n[0].push(n[0][0]),n[1].push(n[1][0]),n[2].push(n[2][0])),n}},59:function(e){e.exports={b:"lcov-server",c:"1.3.2",a:"🎯 A simple lcov server & cli parser"}},600:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n,r=0;ra;a+=2){n=[],0==a?(n.push({x:parseFloat(r[a]),y:parseFloat(r[a+1])}),n.push({x:parseFloat(r[a]),y:parseFloat(r[a+1])}),n.push({x:parseFloat(r[a+2]),y:parseFloat(r[a+3])}),n.push({x:parseFloat(r[a+4]),y:parseFloat(r[a+5])})):i-4==a?(n.push({x:parseFloat(r[a-2]),y:parseFloat(r[a-1])}),n.push({x:parseFloat(r[a]),y:parseFloat(r[a+1])}),n.push({x:parseFloat(r[a+2]),y:parseFloat(r[a+3])}),n.push({x:parseFloat(r[a+2]),y:parseFloat(r[a+3])})):(n.push({x:parseFloat(r[a-2]),y:parseFloat(r[a-1])}),n.push({x:parseFloat(r[a]),y:parseFloat(r[a+1])}),n.push({x:parseFloat(r[a+2]),y:parseFloat(r[a+3])}),n.push({x:parseFloat(r[a+4]),y:parseFloat(r[a+5])}));var c=[];c.push({x:n[1].x,y:n[1].y}),c.push({x:(-n[0].x+6*n[1].x+n[2].x)/6,y:(-n[0].y+6*n[1].y+n[2].y)/6}),c.push({x:(n[1].x+6*n[2].x-n[3].x)/6,y:(n[1].y+6*n[2].y-n[3].y)/6}),c.push({x:n[2].x,y:n[2].y}),o+="C"+(c=c.map(function(e){return e.y>t&&(e.y=t),e}))[1].x+","+c[1].y+" "+c[2].x+","+c[2].y+" "+c[3].x+","+c[3].y+" "}return o}function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n,r=0;ri;i++){var l=a[i],u=l.toLowerCase();if(-1!=l.search(/[A-Za-z]/)){var s="";if("z"!=u&&(s=a[++i].replace(/\s+$/,"")),"r"==u){var f=h(r+","+o+" "+s,t);n.push(f)}else if(n.push(l+s),"h"==u)r=s;else if("v"==u)o=s;else if("z"!=u){var p=s.split(/[,\s]/);o=p.pop(),r=p.pop()}}}return n}(s,r).join(" ")),!0===i&&(f="M"+o+","+r+(f=s.replace("M","L")),f+="L"+(n+o)+","+r),tt.a.createElement("g",{style:p},!0===i?tt.a.createElement("path",{d:f,fill:c,fillOpacity:".05"}):null,tt.a.createElement("path",{d:s,fill:"none",stroke:c,strokeWidth:l}))}}]),t}();lt.propTypes={points:at.a.object,width:at.a.number,height:at.a.number,padding:at.a.number,lines:at.a.array,area:at.a.boolean,color:at.a.string,stroke:at.a.number,updating:at.a.updating};var ut=function(e){function t(){return m(this,t),g(this,v(t).apply(this,arguments))}return w(t,tt.a.Component),d(t,[{key:"render",value:function(){var e=this.props,t=e.padding,n=e.height,r=e.width,o=e.maxValue;return o=~~(o/4),tt.a.createElement("g",null,[1,2,3].map(function(e,a){var i=.5+~~(e*(n/4)+t);return tt.a.createElement("g",{key:a},tt.a.createElement("line",{x1:t,y1:i,x2:r+t,y2:i,stroke:"#eaeaea",strokeWidth:"1px"}),tt.a.createElement("text",{className:"LineChart--axis",x:t-10,y:i+2,textAnchor:"end"},o*(3-a)))}))}}]),t}();ut.propTypes={padding:at.a.number,height:at.a.number,width:at.a.number,maxValue:at.a.number},ut.defaultProps={padding:0,height:0,width:0,maxValue:0};var st=function(e){function t(){return m(this,t),g(this,v(t).apply(this,arguments))}return w(t,tt.a.Component),d(t,[{key:"render",value:function(){var e=this.props,t=e.axis,n=e.padding,r=e.height,o=e.width;return r+=n,tt.a.createElement("g",null,[0,1,2,3,4].map(function(e,a){var i=.5+~~(a*(o/4)+n);return tt.a.createElement("g",{key:a},tt.a.createElement("line",{x1:i,y1:n,x2:i,y2:r,stroke:"#eaeaea",strokeWidth:"1px"}),tt.a.createElement("text",{className:"LineChart--axis",x:i,y:r+15,textAnchor:"middle"},t[a%t.length]))}))}}]),t}();st.propTypes={padding:at.a.number,height:at.a.number,width:at.a.number,axis:at.a.array},st.defaultProps={padding:0,height:0,width:0,axis:[]};var ft=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_(this,S(t).call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j(e,t)}(t,tt.a.Component),function(e,t,n){t&&O(e.prototype,t),n&&O(e,n)}(t,[{key:"mouseEnter",value:function(){var e=this.props,t=e.radius,n=e.point,r=e.dataSetIndex,o=e.index;this.props.showTooltip([n[0]+3*t,n[1]+3*t],r,o)}},{key:"mouseLeave",value:function(){this.props.hideTooltip()}},{key:"render",value:function(){var e=this.props,t=e.point,n=e.stroke,r=e.radius,o=t[0],a=t[1],i=t[3];return tt.a.createElement("circle",{cx:o,cy:a,r:r,fill:i,strokeWidth:n,stroke:"#ffffff",onMouseEnter:this.mouseEnter.bind(this),onMouseLeave:this.mouseLeave.bind(this)})}}]),t}();ft.propTypes={point:at.a.array,stroke:at.a.string,radius:at.a.number,index:at.a.number,dataSetIndex:at.a.number,showTooltip:at.a.func,hideTooltip:at.a.func},ft.defaultProps={point:[],stroke:"#fff",radius:0,index:0,dataSetIndex:0,showTooltip:function(){},hideTooltip:function(){}};var pt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),C(this,T(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&N(e,t)}(t,tt.a.Component),function(e,t,n){t&&P(e.prototype,t),n&&P(e,n)}(t,[{key:"render",value:function(){var e=this.props,t=e.points,n=e.dataSetIndex,r=e.showTooltip,o=e.hideTooltip,a=e.radius,i=e.stroke,c=e.label,l=e.dots,u=e.hideLabels,s=t[t.length-1],f=s[3],p=s[0],h=s[1];return tt.a.createElement("g",null,!0===l?t.map(function(e,t){return tt.a.createElement(ft,{point:e,dataSetIndex:n,showTooltip:r,hideTooltip:o,stroke:i,radius:a,index:t,key:t})}):null,!0===u?null:tt.a.createElement("text",{className:"LineChart--label",x:p+5,y:h+2,fill:f},c))}}]),t}();pt.propTypes={points:at.a.object,dataSetIndex:at.a.number,showTooltip:at.a.func,hideTooltip:at.a.func,radius:at.a.number,stroke:at.a.string,label:at.a.string,dots:at.a.boolean,hideLabels:at.a.boolean},pt.defaultProps={points:{},dataSetIndex:0,showTooltip:function(){},hideTooltip:function(){},radius:0,stroke:"#fff",label:"",dots:!0,hideLabels:!1};var ht=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),F(this,I(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(t,tt.a.Component),function(e,t,n){t&&L(e.prototype,t),n&&L(e,n)}(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.label,r=e.x,o=e.y,a=e.color;return tt.a.createElement("span",{className:"LineChart--tooltip",style:{left:~~r,top:~~o}},tt.a.createElement("b",{style:{color:a}},n),tt.a.createElement("i",null,t))}}]),t}();ht.propTypes={value:at.a.number,label:at.a.string,x:at.a.number,y:at.a.number,color:at.a.string},ht.defaultProps={value:0,label:"",x:0,y:0,color:""};n(383);var yt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=V(this,W(t).call(this,e))).state={tooltip:!1,value:"",dataSet:0,index:0,x:0,y:0,color:"",updating:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&z(e,t)}(t,tt.a.Component),function(e,t,n){t&&A(e.prototype,t),n&&A(e,n)}(t,[{key:"componentWillReceiveProps",value:function(){this.setState({updating:!0},this.endUpdate)}},{key:"endUpdate",value:function(){var e=this;setTimeout(function(){e.setState({updating:!1})},300)}},{key:"showTooltip",value:function(e,t,n){var r=this.props.data;this.setState({updating:!1,tooltip:!0,value:r[t][n],dataSet:t,index:n,x:e[0],y:e[1],color:e[3]})}},{key:"hideTooltip",value:function(){this.setState({tooltip:!1,value:"",dataSet:0,index:0,x:0,y:0,color:"",updating:!1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.updating,r=t.tooltip,o=t.value,a=t.x,i=t.y,c=t.color,l=this.props,u=l.data,s=l.lines,f=l.area,p=l.dots,h=l.stroke,y=l.radius,m=l.grid,b=l.axis,d=l.width,g=l.height,v=l.colors,w=l.labels,E=l.hideLabels,x=l.maxValue,O=l.heightRatio,_=l.padding,S=[],j=u[0].length-1;g=g||d*(9/16),S=u.forEach(function(e){var t=Math.max.apply(null,e);x=t>x?t:x}),O=0===x?1:g/x,S=u.map(function(e,t){return e.map(function(e,n){return[.5+~~(d/j*n+_),.5+~~(O*(x-e)+_),e,v[t%v.length]]})});var k={xmlns:"http://www.w3.org/2000/svg",width:d+2*_+"px",height:g+2*_+"px",viewBox:"0 0 "+(d+2*_)+" "+(g+2*_)};return tt.a.createElement("span",{className:"LineChart",style:{width:d+2*_}},tt.a.createElement("svg",k,m?tt.a.createElement("g",null,tt.a.createElement(ut,{maxValue:x,padding:_,width:d,height:g}),tt.a.createElement(st,{axis:b,padding:_,width:d,height:g})):null,S.map(function(t,r){return tt.a.createElement("g",{key:r},tt.a.createElement(lt,{points:t,lines:s,area:f,width:d,height:g,padding:_,color:v[r%v.length],updating:n,stroke:h}),tt.a.createElement(pt,{hideLabels:E,dots:p,label:w[r],points:t,dataSetIndex:r,showTooltip:e.showTooltip.bind(e),hideTooltip:e.hideTooltip.bind(e),stroke:h,radius:y}))})),r?tt.a.createElement(ht,{value:o,label:w[this.state.dataSet],x:a-8,y:i-15,color:c}):null)}}]),t}();yt.propTypes={data:at.a.array,axis:at.a.array,colors:at.a.array,labels:at.a.array,lines:at.a.booean,area:at.a.boolean,dots:at.a.boolean,stroke:at.a.number,radius:at.a.number,height:at.a.number,width:at.a.number,grid:at.a.boolean,padding:at.a.number,heightRatio:at.a.number,maxValue:at.a.number,hideLabels:at.a.boolean},yt.defaultProps={data:[],colors:["#aaa","#888"],labels:[],lines:!0,area:!0,dots:!0,stroke:1,radius:3,grid:!0,padding:50,heightRatio:1,maxValue:0,hideLabels:!1,height:0,width:400};var mt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Y(this,H(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&J(e,t)}(t,tt.a.Component),function(e,t,n){t&&U(e.prototype,t),n&&U(e,n)}(t,[{key:"render",value:function(){var e=this.props,t=e.data,n=e.height,r=e.width;return tt.a.createElement(yt,{data:t,colors:["#9a8585","#a7daff","#f7ca97"],labels:["Lines","Branches","Functions"],width:r,height:n,lines:!0,area:!0,dots:!0,hideLabels:!1,grid:!1})}}]),t}();mt.propTypes={data:at.a.array,height:at.a.number,width:at.a.number};var bt=mt,dt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),G(this,$(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&K(e,t)}(t,tt.a.Component),function(e,t,n){t&&q(e.prototype,t),n&&q(e,n)}(t,[{key:"render",value:function(){var e=Math.floor,t=window.location.origin,n=[Array.from({length:6},function(){return e(100*Math.random())+1}),Array.from({length:6},function(){return e(100*Math.random())+1}),Array.from({length:6},function(){return e(100*Math.random())+1})];return tt.a.createElement("div",{className:"text-center",style:{width:"100%",position:"absolute",top:"50%",transform:"translateY(-50%)"}},tt.a.createElement("h3",{className:"text-black"},it.b),tt.a.createElement("p",{className:"text-black"},it.a),tt.a.createElement("small",{className:"text-black"},tt.a.createElement("pre",{style:{display:"inline-block"}},"npm install -g lcov-server"),tt.a.createElement("br",null),tt.a.createElement("pre",{style:{display:"inline-block"}},"tap test/**/*.js --coverage-report=text-lcov | lcov-server --upload ",t)),tt.a.createElement("div",{style:{display:"block",margin:"0 auto"}},tt.a.createElement(bt,{height:50,width:window.innerWidth/1.5,data:n})))}}]),t}(),gt=n(34),vt=n.n(gt),wt=n(69),Et=n.n(wt),xt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ee(this,te(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ne(e,t)}(t,tt.a.Component),function(e,t,n){t&&X(e.prototype,t),n&&X(e,n)}(t,[{key:"render",value:function(){return tt.a.createElement("div",{className:"coverage text-center",style:{border:"1px solid #dedede",position:"relative",height:"300px"}},tt.a.createElement("div",{style:{width:"100%",position:"absolute",top:"50%",transform:"translateY(-50%)"}},tt.a.createElement("div",{className:"spinner spinner-black"})))}}]),t}(),Ot=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ae(this,ie(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ce(e,t)}(t,tt.a.Component),function(e,t,n){t&&oe(e.prototype,t),n&&oe(e,n)}(t,[{key:"render",value:function(){var e=this.props.error;return tt.a.createElement("div",{className:"text-center",style:{width:"100%",position:"absolute",top:"50%",transform:"translateY(-50%)"}},"Oh no 🙈 something happened...",tt.a.createElement("br",null),tt.a.createElement("br",null),tt.a.createElement("pre",{style:{width:"50%",margin:"0 auto"}},e||"Page not found"),tt.a.createElement("br",null),tt.a.createElement("a",{href:"/"}," Go Somewhere Safe 🏝 "))}}]),t}();Ot.propTypes={error:at.a.string};var _t=Ot,St=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),se(this,fe(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pe(e,t)}(t,tt.a.Component),function(e,t,n){t&&ue(e.prototype,t),n&&ue(e,n)}(t,[{key:"render",value:function(){return tt.a.createElement("div",{className:"coverage text-center",style:{border:"1px solid #dedede",position:"relative",height:"300px"}},tt.a.createElement("div",{style:{width:"100%",position:"absolute",top:"50%",transform:"translateY(-50%)"}},"No Coverage 🌧"))}}]),t}(),jt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=be(this,de(t).call(this,e))).state={feed:[],loading:!0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ge(e,t)}(t,tt.a.Component),function(e,t,n){t&&me(e.prototype,t),n&&me(e,n)}(t,[{key:"componentDidMount",value:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){function a(e){ye(c,r,o,a,i,"next",e)}function i(e){ye(c,r,o,a,i,"throw",e)}var c=e.apply(t,n);a(void 0)})}}(regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return"/api/feed",e.prev=1,e.next=4,fetch("/api/feed");case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,this.setState({feed:n,loading:!1}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),this.setState({error:e.t0.toString(),loading:!1});case 14:case"end":return e.stop()}},e,this,[[1,11]])}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.state,t=e.feed,n=e.loading,r=e.error;return r?tt.a.createElement(_t,{error:r}):n?tt.a.createElement(xt,null):0=m&&70<=m?"#caa300":"#cc5338";return tt.a.createElement("div",{key:"".concat(p,"/").concat(t),className:"list-item"},tt.a.createElement("div",{style:{position:"relative",height:"50px"}},tt.a.createElement("div",{style:{float:"left"}},tt.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:y},vt()(e.run_at).fromNow()," on ",c||i||"unknown")),tt.a.createElement("div",{style:{float:"right"}},tt.a.createElement("div",{className:"badge",style:{opacity:.6,backgroundColor:b,color:"white"}}," ",parseInt(m),"%"))),tt.a.createElement("h3",{className:"text-center"},tt.a.createElement("a",{href:"/coverage/".concat(s.replace(/\./g,"%2E").replace(".".concat(h),""),"/").concat(f,"/").concat(p)},"  ",f,"/",p," "),tt.a.createElement("br",null),tt.a.createElement("small",{style:{fontWeight:"100",color:"#969696"}}," ",o," ")))}))):tt.a.createElement(St,null)}}]),t}(),kt=n(68),Pt=n(58),Ct=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=xe(this,Oe(t).call(this,e))).state={coverage:{},error:"",loading:!0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_e(e,t)}(t,tt.a.Component),function(e,t,n){t&&Ee(e.prototype,t),n&&Ee(e,n)}(t,[{key:"componentDidMount",value:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){function a(e){we(c,r,o,a,i,"next",e)}function i(e){we(c,r,o,a,i,"throw",e)}var c=e.apply(t,n);a(void 0)})}}(regeneratorRuntime.mark(function e(){var t,n,r,o,a,i,c,l,u;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.repo,n=Et()(t),r=n.resource,o=n.owner,a=n.name,i=r.substring(r.lastIndexOf(".")+1,r.length),c="/api/coverage/".concat(r.replace(/\./g,"%2E").replace(".".concat(i),""),"/").concat(o,"/").concat(a,"?limit=5"),e.prev=4,e.next=7,fetch(c);case 7:return l=e.sent,e.next=10,l.json();case 10:u=e.sent,this.setState({coverage:u[0],loading:!1}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),this.setState({error:e.t0.toString(),loading:!1});case 17:case"end":return e.stop()}},e,this,[[4,14]])}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.state,t=e.coverage,n=e.loading,r=e.error;if(n)return tt.a.createElement(xt,null);if(r)return tt.a.createElement(_t,{error:r});if(0e.repos.length?1:t+1;this.setState({page:n}),history.pushState({},null,"/coverage/".concat(n))}},{key:"previousPage",value:function(){var e=this.state.page,t=1>e-1?1:e-1;this.setState({page:t}),history.pushState({},null,"/coverage/".concat(t))}},{key:"onSelect",value:function(e){var t=this.state,n=t.raw,r=t.chunk;e?this.setState({repos:[[e.value]],selected:e.value,page:1}):this.setState({repos:n.slice(0,0|(n.length+r-1)/r).map(function(e,t){return n.slice(r*t,r*t+r)}),selected:"",page:1})}},{key:"render",value:function(){var e=this.state,t=e.raw,n=e.repos,r=e.page,o=e.selected,a=e.title,i=e.loading,c=e.error;if(c)return tt.a.createElement(_t,{error:c});if(i)return tt.a.createElement(xt,null);if(0n.length?1:t+1})}},{key:"previousPage",value:function(){var e=this.state.page;this.setState({page:1>e-1?1:e-1})}},{key:"render",value:function(){var e=this.state,t=e.data,n=e.page;return tt.a.createElement("div",null,tt.a.createElement("table",{className:"table responsive"},tt.a.createElement("thead",null,tt.a.createElement("tr",null,Object.keys(t[n-1][0]).map(function(e){return tt.a.createElement("th",{key:e},e)}))),tt.a.createElement("tbody",null,t[n-1].map(function(e,t){return tt.a.createElement("tr",{key:"".concat(n,"/").concat(t)},Object.keys(e).map(function(n){return tt.a.createElement("td",{key:"".concat(n,"/").concat(t)}," ",tt.a.createElement("div",{className:"Commit"===n?"coverage-commit-message":""},e[n])," ")}))},[]))),1=v&&80<=v?"#cfaf2a":"#c75151",_=f.git,S=_.message,j=_.commit,k=_.branch,P=_.author_name,C=_.author_date,T="".concat(s.replace(".git",""),"/commit/").concat(j);return tt.a.createElement("div",{className:"coverage"},tt.a.createElement("div",{className:"coverage-header"},tt.a.createElement("div",{style:{display:"inline-block",width:"100%"}},tt.a.createElement("div",{style:{float:"left",textAlign:"left"}},tt.a.createElement("h3",null," ",tt.a.createElement("a",{href:"/coverage/".concat(a.replace(/\./g,"%2E"),"/").concat(i,"/")},i)," / ",tt.a.createElement("a",{href:"/coverage/".concat(a.replace(/\./g,"%2E"),"/").concat(i,"/").concat(c)},c)," / ",tt.a.createElement("a",{href:"/coverage/".concat(a.replace(/\./g,"%2E"),"/").concat(i,"/").concat(c,"/").concat(encodeURIComponent(u).replace(/\./g,"%2E"))},u)," "),tt.a.createElement("p",null,tt.a.createElement("a",{className:"coverage-commit-message",href:T,target:"_blank",rel:"noopener noreferrer"}," ",S," "),"on branch",tt.a.createElement("b",null," ",k," "),vt()(1e3*C).fromNow()," by",tt.a.createElement("b",null," ",P," "))),tt.a.createElement("h3",{style:{float:"right",color:O}},x,"%")),tt.a.createElement(bt,{width:window.innerWidth-200,data:Object(Pt.parseCoverage)(t.history),height:100})),tt.a.createElement("br",null),tt.a.createElement(Bt,{source:p.source,lineMap:l,extension:u.substr(u.lastIndexOf(".")+1,u.length)}))}return tt.a.createElement(St,null)}}]),t}();At.propTypes={match:at.a.object};var Vt=tt.a.createElement(nt.BrowserRouter,null,tt.a.createElement(ct,null,tt.a.createElement(rt.g,null,tt.a.createElement(rt.d,{path:"/coverage/:source/:owner/:name/:file",component:At}),tt.a.createElement(rt.d,{path:"/coverage/:source/:owner/:name",component:Ft}),tt.a.createElement(rt.d,{path:"/coverage/:source/:owner/:page?",component:Nt}),tt.a.createElement(rt.d,{path:"/coverage/:page?",component:Nt}),tt.a.createElement(rt.d,{exact:!0,path:"/feed",component:jt}),tt.a.createElement(rt.d,{exact:!0,path:"/",component:dt}),tt.a.createElement(rt.d,{path:"*",component:_t}))));Object(Xe.render)(Vt,document.querySelector("#root"))}}); \ No newline at end of file +!function(e){function t(t){for(var r,o,i=t[0],u=t[1],l=t[2],s=0,p=[];s *, .table-fileView td span {\n font-family: monospace;\n}\n",""])},589:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n,r=0;ra;a+=2){n=[],0==a?(n.push({x:parseFloat(r[a]),y:parseFloat(r[a+1])}),n.push({x:parseFloat(r[a]),y:parseFloat(r[a+1])}),n.push({x:parseFloat(r[a+2]),y:parseFloat(r[a+3])}),n.push({x:parseFloat(r[a+4]),y:parseFloat(r[a+5])})):c-4==a?(n.push({x:parseFloat(r[a-2]),y:parseFloat(r[a-1])}),n.push({x:parseFloat(r[a]),y:parseFloat(r[a+1])}),n.push({x:parseFloat(r[a+2]),y:parseFloat(r[a+3])}),n.push({x:parseFloat(r[a+2]),y:parseFloat(r[a+3])})):(n.push({x:parseFloat(r[a-2]),y:parseFloat(r[a-1])}),n.push({x:parseFloat(r[a]),y:parseFloat(r[a+1])}),n.push({x:parseFloat(r[a+2]),y:parseFloat(r[a+3])}),n.push({x:parseFloat(r[a+4]),y:parseFloat(r[a+5])}));var i=[];i.push({x:n[1].x,y:n[1].y}),i.push({x:(-n[0].x+6*n[1].x+n[2].x)/6,y:(-n[0].y+6*n[1].y+n[2].y)/6}),i.push({x:(n[1].x+6*n[2].x-n[3].x)/6,y:(n[1].y+6*n[2].y-n[3].y)/6}),i.push({x:n[2].x,y:n[2].y}),o+="C"+(i=i.map((function(e){return e.y>t&&(e.y=t),e})))[1].x+","+i[1].y+" "+i[2].x+","+i[2].y+" "+i[3].x+","+i[3].y+" "}return o}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n,r=0;rc;c++){var u=a[c],l=u.toLowerCase();if(-1!=u.search(/[A-Za-z]/)){var f="";if("z"!=l&&(f=a[++c].replace(/\s+$/,"")),"r"==l){var s=d(r+","+o+" "+f,t);n.push(s)}else if(n.push(u+f),"h"==l)r=f;else if("v"==l)o=f;else if("z"!=l){var p=f.split(/[,\s]/);o=p.pop(),r=p.pop()}}}return n}(f,r).join(" ")),!0===c&&(s="M"+o+","+r+(s=f.replace("M","L")),s+="L"+(n+o)+","+r),Ct.a.createElement("g",{style:p},!0===c?Ct.a.createElement("path",{d:s,fill:i,fillOpacity:".05"}):null,Ct.a.createElement("path",{d:f,fill:"none",stroke:i,strokeWidth:u}))}}]),t}(Ct.a.Component);Mt.propTypes={points:Lt.a.object,width:Lt.a.number,height:Lt.a.number,padding:Lt.a.number,lines:Lt.a.array,area:Lt.a.boolean,color:Lt.a.string,stroke:Lt.a.number,updating:Lt.a.updating};var At=function(e){function t(){return g(this,t),n.apply(this,arguments)}x(t,e);var n=_(t);return E(t,[{key:"render",value:function(){var e=this.props,t=e.padding,n=e.height,r=e.width,o=e.maxValue;return o=~~(o/4),Ct.a.createElement("g",null,[1,2,3].map((function(e,a){var c=.5+~~(e*(n/4)+t);return Ct.a.createElement("g",{key:a},Ct.a.createElement("line",{x1:t,y1:c,x2:r+t,y2:c,stroke:"#eaeaea",strokeWidth:"1px"}),Ct.a.createElement("text",{className:"LineChart--axis",x:t-10,y:c+2,textAnchor:"end"},o*(3-a)))})))}}]),t}(Ct.a.Component);At.propTypes={padding:Lt.a.number,height:Lt.a.number,width:Lt.a.number,maxValue:Lt.a.number},At.defaultProps={padding:0,height:0,width:0,maxValue:0};var Vt=function(e){function t(){return g(this,t),n.apply(this,arguments)}x(t,e);var n=_(t);return E(t,[{key:"render",value:function(){var e=this.props,t=e.axis,n=e.padding,r=e.height,o=e.width;return r+=n,Ct.a.createElement("g",null,[0,1,2,3,4].map((function(e,a){var c=.5+~~(a*(o/4)+n);return Ct.a.createElement("g",{key:a},Ct.a.createElement("line",{x1:c,y1:n,x2:c,y2:r,stroke:"#eaeaea",strokeWidth:"1px"}),Ct.a.createElement("text",{className:"LineChart--axis",x:c,y:r+15,textAnchor:"middle"},t[a%t.length]))})))}}]),t}(Ct.a.Component);Vt.propTypes={padding:Lt.a.number,height:Lt.a.number,width:Lt.a.number,axis:Lt.a.array},Vt.defaultProps={padding:0,height:0,width:0,axis:[]};var Wt=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.call(this,e)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}(t,e);var n=C(t);return function(e,t,n){t&&P(e.prototype,t),n&&P(e,n)}(t,[{key:"mouseEnter",value:function(){var e=this.props,t=e.radius,n=e.point,r=e.dataSetIndex,o=e.index;this.props.showTooltip([n[0]+3*t,n[1]+3*t],r,o)}},{key:"mouseLeave",value:function(){this.props.hideTooltip()}},{key:"render",value:function(){var e=this.props,t=e.point,n=e.stroke,r=e.radius,o=t[0],a=t[1],c=t[3];return Ct.a.createElement("circle",{cx:o,cy:a,r:r,fill:c,strokeWidth:n,stroke:"#ffffff",onMouseEnter:this.mouseEnter.bind(this),onMouseLeave:this.mouseLeave.bind(this)})}}]),t}(Ct.a.Component);Wt.propTypes={point:Lt.a.array,stroke:Lt.a.string,radius:Lt.a.number,index:Lt.a.number,dataSetIndex:Lt.a.number,showTooltip:Lt.a.func,hideTooltip:Lt.a.func},Wt.defaultProps={point:[],stroke:"#fff",radius:0,index:0,dataSetIndex:0,showTooltip:function(){},hideTooltip:function(){}};var zt=function(e){function t(){return L(this,t),n.apply(this,arguments)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(t,e);var n=M(t);return function(e,t,n){t&&F(e.prototype,t),n&&F(e,n)}(t,[{key:"render",value:function(){var e=this.props,t=e.points,n=e.dataSetIndex,r=e.showTooltip,o=e.hideTooltip,a=e.radius,c=e.stroke,i=e.label,u=e.dots,l=e.hideLabels,f=t[t.length-1],s=f[3],p=f[0],y=f[1];return Ct.a.createElement("g",null,!0===u?t.map((function(e,t){return Ct.a.createElement(Wt,{point:e,dataSetIndex:n,showTooltip:r,hideTooltip:o,stroke:c,radius:a,index:t,key:t})})):null,!0===l?null:Ct.a.createElement("text",{className:"LineChart--label",x:p+5,y:y+2,fill:s},i))}}]),t}(Ct.a.Component);zt.propTypes={points:Lt.a.object,dataSetIndex:Lt.a.number,showTooltip:Lt.a.func,hideTooltip:Lt.a.func,radius:Lt.a.number,stroke:Lt.a.string,label:Lt.a.string,dots:Lt.a.boolean,hideLabels:Lt.a.boolean},zt.defaultProps={points:{},dataSetIndex:0,showTooltip:function(){},hideTooltip:function(){},radius:0,stroke:"#fff",label:"",dots:!0,hideLabels:!1};var Dt=function(e){function t(){return z(this,t),n.apply(this,arguments)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&U(e,t)}(t,e);var n=Y(t);return function(e,t,n){t&&D(e.prototype,t),n&&D(e,n)}(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.label,r=e.x,o=e.y,a=e.color;return Ct.a.createElement("span",{className:"LineChart--tooltip",style:{left:~~r,top:~~o}},Ct.a.createElement("b",{style:{color:a}},n),Ct.a.createElement("i",null,t))}}]),t}(Ct.a.Component);Dt.propTypes={value:Lt.a.number,label:Lt.a.string,x:Lt.a.number,y:Lt.a.number,color:Lt.a.string},Dt.defaultProps={value:0,label:"",x:0,y:0,color:""};n(378);var Ut=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=n.call(this,e)).state={tooltip:!1,value:"",dataSet:0,index:0,x:0,y:0,color:"",updating:!1},r}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(t,e);var n=$(t);return function(e,t,n){t&&q(e.prototype,t),n&&q(e,n)}(t,[{key:"componentWillReceiveProps",value:function(){this.setState({updating:!0},this.endUpdate)}},{key:"endUpdate",value:function(){var e=this;setTimeout((function(){e.setState({updating:!1})}),300)}},{key:"showTooltip",value:function(e,t,n){var r=this.props.data;this.setState({updating:!1,tooltip:!0,value:r[t][n],dataSet:t,index:n,x:e[0],y:e[1],color:e[3]})}},{key:"hideTooltip",value:function(){this.setState({tooltip:!1,value:"",dataSet:0,index:0,x:0,y:0,color:"",updating:!1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.updating,r=t.tooltip,o=t.value,a=t.x,c=t.y,i=t.color,u=this.props,l=u.data,f=u.lines,s=u.area,p=u.dots,y=u.stroke,h=u.radius,m=u.grid,b=u.axis,d=u.width,v=u.height,g=u.colors,w=u.labels,E=u.hideLabels,x=u.maxValue,O=u.heightRatio,_=u.padding,S=[],j=l[0].length-1;v=v||d*(9/16),S=l.forEach((function(e){var t=Math.max.apply(null,e);x=t>x?t:x})),O=0===x?1:v/x,S=l.map((function(e,t){return e.map((function(e,n){return[.5+~~(d/j*n+_),.5+~~(O*(x-e)+_),e,g[t%g.length]]}))}));var k={xmlns:"http://www.w3.org/2000/svg",width:d+2*_+"px",height:v+2*_+"px",viewBox:"0 0 "+(d+2*_)+" "+(v+2*_)};return Ct.a.createElement("span",{className:"LineChart",style:{width:d+2*_}},Ct.a.createElement("svg",k,m?Ct.a.createElement("g",null,Ct.a.createElement(At,{maxValue:x,padding:_,width:d,height:v}),Ct.a.createElement(Vt,{axis:b,padding:_,width:d,height:v})):null,S.map((function(t,r){return Ct.a.createElement("g",{key:r},Ct.a.createElement(Mt,{points:t,lines:f,area:s,width:d,height:v,padding:_,color:g[r%g.length],updating:n,stroke:y}),Ct.a.createElement(zt,{hideLabels:E,dots:p,label:w[r],points:t,dataSetIndex:r,showTooltip:e.showTooltip.bind(e),hideTooltip:e.hideTooltip.bind(e),stroke:y,radius:h}))}))),r?Ct.a.createElement(Dt,{value:o,label:w[this.state.dataSet],x:a-8,y:c-15,color:i}):null)}}]),t}(Ct.a.Component);Ut.propTypes={data:Lt.a.array,axis:Lt.a.array,colors:Lt.a.array,labels:Lt.a.array,lines:Lt.a.booean,area:Lt.a.boolean,dots:Lt.a.boolean,stroke:Lt.a.number,radius:Lt.a.number,height:Lt.a.number,width:Lt.a.number,grid:Lt.a.boolean,padding:Lt.a.number,heightRatio:Lt.a.number,maxValue:Lt.a.number,hideLabels:Lt.a.boolean},Ut.defaultProps={data:[],colors:["#aaa","#888"],labels:[],lines:!0,area:!0,dots:!0,stroke:1,radius:3,grid:!0,padding:50,heightRatio:1,maxValue:0,hideLabels:!1,height:0,width:400};var Yt=function(e){function t(){return ee(this,t),n.apply(this,arguments)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ne(e,t)}(t,e);var n=re(t);return function(e,t,n){t&&te(e.prototype,t),n&&te(e,n)}(t,[{key:"render",value:function(){var e=this.props,t=e.data,n=e.height,r=e.width;return Ct.a.createElement(Ut,{data:t,colors:["#9a8585","#a7daff","#f7ca97"],labels:["Lines","Branches","Functions"],width:r,height:n,lines:!0,area:!0,dots:!0,hideLabels:!1,grid:!1})}}]),t}(Ct.a.Component);Yt.propTypes={data:Lt.a.array,height:Lt.a.number,width:Lt.a.number};var Ht=Yt,Jt=function(e){function t(){return ie(this,t),n.apply(this,arguments)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&le(e,t)}(t,e);var n=fe(t);return function(e,t,n){t&&ue(e.prototype,t),n&&ue(e,n)}(t,[{key:"render",value:function(){var e=Math.floor,t=window.location.origin,n=[Array.from({length:6},(function(){return e(100*Math.random())+1})),Array.from({length:6},(function(){return e(100*Math.random())+1})),Array.from({length:6},(function(){return e(100*Math.random())+1}))];return Ct.a.createElement("div",{className:"text-center",style:{width:"100%",position:"absolute",top:"50%",transform:"translateY(-50%)"}},Ct.a.createElement("h3",{className:"text-black"},Ft.b),Ct.a.createElement("p",{className:"text-black"},Ft.a),Ct.a.createElement("small",{className:"text-black"},Ct.a.createElement("pre",{style:{display:"inline-block"}},"npm install -g lcov-server"),Ct.a.createElement("br",null),Ct.a.createElement("pre",{style:{display:"inline-block"}},"tap test/**/*.js --coverage-report=text-lcov | lcov-server --upload ",t)),Ct.a.createElement("div",{style:{display:"block",margin:"0 auto"}},Ct.a.createElement(Ht,{height:50,width:window.innerWidth/1.5,data:n})))}}]),t}(Ct.a.Component),Zt=n(37),qt=n.n(Zt),Gt=n(69),$t=n.n(Gt),Kt=function(e){function t(){return he(this,t),n.apply(this,arguments)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&be(e,t)}(t,e);var n=de(t);return function(e,t,n){t&&me(e.prototype,t),n&&me(e,n)}(t,[{key:"render",value:function(){return Ct.a.createElement("div",{className:"coverage text-center",style:{border:"1px solid #dedede",position:"relative",height:"300px"}},Ct.a.createElement("div",{style:{width:"100%",position:"absolute",top:"50%",transform:"translateY(-50%)"}},Ct.a.createElement("div",{className:"spinner spinner-black"})))}}]),t}(Ct.a.Component),Qt=function(e){function t(){return Ee(this,t),n.apply(this,arguments)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oe(e,t)}(t,e);var n=_e(t);return function(e,t,n){t&&xe(e.prototype,t),n&&xe(e,n)}(t,[{key:"render",value:function(){var e=this.props.error;return Ct.a.createElement("div",{className:"text-center",style:{width:"100%",position:"absolute",top:"50%",transform:"translateY(-50%)"}},"Oh no 🙈 something happened...",Ct.a.createElement("br",null),Ct.a.createElement("br",null),Ct.a.createElement("pre",{style:{width:"50%",margin:"0 auto"}},e||"Page not found"),Ct.a.createElement("br",null),Ct.a.createElement("a",{href:"/"}," Go Somewhere Safe 🏝 "))}}]),t}(Ct.a.Component);Qt.propTypes={error:Lt.a.string};var Xt=Qt,en=function(e){function t(){return Pe(this,t),n.apply(this,arguments)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ce(e,t)}(t,e);var n=Te(t);return function(e,t,n){t&&Re(e.prototype,t),n&&Re(e,n)}(t,[{key:"render",value:function(){return Ct.a.createElement("div",{className:"coverage text-center",style:{border:"1px solid #dedede",position:"relative",height:"300px"}},Ct.a.createElement("div",{style:{width:"100%",position:"absolute",top:"50%",transform:"translateY(-50%)"}},"No Coverage 🌧"))}}]),t}(Ct.a.Component),tn=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=n.call(this,e)).state={feed:[],loading:!0},r}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Me(e,t)}(t,e);var n=Ae(t);return function(e,t,n){t&&Ie(e.prototype,t),n&&Ie(e,n)}(t,[{key:"componentDidMount",value:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function a(e){Fe(i,r,o,a,c,"next",e)}function c(e){Fe(i,r,o,a,c,"throw",e)}var i=e.apply(t,n);a(void 0)}))}}(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/api/feed",e.prev=1,e.next=4,fetch("/api/feed");case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,this.setState({feed:n,loading:!1}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),this.setState({error:e.t0.toString(),loading:!1});case 14:case"end":return e.stop()}}),e,this,[[1,11]])})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.state,t=e.feed,n=e.loading,r=e.error;return r?Ct.a.createElement(Xt,{error:r}):n?Ct.a.createElement(Kt,null):0=m&&70<=m?"#caa300":"#cc5338";return Ct.a.createElement("div",{key:"".concat(p,"/").concat(t),className:"list-item"},Ct.a.createElement("div",{style:{position:"relative",height:"50px"}},Ct.a.createElement("div",{style:{float:"left"}},Ct.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:h},qt()(e.run_at).fromNow()," on ",i||c||"unknown")),Ct.a.createElement("div",{style:{float:"right"}},Ct.a.createElement("div",{className:"badge",style:{opacity:.6,backgroundColor:b,color:"white"}}," ",parseInt(m),"%"))),Ct.a.createElement("h3",{className:"text-center"},Ct.a.createElement("a",{href:"/coverage/".concat(f.replace(/\./g,"%2E").replace(".".concat(y),""),"/").concat(s,"/").concat(p)},"  ",s,"/",p," "),Ct.a.createElement("br",null),Ct.a.createElement("small",{style:{fontWeight:"100",color:"#969696"}}," ",o," ")))})))):Ct.a.createElement(en,null)}}]),t}(Ct.a.Component),nn=n(68),rn=n(59),on=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=n.call(this,e)).state={coverage:{},error:"",loading:!0},r}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ye(e,t)}(t,e);var n=He(t);return function(e,t,n){t&&Ue(e.prototype,t),n&&Ue(e,n)}(t,[{key:"componentDidMount",value:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function a(e){De(i,r,o,a,c,"next",e)}function c(e){De(i,r,o,a,c,"throw",e)}var i=e.apply(t,n);a(void 0)}))}}(regeneratorRuntime.mark((function e(){var t,n,r,o,a,c,i,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.repo,n=$t()(t),r=n.resource,o=n.owner,a=n.name,c=r.substring(r.lastIndexOf(".")+1,r.length),i="/api/coverage/".concat(r.replace(/\./g,"%2E").replace(".".concat(c),""),"/").concat(o,"/").concat(a,"?limit=5"),e.prev=4,e.next=7,fetch(i);case 7:return u=e.sent,e.next=10,u.json();case 10:l=e.sent,this.setState({coverage:l,loading:!1}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),this.setState({error:e.t0.toString(),loading:!1});case 17:case"end":return e.stop()}}),e,this,[[4,14]])})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.state,t=e.coverage,n=e.loading,r=e.error;if(n)return Ct.a.createElement(Kt,null);if(r)return Ct.a.createElement(Xt,{error:r});if(console.log(t),0e.repos.length?1:t+1;this.setState({page:n}),history.pushState({},null,"/coverage/".concat(n))}},{key:"previousPage",value:function(){var e=this.state.page,t=1>e-1?1:e-1;this.setState({page:t}),history.pushState({},null,"/coverage/".concat(t))}},{key:"onSelect",value:function(e){var t=this.state,n=t.raw,r=t.chunk;e?this.setState({repos:[[e.value]],selected:e.value,page:1}):this.setState({repos:n.slice(0,0|(n.length+r-1)/r).map((function(e,t){return n.slice(r*t,r*t+r)})),selected:"",page:1})}},{key:"render",value:function(){var e=this.state,t=e.raw,n=e.repos,r=e.page,o=e.selected,a=e.title,c=e.loading,i=e.error;if(i)return Ct.a.createElement(Xt,{error:i});if(c)return Ct.a.createElement(Kt,null);if(0n.length?1:t+1})}},{key:"previousPage",value:function(){var e=this.state.page;this.setState({page:1>e-1?1:e-1})}},{key:"render",value:function(){var e=this.state,t=e.data,n=e.page;return Ct.a.createElement("div",null,Ct.a.createElement("table",{className:"table responsive"},Ct.a.createElement("thead",null,Ct.a.createElement("tr",null,Object.keys(t[n-1][0]).map((function(e){return Ct.a.createElement("th",{key:e},e)})))),Ct.a.createElement("tbody",null,t[n-1].map((function(e,t){return Ct.a.createElement("tr",{key:"".concat(n,"/").concat(t)},Object.keys(e).map((function(n){return Ct.a.createElement("td",{key:"".concat(n,"/").concat(t)}," ",Ct.a.createElement("div",{className:"Commit"===n?"coverage-commit-message":""},e[n])," ")})))}),[]))),1=g&&80<=g?"#cfaf2a":"#c75151",_=s.git,S=_.message,j=_.commit,k=_.branch,P=_.author_name,R=_.author_date,C="".concat(f.replace(".git",""),"/commit/").concat(j);return Ct.a.createElement("div",{className:"coverage"},Ct.a.createElement("div",{className:"coverage-header"},Ct.a.createElement("div",{style:{display:"inline-block",width:"100%"}},Ct.a.createElement("div",{style:{float:"left",textAlign:"left"}},Ct.a.createElement("h3",null," ",Ct.a.createElement("a",{href:"/coverage/".concat(a.replace(/\./g,"%2E"),"/").concat(c,"/")},c)," / ",Ct.a.createElement("a",{href:"/coverage/".concat(a.replace(/\./g,"%2E"),"/").concat(c,"/").concat(i)},i)," / ",Ct.a.createElement("a",{href:"/coverage/".concat(a.replace(/\./g,"%2E"),"/").concat(c,"/").concat(i,"/").concat(encodeURIComponent(l).replace(/\./g,"%2E"))},l)," "),Ct.a.createElement("p",null,Ct.a.createElement("a",{className:"coverage-commit-message",href:C,target:"_blank",rel:"noopener noreferrer"}," ",S," "),"on branch",Ct.a.createElement("b",null," ",k," "),qt()(1e3*R).fromNow()," by",Ct.a.createElement("b",null," ",P," "))),Ct.a.createElement("h3",{style:{float:"right",color:O}},x,"%")),Ct.a.createElement(Ht,{width:window.innerWidth-200,data:Object(rn.parseCoverage)(t.history),height:100})),Ct.a.createElement("br",null),Ct.a.createElement(yn,{source:p.source,lineMap:u,extension:l.substr(l.lastIndexOf(".")+1,l.length)}))}return Ct.a.createElement(en,null)}}]),t}(Ct.a.Component);hn.propTypes={match:Lt.a.object};var mn=Ct.a.createElement(Tt.BrowserRouter,null,Ct.a.createElement(It,null,Ct.a.createElement(Nt.g,null,Ct.a.createElement(Nt.d,{path:"/coverage/:source/:owner/:name/:file",component:hn}),Ct.a.createElement(Nt.d,{path:"/coverage/:source/:owner/:name",component:fn}),Ct.a.createElement(Nt.d,{path:"/coverage/:source/:owner/:page?",component:cn}),Ct.a.createElement(Nt.d,{path:"/coverage/:page?",component:cn}),Ct.a.createElement(Nt.d,{exact:!0,path:"/feed",component:tn}),Ct.a.createElement(Nt.d,{exact:!0,path:"/",component:Jt}),Ct.a.createElement(Nt.d,{path:"*",component:Xt}))));Object(Pt.render)(mn,document.querySelector("#root"))},59:function(e){e.exports.parseCoverage=function(e,t){var n=[[],[],[]];return e.forEach((function(e){var r=e.git,o=e.source_files;if(!t||t===(r.branch||r.git_branch)){var a=0,c=0,i=0,u=0;o.forEach((function(e){var t=e.lines,n=void 0===t?{hit:0,found:0}:t,r=e.branches,o=void 0===r?{hit:0,found:0}:r,l=e.functions,f=void 0===l?{hit:0,found:0}:l;n&&o&&f&&(c+=parseInt(100*(n.hit/n.found||1)),i+=parseInt(100*(o.hit/o.found||1)),u+=parseInt(100*(f.hit/f.found||1)),a+=1)})),n[0].push(c/a),n[1].push(i/a),n[2].push(u/a)}})),1==n[0].length&&(n[0].push(n[0][0]),n[1].push(n[1][0]),n[2].push(n[2][0])),n}},60:function(e){e.exports=JSON.parse('{"b":"lcov-server","c":"1.3.2","a":"🎯 A simple lcov server & cli parser"}')}}); \ No newline at end of file diff --git a/dist/vendor.js b/dist/vendor.js index b196faa..73234e1 100644 --- a/dist/vendor.js +++ b/dist/vendor.js @@ -1 +1 @@ -!function(e){function r(r){for(var n,o,i=r[0],l=r[1],p=r[2],c=0,s=[];c"+i+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||3n?r.splice(n,r.length-n,o):r.push(o),t({action:i,location:o,index:n,entries:r})}})},replace:function(e,r){var i="REPLACE",o=u(e,r,n(),S.location);f.confirmTransitionTo(o,i,a,function(e){e&&(S.entries[S.index]=o,t({action:i,location:o}))})},go:r,goBack:function(){r(-1)},goForward:function(){r(1)},canGo:function(e){var t=S.index+e;return 0<=t&&tS;S++)if((5==e||c||S in f)&&(p=g(_=f[S],S,m),e))if(n)h[S]=p;else if(p)switch(e){case 3:return!0;case 5:return _;case 6:return S;case 2:h.push(_)}else if(l)return!1;return c?-1:3==e||l?l:h}}},function(e,t,n){var r=Math.round,i=Math.abs,a=Math.floor,o=Math.ceil,s=Math.min;(function(e){//! moment.js -!function(t,n){e.exports=n()}(0,function(){"use strict";function t(){return ut.apply(null,arguments)}function l(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function c(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function u(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function _(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var n,r=[];for(n=0;nt.overflow&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function h(e){var t=g(NaN);return null==e?E(t).userInvalidated=!0:f(E(t),e),t}function b(e,t){var n,r,i;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=E(t)),u(t._locale)||(e._locale=t._locale),0<_t.length)for(n=0;n<_t.length;n++)u(i=t[r=_t[n]])||(e[r]=i);return e}function v(e){b(this,e),this._d=new Date(null==e._d?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),!1===pt&&(pt=!0,t.updateOffset(this),pt=!1)}function T(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function C(e){return 0>e?o(e)||0:a(e)}function O(e){var t=+e,n=0;return 0!=t&&isFinite(t)&&(n=C(t)),n}function y(e,t,n){var r,a=s(e.length,t.length),o=i(e.length-t.length),l=0;for(r=0;rt;t++)n=g([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),a.sort(e),t=0;12>t;t++)r[t]=H(r[t]),i[t]=H(i[t]);for(t=0;24>t;t++)a[t]=H(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function ne(e){var t;if(100>e&&0<=e){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function re(e,t,n){var r=7+t-n;return-((7+ne(e,0,r).getUTCDay()-t)%7)+r-1}function ie(e,t,n,r,i){var a,o,s=1+7*(t-1)+(7+n-r)%7+re(e,r,i);return 0>=s?o=j(a=e-1)+s:s>j(e)?(a=e+1,o=s-j(e)):(a=e,o=s),{year:a,dayOfYear:o}}function ae(e,t,n){var r,i,o=re(e.year(),t,n),s=a((e.dayOfYear()-o-1)/7)+1;return 1>s?r=s+oe(i=e.year()-1,t,n):s>oe(e.year(),t,n)?(r=s-oe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=s),{week:r,year:i}}function oe(e,t,n){var r=re(e,t,n),i=re(e+1,t,n);return(j(e)-r+i)/7}function se(e,t){return e.slice(t,7).concat(e.slice(0,t))}function le(){function e(e,t){return t.length-e.length}var t,n,r,i,a,o=[],s=[],l=[],c=[];for(t=0;7>t;t++)n=g([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),l.push(a),c.push(r),c.push(i),c.push(a);for(o.sort(e),s.sort(e),l.sort(e),c.sort(e),t=0;7>t;t++)s[t]=H(s[t]),l[t]=H(l[t]),c[t]=H(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function ce(){return this.hours()%12||12}function ue(e,t){U(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function de(e,t){return t._meridiemParse}function _e(e){return e?e.toLowerCase().replace("_","-"):e}function pe(t){var r=null;if(!rn[t]&&void 0!==e&&e&&e.exports)try{r=en._abbr,n(385)("./"+t),me(r)}catch(t){}return rn[t]}function me(e,t){var n;return e&&((n=u(t)?ge(e):fe(e,t))?en=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),en._abbr}function fe(e,t){if(null!==t){var n,r=nn;if(t.abbr=e,null!=rn[e])I("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=rn[e]._config;else if(null!=t.parentLocale)if(null!=rn[t.parentLocale])r=rn[t.parentLocale]._config;else{if(null==(n=pe(t.parentLocale)))return an[t.parentLocale]||(an[t.parentLocale]=[]),an[t.parentLocale].push({name:e,config:t}),null;r=n._config}return rn[e]=new x(D(r,t)),an[e]&&an[e].forEach(function(e){fe(e.name,e.config)}),me(e),rn[e]}return delete rn[e],null}function ge(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return en;if(!l(e)){if(t=pe(e))return t;e=[e]}return function(e){for(var t,n,r,i,a=0;a=t&&y(i,n,!0)>=t-1)break;t--}a++}return en}(e)}function Ee(e){var t,n=e._a;return n&&-2===E(e).overflow&&(t=0>n[Yt]||11n[Vt]||n[Vt]>Z(n[Gt],n[Yt])?Vt:0>n[Ht]||24n[zt]||59n[qt]||59n[Wt]||999Vt)&&(t=Vt),E(e)._overflowWeeks&&-1===t&&(t=jt),E(e)._overflowWeekday&&-1===t&&(t=Qt),E(e).overflow=t),e}function Se(e,t,n){return null==e?null==t?n:t:e}function he(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function be(e){var t,n,r,i,a,o=[];if(!e._d){for(r=he(e),e._w&&null==e._a[Vt]&&null==e._a[Yt]&&function(e){var t,n,r,i,a,o,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)a=1,o=4,n=Se(t.GG,e._a[Gt],ae(Ie(),1,4).year),r=Se(t.W,1),(1>(i=Se(t.E,1))||7t.e||6(i=t.d)||6r||r>oe(n,a,o)?E(e)._overflowWeeks=!0:null==l?(s=ie(n,r,i,a,o),e._a[Gt]=s.year,e._dayOfYear=s.dayOfYear):E(e)._overflowWeekday=!0}(e),null!=e._dayOfYear&&(a=Se(e._a[Gt],r[Gt]),(e._dayOfYear>j(a)||0===e._dayOfYear)&&(E(e)._overflowDayOfYear=!0),n=ne(a,0,e._dayOfYear),e._a[Yt]=n.getUTCMonth(),e._a[Vt]=n.getUTCDate()),t=0;3>t&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;7>t;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ht]&&0===e._a[zt]&&0===e._a[qt]&&0===e._a[Wt]&&(e._nextDay=!0,e._a[Ht]=0),e._d=(e._useUTC?ne:function(e,t,n,r,i,a,o){var s;return 100>e&&0<=e?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ht]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(E(e).weekdayMismatch=!0)}}function ve(e){var t,n,r,i,a,o,s=e._i,l=on.exec(s)||sn.exec(s);if(l){for(E(e).iso=!0,t=0,n=cn.length;t=t?2e3+t:999>=t?1900+t:t}function Ce(e){var t=_n.exec(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}(e._i));if(t){var n=function(e,t,n,r,i,a){var o=[Te(e),Zt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(t[4],t[3],t[2],t[5],t[6],t[7]);if(!function(e,t,n){return!e||Jt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(E(n).weekdayMismatch=!0,n._isValid=!1,!1)}(t[1],n,e))return;e._a=n,e._tzm=function(e,t,n){if(e)return pn[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(t[8],t[9],t[10]),e._d=ne.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),E(e).rfc2822=!0}else e._isValid=!1}function Oe(e){if(e._f!==t.ISO_8601)if(e._f!==t.RFC_2822){e._a=[],E(e).empty=!0;var n,r,i,a,o,s=""+e._i,l=s.length,c=0;for(i=G(e._f,e._locale).match(St)||[],n=0;n=e._a[Ht]&&!0===E(e).bigHour&&0t&&(t+=12),r||12!==t||(t=0),t):e.meridiemHour(t,n)}(e._locale,e._a[Ht],e._meridiem),be(e),Ee(e)}else Ce(e);else ve(e)}function ye(e){var t=e._i,n=e._f;return e._locale=e._locale||ge(e._l),null===t||void 0===n&&""===t?h({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),T(t)?new v(Ee(t)):(_(t)?e._d=t:l(n)?function(e){var t,n,r,i,a;if(0===e._f.length)return E(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ie?-1*r(-1*e):r(e)}function Me(e,t){U(e,0,0,function(){var e=this.utcOffset(),n="+";return 0>e&&(e=-e,n="-"),n+k(~~(e/60),2)+t+k(~~e%60,2)})}function Le(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(En)||["-",0,0],i=60*r[1]+O(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Pe(e,n){var r,i;return n._isUTC?(r=n.clone(),i=(T(e)||_(e)?e.valueOf():Ie(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),t.updateOffset(r,!1),r):Ie(e).local()}function ke(e){return 15*-r(e._d.getTimezoneOffset()/15)}function Ue(){return!!this.isValid()&&this._isUTC&&0===this._offset}function Fe(e,t){var n,r,i,a=e,o=null;return xe(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(a={},t?a[t]=e:a.milliseconds=e):(o=Sn.exec(e))?(n="-"===o[1]?-1:1,a={y:0,d:O(o[Vt])*n,h:O(o[Ht])*n,m:O(o[zt])*n,s:O(o[qt])*n,ms:O(we(1e3*o[Wt]))*n}):(o=hn.exec(e))?(n="-"===o[1]?-1:1,a={y:Be(o[2],n),M:Be(o[3],n),w:Be(o[4],n),d:Be(o[5],n),h:Be(o[6],n),m:Be(o[7],n),s:Be(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(e,t){var n;return e.isValid()&&t.isValid()?(t=Pe(t,e),e.isBefore(t)?n=Ge(e,t):((n=Ge(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(Ie(a.from),Ie(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new De(a),xe(e)&&m(e,"_locale")&&(r._locale=e._locale),r}function Be(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ge(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ye(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(I(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Ve(this,Fe(n="string"==typeof n?+n:n,r),e),this}}function Ve(e,n,r,i){var a=n._milliseconds,o=we(n._days),s=we(n._months);e.isValid()&&(i=null==i||i,s&&J(e,K(e,"Month")+s*r),o&&X(e,"Date",K(e,"Date")+o*r),a&&e._d.setTime(e._d.valueOf()+a*r),i&&t.updateOffset(e,o||s))}function He(e,t){var n,r=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(r,"months");return 0>t-i?n=(t-i)/(i-e.clone().add(r-1,"months")):n=(t-i)/(e.clone().add(r+1,"months")-i),-(r+n)||0}function ze(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ge(e))&&(this._locale=t),this)}function qe(){return this._locale}function We(e,t){return(e%t+t)%t}function je(e,t,n){return 100>e&&0<=e?new Date(e+400,t,n)-Cn:new Date(e,t,n).valueOf()}function Qe(e,t,n){return 100>e&&0<=e?Date.UTC(e+400,t,n)-Cn:Date.UTC(e,t,n)}function $e(e,t){U(0,[e,e.length],0,t)}function Ke(e,t,n,r,i){var a;return null==e?ae(this,r,i).year:(t>(a=oe(e,r,i))&&(t=a),function(e,t,n,r,i){var a=ie(e,t,n,r,i),o=ne(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,e,t,n,r,i))}function Xe(e,t){t[Wt]=O(1e3*("0."+e))}function Ze(e){return e}function Je(e,t,n,r){var i=ge(),a=g().set(r,t);return i[n](a,e)}function et(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return Je(e,t,n,"month");var r,i=[];for(r=0;12>r;r++)i[r]=Je(e,r,n,"month");return i}function tt(e,t,n,r){"boolean"==typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var i=ge(),a=e?i._week.dow:0;if(null!=n)return Je(t,(n+a)%7,r,"day");var o,s=[];for(o=0;7>o;o++)s[o]=Je(t,(o+a)%7,r,"day");return s}function nt(e,t,n,r){var i=Fe(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function rt(e){return 0>e?a(e):o(e)}function it(e){return 4800*e/146097}function at(e){return 146097*e/4800}function ot(e){return function(){return this.as(e)}}function st(e){return function(){return this.isValid()?this._data[e]:NaN}}function lt(e){return(0e)||+e}function ct(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Kn(this._milliseconds)/1e3,r=Kn(this._days),i=Kn(this._months);e=C(n/60),t=C(e/60),n%=60,e%=60;var a=C(i/12),o=i%=12,s=r,l=t,c=e,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var _=0>d?"-":"",p=lt(this._months)===lt(d)?"":"-",m=lt(this._days)===lt(d)?"":"-",f=lt(this._milliseconds)===lt(d)?"":"-";return _+"P"+(a?p+a+"Y":"")+(o?p+o+"M":"")+(s?m+s+"D":"")+(l||c||u?"T":"")+(l?f+l+"H":"")+(c?f+c+"M":"")+(u?f+u+"S":"")}var ut,dt;dt=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r=e?""+e:"+"+e}),U(0,["YY",2],0,function(){return this.year()%100}),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),w("year","y"),P("year",1),Y("Y",Lt),Y("YY",Rt,Ct),Y("YYYY",xt,yt),Y("YYYYY",wt,Nt),Y("YYYYYY",wt,Nt),z(["YYYYY","YYYYYY"],Gt),z("YYYY",function(e,n){n[Gt]=2===e.length?t.parseTwoDigitYear(e):O(e)}),z("YY",function(e,n){n[Gt]=t.parseTwoDigitYear(e)}),z("Y",function(e,t){t[Gt]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return O(e)+(68this?this:e:h()}),gn=["year","quarter","month","week","day","hour","minute","second","millisecond"];Me("Z",":"),Me("ZZ",""),Y("Z",kt),Y("ZZ",kt),z(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Le(kt,e)});var En=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Sn=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,hn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Fe.fn=De.prototype,Fe.invalid=function(){return Fe(NaN)};var bn=Ye(1,"add"),vn=Ye(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Tn=R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)}),Cn=126227808e5;U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),$e("gggg","weekYear"),$e("ggggg","weekYear"),$e("GGGG","isoWeekYear"),$e("GGGGG","isoWeekYear"),w("weekYear","gg"),w("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),Y("G",Lt),Y("g",Lt),Y("GG",Rt,Ct),Y("gg",Rt,Ct),Y("GGGG",xt,yt),Y("gggg",xt,yt),Y("GGGGG",wt,Nt),Y("ggggg",wt,Nt),q(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=O(e)}),q(["gg","GG"],function(e,n,r,i){n[i]=t.parseTwoDigitYear(e)}),U("Q",0,"Qo","quarter"),w("quarter","Q"),P("quarter",7),Y("Q",Tt),z("Q",function(e,t){t[Yt]=3*(O(e)-1)}),U("D",["DD",2],"Do","date"),w("date","D"),P("date",9),Y("D",Rt),Y("DD",Rt,Ct),Y("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),z(["D","DD"],Vt),z("Do",function(e,t){t[Vt]=O(e.match(Rt)[0])});var On=$("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),w("dayOfYear","DDD"),P("dayOfYear",4),Y("DDD",Dt),Y("DDDD",Ot),z(["DDD","DDDD"],function(e,t,n){n._dayOfYear=O(e)}),U("m",["mm",2],0,"minute"),w("minute","m"),P("minute",14),Y("m",Rt),Y("mm",Rt,Ct),z(["m","mm"],zt);var yn=$("Minutes",!1);U("s",["ss",2],0,"second"),w("second","s"),P("second",15),Y("s",Rt),Y("ss",Rt,Ct),z(["s","ss"],qt);var Nn,Rn=$("Seconds",!1);for(U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),w("millisecond","ms"),P("millisecond",16),Y("S",Dt,Tt),Y("SS",Dt,Ct),Y("SSS",Dt,Ot),Nn="SSSS";9>=Nn.length;Nn+="S")Y(Nn,Mt);for(Nn="S";9>=Nn.length;Nn+="S")z(Nn,Xe);var In=$("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var An=v.prototype;An.add=bn,An.calendar=function(e,n){var r=e||Ie(),i=Pe(r,this).startOf("day"),a=t.calendarFormat(this,i)||"sameElse",o=n&&(A(n[a])?n[a].call(this,r):n[a]);return this.format(o||this.localeData().calendar(a,this,Ie(r)))},An.clone=function(){return new v(this)},An.diff=function(e,t,n){var r,i,a;return this.isValid()?(r=Pe(e,this)).isValid()?(i=6e4*(r.utcOffset()-this.utcOffset()),a="year"===(t=M(t))?He(this,r)/12:"month"===t?He(this,r):"quarter"===t?He(this,r)/3:"second"===t?(this-r)/1e3:"minute"===t?(this-r)/6e4:"hour"===t?(this-r)/36e5:"day"===t?(this-r-i)/864e5:"week"===t?(this-r-i)/6048e5:this-r,n?a:C(a)):NaN:NaN},An.endOf=function(e){var n;if(void 0===(e=M(e))||"millisecond"===e||!this.isValid())return this;var r=this._isUTC?Qe:je;return"year"===e?n=r(this.year()+1,0,1)-1:"quarter"===e?n=r(this.year(),this.month()-this.month()%3+3,1)-1:"month"===e?n=r(this.year(),this.month()+1,1)-1:"week"===e?n=r(this.year(),this.month(),this.date()-this.weekday()+7)-1:"isoWeek"===e?n=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1:"day"===e||"date"===e?n=r(this.year(),this.month(),this.date()+1)-1:"hour"===e?(n=this._d.valueOf(),n+=36e5-We(n+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1):"minute"===e?(n=this._d.valueOf(),n+=6e4-We(n,6e4)-1):"second"===e&&(n=this._d.valueOf(),n+=1e3-We(n,1e3)-1),this._d.setTime(n),t.updateOffset(this,!0),this},An.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=B(this,e);return this.localeData().postformat(n)},An.from=function(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ie(e).isValid())?Fe({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},An.fromNow=function(e){return this.from(Ie(),e)},An.to=function(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ie(e).isValid())?Fe({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},An.toNow=function(e){return this.to(Ie(),e)},An.get=function(e){return A(this[e=M(e)])?this[e]():this},An.invalidAt=function(){return E(this).overflow},An.isAfter=function(e,t){var n=T(e)?e:Ie(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=M(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()n.year()||9999=this.year()?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},An.toJSON=function(){return this.isValid()?this.toISOString():null},An.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},An.unix=function(){return a(this.valueOf()/1e3)},An.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},An.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},An.year=Kt,An.isLeapYear=function(){return Q(this.year())},An.weekYear=function(e){return Ke.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},An.isoWeekYear=function(e){return Ke.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},An.quarter=An.quarters=function(e){return null==e?o((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},An.month=ee,An.daysInMonth=function(){return Z(this.year(),this.month())},An.week=An.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},An.isoWeek=An.isoWeeks=function(e){var t=ae(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},An.weeksInYear=function(){var e=this.localeData()._week;return oe(this.year(),e.dow,e.doy)},An.isoWeeksInYear=function(){return oe(this.year(),1,4)},An.date=On,An.day=An.days=function(e){if(!this.isValid())return null==e?NaN:this;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null==e?t:(e=function(e,t){return"string"==typeof e?isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10):e}(e,this.localeData()),this.add(e-t,"d"))},An.weekday=function(e){if(!this.isValid())return null==e?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},An.isoWeekday=function(e){if(!this.isValid())return null==e?NaN:this;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},An.dayOfYear=function(e){var t=r((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},An.hour=An.hours=tn,An.minute=An.minutes=yn,An.second=An.seconds=Rn,An.millisecond=An.milliseconds=In,An.utcOffset=function(e,n,r){var a,o=this._offset||0;if(!this.isValid())return null==e?NaN:this;if(null!=e){if("string"!=typeof e)16>i(e)&&!r&&(e*=60);else if(null===(e=Le(kt,e)))return this;return!this._isUTC&&n&&(a=ke(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),o!==e&&(!n||this._changeInProgress?Ve(this,Fe(e-o,"m"),1,!1):!this._changeInProgress&&(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:ke(this)},An.utc=function(e){return this.utcOffset(0,e)},An.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ke(this),"m")),this},An.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Le(Pt,this._i);null==e?this.utcOffset(0,!0):this.utcOffset(e)}return this},An.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ie(e).utcOffset():0,0==(this.utcOffset()-e)%60)},An.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},An.isLocal=function(){return!!this.isValid()&&!this._isUTC},An.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},An.isUtc=Ue,An.isUTC=Ue,An.zoneAbbr=function(){return this._isUTC?"UTC":""},An.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},An.dates=R("dates accessor is deprecated. Use date instead.",On),An.months=R("months accessor is deprecated. Use month instead",ee),An.years=R("years accessor is deprecated. Use year instead",Kt),An.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null==e?-this.utcOffset():("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this)}),An.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e={};if(b(e,this),(e=ye(e))._a){var t=e._isUTC?g(e._a):Ie(e._a);this._isDSTShifted=this.isValid()&&0r;++r)a=g([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1===(i=$t.call(this._shortMonthsParse,o))?null:i:-1===(i=$t.call(this._longMonthsParse,o))?null:i:"MMM"===t?-1!==(i=$t.call(this._shortMonthsParse,o))?i:-1===(i=$t.call(this._longMonthsParse,o))?null:i:-1!==(i=$t.call(this._longMonthsParse,o))?i:-1===(i=$t.call(this._shortMonthsParse,o))?null:i}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(i=g([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Dn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||te.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=Ut),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Dn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||te.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Ut),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Dn.week=function(e){return ae(e,this._week.dow,this._week.doy).week},Dn.firstDayOfYear=function(){return this._week.doy},Dn.firstDayOfWeek=function(){return this._week.dow},Dn.weekdays=function(e,t){var n=l(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?se(n,this._week.dow):e?n[e.day()]:n},Dn.weekdaysMin=function(e){return!0===e?se(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Dn.weekdaysShort=function(e){return!0===e?se(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Dn.weekdaysParse=function(e,t,n){var r,i,a;if(this._weekdaysParseExact)return function(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;7>r;++r)a=g([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1===(i=$t.call(this._weekdaysParse,o))?null:i:"ddd"===t?-1===(i=$t.call(this._shortWeekdaysParse,o))?null:i:-1===(i=$t.call(this._minWeekdaysParse,o))?null:i:"dddd"===t?-1!==(i=$t.call(this._weekdaysParse,o))?i:-1!==(i=$t.call(this._shortWeekdaysParse,o))?i:-1===(i=$t.call(this._minWeekdaysParse,o))?null:i:"ddd"===t?-1!==(i=$t.call(this._shortWeekdaysParse,o))?i:-1!==(i=$t.call(this._weekdaysParse,o))?i:-1===(i=$t.call(this._minWeekdaysParse,o))?null:i:-1!==(i=$t.call(this._minWeekdaysParse,o))?i:-1!==(i=$t.call(this._weekdaysParse,o))?i:-1===(i=$t.call(this._shortWeekdaysParse,o))?null:i}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;7>r;r++){if(i=g([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Dn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||le.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=Ut),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Dn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||le.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Dn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||le.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ut),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Dn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Dn.meridiem=function(e,t,n){return 11=a&&0>=o&&0>=s||(a+=864e5*rt(at(s)+o),o=0,s=0),l.milliseconds=a%1e3,e=C(a/1e3),l.seconds=e%60,t=C(e/60),l.minutes=t%60,n=C(t/60),l.hours=n%24,o+=C(n/24),s+=i=C(it(o)),o-=rt(at(i)),r=C(s/12),s%=12,l.days=o,l.months=s,l.years=r,this},Xn.clone=function(){return Fe(this)},Xn.get=function(e){return e=M(e),this.isValid()?this[e+"s"]():NaN},Xn.milliseconds=Yn,Xn.seconds=Vn,Xn.minutes=Hn,Xn.hours=zn,Xn.days=qn,Xn.weeks=function(){return C(this.days()/7)},Xn.months=Wn,Xn.years=jn,Xn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Fe(e).abs(),i=Qn(r.as("s")),a=Qn(r.as("m")),o=Qn(r.as("h")),s=Qn(r.as("d")),l=Qn(r.as("M")),c=Qn(r.as("y")),u=i<=$n.ss&&["s",i]||i<$n.s&&["ss",i]||1>=a&&["m"]||a<$n.m&&["mm",a]||1>=o&&["h"]||o<$n.h&&["hh",o]||1>=s&&["d"]||s<$n.d&&["dd",s]||1>=l&&["M"]||l<$n.M&&["MM",l]||1>=c&&["y"]||["yy",c];return u[2]=t,u[3]=0<+e,u[4]=n,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,u)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Xn.toISOString=ct,Xn.toString=ct,Xn.toJSON=ct,Xn.locale=ze,Xn.localeData=qe,Xn.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ct),Xn.lang=Tn,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Y("x",Lt),Y("X",/[+-]?\d+(\.\d{1,3})?/),z("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),z("x",function(e,t,n){n._d=new Date(O(e))}),t.version="2.24.0",ut=Ie,t.fn=An,t.min=function(){return Ae("isBefore",[].slice.call(arguments,0))},t.max=function(){return Ae("isAfter",[].slice.call(arguments,0))},t.now=function(){return Date.now?Date.now():+new Date},t.utc=g,t.unix=function(e){return Ie(1e3*e)},t.months=function(e,t){return et(e,t,"months")},t.isDate=_,t.locale=me,t.invalid=h,t.duration=Fe,t.isMoment=T,t.weekdays=function(e,t,n){return tt(e,t,n,"weekdays")},t.parseZone=function(){return Ie.apply(null,arguments).parseZone()},t.localeData=ge,t.isDuration=xe,t.monthsShort=function(e,t){return et(e,t,"monthsShort")},t.weekdaysMin=function(e,t,n){return tt(e,t,n,"weekdaysMin")},t.defineLocale=fe,t.updateLocale=function(e,t){if(null!=t){var n,r,i=nn;null!=(r=pe(e))&&(i=r._config),(n=new x(t=D(i,t))).parentLocale=rn[e],rn[e]=n,me(e)}else null!=rn[e]&&(null==rn[e].parentLocale?null!=rn[e]&&delete rn[e]:rn[e]=rn[e].parentLocale);return rn[e]},t.locales=function(){return ft(rn)},t.weekdaysShort=function(e,t,n){return tt(e,t,n,"weekdaysShort")},t.normalizeUnits=M,t.relativeTimeRounding=function(e){return void 0===e?Qn:"function"==typeof e&&(Qn=e,!0)},t.relativeTimeThreshold=function(e,t){return void 0!==$n[e]&&(void 0===t?$n[e]:($n[e]=t,"s"===e&&($n.ss=t-1),!0))},t.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse"},t.prototype=An,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t})}).call(this,n(155)(e))},function(e,t,n){"use strict";if(n(10)){var r=n(37),i=n(4),a=n(5),o=n(1),s=n(80),l=n(111),c=n(23),u=n(49),d=n(42),_=n(15),p=n(51),m=n(25),f=n(9),g=n(145),E=n(45),S=n(30),h=n(18),b=n(55),v=n(6),T=n(12),C=n(100),O=n(46),y=n(21),N=n(47).f,R=n(102),I=n(43),A=n(8),D=n(33),x=n(70),w=n(65),M=n(105),L=n(57),P=n(75),k=n(48),U=n(104),F=n(134),B=n(11),G=n(20),Y=B.f,V=G.f,H=i.RangeError,z=i.TypeError,q=i.Uint8Array,W="ArrayBuffer",j="Shared"+W,Q="BYTES_PER_ELEMENT",$="prototype",K=Array[$],X=l.ArrayBuffer,Z=l.DataView,J=D(0),ee=D(2),te=D(3),ne=D(4),re=D(5),ie=D(6),ae=x(!0),oe=x(!1),se=M.values,le=M.keys,ce=M.entries,ue=K.lastIndexOf,de=K.reduce,_e=K.reduceRight,pe=K.join,me=K.sort,fe=K.slice,ge=K.toString,Ee=K.toLocaleString,Se=A("iterator"),he=A("toStringTag"),be=I("typed_constructor"),ve=I("def_constructor"),Te=s.CONSTR,Ce=s.TYPED,Oe=s.VIEW,ye="Wrong length!",Ne=D(1,function(e,t){return xe(w(e,e[ve]),t)}),Re=a(function(){return 1===new q(new Uint16Array([1]).buffer)[0]}),Ie=!!q&&!!q[$].set&&a(function(){new q(1).set({})}),Ae=function(e,t){var n=m(e);if(0>n||n%t)throw H("Wrong offset!");return n},De=function(e){if(v(e)&&Ce in e)return e;throw z(e+" is not a typed array!")},xe=function(e,t){if(!(v(e)&&be in e))throw z("It is not a typed array constructor!");return new e(t)},we=function(e,t){return Me(w(e,e[ve]),t)},Me=function(e,t){for(var n=0,r=t.length,i=xe(e,r);r>n;)i[n]=t[n++];return i},Le=function(e,t,n){Y(e,t,{get:function(){return this._d[n]}})},Pe=function(e){var t,n,r,i,a,o,s=T(e),l=arguments.length,u=1t;t++)i[t]=d?u(s[t],t):s[t];return i},ke=function(){for(var e=0,t=arguments.length,n=xe(this,t);t>e;)n[e]=arguments[e++];return n},Ue=!!q&&a(function(){Ee.call(new q(1))}),Fe=function(){return Ee.apply(Ue?fe.call(De(this)):De(this),arguments)},Be={copyWithin:function(e,t){return F.call(De(this),e,t,2n)throw H(ye);for(;a(i=Math.round(i))?0:255(o=E-m))throw H(ye)}else if((o=f(i)*t)+m>E)throw H(ye);s=o/t}else s=g(n),a=new X(o=s*t);for(_(e,"_d",{b:a,o:m,l:o,e:s,v:new Z(a)});p(e=r(e))?i(e+t,0):a(e,t)}},function(e,t,n){var r=n(3),i=n(120),a=n(88),o=n(87)("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=n(85)("iframe"),r=a.length;for(t.style.display="none",n(89).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("