Repository navigation
Expand file tree
/
Copy pathfunction-plot.js
More file actions
1 lines (1 loc) · 93.1 KB
/
Copy pathfunction-plot.js
File metadata and controls
1 lines (1 loc) · 93.1 KB
1
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).functionPlot=t()}}(function(){return function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return i(n||t)},c,c.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e,n){e.exports=t("./lib/")},{"./lib/":14}],2:[function(t,e,n){var r=t("is-object");e.exports=function(t){if(!r(t))throw Error("datum is not an object");return t.hasOwnProperty("graphType")||(t.graphType="interval"),t.hasOwnProperty("sampler")||(t.sampler="interval"!==t.graphType?"builtIn":"interval"),t.hasOwnProperty("fnType")||(t.fnType="linear"),t}},{"is-object":52}],3:[function(t,e,n){"use strict";var r=t("./globals"),i={interval:t("./samplers/interval"),builtIn:t("./samplers/builtIn")};e.exports=function(t,e){var n,o,s,a,u=(n=t,o=e.range||[-1/0,1/0],s=n.meta.xScale,[Math.max(s.domain()[0],o[0]),Math.min(s.domain()[1],o[1])]);return a=(0,i[e.sampler])(t,e,u,e.nSamples||Math.min(r.MAX_ITERATIONS,r.DEFAULT_ITERATIONS||2*t.meta.width)),t.emit("eval",a,e.index,e.isHelper),a}},{"./globals":4,"./samplers/builtIn":19,"./samplers/interval":20}],4:[function(t,e,n){"use strict";var r=window.d3,i={COLORS:["steelblue","red","#05b378","orange","#4040e8","yellow","brown","magenta","cyan"].map(function(t){return r.hsl(t)}),DEFAULT_WIDTH:550,DEFAULT_HEIGHT:350,TIP_X_EPS:1,DEFAULT_ITERATIONS:null};i.MAX_ITERATIONS=4*i.DEFAULT_WIDTH,e.exports=i},{}],5:[function(t,e,n){"use strict";e.exports={polyline:t("./polyline"),interval:t("./interval"),scatter:t("./scatter")}},{"./interval":6,"./polyline":7,"./scatter":8}],6:[function(t,e,n){"use strict";var r=window.d3,i=t("../evaluate"),o=t("../utils");e.exports=function(t){var e,n=t.meta.xScale,s=t.meta.yScale;function a(t,n,r,i){if(r>i){var o=r;r=i,i=o}var s=Math.min(n,i),a=Math.max(t,r);return a>s?[-e,0]:[a,s]}var u=function(t,r){for(var i="",o=s.range(),u=Math.min.apply(Math,o),l=Math.max.apply(Math,o),c=0,h=t.length;c<h;c+=1)if(t[c]){var f=t[c][0],p=t[c][1],d=p.lo,v=p.hi;if(r)if(!0===r)d=Math.min(d,0),v=Math.max(v,0);else if("+inf"===r)d=Math.min(d,1/0),v=Math.max(v,1/0);else if("-inf"===r)d=Math.min(d,-1/0),v=Math.max(v,-1/0);else{var m=parseFloat(r);m&&(d=Math.min(d,m),v=Math.max(v,m))}var y=n(f.lo)+t.scaledDx/2,g=a(u,l,isFinite(v)?s(v):-1/0,isFinite(d)?s(d):1/0),x=g[0],w=g[1];i+=" M "+y+" "+x,i+=" v "+Math.max(w-x,e)}return i};return function n(s){s.each(function(s){var a=n.el=r.select(this),l=s.index,c=s.closed,h=i(t,s),f=a.selectAll(":scope > path.line").data(h);e=Math.max(h[0].scaledDx,1),f.enter().append("path").attr("class","line line-"+l).attr("fill","none"),f.attr("stroke-width",e).attr("stroke",o.color(s,l)).attr("opacity",c?.5:1).attr("d",function(t){return u(t,c)}).attr(s.attr),f.exit().remove()})}}},{"../evaluate":3,"../utils":22}],7:[function(t,e,n){"use strict";var r=window.d3,i=t("../evaluate"),o=t("../utils"),s=t("clamp");e.exports=function(t){var e=t.meta.xScale,n=t.meta.yScale;return function a(u){u.each(function(u){var l=a.el=r.select(this),c=u.index,h=i(t,u),f=o.color(u,c),p=l.selectAll(":scope > path.line").data(h),d=n.range(),v=d[0]+1,m=d[1]-1;function y(t){return s(n(t[1]),m,v)}u.skipBoundsCheck&&(v=1/0,m=-1/0);var g=r.svg.line().interpolate("linear").x(function(t){return e(t[0])}).y(y),x=r.svg.area().x(function(t){return e(t[0])}).y0(n(0)).y1(y);p.enter().append("path").attr("class","line line-"+c).attr("stroke-width",1).attr("stroke-linecap","round"),p.each(function(){var e,n=r.select(this);u.closed?(n.attr("fill",f),n.attr("fill-opacity",.3),e=x):(n.attr("fill","none"),e=g),n.attr("stroke",f).attr("marker-end",function(){return"vector"===u.fnType?"url(#"+t.markerId+")":null}).attr("d",e)}).attr(u.attr),p.exit().remove()})}}},{"../evaluate":3,"../utils":22,clamp:29}],8:[function(t,e,n){"use strict";var r=window.d3,i=t("../evaluate"),o=t("../utils");e.exports=function(t){var e=t.meta.xScale,n=t.meta.yScale;return function(s){s.each(function(s){var a,u,l=s.index,c=o.color(s,l),h=i(t,s),f=[];for(a=0;a<h.length;a+=1)for(u=0;u<h[a].length;u+=1)f.push(h[a][u]);var p=r.select(this).selectAll(":scope > circle").data(f);p.enter().append("circle"),p.attr("fill",r.hsl(c.toString()).brighter(1.5)).attr("stroke",c).attr("opacity",.7).attr("r",1).attr("cx",function(t){return e(t[0])}).attr("cy",function(t){return n(t[1])}).attr(s.attr),p.exit().remove()})}}},{"../evaluate":3,"../utils":22}],9:[function(t,e,n){"use strict";var r=window.d3;e.exports=function(t){var e=t.owner.meta.xScale,n=t.owner.meta.yScale,i=r.svg.line().x(function(t){return t[0]}).y(function(t){return t[1]});return function(t){t.each(function(){var t=r.select(this).selectAll("g.annotations").data(function(t){return t.annotations||[]});t.enter().append("g").attr("class","annotations");var o=n.range(),s=e.range(),a=t.selectAll("path").data(function(t){return t.hasOwnProperty("x")?[[[0,o[0]],[0,o[1]]]]:[[[s[0],0],[s[1],0]]]});a.enter().append("path").attr("stroke","#eee").attr("d",i),a.exit().remove();var u=t.selectAll("text").data(function(t){return[{text:t.text||"",hasX:t.hasOwnProperty("x")}]});u.enter().append("text").attr("y",function(t){return t.hasX?3:0}).attr("x",function(t){return t.hasX?0:3}).attr("dy",function(t){return t.hasX?5:-5}).attr("text-anchor",function(t){return t.hasX?"end":""}).attr("transform",function(t){return t.hasX?"rotate(-90)":""}).text(function(t){return t.text}),u.exit().remove(),t.attr("transform",function(t){return t.hasOwnProperty("x")?"translate("+e(t.x)+", 0)":"translate(0, "+n(t.y)+")"}),t.exit().remove()})}}},{}],10:[function(t,e,n){"use strict";var r=window.d3,i=t("./eval").builtIn,o=t("../graph-types/polyline"),s=t("../datum-defaults");e.exports=function(t){var e,n=s({isHelper:!0,skipTip:!0,skipBoundsCheck:!0,nSamples:2,graphType:"polyline"});return e=function(s){s.each(function(a){var u=r.select(this),l=function(t){if(!t.derivative)return[];var e="number"==typeof t.derivative.x0?t.derivative.x0:1/0;return n.index=t.index,n.scope={m:i(t.derivative,"fn",{x:e}),x0:e,y0:i(t,"fn",{x:e})},n.fn="m * (x - x0) + y0",[n]}.call(s,a);(function(n){var r=this;n.derivative&&n.derivative.updateOnMouseMove&&!n.derivative.$$mouseListener&&(n.derivative.$$mouseListener=function(t){n.derivative&&(n.derivative.x0=t),e(r)},t.on("tip:update",n.derivative.$$mouseListener))}).call(s,a);var c=u.selectAll("g.derivative").data(l);c.enter().append("g").attr("class","derivative"),c.call(o(t)),c.selectAll("path").attr("opacity",.5),c.exit().remove()})}}},{"../datum-defaults":2,"../graph-types/polyline":7,"./eval":11}],11:[function(t,e,n){"use strict";var r={interval:t("interval-arithmetic-eval"),builtIn:t("built-in-math-eval")},i=t("extend");function o(t){function e(e,n){var i=e[n],o=t+"_Expression_"+n,s=t+"_Compiled_"+n;i!==e[o]&&(e[o]=i,e[s]=function(e){if("string"==typeof e)return(0,r[t])(e);if("function"==typeof e)return{eval:e};throw Error("expression must be a string or a function")}(i))}return function(n,r,o){return e(n,r),(s=n,a=r,s[t+"_Compiled_"+a]).eval(i({},n.scope||{},o));var s,a}}window.math&&(r.builtIn=window.math.compile),e.exports.builtIn=o("builtIn"),e.exports.interval=o("interval")},{"built-in-math-eval":26,extend:32,"interval-arithmetic-eval":36}],12:[function(t,e,n){"use strict";var r=window.d3,i=t("./derivative"),o=t("./secant");e.exports=function(t){return function(e){e.each(function(){var e=r.select(this);e.call(i(t)),e.call(o(t))})}}},{"./derivative":10,"./secant":13}],13:[function(t,e,n){"use strict";var r=window.d3,i=t("extend"),o=t("./eval").builtIn,s=t("../datum-defaults"),a=t("../graph-types/polyline");e.exports=function(t){var e,n=s({isHelper:!0,skipTip:!0,skipBoundsCheck:!0,nSamples:2,graphType:"polyline"});function u(t,e){if(!e.hasOwnProperty("x0"))throw Error("secant must have the property `x0` defined");e.scope=e.scope||{};var n,r=e.x0,s="number"==typeof e.x1?e.x1:1/0;i(e.scope,{x0:r,x1:s,y0:o(t,"fn",{x:r}),y1:o(t,"fn",{x:s})}),(n=e.scope).m=(n.y1-n.y0)/(n.x1-n.x0)}function l(t,e){u(t,e),e.fn="m * (x - x0) + y0"}function c(n,r){var i=this;r.updateOnMouseMove&&!r.$$mouseListener&&(r.$$mouseListener=function(t){r.x1=t,u(n,r),e(i)},t.on("tip:update",r.$$mouseListener))}return e=function(e){e.each(function(o){var s=r.select(this),u=function(t){var e=[];t.secants=t.secants||[];for(var r=0;r<t.secants.length;r+=1){var o=t.secants[r]=i({},n,t.secants[r]);o.index=t.index,o.fn||(l.call(this,t,o),c.call(this,t,o)),e.push(o)}return e}.call(e,o),h=s.selectAll("g.secant").data(u);h.enter().append("g").attr("class","secant"),h.call(a(t)),h.selectAll("path").attr("opacity",.5),h.exit().remove()})}}},{"../datum-defaults":2,"../graph-types/polyline":7,"./eval":11,extend:32}],14:[function(t,e,n){"use strict";t("./polyfills");var r,i,o=window.d3,s=t("events"),a=t("extend"),u=t("./tip"),l=t("./helpers/"),c=t("./helpers/annotations"),h=t("./datum-defaults"),f=[];e.exports=function(t){var e,n,p,d,v,m;(t=t||{}).data=t.data||[];var y=o.svg.line().x(function(t){return v(t[0])}).y(function(t){return m(t[1])});function g(){var e=Math.random(),n=String.fromCharCode(Math.floor(26*e)+97);this.id=t.id=n+e.toString(16).substr(2),this.linkedGraphs=[this],this.options=t,f[this.id]=this,this.setUpEventListeners()}g.prototype=Object.create(s.prototype),g.prototype.build=function(){return this.internalVars(),this.drawGraphWrapper(),this},g.prototype.initializeAxes=function(){var r=o.format("s"),i=function(t){return function(e){var n=t.tickFormat(10);return e===+e&&e===(0|e)?r(e):n(e)}};t.xAxis=t.xAxis||{},t.xAxis.type=t.xAxis.type||"linear",t.yAxis=t.yAxis||{},t.yAxis.type=t.yAxis.type||"linear";var s=this.meta.xDomain=function(t){if(t.domain)return t.domain;if("linear"===t.type){return[-6,6]}if("log"===t.type)return[1,10];throw Error("axis type "+t.type+" unsupported")}(t.xAxis),a=this.meta.yDomain=function(t){if(t.domain)return t.domain;var r,i,o=(i=(r=s)[1]-r[0],n*i/e);if("linear"===t.type)return[-o/2,o/2];if("log"===t.type)return[1,10];throw Error("axis type "+t.type+" unsupported")}(t.yAxis);if(s[0]>=s[1])throw Error("the pair defining the x-domain is inverted");if(a[0]>=a[1])throw Error("the pair defining the y-domain is inverted");v=this.meta.xScale=o.scale[t.xAxis.type]().domain(s).range(t.xAxis.invert?[e,0]:[0,e]),m=this.meta.yScale=o.scale[t.yAxis.type]().domain(a).range(t.yAxis.invert?[0,n]:[n,0]),this.meta.xAxis=o.svg.axis().scale(v).tickSize(t.grid?-n:0).tickFormat(i(v)).orient("bottom"),this.meta.yAxis=o.svg.axis().scale(m).tickSize(t.grid?-e:0).tickFormat(i(m)).orient("left")},g.prototype.internalVars=function(){this.meta={},p=this.meta.margin={left:30,right:30,top:20,bottom:20},t.title&&(this.meta.margin.top=40),d=this.meta.zoomBehavior=o.behavior.zoom(),e=this.meta.width=(t.width||r.DEFAULT_WIDTH)-p.left-p.right,n=this.meta.height=(t.height||r.DEFAULT_HEIGHT)-p.top-p.bottom,this.initializeAxes()},g.prototype.drawGraphWrapper=function(){var r=this.root=o.select(t.target).selectAll("svg").data([t]);this.root.enter=r.enter().append("svg").attr("class","function-plot").attr("font-size",this.getFontSize()),r.attr("width",e+p.left+p.right).attr("height",n+p.top+p.bottom),this.buildTitle(),this.buildLegend(),this.buildCanvas(),this.buildClip(),this.buildAxis(),this.buildAxisLabel(),this.draw();var i=this.tip=u(a(t.tip,{owner:this}));this.canvas.call(i),this.buildZoomHelper(),this.setUpPlugins()},g.prototype.buildTitle=function(){var n=this.root.selectAll("text.title").data(function(t){return[t.title].filter(Boolean)});n.enter().append("text").attr("class","title").attr("y",p.top/2).attr("x",p.left+e/2).attr("font-size",25).attr("text-anchor","middle").attr("alignment-baseline","middle").text(t.title),n.exit().remove()},g.prototype.buildLegend=function(){this.root.enter.append("text").attr("class","top-right-legend").attr("text-anchor","end"),this.root.select(".top-right-legend").attr("y",p.top/2).attr("x",e+p.left)},g.prototype.buildCanvas=function(){var t=this;this.meta.zoomBehavior.x(v).y(m).on("zoom",function(){t.emit("all:zoom",o.event.translate,o.event.scale)});var e=this.canvas=this.root.selectAll(".canvas").data(function(t){return[t]});this.canvas.enter=e.enter().append("g").attr("class","canvas")},g.prototype.buildClip=function(){var t=this.id,r=this.canvas.enter.append("defs");r.append("clipPath").attr("id","function-plot-clip-"+t).append("rect").attr("class","clip static-clip"),this.canvas.selectAll(".clip").attr("width",e).attr("height",n),this.markerId=this.id+"-marker",r.append("clipPath").append("marker").attr("id",this.markerId).attr("viewBox","0 -5 10 10").attr("refX",10).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("svg:path").attr("d","M0,-5L10,0L0,5L0,0").attr("stroke-width","0px").attr("fill-opacity",1).attr("fill","#777")},g.prototype.buildAxis=function(){var t=this.canvas.enter;t.append("g").attr("class","x axis"),t.append("g").attr("class","y axis"),this.canvas.select(".x.axis").attr("transform","translate(0,"+n+")").call(this.meta.xAxis),this.canvas.select(".y.axis").call(this.meta.yAxis)},g.prototype.buildAxisLabel=function(){var t,r,i=this.canvas;(t=i.selectAll("text.x.axis-label").data(function(t){return[t.xAxis.label].filter(Boolean)})).enter().append("text").attr("class","x axis-label").attr("text-anchor","end"),t.attr("x",e).attr("y",n-6).text(function(t){return t}),t.exit().remove(),(r=i.selectAll("text.y.axis-label").data(function(t){return[t.yAxis.label].filter(Boolean)})).enter().append("text").attr("class","y axis-label").attr("y",6).attr("dy",".75em").attr("text-anchor","end").attr("transform","rotate(-90)"),r.text(function(t){return t}),r.exit().remove()},g.prototype.buildContent=function(){var e=this,n=this.canvas;n.attr("transform","translate("+p.left+","+p.top+")").call(d).each(function(){var e,n=o.select(this),r=["mousedown","touchstart","onwheel"in document?"wheel":"ononmousewheel"in document?"mousewheel":"MozMousePixelScroll"].map(function(t){return t+".zoom"});n._zoomListenersCache||(r.forEach(function(t){n["_"+t]=n.on(t)}),n._zoomListenersCache=!0),e=!t.disableZoom,r.forEach(function(t){e?n.on(t,n["_"+t]):n.on(t,null)})});var r=this.content=n.selectAll(":scope > g.content").data(function(t){return[t]});if(r.enter().append("g").attr("clip-path","url(#function-plot-clip-"+this.id+")").attr("class","content"),"linear"===t.xAxis.type){var s=r.selectAll(":scope > path.y.origin").data([[[0,m.domain()[0]],[0,m.domain()[1]]]]);s.enter().append("path").attr("class","y origin").attr("stroke","black").attr("opacity",.2),s.attr("d",y)}if("linear"===t.yAxis.type){var a=r.selectAll(":scope > path.x.origin").data([[[v.domain()[0],0],[v.domain()[1],0]]]);a.enter().append("path").attr("class","x origin").attr("stroke","black").attr("opacity",.2),a.attr("d",y)}r.call(c({owner:e}));var u=r.selectAll(":scope > g.graph").data(function(t){return t.data.map(h)});u.enter().append("g").attr("class","graph"),u.each(function(t,n){t.index=n,o.select(this).call(i[t.graphType](e)),o.select(this).call(l(e))})},g.prototype.buildZoomHelper=function(){var t=this;this.draggable=this.canvas.enter.append("rect").attr("class","zoom-and-drag").style("fill","none").style("pointer-events","all"),this.canvas.select(".zoom-and-drag").attr("width",e).attr("height",n).on("mouseover",function(){t.emit("all:mouseover")}).on("mouseout",function(){t.emit("all:mouseout")}).on("mousemove",function(){t.emit("all:mousemove")})},g.prototype.setUpPlugins=function(){var e=this;(t.plugins||[]).forEach(function(t){t(e)})},g.prototype.addLink=function(){for(var t=0;t<arguments.length;t+=1)this.linkedGraphs.push(arguments[t])},g.prototype.updateAxes=function(){var t=this.canvas;t.select(".x.axis").call(this.meta.xAxis),t.select(".y.axis").call(this.meta.yAxis),t.selectAll(".axis path, .axis line").attr("fill","none").attr("stroke","black").attr("shape-rendering","crispedges").attr("opacity",.1)},g.prototype.syncOptions=function(){this.options.xAxis.domain=this.meta.xScale.domain(),this.options.yAxis.domain=this.meta.yScale.domain()},g.prototype.programmaticZoom=function(t,e){var n=this;o.transition().duration(750).tween("zoom",function(){var r=o.interpolate(v.domain(),t),i=o.interpolate(m.domain(),e);return function(t){d.x(v.domain(r(t))).y(m.domain(i(t))),n.draw()}}).each("end",function(){n.emit("programmatic-zoom")})},g.prototype.getFontSize=function(){return Math.max(Math.max(e,n)/50,8)},g.prototype.draw=function(){var t=this;t.emit("before:draw"),t.syncOptions(),t.updateAxes(),t.buildContent(),t.emit("after:draw")},g.prototype.setUpEventListeners=function(){var t=this,e={mousemove:function(e){t.tip.move(e)},mouseover:function(){t.tip.show()},mouseout:function(){t.tip.hide()},zoom:function(t,e){d.translate(t).scale(e)},"tip:update":function(e,n,i){var o=t.root.datum().data[i],s=o.title||"",a=o.renderer||function(t,e){return t.toFixed(3)+", "+e.toFixed(3)},u=[];s&&u.push(s),u.push(a(e,n)),t.root.select(".top-right-legend").attr("fill",r.COLORS[i]).text(u.join(" "))}},n={mousemove:function(){var e=o.mouse(t.root.select("rect.zoom-and-drag").node()),n={x:v.invert(e[0]),y:m.invert(e[1])};t.linkedGraphs.forEach(function(t){t.emit("before:mousemove",n),t.emit("mousemove",n)})},zoom:function(e,n){t.linkedGraphs.forEach(function(t,r){t.emit("zoom",e,n),t.draw()}),t.emit("all:mousemove")}};Object.keys(e).forEach(function(r){t.on(r,e[r]),!n[r]&&t.on("all:"+r,function(){var e=Array.prototype.slice.call(arguments);t.linkedGraphs.forEach(function(t){var n=e.slice();n.unshift(r),t.emit.apply(t,n)})})}),Object.keys(n).forEach(function(e){t.on("all:"+e,n[e])})};var x=f[t.id];return x||(x=new g),x.build()},r=e.exports.globals=t("./globals"),i=e.exports.graphTypes=t("./graph-types/"),e.exports.plugins=t("./plugins/"),e.exports.eval=t("./helpers/eval")},{"./datum-defaults":2,"./globals":4,"./graph-types/":5,"./helpers/":12,"./helpers/annotations":9,"./helpers/eval":11,"./plugins/":16,"./polyfills":18,"./tip":21,events:31,extend:32}],15:[function(t,e,n){var r=window.d3,i=t("extend"),o=t("key-pressed"),s=t("keydown"),a=t("integrate-adaptive-simpson");e.exports=function(t){t=i({key:"<shift>",toggle:!1},t);var e,n=r.svg.brush(),u=s(t.key),l=!1;function c(i){var s;e=i,n.x(i.meta.xScale).on("brushstart",function(){r.event.sourceEvent&&(s=!!i.options.disableZoom,i.options.disableZoom=!0,i.emit("draw"))}).on("brushend",function(){if(r.event.sourceEvent){if(i.options.disableZoom=s,!n.empty()){var e=n.extent()[0],o=n.extent()[1];i.options.data.forEach(function(n,r){var s,u=a((s=n,function(t){return window.functionPlot.eval.builtIn(s,"fn",{x:t})}),e,o,t.tol,t.maxdepth);i.emit("definite-integral",n,r,u,e,o)})}i.draw()}});var l=i.canvas.append("g").attr("class","brush definite-integral");l.call(n).call(n.event),i.canvas.selectAll(".brush .extent").attr("stroke","#fff").attr("fill-opacity",.125).attr("shape-rendering","crispEdges"),l.selectAll("rect").attr("height",i.meta.height),i.canvas.on("mousemove.definiteIntegral",function(){t.toggle||c.visible(o(t.key))}),u.on("pressed",function(){c.visible(!t.toggle||!c.visible())}),c.visible(!1)}return c.visible=function(t){return arguments.length?(l=t,n=t,e.canvas.selectAll(".definite-integral").style("display",n?null:"none"),c):l;var n},c}},{extend:32,"integrate-adaptive-simpson":35,"key-pressed":54,keydown:55}],16:[function(t,e,n){e.exports={zoomBox:t("./zoom-box"),definiteIntegral:t("./definite-integral")}},{"./definite-integral":15,"./zoom-box":17}],17:[function(t,e,n){var r=window.d3,i=t("extend"),o=t("key-pressed"),s=t("keydown");e.exports=function(t){t=i({key:"<shift>",toggle:!1},t);var e,n=r.svg.brush(),a=s(t.key),u=!1;function l(i){var s;e=i,n.x(i.meta.xScale).y(i.meta.yScale).on("brushstart",function(){r.event.sourceEvent&&(s=!!i.options.disableZoom,i.options.disableZoom=!0,i.draw())}).on("brushend",function(){if(r.event.sourceEvent){if(i.options.disableZoom=s,!n.empty()){var t=n.extent()[0],e=n.extent()[1],o=[t[0],e[0]],a=[t[1],e[1]];i.programmaticZoom(o,a)}r.select(this).transition().duration(1).call(n.clear()).call(n.event)}}),i.canvas.append("g").attr("class","brush zoom-box").call(n).call(n.event),i.canvas.selectAll(".brush .extent").attr("stroke","#fff").attr("fill-opacity",.125).attr("shape-rendering","crispEdges"),i.canvas.on("mousemove.zoombox",function(){t.toggle||l.visible(o(t.key))}),a.on("pressed",function(){l.visible(!t.toggle||!l.visible())}),l.visible(!1)}return l.visible=function(t){return arguments.length?(u=t,n=t,e.canvas.selectAll(".zoom-box").style("display",n?null:"none"),l):u;var n},l}},{extend:32,"key-pressed":54,keydown:55}],18:[function(t,e,n){!function(t,e){try{t.querySelector(":scope body")}catch(n){["querySelector","querySelectorAll"].forEach(function(n){var r=e[n];e[n]=function(e){if(/(^|,)\s*:scope/.test(e)){var i=this.id;this.id="ID_"+Date.now(),e=e.replace(/((^|,)\s*):scope/g,"$1#"+this.id);var o=t[n](e);return this.id=i,o}return r.call(this,e)}})}}(window.document,Element.prototype)},{}],19:[function(t,e,n){"use strict";var r=t("clamp"),i=t("linspace"),o=t("../utils"),s=t("../helpers/eval").builtIn;function a(t,e,n,r,u){if(!u)return{asymptote:!0,d0:t,d1:e};var l,c,h,f=t[0],p=e[0],d=i(f,p,10);for(l=0;l<10;l+=1){var v=d[l],m=s(n,"fn",{x:v});if(l){var y=m-c;if(o.sgn(y)===r)return a([h,c],[v,m],n,r,u-1)}c=m,h=v}return{asymptote:!1,d0:t,d1:e}}function u(t,e,n,i){var u,l=o.space(t,n,i),c=t.meta.yScale.domain(),h=c[1]-c[0],f=c[0]-1e5*h,p=c[1]+1e5*h,d=[];for(u=0;u<l.length;u+=1){var v=l[u],m=s(e,"fn",{x:v});o.isValidNumber(v)&&o.isValidNumber(m)&&d.push([v,r(m,f,p)])}return d=function(t,e,n){var r,i,s,u=[],l=[],c=t.meta.yScale.domain(),h=t.meta.zoomBehavior.scale(),f=c[0],p=c[1];function d(t){return t[1]=Math.min(t[1],p),t[1]=Math.max(t[1],f),t}for(n[0]&&(u.push(n[0]),s=n[1][0]-n[0][0],i=o.sgn(n[1][1]-n[0][1])),r=1;r<n.length;){var v=n[r-1][1],m=n[r][1]-v,y=o.sgn(m);if(i!==y&&Math.abs(m/s)>1/h){var g=a(n[r-1],n[r],e,y,3);g.asymptote&&(u.push(d(g.d0)),l.push(u),u=[d(g.d1)])}i=y,u.push(n[r]),++r}return u.length&&l.push(u),l}(t,e,d)}function l(t,e,n,r){for(var i=e.range||[0,2*Math.PI],a=o.space(t,i,r),u=[],l=0;l<a.length;l+=1){var c=a[l],h=s(e,"x",{t:c}),f=s(e,"y",{t:c});u.push([h,f])}return[u]}function c(t,e,n,r){for(var i=e.range||[-Math.PI,Math.PI],a=o.space(t,i,r),u=[],l=0;l<a.length;l+=1){var c=a[l],h=s(e,"r",{theta:c}),f=h*Math.cos(c),p=h*Math.sin(c);u.push([f,p])}return[u]}function h(t,e,n,r){return[e.points]}function f(t,e,n,r){return e.offset=e.offset||[0,0],[[e.offset,[e.vector[0]+e.offset[0],e.vector[1]+e.offset[1]]]]}e.exports=function(t,e,n,r){var i={parametric:l,polar:c,points:h,vector:f,linear:u};if(!(e.fnType in i))throw Error(e.fnType+" is not supported in the `builtIn` sampler");return i[e.fnType].apply(null,arguments)}},{"../helpers/eval":11,"../utils":22,clamp:29,linspace:56}],20:[function(t,e,n){"use strict";var r,i=t("interval-arithmetic-eval"),o=i.Interval,s=t("../helpers/eval").interval,a=t("../utils");function u(t,e,n,r){var i,u=a.space(t,n,r),l=t.meta.xScale,c=t.meta.yScale,h=c.domain()[0],f=c.domain()[1],p=[];for(i=0;i<u.length-1;i+=1){var d={lo:u[i],hi:u[i+1]},v=s(e,"fn",{x:d});o.isEmpty(v)||o.isWhole(v)||p.push([d,v]),o.isWhole(v)&&p.push(null)}for(i=1;i<p.length-1;i+=1)if(!p[i]){var m=p[i-1],y=p[i+1];m&&y&&!o.intervalsOverlap(m[1],y[1])&&(m[1].lo>y[1].hi&&(m[1].hi=Math.max(f,m[1].hi),y[1].lo=Math.min(h,y[1].lo)),m[1].hi<y[1].lo&&(m[1].lo=Math.min(h,m[1].lo),y[1].hi=Math.max(f,y[1].hi)))}return p.scaledDx=l(u[1])-l(u[0]),[p]}function l(t,e,n){var i,a=s(n,"fn",{x:t,y:e});if(!o.zeroIn(a))return this;if(i=t,o.width(i)<r)return this.push([t,e]),this;var u=t.lo+(t.hi-t.lo)/2,c=e.lo+(e.hi-e.lo)/2,h={lo:u,hi:t.hi},f={lo:t.lo,hi:u},p={lo:c,hi:e.hi},d={lo:e.lo,hi:c};l.call(this,h,p,n),l.call(this,h,d,n),l.call(this,f,p,n),l.call(this,f,d,n)}function c(t,e){var n=t.meta.xScale,i=t.meta.xScale.domain(),o=t.meta.yScale.domain(),s={lo:i[0],hi:i[1]},a={lo:o[0],hi:o[1]},u=[];return r=n.invert(1)-n.invert(0),l.call(u,s,a,e),u.scaledDx=1,[u]}i.policies.disableRounding();e.exports=function(t,e,n,r){var i={implicit:c,linear:u};if(!i.hasOwnProperty(e.fnType))throw Error(e.fnType+" is not supported in the `interval` sampler");return i[e.fnType].apply(null,arguments)}},{"../helpers/eval":11,"../utils":22,"interval-arithmetic-eval":36}],21:[function(t,e,n){"use strict";var r=window.d3,i=t("extend"),o=t("./utils"),s=t("clamp"),a=t("./globals"),u=t("./helpers/eval").builtIn;e.exports=function(t){t=i({xLine:!1,yLine:!1,renderer:function(t,e,n){return"("+t.toFixed(3)+", "+e.toFixed(3)+")"},owner:null},t);var e=20,n=r.svg.line().x(function(t){return t[0]}).y(function(t){return t[1]});function l(t,e){return t.append("path").datum(e).attr("stroke","grey").attr("stroke-dasharray","5,5").attr("opacity",.5).attr("d",n)}function c(n){var i=n.selectAll("g.tip").data(function(t){return[t]});i.enter().append("g").attr("class","tip").attr("clip-path","url(#function-plot-clip-"+t.owner.id+")"),c.el=i.selectAll("g.inner-tip").data(function(t){return[t]}),c.el.enter().append("g").attr("class","inner-tip").style("display","none").each(function(){var n=r.select(this);l(n,[[0,-t.owner.meta.height-e],[0,t.owner.meta.height+e]]).attr("class","tip-x-line").style("display","none"),l(n,[[-t.owner.meta.width-e,0],[t.owner.meta.width+e,0]]).attr("class","tip-y-line").style("display","none"),n.append("circle").attr("r",3),n.append("text").attr("transform","translate(5,-5)")}),n.selectAll(".tip-x-line").style("display",t.xLine?null:"none"),n.selectAll(".tip-y-line").style("display",t.yLine?null:"none")}return c.move=function(n){var r,i,l,h=1/0,f=-1,p=c.el,d=t.owner.meta,v=p.data()[0].data,m=d.xScale,y=d.yScale,g=d.width,x=d.height,w=n.x,b=n.y;for(r=0;r<v.length;r+=1)if(!v[r].skipTip&&"linear"===v[r].fnType){var E=v[r].range||[-1e8,1e8];if(w>E[0]-a.TIP_X_EPS&&w<E[1]+a.TIP_X_EPS){try{var A=u(v[r],"fn",{x:w})}catch(t){}if(o.isValidNumber(A)){var T=Math.abs(A-b);T<h&&(h=T,f=r)}}}if(-1!==f){i=w,v[f].range&&(i=Math.max(i,v[f].range[0]),i=Math.min(i,v[f].range[1])),l=u(v[f],"fn",{x:i}),c.show(),t.owner.emit("tip:update",i,l,f);var N=s(i,m.invert(-e),m.invert(g+e)),_=s(l,y.invert(x+e),y.invert(-e)),I=o.color(v[f],f);p.attr("transform","translate("+m(N)+","+y(_)+")"),p.select("circle").attr("fill",I),p.select("text").attr("fill",I).text(t.renderer(i,l,f))}else c.hide()},c.show=function(){this.el.style("display",null)},c.hide=function(){this.el.style("display","none")},Object.keys(t).forEach(function(e){o.getterSetter.call(c,t,e)}),c}},{"./globals":4,"./helpers/eval":11,"./utils":22,clamp:29,extend:32}],22:[function(t,e,n){"use strict";var r=t("linspace"),i=t("logspace"),o=t("log10"),s=t("./globals");e.exports={isValidNumber:function(t){return"number"==typeof t&&!isNaN(t)},space:function(t,e,n){var s=e[0],a=e[1];return"log"===t.options.xAxis.type?i(o(s),o(a),n):r(s,a,n)},getterSetter:function(t,e){var n=this;this[e]=function(r){return arguments.length?(t[e]=r,n):t[e]}},sgn:function(t){return t<0?-1:t>0?1:0},color:function(t,e){return t.color||s.COLORS[e]}}},{"./globals":4,linspace:56,log10:57,logspace:58}],23:[function(t,e,n){"use strict";n.byteLength=function(t){return 3*t.length/4-l(t)},n.toByteArray=function(t){var e,n,r,s,a,u,c=t.length;a=l(t),u=new o(3*c/4-a),r=a>0?c-4:c;var h=0;for(e=0,n=0;e<r;e+=4,n+=3)s=i[t.charCodeAt(e)]<<18|i[t.charCodeAt(e+1)]<<12|i[t.charCodeAt(e+2)]<<6|i[t.charCodeAt(e+3)],u[h++]=s>>16&255,u[h++]=s>>8&255,u[h++]=255&s;2===a?(s=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,u[h++]=255&s):1===a&&(s=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,u[h++]=s>>8&255,u[h++]=255&s);return u},n.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o="",s=[],a=0,u=n-i;a<u;a+=16383)s.push(c(t,a,a+16383>u?u:a+16383));1===i?(e=t[n-1],o+=r[e>>2],o+=r[e<<4&63],o+="=="):2===i&&(e=(t[n-2]<<8)+t[n-1],o+=r[e>>10],o+=r[e>>4&63],o+=r[e<<2&63],o+="=");return s.push(o),s.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function c(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16)+(t[a+1]<<8)+t[a+2],s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],24:[function(t,e,n){(function(e){"use strict";var r=t("base64-js"),i=t("ieee754"),o=t("isarray");function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return l(this,t,e,n)}function l(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|p(e.length);return 0===(t=a(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?a(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(c(e),t=a(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|p(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return C(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(r)return C(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function m(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=n;o<a;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(l(t,o+f)!==l(e,f)){h=!1;break}if(h)return o}return-1}function g(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function x(t,e,n,r){return U(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function b(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,l=t[i],c=null,h=l>239?4:l>223?3:l>191?2:1;if(i+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(t){var e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=E));return n}(r)}n.Buffer=u,n.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},n.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),n.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return l(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return r=null,o=e,s=n,c(i=t),i<=0?a(r,i):void 0!==o?"string"==typeof s?a(r,i).fill(o,s):a(r,i).fill(o):a(r,i);var r,i,o,s},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?b(this,0,t):function(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,n);case"utf8":case"utf-8":return b(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return w(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,s=n-e,a=Math.min(o,s),l=this.slice(r,i),c=t.slice(e,n),h=0;h<a;++h)if(l[h]!==c[h]){o=l[h],s=c[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return m(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return m(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o,s,a,u,l,c,h,f,p,d=!1;;)switch(r){case"hex":return g(this,t,e,n);case"utf8":case"utf-8":return f=e,p=n,U(C(t,(h=this).length-f),h,f,p);case"ascii":return x(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return u=this,l=e,c=n,U(Y(t),u,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=e,a=n,U(function(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,(o=this).length-s),o,s,a);default:if(d)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),d=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function A(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function N(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=H(t[o]);return i}function _(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function I(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function M(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function k(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function P(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(t,e,n,r,o){return o||P(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function S(t,e,n,r,o){return o||P(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if(t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||L(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||L(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):k(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):k(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return O(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return O(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return S(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return S(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=u.isBuffer(t)?t:C(new u(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var R=/[^+\/0-9A-Za-z-_]/g;function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function C(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(t){return r.toByteArray(function(t){var e;if((t=(e=t,e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")).replace(R,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":23,ieee754:33,isarray:25}],25:[function(t,e,n){var r={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},{}],26:[function(t,e,n){"use strict";e.exports=t("./lib/eval")},{"./lib/eval":28}],27:[function(t,e,n){"use strict";e.exports=function(){var t=Object.create(Math);return t.factory=function(t){if("number"!=typeof t)throw new TypeError("built-in math factory only accepts numbers");return Number(t)},t.add=function(t,e){return t+e},t.sub=function(t,e){return t-e},t.mul=function(t,e){return t*e},t.div=function(t,e){return t/e},t.mod=function(t,e){return t%e},t.factorial=function(t){for(var e=1,n=2;n<=t;n+=1)e*=n;return e},t.nthRoot=function(t,e){var n=e<0;if(n&&(e=-e),0===e)throw new Error("Root must be non-zero");if(t<0&&Math.abs(e)%2!=1)throw new Error("Root must be odd when a is negative.");if(0===t)return 0;if(!isFinite(t))return n?0:t;var r=Math.pow(Math.abs(t),1/e);return r=t<0?-r:r,n?1/r:r},t.logicalOR=function(t,e){return t||e},t.logicalXOR=function(t,e){return t!=e},t.logicalAND=function(t,e){return t&&e},t.bitwiseOR=function(t,e){return t|e},t.bitwiseXOR=function(t,e){return t^e},t.bitwiseAND=function(t,e){return t&e},t.lessThan=function(t,e){return t<e},t.lessEqualThan=function(t,e){return t<=e},t.greaterThan=function(t,e){return t>e},t.greaterEqualThan=function(t,e){return t>=e},t.equal=function(t,e){return t==e},t.strictlyEqual=function(t,e){return t===e},t.notEqual=function(t,e){return t!=e},t.strictlyNotEqual=function(t,e){return t!==e},t.shiftRight=function(t,e){return t>>e},t.shiftLeft=function(t,e){return t<<e},t.unsignedRightShift=function(t,e){return t>>>e},t.negative=function(t){return-t},t.positive=function(t){return t},t}},{}],28:[function(t,e,n){"use strict";var r=t("math-codegen"),i=t("./adapter")();function o(t){Object.keys(t).forEach(function(e){var n=t[e];t[e]=i.factory(n)})}e.exports=function(t){return(new r).setDefs({$$processScope:o}).parse(t).compile(i)},e.exports.math=i},{"./adapter":27,"math-codegen":59}],29:[function(t,e,n){e.exports=function(t,e,n){return e<n?t<e?e:t>n?n:t:t<n?n:t>e?e:t}},{}],30:[function(t,e,n){(function(t){var n=!1;if("undefined"!=typeof Float64Array){var r=new Float64Array(1),i=new Uint32Array(r.buffer);if(r[0]=1,n=!0,1072693248===i[1]){e.exports=function(t){return r[0]=t,[i[0],i[1]]},e.exports.pack=function(t,e){return i[0]=t,i[1]=e,r[0]},e.exports.lo=function(t){return r[0]=t,i[0]},e.exports.hi=function(t){return r[0]=t,i[1]}}else if(1072693248===i[0]){e.exports=function(t){return r[0]=t,[i[1],i[0]]},e.exports.pack=function(t,e){return i[1]=t,i[0]=e,r[0]},e.exports.lo=function(t){return r[0]=t,i[1]},e.exports.hi=function(t){return r[0]=t,i[0]}}else n=!1}if(!n){var o=new t(8);e.exports=function(t){return o.writeDoubleLE(t,0,!0),[o.readUInt32LE(0,!0),o.readUInt32LE(4,!0)]},e.exports.pack=function(t,e){return o.writeUInt32LE(t,0,!0),o.writeUInt32LE(e,4,!0),o.readDoubleLE(0,!0)},e.exports.lo=function(t){return o.writeDoubleLE(t,0,!0),o.readUInt32LE(0,!0)},e.exports.hi=function(t){return o.writeDoubleLE(t,0,!0),o.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var n=e.exports.lo(t),r=e.exports.hi(t),i=1048575&r;return 2146435072&r&&(i+=1<<20),[n,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this,t("buffer").Buffer)},{buffer:24}],31:[function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,a,u,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(s(n=this._events[t]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),r=(l=n.slice()).length,u=0;u<r;u++)l[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!i(e))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var n,r,s,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(n=this._events[t]).length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},{}],32:[function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===i.call(t)},s=function(t){if(!t||"[object Object]"!==i.call(t))return!1;var e,n=r.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&r.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;for(e in t);return void 0===e||r.call(t,e)};e.exports=function t(){var e,n,r,i,a,u,l=arguments[0],c=1,h=arguments.length,f=!1;for("boolean"==typeof l?(f=l,l=arguments[1]||{},c=2):("object"!=typeof l&&"function"!=typeof l||null==l)&&(l={});c<h;++c)if(null!=(e=arguments[c]))for(n in e)r=l[n],l!==(i=e[n])&&(f&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},l[n]=t(f,u,i)):void 0!==i&&(l[n]=i));return l}},{}],33:[function(t,e,n){n.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,l=u>>1,c=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+t[e+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=l}return(p?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,e,n,r,i,o){var s,a,u,l=8*o-i-1,c=(1<<l)-1,h=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;t[n+p]=255&s,p+=d,s/=256,l-=8);t[n+p-d]|=128*v}},{}],34:[function(t,e,n){e.exports=function(){var t=0,e=0,n=1,r=[];switch(arguments.length){case 1:e=arguments[0];break;case 3:n=arguments[2];case 2:t=arguments[0],e=arguments[1]}for(i=t;i<e;i+=n)r.push(i);return r}},{}],35:[function(t,e,n){"use strict";e.exports=function(t,e,n,r,i){var o={maxDepthCount:0,nanEncountered:!1};void 0===r&&(r=1e-8);void 0===i&&(i=20);var s=t(e),a=t(.5*(e+n)),u=t(n),l=function t(e,n,r,i,o,s,a,u,l,c,h){if(h.nanEncountered)return NaN;var f,p,d,v,m,y,g,x,w,b;f=r-n;p=e(n+.25*f);d=e(r-.25*f);if(isNaN(p))return void(h.nanEncountered=!0);if(isNaN(d))return void(h.nanEncountered=!0);v=f*(i+4*p+o)/12;m=f*(o+4*d+s)/12;y=v+m;b=(y-a)/15;return c>l?(h.maxDepthCount++,y+b):Math.abs(b)<u?y+b:(x=t(e,n,g=n+.5*f,i,p,o,v,.5*u,l,c+1,h),isNaN(x)?(h.nanEncountered=!0,NaN):(w=t(e,g,r,o,d,s,m,.5*u,l,c+1,h),isNaN(w)?(h.nanEncountered=!0,NaN):x+w))}(t,e,n,s,a,u,(s+4*a+u)*(n-e)/6,r,i,1,o);o.maxDepthCount>0&&console&&console.warn&&console.warn("integrate-adaptive-simpson: Warning: maximum recursion depth ("+i+") reached "+o.maxDepthCount+" times");o.nanEncountered&&console&&console.warn&&console.warn("integrate-adaptive-simpson: Warning: NaN encountered. Halting early.");return l}},{}],36:[function(t,e,n){"use strict";e.exports=t("./lib/eval")},{"./lib/eval":38}],37:[function(t,e,n){"use strict";e.exports=function(t){t.mod=t.fmod,t.lessThan=t.lt,t.lessEqualThan=t.leq,t.greaterThan=t.gt,t.greaterEqualThan=t.geq,t.strictlyEqual=t.equal,t.strictlyNotEqual=t.notEqual,t.logicalAND=function(t,e){return t&&e},t.logicalXOR=function(t,e){return t^e},t.logicalOR=function(t,e){return t||e}}},{}],38:[function(t,e,n){"use strict";var r=t("math-codegen"),i=t("interval-arithmetic");function o(t){Object.keys(t).forEach(function(e){var n=t[e];"number"==typeof n||Array.isArray(n)?t[e]=i.factory(n):"object"==typeof n&&"lo"in n&&"hi"in n&&(t[e]=i.factory(n.lo,n.hi))})}t("./adapter")(i),e.exports=function(t){return(new r).setDefs({$$processScope:o}).parse(t).compile(i)},e.exports.policies=t("./policies")(i),e.exports.Interval=i},{"./adapter":37,"./policies":39,"interval-arithmetic":40,"math-codegen":59}],39:[function(t,e,n){"use strict";e.exports=function(t){return{disableRounding:function(){t.rmath.disable()},enableRounding:function(){t.rmath.enable()}}}},{}],40:[function(t,e,n){"use strict";var r=t("xtend/mutable");t("./lib/polyfill"),e.exports=t("./lib/interval"),e.exports.rmath=t("./lib/round-math"),e.exports.round=t("./lib/round-math"),r(e.exports,t("./lib/constants"),t("./lib/operations/relational"),t("./lib/operations/arithmetic"),t("./lib/operations/algebra"),t("./lib/operations/trigonometric"),t("./lib/operations/misc"),t("./lib/operations/utils"))},{"./lib/constants":41,"./lib/interval":42,"./lib/operations/algebra":43,"./lib/operations/arithmetic":44,"./lib/operations/misc":46,"./lib/operations/relational":47,"./lib/operations/trigonometric":48,"./lib/operations/utils":49,"./lib/polyfill":50,"./lib/round-math":51,"xtend/mutable":91}],41:[function(t,e,n){"use strict";var r=t("./interval"),i=3.141592653589793,o=3.1415926535897936,s={};function a(t,e){Object.defineProperty(s,t,{get:function(){return e()},enumerable:!0})}t("xtend/mutable")(s,{PI_LOW:i,PI_HIGH:o,PI_HALF_LOW:i/2,PI_HALF_HIGH:o/2,PI_TWICE_LOW:2*i,PI_TWICE_HIGH:2*o}),a("PI",function(){return r(i,o)}),a("PI_HALF",function(){return r(s.PI_HALF_LOW,s.PI_HALF_HIGH)}),a("PI_TWICE",function(){return r(s.PI_TWICE_LOW,s.PI_TWICE_HIGH)}),a("ZERO",function(){return r(0)}),a("ONE",function(){return r(1)}),a("WHOLE",function(){return r().setWhole()}),a("EMPTY",function(){return r().setEmpty()}),e.exports=s},{"./interval":42,"xtend/mutable":91}],42:[function(t,e,n){"use strict";var r=t("./operations/utils"),i=t("./round-math");function o(t,e){if(!(this instanceof o))return new o(t,e);if(void 0!==t&&void 0!==e){if(r.isInterval(t)){if(!r.isSingleton(t))throw new TypeError("Interval: interval `lo` must be a singleton");t=t.lo}if(r.isInterval(e)){if(!r.isSingleton(e))throw TypeError("Interval: interval `hi` must be a singleton");e=e.hi}}else{if(void 0!==t)return Array.isArray(t)?o(t[0],t[1]):o(t,t);t=e=0}this.lo=void 0,this.hi=void 0,this.assign(t,e)}e.exports=o,o.factory=o,o.prototype.singleton=function(t){return this.set(t,t)},o.prototype.bounded=function(t,e){return this.set(i.prev(t),i.next(e))},o.prototype.boundedSingleton=function(t){return this.bounded(t,t)},o.prototype.set=function(t,e){return this.lo=t,this.hi=e,this},o.prototype.assign=function(t,e){if("number"!=typeof t||"number"!=typeof e)throw TypeError("Interval#assign: arguments must be numbers");return isNaN(t)||isNaN(e)||t>e?this.setEmpty():this.set(t,e)},o.prototype.setEmpty=function(){return this.set(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},o.prototype.setWhole=function(){return this.set(Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY)},o.prototype.open=function(t,e){return this.assign(i.safeNext(t),i.safePrev(e))},o.prototype.halfOpenLeft=function(t,e){return this.assign(i.safeNext(t),e)},o.prototype.halfOpenRight=function(t,e){return this.assign(t,i.safePrev(e))},o.prototype.toArray=function(){return[this.lo,this.hi]},o.prototype.clone=function(){return o().set(this.lo,this.hi)}},{"./operations/utils":49,"./round-math":51}],43:[function(t,e,n){"use strict";var r=t("is-safe-integer"),i=t("../interval"),o=t("../round-math"),s=t("./utils"),a=t("./arithmetic"),u=t("../constants"),l={fmod:function(t,e){if(s.isEmpty(t)||s.isEmpty(e))return u.EMPTY;var n=t.lo<0?e.lo:e.hi,r=o.intLo(o.divLo(t.lo,n));return a.sub(t,a.mul(e,i(r)))},multiplicativeInverse:function(t){return s.isEmpty(t)?u.EMPTY:s.zeroIn(t)?0!==t.lo?0!==t.hi?u.WHOLE:i(Number.NEGATIVE_INFINITY,o.divHi(1,t.lo)):0!==t.hi?i(o.divLo(1,t.hi),Number.POSITIVE_INFINITY):u.EMPTY:i(o.divLo(1,t.hi),o.divHi(1,t.lo))},pow:function(t,e){if(s.isEmpty(t))return u.EMPTY;if("object"==typeof e){if(!s.isSingleton(e))return u.EMPTY;e=e.lo}if(0===e)return 0===t.lo&&0===t.hi?u.EMPTY:u.ONE;if(e<0)return l.multiplicativeInverse(l.pow(t,-e));if(r(e)){if(t.hi<0){var n=o.powLo(-t.hi,e),a=o.powHi(-t.lo,e);return 1&e?i(-a,-n):i(n,a)}return t.lo<0?1&e?i(-o.powLo(-t.lo,e),o.powHi(t.hi,e)):i(0,o.powHi(Math.max(-t.lo,t.hi),e)):i(o.powLo(t.lo,e),o.powHi(t.hi,e))}return console.warn("power is not an integer, you should use nth-root instead, returning an empty interval"),u.EMPTY},sqrt:function(t){return l.nthRoot(t,2)},nthRoot:function(t,e){if(s.isEmpty(t)||e<0)return u.EMPTY;if("object"==typeof e){if(!s.isSingleton(e))return u.EMPTY;e=e.lo}var n=1/e;if(t.hi<0){if(1&r(e)&e){var a=o.powHi(-t.lo,n),l=o.powLo(-t.hi,n);return i(-a,-l)}return i.EMPTY}if(t.lo<0){var c=o.powHi(t.hi,n);if(1&r(e)&e){var h=-o.powHi(-t.lo,n);return i(h,c)}return i(0,c)}return i(o.powLo(t.lo,n),o.powHi(t.hi,n))}};e.exports=l},{"../constants":41,"../interval":42,"../round-math":51,"./arithmetic":44,"./utils":49,"is-safe-integer":53}],44:[function(t,e,n){"use strict";var r=t("../interval"),i=t("../round-math"),o=t("./utils"),s=t("../constants"),a=t("./division"),u={add:function(t,e){return r(i.addLo(t.lo,e.lo),i.addHi(t.hi,e.hi))},subtract:function(t,e){return r(i.subLo(t.lo,e.hi),i.subHi(t.hi,e.lo))}};u.sub=u.subtract,u.multiply=function(t,e){if(o.isEmpty(t)||o.isEmpty(e))return s.EMPTY;var n=t.lo,a=t.hi,u=e.lo,l=e.hi,c=r();return n<0?a>0?u<0?l>0?(c.lo=Math.min(i.mulLo(n,l),i.mulLo(a,u)),c.hi=Math.max(i.mulHi(n,u),i.mulHi(a,l))):(c.lo=i.mulLo(a,u),c.hi=i.mulHi(n,u)):l>0?(c.lo=i.mulLo(n,l),c.hi=i.mulHi(a,l)):(c.lo=0,c.hi=0):u<0?l>0?(c.lo=i.mulLo(n,l),c.hi=i.mulHi(n,u)):(c.lo=i.mulLo(a,l),c.hi=i.mulHi(n,u)):l>0?(c.lo=i.mulLo(n,l),c.hi=i.mulHi(a,u)):(c.lo=0,c.hi=0):a>0?u<0?l>0?(c.lo=i.mulLo(a,u),c.hi=i.mulHi(a,l)):(c.lo=i.mulLo(a,u),c.hi=i.mulHi(n,l)):l>0?(c.lo=i.mulLo(n,u),c.hi=i.mulHi(a,l)):(c.lo=0,c.hi=0):(c.lo=0,c.hi=0),c},u.mul=u.multiply,u.divide=function(t,e){return o.isEmpty(t)||o.isEmpty(e)?s.EMPTY:o.zeroIn(e)?0!==e.lo?0!==e.hi?a.zero(t):a.negative(t,e.lo):0!==e.hi?a.positive(t,e.hi):s.EMPTY:a.nonZero(t,e)},u.div=u.divide,u.positive=function(t){return r(t.lo,t.hi)},u.negative=function(t){return r(-t.hi,-t.lo)},e.exports=u},{"../constants":41,"../interval":42,"../round-math":51,"./division":45,"./utils":49}],45:[function(t,e,n){"use strict";var r=t("../interval"),i=t("../round-math"),o=t("./utils"),s=t("../constants"),a={nonZero:function(t,e){var n=t.lo,o=t.hi,s=e.lo,a=e.hi,u=r();return o<0?a<0?(u.lo=i.divLo(o,s),u.hi=i.divHi(n,a)):(u.lo=i.divLo(n,s),u.hi=i.divHi(o,a)):n<0?a<0?(u.lo=i.divLo(o,a),u.hi=i.divHi(n,a)):(u.lo=i.divLo(n,s),u.hi=i.divHi(o,s)):a<0?(u.lo=i.divLo(o,a),u.hi=i.divHi(n,s)):(u.lo=i.divLo(n,a),u.hi=i.divHi(o,s)),u},positive:function(t,e){return 0===t.lo&&0===t.hi?t:o.zeroIn(t)?s.WHOLE:t.hi<0?r(Number.NEGATIVE_INFINITY,i.divHi(t.hi,e)):r(i.divLo(t.lo,e),Number.POSITIVE_INFINITY)},negative:function(t,e){return 0===t.lo&&0===t.hi?t:o.zeroIn(t)?s.WHOLE:t.hi<0?r(i.divLo(t.hi,e),Number.POSITIVE_INFINITY):r(Number.NEGATIVE_INFINITY,i.divHi(t.lo,e))},zero:function(t){return 0===t.lo&&0===t.hi?t:s.WHOLE}};e.exports=a},{"../constants":41,"../interval":42,"../round-math":51,"./utils":49}],46:[function(t,e,n){"use strict";var r=t("../constants"),i=t("../interval"),o=t("../round-math"),s=t("./utils"),a=t("./arithmetic"),u={exp:function(t){return s.isEmpty(t)?r.EMPTY:i(o.expLo(t.lo),o.expHi(t.hi))},log:function(t){if(s.isEmpty(t))return r.EMPTY;var e=t.lo<=0?Number.NEGATIVE_INFINITY:o.logLo(t.lo);return i(e,o.logHi(t.hi))}};u.ln=u.log,u.LOG_EXP_10=u.log(i(10,10)),u.log10=function(t){return s.isEmpty(t)?r.EMPTY:a.div(u.log(t),u.LOG_EXP_10)},u.LOG_EXP_2=u.log(i(2,2)),u.log2=function(t){return s.isEmpty(t)?r.EMPTY:a.div(u.log(t),u.LOG_EXP_2)},u.hull=function(t,e){var n=s.isEmpty(t),o=s.isEmpty(e);return n&&o?r.EMPTY:n?e.clone():o?t.clone():i(Math.min(t.lo,e.lo),Math.max(t.hi,e.hi))},u.intersection=function(t,e){if(s.isEmpty(t)||s.isEmpty(e))return r.EMPTY;var n=Math.max(t.lo,e.lo),o=Math.min(t.hi,e.hi);return n<=o?i(n,o):r.EMPTY},u.union=function(t,e){if(!s.intervalsOverlap(t,e))throw Error("Interval#union: intervals do not overlap");return i(Math.min(t.lo,e.lo),Math.max(t.hi,e.hi))},u.difference=function(t,e){if(s.isEmpty(t)||s.isWhole(e))return r.EMPTY;if(s.intervalsOverlap(t,e)){if(t.lo<e.lo&&e.hi<t.hi)throw Error("Interval.difference: difference creates multiple intervals");return e.lo<=t.lo&&e.hi===1/0||e.hi>=t.hi&&e.lo===-1/0?r.EMPTY:e.lo<=t.lo?i().halfOpenLeft(e.hi,t.hi):i().halfOpenRight(t.lo,e.lo)}return i.clone(t)},u.width=function(t){return s.isEmpty(t)?0:o.subHi(t.hi,t.lo)},u.wid=u.width,u.abs=function(t){return s.isEmpty(t)?r.EMPTY:t.lo>=0?i.clone(t):t.hi<=0?a.negative(t):i(0,Math.max(-t.lo,t.hi))},u.max=function(t,e){var n=s.isEmpty(t),o=s.isEmpty(e);return n&&o?r.EMPTY:n?e.clone():o?t.clone():i(Math.max(t.lo,e.lo),Math.max(t.hi,e.hi))},u.min=function(t,e){var n=s.isEmpty(t),o=s.isEmpty(e);return n&&o?r.EMPTY:n?e.clone():o?t.clone():i(Math.min(t.lo,e.lo),Math.min(t.hi,e.hi))},u.clone=function(t){return i().set(t.lo,t.hi)},e.exports=u},{"../constants":41,"../interval":42,"../round-math":51,"./arithmetic":44,"./utils":49}],47:[function(t,e,n){"use strict";var r=t("./utils"),i={equal:function(t,e){return r.isEmpty(t)?r.isEmpty(e):!r.isEmpty(e)&&t.lo===e.lo&&t.hi===e.hi},almostEqual:function(t,e){var n=1e-7;function r(t,e){if(!t)throw new Error(e||"assertion failed")}function i(t,e){r(Math.abs(t-e)<n,"expected "+t+" to be close to "+e)}t=Array.isArray(t)?t:t.toArray(),e=Array.isArray(e)?e:e.toArray(),i(t[0],e[0]),i(t[1],e[1]),r(t[0]<=t[1],"interval must not be empty")},notEqual:function(t,e){return r.isEmpty(t)?!r.isEmpty(e):r.isEmpty(e)||t.hi<e.lo||t.lo>e.hi},lessThan:function(t,e){return!r.isEmpty(t)&&!r.isEmpty(e)&&t.hi<e.lo}};i.lt=i.lessThan,i.greaterThan=function(t,e){return!r.isEmpty(t)&&!r.isEmpty(e)&&t.lo>e.hi},i.gt=i.greaterThan,i.lessEqualThan=function(t,e){return!r.isEmpty(t)&&!r.isEmpty(e)&&t.hi<=e.lo},i.leq=i.lessEqualThan,i.greaterEqualThan=function(t,e){return!r.isEmpty(t)&&!r.isEmpty(e)&&t.lo>=e.hi},i.geq=i.greaterEqualThan,e.exports=i},{"./utils":49}],48:[function(t,e,n){"use strict";var r=t("../constants"),i=t("../interval"),o=t("../round-math"),s=t("./utils"),a=t("./misc"),u=t("./algebra"),l=t("./arithmetic"),c={};function h(t){return!isFinite(t.lo)&&t.lo===t.hi}function f(t){if(t.lo<0)if(t.lo===-1/0)t.lo=0,t.hi=1/0;else{var e=Math.ceil(-t.lo/r.PI_TWICE_LOW);t.lo+=r.PI_TWICE_LOW*e,t.hi+=r.PI_TWICE_LOW*e}return t}c.cos=function(t){var e,n;if(s.isEmpty(t)||h(t))return r.EMPTY;var p=i();p.set(t.lo,t.hi),f(p);var d=r.PI_TWICE,v=u.fmod(p,d);if(a.width(v)>=d.lo)return i(-1,1);if(v.lo>=r.PI_HIGH){var m=c.cos(l.sub(v,r.PI));return l.negative(m)}var y=v.lo,g=v.hi;return e=o.cosLo(g),n=o.cosHi(y),g<=r.PI_LOW?i(e,n):g<=d.lo?i(-1,Math.max(e,n)):i(-1,1)},c.sin=function(t){return s.isEmpty(t)||h(t)?r.EMPTY:c.cos(l.sub(t,r.PI_HALF))},c.tan=function(t){if(s.isEmpty(t)||h(t))return r.EMPTY;var e=i();e.set(t.lo,t.hi),f(e);var n=r.PI,a=u.fmod(e,n);return a.lo>=r.PI_HALF_LOW&&(a=l.sub(a,n)),a.lo<=-r.PI_HALF_LOW||a.hi>=r.PI_HALF_LOW?r.WHOLE:i(o.tanLo(a.lo),o.tanHi(a.hi))},c.asin=function(t){if(s.isEmpty(t)||t.hi<-1||t.lo>1)return r.EMPTY;var e=t.lo<=-1?-r.PI_HALF_HIGH:o.asinLo(t.lo),n=t.hi>=1?r.PI_HALF_HIGH:o.asinHi(t.hi);return i(e,n)},c.acos=function(t){if(s.isEmpty(t)||t.hi<-1||t.lo>1)return r.EMPTY;var e=t.hi>=1?0:o.acosLo(t.hi),n=t.lo<=-1?r.PI_HIGH:o.acosHi(t.lo);return i(e,n)},c.atan=function(t){return s.isEmpty(t)?r.EMPTY:i(o.atanLo(t.lo),o.atanHi(t.hi))},c.sinh=function(t){return s.isEmpty(t)?r.EMPTY:i(o.sinhLo(t.lo),o.sinhHi(t.hi))},c.cosh=function(t){return s.isEmpty(t)?r.EMPTY:t.hi<0?i(o.coshLo(t.hi),o.coshHi(t.lo)):t.lo>=0?i(o.coshLo(t.lo),o.coshHi(t.hi)):i(1,o.coshHi(-t.lo>t.hi?t.lo:t.hi))},c.tanh=function(t){return s.isEmpty(t)?r.EMPTY:i(o.tanhLo(t.lo),o.tanhHi(t.hi))},e.exports=c},{"../constants":41,"../interval":42,"../round-math":51,"./algebra":43,"./arithmetic":44,"./misc":46,"./utils":49}],49:[function(t,e,n){"use strict";var r={isInterval:function(t){return"object"==typeof t&&"number"==typeof t.lo&&"number"==typeof t.hi},isEmpty:function(t){return t.lo>t.hi},isWhole:function(t){return t.lo===-1/0&&t.hi===1/0},isSingleton:function(t){return t.lo===t.hi},zeroIn:function(t){return r.hasValue(t,0)},hasValue:function(t,e){return!r.isEmpty(t)&&(t.lo<=e&&e<=t.hi)},hasInterval:function(t,e){return!!r.isEmpty(t)||!r.isEmpty(e)&&e.lo<=t.lo&&t.hi<=e.hi},intervalsOverlap:function(t,e){return!r.isEmpty(t)&&!r.isEmpty(e)&&(t.lo<=e.lo&&e.lo<=t.hi||e.lo<=t.lo&&t.lo<=e.hi)}};e.exports=r},{}],50:[function(t,e,n){"use strict";Math.sinh=Math.sinh||function(t){var e=Math.exp(t);return(e-1/e)/2},Math.cosh=Math.cosh||function(t){var e=Math.exp(t);return(e+1/e)/2},Math.tanh=Math.tanh||function(t){if(t===Number.POSITIVE_INFINITY)return 1;if(t===Number.NEGATIVE_INFINITY)return-1;var e=Math.exp(2*t);return(e-1)/(e+1)}},{}],51:[function(t,e,n){"use strict";var r=t("nextafter");function i(t){return t}function o(t){return t===1/0?t:r(t,-1/0)}function s(t){return t===-1/0?t:r(t,1/0)}var a={safePrev:o,safeNext:s,prev:o,next:s};function u(t){return t<0?Math.ceil(t):Math.floor(t)}a.addLo=function(t,e){return this.prev(t+e)},a.addHi=function(t,e){return this.next(t+e)},a.subLo=function(t,e){return this.prev(t-e)},a.subHi=function(t,e){return this.next(t-e)},a.mulLo=function(t,e){return this.prev(t*e)},a.mulHi=function(t,e){return this.next(t*e)},a.divLo=function(t,e){return this.prev(t/e)},a.divHi=function(t,e){return this.next(t/e)},a.intLo=function(t){return u(this.prev(t))},a.intHi=function(t){return u(this.next(t))},a.logLo=function(t){return this.prev(Math.log(t))},a.logHi=function(t){return this.next(Math.log(t))},a.expLo=function(t){return this.prev(Math.exp(t))},a.expHi=function(t){return this.next(Math.exp(t))},a.sinLo=function(t){return this.prev(Math.sin(t))},a.sinHi=function(t){return this.next(Math.sin(t))},a.cosLo=function(t){return this.prev(Math.cos(t))},a.cosHi=function(t){return this.next(Math.cos(t))},a.tanLo=function(t){return this.prev(Math.tan(t))},a.tanHi=function(t){return this.next(Math.tan(t))},a.asinLo=function(t){return this.prev(Math.asin(t))},a.asinHi=function(t){return this.next(Math.asin(t))},a.acosLo=function(t){return this.prev(Math.acos(t))},a.acosHi=function(t){return this.next(Math.acos(t))},a.atanLo=function(t){return this.prev(Math.atan(t))},a.atanHi=function(t){return this.next(Math.atan(t))},a.sinhLo=function(t){return this.prev(Math.sinh(t))},a.sinhHi=function(t){return this.next(Math.sinh(t))},a.coshLo=function(t){return this.prev(Math.cosh(t))},a.coshHi=function(t){return this.next(Math.cosh(t))},a.tanhLo=function(t){return this.prev(Math.tanh(t))},a.tanhHi=function(t){return this.next(Math.tanh(t))},a.powLo=function(t,e){if(e%1!=0)return this.prev(Math.pow(t,e));var n=1&e?t:1;for(e>>=1;e>0;)t=a.mulLo(t,t),1&e&&(n=a.mulLo(t,n)),e>>=1;return n},a.powHi=function(t,e){if(e%1!=0)return this.next(Math.pow(t,e));var n=1&e?t:1;for(e>>=1;e>0;)t=a.mulHi(t,t),1&e&&(n=a.mulHi(t,n)),e>>=1;return n},a.sqrtLo=function(t){return this.prev(Math.sqrt(t))},a.sqrtHi=function(t){return this.next(Math.sqrt(t))},a.disable=function(){this.next=this.prev=i},a.enable=function(){this.next=s,this.prev=o},e.exports=a},{nextafter:88}],52:[function(t,e,n){"use strict";e.exports=function(t){return"object"==typeof t&&null!==t}},{}],53:[function(t,e,n){"use strict";var r=t("max-safe-integer");e.exports=Number.isSafeInteger||function(t){return"number"==typeof t&&t==t&&t!==1/0&&t!==-1/0&&parseInt(t,10)===t&&Math.abs(t)<=r}},{"max-safe-integer":72}],54:[function(t,e,n){(function(n){var r=t("vkey"),i=Object.keys(r),o={};function s(){i.forEach(function(t){o[r[t]]=!1})}s(),e.exports=function(t){return t?o[t]:o},n.browser&&(window.addEventListener("keydown",function(t){o[r[t.keyCode]]=!0},!1),window.addEventListener("keyup",function(t){o[r[t.keyCode]]=!1},!1),window.addEventListener("blur",s,!1))}).call(this,t("_process"))},{_process:89,vkey:90}],55:[function(t,e,n){var r=t("events").EventEmitter,i=t("vkey");e.exports=function(t,e){"string"==typeof t&&(t=[t]),e||(e=window);var n=new r;function o(){n.pressed={}}return n.pressed={},e.addEventListener("blur",o),e.addEventListener("focus",o),e.addEventListener("keydown",function(e){var r=i[e.keyCode];n.pressed[r]=!0;var s=!0;t.forEach(function(t){n.pressed[t]||(s=!1)}),s&&(n.emit("pressed",n.pressed),o())}),e.addEventListener("keyup",function(t){delete n.pressed[i[t.keyCode]]}),n}},{events:31,vkey:90}],56:[function(t,e,n){var r=t("integers");e.exports=function(t,e,n){var i=r(t,e,(e-t)/(n-1));return i.length==n?i:i.concat(e)}},{integers:34}],57:[function(t,e,n){"use strict";e.exports=Math.log10||function(t){return Math.log(t)*Math.LOG10E}},{}],58:[function(t,e,n){var r=t("linspace");e.exports=function(t,e,n){return r(t,e,n).map(function(t){return Math.pow(10,t)})}},{linspace:56}],59:[function(t,e,n){"use strict";e.exports=t("./lib/CodeGenerator")},{"./lib/CodeGenerator":60}],60:[function(t,e,n){"use strict";var r=t("mr-parser").Parser,i=t("./Interpreter"),o=t("extend");function s(t,e){this.statements=[],this.defs=e||{},this.interpreter=new i(this,t)}s.prototype.setDefs=function(t){return this.defs=o(this.defs,t),this},s.prototype.compile=function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("namespace must be an object");if("function"!=typeof t.factory)throw TypeError("namespace.factory must be a function");this.defs.ns=t,this.defs.$$mathCodegen={getProperty:function(t,e,n){if(t in e)return e[t];if(t in n)return n[t];throw SyntaxError('symbol "'+t+'" is undefined')},functionProxy:function(t,e){if("function"!=typeof t)throw SyntaxError('symbol "'+e+'" must be a function');return t}},this.defs.$$processScope=this.defs.$$processScope||function(){};var e=Object.keys(this.defs).map(function(t){return"var "+t+' = defs["'+t+'"]'});if(!this.statements.length)throw Error("there are no statements saved in this generator, make sure you parse an expression before compiling it");this.statements[this.statements.length-1]="return "+this.statements[this.statements.length-1];var n=this.statements.join(";"),r=e.join("\n")+"\n"+["return {"," eval: function (scope) {"," scope = scope || {}"," $$processScope(scope)"," "+n," },"," code: '"+n+"'","}"].join("\n");return new Function("defs",r)(this.defs)},s.prototype.parse=function(t){var e=this,n=(new r).parse(t);return this.statements=n.blocks.map(function(t){return e.interpreter.next(t)}),this},e.exports=s},{"./Interpreter":61,extend:32,"mr-parser":73}],61:[function(t,e,n){"use strict";var r=t("extend"),i={ArrayNode:t("./node/ArrayNode"),AssignmentNode:t("./node/AssignmentNode"),ConditionalNode:t("./node/ConditionalNode"),ConstantNode:t("./node/ConstantNode"),FunctionNode:t("./node/FunctionNode"),OperatorNode:t("./node/OperatorNode"),SymbolNode:t("./node/SymbolNode"),UnaryNode:t("./node/UnaryNode")},o=function(t,e){this.owner=t,this.options=r({factory:"ns.factory",raw:!1,rawArrayExpressionElements:!0,rawCallExpressionElements:!1},e)};r(o.prototype,i),o.prototype.next=function(t){if(!(t.type in this))throw new TypeError("the node type "+t.type+" is not implemented");return this[t.type](t)},o.prototype.rawify=function(t,e){var n=this.options.raw;t&&(this.options.raw=!0),e(),t&&(this.options.raw=n)},e.exports=o},{"./node/ArrayNode":64,"./node/AssignmentNode":65,"./node/ConditionalNode":66,"./node/ConstantNode":67,"./node/FunctionNode":68,"./node/OperatorNode":69,"./node/SymbolNode":70,"./node/UnaryNode":71,extend:32}],62:[function(t,e,n){"use strict";e.exports={"+":"add","-":"sub","*":"mul","/":"div","^":"pow","%":"mod","!":"factorial","|":"bitwiseOR","^|":"bitwiseXOR","&":"bitwiseAND","||":"logicalOR",xor:"logicalXOR","&&":"logicalAND","<":"lessThan",">":"greaterThan","<=":"lessEqualThan",">=":"greaterEqualThan","===":"strictlyEqual","==":"equal","!==":"strictlyNotEqual","!=":"notEqual",">>":"shiftRight","<<":"shiftLeft",">>>":"unsignedRightShift"}},{}],63:[function(t,e,n){"use strict";e.exports={"+":"positive","-":"negative","~":"oneComplement"}},{}],64:[function(t,e,n){"use strict";e.exports=function(t){var e=this,n=[];this.rawify(this.options.rawArrayExpressionElements,function(){n=t.nodes.map(function(t){return e.next(t)})});var r="["+n.join(",")+"]";return this.options.raw?r:this.options.factory+"("+r+")"}},{}],65:[function(t,e,n){"use strict";e.exports=function(t){return'scope["'+t.name+'"] = '+this.next(t.expr)}},{}],66:[function(t,e,n){"use strict";e.exports=function(t){return"("+("!!("+this.next(t.condition)+")")+" ? ("+this.next(t.trueExpr)+") : ("+this.next(t.falseExpr)+") )"}},{}],67:[function(t,e,n){"use strict";e.exports=function(t){return this.options.raw?t.value:this.options.factory+"("+t.value+")"}},{}],68:[function(t,e,n){"use strict";var r=t("mr-parser").nodeTypes.SymbolNode,i=function(t){return"$$mathCodegen.functionProxy("+this.next(new r(t.name))+', "'+t.name+'")'};e.exports=function(t){var e=this,n=i.call(this,t),r=[];return this.rawify(this.options.rawCallExpressionElements,function(){r=t.args.map(function(t){return e.next(t)})}),n+"("+r.join(", ")+")"},e.exports.functionProxy=i},{"mr-parser":73}],69:[function(t,e,n){"use strict";var r=t("../misc/Operators");e.exports=function(t){if(this.options.raw)return["("+this.next(t.args[0]),t.op,this.next(t.args[1])+")"].join(" ");var e=r[t.op];if(!e)throw TypeError("unidentified operator");return this.FunctionNode({name:e,args:t.args})}},{"../misc/Operators":62}],70:[function(t,e,n){"use strict";e.exports=function(t){return'$$mathCodegen.getProperty("'+t.name+'", scope, ns)'}},{}],71:[function(t,e,n){"use strict";var r=t("../misc/UnaryOperators");e.exports=function(t){if(this.options.raw)return t.op+this.next(t.argument);if(!(t.op in r))throw new SyntaxError(t.op+" not implemented");var e=r[t.op];return this.FunctionNode({name:e,args:[t.argument]})}},{"../misc/UnaryOperators":63}],72:[function(t,e,n){"use strict";e.exports=9007199254740991},{}],73:[function(t,e,n){"use strict";e.exports.Lexer=t("./lib/Lexer"),e.exports.Parser=t("./lib/Parser"),e.exports.nodeTypes=t("./lib/node/")},{"./lib/Lexer":74,"./lib/Parser":75,"./lib/node/":86}],74:[function(t,e,n){var r=t("./token-type"),i={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},o={",":!0,"(":!0,")":!0,"[":!0,"]":!0,";":!0,"~":!0,"!":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0,"^":!0,"**":!0,"|":!0,"&":!0,"^|":!0,"=":!0,":":!0,"?":!0,"||":!0,"&&":!0,xor:!0,"==":!0,"!=":!0,"===":!0,"!==":!0,"<":!0,">":!0,">=":!0,"<=":!0,">>>":!0,"<<":!0,">>":!0};function s(t){return t>="0"&&t<="9"}function a(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"||"$"===t||"_"===t}function u(t){return o[t]}function l(){}l.prototype.throwError=function(t,e){e=void 0===e?this.index:e;var n=new Error(t+" at index "+e);throw n.index=e,n.description=t,n},l.prototype.lex=function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){for(;" "===(l=this.peek())||"\r"===l||"\t"===l||"\n"===l||"\v"===l||" "===l;)this.consume();var e=this.peek(),n=e+this.peek(1),i=n+this.peek(2);u(i)?(this.tokens.push({type:r.DELIMITER,value:i}),this.consume(),this.consume(),this.consume()):u(n)?(this.tokens.push({type:r.DELIMITER,value:n}),this.consume(),this.consume()):u(e)?(this.tokens.push({type:r.DELIMITER,value:e}),this.consume()):s(e)||"."===e&&s(this.peek(1))?this.tokens.push({type:r.NUMBER,value:this.readNumber()}):"'"===(o=e)||'"'===o?this.tokens.push({type:r.STRING,value:this.readString()}):a(e)?this.tokens.push({type:r.SYMBOL,value:this.readIdentifier()}):this.throwError("unexpected character "+e)}var o,l;return this.tokens.push({type:r.EOF}),this.tokens},l.prototype.peek=function(t){if(t=t||0,!(this.index+t>=this.text.length))return this.text.charAt(this.index+t)},l.prototype.consume=function(){var t=this.peek();return this.index+=1,t},l.prototype.readNumber=function(){var t="";if("."===this.peek())t+=this.consume(),s(this.peek())||this.throwError("number expected");else{for(;s(this.peek());)t+=this.consume();"."===this.peek()&&(t+=this.consume())}for(;s(this.peek());)t+=this.consume();if("e"===this.peek()||"E"===this.peek())for(t+=this.consume(),s(this.peek())||"+"===this.peek()||"-"===this.peek()||this.throwError(),"+"!==this.peek()&&"-"!==this.peek()||(t+=this.consume()),s(this.peek())||this.throwError("number expected");s(this.peek());)t+=this.consume();return t},l.prototype.readIdentifier=function(){for(var t="";a(this.peek())||s(this.peek());)t+=this.consume();return t},l.prototype.readString=function(){for(var t,e=this.consume(),n="";;){var r=this.consume();if(r||this.throwError("string is not closed"),t){if("u"===r){var o=this.text.substring(this.index+1,this.index+5);o.match(/[\da-f]{4}/i)||this.throwError("invalid unicode escape"),this.index+=4,n+=String.fromCharCode(parseInt(o,16))}else{var s=i[r];n+=s||r}t=!1}else{if(r===e)break;"\\"===r?t=!0:n+=r}}return n},e.exports=l},{"./token-type":87}],75:[function(t,e,n){var r=t("./token-type"),i=t("./Lexer"),o=t("./node/ConstantNode"),s=t("./node/OperatorNode"),a=t("./node/UnaryNode"),u=t("./node/SymbolNode"),l=t("./node/FunctionNode"),c=t("./node/ArrayNode"),h=t("./node/ConditionalNode"),f=t("./node/AssignmentNode"),p=t("./node/BlockNode");function d(){this.lexer=new i,this.tokens=null}d.prototype.current=function(){return this.tokens[0]},d.prototype.next=function(){return this.tokens[1]},d.prototype.peek=function(){if(this.tokens.length)for(var t=this.tokens[0],e=0;e<arguments.length;e+=1)if(t.value===arguments[e])return!0},d.prototype.consume=function(t){return this.tokens.shift()},d.prototype.expect=function(t){if(!this.peek(t))throw Error("expected "+t);return this.consume()},d.prototype.isEOF=function(){return this.current().type===r.EOF},d.prototype.parse=function(t){return this.tokens=this.lexer.lex(t),this.program()},d.prototype.program=function(){for(var t=[];!this.isEOF();)t.push(this.assignment()),this.peek(";")&&this.consume();return this.end(),new p(t)},d.prototype.assignment=function(){var t=this.ternary();return t instanceof u&&this.peek("=")?(this.consume(),new f(t.name,this.assignment())):t},d.prototype.ternary=function(){var t=this.logicalOR();if(this.peek("?")){this.consume();var e=this.ternary();this.expect(":");var n=this.ternary();return new h(t,e,n)}return t},d.prototype.logicalOR=function(){var t=this.logicalXOR();if(this.peek("||")){var e=this.consume(),n=this.logicalOR();return new s(e.value,[t,n])}return t},d.prototype.logicalXOR=function(){var t=this.logicalAND();if("xor"===this.current().value){var e=this.consume(),n=this.logicalXOR();return new s(e.value,[t,n])}return t},d.prototype.logicalAND=function(){var t=this.bitwiseOR();if(this.peek("&&")){var e=this.consume(),n=this.logicalAND();return new s(e.value,[t,n])}return t},d.prototype.bitwiseOR=function(){var t=this.bitwiseXOR();if(this.peek("|")){var e=this.consume(),n=this.bitwiseOR();return new s(e.value,[t,n])}return t},d.prototype.bitwiseXOR=function(){var t=this.bitwiseAND();if(this.peek("^|")){var e=this.consume(),n=this.bitwiseXOR();return new s(e.value,[t,n])}return t},d.prototype.bitwiseAND=function(){var t=this.relational();if(this.peek("&")){var e=this.consume(),n=this.bitwiseAND();return new s(e.value,[t,n])}return t},d.prototype.relational=function(){var t=this.shift();if(this.peek("==","===","!=","!==",">=","<=",">","<")){var e=this.consume(),n=this.shift();return new s(e.value,[t,n])}return t},d.prototype.shift=function(){var t=this.additive();if(this.peek(">>","<<",">>>")){var e=this.consume(),n=this.shift();return new s(e.value,[t,n])}return t},d.prototype.additive=function(){for(var t=this.multiplicative();this.peek("+","-");){var e=this.consume();t=new s(e.value,[t,this.multiplicative()])}return t},d.prototype.multiplicative=function(){for(var t,e,n=this.unary();this.peek("*","/","%");)t=this.consume(),n=new s(t.value,[n,this.unary()]);return this.current().type===r.SYMBOL||this.peek("(")||!(n.type instanceof o)&&this.current().type===r.NUMBER?(e=this.multiplicative(),new s("*",[n,e])):n},d.prototype.unary=function(){if(this.peek("-","+","~")){var t=this.consume(),e=this.unary();return new a(t.value,e)}return this.pow()},d.prototype.pow=function(){var t=this.factorial();if(this.peek("^","**")){var e=this.consume(),n=this.unary();return new s(e.value,[t,n])}return t},d.prototype.factorial=function(){var t=this.symbol();if(this.peek("!")){var e=this.consume();return new s(e.value,[t])}return t},d.prototype.symbol=function(){if(this.current().type===r.SYMBOL){var t=this.consume();return this.functionCall(t)}return this.string()},d.prototype.functionCall=function(t){var e=t.value;if(this.peek("(")){this.consume();for(var n=[];!this.peek(")")&&!this.isEOF();)n.push(this.assignment()),this.peek(",")&&this.consume();return this.expect(")"),new l(e,n)}return new u(e)},d.prototype.string=function(){return this.current().type===r.STRING?new o(this.consume().value,"string"):this.array()},d.prototype.array=function(){if(this.peek("[")){this.consume();for(var t=[];!this.peek("]")&&!this.isEOF();)t.push(this.assignment()),this.peek(",")&&this.consume();return this.expect("]"),new c(t)}return this.number()},d.prototype.number=function(){return this.current().type===r.NUMBER?new o(this.consume().value,"number"):this.parentheses()},d.prototype.parentheses=function(){if("("===this.current().value){this.consume();var t=this.assignment();return this.expect(")"),t}return this.end()},d.prototype.end=function(){if(this.current().type!==r.EOF)throw Error("unexpected end of expression")},e.exports=d},{"./Lexer":74,"./node/ArrayNode":76,"./node/AssignmentNode":77,"./node/BlockNode":78,"./node/ConditionalNode":79,"./node/ConstantNode":80,"./node/FunctionNode":81,"./node/OperatorNode":83,"./node/SymbolNode":84,"./node/UnaryNode":85,"./token-type":87}],76:[function(t,e,n){var r=t("./Node");function i(t){this.nodes=t}i.prototype=Object.create(r.prototype),i.prototype.type="ArrayNode",e.exports=i},{"./Node":82}],77:[function(t,e,n){var r=t("./Node");function i(t,e){this.name=t,this.expr=e}i.prototype=Object.create(r.prototype),i.prototype.type="AssignmentNode",e.exports=i},{"./Node":82}],78:[function(t,e,n){var r=t("./Node");function i(t){this.blocks=t}i.prototype=Object.create(r.prototype),i.prototype.type="BlockNode",e.exports=i},{"./Node":82}],79:[function(t,e,n){var r=t("./Node");function i(t,e,n){this.condition=t,this.trueExpr=e,this.falseExpr=n}i.prototype=Object.create(r.prototype),i.prototype.type="ConditionalNode",e.exports=i},{"./Node":82}],80:[function(t,e,n){var r=t("./Node"),i={number:!0,string:!0,boolean:!0,undefined:!0,null:!0};function o(t,e){if(!i[e])throw Error("unsupported type '"+e+"'");this.value=t,this.valueType=e}o.prototype=Object.create(r.prototype),o.prototype.type="ConstantNode",e.exports=o},{"./Node":82}],81:[function(t,e,n){var r=t("./Node");function i(t,e){this.name=t,this.args=e}i.prototype=Object.create(r.prototype),i.prototype.type="FunctionNode",e.exports=i},{"./Node":82}],82:[function(t,e,n){function r(){}r.prototype.type="Node",e.exports=r},{}],83:[function(t,e,n){var r=t("./Node");function i(t,e){this.op=t,this.args=e||[]}i.prototype=Object.create(r.prototype),i.prototype.type="OperatorNode",e.exports=i},{"./Node":82}],84:[function(t,e,n){var r=t("./Node");function i(t){this.name=t}i.prototype=Object.create(r.prototype),i.prototype.type="SymbolNode",e.exports=i},{"./Node":82}],85:[function(t,e,n){var r=t("./Node");function i(t,e){this.op=t,this.argument=e}i.prototype=Object.create(r.prototype),i.prototype.type="UnaryNode",e.exports=i},{"./Node":82}],86:[function(t,e,n){e.exports={ArrayNode:t("./ArrayNode"),AssignmentNode:t("./AssignmentNode"),BlockNode:t("./BlockNode"),ConditionalNode:t("./ConditionalNode"),ConstantNode:t("./ConstantNode"),FunctionNode:t("./FunctionNode"),Node:t("./Node"),OperatorNode:t("./OperatorNode"),SymbolNode:t("./SymbolNode"),UnaryNode:t("./UnaryNode")}},{"./ArrayNode":76,"./AssignmentNode":77,"./BlockNode":78,"./ConditionalNode":79,"./ConstantNode":80,"./FunctionNode":81,"./Node":82,"./OperatorNode":83,"./SymbolNode":84,"./UnaryNode":85}],87:[function(t,e,n){e.exports={EOF:0,DELIMITER:1,NUMBER:2,STRING:3,SYMBOL:4}},{}],88:[function(t,e,n){"use strict";var r=t("double-bits"),i=Math.pow(2,-1074),o=-1>>>0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var n=r.hi(t),s=r.lo(t);e>t==t>0?s===o?(n+=1,s=0):s+=1:0===s?(s=o,n-=1):s-=1;return r.pack(s,n)}},{"double-bits":30}],89:[function(t,e,n){var r,i,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(t){r=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var l,c=[],h=!1,f=-1;function p(){h&&l&&(h=!1,l.length?c=l.concat(c):f=-1,c.length&&d())}function d(){if(!h){var t=u(p);h=!0;for(var e=c.length;e;){for(l=c,c=[];++f<e;)l&&l[f].run();f=-1,e=c.length}l=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function v(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new v(t,e)),1!==c.length||h||u(d)},v.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],90:[function(t,e,n){var r,i="undefined"!=typeof window?window.navigator.userAgent:"",o=/OS X/.test(i),s=/Opera/.test(i),a=!/like Gecko/.test(i)&&!s,u=e.exports={0:o?"<menu>":"<UNK>",1:"<mouse 1>",2:"<mouse 2>",3:"<break>",4:"<mouse 3>",5:"<mouse 4>",6:"<mouse 5>",8:"<backspace>",9:"<tab>",12:"<clear>",13:"<enter>",16:"<shift>",17:"<control>",18:"<alt>",19:"<pause>",20:"<caps-lock>",21:"<ime-hangul>",23:"<ime-junja>",24:"<ime-final>",25:"<ime-kanji>",27:"<escape>",28:"<ime-convert>",29:"<ime-nonconvert>",30:"<ime-accept>",31:"<ime-mode-change>",27:"<escape>",32:"<space>",33:"<page-up>",34:"<page-down>",35:"<end>",36:"<home>",37:"<left>",38:"<up>",39:"<right>",40:"<down>",41:"<select>",42:"<print>",43:"<execute>",44:"<snapshot>",45:"<insert>",46:"<delete>",47:"<help>",91:"<meta>",92:"<meta>",93:o?"<meta>":"<menu>",95:"<sleep>",106:"<num-*>",107:"<num-+>",108:"<num-enter>",109:"<num--\x3e",110:"<num-.>",111:"<num-/>",144:"<num-lock>",145:"<scroll-lock>",160:"<shift-left>",161:"<shift-right>",162:"<control-left>",163:"<control-right>",164:"<alt-left>",165:"<alt-right>",166:"<browser-back>",167:"<browser-forward>",168:"<browser-refresh>",169:"<browser-stop>",170:"<browser-search>",171:"<browser-favorites>",172:"<browser-home>",173:o&&a?"-":"<volume-mute>",174:"<volume-down>",175:"<volume-up>",176:"<next-track>",177:"<prev-track>",178:"<stop>",179:"<play-pause>",180:"<launch-mail>",181:"<launch-media-select>",182:"<launch-app 1>",183:"<launch-app 2>",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",223:"<meta>",224:"<meta>",226:"<alt-gr>",229:"<ime-process>",231:s?"`":"<unicode>",246:"<attention>",247:"<crsel>",248:"<exsel>",249:"<erase-eof>",250:"<play>",251:"<zoom>",252:"<no-name>",253:"<pa-1>",254:"<clear>"};for(r=58;r<65;++r)u[r]=String.fromCharCode(r);for(r=48;r<58;++r)u[r]=r-48+"";for(r=65;r<91;++r)u[r]=String.fromCharCode(r);for(r=96;r<106;++r)u[r]="<num-"+(r-96)+">";for(r=112;r<136;++r)u[r]="F"+(r-111)},{}],91:[function(t,e,n){e.exports=function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t};var r=Object.prototype.hasOwnProperty},{}]},{},[1])(1)});