Skip to content

Instantly share code, notes, and snippets.

@etpinard
Last active July 7, 2020 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etpinard/188c797eeb963f461c170df7cb2bc464 to your computer and use it in GitHub Desktop.
Save etpinard/188c797eeb963f461c170df7cb2bc464 to your computer and use it in GitHub Desktop.
plotly.js polar charts demo
"plotly.js polar charts demo"
license: mit
height: 800
node_modules
npm-debug.log*
<!DOCTYPE html>
<html>
<head>
<title>---</title>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<meta charset=utf-8></head>
<body></body>
<script>
!function(){return function e(t,n,r){function a(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){return a(t[o][1][e]||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)a(r[o]);return a}}()({1:[function(e,t,n){var r=e("plotly.js/lib/core");r.register(e("plotly.js/lib/scatterpolar"));var a=document.createElement("div");document.body.appendChild(a);var i=[{fn:o,arg:"in",cnt:"zoom in"},{fn:o,arg:"out",cnt:"zoom out"},{fn:s,arg:[0,90],cnt:"0-90 sector"},{fn:s,arg:[0,180],cnt:"0-180 sector"},{fn:s,arg:[0,270],cnt:"0-270 sector"},{fn:s,arg:[0,360],cnt:"reset sector"},{fn:l,arg:"radians",cnt:"show in radians"},{fn:l,arg:"degrees",cnt:"show in degrees"},{fn:c,arg:2,cnt:"more angular ticks"},{fn:c,arg:.5,cnt:"less angular ticks"}];function o(e){var t=a.layout.polar.radialaxis.range,n=[t[0],t[1]+{in:-dr,out:dr}[e]];n[0]<n[1]&&r.relayout(a,"polar.radialaxis.range",n)}function s(e){r.relayout(a,"polar.sector",e)}function l(e){r.relayout(a,"polar.angularaxis.thetaunit",e)}function c(e){var t=a._fullLayout.polar.angularaxis.nticks||12;r.relayout(a,"polar.angularaxis.nticks",t*e)}r.d3.json("https://raw.githubusercontent.com/plotly/plotly.js/61e155cfa0a1525baf9a8383faa8264627d2a47b/test/image/mocks/polar_scatter.json",function(e,t){t.layout.width=Math.max(700,window.innerWidth),t.layout.height=Math.max(500,window.innerHeight-200),r.newPlot(a,t);var n=i[0].fn;i.forEach(function(e){if(n!==e.fn){var t=document.createElement("br");document.body.appendChild(t)}var r=document.createElement("button");document.body.appendChild(r),r.onclick=function(){return e.fn(e.arg)},r.innerHTML=e.cnt,n=e.fn})})},{"plotly.js/lib/core":13,"plotly.js/lib/scatterpolar":14}],2:[function(e,t,n){var r=Object.create||function(e){var t=function(){};return t.prototype=e,new t},a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return n},i=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function o(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var s,l=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),s=0===c.x}catch(e){s=!1}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,n,a){var i,o,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]):(o=e._events=r(null),e._eventsCount=0),s){if("function"==typeof s?s=o[t]=a?[n,s]:[s,n]:a?s.unshift(n):s.push(n),!s.warned&&(i=u(e))&&i>0&&s.length>i){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",l.name,l.message)}}else s=o[t]=n,++e._eventsCount;return e}function f(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=i.call(f,r);return a.listener=n,r.wrapFn=a,a}function p(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}s?Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');l=e}}):o.defaultMaxListeners=l,o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){var t,n,r,a,i,o,s="error"===e;if(o=this._events)s=s&&null==o.error;else if(!s)return!1;if(s){if(arguments.length>1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(n=o[e]))return!1;var c="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,a=g(e,r),i=0;i<r;++i)a[i].call(n)}(n,c,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var a=e.length,i=g(e,a),o=0;o<a;++o)i[o].call(n,r)}(n,c,this,arguments[1]);break;case 3:!function(e,t,n,r,a){if(t)e.call(n,r,a);else for(var i=e.length,o=g(e,i),s=0;s<i;++s)o[s].call(n,r,a)}(n,c,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,a,i){if(t)e.call(n,r,a,i);else for(var o=e.length,s=g(e,o),l=0;l<o;++l)s[l].call(n,r,a,i)}(n,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=new Array(r-1),i=1;i<r;i++)a[i-1]=arguments[i];!function(e,t,n,r){if(t)e.apply(n,r);else for(var a=e.length,i=g(e,a),o=0;o<a;++o)i[o].apply(n,r)}(n,c,this,a)}return!0},o.prototype.addListener=function(e,t){return d(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return d(this,e,t,!0)},o.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,h(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,h(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,a,i,o,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(a=this._events))return this;if(!(n=a[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=r(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i),1===n.length&&(a[e]=n[0]),a.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.removeAllListeners=function(e){var t,n,i;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=r(null),this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=r(null):delete n[e]),this;if(0===arguments.length){var o,s=a(n);for(i=0;i<s.length;++i)"removeListener"!==(o=s[i])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=r(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[]},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],3:[function(e,t,n){!function(){var e={version:"3.5.17"},n=[].slice,r=function(e){return n.call(e)},a=this.document;function i(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(a)try{r(a.documentElement.childNodes)[0].nodeType}catch(e){r=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,d=u.setProperty;s.setAttribute=function(e,t){l.call(this,e,t+"")},s.setAttributeNS=function(e,t,n){c.call(this,e,t,n+"")},u.setProperty=function(e,t,n){d.call(this,e,t+"",n)}}function f(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function h(e){return null===e?NaN:+e}function p(e){return!isNaN(e)}function g(e){return{left:function(t,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=t.length);r<a;){var i=r+a>>>1;e(t[i],n)<0?r=i+1:a=i}return r},right:function(t,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=t.length);r<a;){var i=r+a>>>1;e(t[i],n)>0?a=i:r=i+1}return r}}}e.ascending=f,e.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},e.min=function(e,t){var n,r,a=-1,i=e.length;if(1===arguments.length){for(;++a<i;)if(null!=(r=e[a])&&r>=r){n=r;break}for(;++a<i;)null!=(r=e[a])&&n>r&&(n=r)}else{for(;++a<i;)if(null!=(r=t.call(e,e[a],a))&&r>=r){n=r;break}for(;++a<i;)null!=(r=t.call(e,e[a],a))&&n>r&&(n=r)}return n},e.max=function(e,t){var n,r,a=-1,i=e.length;if(1===arguments.length){for(;++a<i;)if(null!=(r=e[a])&&r>=r){n=r;break}for(;++a<i;)null!=(r=e[a])&&r>n&&(n=r)}else{for(;++a<i;)if(null!=(r=t.call(e,e[a],a))&&r>=r){n=r;break}for(;++a<i;)null!=(r=t.call(e,e[a],a))&&r>n&&(n=r)}return n},e.extent=function(e,t){var n,r,a,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=a=r;break}for(;++i<o;)null!=(r=e[i])&&(n>r&&(n=r),a<r&&(a=r))}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=a=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&(n>r&&(n=r),a<r&&(a=r))}return[n,a]},e.sum=function(e,t){var n,r=0,a=e.length,i=-1;if(1===arguments.length)for(;++i<a;)p(n=+e[i])&&(r+=n);else for(;++i<a;)p(n=+t.call(e,e[i],i))&&(r+=n);return r},e.mean=function(e,t){var n,r=0,a=e.length,i=-1,o=a;if(1===arguments.length)for(;++i<a;)p(n=h(e[i]))?r+=n:--o;else for(;++i<a;)p(n=h(t.call(e,e[i],i)))?r+=n:--o;if(o)return r/o},e.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),a=+e[r-1],i=n-r;return i?a+i*(e[r]-a):a},e.median=function(t,n){var r,a=[],i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)p(r=h(t[o]))&&a.push(r);else for(;++o<i;)p(r=h(n.call(t,t[o],o)))&&a.push(r);if(a.length)return e.quantile(a.sort(f),.5)},e.variance=function(e,t){var n,r,a=e.length,i=0,o=0,s=-1,l=0;if(1===arguments.length)for(;++s<a;)p(n=h(e[s]))&&(o+=(r=n-i)*(n-(i+=r/++l)));else for(;++s<a;)p(n=h(t.call(e,e[s],s)))&&(o+=(r=n-i)*(n-(i+=r/++l)));if(l>1)return o/(l-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t?Math.sqrt(t):t};var y=g(f);function m(e){return e.length}e.bisectLeft=y.left,e.bisect=e.bisectRight=y.right,e.bisector=function(e){return g(1===e.length?function(t,n){return f(e(t),n)}:e)},e.shuffle=function(e,t,n){(i=arguments.length)<3&&(n=e.length,i<2&&(t=0));for(var r,a,i=n-t;i;)a=Math.random()*i--|0,r=e[i+t],e[i+t]=e[a+t],e[a+t]=r;return e},e.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},e.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],a=new Array(n<0?0:n);t<n;)a[t]=[r,r=e[++t]];return a},e.transpose=function(t){if(!(i=t.length))return[];for(var n=-1,r=e.min(t,m),a=new Array(r);++n<r;)for(var i,o=-1,s=a[n]=new Array(i);++o<i;)s[o]=t[o][n];return a},e.zip=function(){return e.transpose(arguments)},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t},e.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},e.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},e.merge=function(e){for(var t,n,r,a=e.length,i=-1,o=0;++i<a;)o+=e[i].length;for(n=new Array(o);--a>=0;)for(t=(r=e[a]).length;--t>=0;)n[--o]=r[t];return n};var v=Math.abs;function x(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function b(){this._=Object.create(null)}e.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("infinite range");var r,a=[],i=function(e){var t=1;for(;e*t%1;)t*=10;return t}(v(n)),o=-1;if(e*=i,t*=i,(n*=i)<0)for(;(r=e+n*++o)>t;)a.push(r/i);else for(;(r=e+n*++o)<t;)a.push(r/i);return a},e.map=function(e,t){var n=new b;if(e instanceof b)e.forEach(function(e,t){n.set(e,t)});else if(Array.isArray(e)){var r,a=-1,i=e.length;if(1===arguments.length)for(;++a<i;)n.set(a,e[a]);else for(;++a<i;)n.set(t.call(e,r=e[a],a),r)}else for(var o in e)n.set(o,e[o]);return n};var _="__proto__",w="\0";function k(e){return(e+="")===_||e[0]===w?w+e:e}function M(e){return(e+="")[0]===w?e.slice(1):e}function T(e){return k(e)in this._}function A(e){return(e=k(e))in this._&&delete this._[e]}function S(){var e=[];for(var t in this._)e.push(M(t));return e}function L(){var e=0;for(var t in this._)++e;return e}function C(){for(var e in this._)return!1;return!0}function z(){this._=Object.create(null)}function O(e){return e}function D(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function P(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=I.length;n<r;++n){var a=I[n]+t;if(a in e)return a}}x(b,{has:T,get:function(e){return this._[k(e)]},set:function(e,t){return this._[k(e)]=t},remove:A,keys:S,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:M(t),value:this._[t]});return e},size:L,empty:C,forEach:function(e){for(var t in this._)e.call(this,M(t),this._[t])}}),e.nest=function(){var t,n,r={},a=[],i=[];function o(e,i,s){if(s>=a.length)return n?n.call(r,i):t?i.sort(t):i;for(var l,c,u,d,f=-1,h=i.length,p=a[s++],g=new b;++f<h;)(d=g.get(l=p(c=i[f])))?d.push(c):g.set(l,[c]);return e?(c=e(),u=function(t,n){c.set(t,o(e,n,s))}):(c={},u=function(t,n){c[t]=o(e,n,s)}),g.forEach(u),c}return r.map=function(e,t){return o(t,e,0)},r.entries=function(t){return function e(t,n){if(n>=a.length)return t;var r=[],o=i[n++];return t.forEach(function(t,a){r.push({key:t,values:e(a,n)})}),o?r.sort(function(e,t){return o(e.key,t.key)}):r}(o(e.map,t,0),0)},r.key=function(e){return a.push(e),r},r.sortKeys=function(e){return i[a.length-1]=e,r},r.sortValues=function(e){return t=e,r},r.rollup=function(e){return n=e,r},r},e.set=function(e){var t=new z;if(e)for(var n=0,r=e.length;n<r;++n)t.add(e[n]);return t},x(z,{has:T,add:function(e){return this._[k(e+="")]=!0,e},remove:A,values:S,size:L,empty:C,forEach:function(e){for(var t in this._)e.call(this,M(t))}}),e.behavior={},e.rebind=function(e,t){for(var n,r=1,a=arguments.length;++r<a;)e[n=arguments[r]]=D(e,t,t[n]);return e};var I=["webkit","ms","moz","Moz","o","O"];function j(){}function E(){}function N(e){var t=[],n=new b;function r(){for(var n,r=t,a=-1,i=r.length;++a<i;)(n=r[a].on)&&n.apply(this,arguments);return e}return r.on=function(r,a){var i,o=n.get(r);return arguments.length<2?o&&o.on:(o&&(o.on=null,t=t.slice(0,i=t.indexOf(o)).concat(t.slice(i+1)),n.remove(r)),a&&t.push(n.set(r,{on:a})),e)},r}function R(){e.event.preventDefault()}function F(){for(var t,n=e.event;t=n.sourceEvent;)n=t;return n}function B(t){for(var n=new E,r=0,a=arguments.length;++r<a;)n[arguments[r]]=N(n);return n.of=function(r,a){return function(i){try{var o=i.sourceEvent=e.event;i.target=t,e.event=i,n[i.type].apply(r,a)}finally{e.event=o}}},n}e.dispatch=function(){for(var e=new E,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=N(e);return e},E.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},e.event=null,e.requote=function(e){return e.replace(H,"\\$&")};var H=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,q={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};function V(e){return q(e,Z),e}var U=function(e,t){return t.querySelector(e)},G=function(e,t){return t.querySelectorAll(e)},Y=function(e,t){var n=e.matches||e[P(e,"matchesSelector")];return(Y=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(U=function(e,t){return Sizzle(e,t)[0]||null},G=Sizzle,Y=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var Z=e.selection.prototype=[];function X(e){return"function"==typeof e?e:function(){return U(e,this)}}function W(e){return"function"==typeof e?e:function(){return G(e,this)}}Z.select=function(e){var t,n,r,a,i=[];e=X(e);for(var o=-1,s=this.length;++o<s;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var l=-1,c=r.length;++l<c;)(a=r[l])?(t.push(n=e.call(a,a.__data__,l,o)),n&&"__data__"in a&&(n.__data__=a.__data__)):t.push(null)}return V(i)},Z.selectAll=function(e){var t,n,a=[];e=W(e);for(var i=-1,o=this.length;++i<o;)for(var s=this[i],l=-1,c=s.length;++l<c;)(n=s[l])&&(a.push(t=r(e.call(n,n.__data__,l,i))),t.parentNode=n);return V(a)};var J="http://www.w3.org/1999/xhtml",Q={svg:"http://www.w3.org/2000/svg",xhtml:J,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $(t,n){return t=e.ns.qualify(t),null==n?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof n?t.local?function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}:function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}:t.local?function(){this.setAttributeNS(t.space,t.local,n)}:function(){this.setAttribute(t,n)}}function K(e){return e.trim().replace(/\s+/g," ")}function ee(t){return new RegExp("(?:^|\\s+)"+e.requote(t)+"(?:\\s+|$)","g")}function te(e){return(e+"").trim().split(/^|\s+/)}function ne(e,t){var n=(e=te(e).map(re)).length;return"function"==typeof t?function(){for(var r=-1,a=t.apply(this,arguments);++r<n;)e[r](this,a)}:function(){for(var r=-1;++r<n;)e[r](this,t)}}function re(e){var t=ee(e);return function(n,r){if(a=n.classList)return r?a.add(e):a.remove(e);var a=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(a)||n.setAttribute("class",K(a+" "+e))):n.setAttribute("class",K(a.replace(t," ")))}}function ae(e,t,n){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}:function(){this.style.setProperty(e,t,n)}}function ie(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}:function(){this[e]=t}}function oe(t){return"function"==typeof t?t:(t=e.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,n=this.namespaceURI;return n===J&&e.documentElement.namespaceURI===J?e.createElement(t):e.createElementNS(n,t)}}function se(){var e=this.parentNode;e&&e.removeChild(this)}function le(e){return{__data__:e}}function ce(e){return function(){return Y(this,e)}}function ue(e,t){for(var n=0,r=e.length;n<r;n++)for(var a,i=e[n],o=0,s=i.length;o<s;o++)(a=i[o])&&t(a,o,n);return e}function de(e){return q(e,fe),e}e.ns={prefix:Q,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),Q.hasOwnProperty(n)?{space:Q[n],local:e}:e}},Z.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=e.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(n in t)this.each($(n,t[n]));return this}return this.each($(t,n))},Z.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=te(e)).length,a=-1;if(t=n.classList){for(;++a<r;)if(!t.contains(e[a]))return!1}else for(t=n.getAttribute("class");++a<r;)if(!ee(e[a]).test(t))return!1;return!0}for(t in e)this.each(ne(t,e[t]));return this}return this.each(ne(e,t))},Z.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.each(ae(n,e[n],t));return this}if(r<2){var a=this.node();return o(a).getComputedStyle(a,null).getPropertyValue(e)}n=""}return this.each(ae(e,t,n))},Z.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(ie(t,e[t]));return this}return this.each(ie(e,t))},Z.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},Z.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},Z.append=function(e){return e=oe(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},Z.insert=function(e,t){return e=oe(e),t=X(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})},Z.remove=function(){return this.each(se)},Z.data=function(e,t){var n,r,a=-1,i=this.length;if(!arguments.length){for(e=new Array(i=(n=this[0]).length);++a<i;)(r=n[a])&&(e[a]=r.__data__);return e}function o(e,n){var r,a,i,o=e.length,u=n.length,d=Math.min(o,u),f=new Array(u),h=new Array(u),p=new Array(o);if(t){var g,y=new b,m=new Array(o);for(r=-1;++r<o;)(a=e[r])&&(y.has(g=t.call(a,a.__data__,r))?p[r]=a:y.set(g,a),m[r]=g);for(r=-1;++r<u;)(a=y.get(g=t.call(n,i=n[r],r)))?!0!==a&&(f[r]=a,a.__data__=i):h[r]=le(i),y.set(g,!0);for(r=-1;++r<o;)r in m&&!0!==y.get(m[r])&&(p[r]=e[r])}else{for(r=-1;++r<d;)a=e[r],i=n[r],a?(a.__data__=i,f[r]=a):h[r]=le(i);for(;r<u;++r)h[r]=le(n[r]);for(;r<o;++r)p[r]=e[r]}h.update=f,h.parentNode=f.parentNode=p.parentNode=e.parentNode,s.push(h),l.push(f),c.push(p)}var s=de([]),l=V([]),c=V([]);if("function"==typeof e)for(;++a<i;)o(n=this[a],e.call(n,n.parentNode.__data__,a));else for(;++a<i;)o(n=this[a],e);return l.enter=function(){return s},l.exit=function(){return c},l},Z.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},Z.filter=function(e){var t,n,r,a=[];"function"!=typeof e&&(e=ce(e));for(var i=0,o=this.length;i<o;i++){a.push(t=[]),t.parentNode=(n=this[i]).parentNode;for(var s=0,l=n.length;s<l;s++)(r=n[s])&&e.call(r,r.__data__,s,i)&&t.push(r)}return V(a)},Z.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],a=r.length-1,i=r[a];--a>=0;)(n=r[a])&&(i&&i!==n.nextSibling&&i.parentNode.insertBefore(n,i),i=n);return this},Z.sort=function(e){e=function(e){arguments.length||(e=f);return function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Z.each=function(e){return ue(this,function(t,n,r){e.call(t,t.__data__,n,r)})},Z.call=function(e){var t=r(arguments);return e.apply(t[0]=this,t),this},Z.empty=function(){return!this.node()},Z.node=function(){for(var e=0,t=this.length;e<t;e++)for(var n=this[e],r=0,a=n.length;r<a;r++){var i=n[r];if(i)return i}return null},Z.size=function(){var e=0;return ue(this,function(){++e}),e};var fe=[];function he(t,n,a){var i="__on"+t,o=t.indexOf("."),s=ge;o>0&&(t=t.slice(0,o));var l=pe.get(t);function c(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}return l&&(t=l,s=ye),o?n?function(){var e=s(n,r(arguments));c.call(this),this.addEventListener(t,this[i]=e,e.$=a),e._=n}:c:n?j:function(){var n,r=new RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var a in this)if(n=a.match(r)){var i=this[a];this.removeEventListener(n[1],i,i.$),delete this[a]}}}e.selection.enter=de,e.selection.enter.prototype=fe,fe.append=Z.append,fe.empty=Z.empty,fe.node=Z.node,fe.call=Z.call,fe.size=Z.size,fe.select=function(e){for(var t,n,r,a,i,o=[],s=-1,l=this.length;++s<l;){r=(a=this[s]).update,o.push(t=[]),t.parentNode=a.parentNode;for(var c=-1,u=a.length;++c<u;)(i=a[c])?(t.push(r[c]=n=e.call(a.parentNode,i.__data__,c,s)),n.__data__=i.__data__):t.push(null)}return V(o)},fe.insert=function(e,t){var n,r,a;return arguments.length<2&&(n=this,t=function(e,t,i){var o,s=n[i].update,l=s.length;for(i!=a&&(a=i,r=0),t>=r&&(r=t+1);!(o=s[r])&&++r<l;);return o}),Z.insert.call(this,e,t)},e.select=function(e){var t;return"string"==typeof e?(t=[U(e,a)]).parentNode=a.documentElement:(t=[e]).parentNode=i(e),V([t])},e.selectAll=function(e){var t;return"string"==typeof e?(t=r(G(e,a))).parentNode=a.documentElement:(t=r(e)).parentNode=null,V([t])},Z.on=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=!1),e)this.each(he(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(he(e,t,n))};var pe=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});function ge(t,n){return function(r){var a=e.event;e.event=r,n[0]=this.__data__;try{t.apply(this,n)}finally{e.event=a}}}function ye(e,t){var n=ge(e,t);return function(e){var t=e.relatedTarget;t&&(t===this||8&t.compareDocumentPosition(this))||n.call(this,e)}}a&&pe.forEach(function(e){"on"+e in a&&pe.remove(e)});var me,ve=0;function xe(t){var n=".dragsuppress-"+ ++ve,r="click"+n,a=e.select(o(t)).on("touchmove"+n,R).on("dragstart"+n,R).on("selectstart"+n,R);if(null==me&&(me=!("onselectstart"in t)&&P(t.style,"userSelect")),me){var s=i(t).style,l=s[me];s[me]="none"}return function(e){if(a.on(n,null),me&&(s[me]=l),e){var t=function(){a.on(r,null)};a.on(r,function(){R(),t()},!0),setTimeout(t,0)}}}e.mouse=function(e){return _e(e,F())};var be=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function _e(t,n){n.changedTouches&&(n=n.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var a=r.createSVGPoint();if(be<0){var i=o(t);if(i.scrollX||i.scrollY){var s=(r=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();be=!(s.f||s.e),r.remove()}}return be?(a.x=n.pageX,a.y=n.pageY):(a.x=n.clientX,a.y=n.clientY),[(a=a.matrixTransform(t.getScreenCTM().inverse())).x,a.y]}var l=t.getBoundingClientRect();return[n.clientX-l.left-t.clientLeft,n.clientY-l.top-t.clientTop]}function we(){return e.event.changedTouches[0].identifier}e.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=F().changedTouches),t)for(var r,a=0,i=t.length;a<i;++a)if((r=t[a]).identifier===n)return _e(e,r)},e.behavior.drag=function(){var t=B(i,"drag","dragstart","dragend"),n=null,r=s(j,e.mouse,o,"mousemove","mouseup"),a=s(we,e.touch,O,"touchmove","touchend");function i(){this.on("mousedown.drag",r).on("touchstart.drag",a)}function s(r,a,i,o,s){return function(){var l,c=e.event.target.correspondingElement||e.event.target,u=this.parentNode,d=t.of(this,arguments),f=0,h=r(),p=".drag"+(null==h?"":"-"+h),g=e.select(i(c)).on(o+p,function(){var e,t,n=a(u,h);if(!n)return;e=n[0]-m[0],t=n[1]-m[1],f|=e|t,m=n,d({type:"drag",x:n[0]+l[0],y:n[1]+l[1],dx:e,dy:t})}).on(s+p,function(){if(!a(u,h))return;g.on(o+p,null).on(s+p,null),y(f),d({type:"dragend"})}),y=xe(c),m=a(u,h);l=n?[(l=n.apply(this,arguments)).x-m[0],l.y-m[1]]:[0,0],d({type:"dragstart"})}}return i.origin=function(e){return arguments.length?(n=e,i):n},e.rebind(i,t,"on")},e.touches=function(e,t){return arguments.length<2&&(t=F().touches),t?r(t).map(function(t){var n=_e(e,t);return n.identifier=t.identifier,n}):[]};var ke=1e-6,Me=ke*ke,Te=Math.PI,Ae=2*Te,Se=Ae-ke,Le=Te/2,Ce=Te/180,ze=180/Te;function Oe(e){return e>0?1:e<0?-1:0}function De(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function Pe(e){return e>1?0:e<-1?Te:Math.acos(e)}function Ie(e){return e>1?Le:e<-1?-Le:Math.asin(e)}function je(e){return((e=Math.exp(e))+1/e)/2}function Ee(e){return(e=Math.sin(e/2))*e}var Ne=Math.SQRT2;e.interpolateZoom=function(e,t){var n,r,a=e[0],i=e[1],o=e[2],s=t[0],l=t[1],c=t[2],u=s-a,d=l-i,f=u*u+d*d;if(f<Me)r=Math.log(c/o)/Ne,n=function(e){return[a+e*u,i+e*d,o*Math.exp(Ne*e*r)]};else{var h=Math.sqrt(f),p=(c*c-o*o+4*f)/(2*o*2*h),g=(c*c-o*o-4*f)/(2*c*2*h),y=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-y)/Ne,n=function(e){var t,n=e*r,s=je(y),l=o/(2*h)*(s*(t=Ne*n+y,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(y));return[a+l*u,i+l*d,o*s/je(Ne*n+y)]}}return n.duration=1e3*r,n},e.behavior.zoom=function(){var t,n,r,i,s,l,c,u,d,f={x:0,y:0,k:1},h=[960,500],p=Be,g=250,y=0,m="mousedown.zoom",v="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=B(w,"zoomstart","zoom","zoomend");function w(e){e.on(m,O).on(Fe+".zoom",P).on("dblclick.zoom",I).on(b,D)}function k(e){return[(e[0]-f.x)/f.k,(e[1]-f.y)/f.k]}function M(e){f.k=Math.max(p[0],Math.min(p[1],e))}function T(e,t){t=function(e){return[e[0]*f.k+f.x,e[1]*f.k+f.y]}(t),f.x+=e[0]-t[0],f.y+=e[1]-t[1]}function A(t,r,a,i){t.__chart__={x:f.x,y:f.y,k:f.k},M(Math.pow(2,i)),T(n=r,a),t=e.select(t),g>0&&(t=t.transition().duration(g)),t.call(w.event)}function S(){c&&c.domain(l.range().map(function(e){return(e-f.x)/f.k}).map(l.invert)),d&&d.domain(u.range().map(function(e){return(e-f.y)/f.k}).map(u.invert))}function L(e){y++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function z(e){--y||(e({type:"zoomend"}),n=null)}function O(){var t=this,n=_.of(t,arguments),r=0,a=e.select(o(t)).on(v,function(){r=1,T(e.mouse(t),i),C(n)}).on(x,function(){a.on(v,null).on(x,null),s(r),z(n)}),i=k(e.mouse(t)),s=xe(t);ss.call(t),L(n)}function D(){var t,n=this,r=_.of(n,arguments),a={},i=0,o=".zoom-"+e.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],d=e.select(n),h=xe(n);function p(){var r=e.touches(n);return t=f.k,r.forEach(function(e){e.identifier in a&&(a[e.identifier]=k(e))}),r}function g(){var t=e.event.target;e.select(t).on(l,y).on(c,v),u.push(t);for(var r=e.event.changedTouches,o=0,d=r.length;o<d;++o)a[r[o].identifier]=null;var h=p(),g=Date.now();if(1===h.length){if(g-s<500){var m=h[0];A(n,m,a[m.identifier],Math.floor(Math.log(f.k)/Math.LN2)+1),R()}s=g}else if(h.length>1){m=h[0];var x=h[1],b=m[0]-x[0],_=m[1]-x[1];i=b*b+_*_}}function y(){var o,l,c,u,d=e.touches(n);ss.call(n);for(var f=0,h=d.length;f<h;++f,u=null)if(c=d[f],u=a[c.identifier]){if(l)break;o=c,l=u}if(u){var p=(p=c[0]-o[0])*p+(p=c[1]-o[1])*p,g=i&&Math.sqrt(p/i);o=[(o[0]+c[0])/2,(o[1]+c[1])/2],l=[(l[0]+u[0])/2,(l[1]+u[1])/2],M(g*t)}s=null,T(o,l),C(r)}function v(){if(e.event.touches.length){for(var t=e.event.changedTouches,n=0,i=t.length;n<i;++n)delete a[t[n].identifier];for(var s in a)return void p()}e.selectAll(u).on(o,null),d.on(m,O).on(b,D),h(),z(r)}g(),L(r),d.on(m,null).on(b,g)}function P(){var a=_.of(this,arguments);i?clearTimeout(i):(ss.call(this),t=k(n=r||e.mouse(this)),L(a)),i=setTimeout(function(){i=null,z(a)},50),R(),M(Math.pow(2,.002*Re())*f.k),T(n,t),C(a)}function I(){var t=e.mouse(this),n=Math.log(f.k)/Math.LN2;A(this,t,k(t),e.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}return Fe||(Fe="onwheel"in a?(Re=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in a?(Re=function(){return e.event.wheelDelta},"mousewheel"):(Re=function(){return-e.event.detail},"MozMousePixelScroll")),w.event=function(t){t.each(function(){var t=_.of(this,arguments),r=f;us?e.select(this).transition().each("start.zoom",function(){f=this.__chart__||{x:0,y:0,k:1},L(t)}).tween("zoom:zoom",function(){var a=h[0],i=h[1],o=n?n[0]:a/2,s=n?n[1]:i/2,l=e.interpolateZoom([(o-f.x)/f.k,(s-f.y)/f.k,a/f.k],[(o-r.x)/r.k,(s-r.y)/r.k,a/r.k]);return function(e){var n=l(e),r=a/n[2];this.__chart__=f={x:o-n[0]*r,y:s-n[1]*r,k:r},C(t)}}).each("interrupt.zoom",function(){z(t)}).each("end.zoom",function(){z(t)}):(this.__chart__=f,L(t),C(t),z(t))})},w.translate=function(e){return arguments.length?(f={x:+e[0],y:+e[1],k:f.k},S(),w):[f.x,f.y]},w.scale=function(e){return arguments.length?(f={x:f.x,y:f.y,k:null},M(+e),S(),w):f.k},w.scaleExtent=function(e){return arguments.length?(p=null==e?Be:[+e[0],+e[1]],w):p},w.center=function(e){return arguments.length?(r=e&&[+e[0],+e[1]],w):r},w.size=function(e){return arguments.length?(h=e&&[+e[0],+e[1]],w):h},w.duration=function(e){return arguments.length?(g=+e,w):g},w.x=function(e){return arguments.length?(c=e,l=e.copy(),f={x:0,y:0,k:1},w):c},w.y=function(e){return arguments.length?(d=e,u=e.copy(),f={x:0,y:0,k:1},w):d},e.rebind(w,_,"on")};var Re,Fe,Be=[0,1/0];function He(){}function qe(e,t,n){return this instanceof qe?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof qe?new qe(e.h,e.s,e.l):ut(""+e,dt,qe):new qe(e,t,n)}e.color=He,He.prototype.toString=function(){return this.rgb()+""},e.hsl=qe;var Ve=qe.prototype=new He;function Ue(e,t,n){var r,a;function i(e){return Math.round(255*function(e){return e>360?e-=360:e<0&&(e+=360),e<60?r+(a-r)*e/60:e<180?a:e<240?r+(a-r)*(240-e)/60:r}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,r=2*(n=n<0?0:n>1?1:n)-(a=n<=.5?n*(1+t):n+t-n*t),new it(i(e+120),i(e),i(e-120))}function Ge(t,n,r){return this instanceof Ge?(this.h=+t,this.c=+n,void(this.l=+r)):arguments.length<2?t instanceof Ge?new Ge(t.h,t.c,t.l):tt(t instanceof Xe?t.l:(t=ft((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Ge(t,n,r)}Ve.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new qe(this.h,this.s,this.l/e)},Ve.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new qe(this.h,this.s,e*this.l)},Ve.rgb=function(){return Ue(this.h,this.s,this.l)},e.hcl=Ge;var Ye=Ge.prototype=new He;function Ze(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Xe(n,Math.cos(e*=Ce)*t,Math.sin(e)*t)}function Xe(e,t,n){return this instanceof Xe?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof Xe?new Xe(e.l,e.a,e.b):e instanceof Ge?Ze(e.h,e.c,e.l):ft((e=it(e)).r,e.g,e.b):new Xe(e,t,n)}Ye.brighter=function(e){return new Ge(this.h,this.c,Math.min(100,this.l+We*(arguments.length?e:1)))},Ye.darker=function(e){return new Ge(this.h,this.c,Math.max(0,this.l-We*(arguments.length?e:1)))},Ye.rgb=function(){return Ze(this.h,this.c,this.l).rgb()},e.lab=Xe;var We=18,Je=.95047,Qe=1,$e=1.08883,Ke=Xe.prototype=new He;function et(e,t,n){var r=(e+16)/116,a=r+t/500,i=r-n/200;return new it(at(3.2404542*(a=nt(a)*Je)-1.5371385*(r=nt(r)*Qe)-.4985314*(i=nt(i)*$e)),at(-.969266*a+1.8760108*r+.041556*i),at(.0556434*a-.2040259*r+1.0572252*i))}function tt(e,t,n){return e>0?new Ge(Math.atan2(n,t)*ze,Math.sqrt(t*t+n*n),e):new Ge(NaN,NaN,e)}function nt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function rt(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function at(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function it(e,t,n){return this instanceof it?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof it?new it(e.r,e.g,e.b):ut(""+e,it,Ue):new it(e,t,n)}function ot(e){return new it(e>>16,e>>8&255,255&e)}function st(e){return ot(e)+""}Ke.brighter=function(e){return new Xe(Math.min(100,this.l+We*(arguments.length?e:1)),this.a,this.b)},Ke.darker=function(e){return new Xe(Math.max(0,this.l-We*(arguments.length?e:1)),this.a,this.b)},Ke.rgb=function(){return et(this.l,this.a,this.b)},e.rgb=it;var lt=it.prototype=new He;function ct(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ut(e,t,n){var r,a,i,o=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(a=r[2].split(","),r[1]){case"hsl":return n(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(pt(a[0]),pt(a[1]),pt(a[2]))}return(i=gt.get(e))?t(i.r,i.g,i.b):(null==e||"#"!==e.charAt(0)||isNaN(i=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&i)>>4,o|=o>>4,s=240&i,s|=s>>4,l=15&i,l|=l<<4):7===e.length&&(o=(16711680&i)>>16,s=(65280&i)>>8,l=255&i)),t(o,s,l))}function dt(e,t,n){var r,a,i=Math.min(e/=255,t/=255,n/=255),o=Math.max(e,t,n),s=o-i,l=(o+i)/2;return s?(a=l<.5?s/(o+i):s/(2-o-i),r=e==o?(t-n)/s+(t<n?6:0):t==o?(n-e)/s+2:(e-t)/s+4,r*=60):(r=NaN,a=l>0&&l<1?0:r),new qe(r,a,l)}function ft(e,t,n){var r=rt((.4124564*(e=ht(e))+.3575761*(t=ht(t))+.1804375*(n=ht(n)))/Je),a=rt((.2126729*e+.7151522*t+.072175*n)/Qe);return Xe(116*a-16,500*(r-a),200*(a-rt((.0193339*e+.119192*t+.9503041*n)/$e)))}function ht(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}lt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,a=30;return t||n||r?(t&&t<a&&(t=a),n&&n<a&&(n=a),r&&r<a&&(r=a),new it(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new it(a,a,a)},lt.darker=function(e){return new it((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},lt.hsl=function(){return dt(this.r,this.g,this.b)},lt.toString=function(){return"#"+ct(this.r)+ct(this.g)+ct(this.b)};var gt=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function yt(e){return"function"==typeof e?e:function(){return e}}function mt(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),vt(t,n,e,r)}}function vt(t,n,a,i){var o={},s=e.dispatch("beforesend","progress","load","error"),l={},c=new XMLHttpRequest,u=null;function d(){var e,t=c.status;if(!t&&function(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}(c)||t>=200&&t<300||304===t){try{e=a.call(o,c)}catch(e){return void s.error.call(o,e)}s.load.call(o,e)}else s.error.call(o,c)}return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=d:c.onreadystatechange=function(){c.readyState>3&&d()},c.onprogress=function(t){var n=e.event;e.event=t;try{s.progress.call(o,c)}finally{e.event=n}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(n=null==e?null:e+"",o):n},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return a=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(r(arguments)))}}),o.send=function(e,r,a){if(2===arguments.length&&"function"==typeof r&&(a=r,r=null),c.open(e,t,!0),null==n||"accept"in l||(l.accept=n+",*/*"),c.setRequestHeader)for(var i in l)c.setRequestHeader(i,l[i]);return null!=n&&c.overrideMimeType&&c.overrideMimeType(n),null!=u&&(c.responseType=u),null!=a&&o.on("error",a).on("load",function(e){a(null,e)}),s.beforesend.call(o,c),c.send(null==r?null:r),o},o.abort=function(){return c.abort(),o},e.rebind(o,s,"on"),null==i?o:o.get(function(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}(i))}gt.forEach(function(e,t){gt.set(e,ot(t))}),e.functor=yt,e.xhr=mt(O),e.dsv=function(e,t){var n=new RegExp('["'+e+"\n]"),r=e.charCodeAt(0);function a(e,n,r){arguments.length<3&&(r=n,n=null);var a=vt(e,t,null==n?i:o(n),r);return a.row=function(e){return arguments.length?a.response(null==(n=e)?i:o(e)):n},a}function i(e){return a.parse(e.responseText)}function o(e){return function(t){return a.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return n.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return a.parse=function(e,t){var n;return a.parseRows(e,function(e,r){if(n)return n(e,r-1);var a=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");n=t?function(e,n){return t(a(e),n)}:a})},a.parseRows=function(e,t){var n,a,i={},o={},s=[],l=e.length,c=0,u=0;function d(){if(c>=l)return o;if(a)return a=!1,i;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<l;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}return c=n+2,13===(s=e.charCodeAt(n+1))?(a=!0,10===e.charCodeAt(n+2)&&++c):10===s&&(a=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;c<l;){var s,u=1;if(10===(s=e.charCodeAt(c++)))a=!0;else if(13===s)a=!0,10===e.charCodeAt(c)&&(++c,++u);else if(s!==r)continue;return e.slice(t,c-u)}return e.slice(t)}for(;(n=d())!==o;){for(var f=[];n!==i&&n!==o;)f.push(n),n=d();t&&null==(f=t(f,u++))||s.push(f)}return s},a.format=function(t){if(Array.isArray(t[0]))return a.formatRows(t);var n=new z,r=[];return t.forEach(function(e){for(var t in e)n.has(t)||r.push(n.add(t))}),[r.map(l).join(e)].concat(t.map(function(t){return r.map(function(e){return l(t[e])}).join(e)})).join("\n")},a.formatRows=function(e){return e.map(s).join("\n")},a},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv("\t","text/tab-separated-values");var xt,bt,_t,wt,kt=this[P(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function Mt(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var a={c:e,t:n+t,n:null};return bt?bt.n=a:xt=a,bt=a,_t||(wt=clearTimeout(wt),_t=1,kt(Tt)),a}function Tt(){var e=At(),t=St()-e;t>24?(isFinite(t)&&(clearTimeout(wt),wt=setTimeout(Tt,t)),_t=0):(_t=1,kt(Tt))}function At(){for(var e=Date.now(),t=xt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function St(){for(var e,t=xt,n=1/0;t;)t.c?(t.t<n&&(n=t.t),t=(e=t).n):t=e?e.n=t.n:xt=t.n;return bt=e,n}function Lt(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}e.timer=function(){Mt.apply(this,arguments)},e.timer.flush=function(){At(),St()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var Ct=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(function(e,t){var n=Math.pow(10,3*v(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}});e.formatPrefix=function(t,n){var r=0;return(t=+t)&&(t<0&&(t*=-1),n&&(t=e.round(t,Lt(t,n))),r=1+Math.floor(1e-12+Math.log(t)/Math.LN10),r=Math.max(-24,Math.min(24,3*Math.floor((r-1)/3)))),Ct[8+r/3]};var zt=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ot=e.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(t,n){return(t=e.round(t,Lt(t,n))).toFixed(Math.max(0,Math.min(20,Lt(t*(1+1e-15),n))))}});function Dt(e){return e+""}var Pt=e.time={},It=Date;function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}jt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Et.setUTCDate.apply(this._,arguments)},setDay:function(){Et.setUTCDay.apply(this._,arguments)},setFullYear:function(){Et.setUTCFullYear.apply(this._,arguments)},setHours:function(){Et.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Et.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Et.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Et.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Et.setUTCSeconds.apply(this._,arguments)},setTime:function(){Et.setTime.apply(this._,arguments)}};var Et=Date.prototype;function Nt(e,t,n){function r(t){var n=e(t),r=i(n,1);return t-n<r-t?n:r}function a(n){return t(n=e(new It(n-1)),1),n}function i(e,n){return t(e=new It(+e),n),e}function o(e,r,i){var o=a(e),s=[];if(i>1)for(;o<r;)n(o)%i||s.push(new Date(+o)),t(o,1);else for(;o<r;)s.push(new Date(+o)),t(o,1);return s}e.floor=e,e.round=r,e.ceil=a,e.offset=i,e.range=o;var s=e.utc=Rt(e);return s.floor=s,s.round=Rt(r),s.ceil=Rt(a),s.offset=Rt(i),s.range=function(e,t,n){try{It=jt;var r=new jt;return r._=e,o(r,t,n)}finally{It=Date}},e}function Rt(e){return function(t,n){try{It=jt;var r=new jt;return r._=t,e(r,n)._}finally{It=Date}}}Pt.year=Nt(function(e){return(e=Pt.day(e)).setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),Pt.years=Pt.year.range,Pt.years.utc=Pt.year.utc.range,Pt.day=Nt(function(e){var t=new It(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),Pt.days=Pt.day.range,Pt.days.utc=Pt.day.utc.range,Pt.dayOfYear=function(e){var t=Pt.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=Pt[e]=Nt(function(e){return(e=Pt.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=Pt.year(e).getDay();return Math.floor((Pt.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});Pt[e+"s"]=n.range,Pt[e+"s"].utc=n.utc.range,Pt[e+"OfYear"]=function(e){var n=Pt.year(e).getDay();return Math.floor((Pt.dayOfYear(e)+(n+t)%7)/7)}}),Pt.week=Pt.sunday,Pt.weeks=Pt.sunday.range,Pt.weeks.utc=Pt.sunday.utc.range,Pt.weekOfYear=Pt.sundayOfYear;var Ft={"-":"",_:" ",0:"0"},Bt=/^\s*\d+/,Ht=/^%/;function qt(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function Vt(t){return new RegExp("^(?:"+t.map(e.requote).join("|")+")","i")}function Ut(e){for(var t=new b,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function Gt(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Yt(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n));return r?(e.U=+r[0],n+r[0].length):-1}function Zt(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n));return r?(e.W=+r[0],n+r[0].length):-1}function Xt(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Wt(e,t,n){Bt.lastIndex=0;var r,a=Bt.exec(t.slice(n,n+2));return a?(e.y=(r=+a[0])+(r>68?1900:2e3),n+a[0].length):-1}function Jt(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function Qt(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $t(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Kt(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function en(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function tn(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function nn(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function rn(e,t,n){Bt.lastIndex=0;var r=Bt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function an(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=v(t)/60|0,a=v(t)%60;return n+qt(r,"0",2)+qt(a,"0",2)}function on(e,t,n){Ht.lastIndex=0;var r=Ht.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function sn(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}e.locale=function(t){return{numberFormat:function(t){var n=t.decimal,r=t.thousands,a=t.grouping,i=t.currency,o=a&&r?function(e,t){for(var n=e.length,i=[],o=0,s=a[0],l=0;n>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),i.push(e.substring(n-=s,n+s)),!((l+=s+1)>t));)s=a[o=(o+1)%a.length];return i.reverse().join(r)}:O;return function(t){var r=zt.exec(t),a=r[1]||" ",s=r[2]||">",l=r[3]||"-",c=r[4]||"",u=r[5],d=+r[6],f=r[7],h=r[8],p=r[9],g=1,y="",m="",v=!1,x=!0;switch(h&&(h=+h.substring(1)),(u||"0"===a&&"="===s)&&(u=a="0",s="="),p){case"n":f=!0,p="g";break;case"%":g=100,m="%",p="f";break;case"p":g=100,m="%",p="r";break;case"b":case"o":case"x":case"X":"#"===c&&(y="0"+p.toLowerCase());case"c":x=!1;case"d":v=!0,h=0;break;case"s":g=-1,p="r"}"$"===c&&(y=i[0],m=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=Ot.get(p)||Dt;var b=u&&f;return function(t){var r=m;if(v&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===l?"":l;if(g<0){var c=e.formatPrefix(t,h);t=c.scale(t),r=c.symbol+m}else t*=g;var _,w,k=(t=p(t,h)).lastIndexOf(".");if(k<0){var M=x?t.lastIndexOf("e"):-1;M<0?(_=t,w=""):(_=t.substring(0,M),w=t.substring(M))}else _=t.substring(0,k),w=n+t.substring(k+1);!u&&f&&(_=o(_,1/0));var T=y.length+_.length+w.length+(b?0:i.length),A=T<d?new Array(T=d-T+1).join(a):"";return b&&(_=o(A+_,A.length?d-w.length:1/0)),i+=y,t=_+w,("<"===s?i+t+A:">"===s?A+i+t:"^"===s?A.substring(0,T>>=1)+i+t+A.substring(T):i+(b?t:A+t))+r}}}(t),timeFormat:function(t){var n=t.dateTime,r=t.date,a=t.time,i=t.periods,o=t.days,s=t.shortDays,l=t.months,c=t.shortMonths;function u(e){var t=e.length;function n(n){for(var r,a,i,o=[],s=-1,l=0;++s<t;)37===e.charCodeAt(s)&&(o.push(e.slice(l,s)),null!=(a=Ft[r=e.charAt(++s)])&&(r=e.charAt(++s)),(i=_[r])&&(r=i(n,null==a?"e"===r?" ":"0":a)),o.push(r),l=s+1);return o.push(e.slice(l,s)),o.join("")}return n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(d(n,e,t,0)!=t.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&It!==jt,a=new(r?jt:It);return"j"in n?a.setFullYear(n.y,0,n.j):"W"in n||"U"in n?("w"in n||(n.w="W"in n?1:0),a.setFullYear(n.y,0,1),a.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(a.getDay()+5)%7:n.w+7*n.U-(a.getDay()+6)%7)):a.setFullYear(n.y,n.m,n.d),a.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),r?a._:a},n.toString=function(){return e},n}function d(e,t,n,r){for(var a,i,o,s=0,l=t.length,c=n.length;s<l;){if(r>=c)return-1;if(37===(a=t.charCodeAt(s++))){if(o=t.charAt(s++),!(i=w[o in Ft?t.charAt(s++):o])||(r=i(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}u.utc=function(e){var t=u(e);function n(e){try{var n=new(It=jt);return n._=e,t(n)}finally{It=Date}}return n.parse=function(e){try{It=jt;var n=t.parse(e);return n&&n._}finally{It=Date}},n.toString=t.toString,n},u.multi=u.utc.multi=sn;var f=e.map(),h=Vt(o),p=Ut(o),g=Vt(s),y=Ut(s),m=Vt(l),v=Ut(l),x=Vt(c),b=Ut(c);i.forEach(function(e,t){f.set(e.toLowerCase(),t)});var _={a:function(e){return s[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return c[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:u(n),d:function(e,t){return qt(e.getDate(),t,2)},e:function(e,t){return qt(e.getDate(),t,2)},H:function(e,t){return qt(e.getHours(),t,2)},I:function(e,t){return qt(e.getHours()%12||12,t,2)},j:function(e,t){return qt(1+Pt.dayOfYear(e),t,3)},L:function(e,t){return qt(e.getMilliseconds(),t,3)},m:function(e,t){return qt(e.getMonth()+1,t,2)},M:function(e,t){return qt(e.getMinutes(),t,2)},p:function(e){return i[+(e.getHours()>=12)]},S:function(e,t){return qt(e.getSeconds(),t,2)},U:function(e,t){return qt(Pt.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return qt(Pt.mondayOfYear(e),t,2)},x:u(r),X:u(a),y:function(e,t){return qt(e.getFullYear()%100,t,2)},Y:function(e,t){return qt(e.getFullYear()%1e4,t,4)},Z:an,"%":function(){return"%"}},w={a:function(e,t,n){g.lastIndex=0;var r=g.exec(t.slice(n));return r?(e.w=y.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){h.lastIndex=0;var r=h.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){x.lastIndex=0;var r=x.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){m.lastIndex=0;var r=m.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,t,n){return d(e,_.c.toString(),t,n)},d:$t,e:$t,H:en,I:en,j:Kt,L:rn,m:Qt,M:tn,p:function(e,t,n){var r=f.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)},S:nn,U:Yt,w:Gt,W:Zt,x:function(e,t,n){return d(e,_.x.toString(),t,n)},X:function(e,t,n){return d(e,_.X.toString(),t,n)},y:Wt,Y:Xt,Z:Jt,"%":on};return u}(t)}};var ln=e.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function cn(){}e.format=ln.numberFormat,e.geo={},cn.prototype={s:0,t:0,add:function(e){dn(e,this.t,un),dn(un.s,this.s,this),this.s?this.t+=un.t:this.s=un.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var un=new cn;function dn(e,t,n){var r=n.s=e+t,a=r-e,i=r-a;n.t=e-i+(t-a)}function fn(e,t){e&&pn.hasOwnProperty(e.type)&&pn[e.type](e,t)}e.geo.stream=function(e,t){e&&hn.hasOwnProperty(e.type)?hn[e.type](e,t):fn(e,t)};var hn={Feature:function(e,t){fn(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,a=n.length;++r<a;)fn(n[r].geometry,t)}},pn={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,a=n.length;++r<a;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){gn(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,a=n.length;++r<a;)gn(n[r],t,0)},Polygon:function(e,t){yn(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,a=n.length;++r<a;)yn(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,a=n.length;++r<a;)fn(n[r],t)}};function gn(e,t,n){var r,a=-1,i=e.length-n;for(t.lineStart();++a<i;)r=e[a],t.point(r[0],r[1],r[2]);t.lineEnd()}function yn(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)gn(e[n],t,1);t.polygonEnd()}e.geo.area=function(t){return mn=0,e.geo.stream(t,zn),mn};var mn,vn,xn,bn,_n,wn,kn,Mn,Tn,An,Sn,Ln,Cn=new cn,zn={sphere:function(){mn+=4*Te},point:j,lineStart:j,lineEnd:j,polygonStart:function(){Cn.reset(),zn.lineStart=On},polygonEnd:function(){var e=2*Cn;mn+=e<0?4*Te+e:e,zn.lineStart=zn.lineEnd=zn.point=j}};function On(){var e,t,n,r,a;function i(e,t){t=t*Ce/2+Te/4;var i=(e*=Ce)-n,o=i>=0?1:-1,s=o*i,l=Math.cos(t),c=Math.sin(t),u=a*c,d=r*l+u*Math.cos(s),f=u*o*Math.sin(s);Cn.add(Math.atan2(f,d)),n=e,r=l,a=c}zn.point=function(o,s){zn.point=i,n=(e=o)*Ce,r=Math.cos(s=(t=s)*Ce/2+Te/4),a=Math.sin(s)},zn.lineEnd=function(){i(e,t)}}function Dn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function Pn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function In(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function jn(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function En(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Nn(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Rn(e){return[Math.atan2(e[1],e[0]),Ie(e[2])]}function Fn(e,t){return v(e[0]-t[0])<ke&&v(e[1]-t[1])<ke}e.geo.bounds=function(){var t,n,r,a,i,o,s,l,c,u,d,f={point:h,lineStart:g,lineEnd:y,polygonStart:function(){f.point=m,f.lineStart=x,f.lineEnd=b,c=0,zn.polygonStart()},polygonEnd:function(){zn.polygonEnd(),f.point=h,f.lineStart=g,f.lineEnd=y,Cn<0?(t=-(r=180),n=-(a=90)):c>ke?a=90:c<-ke&&(n=-90),d[0]=t,d[1]=r}};function h(e,i){u.push(d=[t=e,r=e]),i<n&&(n=i),i>a&&(a=i)}function p(e,o){var s=Dn([e*Ce,o*Ce]);if(l){var c=In(l,s),u=In([c[1],-c[0],0],c);Nn(u),u=Rn(u);var d=e-i,f=d>0?1:-1,p=u[0]*ze*f,g=v(d)>180;if(g^(f*i<p&&p<f*e))(y=u[1]*ze)>a&&(a=y);else if(g^(f*i<(p=(p+360)%360-180)&&p<f*e)){var y;(y=-u[1]*ze)<n&&(n=y)}else o<n&&(n=o),o>a&&(a=o);g?e<i?_(t,e)>_(t,r)&&(r=e):_(e,r)>_(t,r)&&(t=e):r>=t?(e<t&&(t=e),e>r&&(r=e)):e>i?_(t,e)>_(t,r)&&(r=e):_(e,r)>_(t,r)&&(t=e)}else h(e,o);l=s,i=e}function g(){f.point=p}function y(){d[0]=t,d[1]=r,f.point=h,l=null}function m(e,t){if(l){var n=e-i;c+=v(n)>180?n+(n>0?360:-360):n}else o=e,s=t;zn.point(e,t),p(e,t)}function x(){zn.lineStart()}function b(){m(o,s),zn.lineEnd(),v(c)>ke&&(t=-(r=180)),d[0]=t,d[1]=r,l=null}function _(e,t){return(t-=e)<0?t+360:t}function w(e,t){return e[0]-t[0]}function k(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}return function(i){if(a=r=-(t=n=1/0),u=[],e.geo.stream(i,f),c=u.length){u.sort(w);for(var o=1,s=[g=u[0]];o<c;++o)k((h=u[o])[0],g)||k(h[1],g)?(_(g[0],h[1])>_(g[0],g[1])&&(g[1]=h[1]),_(h[0],g[1])>_(g[0],g[1])&&(g[0]=h[0])):s.push(g=h);for(var l,c,h,p=-1/0,g=(o=0,s[c=s.length-1]);o<=c;g=h,++o)h=s[o],(l=_(g[1],h[0]))>p&&(p=l,t=h[0],r=g[1])}return u=d=null,t===1/0||n===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,n],[r,a]]}}(),e.geo.centroid=function(t){vn=xn=bn=_n=wn=kn=Mn=Tn=An=Sn=Ln=0,e.geo.stream(t,Bn);var n=An,r=Sn,a=Ln,i=n*n+r*r+a*a;return i<Me&&(n=kn,r=Mn,a=Tn,xn<ke&&(n=bn,r=_n,a=wn),(i=n*n+r*r+a*a)<Me)?[NaN,NaN]:[Math.atan2(r,n)*ze,Ie(a/Math.sqrt(i))*ze]};var Bn={sphere:j,point:Hn,lineStart:Vn,lineEnd:Un,polygonStart:function(){Bn.lineStart=Gn},polygonEnd:function(){Bn.lineStart=Vn}};function Hn(e,t){e*=Ce;var n=Math.cos(t*=Ce);qn(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function qn(e,t,n){bn+=(e-bn)/++vn,_n+=(t-_n)/vn,wn+=(n-wn)/vn}function Vn(){var e,t,n;function r(r,a){r*=Ce;var i=Math.cos(a*=Ce),o=i*Math.cos(r),s=i*Math.sin(r),l=Math.sin(a),c=Math.atan2(Math.sqrt((c=t*l-n*s)*c+(c=n*o-e*l)*c+(c=e*s-t*o)*c),e*o+t*s+n*l);xn+=c,kn+=c*(e+(e=o)),Mn+=c*(t+(t=s)),Tn+=c*(n+(n=l)),qn(e,t,n)}Bn.point=function(a,i){a*=Ce;var o=Math.cos(i*=Ce);e=o*Math.cos(a),t=o*Math.sin(a),n=Math.sin(i),Bn.point=r,qn(e,t,n)}}function Un(){Bn.point=Hn}function Gn(){var e,t,n,r,a;function i(e,t){e*=Ce;var i=Math.cos(t*=Ce),o=i*Math.cos(e),s=i*Math.sin(e),l=Math.sin(t),c=r*l-a*s,u=a*o-n*l,d=n*s-r*o,f=Math.sqrt(c*c+u*u+d*d),h=n*o+r*s+a*l,p=f&&-Pe(h)/f,g=Math.atan2(f,h);An+=p*c,Sn+=p*u,Ln+=p*d,xn+=g,kn+=g*(n+(n=o)),Mn+=g*(r+(r=s)),Tn+=g*(a+(a=l)),qn(n,r,a)}Bn.point=function(o,s){e=o,t=s,Bn.point=i,o*=Ce;var l=Math.cos(s*=Ce);n=l*Math.cos(o),r=l*Math.sin(o),a=Math.sin(s),qn(n,r,a)},Bn.lineEnd=function(){i(e,t),Bn.lineEnd=Un,Bn.point=Hn}}function Yn(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function Zn(){return!0}function Xn(e,t,n,r,a){var i=[],o=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(Fn(n,r)){a.lineStart();for(var s=0;s<t;++s)a.point((n=e[s])[0],n[1]);a.lineEnd()}else{var l=new Jn(n,e,null,!0),c=new Jn(n,null,l,!1);l.o=c,i.push(l),o.push(c),c=new Jn(r,null,l=new Jn(r,e,null,!1),!0),l.o=c,i.push(l),o.push(c)}}}),o.sort(t),Wn(i),Wn(o),i.length){for(var s=0,l=n,c=o.length;s<c;++s)o[s].e=l=!l;for(var u,d,f=i[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;u=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(s=0,c=u.length;s<c;++s)a.point((d=u[s])[0],d[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(p)for(s=(u=h.p.z).length-1;s>=0;--s)a.point((d=u[s])[0],d[1]);else r(h.x,h.p.x,-1,a);h=h.p}u=(h=h.o).z,p=!p}while(!h.v);a.lineEnd()}}}function Wn(e){if(t=e.length){for(var t,n,r=0,a=e[0];++r<t;)a.n=n=e[r],n.p=a,a=n;a.n=n=e[0],n.p=a}}function Jn(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Qn(t,n,r,a){return function(i,o){var s,l=n(o),c=i.invert(a[0],a[1]),u={point:d,lineStart:h,lineEnd:p,polygonStart:function(){u.point=b,u.lineStart=_,u.lineEnd=w,s=[],g=[]},polygonEnd:function(){u.point=d,u.lineStart=h,u.lineEnd=p,s=e.merge(s);var t=function(e,t){var n=e[0],r=e[1],a=[Math.sin(n),-Math.cos(n),0],i=0,o=0;Cn.reset();for(var s=0,l=t.length;s<l;++s){var c=t[s],u=c.length;if(u)for(var d=c[0],f=d[0],h=d[1]/2+Te/4,p=Math.sin(h),g=Math.cos(h),y=1;;){y===u&&(y=0);var m=(e=c[y])[0],v=e[1]/2+Te/4,x=Math.sin(v),b=Math.cos(v),_=m-f,w=_>=0?1:-1,k=w*_,M=k>Te,T=p*x;if(Cn.add(Math.atan2(T*w*Math.sin(k),g*b+T*Math.cos(k))),i+=M?_+w*Ae:_,M^f>=n^m>=n){var A=In(Dn(d),Dn(e));Nn(A);var S=In(a,A);Nn(S);var L=(M^_>=0?-1:1)*Ie(S[2]);(r>L||r===L&&(A[0]||A[1]))&&(o+=M^_>=0?1:-1)}if(!y++)break;f=m,p=x,g=b,d=e}}return(i<-ke||i<ke&&Cn<-ke)^1&o}(c,g);s.length?(x||(o.polygonStart(),x=!0),Xn(s,er,t,r,o)):t&&(x||(o.polygonStart(),x=!0),o.lineStart(),r(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),s=g=null},sphere:function(){o.polygonStart(),o.lineStart(),r(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function d(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&o.point(e,n)}function f(e,t){var n=i(e,t);l.point(n[0],n[1])}function h(){u.point=f,l.lineStart()}function p(){u.point=d,l.lineEnd()}var g,y,m=Kn(),v=n(m),x=!1;function b(e,t){y.push([e,t]);var n=i(e,t);v.point(n[0],n[1])}function _(){v.lineStart(),y=[]}function w(){b(y[0][0],y[0][1]),v.lineEnd();var e,t=v.clean(),n=m.buffer(),r=n.length;if(y.pop(),g.push(y),y=null,r)if(1&t){var a,i=-1;if((r=(e=n[0]).length-1)>0){for(x||(o.polygonStart(),x=!0),o.lineStart();++i<r;)o.point((a=e[i])[0],a[1]);o.lineEnd()}}else r>1&&2&t&&n.push(n.pop().concat(n.shift())),s.push(n.filter($n))}return u}}function $n(e){return e.length>1}function Kn(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:j,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function er(e,t){return((e=e.x)[0]<0?e[1]-Le-ke:Le-e[1])-((t=t.x)[0]<0?t[1]-Le-ke:Le-t[1])}var tr=Qn(Zn,function(e){var t,n=NaN,r=NaN,a=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(i,o){var s=i>0?Te:-Te,l=v(i-n);v(l-Te)<ke?(e.point(n,r=(r+o)/2>0?Le:-Le),e.point(a,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(i,r),t=0):a!==s&&l>=Te&&(v(n-a)<ke&&(n-=a*ke),v(i-s)<ke&&(i-=s*ke),r=function(e,t,n,r){var a,i,o=Math.sin(e-n);return v(o)>ke?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(n)-Math.sin(r)*(a=Math.cos(t))*Math.sin(e))/(a*i*o)):(t+r)/2}(n,r,i,o),e.point(a,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=i,r=o),a=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}},function(e,t,n,r){var a;if(null==e)a=n*Le,r.point(-Te,a),r.point(0,a),r.point(Te,a),r.point(Te,0),r.point(Te,-a),r.point(0,-a),r.point(-Te,-a),r.point(-Te,0),r.point(-Te,a);else if(v(e[0]-t[0])>ke){var i=e[0]<t[0]?Te:-Te;a=n*i/2,r.point(-i,a),r.point(0,a),r.point(i,a)}else r.point(t[0],t[1])},[-Te,-Te/2]);function nr(e,t,n,r){return function(a){var i,o=a.a,s=a.b,l=o.x,c=o.y,u=0,d=1,f=s.x-l,h=s.y-c;if(i=e-l,f||!(i>0)){if(i/=f,f<0){if(i<u)return;i<d&&(d=i)}else if(f>0){if(i>d)return;i>u&&(u=i)}if(i=n-l,f||!(i<0)){if(i/=f,f<0){if(i>d)return;i>u&&(u=i)}else if(f>0){if(i<u)return;i<d&&(d=i)}if(i=t-c,h||!(i>0)){if(i/=h,h<0){if(i<u)return;i<d&&(d=i)}else if(h>0){if(i>d)return;i>u&&(u=i)}if(i=r-c,h||!(i<0)){if(i/=h,h<0){if(i>d)return;i>u&&(u=i)}else if(h>0){if(i<u)return;i<d&&(d=i)}return u>0&&(a.a={x:l+u*f,y:c+u*h}),d<1&&(a.b={x:l+d*f,y:c+d*h}),a}}}}}}var rr=1e9;function ar(t,n,r,a){return function(l){var c,u,d,f,h,p,g,y,m,v,x,b=l,_=Kn(),w=nr(t,n,r,a),k={point:A,lineStart:function(){k.point=S,u&&u.push(d=[]);v=!0,m=!1,g=y=NaN},lineEnd:function(){c&&(S(f,h),p&&m&&_.rejoin(),c.push(_.buffer()));k.point=A,m&&l.lineEnd()},polygonStart:function(){l=_,c=[],u=[],x=!0},polygonEnd:function(){l=b,c=e.merge(c);var n=function(e){for(var t=0,n=u.length,r=e[1],a=0;a<n;++a)for(var i,o=1,s=u[a],l=s.length,c=s[0];o<l;++o)i=s[o],c[1]<=r?i[1]>r&&De(c,i,e)>0&&++t:i[1]<=r&&De(c,i,e)<0&&--t,c=i;return 0!==t}([t,a]),r=x&&n,i=c.length;(r||i)&&(l.polygonStart(),r&&(l.lineStart(),M(null,null,1,l),l.lineEnd()),i&&Xn(c,o,n,M,l),l.polygonEnd()),c=u=d=null}};function M(e,o,l,c){var u=0,d=0;if(null==e||(u=i(e,l))!==(d=i(o,l))||s(e,o)<0^l>0)do{c.point(0===u||3===u?t:r,u>1?a:n)}while((u=(u+l+4)%4)!==d);else c.point(o[0],o[1])}function T(e,i){return t<=e&&e<=r&&n<=i&&i<=a}function A(e,t){T(e,t)&&l.point(e,t)}function S(e,t){var n=T(e=Math.max(-rr,Math.min(rr,e)),t=Math.max(-rr,Math.min(rr,t)));if(u&&d.push([e,t]),v)f=e,h=t,p=n,v=!1,n&&(l.lineStart(),l.point(e,t));else if(n&&m)l.point(e,t);else{var r={a:{x:g,y:y},b:{x:e,y:t}};w(r)?(m||(l.lineStart(),l.point(r.a.x,r.a.y)),l.point(r.b.x,r.b.y),n||l.lineEnd(),x=!1):n&&(l.lineStart(),l.point(e,t),x=!1)}g=e,y=t,m=n}return k};function i(e,a){return v(e[0]-t)<ke?a>0?0:3:v(e[0]-r)<ke?a>0?2:1:v(e[1]-n)<ke?a>0?1:0:a>0?3:2}function o(e,t){return s(e.x,t.x)}function s(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}}function ir(e){var t=0,n=Te/3,r=Sr(e),a=r(t,n);return a.parallels=function(e){return arguments.length?r(t=e[0]*Te/180,n=e[1]*Te/180):[t/Te*180,n/Te*180]},a}function or(e,t){var n=Math.sin(e),r=(n+Math.sin(t))/2,a=1+n*(2*r-n),i=Math.sqrt(a)/r;function o(e,t){var n=Math.sqrt(a-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),i-n*Math.cos(e)]}return o.invert=function(e,t){var n=i-t;return[Math.atan2(e,n)/r,Ie((a-(e*e+n*n)*r*r)/(2*r))]},o}e.geo.clipExtent=function(){var e,t,n,r,a,i,o={stream:function(e){return a&&(a.valid=!1),(a=i(e)).valid=!0,a},extent:function(s){return arguments.length?(i=ar(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1]),a&&(a.valid=!1,a=null),o):[[e,t],[n,r]]}};return o.extent([[0,0],[960,500]])},(e.geo.conicEqualArea=function(){return ir(or)}).raw=or,e.geo.albers=function(){return e.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},e.geo.albersUsa=function(){var t,n,r,a,i=e.geo.albers(),o=e.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=e.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){t=[e,n]}};function c(e){var i=e[0],o=e[1];return t=null,n(i,o),t||(r(i,o),t)||a(i,o),t}return c.invert=function(e){var t=i.scale(),n=i.translate(),r=(e[0]-n[0])/t,a=(e[1]-n[1])/t;return(a>=.12&&a<.234&&r>=-.425&&r<-.214?o:a>=.166&&a<.234&&r>=-.214&&r<-.115?s:i).invert(e)},c.stream=function(e){var t=i.stream(e),n=o.stream(e),r=s.stream(e);return{point:function(e,a){t.point(e,a),n.point(e,a),r.point(e,a)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},c.precision=function(e){return arguments.length?(i.precision(e),o.precision(e),s.precision(e),c):i.precision()},c.scale=function(e){return arguments.length?(i.scale(e),o.scale(.35*e),s.scale(e),c.translate(i.translate())):i.scale()},c.translate=function(e){if(!arguments.length)return i.translate();var t=i.scale(),u=+e[0],d=+e[1];return n=i.translate(e).clipExtent([[u-.455*t,d-.238*t],[u+.455*t,d+.238*t]]).stream(l).point,r=o.translate([u-.307*t,d+.201*t]).clipExtent([[u-.425*t+ke,d+.12*t+ke],[u-.214*t-ke,d+.234*t-ke]]).stream(l).point,a=s.translate([u-.205*t,d+.212*t]).clipExtent([[u-.214*t+ke,d+.166*t+ke],[u-.115*t-ke,d+.234*t-ke]]).stream(l).point,c},c.scale(1070)};var sr,lr,cr,ur,dr,fr,hr={point:j,lineStart:j,lineEnd:j,polygonStart:function(){lr=0,hr.lineStart=pr},polygonEnd:function(){hr.lineStart=hr.lineEnd=hr.point=j,sr+=v(lr/2)}};function pr(){var e,t,n,r;function a(e,t){lr+=r*e-n*t,n=e,r=t}hr.point=function(i,o){hr.point=a,e=n=i,t=r=o},hr.lineEnd=function(){a(e,t)}}var gr={point:function(e,t){e<cr&&(cr=e);e>dr&&(dr=e);t<ur&&(ur=t);t>fr&&(fr=t)},lineStart:j,lineEnd:j,polygonStart:j,polygonEnd:j};function yr(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}var mr,vr={point:xr,lineStart:br,lineEnd:_r,polygonStart:function(){vr.lineStart=wr},polygonEnd:function(){vr.point=xr,vr.lineStart=br,vr.lineEnd=_r}};function xr(e,t){bn+=e,_n+=t,++wn}function br(){var e,t;function n(n,r){var a=n-e,i=r-t,o=Math.sqrt(a*a+i*i);kn+=o*(e+n)/2,Mn+=o*(t+r)/2,Tn+=o,xr(e=n,t=r)}vr.point=function(r,a){vr.point=n,xr(e=r,t=a)}}function _r(){vr.point=xr}function wr(){var e,t,n,r;function a(e,t){var a=e-n,i=t-r,o=Math.sqrt(a*a+i*i);kn+=o*(n+e)/2,Mn+=o*(r+t)/2,Tn+=o,An+=(o=r*e-n*t)*(n+e),Sn+=o*(r+t),Ln+=3*o,xr(n=e,r=t)}vr.point=function(i,o){vr.point=a,xr(e=n=i,t=r=o)},vr.lineEnd=function(){a(e,t)}}function kr(e){var t=.5,n=Math.cos(30*Ce),r=16;function a(t){return(r?function(t){var n,a,o,s,l,c,u,d,f,h,p,g,y={point:m,lineStart:v,lineEnd:b,polygonStart:function(){t.polygonStart(),y.lineStart=_},polygonEnd:function(){t.polygonEnd(),y.lineStart=v}};function m(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){d=NaN,y.point=x,t.lineStart()}function x(n,a){var o=Dn([n,a]),s=e(n,a);i(d,f,u,h,p,g,d=s[0],f=s[1],u=n,h=o[0],p=o[1],g=o[2],r,t),t.point(d,f)}function b(){y.point=m,t.lineEnd()}function _(){v(),y.point=w,y.lineEnd=k}function w(e,t){x(n=e,t),a=d,o=f,s=h,l=p,c=g,y.point=x}function k(){i(d,f,u,h,p,g,a,o,n,s,l,c,r,t),y.lineEnd=b,b()}return y}:function(t){return Tr(t,function(n,r){n=e(n,r),t.point(n[0],n[1])})})(t)}function i(r,a,o,s,l,c,u,d,f,h,p,g,y,m){var x=u-r,b=d-a,_=x*x+b*b;if(_>4*t&&y--){var w=s+h,k=l+p,M=c+g,T=Math.sqrt(w*w+k*k+M*M),A=Math.asin(M/=T),S=v(v(M)-1)<ke||v(o-f)<ke?(o+f)/2:Math.atan2(k,w),L=e(S,A),C=L[0],z=L[1],O=C-r,D=z-a,P=b*O-x*D;(P*P/_>t||v((x*O+b*D)/_-.5)>.3||s*h+l*p+c*g<n)&&(i(r,a,o,s,l,c,C,z,S,w/=T,k/=T,M,y,m),m.point(C,z),i(C,z,S,w,k,M,u,d,f,h,p,g,y,m))}}return a.precision=function(e){return arguments.length?(r=(t=e*e)>0&&16,a):Math.sqrt(t)},a}function Mr(e){this.stream=e}function Tr(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function Ar(e){return Sr(function(){return e})()}function Sr(t){var n,r,a,i,o,s,l=kr(function(e,t){return[(e=n(e,t))[0]*c+i,o-e[1]*c]}),c=150,u=480,d=250,f=0,h=0,p=0,g=0,y=0,m=tr,x=O,b=null,_=null;function w(e){return[(e=a(e[0]*Ce,e[1]*Ce))[0]*c+i,o-e[1]*c]}function k(e){return(e=a.invert((e[0]-i)/c,(o-e[1])/c))&&[e[0]*ze,e[1]*ze]}function M(){a=Yn(r=Or(p,g,y),n);var e=n(f,h);return i=u-e[0]*c,o=d+e[1]*c,T()}function T(){return s&&(s.valid=!1,s=null),w}return w.stream=function(e){return s&&(s.valid=!1),(s=Lr(m(r,l(x(e))))).valid=!0,s},w.clipAngle=function(e){return arguments.length?(m=null==e?(b=e,tr):function(e){var t=Math.cos(e),n=t>0,r=v(t)>ke;return Qn(a,function(e){var t,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(d,f){var h,p=[d,f],g=a(d,f),y=n?g?0:o(d,f):g?o(d+(d<0?Te:-Te),f):0;if(!t&&(c=l=g)&&e.lineStart(),g!==l&&(h=i(t,p),(Fn(t,h)||Fn(p,h))&&(p[0]+=ke,p[1]+=ke,g=a(p[0],p[1]))),g!==l)u=0,g?(e.lineStart(),h=i(p,t),e.point(h[0],h[1])):(h=i(t,p),e.point(h[0],h[1]),e.lineEnd()),t=h;else if(r&&t&&n^g){var m;y&s||!(m=i(p,t,!0))||(u=0,n?(e.lineStart(),e.point(m[0][0],m[0][1]),e.point(m[1][0],m[1][1]),e.lineEnd()):(e.point(m[1][0],m[1][1]),e.lineEnd(),e.lineStart(),e.point(m[0][0],m[0][1])))}!g||t&&Fn(t,p)||e.point(p[0],p[1]),t=p,l=g,s=y},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return u|(c&&l)<<1}}},jr(e,6*Ce),n?[0,-e]:[-Te,e-Te]);function a(e,n){return Math.cos(e)*Math.cos(n)>t}function i(e,n,r){var a=[1,0,0],i=In(Dn(e),Dn(n)),o=Pn(i,i),s=i[0],l=o-s*s;if(!l)return!r&&e;var c=t*o/l,u=-t*s/l,d=In(a,i),f=En(a,c);jn(f,En(i,u));var h=d,p=Pn(f,h),g=Pn(h,h),y=p*p-g*(Pn(f,f)-1);if(!(y<0)){var m=Math.sqrt(y),x=En(h,(-p-m)/g);if(jn(x,f),x=Rn(x),!r)return x;var b,_=e[0],w=n[0],k=e[1],M=n[1];w<_&&(b=_,_=w,w=b);var T=w-_,A=v(T-Te)<ke;if(!A&&M<k&&(b=k,k=M,M=b),A||T<ke?A?k+M>0^x[1]<(v(x[0]-_)<ke?k:M):k<=x[1]&&x[1]<=M:T>Te^(_<=x[0]&&x[0]<=w)){var S=En(h,(-p+m)/g);return jn(S,f),[x,Rn(S)]}}}function o(t,r){var a=n?e:Te-e,i=0;return t<-a?i|=1:t>a&&(i|=2),r<-a?i|=4:r>a&&(i|=8),i}}((b=+e)*Ce),T()):b},w.clipExtent=function(e){return arguments.length?(_=e,x=e?ar(e[0][0],e[0][1],e[1][0],e[1][1]):O,T()):_},w.scale=function(e){return arguments.length?(c=+e,M()):c},w.translate=function(e){return arguments.length?(u=+e[0],d=+e[1],M()):[u,d]},w.center=function(e){return arguments.length?(f=e[0]%360*Ce,h=e[1]%360*Ce,M()):[f*ze,h*ze]},w.rotate=function(e){return arguments.length?(p=e[0]%360*Ce,g=e[1]%360*Ce,y=e.length>2?e[2]%360*Ce:0,M()):[p*ze,g*ze,y*ze]},e.rebind(w,l,"precision"),function(){return n=t.apply(this,arguments),w.invert=n.invert&&k,M()}}function Lr(e){return Tr(e,function(t,n){e.point(t*Ce,n*Ce)})}function Cr(e,t){return[e,t]}function zr(e,t){return[e>Te?e-Ae:e<-Te?e+Ae:e,t]}function Or(e,t,n){return e?t||n?Yn(Pr(e),Ir(t,n)):Pr(e):t||n?Ir(t,n):zr}function Dr(e){return function(t,n){return[(t+=e)>Te?t-Ae:t<-Te?t+Ae:t,n]}}function Pr(e){var t=Dr(e);return t.invert=Dr(-e),t}function Ir(e,t){var n=Math.cos(e),r=Math.sin(e),a=Math.cos(t),i=Math.sin(t);function o(e,t){var o=Math.cos(t),s=Math.cos(e)*o,l=Math.sin(e)*o,c=Math.sin(t),u=c*n+s*r;return[Math.atan2(l*a-u*i,s*n-c*r),Ie(u*a+l*i)]}return o.invert=function(e,t){var o=Math.cos(t),s=Math.cos(e)*o,l=Math.sin(e)*o,c=Math.sin(t),u=c*a-l*i;return[Math.atan2(l*a+c*i,s*n+u*r),Ie(u*n-s*r)]},o}function jr(e,t){var n=Math.cos(e),r=Math.sin(e);return function(a,i,o,s){var l=o*t;null!=a?(a=Er(n,a),i=Er(n,i),(o>0?a<i:a>i)&&(a+=o*Ae)):(a=e+o*Ae,i=e-.5*l);for(var c,u=a;o>0?u>i:u<i;u-=l)s.point((c=Rn([n,-r*Math.cos(u),-r*Math.sin(u)]))[0],c[1])}}function Er(e,t){var n=Dn(t);n[0]-=e,Nn(n);var r=Pe(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-ke)%(2*Math.PI)}function Nr(t,n,r){var a=e.range(t,n-ke,r).concat(n);return function(e){return a.map(function(t){return[e,t]})}}function Rr(t,n,r){var a=e.range(t,n-ke,r).concat(n);return function(e){return a.map(function(t){return[t,e]})}}function Fr(e){return e.source}function Br(e){return e.target}e.geo.path=function(){var t,n,r,a,i,o=4.5;function s(t){return t&&("function"==typeof o&&a.pointRadius(+o.apply(this,arguments)),i&&i.valid||(i=r(a)),e.geo.stream(t,i)),a.result()}function l(){return i=null,s}return s.area=function(t){return sr=0,e.geo.stream(t,r(hr)),sr},s.centroid=function(t){return bn=_n=wn=kn=Mn=Tn=An=Sn=Ln=0,e.geo.stream(t,r(vr)),Ln?[An/Ln,Sn/Ln]:Tn?[kn/Tn,Mn/Tn]:wn?[bn/wn,_n/wn]:[NaN,NaN]},s.bounds=function(t){return dr=fr=-(cr=ur=1/0),e.geo.stream(t,r(gr)),[[cr,ur],[dr,fr]]},s.projection=function(e){return arguments.length?(r=(t=e)?e.stream||(n=e,a=kr(function(e,t){return n([e*ze,t*ze])}),function(e){return Lr(a(e))}):O,l()):t;var n,a},s.context=function(e){return arguments.length?(a=null==(n=e)?new function(){var e=yr(4.5),t=[],n={point:r,lineStart:function(){n.point=a},lineEnd:o,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=o,n.point=r},pointRadius:function(t){return e=yr(t),n},result:function(){if(t.length){var e=t.join("");return t=[],e}}};function r(n,r){t.push("M",n,",",r,e)}function a(e,r){t.push("M",e,",",r),n.point=i}function i(e,n){t.push("L",e,",",n)}function o(){n.point=r}function s(){t.push("Z")}return n}:new function(e){var t=4.5,n={point:r,lineStart:function(){n.point=a},lineEnd:o,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=o,n.point=r},pointRadius:function(e){return t=e,n},result:j};function r(n,r){e.moveTo(n+t,r),e.arc(n,r,t,0,Ae)}function a(t,r){e.moveTo(t,r),n.point=i}function i(t,n){e.lineTo(t,n)}function o(){n.point=r}function s(){e.closePath()}return n}(e),"function"!=typeof o&&a.pointRadius(o),l()):n},s.pointRadius=function(e){return arguments.length?(o="function"==typeof e?e:(a.pointRadius(+e),+e),s):o},s.projection(e.geo.albersUsa()).context(null)},e.geo.transform=function(e){return{stream:function(t){var n=new Mr(t);for(var r in e)n[r]=e[r];return n}}},Mr.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},e.geo.projection=Ar,e.geo.projectionMutator=Sr,(e.geo.equirectangular=function(){return Ar(Cr)}).raw=Cr.invert=Cr,e.geo.rotation=function(e){function t(t){return(t=e(t[0]*Ce,t[1]*Ce))[0]*=ze,t[1]*=ze,t}return e=Or(e[0]%360*Ce,e[1]*Ce,e.length>2?e[2]*Ce:0),t.invert=function(t){return(t=e.invert(t[0]*Ce,t[1]*Ce))[0]*=ze,t[1]*=ze,t},t},zr.invert=Cr,e.geo.circle=function(){var e,t,n=[0,0],r=6;function a(){var e="function"==typeof n?n.apply(this,arguments):n,r=Or(-e[0]*Ce,-e[1]*Ce,0).invert,a=[];return t(null,null,1,{point:function(e,t){a.push(e=r(e,t)),e[0]*=ze,e[1]*=ze}}),{type:"Polygon",coordinates:[a]}}return a.origin=function(e){return arguments.length?(n=e,a):n},a.angle=function(n){return arguments.length?(t=jr((e=+n)*Ce,r*Ce),a):e},a.precision=function(n){return arguments.length?(t=jr(e*Ce,(r=+n)*Ce),a):r},a.angle(90)},e.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Ce,a=e[1]*Ce,i=t[1]*Ce,o=Math.sin(r),s=Math.cos(r),l=Math.sin(a),c=Math.cos(a),u=Math.sin(i),d=Math.cos(i);return Math.atan2(Math.sqrt((n=d*o)*n+(n=c*u-l*d*s)*n),l*u+c*d*s)},e.geo.graticule=function(){var t,n,r,a,i,o,s,l,c,u,d,f,h=10,p=h,g=90,y=360,m=2.5;function x(){return{type:"MultiLineString",coordinates:b()}}function b(){return e.range(Math.ceil(a/g)*g,r,g).map(d).concat(e.range(Math.ceil(l/y)*y,s,y).map(f)).concat(e.range(Math.ceil(n/h)*h,t,h).filter(function(e){return v(e%g)>ke}).map(c)).concat(e.range(Math.ceil(o/p)*p,i,p).filter(function(e){return v(e%y)>ke}).map(u))}return x.lines=function(){return b().map(function(e){return{type:"LineString",coordinates:e}})},x.outline=function(){return{type:"Polygon",coordinates:[d(a).concat(f(s).slice(1),d(r).reverse().slice(1),f(l).reverse().slice(1))]}},x.extent=function(e){return arguments.length?x.majorExtent(e).minorExtent(e):x.minorExtent()},x.majorExtent=function(e){return arguments.length?(a=+e[0][0],r=+e[1][0],l=+e[0][1],s=+e[1][1],a>r&&(e=a,a=r,r=e),l>s&&(e=l,l=s,s=e),x.precision(m)):[[a,l],[r,s]]},x.minorExtent=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),x.precision(m)):[[n,o],[t,i]]},x.step=function(e){return arguments.length?x.majorStep(e).minorStep(e):x.minorStep()},x.majorStep=function(e){return arguments.length?(g=+e[0],y=+e[1],x):[g,y]},x.minorStep=function(e){return arguments.length?(h=+e[0],p=+e[1],x):[h,p]},x.precision=function(e){return arguments.length?(m=+e,c=Nr(o,i,90),u=Rr(n,t,m),d=Nr(l,s,90),f=Rr(a,r,m),x):m},x.majorExtent([[-180,-90+ke],[180,90-ke]]).minorExtent([[-180,-80-ke],[180,80+ke]])},e.geo.greatArc=function(){var t,n,r=Fr,a=Br;function i(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||a.apply(this,arguments)]}}return i.distance=function(){return e.geo.distance(t||r.apply(this,arguments),n||a.apply(this,arguments))},i.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,i):r},i.target=function(e){return arguments.length?(a=e,n="function"==typeof e?null:e,i):a},i.precision=function(){return arguments.length?i:0},i},e.geo.interpolate=function(e,t){return n=e[0]*Ce,r=e[1]*Ce,a=t[0]*Ce,i=t[1]*Ce,o=Math.cos(r),s=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=o*Math.cos(n),d=o*Math.sin(n),f=l*Math.cos(a),h=l*Math.sin(a),p=2*Math.asin(Math.sqrt(Ee(i-r)+o*l*Ee(a-n))),g=1/Math.sin(p),(y=p?function(e){var t=Math.sin(e*=p)*g,n=Math.sin(p-e)*g,r=n*u+t*f,a=n*d+t*h,i=n*s+t*c;return[Math.atan2(a,r)*ze,Math.atan2(i,Math.sqrt(r*r+a*a))*ze]}:function(){return[n*ze,r*ze]}).distance=p,y;var n,r,a,i,o,s,l,c,u,d,f,h,p,g,y},e.geo.length=function(t){return mr=0,e.geo.stream(t,Hr),mr};var Hr={sphere:j,point:j,lineStart:function(){var e,t,n;function r(r,a){var i=Math.sin(a*=Ce),o=Math.cos(a),s=v((r*=Ce)-e),l=Math.cos(s);mr+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=n*i-t*o*l)*s),t*i+n*o*l),e=r,t=i,n=o}Hr.point=function(a,i){e=a*Ce,t=Math.sin(i*=Ce),n=Math.cos(i),Hr.point=r},Hr.lineEnd=function(){Hr.point=Hr.lineEnd=j}},lineEnd:j,polygonStart:j,polygonEnd:j};function qr(e,t){function n(t,n){var r=Math.cos(t),a=Math.cos(n),i=e(r*a);return[i*a*Math.sin(t),i*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),a=t(r),i=Math.sin(a),o=Math.cos(a);return[Math.atan2(e*i,r*o),Math.asin(r&&n*i/r)]},n}var Vr=qr(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(e.geo.azimuthalEqualArea=function(){return Ar(Vr)}).raw=Vr;var Ur=qr(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},O);function Gr(e,t){var n=Math.cos(e),r=function(e){return Math.tan(Te/4+e/2)},a=e===t?Math.sin(e):Math.log(n/Math.cos(t))/Math.log(r(t)/r(e)),i=n*Math.pow(r(e),a)/a;if(!a)return Xr;function o(e,t){i>0?t<-Le+ke&&(t=-Le+ke):t>Le-ke&&(t=Le-ke);var n=i/Math.pow(r(t),a);return[n*Math.sin(a*e),i-n*Math.cos(a*e)]}return o.invert=function(e,t){var n=i-t,r=Oe(a)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/a,2*Math.atan(Math.pow(i/r,1/a))-Le]},o}function Yr(e,t){var n=Math.cos(e),r=e===t?Math.sin(e):(n-Math.cos(t))/(t-e),a=n/r+e;if(v(r)<ke)return Cr;function i(e,t){var n=a-t;return[n*Math.sin(r*e),a-n*Math.cos(r*e)]}return i.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/r,a-Oe(r)*Math.sqrt(e*e+n*n)]},i}(e.geo.azimuthalEquidistant=function(){return Ar(Ur)}).raw=Ur,(e.geo.conicConformal=function(){return ir(Gr)}).raw=Gr,(e.geo.conicEquidistant=function(){return ir(Yr)}).raw=Yr;var Zr=qr(function(e){return 1/e},Math.atan);function Xr(e,t){return[e,Math.log(Math.tan(Te/4+t/2))]}function Wr(e){var t,n=Ar(e),r=n.scale,a=n.translate,i=n.clipExtent;return n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=a.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var o=i.apply(n,arguments);if(o===n){if(t=null==e){var s=Te*r(),l=a();i([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else t&&(o=null);return o},n.clipExtent(null)}(e.geo.gnomonic=function(){return Ar(Zr)}).raw=Zr,Xr.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Le]},(e.geo.mercator=function(){return Wr(Xr)}).raw=Xr;var Jr=qr(function(){return 1},Math.asin);(e.geo.orthographic=function(){return Ar(Jr)}).raw=Jr;var Qr=qr(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});function $r(e,t){return[Math.log(Math.tan(Te/4+t/2)),-e]}function Kr(e){return e[0]}function ea(e){return e[1]}function ta(e){for(var t=e.length,n=[0,1],r=2,a=2;a<t;a++){for(;r>1&&De(e[n[r-2]],e[n[r-1]],e[a])<=0;)--r;n[r++]=a}return n.slice(0,r)}function na(e,t){return e[0]-t[0]||e[1]-t[1]}(e.geo.stereographic=function(){return Ar(Qr)}).raw=Qr,$r.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Le]},(e.geo.transverseMercator=function(){var e=Wr($r),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90])}).raw=$r,e.geom={},e.geom.hull=function(e){var t=Kr,n=ea;if(arguments.length)return r(e);function r(e){if(e.length<3)return[];var r,a=yt(t),i=yt(n),o=e.length,s=[],l=[];for(r=0;r<o;r++)s.push([+a.call(this,e[r],r),+i.call(this,e[r],r),r]);for(s.sort(na),r=0;r<o;r++)l.push([s[r][0],-s[r][1]]);var c=ta(s),u=ta(l),d=u[0]===c[0],f=u[u.length-1]===c[c.length-1],h=[];for(r=c.length-1;r>=0;--r)h.push(e[s[c[r]][2]]);for(r=+d;r<u.length-f;++r)h.push(e[s[u[r]][2]]);return h}return r.x=function(e){return arguments.length?(t=e,r):t},r.y=function(e){return arguments.length?(n=e,r):n},r},e.geom.polygon=function(e){return q(e,ra),e};var ra=e.geom.polygon.prototype=[];function aa(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function ia(e,t,n,r){var a=e[0],i=n[0],o=t[0]-a,s=r[0]-i,l=e[1],c=n[1],u=t[1]-l,d=r[1]-c,f=(s*(l-c)-d*(a-i))/(d*o-s*u);return[a+f*o,l+f*u]}function oa(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}ra.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],a=0;++t<n;)e=r,r=this[t],a+=e[1]*r[0]-e[0]*r[1];return.5*a},ra.centroid=function(e){var t,n,r=-1,a=this.length,i=0,o=0,s=this[a-1];for(arguments.length||(e=-1/(6*this.area()));++r<a;)t=s,s=this[r],n=t[0]*s[1]-s[0]*t[1],i+=(t[0]+s[0])*n,o+=(t[1]+s[1])*n;return[i*e,o*e]},ra.clip=function(e){for(var t,n,r,a,i,o,s=oa(e),l=-1,c=this.length-oa(this),u=this[c-1];++l<c;){for(t=e.slice(),e.length=0,a=this[l],i=t[(r=t.length-s)-1],n=-1;++n<r;)aa(o=t[n],u,a)?(aa(i,u,a)||e.push(ia(i,o,u,a)),e.push(o)):aa(i,u,a)&&e.push(ia(i,o,u,a)),i=o;s&&e.push(e[0]),u=a}return e};var sa,la,ca,ua,da,fa=[],ha=[];function pa(e){var t=fa.pop()||new function(){za(this),this.edge=this.site=this.circle=null};return t.site=e,t}function ga(e){ka(e),ca.remove(e),fa.push(e),za(e)}function ya(e){var t=e.circle,n=t.x,r=t.cy,a={x:n,y:r},i=e.P,o=e.N,s=[e];ga(e);for(var l=i;l.circle&&v(n-l.circle.x)<ke&&v(r-l.circle.cy)<ke;)i=l.P,s.unshift(l),ga(l),l=i;s.unshift(l),ka(l);for(var c=o;c.circle&&v(n-c.circle.x)<ke&&v(r-c.circle.cy)<ke;)o=c.N,s.push(c),ga(c),c=o;s.push(c),ka(c);var u,d=s.length;for(u=1;u<d;++u)c=s[u],l=s[u-1],Sa(c.edge,l.site,c.site,a);l=s[0],(c=s[d-1]).edge=Aa(l.site,c.site,null,a),wa(l),wa(c)}function ma(e){for(var t,n,r,a,i=e.x,o=e.y,s=ca._;s;)if((r=va(s,o)-i)>ke)s=s.L;else{if(!((a=i-xa(s,o))>ke)){r>-ke?(t=s.P,n=s):a>-ke?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=pa(e);if(ca.insert(t,l),t||n){if(t===n)return ka(t),n=pa(t.site),ca.insert(l,n),l.edge=n.edge=Aa(t.site,l.site),wa(t),void wa(n);if(n){ka(t),ka(n);var c=t.site,u=c.x,d=c.y,f=e.x-u,h=e.y-d,p=n.site,g=p.x-u,y=p.y-d,m=2*(f*y-h*g),v=f*f+h*h,x=g*g+y*y,b={x:(y*v-h*x)/m+u,y:(f*x-g*v)/m+d};Sa(n.edge,c,p,b),l.edge=Aa(c,e,null,b),n.edge=Aa(e,p,null,b),wa(t),wa(n)}else l.edge=Aa(t.site,l.site)}}function va(e,t){var n=e.site,r=n.x,a=n.y,i=a-t;if(!i)return r;var o=e.P;if(!o)return-1/0;var s=(n=o.site).x,l=n.y,c=l-t;if(!c)return s;var u=s-r,d=1/i-1/c,f=u/c;return d?(-f+Math.sqrt(f*f-2*d*(u*u/(-2*c)-l+c/2+a-i/2)))/d+r:(r+s)/2}function xa(e,t){var n=e.N;if(n)return va(n,t);var r=e.site;return r.y===t?r.x:1/0}function ba(e){this.site=e,this.edges=[]}function _a(e,t){return t.angle-e.angle}function wa(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,a=e.site,i=n.site;if(r!==i){var o=a.x,s=a.y,l=r.x-o,c=r.y-s,u=i.x-o,d=2*(l*(y=i.y-s)-c*u);if(!(d>=-Me)){var f=l*l+c*c,h=u*u+y*y,p=(y*f-c*h)/d,g=(l*h-u*f)/d,y=g+s,m=ha.pop()||new function(){za(this),this.x=this.y=this.arc=this.site=this.cy=null};m.arc=e,m.site=a,m.x=p+o,m.y=y+Math.sqrt(p*p+g*g),m.cy=y,e.circle=m;for(var v=null,x=da._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){v=x.P;break}x=x.L}else{if(!x.R){v=x;break}x=x.R}da.insert(v,m),v||(ua=m)}}}}function ka(e){var t=e.circle;t&&(t.P||(ua=t.N),da.remove(t),ha.push(t),za(t),e.circle=null)}function Ma(e,t){var n=e.b;if(n)return!0;var r,a,i=e.a,o=t[0][0],s=t[1][0],l=t[0][1],c=t[1][1],u=e.l,d=e.r,f=u.x,h=u.y,p=d.x,g=d.y,y=(f+p)/2,m=(h+g)/2;if(g===h){if(y<o||y>=s)return;if(f>p){if(i){if(i.y>=c)return}else i={x:y,y:l};n={x:y,y:c}}else{if(i){if(i.y<l)return}else i={x:y,y:c};n={x:y,y:l}}}else if(a=m-(r=(f-p)/(g-h))*y,r<-1||r>1)if(f>p){if(i){if(i.y>=c)return}else i={x:(l-a)/r,y:l};n={x:(c-a)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-a)/r,y:c};n={x:(l-a)/r,y:l}}else if(h<g){if(i){if(i.x>=s)return}else i={x:o,y:r*o+a};n={x:s,y:r*s+a}}else{if(i){if(i.x<o)return}else i={x:s,y:r*s+a};n={x:o,y:r*o+a}}return e.a=i,e.b=n,!0}function Ta(e,t){this.l=e,this.r=t,this.a=this.b=null}function Aa(e,t,n,r){var a=new Ta(e,t);return sa.push(a),n&&Sa(a,e,t,n),r&&Sa(a,t,e,r),la[e.i].edges.push(new La(a,e,t)),la[t.i].edges.push(new La(a,t,e)),a}function Sa(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function La(e,t,n){var r=e.a,a=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(a.x-r.x,r.y-a.y):Math.atan2(r.x-a.x,a.y-r.y)}function Ca(){this._=null}function za(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Oa(e,t){var n=t,r=t.R,a=n.U;a?a.L===n?a.L=r:a.R=r:e._=r,r.U=a,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Da(e,t){var n=t,r=t.L,a=n.U;a?a.L===n?a.L=r:a.R=r:e._=r,r.U=a,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Pa(e){for(;e.L;)e=e.L;return e}function Ia(e,t){var n,r,a,i=e.sort(ja).pop();for(sa=[],la=new Array(e.length),ca=new Ca,da=new Ca;;)if(a=ua,i&&(!a||i.y<a.y||i.y===a.y&&i.x<a.x))i.x===n&&i.y===r||(la[i.i]=new ba(i),ma(i),n=i.x,r=i.y),i=e.pop();else{if(!a)break;ya(a.arc)}t&&(function(e){for(var t,n=sa,r=nr(e[0][0],e[0][1],e[1][0],e[1][1]),a=n.length;a--;)(!Ma(t=n[a],e)||!r(t)||v(t.a.x-t.b.x)<ke&&v(t.a.y-t.b.y)<ke)&&(t.a=t.b=null,n.splice(a,1))}(t),function(e){for(var t,n,r,a,i,o,s,l,c,u,d=e[0][0],f=e[1][0],h=e[0][1],p=e[1][1],g=la,y=g.length;y--;)if((i=g[y])&&i.prepare())for(l=(s=i.edges).length,o=0;o<l;)r=(u=s[o].end()).x,a=u.y,t=(c=s[++o%l].start()).x,n=c.y,(v(r-t)>ke||v(a-n)>ke)&&(s.splice(o,0,new La((m=i.site,x=u,b=v(r-d)<ke&&p-a>ke?{x:d,y:v(t-d)<ke?n:p}:v(a-p)<ke&&f-r>ke?{x:v(n-p)<ke?t:f,y:p}:v(r-f)<ke&&a-h>ke?{x:f,y:v(t-f)<ke?n:h}:v(a-h)<ke&&r-d>ke?{x:v(n-h)<ke?t:d,y:h}:null,_=void 0,_=new Ta(m,null),_.a=x,_.b=b,sa.push(_),_),i.site,null)),++l);var m,x,b,_}(t));var o={cells:la,edges:sa};return ca=da=sa=la=null,o}function ja(e,t){return t.y-e.y||t.x-e.x}ba.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)(e=t[n].edge).b&&e.a||t.splice(n,1);return t.sort(_a),t.length},La.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Ca.prototype={insert:function(e,t){var n,r,a;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=Pa(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(a=r.R)&&a.C?(n.C=a.C=!1,r.C=!0,e=r):(e===n.R&&(Oa(this,n),n=(e=n).U),n.C=!1,r.C=!0,Da(this,r)):(a=r.L)&&a.C?(n.C=a.C=!1,r.C=!0,e=r):(e===n.L&&(Da(this,n),n=(e=n).U),n.C=!1,r.C=!0,Oa(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,a=e.U,i=e.L,o=e.R;if(n=i?o?Pa(o):i:o,a?a.L===e?a.L=n:a.R=n:this._=n,i&&o?(r=n.C,n.C=e.C,n.L=i,i.U=n,n!==o?(a=n.U,n.U=e.U,e=n.R,a.L=e,n.R=o,o.U=n):(n.U=a,a=n,e=n.R)):(r=e.C,e=n),e&&(e.U=a),!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===a.L){if((t=a.R).C&&(t.C=!1,a.C=!0,Oa(this,a),t=a.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Da(this,t),t=a.R),t.C=a.C,a.C=t.R.C=!1,Oa(this,a),e=this._;break}}else if((t=a.L).C&&(t.C=!1,a.C=!0,Da(this,a),t=a.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Oa(this,t),t=a.L),t.C=a.C,a.C=t.L.C=!1,Da(this,a),e=this._;break}t.C=!0,e=a,a=a.U}while(!e.C);e&&(e.C=!1)}}},e.geom.voronoi=function(e){var t=Kr,n=ea,r=t,a=n,i=Ea;if(e)return o(e);function o(e){var t=new Array(e.length),n=i[0][0],r=i[0][1],a=i[1][0],o=i[1][1];return Ia(s(e),i).cells.forEach(function(i,s){var l=i.edges,c=i.site;(t[s]=l.length?l.map(function(e){var t=e.start();return[t.x,t.y]}):c.x>=n&&c.x<=a&&c.y>=r&&c.y<=o?[[n,o],[a,o],[a,r],[n,r]]:[]).point=e[s]}),t}function s(e){return e.map(function(e,t){return{x:Math.round(r(e,t)/ke)*ke,y:Math.round(a(e,t)/ke)*ke,i:t}})}return o.links=function(e){return Ia(s(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},o.triangles=function(e){var t=[];return Ia(s(e)).cells.forEach(function(n,r){for(var a,i,o,s,l=n.site,c=n.edges.sort(_a),u=-1,d=c.length,f=c[d-1].edge,h=f.l===l?f.r:f.l;++u<d;)f,a=h,h=(f=c[u].edge).l===l?f.r:f.l,r<a.i&&r<h.i&&(o=a,s=h,((i=l).x-s.x)*(o.y-i.y)-(i.x-o.x)*(s.y-i.y)<0)&&t.push([e[r],e[a.i],e[h.i]])}),t},o.x=function(e){return arguments.length?(r=yt(t=e),o):t},o.y=function(e){return arguments.length?(a=yt(n=e),o):n},o.clipExtent=function(e){return arguments.length?(i=null==e?Ea:e,o):i===Ea?null:i},o.size=function(e){return arguments.length?o.clipExtent(e&&[[0,0],e]):i===Ea?null:i&&i[1]},o};var Ea=[[-1e6,-1e6],[1e6,1e6]];function Na(e){return e.x}function Ra(e){return e.y}function Fa(t,n){t=e.rgb(t),n=e.rgb(n);var r=t.r,a=t.g,i=t.b,o=n.r-r,s=n.g-a,l=n.b-i;return function(e){return"#"+ct(Math.round(r+o*e))+ct(Math.round(a+s*e))+ct(Math.round(i+l*e))}}function Ba(e,t){var n,r={},a={};for(n in e)n in t?r[n]=Ga(e[n],t[n]):a[n]=e[n];for(n in t)n in e||(a[n]=t[n]);return function(e){for(n in r)a[n]=r[n](e);return a}}function Ha(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function qa(e,t){var n,r,a,i=Va.lastIndex=Ua.lastIndex=0,o=-1,s=[],l=[];for(e+="",t+="";(n=Va.exec(e))&&(r=Ua.exec(t));)(a=r.index)>i&&(a=t.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:Ha(n,r)})),i=Ua.lastIndex;return i<t.length&&(a=t.slice(i),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}e.geom.delaunay=function(t){return e.geom.voronoi().triangles(t)},e.geom.quadtree=function(e,t,n,r,a){var i,o=Kr,s=ea;if(i=arguments.length)return o=Na,s=Ra,3===i&&(a=n,r=t,n=t=0),l(e);function l(e){var l,c,u,d,f,h,p,g,y,m=yt(o),x=yt(s);if(null!=t)h=t,p=n,g=r,y=a;else if(g=y=-(h=p=1/0),c=[],u=[],f=e.length,i)for(d=0;d<f;++d)(l=e[d]).x<h&&(h=l.x),l.y<p&&(p=l.y),l.x>g&&(g=l.x),l.y>y&&(y=l.y),c.push(l.x),u.push(l.y);else for(d=0;d<f;++d){var b=+m(l=e[d],d),_=+x(l,d);b<h&&(h=b),_<p&&(p=_),b>g&&(g=b),_>y&&(y=_),c.push(b),u.push(_)}var w=g-h,k=y-p;function M(e,t,n,r,a,i,o,s){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(v(l-n)+v(c-r)<.01)T(e,t,n,r,a,i,o,s);else{var u=e.point;e.x=e.y=e.point=null,T(e,u,l,c,a,i,o,s),T(e,t,n,r,a,i,o,s)}else e.x=n,e.y=r,e.point=t}else T(e,t,n,r,a,i,o,s)}function T(e,t,n,r,a,i,o,s){var l=.5*(a+o),c=.5*(i+s),u=n>=l,d=r>=c,f=d<<1|u;e.leaf=!1,e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){M(A,e,+m(e,++d),+x(e,d),h,p,g,y)}}),u?a=l:o=l,d?i=c:s=c,M(e,t,n,r,a,i,o,s)}w>k?y=p+w:g=h+k;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){M(A,e,+m(e,++d),+x(e,d),h,p,g,y)}};if(A.visit=function(e){!function e(t,n,r,a,i,o){if(!t(n,r,a,i,o)){var s=.5*(r+i),l=.5*(a+o),c=n.nodes;c[0]&&e(t,c[0],r,a,s,l),c[1]&&e(t,c[1],s,a,i,l),c[2]&&e(t,c[2],r,l,s,o),c[3]&&e(t,c[3],s,l,i,o)}}(e,A,h,p,g,y)},A.find=function(e){return function(e,t,n,r,a,i,o){var s,l=1/0;return function e(c,u,d,f,h){if(!(u>i||d>o||f<r||h<a)){if(p=c.point){var p,g=t-c.x,y=n-c.y,m=g*g+y*y;if(m<l){var v=Math.sqrt(l=m);r=t-v,a=n-v,i=t+v,o=n+v,s=p}}for(var x=c.nodes,b=.5*(u+f),_=.5*(d+h),w=(n>=_)<<1|t>=b,k=w+4;w<k;++w)if(c=x[3&w])switch(3&w){case 0:e(c,u,d,b,_);break;case 1:e(c,b,d,f,_);break;case 2:e(c,u,_,b,h);break;case 3:e(c,b,_,f,h)}}}(e,r,a,i,o),s}(A,e[0],e[1],h,p,g,y)},d=-1,null==t){for(;++d<f;)M(A,e[d],c[d],u[d],h,p,g,y);--d}else e.forEach(A.add);return c=u=e=l=null,A}return l.x=function(e){return arguments.length?(o=e,l):o},l.y=function(e){return arguments.length?(s=e,l):s},l.extent=function(e){return arguments.length?(null==e?t=n=r=a=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],a=+e[1][1]),l):null==t?null:[[t,n],[r,a]]},l.size=function(e){return arguments.length?(null==e?t=n=r=a=null:(t=n=0,r=+e[0],a=+e[1]),l):null==t?null:[r-t,a-n]},l},e.interpolateRgb=Fa,e.interpolateObject=Ba,e.interpolateNumber=Ha,e.interpolateString=qa;var Va=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ua=new RegExp(Va.source,"g");function Ga(t,n){for(var r,a=e.interpolators.length;--a>=0&&!(r=e.interpolators[a](t,n)););return r}function Ya(e,t){var n,r=[],a=[],i=e.length,o=t.length,s=Math.min(e.length,t.length);for(n=0;n<s;++n)r.push(Ga(e[n],t[n]));for(;n<i;++n)a[n]=e[n];for(;n<o;++n)a[n]=t[n];return function(e){for(n=0;n<s;++n)a[n]=r[n](e);return a}}e.interpolate=Ga,e.interpolators=[function(e,t){var n=typeof t;return("string"===n?gt.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?Fa:qa:t instanceof He?Fa:Array.isArray(t)?Ya:"object"===n&&isNaN(t)?Ba:Ha)(e,t)}],e.interpolateArray=Ya;var Za=function(){return O},Xa=e.map({linear:Za,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return $a},cubic:function(){return Ka},sin:function(){return ti},exp:function(){return ni},circle:function(){return ri},elastic:function(e,t){var n;arguments.length<2&&(t=.45);arguments.length?n=t/Ae*Math.asin(1/e):(e=1,n=t/4);return function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ae/t)}},back:function(e){e||(e=1.70158);return function(t){return t*t*((e+1)*t-e)}},bounce:function(){return ai}}),Wa=e.map({in:O,out:Ja,"in-out":Qa,"out-in":function(e){return Qa(Ja(e))}});function Ja(e){return function(t){return 1-e(1-t)}}function Qa(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function $a(e){return e*e}function Ka(e){return e*e*e}function ei(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function ti(e){return 1-Math.cos(e*Le)}function ni(e){return Math.pow(2,10*(e-1))}function ri(e){return 1-Math.sqrt(1-e*e)}function ai(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function ii(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function oi(e){var t,n,r,a=[e.a,e.b],i=[e.c,e.d],o=li(a),s=si(a,i),l=li(((t=i)[0]+=(r=-s)*(n=a)[0],t[1]+=r*n[1],t))||0;a[0]*i[1]<i[0]*a[1]&&(a[0]*=-1,a[1]*=-1,o*=-1,s*=-1),this.rotate=(o?Math.atan2(a[1],a[0]):Math.atan2(-i[0],i[1]))*ze,this.translate=[e.e,e.f],this.scale=[o,l],this.skew=l?Math.atan2(s,l)*ze:0}function si(e,t){return e[0]*t[0]+e[1]*t[1]}function li(e){var t=Math.sqrt(si(e,e));return t&&(e[0]/=t,e[1]/=t),t}e.ease=function(e){var t,r=e.indexOf("-"),a=r>=0?e.slice(0,r):e,i=r>=0?e.slice(r+1):"in";return a=Xa.get(a)||Za,i=Wa.get(i)||O,t=i(a.apply(null,n.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},e.interpolateHcl=function(t,n){t=e.hcl(t),n=e.hcl(n);var r=t.h,a=t.c,i=t.l,o=n.h-r,s=n.c-a,l=n.l-i;isNaN(s)&&(s=0,a=isNaN(a)?n.c:a);isNaN(o)?(o=0,r=isNaN(r)?n.h:r):o>180?o-=360:o<-180&&(o+=360);return function(e){return Ze(r+o*e,a+s*e,i+l*e)+""}},e.interpolateHsl=function(t,n){t=e.hsl(t),n=e.hsl(n);var r=t.h,a=t.s,i=t.l,o=n.h-r,s=n.s-a,l=n.l-i;isNaN(s)&&(s=0,a=isNaN(a)?n.s:a);isNaN(o)?(o=0,r=isNaN(r)?n.h:r):o>180?o-=360:o<-180&&(o+=360);return function(e){return Ue(r+o*e,a+s*e,i+l*e)+""}},e.interpolateLab=function(t,n){t=e.lab(t),n=e.lab(n);var r=t.l,a=t.a,i=t.b,o=n.l-r,s=n.a-a,l=n.b-i;return function(e){return et(r+o*e,a+s*e,i+l*e)+""}},e.interpolateRound=ii,e.transform=function(t){var n=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){n.setAttribute("transform",e);var t=n.transform.baseVal.consolidate()}return new oi(t?t.matrix:ci)})(t)},oi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ci={a:1,b:0,c:0,d:1,e:0,f:0};function ui(e){return e.length?e.pop()+",":""}function di(t,n){var r=[],a=[];return t=e.transform(t),n=e.transform(n),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var a=n.push("translate(",null,",",null,")");r.push({i:a-4,x:Ha(e[0],t[0])},{i:a-2,x:Ha(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}(t.translate,n.translate,r,a),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(ui(n)+"rotate(",null,")")-2,x:Ha(e,t)})):t&&n.push(ui(n)+"rotate("+t+")")}(t.rotate,n.rotate,r,a),function(e,t,n,r){e!==t?r.push({i:n.push(ui(n)+"skewX(",null,")")-2,x:Ha(e,t)}):t&&n.push(ui(n)+"skewX("+t+")")}(t.skew,n.skew,r,a),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var a=n.push(ui(n)+"scale(",null,",",null,")");r.push({i:a-4,x:Ha(e[0],t[0])},{i:a-2,x:Ha(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(ui(n)+"scale("+t+")")}(t.scale,n.scale,r,a),t=n=null,function(e){for(var t,n=-1,i=a.length;++n<i;)r[(t=a[n]).i]=t.x(e);return r.join("")}}function fi(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function hi(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function pi(e){for(var t=e.source,n=e.target,r=function(e,t){if(e===t)return e;var n=gi(e),r=gi(t),a=n.pop(),i=r.pop(),o=null;for(;a===i;)o=a,a=n.pop(),i=r.pop();return o}(t,n),a=[t];t!==r;)t=t.parent,a.push(t);for(var i=a.length;n!==r;)a.splice(i,0,n),n=n.parent;return a}function gi(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function yi(e){e.fixed|=2}function mi(e){e.fixed&=-7}function vi(e){e.fixed|=4,e.px=e.x,e.py=e.y}function xi(e){e.fixed&=-5}e.interpolateTransform=di,e.layout={},e.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(pi(e[n]));return t}},e.layout.chord=function(){var t,n,r,a,i,o,s,l={},c=0;function u(){var l,u,f,h,p,g={},y=[],m=e.range(a),v=[];for(t=[],n=[],l=0,h=-1;++h<a;){for(u=0,p=-1;++p<a;)u+=r[h][p];y.push(u),v.push(e.range(a)),l+=u}for(i&&m.sort(function(e,t){return i(y[e],y[t])}),o&&v.forEach(function(e,t){e.sort(function(e,n){return o(r[t][e],r[t][n])})}),l=(Ae-c*a)/l,u=0,h=-1;++h<a;){for(f=u,p=-1;++p<a;){var x=m[h],b=v[x][p],_=r[x][b],w=u,k=u+=_*l;g[x+"-"+b]={index:x,subindex:b,startAngle:w,endAngle:k,value:_}}n[x]={index:x,startAngle:f,endAngle:u,value:y[x]},u+=c}for(h=-1;++h<a;)for(p=h-1;++p<a;){var M=g[h+"-"+p],T=g[p+"-"+h];(M.value||T.value)&&t.push(M.value<T.value?{source:T,target:M}:{source:M,target:T})}s&&d()}function d(){t.sort(function(e,t){return s((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}return l.matrix=function(e){return arguments.length?(a=(r=e)&&r.length,t=n=null,l):r},l.padding=function(e){return arguments.length?(c=e,t=n=null,l):c},l.sortGroups=function(e){return arguments.length?(i=e,t=n=null,l):i},l.sortSubgroups=function(e){return arguments.length?(o=e,t=null,l):o},l.sortChords=function(e){return arguments.length?(s=e,t&&d(),l):s},l.chords=function(){return t||u(),t},l.groups=function(){return n||u(),n},l},e.layout.force=function(){var t,n,r,a,i,o,s={},l=e.dispatch("start","tick","end"),c=[1,1],u=.9,d=bi,f=_i,h=-30,p=wi,g=.1,y=.64,m=[],v=[];function x(e){return function(t,n,r,a){if(t.point!==e){var i=t.cx-e.x,o=t.cy-e.y,s=a-n,l=i*i+o*o;if(s*s/y<l){if(l<p){var c=t.charge/l;e.px-=i*c,e.py-=o*c}return!0}if(t.point&&l&&l<p){c=t.pointCharge/l;e.px-=i*c,e.py-=o*c}}return!t.charge}}function b(t){t.px=e.event.x,t.py=e.event.y,s.resume()}return s.tick=function(){if((r*=.99)<.005)return t=null,l.end({type:"end",alpha:r=0}),!0;var n,s,d,f,p,y,b,_,w,k=m.length,M=v.length;for(s=0;s<M;++s)f=(d=v[s]).source,(y=(_=(p=d.target).x-f.x)*_+(w=p.y-f.y)*w)&&(_*=y=r*i[s]*((y=Math.sqrt(y))-a[s])/y,w*=y,p.x-=_*(b=f.weight+p.weight?f.weight/(f.weight+p.weight):.5),p.y-=w*b,f.x+=_*(b=1-b),f.y+=w*b);if((b=r*g)&&(_=c[0]/2,w=c[1]/2,s=-1,b))for(;++s<k;)(d=m[s]).x+=(_-d.x)*b,d.y+=(w-d.y)*b;if(h)for(!function e(t,n,r){var a=0,i=0;t.charge=0;if(!t.leaf)for(var o,s=t.nodes,l=s.length,c=-1;++c<l;)null!=(o=s[c])&&(e(o,n,r),t.charge+=o.charge,a+=o.charge*o.cx,i+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var u=n*r[t.point.index];t.charge+=t.pointCharge=u,a+=u*t.point.x,i+=u*t.point.y}t.cx=a/t.charge;t.cy=i/t.charge}(n=e.geom.quadtree(m),r,o),s=-1;++s<k;)(d=m[s]).fixed||n.visit(x(d));for(s=-1;++s<k;)(d=m[s]).fixed?(d.x=d.px,d.y=d.py):(d.x-=(d.px-(d.px=d.x))*u,d.y-=(d.py-(d.py=d.y))*u);l.tick({type:"tick",alpha:r})},s.nodes=function(e){return arguments.length?(m=e,s):m},s.links=function(e){return arguments.length?(v=e,s):v},s.size=function(e){return arguments.length?(c=e,s):c},s.linkDistance=function(e){return arguments.length?(d="function"==typeof e?e:+e,s):d},s.distance=s.linkDistance,s.linkStrength=function(e){return arguments.length?(f="function"==typeof e?e:+e,s):f},s.friction=function(e){return arguments.length?(u=+e,s):u},s.charge=function(e){return arguments.length?(h="function"==typeof e?e:+e,s):h},s.chargeDistance=function(e){return arguments.length?(p=e*e,s):Math.sqrt(p)},s.gravity=function(e){return arguments.length?(g=+e,s):g},s.theta=function(e){return arguments.length?(y=e*e,s):Math.sqrt(y)},s.alpha=function(e){return arguments.length?(e=+e,r?e>0?r=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:r=0})):e>0&&(l.start({type:"start",alpha:r=e}),t=Mt(s.tick)),s):r},s.start=function(){var e,t,n,r=m.length,l=v.length,u=c[0],p=c[1];for(e=0;e<r;++e)(n=m[e]).index=e,n.weight=0;for(e=0;e<l;++e)"number"==typeof(n=v[e]).source&&(n.source=m[n.source]),"number"==typeof n.target&&(n.target=m[n.target]),++n.source.weight,++n.target.weight;for(e=0;e<r;++e)n=m[e],isNaN(n.x)&&(n.x=g("x",u)),isNaN(n.y)&&(n.y=g("y",p)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(a=[],"function"==typeof d)for(e=0;e<l;++e)a[e]=+d.call(this,v[e],e);else for(e=0;e<l;++e)a[e]=d;if(i=[],"function"==typeof f)for(e=0;e<l;++e)i[e]=+f.call(this,v[e],e);else for(e=0;e<l;++e)i[e]=f;if(o=[],"function"==typeof h)for(e=0;e<r;++e)o[e]=+h.call(this,m[e],e);else for(e=0;e<r;++e)o[e]=h;function g(n,a){if(!t){for(t=new Array(r),c=0;c<r;++c)t[c]=[];for(c=0;c<l;++c){var i=v[c];t[i.source.index].push(i.target),t[i.target.index].push(i.source)}}for(var o,s=t[e],c=-1,u=s.length;++c<u;)if(!isNaN(o=s[c][n]))return o;return Math.random()*a}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(n||(n=e.behavior.drag().origin(O).on("dragstart.force",yi).on("drag.force",b).on("dragend.force",mi)),!arguments.length)return n;this.on("mouseover.force",vi).on("mouseout.force",xi).call(n)},e.rebind(s,l,"on")};var bi=20,_i=1,wi=1/0;function ki(t,n){return e.rebind(t,n,"sort","children","value"),t.nodes=t,t.links=Ci,t}function Mi(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(a=e.children)&&(r=a.length))for(var r,a;--r>=0;)n.push(a[r])}function Ti(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(i=e.children)&&(a=i.length))for(var a,i,o=-1;++o<a;)n.push(i[o]);for(;null!=(e=r.pop());)t(e)}function Ai(e){return e.children}function Si(e){return e.value}function Li(e,t){return t.value-e.value}function Ci(t){return e.merge(t.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}e.layout.hierarchy=function(){var e=Li,t=Ai,n=Si;function r(a){var i,o=[a],s=[];for(a.depth=0;null!=(i=o.pop());)if(s.push(i),(c=t.call(r,i,i.depth))&&(l=c.length)){for(var l,c,u;--l>=0;)o.push(u=c[l]),u.parent=i,u.depth=i.depth+1;n&&(i.value=0),i.children=c}else n&&(i.value=+n.call(r,i,i.depth)||0),delete i.children;return Ti(a,function(t){var r,a;e&&(r=t.children)&&r.sort(e),n&&(a=t.parent)&&(a.value+=t.value)}),s}return r.sort=function(t){return arguments.length?(e=t,r):e},r.children=function(e){return arguments.length?(t=e,r):t},r.value=function(e){return arguments.length?(n=e,r):n},r.revalue=function(e){return n&&(Mi(e,function(e){e.children&&(e.value=0)}),Ti(e,function(e){var t;e.children||(e.value=+n.call(r,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)})),e},r},e.layout.partition=function(){var t=e.layout.hierarchy(),n=[1,1];function r(e,r){var a=t.call(this,e,r);return function e(t,n,r,a){var i=t.children;if(t.x=n,t.y=t.depth*a,t.dx=r,t.dy=a,i&&(o=i.length)){var o,s,l,c=-1;for(r=t.value?r/t.value:0;++c<o;)e(s=i[c],n,l=s.value*r,a),n+=l}}(a[0],0,n[0],n[1]/function e(t){var n=t.children,r=0;if(n&&(a=n.length))for(var a,i=-1;++i<a;)r=Math.max(r,e(n[i]));return 1+r}(a[0])),a}return r.size=function(e){return arguments.length?(n=e,r):n},ki(r,t)},e.layout.pie=function(){var t=Number,n=zi,r=0,a=Ae,i=0;function o(s){var l,c=s.length,u=s.map(function(e,n){return+t.call(o,e,n)}),d=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof a?a.apply(this,arguments):a)-d,h=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),p=h*(f<0?-1:1),g=e.sum(u),y=g?(f-c*p)/g:0,m=e.range(c),v=[];return null!=n&&m.sort(n===zi?function(e,t){return u[t]-u[e]}:function(e,t){return n(s[e],s[t])}),m.forEach(function(e){v[e]={data:s[e],value:l=u[e],startAngle:d,endAngle:d+=l*y+p,padAngle:h}}),v}return o.value=function(e){return arguments.length?(t=e,o):t},o.sort=function(e){return arguments.length?(n=e,o):n},o.startAngle=function(e){return arguments.length?(r=e,o):r},o.endAngle=function(e){return arguments.length?(a=e,o):a},o.padAngle=function(e){return arguments.length?(i=e,o):i},o};var zi={};function Oi(e){return e.x}function Di(e){return e.y}function Pi(e,t,n){e.y0=t,e.y=n}e.layout.stack=function(){var t=O,n=Ei,r=Ni,a=Pi,i=Oi,o=Di;function s(l,c){if(!(h=l.length))return l;var u=l.map(function(e,n){return t.call(s,e,n)}),d=u.map(function(e){return e.map(function(e,t){return[i.call(s,e,t),o.call(s,e,t)]})}),f=n.call(s,d,c);u=e.permute(u,f),d=e.permute(d,f);var h,p,g,y,m=r.call(s,d,c),v=u[0].length;for(g=0;g<v;++g)for(a.call(s,u[0][g],y=m[g],d[0][g][1]),p=1;p<h;++p)a.call(s,u[p][g],y+=d[p-1][g][1],d[p][g][1]);return l}return s.values=function(e){return arguments.length?(t=e,s):t},s.order=function(e){return arguments.length?(n="function"==typeof e?e:Ii.get(e)||Ei,s):n},s.offset=function(e){return arguments.length?(r="function"==typeof e?e:ji.get(e)||Ni,s):r},s.x=function(e){return arguments.length?(i=e,s):i},s.y=function(e){return arguments.length?(o=e,s):o},s.out=function(e){return arguments.length?(a=e,s):a},s};var Ii=e.map({"inside-out":function(t){var n,r,a=t.length,i=t.map(Ri),o=t.map(Fi),s=e.range(a).sort(function(e,t){return i[e]-i[t]}),l=0,c=0,u=[],d=[];for(n=0;n<a;++n)r=s[n],l<c?(l+=o[r],u.push(r)):(c+=o[r],d.push(r));return d.reverse().concat(u)},reverse:function(t){return e.range(t.length).reverse()},default:Ei}),ji=e.map({silhouette:function(e){var t,n,r,a=e.length,i=e[0].length,o=[],s=0,l=[];for(n=0;n<i;++n){for(t=0,r=0;t<a;t++)r+=e[t][n][1];r>s&&(s=r),o.push(r)}for(n=0;n<i;++n)l[n]=(s-o[n])/2;return l},wiggle:function(e){var t,n,r,a,i,o,s,l,c,u=e.length,d=e[0],f=d.length,h=[];for(h[0]=l=c=0,n=1;n<f;++n){for(t=0,a=0;t<u;++t)a+=e[t][n][1];for(t=0,i=0,s=d[n][0]-d[n-1][0];t<u;++t){for(r=0,o=(e[t][n][1]-e[t][n-1][1])/(2*s);r<t;++r)o+=(e[r][n][1]-e[r][n-1][1])/s;i+=o*e[t][n][1]}h[n]=l-=a?i/a*s:0,l<c&&(c=l)}for(n=0;n<f;++n)h[n]-=c;return h},expand:function(e){var t,n,r,a=e.length,i=e[0].length,o=1/a,s=[];for(n=0;n<i;++n){for(t=0,r=0;t<a;t++)r+=e[t][n][1];if(r)for(t=0;t<a;t++)e[t][n][1]/=r;else for(t=0;t<a;t++)e[t][n][1]=o}for(n=0;n<i;++n)s[n]=0;return s},zero:Ni});function Ei(t){return e.range(t.length)}function Ni(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function Ri(e){for(var t,n=1,r=0,a=e[0][1],i=e.length;n<i;++n)(t=e[n][1])>a&&(r=n,a=t);return r}function Fi(e){return e.reduce(Bi,0)}function Bi(e,t){return e+t[1]}function Hi(e,t){return qi(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function qi(e,t){for(var n=-1,r=+e[0],a=(e[1]-r)/t,i=[];++n<=t;)i[n]=a*n+r;return i}function Vi(t){return[e.min(t),e.max(t)]}function Ui(e,t){return e.value-t.value}function Gi(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Yi(e,t){e._pack_next=t,t._pack_prev=e}function Zi(e,t){var n=t.x-e.x,r=t.y-e.y,a=e.r+t.r;return.999*a*a>n*n+r*r}function Xi(e){if((t=e.children)&&(l=t.length)){var t,n,r,a,i,o,s,l,c=1/0,u=-1/0,d=1/0,f=-1/0;if(t.forEach(Wi),(n=t[0]).x=-n.r,n.y=0,x(n),l>1&&((r=t[1]).x=r.r,r.y=0,x(r),l>2))for(Qi(n,r,a=t[2]),x(a),Gi(n,a),n._pack_prev=a,Gi(a,r),r=n._pack_next,i=3;i<l;i++){Qi(n,r,a=t[i]);var h=0,p=1,g=1;for(o=r._pack_next;o!==r;o=o._pack_next,p++)if(Zi(o,a)){h=1;break}if(1==h)for(s=n._pack_prev;s!==o._pack_prev&&!Zi(s,a);s=s._pack_prev,g++);h?(p<g||p==g&&r.r<n.r?Yi(n,r=o):Yi(n=s,r),i--):(Gi(n,a),r=a,x(a))}var y=(c+u)/2,m=(d+f)/2,v=0;for(i=0;i<l;i++)(a=t[i]).x-=y,a.y-=m,v=Math.max(v,a.r+Math.sqrt(a.x*a.x+a.y*a.y));e.r=v,t.forEach(Ji)}function x(e){c=Math.min(e.x-e.r,c),u=Math.max(e.x+e.r,u),d=Math.min(e.y-e.r,d),f=Math.max(e.y+e.r,f)}}function Wi(e){e._pack_next=e._pack_prev=e}function Ji(e){delete e._pack_next,delete e._pack_prev}function Qi(e,t,n){var r=e.r+n.r,a=t.x-e.x,i=t.y-e.y;if(r&&(a||i)){var o=t.r+n.r,s=a*a+i*i,l=.5+((r*=r)-(o*=o))/(2*s),c=Math.sqrt(Math.max(0,2*o*(r+s)-(r-=s)*r-o*o))/(2*s);n.x=e.x+l*a+c*i,n.y=e.y+l*i-c*a}else n.x=e.x+r,n.y=e.y}function $i(e,t){return e.parent==t.parent?1:2}function Ki(e){var t=e.children;return t.length?t[0]:e.t}function eo(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function to(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function no(e,t,n){return e.a.parent===t.parent?e.a:n}function ro(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function ao(e,t){var n=e.x+t[3],r=e.y+t[0],a=e.dx-t[1]-t[3],i=e.dy-t[0]-t[2];return a<0&&(n+=a/2,a=0),i<0&&(r+=i/2,i=0),{x:n,y:r,dx:a,dy:i}}function io(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function oo(e){return e.rangeExtent?e.rangeExtent():io(e.range())}function so(e,t,n,r){var a=n(e[0],e[1]),i=r(t[0],t[1]);return function(e){return i(a(e))}}function lo(e,t){var n,r=0,a=e.length-1,i=e[r],o=e[a];return o<i&&(n=r,r=a,a=n,n=i,i=o,o=n),e[r]=t.floor(i),e[a]=t.ceil(o),e}function co(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:uo}e.layout.histogram=function(){var t=!0,n=Number,r=Vi,a=Hi;function i(i,o){for(var s,l,c=[],u=i.map(n,this),d=r.call(this,u,o),f=a.call(this,d,u,o),h=(o=-1,u.length),p=f.length-1,g=t?1:1/h;++o<p;)(s=c[o]=[]).dx=f[o+1]-(s.x=f[o]),s.y=0;if(p>0)for(o=-1;++o<h;)(l=u[o])>=d[0]&&l<=d[1]&&((s=c[e.bisect(f,l,1,p)-1]).y+=g,s.push(i[o]));return c}return i.value=function(e){return arguments.length?(n=e,i):n},i.range=function(e){return arguments.length?(r=yt(e),i):r},i.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return qi(t,e)}:yt(e),i):a},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},e.layout.pack=function(){var t,n=e.layout.hierarchy().sort(Ui),r=0,a=[1,1];function i(e,i){var o=n.call(this,e,i),s=o[0],l=a[0],c=a[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,Ti(s,function(e){e.r=+u(e.value)}),Ti(s,Xi),r){var d=r*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;Ti(s,function(e){e.r+=d}),Ti(s,Xi),Ti(s,function(e){e.r-=d})}return function e(t,n,r,a){var i=t.children;t.x=n+=a*t.x;t.y=r+=a*t.y;t.r*=a;if(i)for(var o=-1,s=i.length;++o<s;)e(i[o],n,r,a)}(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),o}return i.size=function(e){return arguments.length?(a=e,i):a},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(e){return arguments.length?(r=+e,i):r},ki(i,n)},e.layout.tree=function(){var t=e.layout.hierarchy().sort(null).value(null),n=$i,r=[1,1],a=null;function i(e,i){var c=t.call(this,e,i),u=c[0],d=function(e){var t,n={A:null,children:[e]},r=[n];for(;null!=(t=r.pop());)for(var a,i=t.children,o=0,s=i.length;o<s;++o)r.push((i[o]=a={_:i[o],parent:t,children:(a=i[o].children)&&a.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=a);return n.children[0]}(u);if(Ti(d,o),d.parent.m=-d.z,Mi(d,s),a)Mi(u,l);else{var f=u,h=u,p=u;Mi(u,function(e){e.x<f.x&&(f=e),e.x>h.x&&(h=e),e.depth>p.depth&&(p=e)});var g=n(f,h)/2-f.x,y=r[0]/(h.x+n(h,f)/2+g),m=r[1]/(p.depth||1);Mi(u,function(e){e.x=(e.x+g)*y,e.y=e.depth*m})}return c}function o(e){var t=e.children,r=e.parent.children,a=e.i?r[e.i-1]:null;if(t.length){!function(e){var t,n=0,r=0,a=e.children,i=a.length;for(;--i>=0;)(t=a[i]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(e);var i=(t[0].z+t[t.length-1].z)/2;a?(e.z=a.z+n(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+n(e._,a._));e.parent.A=function(e,t,r){if(t){for(var a,i=e,o=e,s=t,l=i.parent.children[0],c=i.m,u=o.m,d=s.m,f=l.m;s=eo(s),i=Ki(i),s&&i;)l=Ki(l),(o=eo(o)).a=e,(a=s.z+d-i.z-c+n(s._,i._))>0&&(to(no(s,e,r),e,a),c+=a,u+=a),d+=s.m,c+=i.m,f+=l.m,u+=o.m;s&&!eo(o)&&(o.t=s,o.m+=d-u),i&&!Ki(l)&&(l.t=i,l.m+=c-f,r=e)}return r}(e,a,e.parent.A||r[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=r[0],e.y=e.depth*r[1]}return i.separation=function(e){return arguments.length?(n=e,i):n},i.size=function(e){return arguments.length?(a=null==(r=e)?l:null,i):a?null:r},i.nodeSize=function(e){return arguments.length?(a=null==(r=e)?null:l,i):a?r:null},ki(i,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),n=$i,r=[1,1],a=!1;function i(i,o){var s,l=t.call(this,i,o),c=l[0],u=0;Ti(c,function(t){var r=t.children;r&&r.length?(t.x=function(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}(r),t.y=function(t){return 1+e.max(t,function(e){return e.y})}(r)):(t.x=s?u+=n(t,s):0,t.y=0,s=t)});var d=function e(t){var n=t.children;return n&&n.length?e(n[0]):t}(c),f=function e(t){var n,r=t.children;return r&&(n=r.length)?e(r[n-1]):t}(c),h=d.x-n(d,f)/2,p=f.x+n(f,d)/2;return Ti(c,a?function(e){e.x=(e.x-c.x)*r[0],e.y=(c.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(p-h)*r[0],e.y=(1-(c.y?e.y/c.y:1))*r[1]}),l}return i.separation=function(e){return arguments.length?(n=e,i):n},i.size=function(e){return arguments.length?(a=null==(r=e),i):a?null:r},i.nodeSize=function(e){return arguments.length?(a=null!=(r=e),i):a?r:null},ki(i,t)},e.layout.treemap=function(){var t,n=e.layout.hierarchy(),r=Math.round,a=[1,1],i=null,o=ro,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var n,r,a=-1,i=e.length;++a<i;)r=(n=e[a]).value*(t<0?0:t),n.area=isNaN(r)||r<=0?0:r}function d(e){var t=e.children;if(t&&t.length){var n,r,a,i=o(e),s=[],c=t.slice(),f=1/0,g="slice"===l?i.dx:"dice"===l?i.dy:"slice-dice"===l?1&e.depth?i.dy:i.dx:Math.min(i.dx,i.dy);for(u(c,i.dx*i.dy/e.value),s.area=0;(a=c.length)>0;)s.push(n=c[a-1]),s.area+=n.area,"squarify"!==l||(r=h(s,g))<=f?(c.pop(),f=r):(s.area-=s.pop().area,p(s,g,i,!1),g=Math.min(i.dx,i.dy),s.length=s.area=0,f=1/0);s.length&&(p(s,g,i,!0),s.length=s.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var n,r=o(e),a=t.slice(),i=[];for(u(a,r.dx*r.dy/e.value),i.area=0;n=a.pop();)i.push(n),i.area+=n.area,null!=n.z&&(p(i,n.z?r.dx:r.dy,r,!a.length),i.length=i.area=0);t.forEach(f)}}function h(e,t){for(var n,r=e.area,a=0,i=1/0,o=-1,s=e.length;++o<s;)(n=e[o].area)&&(n<i&&(i=n),n>a&&(a=n));return t*=t,(r*=r)?Math.max(t*a*c/r,r/(t*i*c)):1/0}function p(e,t,n,a){var i,o=-1,s=e.length,l=n.x,c=n.y,u=t?r(e.area/t):0;if(t==n.dx){for((a||u>n.dy)&&(u=n.dy);++o<s;)(i=e[o]).x=l,i.y=c,i.dy=u,l+=i.dx=Math.min(n.x+n.dx-l,u?r(i.area/u):0);i.z=!0,i.dx+=n.x+n.dx-l,n.y+=u,n.dy-=u}else{for((a||u>n.dx)&&(u=n.dx);++o<s;)(i=e[o]).x=l,i.y=c,i.dx=u,c+=i.dy=Math.min(n.y+n.dy-c,u?r(i.area/u):0);i.z=!1,i.dy+=n.y+n.dy-c,n.x+=u,n.dx-=u}}function g(e){var r=t||n(e),i=r[0];return i.x=i.y=0,i.value?(i.dx=a[0],i.dy=a[1]):i.dx=i.dy=0,t&&n.revalue(i),u([i],i.dx*i.dy/i.value),(t?f:d)(i),s&&(t=r),r}return g.size=function(e){return arguments.length?(a=e,g):a},g.padding=function(e){if(!arguments.length)return i;function t(t){return ao(t,e)}var n;return o=null==(i=e)?ro:"function"==(n=typeof e)?function(t){var n=e.call(g,t,t.depth);return null==n?ro(t):ao(t,"number"==typeof n?[n,n,n,n]:n)}:"number"===n?(e=[e,e,e,e],t):t,g},g.round=function(e){return arguments.length?(r=e?Math.round:Number,g):r!=Number},g.sticky=function(e){return arguments.length?(s=e,t=null,g):s},g.ratio=function(e){return arguments.length?(c=e,g):c},g.mode=function(e){return arguments.length?(l=e+"",g):l},ki(g,n)},e.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,a;do{a=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!a||a>1);return e+t*n*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=e.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t}}},e.scale={};var uo={floor:O,ceil:O};function fo(t,n,r,a){var i=[],o=[],s=0,l=Math.min(t.length,n.length)-1;for(t[l]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++s<=l;)i.push(r(t[s-1],t[s])),o.push(a(n[s-1],n[s]));return function(n){var r=e.bisect(t,n,1,l)-1;return o[r](i[r](n))}}function ho(t,n){return e.rebind(t,n,"range","rangeRound","interpolate","clamp")}function po(e,t){return lo(e,co(go(e,t)[2])),lo(e,co(go(e,t)[2])),e}function go(e,t){null==t&&(t=10);var n=io(e),r=n[1]-n[0],a=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*a;return i<=.15?a*=10:i<=.35?a*=5:i<=.75&&(a*=2),n[0]=Math.ceil(n[0]/a)*a,n[1]=Math.floor(n[1]/a)*a+.5*a,n[2]=a,n}function yo(t,n){return e.range.apply(e,go(t,n))}function mo(t,n,r){var a=go(t,n);if(r){var i=zt.exec(r);if(i.shift(),"s"===i[8]){var o=e.formatPrefix(Math.max(v(a[0]),v(a[1])));return i[7]||(i[7]="."+xo(o.scale(a[2]))),i[8]="f",r=e.format(i.join("")),function(e){return r(o.scale(e))+o.symbol}}i[7]||(i[7]="."+function(e,t){var n=xo(t[2]);return e in vo?Math.abs(n-xo(Math.max(v(t[0]),v(t[1]))))+ +("e"!==e):n-2*("%"===e)}(i[8],a)),r=i.join("")}else r=",."+xo(a[2])+"f";return e.format(r)}e.scale.linear=function(){return function e(t,n,r,a){var i,o;function s(){var e=Math.min(t.length,n.length)>2?fo:so,s=a?hi:fi;return i=e(t,n,s,r),o=e(n,t,s,Ga),l}function l(e){return i(e)}l.invert=function(e){return o(e)};l.domain=function(e){return arguments.length?(t=e.map(Number),s()):t};l.range=function(e){return arguments.length?(n=e,s()):n};l.rangeRound=function(e){return l.range(e).interpolate(ii)};l.clamp=function(e){return arguments.length?(a=e,s()):a};l.interpolate=function(e){return arguments.length?(r=e,s()):r};l.ticks=function(e){return yo(t,e)};l.tickFormat=function(e,n){return mo(t,e,n)};l.nice=function(e){return po(t,e),s()};l.copy=function(){return e(t,n,r,a)};return s()}([0,1],[0,1],Ga,!1)};var vo={s:1,g:1,p:1,r:1,e:1};function xo(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}e.scale.log=function(){return function t(n,r,a,i){function o(e){return(a?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(r)}function s(e){return a?Math.pow(r,e):-Math.pow(r,-e)}function l(e){return n(o(e))}l.invert=function(e){return s(n.invert(e))};l.domain=function(e){return arguments.length?(a=e[0]>=0,n.domain((i=e.map(Number)).map(o)),l):i};l.base=function(e){return arguments.length?(r=+e,n.domain(i.map(o)),l):r};l.nice=function(){var e=lo(i.map(o),a?Math:_o);return n.domain(e),i=e.map(s),l};l.ticks=function(){var e=io(i),t=[],n=e[0],l=e[1],c=Math.floor(o(n)),u=Math.ceil(o(l)),d=r%1?2:r;if(isFinite(u-c)){if(a){for(;c<u;c++)for(var f=1;f<d;f++)t.push(s(c)*f);t.push(s(c))}else for(t.push(s(c));c++<u;)for(var f=d-1;f>0;f--)t.push(s(c)*f);for(c=0;t[c]<n;c++);for(u=t.length;t[u-1]>l;u--);t=t.slice(c,u)}return t};l.tickFormat=function(t,n){if(!arguments.length)return bo;arguments.length<2?n=bo:"function"!=typeof n&&(n=e.format(n));var a=Math.max(1,r*t/l.ticks().length);return function(e){var t=e/s(Math.round(o(e)));return t*r<r-.5&&(t*=r),t<=a?n(e):""}};l.copy=function(){return t(n.copy(),r,a,i)};return ho(l,n)}(e.scale.linear().domain([0,1]),10,!0,[1,10])};var bo=e.format(".0e"),_o={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function wo(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}e.scale.pow=function(){return function e(t,n,r){var a=wo(n),i=wo(1/n);function o(e){return t(a(e))}o.invert=function(e){return i(t.invert(e))};o.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(a)),o):r};o.ticks=function(e){return yo(r,e)};o.tickFormat=function(e,t){return mo(r,e,t)};o.nice=function(e){return o.domain(po(r,e))};o.exponent=function(e){return arguments.length?(a=wo(n=e),i=wo(1/n),t.domain(r.map(a)),o):n};o.copy=function(){return e(t.copy(),n,r)};return ho(o,t)}(e.scale.linear(),1,[0,1])},e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return function t(n,r){var a,i,o;function s(e){return i[((a.get(e)||("range"===r.t?a.set(e,n.push(e)):NaN))-1)%i.length]}function l(t,r){return e.range(n.length).map(function(e){return t+r*e})}s.domain=function(e){if(!arguments.length)return n;n=[],a=new b;for(var t,i=-1,o=e.length;++i<o;)a.has(t=e[i])||a.set(t,n.push(t));return s[r.t].apply(s,r.a)};s.range=function(e){return arguments.length?(i=e,o=0,r={t:"range",a:arguments},s):i};s.rangePoints=function(e,t){arguments.length<2&&(t=0);var a=e[0],c=e[1],u=n.length<2?(a=(a+c)/2,0):(c-a)/(n.length-1+t);return i=l(a+u*t/2,u),o=0,r={t:"rangePoints",a:arguments},s};s.rangeRoundPoints=function(e,t){arguments.length<2&&(t=0);var a=e[0],c=e[1],u=n.length<2?(a=c=Math.round((a+c)/2),0):(c-a)/(n.length-1+t)|0;return i=l(a+Math.round(u*t/2+(c-a-(n.length-1+t)*u)/2),u),o=0,r={t:"rangeRoundPoints",a:arguments},s};s.rangeBands=function(e,t,a){arguments.length<2&&(t=0),arguments.length<3&&(a=t);var c=e[1]<e[0],u=e[c-0],d=e[1-c],f=(d-u)/(n.length-t+2*a);return i=l(u+f*a,f),c&&i.reverse(),o=f*(1-t),r={t:"rangeBands",a:arguments},s};s.rangeRoundBands=function(e,t,a){arguments.length<2&&(t=0),arguments.length<3&&(a=t);var c=e[1]<e[0],u=e[c-0],d=e[1-c],f=Math.floor((d-u)/(n.length-t+2*a));return i=l(u+Math.round((d-u-(n.length-t)*f)/2),f),c&&i.reverse(),o=Math.round(f*(1-t)),r={t:"rangeRoundBands",a:arguments},s};s.rangeBand=function(){return o};s.rangeExtent=function(){return io(r.a[0])};s.copy=function(){return t(n,r)};return s.domain(n)}([],{t:"range",a:[[]]})},e.scale.category10=function(){return e.scale.ordinal().range(ko)},e.scale.category20=function(){return e.scale.ordinal().range(Mo)},e.scale.category20b=function(){return e.scale.ordinal().range(To)},e.scale.category20c=function(){return e.scale.ordinal().range(Ao)};var ko=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(st),Mo=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(st),To=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(st),Ao=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(st);function So(){return 0}e.scale.quantile=function(){return function t(n,r){var a;function i(){var t=0,i=r.length;for(a=[];++t<i;)a[t-1]=e.quantile(n,t/i);return o}function o(t){if(!isNaN(t=+t))return r[e.bisect(a,t)]}o.domain=function(e){return arguments.length?(n=e.map(h).filter(p).sort(f),i()):n};o.range=function(e){return arguments.length?(r=e,i()):r};o.quantiles=function(){return a};o.invertExtent=function(e){return(e=r.indexOf(e))<0?[NaN,NaN]:[e>0?a[e-1]:n[0],e<a.length?a[e]:n[n.length-1]]};o.copy=function(){return t(n,r)};return i()}([],[])},e.scale.quantize=function(){return function e(t,n,r){var a,i;function o(e){return r[Math.max(0,Math.min(i,Math.floor(a*(e-t))))]}function s(){return a=r.length/(n-t),i=r.length-1,o}o.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],s()):[t,n]};o.range=function(e){return arguments.length?(r=e,s()):r};o.invertExtent=function(e){return[e=(e=r.indexOf(e))<0?NaN:e/a+t,e+1/a]};o.copy=function(){return e(t,n,r)};return s()}(0,1,[0,1])},e.scale.threshold=function(){return function t(n,r){function a(t){if(t<=t)return r[e.bisect(n,t)]}a.domain=function(e){return arguments.length?(n=e,a):n};a.range=function(e){return arguments.length?(r=e,a):r};a.invertExtent=function(e){return e=r.indexOf(e),[n[e-1],n[e]]};a.copy=function(){return t(n,r)};return a}([.5],[0,1])},e.scale.identity=function(){return function e(t){function n(e){return+e}n.invert=n;n.domain=n.range=function(e){return arguments.length?(t=e.map(n),n):t};n.ticks=function(e){return yo(t,e)};n.tickFormat=function(e,n){return mo(t,e,n)};n.copy=function(){return e(t)};return n}([0,1])},e.svg={},e.svg.arc=function(){var e=Co,t=zo,n=So,r=Lo,a=Oo,i=Do,o=Po;function s(){var s=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+t.apply(this,arguments)),u=a.apply(this,arguments)-Le,d=i.apply(this,arguments)-Le,f=Math.abs(d-u),h=u>d?0:1;if(c<s&&(p=c,c=s,s=p),f>=Se)return l(c,h)+(s?l(s,1-h):"")+"Z";var p,g,y,m,v,x,b,_,w,k,M,T,A=0,S=0,L=[];if((m=(+o.apply(this,arguments)||0)/2)&&(y=r===Lo?Math.sqrt(s*s+c*c):+r.apply(this,arguments),h||(S*=-1),c&&(S=Ie(y/c*Math.sin(m))),s&&(A=Ie(y/s*Math.sin(m)))),c){v=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(d-S),_=c*Math.sin(d-S);var C=Math.abs(d-u-2*S)<=Te?0:1;if(S&&Io(v,x,b,_)===h^C){var z=(u+d)/2;v=c*Math.cos(z),x=c*Math.sin(z),b=_=null}}else v=x=0;if(s){w=s*Math.cos(d-A),k=s*Math.sin(d-A),M=s*Math.cos(u+A),T=s*Math.sin(u+A);var O=Math.abs(u-d+2*A)<=Te?0:1;if(A&&Io(w,k,M,T)===1-h^O){var D=(u+d)/2;w=s*Math.cos(D),k=s*Math.sin(D),M=T=null}}else w=k=0;if(f>ke&&(p=Math.min(Math.abs(c-s)/2,+n.apply(this,arguments)))>.001){g=s<c^h?0:1;var P=p,I=p;if(f<Te){var j=null==M?[w,k]:null==b?[v,x]:ia([v,x],[M,T],[b,_],[w,k]),E=v-j[0],N=x-j[1],R=b-j[0],F=_-j[1],B=1/Math.sin(Math.acos((E*R+N*F)/(Math.sqrt(E*E+N*N)*Math.sqrt(R*R+F*F)))/2),H=Math.sqrt(j[0]*j[0]+j[1]*j[1]);I=Math.min(p,(s-H)/(B-1)),P=Math.min(p,(c-H)/(B+1))}if(null!=b){var q=jo(null==M?[w,k]:[M,T],[v,x],c,P,h),V=jo([b,_],[w,k],c,P,h);p===P?L.push("M",q[0],"A",P,",",P," 0 0,",g," ",q[1],"A",c,",",c," 0 ",1-h^Io(q[1][0],q[1][1],V[1][0],V[1][1]),",",h," ",V[1],"A",P,",",P," 0 0,",g," ",V[0]):L.push("M",q[0],"A",P,",",P," 0 1,",g," ",V[0])}else L.push("M",v,",",x);if(null!=M){var U=jo([v,x],[M,T],s,-I,h),G=jo([w,k],null==b?[v,x]:[b,_],s,-I,h);p===I?L.push("L",G[0],"A",I,",",I," 0 0,",g," ",G[1],"A",s,",",s," 0 ",h^Io(G[1][0],G[1][1],U[1][0],U[1][1]),",",1-h," ",U[1],"A",I,",",I," 0 0,",g," ",U[0]):L.push("L",G[0],"A",I,",",I," 0 0,",g," ",U[0])}else L.push("L",w,",",k)}else L.push("M",v,",",x),null!=b&&L.push("A",c,",",c," 0 ",C,",",h," ",b,",",_),L.push("L",w,",",k),null!=M&&L.push("A",s,",",s," 0 ",O,",",1-h," ",M,",",T);return L.push("Z"),L.join("")}function l(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}return s.innerRadius=function(t){return arguments.length?(e=yt(t),s):e},s.outerRadius=function(e){return arguments.length?(t=yt(e),s):t},s.cornerRadius=function(e){return arguments.length?(n=yt(e),s):n},s.padRadius=function(e){return arguments.length?(r=e==Lo?Lo:yt(e),s):r},s.startAngle=function(e){return arguments.length?(a=yt(e),s):a},s.endAngle=function(e){return arguments.length?(i=yt(e),s):i},s.padAngle=function(e){return arguments.length?(o=yt(e),s):o},s.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-Le;return[Math.cos(r)*n,Math.sin(r)*n]},s};var Lo="auto";function Co(e){return e.innerRadius}function zo(e){return e.outerRadius}function Oo(e){return e.startAngle}function Do(e){return e.endAngle}function Po(e){return e&&e.padAngle}function Io(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function jo(e,t,n,r,a){var i=e[0]-t[0],o=e[1]-t[1],s=(a?r:-r)/Math.sqrt(i*i+o*o),l=s*o,c=-s*i,u=e[0]+l,d=e[1]+c,f=t[0]+l,h=t[1]+c,p=(u+f)/2,g=(d+h)/2,y=f-u,m=h-d,v=y*y+m*m,x=n-r,b=u*h-f*d,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*v-b*b)),w=(b*m-y*_)/v,k=(-b*y-m*_)/v,M=(b*m+y*_)/v,T=(-b*y+m*_)/v,A=w-p,S=k-g,L=M-p,C=T-g;return A*A+S*S>L*L+C*C&&(w=M,k=T),[[w-l,k-c],[w*n/x,k*n/x]]}function Eo(e){var t=Kr,n=ea,r=Zn,a=Ro,i=a.key,o=.7;function s(i){var s,l=[],c=[],u=-1,d=i.length,f=yt(t),h=yt(n);function p(){l.push("M",a(e(c),o))}for(;++u<d;)r.call(this,s=i[u],u)?c.push([+f.call(this,s,u),+h.call(this,s,u)]):c.length&&(p(),c=[]);return c.length&&p(),l.length?l.join(""):null}return s.x=function(e){return arguments.length?(t=e,s):t},s.y=function(e){return arguments.length?(n=e,s):n},s.defined=function(e){return arguments.length?(r=e,s):r},s.interpolate=function(e){return arguments.length?(i="function"==typeof e?a=e:(a=No.get(e)||Ro).key,s):i},s.tension=function(e){return arguments.length?(o=e,s):o},s}e.svg.line=function(){return Eo(O)};var No=e.map({linear:Ro,"linear-closed":Fo,step:function(e){var t=0,n=e.length,r=e[0],a=[r[0],",",r[1]];for(;++t<n;)a.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);n>1&&a.push("H",r[0]);return a.join("")},"step-before":Bo,"step-after":Ho,basis:Uo,"basis-open":function(e){if(e.length<4)return Ro(e);var t,n=[],r=-1,a=e.length,i=[0],o=[0];for(;++r<3;)t=e[r],i.push(t[0]),o.push(t[1]);n.push(Go(Xo,i)+","+Go(Xo,o)),--r;for(;++r<a;)t=e[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),Wo(n,i,o);return n.join("")},"basis-closed":function(e){var t,n,r=-1,a=e.length,i=a+4,o=[],s=[];for(;++r<4;)n=e[r%a],o.push(n[0]),s.push(n[1]);t=[Go(Xo,o),",",Go(Xo,s)],--r;for(;++r<i;)n=e[r%a],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),Wo(t,o,s);return t.join("")},bundle:function(e,t){var n=e.length-1;if(n)for(var r,a,i=e[0][0],o=e[0][1],s=e[n][0]-i,l=e[n][1]-o,c=-1;++c<=n;)r=e[c],a=c/n,r[0]=t*r[0]+(1-t)*(i+a*s),r[1]=t*r[1]+(1-t)*(o+a*l);return Uo(e)},cardinal:function(e,t){return e.length<3?Ro(e):e[0]+qo(e,Vo(e,t))},"cardinal-open":function(e,t){return e.length<4?Ro(e):e[1]+qo(e.slice(1,-1),Vo(e,t))},"cardinal-closed":function(e,t){return e.length<3?Fo(e):e[0]+qo((e.push(e[0]),e),Vo([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?Ro(e):e[0]+qo(e,function(e){var t,n,r,a,i=[],o=function(e){var t=0,n=e.length-1,r=[],a=e[0],i=e[1],o=r[0]=Jo(a,i);for(;++t<n;)r[t]=(o+(o=Jo(a=i,i=e[t+1])))/2;return r[t]=o,r}(e),s=-1,l=e.length-1;for(;++s<l;)t=Jo(e[s],e[s+1]),v(t)<ke?o[s]=o[s+1]=0:(n=o[s]/t,r=o[s+1]/t,(a=n*n+r*r)>9&&(a=3*t/Math.sqrt(a),o[s]=a*n,o[s+1]=a*r));s=-1;for(;++s<=l;)a=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),i.push([a||0,o[s]*a||0]);return i}(e))}});function Ro(e){return e.length>1?e.join("L"):e+"Z"}function Fo(e){return e.join("L")+"Z"}function Bo(e){for(var t=0,n=e.length,r=e[0],a=[r[0],",",r[1]];++t<n;)a.push("V",(r=e[t])[1],"H",r[0]);return a.join("")}function Ho(e){for(var t=0,n=e.length,r=e[0],a=[r[0],",",r[1]];++t<n;)a.push("H",(r=e[t])[0],"V",r[1]);return a.join("")}function qo(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return Ro(e);var n=e.length!=t.length,r="",a=e[0],i=e[1],o=t[0],s=o,l=1;if(n&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],a=e[1],l=2),t.length>1){s=t[1],i=e[l],l++,r+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-s[0])+","+(i[1]-s[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=e[l],s=t[c],r+="S"+(i[0]-s[0])+","+(i[1]-s[1])+","+i[0]+","+i[1]}if(n){var u=e[l];r+="Q"+(i[0]+2*s[0]/3)+","+(i[1]+2*s[1]/3)+","+u[0]+","+u[1]}return r}function Vo(e,t){for(var n,r=[],a=(1-t)/2,i=e[0],o=e[1],s=1,l=e.length;++s<l;)n=i,i=o,o=e[s],r.push([a*(o[0]-n[0]),a*(o[1]-n[1])]);return r}function Uo(e){if(e.length<3)return Ro(e);var t=1,n=e.length,r=e[0],a=r[0],i=r[1],o=[a,a,a,(r=e[1])[0]],s=[i,i,i,r[1]],l=[a,",",i,"L",Go(Xo,o),",",Go(Xo,s)];for(e.push(e[n-1]);++t<=n;)r=e[t],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),Wo(l,o,s);return e.pop(),l.push("L",r),l.join("")}function Go(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}No.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Yo=[0,2/3,1/3,0],Zo=[0,1/3,2/3,0],Xo=[0,1/6,2/3,1/6];function Wo(e,t,n){e.push("C",Go(Yo,t),",",Go(Yo,n),",",Go(Zo,t),",",Go(Zo,n),",",Go(Xo,t),",",Go(Xo,n))}function Jo(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Qo(e){for(var t,n,r,a=-1,i=e.length;++a<i;)n=(t=e[a])[0],r=t[1]-Le,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function $o(e){var t=Kr,n=Kr,r=0,a=ea,i=Zn,o=Ro,s=o.key,l=o,c="L",u=.7;function d(s){var d,f,h,p=[],g=[],y=[],m=-1,v=s.length,x=yt(t),b=yt(r),_=t===n?function(){return f}:yt(n),w=r===a?function(){return h}:yt(a);function k(){p.push("M",o(e(y),u),c,l(e(g.reverse()),u),"Z")}for(;++m<v;)i.call(this,d=s[m],m)?(g.push([f=+x.call(this,d,m),h=+b.call(this,d,m)]),y.push([+_.call(this,d,m),+w.call(this,d,m)])):g.length&&(k(),g=[],y=[]);return g.length&&k(),p.length?p.join(""):null}return d.x=function(e){return arguments.length?(t=n=e,d):n},d.x0=function(e){return arguments.length?(t=e,d):t},d.x1=function(e){return arguments.length?(n=e,d):n},d.y=function(e){return arguments.length?(r=a=e,d):a},d.y0=function(e){return arguments.length?(r=e,d):r},d.y1=function(e){return arguments.length?(a=e,d):a},d.defined=function(e){return arguments.length?(i=e,d):i},d.interpolate=function(e){return arguments.length?(s="function"==typeof e?o=e:(o=No.get(e)||Ro).key,l=o.reverse||o,c=o.closed?"M":"L",d):s},d.tension=function(e){return arguments.length?(u=e,d):u},d}function Ko(e){return e.radius}function es(e){return[e.x,e.y]}function ts(){return 64}function ns(){return"circle"}function rs(e){var t=Math.sqrt(e/Te);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}e.svg.line.radial=function(){var e=Eo(Qo);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},Bo.reverse=Ho,Ho.reverse=Bo,e.svg.area=function(){return $o(O)},e.svg.area.radial=function(){var e=$o(Qo);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},e.svg.chord=function(){var e=Fr,t=Br,n=Ko,r=Oo,a=Do;function i(n,r){var a,i,c=o(this,e,n,r),u=o(this,t,n,r);return"M"+c.p0+s(c.r,c.p1,c.a1-c.a0)+(i=u,(a=c).a0==i.a0&&a.a1==i.a1?l(c.r,c.p1,c.r,c.p0):l(c.r,c.p1,u.r,u.p0)+s(u.r,u.p1,u.a1-u.a0)+l(u.r,u.p1,c.r,c.p0))+"Z"}function o(e,t,i,o){var s=t.call(e,i,o),l=n.call(e,s,o),c=r.call(e,s,o)-Le,u=a.call(e,s,o)-Le;return{r:l,a0:c,a1:u,p0:[l*Math.cos(c),l*Math.sin(c)],p1:[l*Math.cos(u),l*Math.sin(u)]}}function s(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Te)+",1 "+t}function l(e,t,n,r){return"Q 0,0 "+r}return i.radius=function(e){return arguments.length?(n=yt(e),i):n},i.source=function(t){return arguments.length?(e=yt(t),i):e},i.target=function(e){return arguments.length?(t=yt(e),i):t},i.startAngle=function(e){return arguments.length?(r=yt(e),i):r},i.endAngle=function(e){return arguments.length?(a=yt(e),i):a},i},e.svg.diagonal=function(){var e=Fr,t=Br,n=es;function r(r,a){var i=e.call(this,r,a),o=t.call(this,r,a),s=(i.y+o.y)/2,l=[i,{x:i.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(n))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return r.source=function(t){return arguments.length?(e=yt(t),r):e},r.target=function(e){return arguments.length?(t=yt(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),n=es,r=t.projection;return t.projection=function(e){return arguments.length?r(function(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Le;return[n*Math.cos(r),n*Math.sin(r)]}}(n=e)):n},t},e.svg.symbol=function(){var e=ns,t=ts;function n(n,r){return(as.get(e.call(this,n,r))||rs)(t.call(this,n,r))}return n.type=function(t){return arguments.length?(e=yt(t),n):e},n.size=function(e){return arguments.length?(t=yt(e),n):t},n};var as=e.map({circle:rs,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*os)),n=t*os;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/is),n=t*is/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/is),n=t*is/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});e.svg.symbolTypes=as.keys();var is=Math.sqrt(3),os=Math.tan(30*Ce);Z.transition=function(e){for(var t,n,r=us||++hs,a=ys(e),i=[],o=ds||{time:Date.now(),ease:ei,delay:0,duration:250},s=-1,l=this.length;++s<l;){i.push(t=[]);for(var c=this[s],u=-1,d=c.length;++u<d;)(n=c[u])&&ms(n,u,a,r,o),t.push(n)}return cs(i,a,r)},Z.interrupt=function(e){return this.each(null==e?ss:ls(ys(e)))};var ss=ls(ys());function ls(e){return function(){var t,n,r;(t=this[e])&&(r=t[n=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[n]:delete this[e],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function cs(e,t,n){return q(e,fs),e.namespace=t,e.id=n,e}var us,ds,fs=[],hs=0;function ps(e,t,n,r){var a=e.id,i=e.namespace;return ue(e,"function"==typeof n?function(e,o,s){e[i][a].tween.set(t,r(n.call(e,e.__data__,o,s)))}:(n=r(n),function(e){e[i][a].tween.set(t,n)}))}function gs(e){return null==e&&(e=""),function(){this.textContent=e}}function ys(e){return null==e?"__transition__":"__transition_"+e+"__"}function ms(e,t,n,r,a){var i,o,s,l,c,u=e[n]||(e[n]={active:0,count:0}),d=u[r];function f(n){var a=u.active,f=u[a];for(var p in f&&(f.timer.c=null,f.timer.t=NaN,--u.count,delete u[a],f.event&&f.event.interrupt.call(e,e.__data__,f.index)),u)if(+p<r){var g=u[p];g.timer.c=null,g.timer.t=NaN,--u.count,delete u[p]}o.c=h,Mt(function(){return o.c&&h(n||1)&&(o.c=null,o.t=NaN),1},0,i),u.active=r,d.event&&d.event.start.call(e,e.__data__,t),c=[],d.tween.forEach(function(n,r){(r=r.call(e,e.__data__,t))&&c.push(r)}),l=d.ease,s=d.duration}function h(a){for(var i=a/s,o=l(i),f=c.length;f>0;)c[--f].call(e,o);if(i>=1)return d.event&&d.event.end.call(e,e.__data__,t),--u.count?delete u[r]:delete e[n],1}d||(i=a.time,o=Mt(function(e){var t=d.delay;if(o.t=t+i,t<=e)return f(e-t);o.c=f},0,i),d=u[r]={tween:new b,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++u.count)}fs.call=Z.call,fs.empty=Z.empty,fs.node=Z.node,fs.size=Z.size,e.transition=function(t,n){return t&&t.transition?us?t.transition(n):t:e.selection().transition(t)},e.transition.prototype=fs,fs.select=function(e){var t,n,r,a=this.id,i=this.namespace,o=[];e=X(e);for(var s=-1,l=this.length;++s<l;){o.push(t=[]);for(var c=this[s],u=-1,d=c.length;++u<d;)(r=c[u])&&(n=e.call(r,r.__data__,u,s))?("__data__"in r&&(n.__data__=r.__data__),ms(n,u,i,a,r[i][a]),t.push(n)):t.push(null)}return cs(o,i,a)},fs.selectAll=function(e){var t,n,r,a,i,o=this.id,s=this.namespace,l=[];e=W(e);for(var c=-1,u=this.length;++c<u;)for(var d=this[c],f=-1,h=d.length;++f<h;)if(r=d[f]){i=r[s][o],n=e.call(r,r.__data__,f,c),l.push(t=[]);for(var p=-1,g=n.length;++p<g;)(a=n[p])&&ms(a,p,s,o,i),t.push(a)}return cs(l,s,o)},fs.filter=function(e){var t,n,r=[];"function"!=typeof e&&(e=ce(e));for(var a=0,i=this.length;a<i;a++){r.push(t=[]);for(var o,s=0,l=(o=this[a]).length;s<l;s++)(n=o[s])&&e.call(n,n.__data__,s,a)&&t.push(n)}return cs(r,this.namespace,this.id)},fs.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):ue(this,null==t?function(t){t[r][n].tween.remove(e)}:function(a){a[r][n].tween.set(e,t)})},fs.attr=function(t,n){if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var r="transform"==t?di:Ga,a=e.ns.qualify(t);function i(){this.removeAttribute(a)}function o(){this.removeAttributeNS(a.space,a.local)}return ps(this,"attr."+t,n,a.local?function(e){return null==e?o:(e+="",function(){var t,n=this.getAttributeNS(a.space,a.local);return n!==e&&(t=r(n,e),function(e){this.setAttributeNS(a.space,a.local,t(e))})})}:function(e){return null==e?i:(e+="",function(){var t,n=this.getAttribute(a);return n!==e&&(t=r(n,e),function(e){this.setAttribute(a,t(e))})})})},fs.attrTween=function(t,n){var r=e.ns.qualify(t);return this.tween("attr."+t,r.local?function(e,t){var a=n.call(this,e,t,this.getAttributeNS(r.space,r.local));return a&&function(e){this.setAttributeNS(r.space,r.local,a(e))}}:function(e,t){var a=n.call(this,e,t,this.getAttribute(r));return a&&function(e){this.setAttribute(r,a(e))}})},fs.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.style(n,e[n],t);return this}n=""}function a(){this.style.removeProperty(e)}return ps(this,"style."+e,t,function(t){return null==t?a:(t+="",function(){var r,a=o(this).getComputedStyle(this,null).getPropertyValue(e);return a!==t&&(r=Ga(a,t),function(t){this.style.setProperty(e,r(t),n)})})})},fs.styleTween=function(e,t,n){return arguments.length<3&&(n=""),this.tween("style."+e,function(r,a){var i=t.call(this,r,a,o(this).getComputedStyle(this,null).getPropertyValue(e));return i&&function(t){this.style.setProperty(e,i(t),n)}})},fs.text=function(e){return ps(this,"text",e,gs)},fs.remove=function(){var e=this.namespace;return this.each("end.transition",function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)})},fs.ease=function(t){var n=this.id,r=this.namespace;return arguments.length<1?this.node()[r][n].ease:("function"!=typeof t&&(t=e.ease.apply(e,arguments)),ue(this,function(e){e[r][n].ease=t}))},fs.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:ue(this,"function"==typeof e?function(r,a,i){r[n][t].delay=+e.call(r,r.__data__,a,i)}:(e=+e,function(r){r[n][t].delay=e}))},fs.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:ue(this,"function"==typeof e?function(r,a,i){r[n][t].duration=Math.max(1,e.call(r,r.__data__,a,i))}:(e=Math.max(1,e),function(r){r[n][t].duration=e}))},fs.each=function(t,n){var r=this.id,a=this.namespace;if(arguments.length<2){var i=ds,o=us;try{us=r,ue(this,function(e,n,i){ds=e[a][r],t.call(e,e.__data__,n,i)})}finally{ds=i,us=o}}else ue(this,function(i){var o=i[a][r];(o.event||(o.event=e.dispatch("start","end","interrupt"))).on(t,n)});return this},fs.transition=function(){for(var e,t,n,r=this.id,a=++hs,i=this.namespace,o=[],s=0,l=this.length;s<l;s++){o.push(e=[]);for(var c,u=0,d=(c=this[s]).length;u<d;u++)(t=c[u])&&ms(t,u,i,a,{time:(n=t[i][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),e.push(t)}return cs(o,i,a)},e.svg.axis=function(){var t,n=e.scale.linear(),a=vs,i=6,o=6,s=3,l=[10],c=null;function u(r){r.each(function(){var r,u=e.select(this),d=this.__chart__||n,f=this.__chart__=n.copy(),h=null==c?f.ticks?f.ticks.apply(f,l):f.domain():c,p=null==t?f.tickFormat?f.tickFormat.apply(f,l):O:t,g=u.selectAll(".tick").data(h,f),y=g.enter().insert("g",".domain").attr("class","tick").style("opacity",ke),m=e.transition(g.exit()).style("opacity",ke).remove(),v=e.transition(g.order()).style("opacity",1),x=Math.max(i,0)+s,b=oo(f),_=u.selectAll(".domain").data([0]),w=(_.enter().append("path").attr("class","domain"),e.transition(_));y.append("line"),y.append("text");var k,M,T,A,S=y.select("line"),L=v.select("line"),C=g.select("text").text(p),z=y.select("text"),D=v.select("text"),P="top"===a||"left"===a?-1:1;if("bottom"===a||"top"===a?(r=bs,k="x",T="y",M="x2",A="y2",C.attr("dy",P<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+P*o+"V0H"+b[1]+"V"+P*o)):(r=_s,k="y",T="x",M="y2",A="x2",C.attr("dy",".32em").style("text-anchor",P<0?"end":"start"),w.attr("d","M"+P*o+","+b[0]+"H0V"+b[1]+"H"+P*o)),S.attr(A,P*i),z.attr(T,P*x),L.attr(M,0).attr(A,P*i),D.attr(k,0).attr(T,P*x),f.rangeBand){var I=f,j=I.rangeBand()/2;d=f=function(e){return I(e)+j}}else d.rangeBand?d=f:m.call(r,f,d);y.call(r,d,f),v.call(r,f,f)})}return u.scale=function(e){return arguments.length?(n=e,u):n},u.orient=function(e){return arguments.length?(a=e in xs?e+"":vs,u):a},u.ticks=function(){return arguments.length?(l=r(arguments),u):l},u.tickValues=function(e){return arguments.length?(c=e,u):c},u.tickFormat=function(e){return arguments.length?(t=e,u):t},u.tickSize=function(e){var t=arguments.length;return t?(i=+e,o=+arguments[t-1],u):i},u.innerTickSize=function(e){return arguments.length?(i=+e,u):i},u.outerTickSize=function(e){return arguments.length?(o=+e,u):o},u.tickPadding=function(e){return arguments.length?(s=+e,u):s},u.tickSubdivide=function(){return arguments.length&&u},u};var vs="bottom",xs={top:1,right:1,bottom:1,left:1};function bs(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"})}function _s(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"})}e.svg.brush=function(){var t,n,r=B(f,"brushstart","brush","brushend"),a=null,i=null,s=[0,0],l=[0,0],c=!0,u=!0,d=ks[0];function f(t){t.each(function(){var t=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",y).on("touchstart.brush",y),n=t.selectAll(".background").data([0]);n.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var r=t.selectAll(".resize").data(d,O);r.exit().remove(),r.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return ws[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),r.style("display",f.empty()?"none":null);var o,s=e.transition(t),l=e.transition(n);a&&(o=oo(a),l.attr("x",o[0]).attr("width",o[1]-o[0]),p(s)),i&&(o=oo(i),l.attr("y",o[0]).attr("height",o[1]-o[0]),g(s)),h(s)})}function h(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+s[+/e$/.test(e)]+","+l[+/^s/.test(e)]+")"})}function p(e){e.select(".extent").attr("x",s[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function g(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function y(){var d,y,m=this,v=e.select(e.event.target),x=r.of(m,arguments),b=e.select(m),_=v.datum(),w=!/^(n|s)$/.test(_)&&a,k=!/^(e|w)$/.test(_)&&i,M=v.classed("extent"),T=xe(m),A=e.mouse(m),S=e.select(o(m)).on("keydown.brush",function(){32==e.event.keyCode&&(M||(d=null,A[0]-=s[1],A[1]-=l[1],M=2),R())}).on("keyup.brush",function(){32==e.event.keyCode&&2==M&&(A[0]+=s[1],A[1]+=l[1],M=0,R())});if(e.event.changedTouches?S.on("touchmove.brush",z).on("touchend.brush",D):S.on("mousemove.brush",z).on("mouseup.brush",D),b.interrupt().selectAll("*").interrupt(),M)A[0]=s[0]-A[0],A[1]=l[0]-A[1];else if(_){var L=+/w$/.test(_),C=+/^n/.test(_);y=[s[1-L]-A[0],l[1-C]-A[1]],A[0]=s[L],A[1]=l[C]}else e.event.altKey&&(d=A.slice());function z(){var t=e.mouse(m),n=!1;y&&(t[0]+=y[0],t[1]+=y[1]),M||(e.event.altKey?(d||(d=[(s[0]+s[1])/2,(l[0]+l[1])/2]),A[0]=s[+(t[0]<d[0])],A[1]=l[+(t[1]<d[1])]):d=null),w&&O(t,a,0)&&(p(b),n=!0),k&&O(t,i,1)&&(g(b),n=!0),n&&(h(b),x({type:"brush",mode:M?"move":"resize"}))}function O(e,r,a){var i,o,f=oo(r),h=f[0],p=f[1],g=A[a],y=a?l:s,m=y[1]-y[0];if(M&&(h-=g,p-=m+g),i=(a?u:c)?Math.max(h,Math.min(p,e[a])):e[a],M?o=(i+=g)+m:(d&&(g=Math.max(h,Math.min(p,2*d[a]-i))),g<i?(o=i,i=g):o=g),y[0]!=i||y[1]!=o)return a?n=null:t=null,y[0]=i,y[1]=o,!0}function D(){z(),b.style("pointer-events","all").selectAll(".resize").style("display",f.empty()?"none":null),e.select("body").style("cursor",null),S.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),T(),x({type:"brushend"})}b.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",v.style("cursor")),x({type:"brushstart"}),z()}return f.event=function(a){a.each(function(){var a=r.of(this,arguments),i={x:s,y:l,i:t,j:n},o=this.__chart__||i;this.__chart__=i,us?e.select(this).transition().each("start.brush",function(){t=o.i,n=o.j,s=o.x,l=o.y,a({type:"brushstart"})}).tween("brush:brush",function(){var e=Ya(s,i.x),r=Ya(l,i.y);return t=n=null,function(t){s=i.x=e(t),l=i.y=r(t),a({type:"brush",mode:"resize"})}}).each("end.brush",function(){t=i.i,n=i.j,a({type:"brush",mode:"resize"}),a({type:"brushend"})}):(a({type:"brushstart"}),a({type:"brush",mode:"resize"}),a({type:"brushend"}))})},f.x=function(e){return arguments.length?(d=ks[!(a=e)<<1|!i],f):a},f.y=function(e){return arguments.length?(d=ks[!a<<1|!(i=e)],f):i},f.clamp=function(e){return arguments.length?(a&&i?(c=!!e[0],u=!!e[1]):a?c=!!e:i&&(u=!!e),f):a&&i?[c,u]:a?c:i?u:null},f.extent=function(e){var r,o,c,u,d;return arguments.length?(a&&(r=e[0],o=e[1],i&&(r=r[0],o=o[0]),t=[r,o],a.invert&&(r=a(r),o=a(o)),o<r&&(d=r,r=o,o=d),r==s[0]&&o==s[1]||(s=[r,o])),i&&(c=e[0],u=e[1],a&&(c=c[1],u=u[1]),n=[c,u],i.invert&&(c=i(c),u=i(u)),u<c&&(d=c,c=u,u=d),c==l[0]&&u==l[1]||(l=[c,u])),f):(a&&(t?(r=t[0],o=t[1]):(r=s[0],o=s[1],a.invert&&(r=a.invert(r),o=a.invert(o)),o<r&&(d=r,r=o,o=d))),i&&(n?(c=n[0],u=n[1]):(c=l[0],u=l[1],i.invert&&(c=i.invert(c),u=i.invert(u)),u<c&&(d=c,c=u,u=d))),a&&i?[[r,c],[o,u]]:a?[r,o]:i&&[c,u])},f.clear=function(){return f.empty()||(s=[0,0],l=[0,0],t=n=null),f},f.empty=function(){return!!a&&s[0]==s[1]||!!i&&l[0]==l[1]},e.rebind(f,r,"on")};var ws={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ks=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ms=Pt.format=ln.timeFormat,Ts=Ms.utc,As=Ts("%Y-%m-%dT%H:%M:%S.%LZ");function Ss(e){return e.toISOString()}function Ls(t,n,r){function a(e){return t(e)}function i(t,r){var a=(t[1]-t[0])/r,i=e.bisect(zs,a);return i==zs.length?[n.year,go(t.map(function(e){return e/31536e6}),r)[2]]:i?n[a/zs[i-1]<zs[i]/a?i-1:i]:[Ps,go(t,r)[2]]}return a.invert=function(e){return Cs(t.invert(e))},a.domain=function(e){return arguments.length?(t.domain(e),a):t.domain().map(Cs)},a.nice=function(e,t){var n=a.domain(),r=io(n),o=null==e?i(r,10):"number"==typeof e&&i(r,e);function s(n){return!isNaN(n)&&!e.range(n,Cs(+n+1),t).length}return o&&(e=o[0],t=o[1]),a.domain(lo(n,t>1?{floor:function(t){for(;s(t=e.floor(t));)t=Cs(t-1);return t},ceil:function(t){for(;s(t=e.ceil(t));)t=Cs(+t+1);return t}}:e))},a.ticks=function(e,t){var n=io(a.domain()),r=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return r&&(e=r[0],t=r[1]),e.range(n[0],Cs(+n[1]+1),t<1?1:t)},a.tickFormat=function(){return r},a.copy=function(){return Ls(t.copy(),n,r)},ho(a,t)}function Cs(e){return new Date(e)}Ms.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ss:As,Ss.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Ss.toString=As.toString,Pt.second=Nt(function(e){return new It(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()}),Pt.seconds=Pt.second.range,Pt.seconds.utc=Pt.second.utc.range,Pt.minute=Nt(function(e){return new It(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()}),Pt.minutes=Pt.minute.range,Pt.minutes.utc=Pt.minute.utc.range,Pt.hour=Nt(function(e){var t=e.getTimezoneOffset()/60;return new It(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()}),Pt.hours=Pt.hour.range,Pt.hours.utc=Pt.hour.utc.range,Pt.month=Nt(function(e){return(e=Pt.day(e)).setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),Pt.months=Pt.month.range,Pt.months.utc=Pt.month.utc.range;var zs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Os=[[Pt.second,1],[Pt.second,5],[Pt.second,15],[Pt.second,30],[Pt.minute,1],[Pt.minute,5],[Pt.minute,15],[Pt.minute,30],[Pt.hour,1],[Pt.hour,3],[Pt.hour,6],[Pt.hour,12],[Pt.day,1],[Pt.day,2],[Pt.week,1],[Pt.month,1],[Pt.month,3],[Pt.year,1]],Ds=Ms.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Zn]]),Ps={range:function(t,n,r){return e.range(Math.ceil(t/r)*r,+n,r).map(Cs)},floor:O,ceil:O};Os.year=Pt.year,Pt.scale=function(){return Ls(e.scale.linear(),Os,Ds)};var Is=Os.map(function(e){return[e[0].utc,e[1]]}),js=Ts.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Zn]]);function Es(e){return JSON.parse(e.responseText)}function Ns(e){var t=a.createRange();return t.selectNode(a.body),t.createContextualFragment(e.responseText)}Is.year=Pt.year.utc,Pt.scale.utc=function(){return Ls(e.scale.linear(),Is,js)},e.text=mt(function(e){return e.responseText}),e.json=function(e,t){return vt(e,"application/json",Es,t)},e.html=function(e,t){return vt(e,"text/html",Ns,t)},e.xml=mt(function(e){return e.responseXML}),"function"==typeof define&&define.amd?(this.d3=e,define(e)):"object"==typeof t&&t.exports?t.exports=e:this.d3=e}()},{}],4:[function(e,t,n){(function(r,a){!function(e,r){"object"==typeof n&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):e.ES6Promise=r()}(this,function(){"use strict";function t(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,o=void 0,s=void 0,l=function(e,t){g[i]=e,g[i+1]=t,2===(i+=2)&&(s?s(y):_())};var c="undefined"!=typeof window?window:void 0,u=c||{},d=u.MutationObserver||u.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(y,1)}}var g=new Array(1e3);function y(){for(var e=0;e<i;e+=2){(0,g[e])(g[e+1]),g[e]=void 0,g[e+1]=void 0}i=0}var m,v,x,b,_=void 0;function w(e,t){var n=arguments,r=this,a=new this.constructor(T);void 0===a[M]&&q(a);var i,o=r._state;return o?(i=n[o-1],l(function(){return B(o,a,i,r._result)})):E(r,a,e,t),a}function k(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(T);return D(t,e),t}f?_=function(){return r.nextTick(y)}:d?(v=0,x=new d(y),b=document.createTextNode(""),x.observe(b,{characterData:!0}),_=function(){b.data=v=++v%2}):h?((m=new MessageChannel).port1.onmessage=y,_=function(){return m.port2.postMessage(0)}):_=void 0===c&&"function"==typeof e?function(){try{var t=e("vertx");return o=t.runOnLoop||t.runOnContext,function(){o(y)}}catch(e){return p()}}():p();var M=Math.random().toString(36).substring(16);function T(){}var A=void 0,S=1,L=2,C=new R;function z(e){try{return e.then}catch(e){return C.error=e,C}}function O(e,n,r){n.constructor===e.constructor&&r===w&&n.constructor.resolve===k?function(e,t){t._state===S?I(e,t._result):t._state===L?j(e,t._result):E(t,void 0,function(t){return D(e,t)},function(t){return j(e,t)})}(e,n):r===C?j(e,C.error):void 0===r?I(e,n):t(r)?function(e,t,n){l(function(e){var r=!1,a=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,function(n){r||(r=!0,t!==n?D(e,n):I(e,n))},function(t){r||(r=!0,j(e,t))},e._label);!r&&a&&(r=!0,j(e,a))},e)}(e,n,r):I(e,n)}function D(e,t){var n;e===t?j(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(n=t)||"object"==typeof n&&null!==n?O(e,t,z(t)):I(e,t)}function P(e){e._onerror&&e._onerror(e._result),N(e)}function I(e,t){e._state===A&&(e._result=t,e._state=S,0!==e._subscribers.length&&l(N,e))}function j(e,t){e._state===A&&(e._state=L,e._result=t,l(P,e))}function E(e,t,n,r){var a=e._subscribers,i=a.length;e._onerror=null,a[i]=t,a[i+S]=n,a[i+L]=r,0===i&&e._state&&l(N,e)}function N(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,a=void 0,i=e._result,o=0;o<t.length;o+=3)r=t[o],a=t[o+n],r?B(n,r,a,i):a(i);e._subscribers.length=0}}function R(){this.error=null}var F=new R;function B(e,n,r,a){var i=t(r),o=void 0,s=void 0,l=void 0,c=void 0;if(i){if((o=function(e,t){try{return e(t)}catch(e){return F.error=e,F}}(r,a))===F?(c=!0,s=o.error,o=null):l=!0,n===o)return void j(n,new TypeError("A promises callback cannot return that same promise."))}else o=a,l=!0;n._state!==A||(i&&l?D(n,o):c?j(n,s):e===S?I(n,o):e===L&&j(n,o))}var H=0;function q(e){e[M]=H++,e._state=void 0,e._result=void 0,e._subscribers=[]}function V(e,t){this._instanceConstructor=e,this.promise=new e(T),this.promise[M]||q(this.promise),n(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?I(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&I(this.promise,this._result))):j(this.promise,new Error("Array Methods must be provided an Array"))}function U(e){this[M]=H++,this._result=this._state=void 0,this._subscribers=[],T!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof U?function(e,t){try{t(function(t){D(e,t)},function(t){j(e,t)})}catch(t){j(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}function G(){var e=void 0;if(void 0!==a)e=a;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=U}return V.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===A&&n<e;n++)this._eachEntry(t[n],n)},V.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===k){var a=z(e);if(a===w&&e._state!==A)this._settledAt(e._state,t,e._result);else if("function"!=typeof a)this._remaining--,this._result[t]=e;else if(n===U){var i=new n(T);O(i,e,a),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},V.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===A&&(this._remaining--,e===L?j(r,n):this._result[t]=n),0===this._remaining&&I(r,this._result)},V.prototype._willSettleAt=function(e,t){var n=this;E(e,void 0,function(e){return n._settledAt(S,t,e)},function(e){return n._settledAt(L,t,e)})},U.all=function(e){return new V(this,e).promise},U.race=function(e){var t=this;return n(e)?new t(function(n,r){for(var a=e.length,i=0;i<a;i++)t.resolve(e[i]).then(n,r)}):new t(function(e,t){return t(new TypeError("You must pass an array to race."))})},U.resolve=k,U.reject=function(e){var t=new this(T);return j(t,e),t},U._setScheduler=function(e){s=e},U._setAsap=function(e){l=e},U._asap=l,U.prototype={constructor:U,then:w,catch:function(e){return this.then(null,e)}},G(),U.polyfill=G,U.Promise=U,U})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:292}],5:[function(e,t,n){"use strict";t.exports=function(e){var t=typeof e;if("string"===t){var n=e;if(0===(e=+e)&&function(e){for(var t,n=e.length,r=0;r<n;r++)if(((t=e.charCodeAt(r))<9||t>13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}(n))return!1}else if("number"!==t)return!1;return e-e<1}},{}],6:[function(e,t,n){t.exports=function(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=n+n,s=r+r,l=a+a,c=n*o,u=r*o,d=r*s,f=a*o,h=a*s,p=a*l,g=i*o,y=i*s,m=i*l;return e[0]=1-d-p,e[1]=u+m,e[2]=f-y,e[3]=0,e[4]=u-m,e[5]=1-c-p,e[6]=h+g,e[7]=0,e[8]=f+y,e[9]=h-g,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],7:[function(e,t,n){(function(n){"use strict";var r,a=e("is-browser");r="function"==typeof n.matchMedia?!n.matchMedia("(hover: none)").matches:a,t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"is-browser":9}],8:[function(e,t,n){"use strict";var r=e("is-browser");t.exports=r&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e}()},{"is-browser":9}],9:[function(e,t,n){t.exports=!0},{}],10:[function(e,t,n){var r={left:0,top:0};t.exports=function(e,t,n){t=t||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var a=e.clientX||0,i=e.clientY||0,o=(s=t,s===window||s===document||s===document.body?r:s.getBoundingClientRect());var s;return n[0]=a-o.left,n[1]=i-o.top,n}},{}],11:[function(e,t,n){"use strict";var r=e("../src/lib"),a={"X,X div":"font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;","X input,X button":"font-family:'Open Sans', verdana, arial, sans-serif;","X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .modebar":"position:absolute;top:2px;right:2px;z-index:1001;background:rgba(255,255,255,0.7);","X .modebar--hover":"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;","X:hover .modebar--hover":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;margin-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group:first-child":"margin-left:0px;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar-btn path":"fill:rgba(0,31,95,0.3);","X .modebar-btn.active path,X .modebar-btn:hover path":"fill:rgba(0,22,72,0.5);","X .modebar-btn.modebar-btn--logo":"padding:3px 1px;","X .modebar-btn.modebar-btn--logo path":"fill:#447adb !important;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;","X [data-title]:after":"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:white;","X .select-outline-2":"stroke:black;stroke-dasharray:2px 2px;",Y:"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;","Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in a){var o=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");r.addStyleRule(o,a[i])}},{"../src/lib":152}],12:[function(e,t,n){"use strict";t.exports={undo:{width:857.1,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",ascent:850,descent:-150},home:{width:928.6,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",ascent:850,descent:-150},"camera-retro":{width:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",ascent:850,descent:-150},zoombox:{width:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",ascent:850,descent:-150},pan:{width:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",ascent:850,descent:-150},zoom_plus:{width:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",ascent:850,descent:-150},zoom_minus:{width:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",ascent:850,descent:-150},autoscale:{width:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",ascent:850,descent:-150},tooltip_basic:{width:1500,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",ascent:850,descent:-150},tooltip_compare:{width:1125,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",ascent:850,descent:-150},plotlylogo:{width:1542,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",ascent:850,descent:-150},"z-axis":{width:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",ascent:850,descent:-150},"3d_rotate":{width:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",ascent:850,descent:-150},camera:{width:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",ascent:850,descent:-150},movie:{width:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",ascent:850,descent:-150},question:{width:857.1,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",ascent:850,descent:-150},disk:{width:857.1,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",ascent:850,descent:-150},lasso:{width:1031,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",ascent:850,descent:-150},selectbox:{width:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",ascent:850,descent:-150},spikeline:{width:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",ascent:850,descent:-150}}},{}],13:[function(e,t,n){"use strict";t.exports=e("../src/core")},{"../src/core":137}],14:[function(e,t,n){"use strict";t.exports=e("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":282}],15:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("./common_defaults"),o=e("./attributes");t.exports=function(e,t,n,s,l){function c(n,a){return r.coerce(e,t,o,n,a)}s=s||{};var u=c("visible",!(l=l||{}).itemIsNotPlainObject),d=c("clicktoshow");if(!u&&!d)return t;i(e,t,n,c);for(var f=t.showarrow,h=["x","y"],p=[-10,-30],g={_fullLayout:n},y=0;y<2;y++){var m=h[y],v=a.coerceRef(e,t,g,m,"","paper");if(a.coercePosition(t,g,c,v,m,.5),f){var x="a"+m,b=a.coerceRef(e,t,g,x,"pixel");"pixel"!==b&&b!==v&&(b=t[x]="pixel");var _="pixel"===b?p[y]:.4;a.coercePosition(t,g,c,b,x,_)}c(m+"anchor"),c(m+"shift")}if(r.noneOrAll(e,t,["x","y"]),f&&r.noneOrAll(e,t,["ax","ay"]),d){var w=c("xclick"),k=c("yclick");t._xclick=void 0===w?t.x:a.cleanPosition(w,g,t.xref),t._yclick=void 0===k?t.y:a.cleanPosition(k,g,t.yref)}return t}},{"../../lib":152,"../../plots/cartesian/axes":194,"./attributes":17,"./common_defaults":20}],16:[function(e,t,n){"use strict";t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},{}],17:[function(e,t,n){"use strict";var r=e("./arrow_paths"),a=e("../../plots/font_attributes"),i=e("../../plots/cartesian/constants");t.exports={_isLinkedToArray:"annotation",visible:{valType:"boolean",role:"info",dflt:!0,editType:"calcIfAutorange+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (<br>), bold (<b></b>), italics (<i></i>),","hyperlinks (<a href='...'></a>). Tags <em>, <sup>, <sub>","<span> are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,role:"style",editType:"calcIfAutorange+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:a({editType:"calcIfAutorange+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,role:"style",editType:"calcIfAutorange+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use <br> to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,role:"style",editType:"calcIfAutorange+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,role:"style",editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",role:"style",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans more two or more lines","(i.e. `text` contains one or more <br> HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",role:"style",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",role:"style",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",role:"style",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,role:"style",editType:"calcIfAutorange+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,role:"style",editType:"calcIfAutorange+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,role:"style",editType:"calcIfAutorange+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",role:"style",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1,role:"style",editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:r.length,dflt:1,role:"style",editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",role:"style",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,role:"style",editType:"calcIfAutorange+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,role:"style",editType:"calcIfAutorange+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,role:"style",editType:"calcIfAutorange+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,role:"style",editType:"calcIfAutorange+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,role:"style",editType:"calcIfAutorange+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the x component of the arrow tail about the arrow head.","If `axref` is `pixel`, a positive (negative) ","component corresponds to an arrow pointing","from right to left (left to right).","If `axref` is an axis, this is an absolute value on that axis,","like `x`, NOT a relative value."].join(" ")},ay:{valType:"any",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the y component of the arrow tail about the arrow head.","If `ayref` is `pixel`, a positive (negative) ","component corresponds to an arrow pointing","from bottom to top (top to bottom).","If `ayref` is an axis, this is an absolute value on that axis,","like `y`, NOT a relative value."].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],role:"info",editType:"calc",description:["Indicates in what terms the tail of the annotation (ax,ay) ","is specified. If `pixel`, `ax` is a relative offset in pixels ","from `x`. If set to an x axis id (e.g. *x* or *x2*), `ax` is ","specified in the same terms as that axis. This is useful ","for trendline annotations which should continue to indicate ","the correct trend when zoomed."].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],role:"info",editType:"calc",description:["Indicates in what terms the tail of the annotation (ax,ay) ","is specified. If `pixel`, `ay` is a relative offset in pixels ","from `y`. If set to a y axis id (e.g. *y* or *y2*), `ay` is ","specified in the same terms as that axis. This is useful ","for trendline annotations which should continue to indicate ","the correct trend when zoomed."].join(" ")},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],role:"info",editType:"calc",description:["Sets the annotation's x coordinate axis.","If set to an x axis id (e.g. *x* or *x2*), the `x` position","refers to an x coordinate","If set to *paper*, the `x` position refers to the distance from","the left side of the plotting area in normalized coordinates","where 0 (1) corresponds to the left (right) side."].join(" ")},x:{valType:"any",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,role:"style",editType:"calcIfAutorange+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],role:"info",editType:"calc",description:["Sets the annotation's y coordinate axis.","If set to an y axis id (e.g. *y* or *y2*), the `y` position","refers to an y coordinate","If set to *paper*, the `y` position refers to the distance from","the bottom of the plotting area in normalized coordinates","where 0 (1) corresponds to the bottom (top)."].join(" ")},y:{valType:"any",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,role:"style",editType:"calcIfAutorange+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,role:"style",editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",role:"info",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",role:"info",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",role:"info",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",role:"style",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",role:"style",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:a({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",role:"info",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",role:"info",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}}},{"../../plots/cartesian/constants":199,"../../plots/font_attributes":220,"./arrow_paths":16}],18:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("./draw").draw;function o(e){var t=e._fullLayout;r.filterVisible(t.annotations).forEach(function(t){var n,r,i,o,s=a.getFromId(e,t.xref),l=a.getFromId(e,t.yref),c=3*t.arrowsize*t.arrowwidth||0,u=3*t.startarrowsize*t.arrowwidth||0;s&&s.autorange&&(n=c+t.xshift,r=c-t.xshift,i=u+t.xshift,o=u-t.xshift,t.axref===t.xref?(a.expand(s,[s.r2c(t.x)],{ppadplus:n,ppadminus:r}),a.expand(s,[s.r2c(t.ax)],{ppadplus:Math.max(t._xpadplus,i),ppadminus:Math.max(t._xpadminus,o)})):(i=t.ax?i+t.ax:i,o=t.ax?o-t.ax:o,a.expand(s,[s.r2c(t.x)],{ppadplus:Math.max(t._xpadplus,n,i),ppadminus:Math.max(t._xpadminus,r,o)}))),l&&l.autorange&&(n=c-t.yshift,r=c+t.yshift,i=u-t.yshift,o=u+t.yshift,t.ayref===t.yref?(a.expand(l,[l.r2c(t.y)],{ppadplus:n,ppadminus:r}),a.expand(l,[l.r2c(t.ay)],{ppadplus:Math.max(t._ypadplus,i),ppadminus:Math.max(t._ypadminus,o)})):(i=t.ay?i+t.ay:i,o=t.ay?o-t.ay:o,a.expand(l,[l.r2c(t.y)],{ppadplus:Math.max(t._ypadplus,n,i),ppadminus:Math.max(t._ypadminus,r,o)})))})}t.exports=function(e){var t=e._fullLayout,n=r.filterVisible(t.annotations);if(n.length&&e._fullData.length){var s={};for(var l in n.forEach(function(e){s[e.xref]=1,s[e.yref]=1}),s){var c=a.getFromId(e,l);if(c&&c.autorange)return r.syncOrAsync([i,o],e)}}}},{"../../lib":152,"../../plots/cartesian/axes":194,"./draw":23}],19:[function(e,t,n){"use strict";var r=e("../../registry");function a(e,t){var n,r,a,o,s,l,c,u=e._fullLayout.annotations,d=[],f=[],h=[],p=(t||[]).length;for(n=0;n<u.length;n++)if(o=(a=u[n]).clicktoshow){for(r=0;r<p;r++)if(l=(s=t[r]).xaxis,c=s.yaxis,l._id===a.xref&&c._id===a.yref&&l.d2r(s.x)===i(a._xclick,l)&&c.d2r(s.y)===i(a._yclick,c)){(a.visible?"onout"===o?f:h:d).push(n);break}r===p&&a.visible&&"onout"===o&&f.push(n)}return{on:d,off:f,explicitOff:h}}function i(e,t){return"log"===t.type?t.l2r(e):t.d2r(e)}t.exports={hasClickToShow:function(e,t){var n=a(e,t);return n.on.length>0||n.explicitOff.length>0},onClick:function(e,t){var n,i=a(e,t),o=i.on,s=i.off.concat(i.explicitOff),l={};if(!o.length&&!s.length)return;for(n=0;n<o.length;n++)l["annotations["+o[n]+"].visible"]=!0;for(n=0;n<s.length;n++)l["annotations["+s[n]+"].visible"]=!1;return r.call("update",e,{},l)}}},{"../../registry":241}],20:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../color");t.exports=function(e,t,n,i){i("opacity");var o=i("bgcolor"),s=i("bordercolor"),l=a.opacity(s);i("borderpad");var c=i("borderwidth"),u=i("showarrow");if(i("text",u?" ":n._dfltTitle.annotation),i("textangle"),r.coerceFont(i,"font",n.font),i("width"),i("align"),i("height")&&i("valign"),u){var d,f,h=i("arrowside");-1!==h.indexOf("end")&&(d=i("arrowhead"),f=i("arrowsize")),-1!==h.indexOf("start")&&(i("startarrowhead",d),i("startarrowsize",f)),i("arrowcolor",l?t.bordercolor:a.defaultLine),i("arrowwidth",2*(l&&c||1)),i("standoff"),i("startstandoff")}var p=i("hovertext"),g=n.hoverlabel||{};if(p){var y=i("hoverlabel.bgcolor",g.bgcolor||(a.opacity(o)?a.rgb(o):a.defaultLine)),m=i("hoverlabel.bordercolor",g.bordercolor||a.contrast(y));r.coerceFont(i,"hoverlabel.font",{family:g.font.family,size:g.font.size,color:g.font.color||m})}i("captureevents",!!p)}},{"../../lib":152,"../color":32}],21:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../lib/to_log_range");t.exports=function(e,t,n,i){t=t||{};var o="log"===n&&"linear"===t.type,s="linear"===n&&"log"===t.type;if(o||s)for(var l,c,u=e._fullLayout.annotations,d=t._id.charAt(0),f=0;f<u.length;f++)l=u[f],c="annotations["+f+"].",l[d+"ref"]===t._id&&h(d),l["a"+d+"ref"]===t._id&&h("a"+d);function h(e){var n=l[e],s=null;s=o?a(n,t.range):Math.pow(10,n),r(s)||(s=null),i(c+e,s)}}},{"../../lib/to_log_range":175,"fast-isnumeric":5}],22:[function(e,t,n){"use strict";var r=e("../../plots/array_container_defaults"),a=e("./annotation_defaults");t.exports=function(e,t){r(e,t,{name:"annotations",handleItemDefaults:a})}},{"../../plots/array_container_defaults":190,"./annotation_defaults":15}],23:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../registry"),i=e("../../plots/plots"),o=e("../../lib"),s=e("../../plots/cartesian/axes"),l=e("../color"),c=e("../drawing"),u=e("../fx"),d=e("../../lib/svg_text_utils"),f=e("../../lib/setcursor"),h=e("../dragelement"),p=e("./draw_arrow_head");function g(e,t){var n=e._fullLayout.annotations[t]||{};y(e,n,t,!1,s.getFromId(e,n.xref),s.getFromId(e,n.yref))}function y(e,t,n,i,s,g){var y,m,v=e._fullLayout,x=e._fullLayout._size,b=e._context.edits;i?(y="annotation-"+i,m=i+".annotations["+n+"]"):(y="annotation",m="annotations["+n+"]"),v._infolayer.selectAll("."+y+'[data-index="'+n+'"]').remove();var _="clip"+v._uid+"_ann"+n;if(t._input&&!1!==t.visible){var w={x:{},y:{}},k=+t.textangle||0,M=v._infolayer.append("g").classed(y,!0).attr("data-index",String(n)).style("opacity",t.opacity),T=M.append("g").classed("annotation-text-g",!0),A=b[t.showarrow?"annotationTail":"annotationPosition"],S=t.captureevents||b.annotationText||A,L=T.append("g").style("pointer-events",S?"all":null).call(f,"default").on("click",function(){e._dragging=!1;var a={index:n,annotation:t._input,fullAnnotation:t,event:r.event};i&&(a.subplotId=i),e.emit("plotly_clickannotation",a)});t.hovertext&&L.on("mouseover",function(){var n=t.hoverlabel,r=n.font,a=this.getBoundingClientRect(),i=e.getBoundingClientRect();u.loneHover({x0:a.left-i.left,x1:a.right-i.left,y:(a.top+a.bottom)/2-i.top,text:t.hovertext,color:n.bgcolor,borderColor:n.bordercolor,fontFamily:r.family,fontSize:r.size,fontColor:r.color},{container:v._hoverlayer.node(),outerContainer:v._paper.node(),gd:e})}).on("mouseout",function(){u.loneUnhover(v._hoverlayer.node())});var C=t.borderwidth,z=t.borderpad,O=C+z,D=L.append("rect").attr("class","bg").style("stroke-width",C+"px").call(l.stroke,t.bordercolor).call(l.fill,t.bgcolor),P=t.width||t.height,I=v._topclips.selectAll("#"+_).data(P?[0]:[]);I.enter().append("clipPath").classed("annclip",!0).attr("id",_).append("rect"),I.exit().remove();var j=t.font,E=L.append("text").classed("annotation-text",!0).text(t.text);b.annotationText?E.call(d.makeEditable,{delegate:L,gd:e}).call(N).on("edit",function(n){t.text=n,this.call(N);var r={};r[m+".text"]=t.text,s&&s.autorange&&(r[s._name+".autorange"]=!0),g&&g.autorange&&(r[g._name+".autorange"]=!0),a.call("relayout",e,r)}):E.call(N)}else r.selectAll("#"+_).remove();function N(n){return n.call(c.font,j).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),d.convertToTspans(n,e,R),n}function R(){var n=E.selectAll("a");1===n.size()&&n.text()===E.text()&&L.insert("a",":first-child").attr({"xlink:xlink:href":n.attr("xlink:href"),"xlink:xlink:show":n.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(D.node());var r=L.select(".annotation-text-math-group"),u=!r.empty(),y=c.bBox((u?r:E).node()),S=y.width,z=y.height,j=t.width||S,N=t.height||z,R=Math.round(j+2*O),F=Math.round(N+2*O);function B(e,t){return"auto"===t&&(t=e<1/3?"left":e>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}t._w=j,t._h=N;for(var H=!1,q=["x","y"],V=0;V<q.length;V++){var U,G,Y,Z,X,W=q[V],J=t[W+"ref"]||W,Q=t["a"+W+"ref"],$={x:s,y:g}[W],K=(k+("x"===W?0:-90))*Math.PI/180,ee=R*Math.cos(K),te=F*Math.sin(K),ne=Math.abs(ee)+Math.abs(te),re=t[W+"anchor"],ae=t[W+"shift"]*("x"===W?1:-1),ie=w[W];if($){var oe=$.r2fraction(t[W]);if((e._dragging||!$.autorange)&&(oe<0||oe>1)&&(Q===J?((oe=$.r2fraction(t["a"+W]))<0||oe>1)&&(H=!0):H=!0,H))continue;U=$._offset+$.r2p(t[W]),Z=.5}else"x"===W?(Y=t[W],U=x.l+x.w*Y):(Y=1-t[W],U=x.t+x.h*Y),Z=t.showarrow?.5:Y;if(t.showarrow){ie.head=U;var se=t["a"+W];X=ee*B(.5,t.xanchor)-te*B(.5,t.yanchor),Q===J?(ie.tail=$._offset+$.r2p(se),G=X):(ie.tail=U+se,G=X+se),ie.text=ie.tail+X;var le=v["x"===W?"width":"height"];if("paper"===J&&(ie.head=o.constrain(ie.head,1,le-1)),"pixel"===Q){var ce=-Math.max(ie.tail-3,ie.text),ue=Math.min(ie.tail+3,ie.text)-le;ce>0?(ie.tail+=ce,ie.text+=ce):ue>0&&(ie.tail-=ue,ie.text-=ue)}ie.tail+=ae,ie.head+=ae}else G=X=ne*B(Z,re),ie.text=U+X;ie.text+=ae,X+=ae,G+=ae,t["_"+W+"padplus"]=ne/2+G,t["_"+W+"padminus"]=ne/2-G,t["_"+W+"size"]=ne,t["_"+W+"shift"]=X}if(H)L.remove();else{var de=0,fe=0;if("left"!==t.align&&(de=(j-S)*("center"===t.align?.5:1)),"top"!==t.valign&&(fe=(N-z)*("middle"===t.valign?.5:1)),u)r.select("svg").attr({x:O+de-1,y:O+fe}).call(c.setClipUrl,P?_:null);else{var he=O+fe-y.top,pe=O+de-y.left;E.call(d.positionText,pe,he).call(c.setClipUrl,P?_:null)}I.select("rect").call(c.setRect,O,O,j,N),D.call(c.setRect,C/2,C/2,R-C,F-C),L.call(c.setTranslate,Math.round(w.x.text-R/2),Math.round(w.y.text-F/2)),T.attr({transform:"rotate("+k+","+w.x.text+","+w.y.text+")"});var ge,ye,me=function(n,r){M.selectAll(".annotation-arrow-g").remove();var u=w.x.head,d=w.y.head,f=w.x.tail+n,y=w.y.tail+r,v=w.x.text+n,_=w.y.text+r,A=o.rotationXYMatrix(k,v,_),S=o.apply2DTransform(A),C=o.apply2DTransform2(A),z=+D.attr("width"),O=+D.attr("height"),P=v-.5*z,I=P+z,j=_-.5*O,E=j+O,N=[[P,j,P,E],[P,E,I,E],[I,E,I,j],[I,j,P,j]].map(C);if(!N.reduce(function(e,t){return e^!!o.segmentsIntersect(u,d,u+1e6,d+1e6,t[0],t[1],t[2],t[3])},!1)){N.forEach(function(e){var t=o.segmentsIntersect(f,y,u,d,e[0],e[1],e[2],e[3]);t&&(f=t.x,y=t.y)});var R=t.arrowwidth,F=t.arrowcolor,B=t.arrowside,H=M.append("g").style({opacity:l.opacity(F)}).classed("annotation-arrow-g",!0),q=H.append("path").attr("d","M"+f+","+y+"L"+u+","+d).style("stroke-width",R+"px").call(l.stroke,l.rgb(F));if(p(q,B,t),b.annotationPosition&&q.node().parentNode&&!i){var V=u,U=d;if(t.standoff){var G=Math.sqrt(Math.pow(u-f,2)+Math.pow(d-y,2));V+=t.standoff*(f-u)/G,U+=t.standoff*(y-d)/G}var Y,Z,X,W=H.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-V)+","+(y-U),transform:"translate("+V+","+U+")"}).style("stroke-width",R+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");h.init({element:W.node(),gd:e,prepFn:function(){var e=c.getTranslate(L);Z=e.x,X=e.y,Y={},s&&s.autorange&&(Y[s._name+".autorange"]=!0),g&&g.autorange&&(Y[g._name+".autorange"]=!0)},moveFn:function(e,n){var r=S(Z,X),a=r[0]+e,i=r[1]+n;L.call(c.setTranslate,a,i),Y[m+".x"]=s?s.p2r(s.r2p(t.x)+e):t.x+e/x.w,Y[m+".y"]=g?g.p2r(g.r2p(t.y)+n):t.y-n/x.h,t.axref===t.xref&&(Y[m+".ax"]=s.p2r(s.r2p(t.ax)+e)),t.ayref===t.yref&&(Y[m+".ay"]=g.p2r(g.r2p(t.ay)+n)),H.attr("transform","translate("+e+","+n+")"),T.attr({transform:"rotate("+k+","+a+","+i+")"})},doneFn:function(){a.call("relayout",e,Y);var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};if(t.showarrow&&me(0,0),A)h.init({element:L.node(),gd:e,prepFn:function(){ye=T.attr("transform"),ge={}},moveFn:function(e,n){var r="pointer";if(t.showarrow)t.axref===t.xref?ge[m+".ax"]=s.p2r(s.r2p(t.ax)+e):ge[m+".ax"]=t.ax+e,t.ayref===t.yref?ge[m+".ay"]=g.p2r(g.r2p(t.ay)+n):ge[m+".ay"]=t.ay+n,me(e,n);else{if(i)return;if(s)ge[m+".x"]=s.p2r(s.r2p(t.x)+e);else{var a=t._xsize/x.w,o=t.x+(t._xshift-t.xshift)/x.w-a/2;ge[m+".x"]=h.align(o+e/x.w,a,0,1,t.xanchor)}if(g)ge[m+".y"]=g.p2r(g.r2p(t.y)+n);else{var l=t._ysize/x.h,c=t.y-(t._yshift+t.yshift)/x.h-l/2;ge[m+".y"]=h.align(c-n/x.h,l,0,1,t.yanchor)}s&&g||(r=h.getCursor(s?.5:ge[m+".x"],g?.5:ge[m+".y"],t.xanchor,t.yanchor))}T.attr({transform:"translate("+e+","+n+")"+ye}),f(L,r)},doneFn:function(){f(L),a.call("relayout",e,ge);var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var n=0;n<t.annotations.length;n++)t.annotations[n].visible&&g(e,n);return i.previousPromises(e)},drawOne:g,drawRaw:y}},{"../../lib":152,"../../lib/setcursor":171,"../../lib/svg_text_utils":173,"../../plots/cartesian/axes":194,"../../plots/plots":226,"../../registry":241,"../color":32,"../dragelement":54,"../drawing":57,"../fx":74,"./draw_arrow_head":24,d3:3}],24:[function(e,t,n){"use strict";var r=e("d3"),a=e("../color"),i=e("./arrow_paths");t.exports=function(e,t,n){var o,s,l,c,u=e.node(),d=i[n.arrowhead||0],f=i[n.startarrowhead||0],h=(n.arrowwidth||1)*(n.arrowsize||1),p=(n.arrowwidth||1)*(n.startarrowsize||1),g=t.indexOf("start")>=0,y=t.indexOf("end")>=0,m=d.backoff*h+n.standoff,v=f.backoff*p+n.startstandoff;if("line"===u.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},s={x:+e.attr("x2"),y:+e.attr("y2")};var x=o.x-s.x,b=o.y-s.y;if(c=(l=Math.atan2(b,x))+Math.PI,m&&v&&m+v>Math.sqrt(x*x+b*b))return void O();if(m){if(m*m>x*x+b*b)return void O();var _=m*Math.cos(l),w=m*Math.sin(l);s.x+=_,s.y+=w,e.attr({x2:s.x,y2:s.y})}if(v){if(v*v>x*x+b*b)return void O();var k=v*Math.cos(l),M=v*Math.sin(l);o.x-=k,o.y-=M,e.attr({x1:o.x,y1:o.y})}}else if("path"===u.nodeName){var T=u.getTotalLength(),A="";if(T<m+v)return void O();var S=u.getPointAtLength(0),L=u.getPointAtLength(.1);l=Math.atan2(S.y-L.y,S.x-L.x),o=u.getPointAtLength(Math.min(v,T)),A="0px,"+v+"px,";var C=u.getPointAtLength(T),z=u.getPointAtLength(T-.1);c=Math.atan2(C.y-z.y,C.x-z.x),s=u.getPointAtLength(Math.max(0,T-m)),A+=T-(A?v+m:m)+"px,"+T+"px",e.style("stroke-dasharray",A)}function O(){e.style("stroke-dasharray","0px,100px")}function D(t,i,o,s){t.path&&(t.noRotate&&(o=0),r.select(u.parentNode).append("path").attr({class:e.attr("class"),d:t.path,transform:"translate("+i.x+","+i.y+")"+(o?"rotate("+180*o/Math.PI+")":"")+"scale("+s+")"}).style({fill:a.rgb(n.arrowcolor),"stroke-width":0}))}g&&D(f,o,l,p),y&&D(d,s,c,h)}},{"../color":32,"./arrow_paths":16,d3:3}],25:[function(e,t,n){"use strict";var r=e("./draw"),a=e("./click");t.exports={moduleType:"component",name:"annotations",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("annotations"),calcAutorange:e("./calc_autorange"),draw:r.draw,drawOne:r.drawOne,drawRaw:r.drawRaw,hasClickToShow:a.hasClickToShow,onClick:a.onClick,convertCoords:e("./convert_coords")}},{"../../plots/cartesian/include_components":204,"./attributes":17,"./calc_autorange":18,"./click":19,"./convert_coords":21,"./defaults":22,"./draw":23}],26:[function(e,t,n){"use strict";var r=e("../annotations/attributes"),a=e("../../plot_api/edit_types").overrideAll;t.exports=a({_isLinkedToArray:"annotation",visible:r.visible,x:{valType:"any",role:"info",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",role:"info",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",role:"info",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",role:"info",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",role:"info",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},xanchor:r.xanchor,xshift:r.xshift,yanchor:r.yanchor,yshift:r.yshift,text:r.text,textangle:r.textangle,font:r.font,width:r.width,height:r.height,opacity:r.opacity,align:r.align,valign:r.valign,bgcolor:r.bgcolor,bordercolor:r.bordercolor,borderpad:r.borderpad,borderwidth:r.borderwidth,showarrow:r.showarrow,arrowcolor:r.arrowcolor,arrowhead:r.arrowhead,startarrowhead:r.startarrowhead,arrowside:r.arrowside,arrowsize:r.arrowsize,startarrowsize:r.startarrowsize,arrowwidth:r.arrowwidth,standoff:r.standoff,startstandoff:r.startstandoff,hovertext:r.hovertext,hoverlabel:r.hoverlabel,captureevents:r.captureevents},"calc","from-root")},{"../../plot_api/edit_types":179,"../annotations/attributes":17}],27:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plots/cartesian/axes");function i(e,t){var n=t.fullSceneLayout.domain,i=t.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},r.extendFlat(e._xa,o),a.setConvert(e._xa),e._xa._offset=i.l+n.x[0]*i.w,e._xa.l2p=function(){return.5*(1+e._pdata[0]/e._pdata[3])*i.w*(n.x[1]-n.x[0])},e._ya={},r.extendFlat(e._ya,o),a.setConvert(e._ya),e._ya._offset=i.t+(1-n.y[1])*i.h,e._ya.l2p=function(){return.5*(1-e._pdata[1]/e._pdata[3])*i.h*(n.y[1]-n.y[0])}}t.exports=function(e){for(var t=e.fullSceneLayout.annotations,n=0;n<t.length;n++)i(t[n],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()}},{"../../lib":152,"../../plots/cartesian/axes":194}],28:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../../plots/array_container_defaults"),o=e("../annotations/common_defaults"),s=e("./attributes");function l(e,t,n,i,l){function c(n,a){return r.coerce(e,t,s,n,a)}function u(e){var r=e+"axis",i={_fullLayout:{}};return i._fullLayout[r]=n[r],a.coercePosition(t,i,c,e,e,.5)}return c("visible",!l.itemIsNotPlainObject)?(o(e,t,i.fullLayout,c),u("x"),u("y"),u("z"),r.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",c("xanchor"),c("yanchor"),c("xshift"),c("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",c("ax",-10),c("ay",-30),r.noneOrAll(e,t,["ax","ay"])),t):t}t.exports=function(e,t,n){i(e,t,{name:"annotations",handleItemDefaults:l,fullLayout:n.fullLayout})}},{"../../lib":152,"../../plots/array_container_defaults":190,"../../plots/cartesian/axes":194,"../annotations/common_defaults":20,"./attributes":26}],29:[function(e,t,n){"use strict";var r=e("../annotations/draw").drawRaw,a=e("../../plots/gl3d/project"),i=["x","y","z"];t.exports=function(e){for(var t=e.fullSceneLayout,n=e.dataScale,o=t.annotations,s=0;s<o.length;s++){for(var l=o[s],c=!1,u=0;u<3;u++){var d=i[u],f=l[d],h=t[d+"axis"].r2fraction(f);if(h<0||h>1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=a(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*n[0],t.yaxis.r2l(l.y)*n[1],t.zaxis.r2l(l.z)*n[2]]),r(e.graphDiv,l,s,e.id,l._xa,l._ya))}}},{"../../plots/gl3d/project":223,"../annotations/draw":23}],30:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("../../lib");t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),includeBasePlot:function(e,t){var n=r.subplotsRegistry.gl3d;if(!n)return;for(var i=n.attrRegex,o=Object.keys(e),s=0;s<o.length;s++){var l=o[s];i.test(l)&&(e[l].annotations||[]).length&&(a.pushUnique(t._basePlotModules,n),a.pushUnique(t._subplots.gl3d,l))}},convert:e("./convert"),draw:e("./draw")}},{"../../lib":152,"../../registry":241,"./attributes":26,"./convert":27,"./defaults":28,"./draw":29}],31:[function(e,t,n){"use strict";n.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],n.defaultLine="#444",n.lightLine="#eee",n.background="#fff",n.borderLine="#BEC8D9",n.lightFraction=1e3/11},{}],32:[function(e,t,n){"use strict";var r=e("tinycolor2"),a=e("fast-isnumeric"),i=t.exports={},o=e("./attributes");i.defaults=o.defaults;var s=i.defaultLine=o.defaultLine;i.lightLine=o.lightLine;var l=i.background=o.background;function c(e){if(a(e)||"string"!=typeof e)return e;var t=e.trim();if("rgb"!==t.substr(0,3))return e;var n=t.match(/^rgba?\s*\(([^()]*)\)$/);if(!n)return e;var r=n[1].trim().split(/\s*[\s,]\s*/),i="a"===t.charAt(3)&&4===r.length;if(!i&&3!==r.length)return e;for(var o=0;o<r.length;o++){if(!r[o].length)return e;if(r[o]=Number(r[o]),!(r[o]>=0))return e;if(3===o)r[o]>1&&(r[o]=1);else if(r[o]>=1)return e}var s=Math.round(255*r[0])+", "+Math.round(255*r[1])+", "+Math.round(255*r[2]);return i?"rgba("+s+", "+r[3]+")":"rgb("+s+")"}i.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},i.rgb=function(e){return i.tinyRGB(r(e))},i.opacity=function(e){return e?r(e).getAlpha():0},i.addOpacity=function(e,t){var n=r(e).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+t+")"},i.combine=function(e,t){var n=r(e).toRgb();if(1===n.a)return r(e).toRgbString();var a=r(t||l).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-n.a)+n.r*n.a,g:i.g*(1-n.a)+n.g*n.a,b:i.b*(1-n.a)+n.b*n.a};return r(o).toRgbString()},i.contrast=function(e,t,n){var a=r(e);return 1!==a.getAlpha()&&(a=r(i.combine(e,l))),(a.isDark()?t?a.lighten(t):l:n?a.darken(n):s).toString()},i.stroke=function(e,t){var n=r(t);e.style({stroke:i.tinyRGB(n),"stroke-opacity":n.getAlpha()})},i.fill=function(e,t){var n=r(t);e.style({fill:i.tinyRGB(n),"fill-opacity":n.getAlpha()})},i.clean=function(e){if(e&&"object"==typeof e){var t,n,r,a,o=Object.keys(e);for(t=0;t<o.length;t++)if(a=e[r=o[t]],"color"===r.substr(r.length-5))if(Array.isArray(a))for(n=0;n<a.length;n++)a[n]=c(a[n]);else e[r]=c(a);else if("colorscale"===r.substr(r.length-10)&&Array.isArray(a))for(n=0;n<a.length;n++)Array.isArray(a[n])&&(a[n][1]=c(a[n][1]));else if(Array.isArray(a)){var s=a[0];if(!Array.isArray(s)&&s&&"object"==typeof s)for(n=0;n<a.length;n++)i.clean(a[n])}else a&&"object"==typeof a&&i.clean(a)}}},{"./attributes":31,"fast-isnumeric":5,tinycolor2:293}],33:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/layout_attributes"),a=e("../../plots/font_attributes"),i=e("../../lib/extend").extendFlat,o=e("../../plot_api/edit_types").overrideAll;t.exports=o({thicknessmode:{valType:"enumerated",values:["fraction","pixels"],role:"style",dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",role:"style",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],role:"info",dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,role:"style",description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",dflt:1.02,min:-2,max:3,role:"style",description:["Sets the x position of the color bar (in plot fraction)."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",role:"style",description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar."].join(" ")},xpad:{valType:"number",role:"style",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",role:"style",dflt:.5,min:-2,max:3,description:["Sets the y position of the color bar (in plot fraction)."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],role:"style",dflt:"middle",description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar."].join(" ")},ypad:{valType:"number",role:"style",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:r.linecolor,outlinewidth:r.linewidth,bordercolor:r.linecolor,borderwidth:{valType:"number",role:"style",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",role:"style",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:r.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:i({},r.ticks,{dflt:""}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,showticklabels:r.showticklabels,tickfont:a({description:"Sets the color bar's tick label font"}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,showexponent:r.showexponent,title:{valType:"string",role:"info",description:"Sets the title of the color bar."},titlefont:a({description:"Sets this color bar's title font."}),titleside:{valType:"enumerated",values:["right","top","bottom"],role:"style",dflt:"top",description:["Determines the location of the colorbar title","with respect to the color bar."].join(" ")}},"colorbars","from-root")},{"../../lib/extend":146,"../../plot_api/edit_types":179,"../../plots/cartesian/layout_attributes":206,"../../plots/font_attributes":220}],34:[function(e,t,n){"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},{}],35:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plots/cartesian/tick_value_defaults"),i=e("../../plots/cartesian/tick_mark_defaults"),o=e("../../plots/cartesian/tick_label_defaults"),s=e("./attributes");t.exports=function(e,t,n){var l=t.colorbar={},c=e.colorbar||{};function u(e,t){return r.coerce(c,l,s,e,t)}u("thickness","fraction"===u("thicknessmode")?30/(n.width-n.margin.l-n.margin.r):30),u("len","fraction"===u("lenmode")?1:n.height-n.margin.t-n.margin.b),u("x"),u("xanchor"),u("xpad"),u("y"),u("yanchor"),u("ypad"),r.noneOrAll(c,l,["x","y"]),u("outlinecolor"),u("outlinewidth"),u("bordercolor"),u("borderwidth"),u("bgcolor"),a(c,l,u,"linear");var d={outerTicks:!1,font:n.font};o(c,l,u,"linear",d),i(c,l,u,"linear",d),u("title",n._dfltTitle.colorbar),r.coerceFont(u,"titlefont",n.font),u("titleside")}},{"../../lib":152,"../../plots/cartesian/tick_label_defaults":213,"../../plots/cartesian/tick_mark_defaults":214,"../../plots/cartesian/tick_value_defaults":215,"./attributes":33}],36:[function(e,t,n){"use strict";var r=e("d3"),a=e("tinycolor2"),i=e("../../plots/plots"),o=e("../../registry"),s=e("../../plots/cartesian/axes"),l=e("../dragelement"),c=e("../../lib"),u=e("../../lib/extend").extendFlat,d=e("../../lib/setcursor"),f=e("../drawing"),h=e("../color"),p=e("../titles"),g=e("../../lib/svg_text_utils"),y=e("../../constants/alignment").LINE_SPACING,m=e("../../plots/cartesian/axis_defaults"),v=e("../../plots/cartesian/position_defaults"),x=e("../../plots/cartesian/layout_attributes"),b=e("./attributes"),_=e("./constants").cn;t.exports=function(e,t){var n={};function w(){var b=e._fullLayout,M=b._size;if("function"==typeof n.fillcolor||"function"==typeof n.line.color){var T,A,S=r.extent(("function"==typeof n.fillcolor?n.fillcolor:n.line.color).domain()),L=[],C=[],z="function"==typeof n.line.color?n.line.color:function(){return n.line.color},O="function"==typeof n.fillcolor?n.fillcolor:function(){return n.fillcolor},D=n.levels.end+n.levels.size/100,P=n.levels.size,I=1.001*S[0]-.001*S[1],j=1.001*S[1]-.001*S[0];for(A=0;A<1e5&&(T=n.levels.start+A*P,!(P>0?T>=D:T<=D));A++)T>I&&T<j&&L.push(T);if("function"==typeof n.fillcolor)if(n.filllevels)for(D=n.filllevels.end+n.filllevels.size/100,P=n.filllevels.size,A=0;A<1e5&&(T=n.filllevels.start+A*P,!(P>0?T>=D:T<=D));A++)T>S[0]&&T<S[1]&&C.push(T);else(C=L.map(function(e){return e-n.levels.size/2})).push(C[C.length-1]+n.levels.size);else n.fillcolor&&"string"==typeof n.fillcolor&&(C=[0]);n.levels.size<0&&(L.reverse(),C.reverse());var E,N=b.height-b.margin.t-b.margin.b,R=b.width-b.margin.l-b.margin.r,F=Math.round(n.thickness*("fraction"===n.thicknessmode?R:1)),B=F/M.w,H=Math.round(n.len*("fraction"===n.lenmode?N:1)),q=H/M.h,V=n.xpad/M.w,U=(n.borderwidth+n.outlinewidth)/2,G=n.ypad/M.h,Y=Math.round(n.x*M.w+n.xpad),Z=n.x-B*({middle:.5,right:1}[n.xanchor]||0),X=n.y+q*(({top:-.5,bottom:.5}[n.yanchor]||0)-.5),W=Math.round(M.h*(1-X)),J=W-H,Q={type:"linear",range:S,tickmode:n.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:n.ticks,ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,tickfont:n.tickfont,tickangle:n.tickangle,tickformat:n.tickformat,exponentformat:n.exponentformat,separatethousands:n.separatethousands,showexponent:n.showexponent,showtickprefix:n.showtickprefix,tickprefix:n.tickprefix,showticksuffix:n.showticksuffix,ticksuffix:n.ticksuffix,title:n.title,titlefont:n.titlefont,showline:!0,anchor:"free",position:1},$={type:"linear",_id:"y"+t},K={letter:"y",font:b.font,noHover:!0,calendar:b.calendar};if(m(Q,$,pe,K,b),v(Q,$,pe,K),$.position=n.x+V+B,w.axis=$,-1!==["top","bottom"].indexOf(n.titleside)&&($.titleside=n.titleside,$.titlex=n.x+V,$.titley=X+("top"===n.titleside?q-G:G)),n.line.color&&"auto"===n.tickmode){$.tickmode="linear",$.tick0=n.levels.start;var ee=n.levels.size,te=c.constrain((W-J)/50,4,15)+1,ne=(S[1]-S[0])/((n.nticks||te)*ee);if(ne>1){var re=Math.pow(10,Math.floor(Math.log(ne)/Math.LN10));ee*=re*c.roundUp(ne/re,[2,5,10]),(Math.abs(n.levels.start)/n.levels.size+1e-6)%1<2e-6&&($.tick0=0)}$.dtick=ee}$.domain=[X+G,X+q-G],$.setScale();var ae=c.ensureSingle(b._infolayer,"g",t,function(e){e.classed(_.colorbar,!0).each(function(){var e=r.select(this);e.append("rect").classed(_.cbbg,!0),e.append("g").classed(_.cbfills,!0),e.append("g").classed(_.cblines,!0),e.append("g").classed(_.cbaxis,!0).classed(_.crisp,!0),e.append("g").classed(_.cbtitleunshift,!0).append("g").classed(_.cbtitle,!0),e.append("rect").classed(_.cboutline,!0),e.select(".cbtitle").datum(0)})});ae.attr("transform","translate("+Math.round(M.l)+","+Math.round(M.t)+")");var ie=ae.select(".cbtitleunshift").attr("transform","translate(-"+Math.round(M.l)+",-"+Math.round(M.t)+")");$._axislayer=ae.select(".cbaxis");var oe=0;if(-1!==["top","bottom"].indexOf(n.titleside)){var se,le=M.l+(n.x+V)*M.w,ce=$.titlefont.size;se="top"===n.titleside?(1-(X+q-G))*M.h+M.t+3+.75*ce:(1-(X+G))*M.h+M.t-3-.25*ce,ge($._id+"title",{attributes:{x:le,y:se,"text-anchor":"start"}})}var ue,de,fe,he=c.syncOrAsync([i.previousPromises,function(){if(-1!==["top","bottom"].indexOf(n.titleside)){var t=ae.select(".cbtitle"),i=t.select("text"),o=[-n.outlinewidth/2,n.outlinewidth/2],l=t.select(".h"+$._id+"title-math-group").node(),u=15.6;if(i.node()&&(u=parseInt(i.node().style.fontSize,10)*y),l?(oe=f.bBox(l).height)>u&&(o[1]-=(oe-u)/2):i.node()&&!i.classed(_.jsPlaceholder)&&(oe=f.bBox(i.node()).height),oe){if(oe+=5,"top"===n.titleside)$.domain[1]-=oe/M.h,o[1]*=-1;else{$.domain[0]+=oe/M.h;var d=g.lineCount(i);o[1]+=(1-d)*u}t.attr("transform","translate("+o+")"),$.setScale()}}ae.selectAll(".cbfills,.cblines").attr("transform","translate(0,"+Math.round(M.h*(1-$.domain[1]))+")"),$._axislayer.attr("transform","translate(0,"+Math.round(-M.t)+")");var h=ae.select(".cbfills").selectAll("rect.cbfill").data(C);h.enter().append("rect").classed(_.cbfill,!0).style("stroke","none"),h.exit().remove(),h.each(function(e,t){var n=[0===t?S[0]:(C[t]+C[t-1])/2,t===C.length-1?S[1]:(C[t]+C[t+1])/2].map($.c2p).map(Math.round);t!==C.length-1&&(n[1]+=n[1]>n[0]?1:-1);var i=O(e).replace("e-",""),o=a(i).toHexString();r.select(this).attr({x:Y,width:Math.max(F,2),y:r.min(n),height:Math.max(r.max(n)-r.min(n),2),fill:o})});var p=ae.select(".cblines").selectAll("path.cbline").data(n.line.color&&n.line.width?L:[]);return p.enter().append("path").classed(_.cbline,!0),p.exit().remove(),p.each(function(e){r.select(this).attr("d","M"+Y+","+(Math.round($.c2p(e))+n.line.width/2%1)+"h"+F).call(f.lineGroupStyle,n.line.width,z(e),n.line.dash)}),$._axislayer.selectAll("g."+$._id+"tick,path").remove(),$._pos=Y+F+(n.outlinewidth||0)/2-("outside"===n.ticks?1:0),$.side="right",c.syncOrAsync([function(){return s.doTicks(e,$,!0)},function(){if(-1===["top","bottom"].indexOf(n.titleside)){var t=$.titlefont.size,a=$._offset+$._length/2,i=M.l+($.position||0)*M.w+("right"===$.side?10+t*($.showticklabels?1:.5):-10-t*($.showticklabels?.5:0));ge("h"+$._id+"title",{avoid:{selection:r.select(e).selectAll("g."+$._id+"tick"),side:n.titleside,offsetLeft:M.l,offsetTop:0,maxShift:b.width},attributes:{x:i,y:a,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}}])},i.previousPromises,function(){var r=F+n.outlinewidth/2+f.bBox($._axislayer.node()).width;if((E=ie.select("text")).node()&&!E.classed(_.jsPlaceholder)){var a,o=ie.select(".h"+$._id+"title-math-group").node();a=o&&-1!==["top","bottom"].indexOf(n.titleside)?f.bBox(o).width:f.bBox(ie.node()).right-Y-M.l,r=Math.max(r,a)}var s=2*n.xpad+r+n.borderwidth+n.outlinewidth/2,l=W-J;ae.select(".cbbg").attr({x:Y-n.xpad-(n.borderwidth+n.outlinewidth)/2,y:J-U,width:Math.max(s,2),height:Math.max(l+2*U,2)}).call(h.fill,n.bgcolor).call(h.stroke,n.bordercolor).style({"stroke-width":n.borderwidth}),ae.selectAll(".cboutline").attr({x:Y,y:J+n.ypad+("top"===n.titleside?oe:0),width:Math.max(F,2),height:Math.max(l-2*n.ypad-oe,2)}).call(h.stroke,n.outlinecolor).style({fill:"None","stroke-width":n.outlinewidth});var c=({center:.5,right:1}[n.xanchor]||0)*s;ae.attr("transform","translate("+(M.l-c)+","+M.t+")"),i.autoMargin(e,t,{x:n.x,y:n.y,l:s*({right:1,center:.5}[n.xanchor]||0),r:s*({left:1,center:.5}[n.xanchor]||0),t:l*({bottom:1,middle:.5}[n.yanchor]||0),b:l*({top:1,middle:.5}[n.yanchor]||0)})}],e);if(he&&he.then&&(e._promises||[]).push(he),e._context.edits.colorbarPosition)l.init({element:ae.node(),gd:e,prepFn:function(){ue=ae.attr("transform"),d(ae)},moveFn:function(e,t){ae.attr("transform",ue+" translate("+e+","+t+")"),de=l.align(Z+e/M.w,B,0,1,n.xanchor),fe=l.align(X-t/M.h,q,0,1,n.yanchor);var r=l.getCursor(de,fe,n.xanchor,n.yanchor);d(ae,r)},doneFn:function(){d(ae),void 0!==de&&void 0!==fe&&o.call("restyle",e,{"colorbar.x":de,"colorbar.y":fe},k().index)}});return he}function pe(e,t){return c.coerce(Q,$,x,e,t)}function ge(t,n){var r,a=k();r=o.traceIs(a,"markerColorscale")?"marker.colorbar.title":"colorbar.title";var i={propContainer:$,propName:r,traceIndex:a.index,placeholder:b._dfltTitle.colorbar,containerGroup:ae.select(".cbtitle")},s="h"===t.charAt(0)?t.substr(1):"h"+t;ae.selectAll("."+s+",."+s+"-math-group").remove(),p.draw(e,t,u(i,n||{}))}b._infolayer.selectAll("g."+t).remove()}function k(){var n,r,a=t.substr(2);for(n=0;n<e._fullData.length;n++)if((r=e._fullData[n]).uid===a)return r}return Object.keys(b).forEach(function(e){n[e]=null}),n.fillcolor=null,n.line={color:null,width:null,dash:null},n.levels={start:null,end:null,size:null},n.filllevels=null,Object.keys(n).forEach(function(e){w[e]=function(t){return arguments.length?(n[e]=c.isPlainObject(n[e])?c.extendFlat(n[e],t):t,w):n[e]}}),w.options=function(e){return Object.keys(e).forEach(function(t){"function"==typeof w[t]&&w[t](e[t])}),w},w._opts=n,w}},{"../../constants/alignment":132,"../../lib":152,"../../lib/extend":146,"../../lib/setcursor":171,"../../lib/svg_text_utils":173,"../../plots/cartesian/axes":194,"../../plots/cartesian/axis_defaults":196,"../../plots/cartesian/layout_attributes":206,"../../plots/cartesian/position_defaults":209,"../../plots/plots":226,"../../registry":241,"../color":32,"../dragelement":54,"../drawing":57,"../titles":125,"./attributes":33,"./constants":34,d3:3,tinycolor2:293}],37:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e){return r.isPlainObject(e.colorbar)}},{"../../lib":152}],38:[function(e,t,n){"use strict";t.exports={zauto:{valType:"boolean",role:"info",dflt:!0,editType:"calc",impliedEdits:{zmin:void 0,zmax:void 0},description:["Determines the whether or not the color domain is computed","with respect to the input data."].join(" ")},zmin:{valType:"number",role:"info",dflt:null,editType:"plot",impliedEdits:{zauto:!1},description:"Sets the lower bound of color domain."},zmax:{valType:"number",role:"info",dflt:null,editType:"plot",impliedEdits:{zauto:!1},description:"Sets the upper bound of color domain."},colorscale:{valType:"colorscale",role:"style",editType:"calc",impliedEdits:{autocolorscale:!1},description:["Sets the colorscale.","The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)', [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in z space,","use zmin and zmax"].join(" ")},autocolorscale:{valType:"boolean",role:"style",dflt:!0,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether or not the colorscale is picked using the sign of","the input z values."].join(" ")},reversescale:{valType:"boolean",role:"style",dflt:!1,editType:"calc",description:"Reverses the colorscale."},showscale:{valType:"boolean",role:"info",dflt:!0,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."].join(" ")}}},{}],39:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("./scales"),i=e("./flip_scale");t.exports=function(e,t,n,o){var s=e,l=e._input,c=e._fullInput,u=e.updateStyle;function d(t,r,a){void 0===a&&(a=r),u?u(e._input,n?n+"."+t:t,r):l[t]=r,s[t]=a,c&&e!==e._fullInput&&(u?u(e._fullInput,n?n+"."+t:t,a):c[t]=a)}n&&(s=r.nestedProperty(s,n).get(),l=r.nestedProperty(l,n).get(),c=r.nestedProperty(c,n).get()||{});var f=o+"auto",h=o+"min",p=o+"max",g=s[f],y=s[h],m=s[p],v=s.colorscale;!1===g&&void 0!==y||(y=r.aggNums(Math.min,null,t)),!1===g&&void 0!==m||(m=r.aggNums(Math.max,null,t)),y===m&&(y-=.5,m+=.5),d(h,y),d(p,m),d(f,!1!==g||void 0===y&&void 0===m),s.autocolorscale&&(d("colorscale",v=y*m<0?a.RdBu:y>=0?a.Reds:a.Blues,s.reversescale?i(v):v),l.autocolorscale||d("autocolorscale",!1))}},{"../../lib":152,"./flip_scale":44,"./scales":51}],40:[function(e,t,n){"use strict";var r=e("./attributes"),a=e("../../lib/extend").extendFlat,i=e("./scales.js");t.exports=function(e,t,n){var o=e?e+".":"";return{color:{valType:"color",arrayOk:!0,role:"style",editType:t||"style",description:["Sets the",e,"color. It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to","`cmin` and `cmax` if set."].join(" ")},colorscale:a({},r.colorscale,{description:["Sets the colorscale and only has an effect","if `"+o+"color` is set to a numerical array.","The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)', [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use `"+o+"cmin` and `"+o+"cmax`.","Alternatively, `colorscale` may be a palette name string","of the following list:",Object.keys(i).join(", ")].join(" ")}),cauto:a({},r.zauto,{impliedEdits:{cmin:void 0,cmax:void 0},description:["Has an effect only if `"+o+"color` is set to a numerical array","and `cmin`, `cmax` are set by the user. In this case,","it controls whether the range of colors in `colorscale` is mapped to","the range of values in the `color` array (`cauto: true`), or the `cmin`/`cmax`","values (`cauto: false`).","Defaults to `false` when `cmin`, `cmax` are set by the user."].join(" ")}),cmax:a({},r.zmax,{editType:t||r.zmax.editType,impliedEdits:{cauto:!1},description:["Has an effect only if `"+o+"color` is set to a numerical array.","Sets the upper bound of the color domain.","Value should be associated to the `"+o+"color` array index,","and if set, `"+o+"cmin` must be set as well."].join(" ")}),cmin:a({},r.zmin,{editType:t||r.zmin.editType,impliedEdits:{cauto:!1},description:["Has an effect only if `"+o+"color` is set to a numerical array.","Sets the lower bound of the color domain.","Value should be associated to the `"+o+"color` array index,","and if set, `"+o+"cmax` must be set as well."].join(" ")}),autocolorscale:a({},r.autocolorscale,{description:["Has an effect only if `"+o+"color` is set to a numerical array.","Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by `"+o+"colorscale`.","In case `colorscale` is unspecified or `autocolorscale` is true, the default ","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" "),dflt:!1===n?n:r.autocolorscale.dflt}),reversescale:a({},r.reversescale,{description:["Has an effect only if `"+o+"color` is set to a numerical array.","Reverses the color mapping if true (`cmin` will correspond to the last color","in the array and `cmax` will correspond to the first color)."].join(" ")})}}},{"../../lib/extend":146,"./attributes":38,"./scales.js":51}],41:[function(e,t,n){"use strict";var r=e("./scales");t.exports=r.RdBu},{"./scales":51}],42:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../lib"),i=e("../colorbar/has_colorbar"),o=e("../colorbar/defaults"),s=e("./is_valid_scale"),l=e("./flip_scale");t.exports=function(e,t,n,c,u){var d,f=u.prefix,h=u.cLetter,p=f.slice(0,f.length-1),g=f?a.nestedProperty(e,p).get()||{}:e,y=f?a.nestedProperty(t,p).get()||{}:t,m=g[h+"min"],v=g[h+"max"],x=g.colorscale;c(f+h+"auto",!(r(m)&&r(v)&&m<v)),c(f+h+"min"),c(f+h+"max"),void 0!==x&&(d=!s(x)),c(f+"autocolorscale",d);var b,_=c(f+"colorscale");(c(f+"reversescale")&&(y.colorscale=l(_)),"marker.line."!==f)&&(f&&(b=i(g)),c(f+"showscale",b)&&o(g,y,n))}},{"../../lib":152,"../colorbar/defaults":35,"../colorbar/has_colorbar":37,"./flip_scale":44,"./is_valid_scale":48,"fast-isnumeric":5}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n){for(var r=e.length,a=new Array(r),i=new Array(r),o=0;o<r;o++){var s=e[o];a[o]=t+s[0]*(n-t),i[o]=s[1]}return{domain:a,range:i}}},{}],44:[function(e,t,n){"use strict";t.exports=function(e){for(var t,n=e.length,r=new Array(n),a=n-1,i=0;a>=0;a--,i++)t=e[a],r[i]=[1-t[0],t[1]];return r}},{}],45:[function(e,t,n){"use strict";var r=e("./scales"),a=e("./default_scale"),i=e("./is_valid_scale_array");t.exports=function(e,t){if(t||(t=a),!e)return t;function n(){try{e=r[e]||JSON.parse(e)}catch(n){e=t}}return"string"==typeof e&&(n(),"string"==typeof e&&n()),i(e)?e:t}},{"./default_scale":41,"./is_valid_scale_array":49,"./scales":51}],46:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../lib"),i=e("./is_valid_scale");t.exports=function(e,t){var n=t?a.nestedProperty(e,t).get()||{}:e,o=n.color,s=!1;if(a.isArrayOrTypedArray(o))for(var l=0;l<o.length;l++)if(r(o[l])){s=!0;break}return a.isPlainObject(n)&&(s||!0===n.showscale||r(n.cmin)&&r(n.cmax)||i(n.colorscale)||a.isPlainObject(n.colorbar))}},{"../../lib":152,"./is_valid_scale":48,"fast-isnumeric":5}],47:[function(e,t,n){"use strict";n.scales=e("./scales"),n.defaultScale=e("./default_scale"),n.attributes=e("./attributes"),n.handleDefaults=e("./defaults"),n.calc=e("./calc"),n.hasColorscale=e("./has_colorscale"),n.isValidScale=e("./is_valid_scale"),n.getScale=e("./get_scale"),n.flipScale=e("./flip_scale"),n.extractScale=e("./extract_scale"),n.makeColorScaleFunc=e("./make_color_scale_func")},{"./attributes":38,"./calc":39,"./default_scale":41,"./defaults":42,"./extract_scale":43,"./flip_scale":44,"./get_scale":45,"./has_colorscale":46,"./is_valid_scale":48,"./make_color_scale_func":50,"./scales":51}],48:[function(e,t,n){"use strict";var r=e("./scales"),a=e("./is_valid_scale_array");t.exports=function(e){return void 0!==r[e]||a(e)}},{"./is_valid_scale_array":49,"./scales":51}],49:[function(e,t,n){"use strict";var r=e("tinycolor2");t.exports=function(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var n=0;n<e.length;n++){var a=e[n];if(2!==a.length||+a[0]<t||!r(a[1]).isValid())return!1;t=+a[0]}return!0}},{tinycolor2:293}],50:[function(e,t,n){"use strict";var r=e("d3"),a=e("tinycolor2"),i=e("fast-isnumeric"),o=e("../color");function s(e){var t={r:e[0],g:e[1],b:e[2],a:e[3]};return a(t).toRgbString()}t.exports=function(e,t){t=t||{};for(var n=e.domain,l=e.range,c=l.length,u=new Array(c),d=0;d<c;d++){var f=a(l[d]).toRgb();u[d]=[f.r,f.g,f.b,f.a]}var h,p=r.scale.linear().domain(n).range(u).clamp(!0),g=t.noNumericCheck,y=t.returnArray;return(h=g&&y?p:g?function(e){return s(p(e))}:y?function(e){return i(e)?p(e):a(e).isValid()?e:o.defaultLine}:function(e){return i(e)?s(p(e)):a(e).isValid()?e:o.defaultLine}).domain=p.domain,h.range=function(){return l},h}},{"../color":32,d3:3,"fast-isnumeric":5,tinycolor2:293}],51:[function(e,t,n){"use strict";t.exports={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]}},{}],52:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,a){var i=(e-n)/(r-n),o=i+t/(r-n),s=(i+o)/2;return"left"===a||"bottom"===a?i:"center"===a||"middle"===a?s:"right"===a||"top"===a?o:i<2/3-s?i:o>4/3-s?o:s}},{}],53:[function(e,t,n){"use strict";var r=e("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,n,i){return e="left"===n?0:"center"===n?1:"right"===n?2:r.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:r.constrain(Math.floor(3*t),0,2),a[t][e]}},{"../../lib":152}],54:[function(e,t,n){"use strict";var r=e("mouse-event-offset"),a=e("has-hover"),i=e("has-passive-events"),o=e("../../registry"),s=e("../../lib"),l=e("../../plots/cartesian/constants"),c=e("../../constants/interactions"),u=t.exports={};u.align=e("./align"),u.getCursor=e("./cursor");var d=e("./unhover");function f(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function h(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}u.unhover=d.wrapped,u.unhoverRaw=d.raw,u.init=function(e){var t,n,r,d,p,g,y,m,v=e.gd,x=1,b=c.DBLCLICKDELAY,_=e.element;v._mouseDownTime||(v._mouseDownTime=0),_.style.pointerEvents="all",_.onmousedown=k,i?(_._ontouchstart&&_.removeEventListener("touchstart",_._ontouchstart),_._ontouchstart=k,_.addEventListener("touchstart",k,{passive:!1})):_.ontouchstart=k;var w=e.clampFn||function(e,t,n){return Math.abs(e)<n&&(e=0),Math.abs(t)<n&&(t=0),[e,t]};function k(i){i.preventDefault(),v._dragged=!1,v._dragging=!0;var o=h(i);t=o[0],n=o[1],y=i.target,g=i,m=2===i.buttons||i.ctrlKey,(r=(new Date).getTime())-v._mouseDownTime<b?x+=1:(x=1,v._mouseDownTime=r),e.prepFn&&e.prepFn(i,t,n),a&&!m?(p=f()).style.cursor=window.getComputedStyle(_).cursor:a||(p=document,d=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(_).cursor),document.addEventListener("mousemove",M),document.addEventListener("mouseup",T),document.addEventListener("touchmove",M),document.addEventListener("touchend",T)}function M(r){r.preventDefault();var a=h(r),i=e.minDrag||l.MINDRAG,o=w(a[0]-t,a[1]-n,i),s=o[0],c=o[1];(s||c)&&(v._dragged=!0,u.unhover(v)),v._dragged&&e.moveFn&&!m&&e.moveFn(s,c)}function T(t){if(document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",T),document.removeEventListener("touchmove",M),document.removeEventListener("touchend",T),t.preventDefault(),a?s.removeElement(p):d&&(p.documentElement.style.cursor=d,d=null),v._dragging){if(v._dragging=!1,(new Date).getTime()-v._mouseDownTime>b&&(x=Math.max(x-1,1)),v._dragged)e.doneFn&&e.doneFn(t);else if(e.clickFn&&e.clickFn(x,g),!m){var n;try{n=new MouseEvent("click",t)}catch(e){var r=h(t);(n=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,r[0],r[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}y.dispatchEvent(n)}!function(e){e._dragging=!1,e._replotPending&&o.call("plot",e)}(v),v._dragged=!1}else v._dragged=!1}},u.coverSlip=f},{"../../constants/interactions":133,"../../lib":152,"../../plots/cartesian/constants":199,"../../registry":241,"./align":52,"./cursor":53,"./unhover":55,"has-hover":7,"has-passive-events":8,"mouse-event-offset":10}],55:[function(e,t,n){"use strict";var r=e("../../lib/events"),a=e("../../lib/throttle"),i=e("../../lib/get_graph_div"),o=e("../fx/constants"),s=t.exports={};s.wrapped=function(e,t,n){(e=i(e))._fullLayout&&a.clear(e._fullLayout._uid+o.HOVERID),s.raw(e,t,n)},s.raw=function(e,t){var n=e._fullLayout,a=e._hoverdata;t||(t={}),t.target&&!1===r.triggerHandler(e,"plotly_beforehover",t)||(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&a&&e.emit("plotly_unhover",{event:t,points:a}))}},{"../../lib/events":145,"../../lib/get_graph_div":150,"../../lib/throttle":174,"../fx/constants":69}],56:[function(e,t,n){"use strict";n.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",role:"style",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")}},{}],57:[function(e,t,n){"use strict";var r=e("d3"),a=e("fast-isnumeric"),i=e("tinycolor2"),o=e("../../registry"),s=e("../color"),l=e("../colorscale"),c=e("../../lib"),u=e("../../lib/svg_text_utils"),d=e("../../constants/xmlns_namespaces"),f=e("../../constants/alignment").LINE_SPACING,h=e("../../constants/interactions").DESELECTDIM,p=e("../../traces/scatter/subtypes"),g=e("../../traces/scatter/make_bubble_size_func"),y=t.exports={};y.font=function(e,t,n,r){c.isPlainObject(t)&&(r=t.color,n=t.size,t=t.family),t&&e.style("font-family",t),n+1&&e.style("font-size",n+"px"),r&&e.call(s.fill,r)},y.setPosition=function(e,t,n){e.attr("x",t).attr("y",n)},y.setSize=function(e,t,n){e.attr("width",t).attr("height",n)},y.setRect=function(e,t,n,r,a){e.call(y.setPosition,t,n).call(y.setSize,r,a)},y.translatePoint=function(e,t,n,r){var i=n.c2p(e.x),o=r.c2p(e.y);return!!(a(i)&&a(o)&&t.node())&&("text"===t.node().nodeName?t.attr("x",i).attr("y",o):t.attr("transform","translate("+i+","+o+")"),!0)},y.translatePoints=function(e,t,n){e.each(function(e){var a=r.select(this);y.translatePoint(e,a,t,n)})},y.hideOutsideRangePoint=function(e,t,n,r,a,i){t.attr("display",n.isPtWithinRange(e,a)&&r.isPtWithinRange(e,i)?null:"none")},y.hideOutsideRangePoints=function(e,t,n){if(t._hasClipOnAxisFalse){n=n||".point,.textpoint";var a=t.xaxis,i=t.yaxis;e.each(function(t){var o=t[0].trace,s=o.xcalendar,l=o.ycalendar;e.selectAll(n).each(function(e){y.hideOutsideRangePoint(e,r.select(this),a,i,s,l)})})}},y.crispRound=function(e,t,n){return t&&a(t)?e._context.staticPlot?t:t<1?1:Math.round(t):n||0},y.singleLineStyle=function(e,t,n,r,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=n||i.width||0,l=a||i.dash||"";s.stroke(t,r||i.color),y.dashLine(t,l,o)},y.lineGroupStyle=function(e,t,n,a){e.style("fill","none").each(function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";r.select(this).call(s.stroke,n||i.color).call(y.dashLine,l,o)})},y.dashLine=function(e,t,n){n=+n||0,t=y.dashStyle(t,n),e.style({"stroke-dasharray":t,"stroke-width":n+"px"})},y.dashStyle=function(e,t){t=+t||1;var n=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=n+"px,"+n+"px":"dash"===e?e=3*n+"px,"+3*n+"px":"longdash"===e?e=5*n+"px,"+5*n+"px":"dashdot"===e?e=3*n+"px,"+n+"px,"+n+"px,"+n+"px":"longdashdot"===e&&(e=5*n+"px,"+2*n+"px,"+n+"px,"+2*n+"px"),e},y.singleFillStyle=function(e){var t=(((r.select(e.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;t&&e.call(s.fill,t)},y.fillGroupStyle=function(e){e.style("stroke-width",0).each(function(t){var n=r.select(this);try{n.call(s.fill,t[0].trace.fillcolor)}catch(t){c.error(t,e),n.remove()}})};var m=e("./symbol_defs");y.symbolNames=[],y.symbolFuncs=[],y.symbolNeedLines={},y.symbolNoDot={},y.symbolNoFill={},y.symbolList=[],Object.keys(m).forEach(function(e){var t=m[e];y.symbolList=y.symbolList.concat([t.n,e,t.n+100,e+"-open"]),y.symbolNames[t.n]=e,y.symbolFuncs[t.n]=t.f,t.needLine&&(y.symbolNeedLines[t.n]=!0),t.noDot?y.symbolNoDot[t.n]=!0:y.symbolList=y.symbolList.concat([t.n+200,e+"-dot",t.n+300,e+"-open-dot"]),t.noFill&&(y.symbolNoFill[t.n]=!0)});var v=y.symbolNames.length,x="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";function b(e,t){var n=e%100;return y.symbolFuncs[n](t)+(e>=200?x:"")}y.symbolNumber=function(e){if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=y.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=v||e>=400?0:Math.floor(Math.max(e,0))};var _={x1:1,x2:0,y1:0,y2:0},w={x1:0,x2:0,y1:1,y2:0};y.gradient=function(e,t,n,a,o,l){var u=t._fullLayout._defs.select(".gradients").selectAll("#"+n).data([a+o+l],c.identity);u.exit().remove(),u.enter().append("radial"===a?"radialGradient":"linearGradient").each(function(){var e=r.select(this);"horizontal"===a?e.attr(_):"vertical"===a&&e.attr(w),e.attr("id",n);var t=i(o),c=i(l);e.append("stop").attr({offset:"0%","stop-color":s.tinyRGB(c),"stop-opacity":c.getAlpha()}),e.append("stop").attr({offset:"100%","stop-color":s.tinyRGB(t),"stop-opacity":t.getAlpha()})}),e.style({fill:"url(#"+n+")","fill-opacity":null})},y.initGradients=function(e){c.ensureSingle(e._fullLayout._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove()},y.pointStyle=function(e,t,n){if(e.size()){var a=y.makePointStyleFns(t);e.each(function(e){y.singlePointStyle(e,r.select(this),t,a,n)})}},y.singlePointStyle=function(e,t,n,r,a){var i=n.marker,o=i.line;if(t.style("opacity",r.selectedOpacityFn?r.selectedOpacityFn(e):void 0===e.mo?i.opacity:e.mo),r.ms2mrc){var l;l="various"===e.ms||"various"===i.size?3:r.ms2mrc(e.ms),e.mrc=l,r.selectedSizeFn&&(l=e.mrc=r.selectedSizeFn(e));var u=y.symbolNumber(e.mx||i.symbol)||0;e.om=u%200>=100,t.attr("d",b(u,l))}var d,f,h,p=!1;if(e.so?(h=o.outlierwidth,f=o.outliercolor,d=i.outliercolor):(h=(e.mlw+1||o.width+1||(e.trace?e.trace.marker.line.width:0)+1)-1,f="mlc"in e?e.mlcc=r.lineScale(e.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(i.color)&&(d=s.defaultLine,p=!0),d="mc"in e?e.mcc=r.markerScale(e.mc):i.color||"rgba(0,0,0,0)",r.selectedColorFn&&(d=r.selectedColorFn(e))),e.om)t.call(s.stroke,d).style({"stroke-width":(h||1)+"px",fill:"none"});else{t.style("stroke-width",h+"px");var g=i.gradient,m=e.mgt;if(m?p=!0:m=g&&g.type,m&&"none"!==m){var v=e.mgc;v?p=!0:v=g.color;var x="g"+a._fullLayout._uid+"-"+n.uid;p&&(x+="-"+e.i),t.call(y.gradient,a,x,m,d,v)}else t.call(s.fill,d);h&&t.call(s.stroke,f)}},y.makePointStyleFns=function(e){var t={},n=e.marker;return t.markerScale=y.tryColorscale(n,""),t.lineScale=y.tryColorscale(n,"line"),o.traceIs(e,"symbols")&&(t.ms2mrc=p.isBubble(e)?g(e):function(){return(n.size||6)/2}),e.selectedpoints&&c.extendFlat(t,y.makeSelectedPointStyleFns(e)),t},y.makeSelectedPointStyleFns=function(e){var t={},n=e.selected||{},r=e.unselected||{},a=e.marker||{},i=n.marker||{},s=r.marker||{},l=a.opacity,u=i.opacity,d=s.opacity,f=void 0!==u,p=void 0!==d;(c.isArrayOrTypedArray(l)||f||p)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?a.opacity:e.mo;return e.selected?f?u:t:p?d:h*t});var g=a.color,y=i.color,m=s.color;(y||m)&&(t.selectedColorFn=function(e){var t=e.mcc||g;return e.selected?y||t:m||t});var v=a.size,x=i.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(e,"symbols")&&(_||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||v/2;return e.selected?_?x/2:t:w?b/2:t}),t},y.makeSelectedTextStyleFns=function(e){var t={},n=e.selected||{},r=e.unselected||{},a=e.textfont||{},i=n.textfont||{},o=r.textfont||{},l=a.color,c=i.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?c||t:u||(c?t:s.addOpacity(t,h))},t},y.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=y.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];n.selectedOpacityFn&&i.push(function(e,t){e.style("opacity",n.selectedOpacityFn(t))}),n.selectedColorFn&&i.push(function(e,t){s.fill(e,n.selectedColorFn(t))}),n.selectedSizeFn&&i.push(function(e,t){var r=t.mx||a.symbol||0,i=n.selectedSizeFn(t);e.attr("d",b(y.symbolNumber(r),i)),t.mrc2=i}),i.length&&e.each(function(e){for(var t=r.select(this),n=0;n<i.length;n++)i[n](t,e)})}},y.tryColorscale=function(e,t){var n=t?c.nestedProperty(e,t).get():e,r=n.colorscale,a=n.color;return r&&c.isArrayOrTypedArray(a)?l.makeColorScaleFunc(l.extractScale(r,n.cmin,n.cmax)):c.identity};var k={start:1,end:-1,middle:0,bottom:1,top:-1};function M(e,t,n,a){var i=r.select(e.node().parentNode),o=-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle",s=-1!==t.indexOf("left")?"end":-1!==t.indexOf("right")?"start":"middle",l=a?a/.8+1:0,c=(u.lineCount(e)-1)*f+1,d=k[s]*l,h=.75*n+k[o]*l+(k[o]-1)*c*n/2;e.attr("text-anchor",s),i.attr("transform","translate("+d+","+h+")")}function T(e,t){var n=e.ts||t.textfont.size;return a(n)&&n>0?n:0}y.textPointStyle=function(e,t,n){if(e.size()){var a;if(t.selectedpoints){var i=y.makeSelectedTextStyleFns(t);a=i.selectedTextColorFn}e.each(function(e){var i=r.select(this),o=c.extractOption(e,t,"tx","text");if(o){var s=e.tp||t.textposition,l=T(e,t),d=a?a(e):e.tc||t.textfont.color;i.call(y.font,e.tf||t.textfont.family,l,d).text(o).call(u.convertToTspans,n).call(M,s,l,e.mrc)}else i.remove()})}},y.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=y.makeSelectedTextStyleFns(t);e.each(function(e){var a=r.select(this),i=n.selectedTextColorFn(e),o=e.tp||t.textposition,l=T(e,t);s.fill(a,i),M(a,o,l,e.mrc2||e.mrc)})}};var A=.5;function S(e,t,n,a){var i=e[0]-t[0],o=e[1]-t[1],s=n[0]-t[0],l=n[1]-t[1],c=Math.pow(i*i+o*o,A/2),u=Math.pow(s*s+l*l,A/2),d=(u*u*i-c*c*s)*a,f=(u*u*o-c*c*l)*a,h=3*u*(c+u),p=3*c*(c+u);return[[r.round(t[0]+(h&&d/h),2),r.round(t[1]+(h&&f/h),2)],[r.round(t[0]-(p&&d/p),2),r.round(t[1]-(p&&f/p),2)]]}y.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var n,r="M"+e[0],a=[];for(n=1;n<e.length-1;n++)a.push(S(e[n-1],e[n],e[n+1],t));for(r+="Q"+a[0][0]+" "+e[1],n=2;n<e.length-1;n++)r+="C"+a[n-2][1]+" "+a[n-1][0]+" "+e[n];return r+="Q"+a[e.length-3][1]+" "+e[e.length-1]},y.smoothclosed=function(e,t){if(e.length<3)return"M"+e.join("L")+"Z";var n,r="M"+e[0],a=e.length-1,i=[S(e[a],e[0],e[1],t)];for(n=1;n<a;n++)i.push(S(e[n-1],e[n],e[n+1],t));for(i.push(S(e[a-1],e[a],e[0],t)),n=1;n<=a;n++)r+="C"+i[n-1][1]+" "+i[n][0]+" "+e[n];return r+="C"+i[a][1]+" "+i[0][0]+" "+e[0]+"Z"};var L={hv:function(e,t){return"H"+r.round(t[0],2)+"V"+r.round(t[1],2)},vh:function(e,t){return"V"+r.round(t[1],2)+"H"+r.round(t[0],2)},hvh:function(e,t){return"H"+r.round((e[0]+t[0])/2,2)+"V"+r.round(t[1],2)+"H"+r.round(t[0],2)},vhv:function(e,t){return"V"+r.round((e[1]+t[1])/2,2)+"H"+r.round(t[0],2)+"V"+r.round(t[1],2)}},C=function(e,t){return"L"+r.round(t[0],2)+","+r.round(t[1],2)};y.steps=function(e){var t=L[e]||C;return function(e){for(var n="M"+r.round(e[0][0],2)+","+r.round(e[0][1],2),a=1;a<e.length;a++)n+=t(e[a-1],e[a]);return n}},y.makeTester=function(){var e=c.ensureSingleById(r.select("body"),"svg","js-plotly-tester",function(e){e.attr(d.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=c.ensureSingle(e,"path","js-reference-point",function(e){e.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});y.tester=e,y.testref=t},y.savedBBoxes={};var z=0;function O(e){var t=e.getAttribute("data-unformatted");if(null!==t)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}y.bBox=function(e,t,n){var a,i,o;if(n||(n=O(e)),n){if(a=y.savedBBoxes[n])return c.extendFlat({},a)}else if(1===e.childNodes.length){var s=e.childNodes[0];if(n=O(s)){var l=+s.getAttribute("x")||0,d=+s.getAttribute("y")||0,f=s.getAttribute("transform");if(!f){var h=y.bBox(s,!1,n);return l&&(h.left+=l,h.right+=l),d&&(h.top+=d,h.bottom+=d),h}if(n+="~"+l+"~"+d+"~"+f,a=y.savedBBoxes[n])return c.extendFlat({},a)}}t?i=e:(o=y.tester.node(),i=e.cloneNode(!0),o.appendChild(i)),r.select(i).attr("transform",null).call(u.positionText,0,0);var p=i.getBoundingClientRect(),g=y.testref.node().getBoundingClientRect();t||o.removeChild(i);var m={height:p.height,width:p.width,left:p.left-g.left,top:p.top-g.top,right:p.right-g.left,bottom:p.bottom-g.top};return z>=1e4&&(y.savedBBoxes={},z=0),n&&(y.savedBBoxes[n]=m),z++,c.extendFlat({},m)},y.setClipUrl=function(e,t){if(t){if(void 0===y.baseUrl){var n=r.select("base");n.size()&&n.attr("href")?y.baseUrl=window.location.href.split("#")[0]:y.baseUrl=""}e.attr("clip-path","url("+y.baseUrl+"#"+t+")")}else e.attr("clip-path",null)},y.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(e,t,n){return[t,n].join(" ")}).split(" ");return{x:+t[0]||0,y:+t[1]||0}},y.setTranslate=function(e,t,n){var r=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[r]("transform")||"";return t=t||0,n=n||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=" translate("+t+", "+n+")").trim(),e[a]("transform",i),i},y.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(e,t,n){return[t,n].join(" ")}).split(" ");return{x:+t[0]||1,y:+t[1]||1}},y.setScale=function(e,t,n){var r=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[r]("transform")||"";return t=t||1,n=n||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+=" scale("+t+", "+n+")").trim(),e[a]("transform",i),i},y.setPointGroupScale=function(e,t,n){var r,a,i;return t=t||1,n=n||1,a=1===t&&1===n?"":" scale("+t+","+n+")",i=/\s*sc.*/,e.each(function(){r=(this.getAttribute("transform")||"").replace(i,""),r=(r+=a).trim(),this.setAttribute("transform",r)}),a};var D=/translate\([^)]*\)\s*$/;y.setTextPointsScale=function(e,t,n){e.each(function(){var e,a=r.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),s=parseFloat(i.attr("y")||0),l=(a.attr("transform")||"").match(D);e=1===t&&1===n?[]:["translate("+o+","+s+")","scale("+t+","+n+")","translate("+-o+","+-s+")"],l&&e.push(l),a.attr("transform",e.join(" "))}})}},{"../../constants/alignment":132,"../../constants/interactions":133,"../../constants/xmlns_namespaces":136,"../../lib":152,"../../lib/svg_text_utils":173,"../../registry":241,"../../traces/scatter/make_bubble_size_func":270,"../../traces/scatter/subtypes":275,"../color":32,"../colorscale":47,"./symbol_defs":58,d3:3,"fast-isnumeric":5,tinycolor2:293}],58:[function(e,t,n){"use strict";var r=e("d3");t.exports={circle:{n:0,f:function(e){var t=r.round(e,2);return"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"}},square:{n:1,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"}},diamond:{n:2,f:function(e){var t=r.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"Z"}},cross:{n:3,f:function(e){var t=r.round(.4*e,2),n=r.round(1.2*e,2);return"M"+n+","+t+"H"+t+"V"+n+"H-"+t+"V"+t+"H-"+n+"V-"+t+"H-"+t+"V-"+n+"H"+t+"V-"+t+"H"+n+"Z"}},x:{n:4,f:function(e){var t=r.round(.8*e/Math.sqrt(2),2),n="l"+t+","+t,a="l"+t+",-"+t,i="l-"+t+",-"+t,o="l-"+t+","+t;return"M0,"+t+n+a+i+a+i+o+i+o+n+o+n+"Z"}},"triangle-up":{n:5,f:function(e){var t=r.round(2*e/Math.sqrt(3),2);return"M-"+t+","+r.round(e/2,2)+"H"+t+"L0,-"+r.round(e,2)+"Z"}},"triangle-down":{n:6,f:function(e){var t=r.round(2*e/Math.sqrt(3),2);return"M-"+t+",-"+r.round(e/2,2)+"H"+t+"L0,"+r.round(e,2)+"Z"}},"triangle-left":{n:7,f:function(e){var t=r.round(2*e/Math.sqrt(3),2);return"M"+r.round(e/2,2)+",-"+t+"V"+t+"L-"+r.round(e,2)+",0Z"}},"triangle-right":{n:8,f:function(e){var t=r.round(2*e/Math.sqrt(3),2);return"M-"+r.round(e/2,2)+",-"+t+"V"+t+"L"+r.round(e,2)+",0Z"}},"triangle-ne":{n:9,f:function(e){var t=r.round(.6*e,2),n=r.round(1.2*e,2);return"M-"+n+",-"+t+"H"+t+"V"+n+"Z"}},"triangle-se":{n:10,f:function(e){var t=r.round(.6*e,2),n=r.round(1.2*e,2);return"M"+t+",-"+n+"V"+t+"H-"+n+"Z"}},"triangle-sw":{n:11,f:function(e){var t=r.round(.6*e,2),n=r.round(1.2*e,2);return"M"+n+","+t+"H-"+t+"V-"+n+"Z"}},"triangle-nw":{n:12,f:function(e){var t=r.round(.6*e,2),n=r.round(1.2*e,2);return"M-"+t+","+n+"V-"+t+"H"+n+"Z"}},pentagon:{n:13,f:function(e){var t=r.round(.951*e,2),n=r.round(.588*e,2),a=r.round(-e,2),i=r.round(-.309*e,2);return"M"+t+","+i+"L"+n+","+r.round(.809*e,2)+"H-"+n+"L-"+t+","+i+"L0,"+a+"Z"}},hexagon:{n:14,f:function(e){var t=r.round(e,2),n=r.round(e/2,2),a=r.round(e*Math.sqrt(3)/2,2);return"M"+a+",-"+n+"V"+n+"L0,"+t+"L-"+a+","+n+"V-"+n+"L0,-"+t+"Z"}},hexagon2:{n:15,f:function(e){var t=r.round(e,2),n=r.round(e/2,2),a=r.round(e*Math.sqrt(3)/2,2);return"M-"+n+","+a+"H"+n+"L"+t+",0L"+n+",-"+a+"H-"+n+"L-"+t+",0Z"}},octagon:{n:16,f:function(e){var t=r.round(.924*e,2),n=r.round(.383*e,2);return"M-"+n+",-"+t+"H"+n+"L"+t+",-"+n+"V"+n+"L"+n+","+t+"H-"+n+"L-"+t+","+n+"V-"+n+"Z"}},star:{n:17,f:function(e){var t=1.4*e,n=r.round(.225*t,2),a=r.round(.951*t,2),i=r.round(.363*t,2),o=r.round(.588*t,2),s=r.round(-t,2),l=r.round(-.309*t,2),c=r.round(.118*t,2),u=r.round(.809*t,2);return"M"+n+","+l+"H"+a+"L"+i+","+c+"L"+o+","+u+"L0,"+r.round(.382*t,2)+"L-"+o+","+u+"L-"+i+","+c+"L-"+a+","+l+"H-"+n+"L0,"+s+"Z"}},hexagram:{n:18,f:function(e){var t=r.round(.66*e,2),n=r.round(.38*e,2),a=r.round(.76*e,2);return"M-"+a+",0l-"+n+",-"+t+"h"+a+"l"+n+",-"+t+"l"+n+","+t+"h"+a+"l-"+n+","+t+"l"+n+","+t+"h-"+a+"l-"+n+","+t+"l-"+n+",-"+t+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(e){var t=r.round(e*Math.sqrt(3)*.8,2),n=r.round(.8*e,2),a=r.round(1.6*e,2),i=r.round(4*e,2),o="A "+i+","+i+" 0 0 1 ";return"M-"+t+","+n+o+t+","+n+o+"0,-"+a+o+"-"+t+","+n+"Z"}},"star-triangle-down":{n:20,f:function(e){var t=r.round(e*Math.sqrt(3)*.8,2),n=r.round(.8*e,2),a=r.round(1.6*e,2),i=r.round(4*e,2),o="A "+i+","+i+" 0 0 1 ";return"M"+t+",-"+n+o+"-"+t+",-"+n+o+"0,"+a+o+t+",-"+n+"Z"}},"star-square":{n:21,f:function(e){var t=r.round(1.1*e,2),n=r.round(2*e,2),a="A "+n+","+n+" 0 0 1 ";return"M-"+t+",-"+t+a+"-"+t+","+t+a+t+","+t+a+t+",-"+t+a+"-"+t+",-"+t+"Z"}},"star-diamond":{n:22,f:function(e){var t=r.round(1.4*e,2),n=r.round(1.9*e,2),a="A "+n+","+n+" 0 0 1 ";return"M-"+t+",0"+a+"0,"+t+a+t+",0"+a+"0,-"+t+a+"-"+t+",0Z"}},"diamond-tall":{n:23,f:function(e){var t=r.round(.7*e,2),n=r.round(1.4*e,2);return"M0,"+n+"L"+t+",0L0,-"+n+"L-"+t+",0Z"}},"diamond-wide":{n:24,f:function(e){var t=r.round(1.4*e,2),n=r.round(.7*e,2);return"M0,"+n+"L"+t+",0L0,-"+n+"L-"+t+",0Z"}},hourglass:{n:25,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"H-"+t+"L"+t+",-"+t+"H-"+t+"Z"},noDot:!0},bowtie:{n:26,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"V-"+t+"L-"+t+","+t+"V-"+t+"Z"},noDot:!0},"circle-cross":{n:27,f:function(e){var t=r.round(e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e){var t=r.round(e,2),n=r.round(e/Math.sqrt(2),2);return"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e){var t=r.round(e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t+"M"+t+",-"+t+"L-"+t+","+t+"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e){var t=r.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM0,-"+t+"V"+t+"M-"+t+",0H"+t},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e){var t=r.round(1.3*e,2),n=r.round(.65*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e){var t=r.round(1.4*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t+"M"+t+",-"+t+"L-"+t+","+t},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e){var t=r.round(1.2*e,2),n=r.round(.85*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e){var t=r.round(e/2,2),n=r.round(e,2);return"M"+t+","+n+"V-"+n+"m-"+n+",0V"+n+"M"+n+","+t+"H-"+n+"m0,-"+n+"H"+n},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e){var t=r.round(1.2*e,2),n=r.round(1.6*e,2),a=r.round(.8*e,2);return"M-"+t+","+a+"L0,0M"+t+","+a+"L0,0M0,-"+n+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e){var t=r.round(1.2*e,2),n=r.round(1.6*e,2),a=r.round(.8*e,2);return"M-"+t+",-"+a+"L0,0M"+t+",-"+a+"L0,0M0,"+n+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e){var t=r.round(1.2*e,2),n=r.round(1.6*e,2),a=r.round(.8*e,2);return"M"+a+","+t+"L0,0M"+a+",-"+t+"L0,0M-"+n+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e){var t=r.round(1.2*e,2),n=r.round(1.6*e,2),a=r.round(.8*e,2);return"M-"+a+","+t+"L0,0M-"+a+",-"+t+"L0,0M"+n+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e){var t=r.round(1.4*e,2);return"M"+t+",0H-"+t},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e){var t=r.round(1.4*e,2);return"M0,"+t+"V-"+t},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e){var t=r.round(e,2);return"M"+t+",-"+t+"L-"+t+","+t},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t},needLine:!0,noDot:!0,noFill:!0}}},{d3:3}],59:[function(e,t,n){"use strict";t.exports={visible:{valType:"boolean",role:"info",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],role:"info",editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the sqaure of the","underlying data.","If *array*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",role:"info",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,role:"info",editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,role:"info",editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},traceref:{valType:"integer",min:0,dflt:0,role:"info",editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,role:"info",editType:"style"},copy_ystyle:{valType:"boolean",role:"style",editType:"plot"},copy_zstyle:{valType:"boolean",role:"style",editType:"style"},color:{valType:"color",role:"style",editType:"style",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,role:"style",editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,role:"style",editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",role:"style",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}}},{}],60:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../registry"),i=e("../../plots/cartesian/axes"),o=e("./compute_error");function s(e,t,n,a){var s=t["error_"+a]||{},l=[];if(s.visible&&-1!==["linear","log"].indexOf(n.type)){for(var c=o(s),u=0;u<e.length;u++){var d=e[u],f=d[a];if(r(n.c2l(f))){var h=c(f,u);if(r(h[0])&&r(h[1])){var p=d[a+"s"]=f-h[0],g=d[a+"h"]=f+h[1];l.push(p,g)}}}i.expand(n,l,{padded:!0})}}t.exports=function(e){for(var t=e.calcdata,n=0;n<t.length;n++){var r=t[n],o=r[0].trace;if(a.traceIs(o,"errorBarsOK")){var l=i.getFromId(e,o.xaxis),c=i.getFromId(e,o.yaxis);s(r,o,l,"x"),s(r,o,c,"y")}}}},{"../../plots/cartesian/axes":194,"../../registry":241,"./compute_error":61,"fast-isnumeric":5}],61:[function(e,t,n){"use strict";function r(e,t){return"percent"===e?function(e){return Math.abs(e*t/100)}:"constant"===e?function(){return Math.abs(t)}:"sqrt"===e?function(e){return Math.sqrt(Math.abs(e))}:void 0}t.exports=function(e){var t=e.type,n=e.symmetric;if("data"===t){var a=e.array||[];if(n)return function(e,t){var n=+a[t];return[n,n]};var i=e.arrayminus||[];return function(e,t){var n=+a[t],r=+i[t];return isNaN(n)&&isNaN(r)?[NaN,NaN]:[r||0,n||0]}}var o=r(t,e.value),s=r(t,e.valueminus);return n||void 0===e.valueminus?function(e){var t=o(e);return[t,t]}:function(e){return[s(e),o(e)]}}},{}],62:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../registry"),i=e("../../lib"),o=e("./attributes");t.exports=function(e,t,n,s){var l="error_"+s.axis,c=t[l]={},u=e[l]||{};function d(e,t){return i.coerce(u,c,o,e,t)}if(!1!==d("visible",void 0!==u.array||void 0!==u.value||"sqrt"===u.type)){var f=d("type","array"in u?"data":"percent"),h=!0;"sqrt"!==f&&(h=d("symmetric",!(("data"===f?"arrayminus":"valueminus")in u))),"data"===f?(d("array"),d("traceref"),h||(d("arrayminus"),d("tracerefminus"))):"percent"!==f&&"constant"!==f||(d("value"),h||d("valueminus"));var p="copy_"+s.inherit+"style";if(s.inherit)(t["error_"+s.inherit]||{}).visible&&d(p,!(u.color||r(u.thickness)||r(u.width)));s.inherit&&c[p]||(d("color",n),d("thickness"),d("width",a.traceIs(t,"gl3d")?0:4))}}},{"../../lib":152,"../../registry":241,"./attributes":59,"fast-isnumeric":5}],63:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plot_api/edit_types").overrideAll,i=e("./attributes"),o=e("./calc"),s={error_x:r.extendFlat({},i),error_y:r.extendFlat({},i)};delete s.error_x.copy_zstyle,delete s.error_y.copy_zstyle,delete s.error_y.copy_ystyle;var l={error_x:r.extendFlat({},i),error_y:r.extendFlat({},i),error_z:r.extendFlat({},i)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:s,bar:s,histogram:s,scatter3d:a(l,"calc","nested"),scattergl:a(s,"calc","nested")}},supplyDefaults:e("./defaults"),calc:o,calcFromTrace:function(e,t){for(var n=e.x||[],r=e.y||[],a=n.length||r.length,i=new Array(a),s=0;s<a;s++)i[s]={x:n[s],y:r[s]};return i[0].trace=e,o({calcdata:[i],_fullLayout:t}),i},plot:e("./plot"),style:e("./style"),hoverInfo:function(e,t,n){(t.error_y||{}).visible&&(n.yerr=e.yh-e.y,t.error_y.symmetric||(n.yerrneg=e.y-e.ys));(t.error_x||{}).visible&&(n.xerr=e.xh-e.x,t.error_x.symmetric||(n.xerrneg=e.x-e.xs))}}},{"../../lib":152,"../../plot_api/edit_types":179,"./attributes":59,"./calc":60,"./defaults":62,"./plot":64,"./style":65}],64:[function(e,t,n){"use strict";var r=e("d3"),a=e("fast-isnumeric"),i=e("../drawing"),o=e("../../traces/scatter/subtypes");t.exports=function(e,t,n){var s=t.xaxis,l=t.yaxis,c=n&&n.duration>0;e.each(function(e){var u,d=e[0].trace,f=d.error_x||{},h=d.error_y||{};d.ids&&(u=function(e){return e.id});var p=o.hasMarkers(d)&&d.marker.maxdisplayed>0;h.visible||f.visible||(e=[]);var g=r.select(this).selectAll("g.errorbar").data(e,u);if(g.exit().remove(),e.length){f.visible||g.selectAll("path.xerror").remove(),h.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var y=g.enter().append("g").classed("errorbar",!0);c&&y.style("opacity",0).transition().duration(n.duration).style("opacity",1),i.setClipUrl(g,t.layerClipId),g.each(function(e){var t=r.select(this),i=function(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};void 0!==e.yh&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),a(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0)));void 0!==e.xh&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),a(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0)));return r}(e,s,l);if(!p||e.vis){var o,u=t.select("path.yerror");if(h.visible&&a(i.x)&&a(i.yh)&&a(i.ys)){var d=h.width;o="M"+(i.x-d)+","+i.yh+"h"+2*d+"m-"+d+",0V"+i.ys,i.noYS||(o+="m-"+d+",0h"+2*d),!u.size()?u=t.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0):c&&(u=u.transition().duration(n.duration).ease(n.easing)),u.attr("d",o)}else u.remove();var g=t.select("path.xerror");if(f.visible&&a(i.y)&&a(i.xh)&&a(i.xs)){var y=(f.copy_ystyle?h:f).width;o="M"+i.xh+","+(i.y-y)+"v"+2*y+"m0,-"+y+"H"+i.xs,i.noXS||(o+="m0,-"+y+"v"+2*y),!g.size()?g=t.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):c&&(g=g.transition().duration(n.duration).ease(n.easing)),g.attr("d",o)}else g.remove()}})}})}},{"../../traces/scatter/subtypes":275,"../drawing":57,d3:3,"fast-isnumeric":5}],65:[function(e,t,n){"use strict";var r=e("d3"),a=e("../color");t.exports=function(e){e.each(function(e){var t=e[0].trace,n=t.error_y||{},i=t.error_x||{},o=r.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(a.stroke,n.color),i.copy_ystyle&&(i=n),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)})}},{"../color":32,d3:3}],66:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes");t.exports={hoverlabel:{bgcolor:{valType:"color",role:"style",arrayOk:!0,editType:"none",description:["Sets the background color of the hover labels for this trace"].join(" ")},bordercolor:{valType:"color",role:"style",arrayOk:!0,editType:"none",description:["Sets the border color of the hover labels for this trace."].join(" ")},font:r({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),namelength:{valType:"integer",min:-1,arrayOk:!0,role:"style",editType:"none",description:["Sets the length (in number of characters) of the trace name in","the hover labels for this trace. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"calc"}}},{"../../plots/font_attributes":220}],67:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../registry");function i(e,t,n,a){a=a||r.identity,Array.isArray(e)&&(t[0][n]=a(e))}t.exports=function(e){var t=e.calcdata,n=e._fullLayout;function o(e){return function(t){return r.coerceHoverinfo({hoverinfo:t},{_module:e._module},n)}}for(var s=0;s<t.length;s++){var l=t[s],c=l[0].trace;if(!a.traceIs(c,"pie")){var u=a.traceIs(c,"2dMap")?i:r.fillArray;u(c.hoverinfo,l,"hi",o(c)),c.hoverlabel&&(u(c.hoverlabel.bgcolor,l,"hbg"),u(c.hoverlabel.bordercolor,l,"hbc"),u(c.hoverlabel.font.size,l,"hts"),u(c.hoverlabel.font.color,l,"htc"),u(c.hoverlabel.font.family,l,"htf"),u(c.hoverlabel.namelength,l,"hnl"))}}}},{"../../lib":152,"../../registry":241}],68:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("./hover").hover;t.exports=function(e,t,n){var i=r.getComponentMethod("annotations","onClick")(e,e._hoverdata);function o(){e.emit("plotly_click",{points:e._hoverdata,event:t})}void 0!==n&&a(e,t,n,!0),e._hoverdata&&t&&t.target&&(i&&i.then?i.then(o):o(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}},{"../../registry":241,"./hover":72}],69:[function(e,t,n){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},{}],70:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("./attributes"),i=e("./hoverlabel_defaults");t.exports=function(e,t,n,o){i(e,t,function(n,i){return r.coerce(e,t,a,n,i)},o.hoverlabel)}},{"../../lib":152,"./attributes":66,"./hoverlabel_defaults":73}],71:[function(e,t,n){"use strict";var r=e("../../lib");n.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},n.isTraceInSubplots=function(e,t){if("splom"===e.type){for(var r=e.xaxes||[],a=e.yaxes||[],i=0;i<r.length;i++)for(var o=0;o<a.length;o++)if(-1!==t.indexOf(r[i]+a[o]))return!0;return!1}return-1!==t.indexOf(n.getSubplot(e))},n.flat=function(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)n[r]=t;return n},n.p2c=function(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)n[r]=e[r].p2c(t);return n},n.getDistanceFunction=function(e,t,r,a){return"closest"===e?a||n.quadrature(t,r):"x"===e?t:r},n.getClosest=function(e,t,n){if(!1!==n.index)n.index>=0&&n.index<e.length?n.distance=0:n.index=!1;else for(var r=0;r<e.length;r++){var a=t(e[r]);a<=n.distance&&(n.index=r,n.distance=a)}return n},n.inbox=function(e,t,n){return e*t<0||0===e?n:1/0},n.quadrature=function(e,t){return function(n){var r=e(n),a=t(n);return Math.sqrt(r*r+a*a)}},n.makeEventData=function(e,t,r){var a="index"in e?e.index:e.pointNumber,i={data:t._input,fullData:t,curveNumber:t.index,pointNumber:a};if(t._indexToPoints){var o=t._indexToPoints[a];1===o.length?i.pointIndex=o[0]:i.pointIndices=o}else i.pointIndex=a;return t._module.eventData?i=t._module.eventData(i,e,t,r,a):("xVal"in e?i.x=e.xVal:"x"in e&&(i.x=e.x),"yVal"in e?i.y=e.yVal:"y"in e&&(i.y=e.y),e.xa&&(i.xaxis=e.xa),e.ya&&(i.yaxis=e.ya),void 0!==e.zLabelVal&&(i.z=e.zLabelVal)),n.appendArrayPointValue(i,t,a),i},n.appendArrayPointValue=function(e,t,n){var a=t._arrayAttrs;if(a)for(var s=0;s<a.length;s++){var l=a[s],c=i(l);if(void 0===e[c]){var u=o(r.nestedProperty(t,l).get(),n);void 0!==u&&(e[c]=u)}}},n.appendArrayMultiPointValues=function(e,t,n){var a=t._arrayAttrs;if(a)for(var s=0;s<a.length;s++){var l=a[s],c=i(l);if(void 0===e[c]){for(var u=r.nestedProperty(t,l).get(),d=new Array(n.length),f=0;f<n.length;f++)d[f]=o(u,n[f]);e[c]=d}}};var a={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color"};function i(e){return a[e]||e}function o(e,t){return Array.isArray(t)?Array.isArray(e)&&Array.isArray(e[t[0]])?e[t[0]][t[1]]:void 0:e[t]}},{"../../lib":152}],72:[function(e,t,n){"use strict";var r=e("d3"),a=e("fast-isnumeric"),i=e("tinycolor2"),o=e("../../lib"),s=e("../../lib/events"),l=e("../../lib/svg_text_utils"),c=e("../../lib/override_cursor"),u=e("../drawing"),d=e("../color"),f=e("../dragelement"),h=e("../../plots/cartesian/axes"),p=e("../../registry"),g=e("./helpers"),y=e("./constants"),m=y.YANGLE,v=Math.PI*m/180,x=1/Math.sin(v),b=Math.cos(v),_=Math.sin(v),w=y.HOVERARROWSIZE,k=y.HOVERTEXTPAD;function M(e,t,n){var a=t.hovermode,i=t.rotateLabels,s=t.bgColor,c=t.container,f=t.outerContainer,h=t.commonLabelOpts||{},p=t.fontFamily||y.HOVERFONT,g=t.fontSize||y.HOVERFONTSIZE,v=e[0],x=v.xa,b=v.ya,_="y"===a?"yLabel":"xLabel",M=v[_],T=(String(M)||"").split(" ")[0],A=f.node().getBoundingClientRect(),S=A.top,L=A.width,C=A.height,z=void 0!==M&&v.distance<=t.hoverdistance&&("x"===a||"y"===a);if(z){var O,D,P=!0;for(O=0;O<e.length;O++){P&&void 0===e[O].zLabel&&(P=!1),D=e[O].hoverinfo||e[O].trace.hoverinfo;var I=Array.isArray(D)?D:D.split("+");if(-1===I.indexOf("all")&&-1===I.indexOf(a)){z=!1;break}}P&&(z=!1)}var j=c.selectAll("g.axistext").data(z?[0]:[]);j.enter().append("g").classed("axistext",!0),j.exit().remove(),j.each(function(){var t=r.select(this),i=o.ensureSingle(t,"path","",function(e){e.style({"stroke-width":"1px"})}),s=o.ensureSingle(t,"text","",function(e){e.attr("data-notex",1)}),c=h.bgcolor||d.defaultLine,f=h.bordercolor||d.contrast(c);i.style({fill:c,stroke:f}),s.text(M).call(u.font,h.font.family||p,h.font.size||g,h.font.color||d.background).call(l.positionText,0,0).call(l.convertToTspans,n),t.attr("transform","");var y=s.node().getBoundingClientRect();if("x"===a){s.attr("text-anchor","middle").call(l.positionText,0,"top"===x.side?S-y.bottom-w-k:S-y.top+w+k);var m="top"===x.side?"-":"";i.attr("d","M0,0L"+w+","+m+w+"H"+(k+y.width/2)+"v"+m+(2*k+y.height)+"H-"+(k+y.width/2)+"V"+m+w+"H-"+w+"Z"),t.attr("transform","translate("+(x._offset+(v.x0+v.x1)/2)+","+(b._offset+("top"===x.side?0:b._length))+")")}else{s.attr("text-anchor","right"===b.side?"start":"end").call(l.positionText,("right"===b.side?1:-1)*(k+w),S-y.top-y.height/2);var A="right"===b.side?"":"-";i.attr("d","M0,0L"+A+w+","+w+"V"+(k+y.height/2)+"h"+A+(2*k+y.width)+"V-"+(k+y.height/2)+"H"+A+w+"V-"+w+"Z"),t.attr("transform","translate("+(x._offset+("right"===b.side?x._length:0))+","+(b._offset+(v.y0+v.y1)/2)+")")}e=e.filter(function(e){return void 0!==e.zLabelVal||(e[_]||"").split(" ")[0]===T})});var E=c.selectAll("g.hovertext").data(e,function(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa,e.ya||""].join(",")});return E.enter().append("g").classed("hovertext",!0).each(function(){var e=r.select(this);e.append("rect").call(d.fill,d.addOpacity(s,.8)),e.append("text").classed("name",!0),e.append("path").style("stroke-width","1px"),e.append("text").classed("nums",!0).call(u.font,p,g)}),E.exit().remove(),E.each(function(e){var t=r.select(this).attr("transform",""),o="",c="",f=d.opacity(e.color)?e.color:d.defaultLine,h=d.combine(f,s),y=e.borderColor||d.contrast(h);if(void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name){o=l.plainText(e.name||"");var v=Math.round(e.nameLength);v>-1&&o.length>v&&(o=v>3?o.substr(0,v-3)+"...":o.substr(0,v))}void 0!==e.zLabel?(void 0!==e.xLabel&&(c+="x: "+e.xLabel+"<br>"),void 0!==e.yLabel&&(c+="y: "+e.yLabel+"<br>"),c+=(c?"z: ":"")+e.zLabel):z&&e[a+"Label"]===M?c=e[("x"===a?"y":"x")+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&(c=e.yLabel):c=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",e.text&&!Array.isArray(e.text)&&(c+=(c?"<br>":"")+e.text),void 0!==e.extraText&&(c+=(c?"<br>":"")+e.extraText),""===c&&(""===o&&t.remove(),c=o);var x=t.select("text.nums").call(u.font,e.fontFamily||p,e.fontSize||g,e.fontColor||y).text(c).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,n),b=t.select("text.name"),_=0;o&&o!==c?(b.call(u.font,e.fontFamily||p,e.fontSize||g,h).text(o).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,n),_=b.node().getBoundingClientRect().width+2*k):(b.remove(),t.select("rect").remove()),t.select("path").style({fill:h,stroke:y});var T,A,O=x.node().getBoundingClientRect(),D=e.xa._offset+(e.x0+e.x1)/2,P=e.ya._offset+(e.y0+e.y1)/2,I=Math.abs(e.x1-e.x0),j=Math.abs(e.y1-e.y0),E=O.width+w+k+_;e.ty0=S-O.top,e.bx=O.width+2*k,e.by=O.height+2*k,e.anchor="start",e.txwidth=O.width,e.tx2width=_,e.offset=0,i?(e.pos=D,T=P+j/2+E<=C,A=P-j/2-E>=0,"top"!==e.idealAlign&&T||!A?T?(P+=j/2,e.anchor="start"):e.anchor="middle":(P-=j/2,e.anchor="end")):(e.pos=P,T=D+I/2+E<=L,A=D-I/2-E>=0,"left"!==e.idealAlign&&T||!A?T?(D+=I/2,e.anchor="start"):e.anchor="middle":(D-=I/2,e.anchor="end")),x.attr("text-anchor",e.anchor),_&&b.attr("text-anchor",e.anchor),t.attr("transform","translate("+D+","+P+")"+(i?"rotate("+m+")":""))}),E}function T(e,t){e.each(function(e){var n=r.select(this);if(e.del)n.remove();else{var a="end"===e.anchor?-1:1,i=n.select("text.nums"),o={start:1,end:-1,middle:0}[e.anchor],s=o*(w+k),c=s+o*(e.txwidth+k),d=0,f=e.offset;"middle"===e.anchor&&(s-=e.tx2width/2,c+=e.txwidth/2+k),t&&(f*=-_,d=e.offset*b),n.select("path").attr("d","middle"===e.anchor?"M-"+(e.bx/2+e.tx2width/2)+","+(f-e.by/2)+"h"+e.bx+"v"+e.by+"h-"+e.bx+"Z":"M0,0L"+(a*w+d)+","+(w+f)+"v"+(e.by/2-w)+"h"+a*e.bx+"v-"+e.by+"H"+(a*w+d)+"V"+(f-w)+"Z"),i.call(l.positionText,s+d,f+e.ty0-e.by/2+k),e.tx2width&&(n.select("text.name").call(l.positionText,c+o*k+d,f+e.ty0-e.by/2+k),n.select("rect").call(u.setRect,c+(o-1)*e.tx2width/2+d,f-e.by/2-1,e.tx2width,e.by+2))}})}function A(e,t){var n=e.index,r=e.trace||{},a=e.cd[0],i=e.cd[n]||{},s=Array.isArray(n)?function(e,t){return o.castOption(a,n,e)||o.extractOption({},r,"",t)}:function(e,t){return o.extractOption(i,r,e,t)};function l(t,n,r){var a=s(n,r);a&&(e[t]=a)}if(l("hoverinfo","hi","hoverinfo"),l("color","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("nameLength","hnl","hoverlabel.namelength"),e.posref="y"===t?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=o.constrain(e.x0,0,e.xa._length),e.x1=o.constrain(e.x1,0,e.xa._length),e.y0=o.constrain(e.y0,0,e.ya._length),e.y1=o.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:h.hoverLabelText(e.xa,e.xLabelVal),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:h.hoverLabelText(e.ya,e.yLabelVal),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var c=h.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+c+" / -"+h.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+c,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var u=h.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+u+" / -"+h.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+u,"y"===t&&(e.distance+=1)}var d=e.hoverinfo||e.trace.hoverinfo;return"all"!==d&&(-1===(d=Array.isArray(d)?d:d.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===d.indexOf("y")&&(e.yLabel=void 0),-1===d.indexOf("z")&&(e.zLabel=void 0),-1===d.indexOf("text")&&(e.text=void 0),-1===d.indexOf("name")&&(e.name=void 0)),e}function S(e,t){var n,r,a=t.container,o=t.fullLayout,s=t.event,l=!!e.hLinePoint,c=!!e.vLinePoint;if(a.selectAll(".spikeline").remove(),c||l){var f=d.combine(o.plot_bgcolor,o.paper_bgcolor);if(l){var h,p,g=e.hLinePoint;n=g&&g.xa,"cursor"===(r=g&&g.ya).spikesnap?(h=s.pointerX,p=s.pointerY):(h=n._offset+g.x,p=r._offset+g.y);var y,m,v=i.readability(g.color,f)<1.5?d.contrast(f):g.color,x=r.spikemode,b=r.spikethickness,_=r.spikecolor||v,w=r._boundingBox,k=(w.left+w.right)/2<h?w.right:w.left;-1===x.indexOf("toaxis")&&-1===x.indexOf("across")||(-1!==x.indexOf("toaxis")&&(y=k,m=h),-1!==x.indexOf("across")&&(y=r._counterSpan[0],m=r._counterSpan[1]),a.insert("line",":first-child").attr({x1:y,x2:m,y1:p,y2:p,"stroke-width":b,stroke:_,"stroke-dasharray":u.dashStyle(r.spikedash,b)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:y,x2:m,y1:p,y2:p,"stroke-width":b+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)),-1!==x.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:k+("right"!==r.side?b:-b),cy:p,r:b,fill:_}).classed("spikeline",!0)}if(c){var M,T,A=e.vLinePoint;n=A&&A.xa,r=A&&A.ya,"cursor"===n.spikesnap?(M=s.pointerX,T=s.pointerY):(M=n._offset+A.x,T=r._offset+A.y);var S,L,C=i.readability(A.color,f)<1.5?d.contrast(f):A.color,z=n.spikemode,O=n.spikethickness,D=n.spikecolor||C,P=n._boundingBox,I=(P.top+P.bottom)/2<T?P.bottom:P.top;-1===z.indexOf("toaxis")&&-1===z.indexOf("across")||(-1!==z.indexOf("toaxis")&&(S=I,L=T),-1!==z.indexOf("across")&&(S=n._counterSpan[0],L=n._counterSpan[1]),a.insert("line",":first-child").attr({x1:M,x2:M,y1:S,y2:L,"stroke-width":O,stroke:D,"stroke-dasharray":u.dashStyle(n.spikedash,O)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:M,x2:M,y1:S,y2:L,"stroke-width":O+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)),-1!==z.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:M,cy:I-("top"!==n.side?O:-O),r:O,fill:D}).classed("spikeline",!0)}}}function L(e,t){return!t||(t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint)}n.hover=function(e,t,n,i){e=o.getGraphDiv(e),o.throttle(e._fullLayout._uid+y.HOVERID,y.HOVERMINTIME,function(){!function(e,t,n,i){n||(n="xy");var l=Array.isArray(n)?n:[n],u=e._fullLayout,y=u._plots||[],m=y[n],v=u._has("cartesian");if(m){var b=m.overlays.map(function(e){return e.id});l=l.concat(b)}for(var _=l.length,w=new Array(_),k=new Array(_),C=!1,z=0;z<_;z++){var O=l[z],D=y[O];if(D)C=!0,w[z]=h.getFromId(e,D.xaxis._id),k[z]=h.getFromId(e,D.yaxis._id);else{var P=u[O]._subplot;w[z]=P.xaxis,k[z]=P.yaxis}}var I=t.hovermode||u.hovermode;I&&!C&&(I="closest");if(-1===["x","y","closest"].indexOf(I)||!e.calcdata||e.querySelector(".zoombox")||e._dragging)return f.unhoverRaw(e,t);var j,E,N,R,F,B,H,q,V,U,G,Y,Z,X=-1===u.hoverdistance?1/0:u.hoverdistance,W=-1===u.spikedistance?1/0:u.spikedistance,J=[],Q=[],$={hLinePoint:null,vLinePoint:null};if(Array.isArray(t))for(I="array",N=0;N<t.length;N++)"skip"!==(F=e.calcdata[t[N].curveNumber||0])[0].trace.hoverinfo&&Q.push(F);else{for(R=0;R<e.calcdata.length;R++)F=e.calcdata[R],"skip"!==(B=F[0].trace).hoverinfo&&g.isTraceInSubplots(B,l)&&Q.push(F);var K,ee,te=!t.target;if(te)K="xpx"in t?t.xpx:w[0]._length/2,ee="ypx"in t?t.ypx:k[0]._length/2;else{if(!1===s.triggerHandler(e,"plotly_beforehover",t))return;var ne=t.target.getBoundingClientRect();if(K=t.clientX-ne.left,ee=t.clientY-ne.top,K<0||K>w[0]._length||ee<0||ee>k[0]._length)return f.unhoverRaw(e,t)}if(t.pointerX=K+w[0]._offset,t.pointerY=ee+k[0]._offset,j="xval"in t?g.flat(l,t.xval):g.p2c(w,K),E="yval"in t?g.flat(l,t.yval):g.p2c(k,ee),!a(j[0])||!a(E[0]))return o.warn("Fx.hover failed",t,e),f.unhoverRaw(e,t)}var re=1/0;for(R=0;R<Q.length;R++)if((F=Q[R])&&F[0]&&F[0].trace&&!0===F[0].trace.visible&&(B=F[0].trace,-1===["carpet","contourcarpet"].indexOf(B._module.name))){if("splom"===B.type?H=l[q=0]:(H=g.getSubplot(B),q=l.indexOf(H)),V=I,Y={cd:F,trace:B,xa:w[q],ya:k[q],maxHoverDistance:X,maxSpikeDistance:W,index:!1,distance:Math.min(re,X),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:d.defaultLine,name:B.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},u[H]&&(Y.subplot=u[H]._subplot),Z=J.length,"array"===V){var ae=t[R];"pointNumber"in ae?(Y.index=ae.pointNumber,V="closest"):(V="","xval"in ae&&(U=ae.xval,V="x"),"yval"in ae&&(G=ae.yval,V=V?"closest":"y"))}else U=j[q],G=E[q];if(0!==X)if(B._module&&B._module.hoverPoints){var ie=B._module.hoverPoints(Y,U,G,V,u._hoverlayer);if(ie)for(var oe,se=0;se<ie.length;se++)oe=ie[se],a(oe.x0)&&a(oe.y0)&&J.push(A(oe,I))}else o.log("Unrecognized trace type in hover:",B);if("closest"===I&&J.length>Z&&(J.splice(0,Z),re=J[0].distance),v&&0!==W&&0===J.length){Y.distance=W,Y.index=!1;var le=B._module.hoverPoints(Y,U,G,"closest",u._hoverlayer);if(le&&(le=le.filter(function(e){return e.spikeDistance<=W})),le&&le.length){var ce,ue=le.filter(function(e){return e.xa.showspikes});if(ue.length){var de=ue[0];a(de.x0)&&a(de.y0)&&(ce=ge(de),(!$.vLinePoint||$.vLinePoint.spikeDistance>ce.spikeDistance)&&($.vLinePoint=ce))}var fe=le.filter(function(e){return e.ya.showspikes});if(fe.length){var he=fe[0];a(he.x0)&&a(he.y0)&&(ce=ge(he),(!$.hLinePoint||$.hLinePoint.spikeDistance>ce.spikeDistance)&&($.hLinePoint=ce))}}}}function pe(e,t){for(var n,r=null,a=1/0,i=0;i<e.length;i++)(n=e[i].spikeDistance)<a&&n<=t&&(r=e[i],a=n);return r}function ge(e){return e?{xa:e.xa,ya:e.ya,x:void 0!==e.xSpike?e.xSpike:(e.x0+e.x1)/2,y:void 0!==e.ySpike?e.ySpike:(e.y0+e.y1)/2,distance:e.distance,spikeDistance:e.spikeDistance,curveNumber:e.trace.index,color:e.color,pointNumber:e.index}:null}var ye={fullLayout:u,container:u._hoverlayer,outerContainer:u._paperdiv,event:t},me=e._spikepoints,ve={vLinePoint:$.vLinePoint,hLinePoint:$.hLinePoint};if(e._spikepoints=ve,v&&0!==W&&0!==J.length){var xe=J.filter(function(e){return e.ya.showspikes}),be=pe(xe,W);$.hLinePoint=ge(be);var _e=J.filter(function(e){return e.xa.showspikes}),we=pe(_e,W);$.vLinePoint=ge(we)}if(0===J.length){var ke=f.unhoverRaw(e,t);return!v||null===$.hLinePoint&&null===$.vLinePoint||L(me)&&S($,ye),ke}v&&L(me)&&S($,ye);J.sort(function(e,t){return e.distance-t.distance});var Me=e._hoverdata,Te=[];for(N=0;N<J.length;N++){var Ae=J[N];Te.push(g.makeEventData(Ae,Ae.trace,Ae.cd))}e._hoverdata=Te;var Se="y"===I&&Q.length>1,Le=d.combine(u.plot_bgcolor||d.background,u.paper_bgcolor),Ce={hovermode:I,rotateLabels:Se,bgColor:Le,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},ze=M(J,Ce,e);if(function(e,t,n){var r,a,i,o,s,l,c,u=0,d=e.map(function(e,r){var a=e[t];return[{i:r,dp:0,pos:e.pos,posref:e.posref,size:e.by*("x"===a._id.charAt(0)?x:1)/2,pmin:0,pmax:"x"===a._id.charAt(0)?n.width:n.height}]}).sort(function(e,t){return e[0].posref-t[0].posref});function f(e){var t=e[0],n=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,i=n.pos+n.dp+n.size-t.pmax,a>.01){for(s=e.length-1;s>=0;s--)e[s].dp+=a;r=!1}if(!(i<.01)){if(a<-.01){for(s=e.length-1;s>=0;s--)e[s].dp-=i;r=!1}if(r){var c=0;for(o=0;o<e.length;o++)(l=e[o]).pos+l.dp+l.size>t.pmax&&c++;for(o=e.length-1;o>=0&&!(c<=0);o--)(l=e[o]).pos>t.pmax-1&&(l.del=!0,c--);for(o=0;o<e.length&&!(c<=0);o++)if((l=e[o]).pos<t.pmin+1)for(l.del=!0,c--,i=2*l.size,s=e.length-1;s>=0;s--)e[s].dp-=i;for(o=e.length-1;o>=0&&!(c<=0);o--)(l=e[o]).pos+l.dp+l.size>t.pmax&&(l.del=!0,c--)}}}for(;!r&&u<=e.length;){for(u++,r=!0,o=0;o<d.length-1;){var h=d[o],p=d[o+1],g=h[h.length-1],y=p[0];if((a=g.pos+g.dp+g.size-y.pos-y.dp+y.size)>.01&&g.pmin===y.pmin&&g.pmax===y.pmax){for(s=p.length-1;s>=0;s--)p[s].dp+=a;for(h.push.apply(h,p),d.splice(o+1,1),c=0,s=h.length-1;s>=0;s--)c+=h[s].dp;for(i=c/h.length,s=h.length-1;s>=0;s--)h[s].dp-=i;r=!1}else o++}d.forEach(f)}for(o=d.length-1;o>=0;o--){var m=d[o];for(s=m.length-1;s>=0;s--){var v=m[s],b=e[v.i];b.offset=v.dp,b.del=v.del}}}(J,Se?"xa":"ya",u),T(ze,Se),t.target&&t.target.tagName){var Oe=p.getComponentMethod("annotations","hasClickToShow")(e,Te);c(r.select(t.target),Oe?"pointer":"")}if(!t.target||i||!function(e,t,n){if(!n||n.length!==e._hoverdata.length)return!0;for(var r=n.length-1;r>=0;r--){var a=n[r],i=e._hoverdata[r];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber))return!0}return!1}(e,0,Me))return;Me&&e.emit("plotly_unhover",{event:t,points:Me});e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:w,yaxes:k,xvals:j,yvals:E})}(e,t,n,i)})},n.loneHover=function(e,t){var n={color:e.color||d.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,trace:{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0},a=r.select(t.container),i=t.outerContainer?r.select(t.outerContainer):a,o={hovermode:"closest",rotateLabels:!1,bgColor:t.bgColor||d.background,container:a,outerContainer:i},s=M([n],o,t.gd);return T(s,o.rotateLabels),s.node()}},{"../../lib":152,"../../lib/events":145,"../../lib/override_cursor":163,"../../lib/svg_text_utils":173,"../../plots/cartesian/axes":194,"../../registry":241,"../color":32,"../dragelement":54,"../drawing":57,"./constants":69,"./helpers":71,d3:3,"fast-isnumeric":5,tinycolor2:293}],73:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t,n,a){n("hoverlabel.bgcolor",(a=a||{}).bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),r.coerceFont(n,"hoverlabel.font",a.font)}},{"../../lib":152}],74:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../lib"),i=e("../dragelement"),o=e("./helpers"),s=e("./layout_attributes");t.exports={moduleType:"component",name:"fx",constants:e("./constants"),schema:{layout:s},attributes:e("./attributes"),layoutAttributes:s,supplyLayoutGlobalDefaults:e("./layout_global_defaults"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,n){return a.castOption(e,t,"hoverlabel."+n)},castHoverinfo:function(e,t,n){return a.castOption(e,n,"hoverinfo",function(n){return a.coerceHoverinfo({hoverinfo:n},{_module:e._module},t)})},hover:e("./hover").hover,unhover:i.unhover,loneHover:e("./hover").loneHover,loneUnhover:function(e){var t=a.isD3Selection(e)?e:r.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e("./click")}},{"../../lib":152,"../dragelement":54,"./attributes":66,"./calc":67,"./click":68,"./constants":69,"./defaults":70,"./helpers":71,"./hover":72,"./layout_attributes":75,"./layout_defaults":76,"./layout_global_defaults":77,d3:3}],75:[function(e,t,n){"use strict";var r=e("./constants"),a=e("../../plots/font_attributes")({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});a.family.dflt=r.HOVERFONT,a.size.dflt=r.HOVERFONTSIZE,t.exports={dragmode:{valType:"enumerated",role:"info",values:["zoom","pan","select","lasso","orbit","turntable"],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",role:"info",values:["x","y","closest",!1],editType:"modebar",description:"Determines the mode of hover interactions."},hoverdistance:{valType:"integer",min:-1,dflt:20,role:"info",editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:20,role:"info",editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",role:"style",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",role:"style",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:a,namelength:{valType:"integer",min:-1,dflt:15,role:"style",editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",role:"info",values:["h","v","d","any"],dflt:"any",description:['When "dragmode" is set to "select", this limits the selection of the drag to','horizontal, vertical or diagonal. "h" only allows horizontal selection,','"v" only vertical, "d" only diagonal and "any" sets no limit.'].join(" "),editType:"none"}}},{"../../plots/font_attributes":220,"./constants":69}],76:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,n){function i(n,i){return r.coerce(e,t,a,n,i)}var o;"select"===i("dragmode")&&i("selectdirection"),t._has("cartesian")?(t._isHoriz=function(e){for(var t=!0,n=0;n<e.length;n++){var r=e[n];if("h"!==r.orientation){t=!1;break}}return t}(n),o=t._isHoriz?"y":"x"):o="closest",i("hovermode",o)&&(i("hoverdistance"),i("spikedistance"));var s=t._has("mapbox"),l=t._has("geo"),c=t._basePlotModules.length;"zoom"===t.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(t.dragmode="pan")}},{"../../lib":152,"./layout_attributes":75}],77:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("./hoverlabel_defaults"),i=e("./layout_attributes");t.exports=function(e,t){a(e,t,function(n,a){return r.coerce(e,t,i,n,a)})}},{"../../lib":152,"./hoverlabel_defaults":73,"./layout_attributes":75}],78:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../lib/regex").counter,i=e("../../plots/domain").attributes,o=e("../../plots/cartesian/constants").idRegex,s={rows:{valType:"integer",min:1,role:"info",editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",role:"info",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,role:"info",editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[a("xy").toString(),""],editType:"plot"},role:"info",editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},role:"info",editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},role:"info",editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",role:"info",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,role:"info",editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,role:"info",editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:i({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",role:"info",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",role:"info",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function l(e,t,n){var r=t[n+"axes"],a=Object.keys((e._splomAxes||{})[n]||{});return Array.isArray(r)?r:a.length?a:void 0}function c(e,t,n,r,a,i){var o=t(e+"gap",n),s=t("domain."+e);t(e+"side",r);for(var l=new Array(a),c=s[0],u=(s[1]-c)/(a-o),d=u*(1-o),f=0;f<a;f++){var h=c+u*f;l[i?a-1-f:f]=[h,h+d]}return l}function u(e,t,n,r,a){var i,o=new Array(n);function s(e,n){-1!==t.indexOf(n)&&void 0===r[n]?(o[e]=n,r[n]=e):o[e]=""}if(Array.isArray(e))for(i=0;i<n;i++)s(i,e[i]);else for(s(0,a),i=1;i<n;i++)s(i,a+(i+1));return o}t.exports={moduleType:"component",name:"grid",schema:{layout:{grid:s}},layoutAttributes:s,sizeDefaults:function(e,t){var n=e.grid||{},a=l(t,n,"x"),i=l(t,n,"y");if(e.grid||a||i){var o,u,d=Array.isArray(n.subplots)&&Array.isArray(n.subplots[0]),f=Array.isArray(a),h=Array.isArray(i),p=f&&a!==n.xaxes&&h&&i!==n.yaxes;d?(o=n.subplots.length,u=n.subplots[0].length):(h&&(o=i.length),f&&(u=a.length));var g=t.grid={},y=k("rows",o),m=k("columns",u);if(y*m>1){d||f||h||"independent"===k("pattern")&&(d=!0),g._hasSubplotGrid=d;var v,x,b="top to bottom"===k("roworder"),_=d?.2:.1,w=d?.3:.1;p&&(v="bottom",x="left"),g._domains={x:c("x",k,_,v,m),y:c("y",k,w,x,y,b)}}}function k(e,t){return r.coerce(n,g,s,e,t)}},contentDefaults:function(e,t){var n=t.grid;if(n&&n._domains){var r,a,i,o,s,c,d,f=e.grid||{},h=t._subplots,p=n._hasSubplotGrid,g=n.rows,y=n.columns,m="independent"===n.pattern,v=n._axisMap={};if(p){var x=f.subplots||[];c=n.subplots=new Array(g);var b=1;for(r=0;r<g;r++){var _=c[r]=new Array(y),w=x[r]||[];for(a=0;a<y;a++)if(m?(s=1===b?"xy":"x"+b+"y"+b,b++):s=w[a],_[a]="",-1!==h.cartesian.indexOf(s)){if(d=s.indexOf("y"),i=s.slice(0,d),o=s.slice(d),void 0!==v[i]&&v[i]!==a||void 0!==v[o]&&v[o]!==r)continue;_[a]=s,v[i]=a,v[o]=r}}}else{var k=l(t,f,"x"),M=l(t,f,"y");n.xaxes=u(k,h.xaxis,y,v,"x"),n.yaxes=u(M,h.yaxis,g,v,"y")}var T=n._anchors={},A="top to bottom"===n.roworder;for(var S in v){var L,C,z,O=S.charAt(0),D=n[O+"side"];if(D.length<8)T[S]="free";else if("x"===O){if("t"===D.charAt(0)===A?(L=0,C=1,z=g):(L=g-1,C=-1,z=-1),p){var P=v[S];for(r=L;r!==z;r+=C)if((s=c[r][P])&&(d=s.indexOf("y"),s.slice(0,d)===S)){T[S]=s.slice(d);break}}else for(r=L;r!==z;r+=C)if(o=n.yaxes[r],-1!==h.cartesian.indexOf(S+o)){T[S]=o;break}}else if("l"===D.charAt(0)?(L=0,C=1,z=y):(L=y-1,C=-1,z=-1),p){var I=v[S];for(r=L;r!==z;r+=C)if((s=c[I][r])&&(d=s.indexOf("y"),s.slice(d)===S)){T[S]=s.slice(0,d);break}}else for(r=L;r!==z;r+=C)if(i=n.xaxes[r],-1!==h.cartesian.indexOf(i+S)){T[S]=i;break}}}}}},{"../../lib":152,"../../lib/regex":167,"../../plots/cartesian/constants":199,"../../plots/domain":219}],79:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/constants");t.exports={_isLinkedToArray:"image",visible:{valType:"boolean",role:"info",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",role:"info",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",role:"info",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",role:"info",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width."].join(" ")},sizey:{valType:"number",role:"info",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",role:"info",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",role:"info",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",role:"info",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",role:"info",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",role:"info",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",role:"info",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],dflt:"paper",role:"info",editType:"arraydraw",description:["Sets the images's x coordinate axis.","If set to a x axis id (e.g. *x* or *x2*), the `x` position","refers to an x data coordinate","If set to *paper*, the `x` position refers to the distance from","the left of plot in normalized coordinates","where *0* (*1*) corresponds to the left (right)."].join(" ")},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper",role:"info",editType:"arraydraw",description:["Sets the images's y coordinate axis.","If set to a y axis id (e.g. *y* or *y2*), the `y` position","refers to a y data coordinate.","If set to *paper*, the `y` position refers to the distance from","the bottom of the plot in normalized coordinates","where *0* (*1*) corresponds to the bottom (top)."].join(" ")},editType:"arraydraw"}},{"../../plots/cartesian/constants":199}],80:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../lib/to_log_range");t.exports=function(e,t,n,i){t=t||{};var o="log"===n&&"linear"===t.type,s="linear"===n&&"log"===t.type;if(o||s)for(var l,c,u=e._fullLayout.images,d=t._id.charAt(0),f=0;f<u.length;f++)if(c="images["+f+"].",(l=u[f])[d+"ref"]===t._id){var h=l[d],p=l["size"+d],g=null,y=null;if(o){g=a(h,t.range);var m=p/Math.pow(10,g)/2;y=2*Math.log(m+Math.sqrt(1+m*m))/Math.LN10}else y=(g=Math.pow(10,h))*(Math.pow(10,p/2)-Math.pow(10,-p/2));r(g)?r(y)||(y=null):(g=null,y=null),i(c+d,g),i(c+"size"+d,y)}}},{"../../lib/to_log_range":175,"fast-isnumeric":5}],81:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../../plots/array_container_defaults"),o=e("./attributes");function s(e,t,n){function i(n,a){return r.coerce(e,t,o,n,a)}if(!i("visible",!!i("source")))return t;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var s={_fullLayout:n},l=["x","y"],c=0;c<2;c++){var u=l[c],d=a.coerceRef(e,t,s,u,"paper");a.coercePosition(t,s,i,d,u,0)}return t}t.exports=function(e,t){i(e,t,{name:"images",handleItemDefaults:s})}},{"../../lib":152,"../../plots/array_container_defaults":190,"../../plots/cartesian/axes":194,"./attributes":79}],82:[function(e,t,n){"use strict";var r=e("d3"),a=e("../drawing"),i=e("../../plots/cartesian/axes"),o=e("../../constants/xmlns_namespaces");t.exports=function(e){var t,n,s=e._fullLayout,l=[],c={},u=[];for(n=0;n<s.images.length;n++){var d=s.images[n];if(d.visible)if("below"===d.layer&&"paper"!==d.xref&&"paper"!==d.yref){t=d.xref+d.yref;var f=s._plots[t];if(!f){u.push(d);continue}f.mainplot&&(t=f.mainplot.id),c[t]||(c[t]=[]),c[t].push(d)}else"above"===d.layer?l.push(d):u.push(d)}var h={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}}};function p(t){var n=r.select(this);if(!this.img||this.img.src!==t.source){n.attr("xmlns",o.svg);var a=new Promise(function(e){var r=new Image;function a(){n.remove(),e()}this.img=r,r.setAttribute("crossOrigin","anonymous"),r.onerror=a,r.onload=function(){var t=document.createElement("canvas");t.width=this.width,t.height=this.height,t.getContext("2d").drawImage(this,0,0);var r=t.toDataURL("image/png");n.attr("xlink:href",r),e()},n.on("error",a),r.src=t.source}.bind(this));e._promises.push(a)}}function g(t){var n=r.select(this),o=i.getFromId(e,t.xref),l=i.getFromId(e,t.yref),c=s._size,u=o?Math.abs(o.l2p(t.sizex)-o.l2p(0)):t.sizex*c.w,d=l?Math.abs(l.l2p(t.sizey)-l.l2p(0)):t.sizey*c.h,f=u*h.x[t.xanchor].offset,p=d*h.y[t.yanchor].offset,g=h.x[t.xanchor].sizing+h.y[t.yanchor].sizing,y=(o?o.r2p(t.x)+o._offset:t.x*c.w+c.l)+f,m=(l?l.r2p(t.y)+l._offset:c.h-t.y*c.h+c.t)+p;switch(t.sizing){case"fill":g+=" slice";break;case"stretch":g="none"}n.attr({x:y,y:m,width:u,height:d,preserveAspectRatio:g,opacity:t.opacity});var v=(o?o._id:"")+(l?l._id:"");n.call(a.setClipUrl,v?"clip"+s._uid+v:null)}var y=s._imageLowerLayer.selectAll("image").data(u),m=s._imageUpperLayer.selectAll("image").data(l);y.enter().append("image"),m.enter().append("image"),y.exit().remove(),m.exit().remove(),y.each(function(e){p.bind(this)(e),g.bind(this)(e)}),m.each(function(e){p.bind(this)(e),g.bind(this)(e)});var v=Object.keys(s._plots);for(n=0;n<v.length;n++){t=v[n];var x=s._plots[t];if(x.imagelayer){var b=x.imagelayer.selectAll("image").data(c[t]||[]);b.enter().append("image"),b.exit().remove(),b.each(function(e){p.bind(this)(e),g.bind(this)(e)})}}}},{"../../constants/xmlns_namespaces":136,"../../plots/cartesian/axes":194,"../drawing":57,d3:3}],83:[function(e,t,n){"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("images"),draw:e("./draw"),convertCoords:e("./convert_coords")}},{"../../plots/cartesian/include_components":204,"./attributes":79,"./convert_coords":80,"./defaults":81,"./draw":82}],84:[function(e,t,n){"use strict";n.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},n.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},n.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3},n.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3}},{}],85:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),a=e("../color/attributes");t.exports={bgcolor:{valType:"color",role:"style",editType:"legend",description:"Sets the legend background color."},bordercolor:{valType:"color",dflt:a.defaultLine,role:"style",editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,role:"style",editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:r({editType:"legend",description:"Sets the font used to text the legend items."}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",role:"info",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],role:"style",editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,role:"style",editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:1.02,role:"style",editType:"legend",description:"Sets the x position (in normalized coordinates) of the legend."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",role:"info",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,role:"style",editType:"legend",description:"Sets the y position (in normalized coordinates) of the legend."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",role:"info",editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend."].join(" ")},editType:"legend"}},{"../../plots/font_attributes":220,"../color/attributes":31}],86:[function(e,t,n){"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4}},{}],87:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("../../lib"),i=e("./attributes"),o=e("../../plots/layout_attributes"),s=e("./helpers");t.exports=function(e,t,n){for(var l,c,u,d,f=e.legend||{},h={},p=0,g="normal",y=0;y<n.length;y++){var m=n[y];s.legendGetsTrace(m)&&(p++,r.traceIs(m,"pie")&&p++),(r.traceIs(m,"bar")&&"stack"===t.barmode||-1!==["tonextx","tonexty"].indexOf(m.fill))&&(g=s.isGrouped({traceorder:g})?"grouped+reversed":"reversed"),void 0!==m.legendgroup&&""!==m.legendgroup&&(g=s.isReversed({traceorder:g})?"reversed+grouped":"grouped")}function v(e,t){return a.coerce(f,h,i,e,t)}if(!1!==a.coerce(e,t,o,"showlegend",p>1)){if(t.legend=h,v("bgcolor",t.paper_bgcolor),v("bordercolor"),v("borderwidth"),a.coerceFont(v,"font",t.font),v("orientation"),"h"===h.orientation){var x=e.xaxis;x&&x.rangeslider&&x.rangeslider.visible?(l=0,u="left",c=1.1,d="bottom"):(l=0,u="left",c=-.1,d="top")}v("traceorder",g),s.isGrouped(t.legend)&&v("tracegroupgap"),v("x",l),v("xanchor",u),v("y",c),v("yanchor",d),a.noneOrAll(f,h,["x","y"])}}},{"../../lib":152,"../../plots/layout_attributes":224,"../../registry":241,"./attributes":85,"./helpers":91}],88:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../lib"),i=e("../../plots/plots"),o=e("../../registry"),s=e("../../lib/events"),l=e("../dragelement"),c=e("../drawing"),u=e("../color"),d=e("../../lib/svg_text_utils"),f=e("./handle_click"),h=e("./constants"),p=e("../../constants/interactions"),g=e("../../constants/alignment"),y=g.LINE_SPACING,m=g.FROM_TL,v=g.FROM_BR,x=e("./get_legend_data"),b=e("./style"),_=e("./helpers"),w=e("./anchor_utils"),k=p.DBLCLICKDELAY;function M(e,t,n,r,a){var i=n.data()[0][0].trace,o={event:a,node:n.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};if(i._group&&(o.group=i._group),"pie"===i.type&&(o.label=n.datum()[0].label),!1!==s.triggerHandler(e,"plotly_legendclick",o))if(1===r)t._clickTimeout=setTimeout(function(){f(n,e,r)},k);else if(2===r){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==s.triggerHandler(e,"plotly_legenddoubleclick",o)&&f(n,e,r)}}function T(e,t,n){var r=e.data()[0][0],i=t._fullLayout,s=r.trace,l=o.traceIs(s,"pie"),u=s.index,f=l?r.label:s.name,h=t._context.edits.legendText&&!l,p=a.ensureSingle(e,"text","legendtext");function g(n){d.convertToTspans(n,t,function(){!function(e,t){var n=e.data()[0][0];if(!n.trace.showlegend)return void e.remove();var r,a,i=e.select("g[class*=math-group]"),o=i.node(),s=t._fullLayout.legend.font.size*y;if(o){var l=c.bBox(o);r=l.height,a=l.width,c.setTranslate(i,0,r/4)}else{var u=e.select(".legendtext"),f=d.lineCount(u),h=u.node();r=s*f,a=h?c.bBox(h).width:0;var p=s*(.3+(1-f)/2);d.positionText(u,40,p)}r=Math.max(r,16)+3,n.height=r,n.width=a}(e,t)})}p.attr("text-anchor","start").classed("user-select-none",!0).call(c.font,i.legend.font).text(h?A(f,n):f),h?p.call(d.makeEditable,{gd:t,text:f}).call(g).on("edit",function(e){this.text(A(e,n)).call(g);var i=r.trace._fullInput||{},s={};if(o.hasTransform(i,"groupby")){var l=o.getTransformIndices(i,"groupby"),c=l[l.length-1],d=a.keyedContainer(i,"transforms["+c+"].styles","target","value.name");d.set(r.trace._group,e),s=d.constructUpdate()}else s.name=e;return o.call("restyle",t,s,u)}):g(p)}function A(e,t){var n=Math.max(4,t);if(e&&e.trim().length>=n/2)return e;for(var r=n-(e=e||"").length;r>0;r--)e+=" ";return e}function S(e,t){var n,i=1,o=a.ensureSingle(e,"rect","legendtoggle",function(e){e.style("cursor","pointer").attr("pointer-events","all").call(u.fill,"rgba(0,0,0,0)")});o.on("mousedown",function(){(n=(new Date).getTime())-t._legendMouseDownTime<k?i+=1:(i=1,t._legendMouseDownTime=n)}),o.on("mouseup",function(){if(!t._dragged&&!t._editing){var n=t._fullLayout.legend;(new Date).getTime()-t._legendMouseDownTime>k&&(i=Math.max(i-1,1)),M(t,n,e,i,r.event)}})}function L(e,t,n){var a=e._fullLayout,i=a.legend,o=i.borderwidth,s=_.isGrouped(i),l=0;if(i._width=0,i._height=0,_.isVertical(i))s&&t.each(function(e,t){c.setTranslate(this,0,t*i.tracegroupgap)}),n.each(function(e){var t=e[0],n=t.height,r=t.width;c.setTranslate(this,o,5+o+i._height+n/2),i._height+=n,i._width=Math.max(i._width,r)}),i._width+=45+2*o,i._height+=10+2*o,s&&(i._height+=(i._lgroupsLength-1)*i.tracegroupgap),l=40;else if(s){for(var u=[i._width],d=t.data(),f=0,h=d.length;f<h;f++){var p=d[f].map(function(e){return e[0].width}),g=40+Math.max.apply(null,p);i._width+=i.tracegroupgap+g,u.push(i._width)}t.each(function(e,t){c.setTranslate(this,u[t],0)}),t.each(function(){var e=0;r.select(this).selectAll("g.traces").each(function(t){var n=t[0].height;c.setTranslate(this,0,5+o+e+n/2),e+=n}),i._height=Math.max(i._height,e)}),i._height+=10+2*o,i._width+=2*o}else{var y,m=0,v=0,x=0,b=0,w=0,k=i.tracegroupgap||5;n.each(function(e){x=Math.max(40+e[0].width,x),w+=40+e[0].width+k}),y=a.width-(a.margin.r+a.margin.l)>o+w-k,n.each(function(e){var t=e[0],n=y?40+e[0].width:x;o+b+k+n>a.width-(a.margin.r+a.margin.l)&&(b=0,m+=v,i._height=i._height+v,v=0),c.setTranslate(this,o+b,5+o+t.height/2+m),i._width+=k+n,i._height=Math.max(i._height,t.height),b+=k+n,v=Math.max(t.height,v)}),i._width+=2*o,i._height+=10+2*o}i._width=Math.ceil(i._width),i._height=Math.ceil(i._height),n.each(function(t){var n=t[0],a=r.select(this).select(".legendtoggle");c.setRect(a,0,-n.height/2,(e._context.edits.legendText?0:i._width)+l,n.height)})}function C(e){var t=e._fullLayout.legend,n="left";w.isRightAnchor(t)?n="right":w.isCenterAnchor(t)&&(n="center");var r="top";w.isBottomAnchor(t)?r="bottom":w.isMiddleAnchor(t)&&(r="middle"),i.autoMargin(e,"legend",{x:t.x,y:t.y,l:t._width*m[n],r:t._width*v[n],b:t._height*v[r],t:t._height*m[r]})}t.exports=function(e){var t=e._fullLayout,n="legend"+t._uid;if(t._infolayer&&e.calcdata){e._legendMouseDownTime||(e._legendMouseDownTime=0);var s=t.legend,d=t.showlegend&&x(e.calcdata,s),f=t.hiddenlabels||[];if(!t.showlegend||!d.length)return t._infolayer.selectAll(".legend").remove(),t._topdefs.select("#"+n).remove(),void i.autoMargin(e,"legend");for(var p=0,g=0;g<d.length;g++)for(var y=0;y<d[g].length;y++){var _=d[g][y][0],k=_.trace,A=o.traceIs(k,"pie")?_.label:k.name;p=Math.max(p,A&&A.length||0)}var z=!1,O=a.ensureSingle(t._infolayer,"g","legend",function(e){e.attr("pointer-events","all"),z=!0}),D=a.ensureSingleById(t._topdefs,"clipPath",n,function(e){e.append("rect")}),P=a.ensureSingle(O,"rect","bg",function(e){e.attr("shape-rendering","crispEdges")});P.call(u.stroke,s.bordercolor).call(u.fill,s.bgcolor).style("stroke-width",s.borderwidth+"px");var I=a.ensureSingle(O,"g","scrollbox"),j=a.ensureSingle(O,"rect","scrollbar",function(e){e.attr({rx:20,ry:3,width:0,height:0}).call(u.fill,"#808BA4")}),E=I.selectAll("g.groups").data(d);E.enter().append("g").attr("class","groups"),E.exit().remove();var N=E.selectAll("g.traces").data(a.identity);N.enter().append("g").attr("class","traces"),N.exit().remove(),N.call(b,e).style("opacity",function(e){var t=e[0].trace;return o.traceIs(t,"pie")?-1!==f.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1}).each(function(){r.select(this).call(T,e,p).call(S,e)}),z&&(L(e,E,N),C(e));var R=t.width,F=t.height;L(e,E,N),s._height>F?function(e){var t=e._fullLayout.legend,n="left";w.isRightAnchor(t)?n="right":w.isCenterAnchor(t)&&(n="center");i.autoMargin(e,"legend",{x:t.x,y:.5,l:t._width*m[n],r:t._width*v[n],b:0,t:0})}(e):C(e);var B=t._size,H=B.l+B.w*s.x,q=B.t+B.h*(1-s.y);w.isRightAnchor(s)?H-=s._width:w.isCenterAnchor(s)&&(H-=s._width/2),w.isBottomAnchor(s)?q-=s._height:w.isMiddleAnchor(s)&&(q-=s._height/2);var V=s._width,U=B.w;V>U?(H=B.l,V=U):(H+V>R&&(H=R-V),H<0&&(H=0),V=Math.min(R-H,s._width));var G,Y,Z,X,W=s._height,J=B.h;if(W>J?(q=B.t,W=J):(q+W>F&&(q=F-W),q<0&&(q=0),W=Math.min(F-q,s._height)),c.setTranslate(O,H,q),j.on(".drag",null),O.on("wheel",null),s._height<=W||e._context.staticPlot)P.attr({width:V-s.borderwidth,height:W-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),c.setTranslate(I,0,0),D.select("rect").attr({width:V-2*s.borderwidth,height:W-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth}),c.setClipUrl(I,n),c.setRect(j,0,0,0,0),delete s._scrollY;else{var Q,$,K=Math.max(h.scrollBarMinHeight,W*W/s._height),ee=W-K-2*h.scrollBarMargin,te=s._height-W,ne=ee/te,re=Math.min(s._scrollY||0,te);P.attr({width:V-2*s.borderwidth+h.scrollBarWidth+h.scrollBarMargin,height:W-s.borderwidth,x:s.borderwidth/2,y:s.borderwidth/2}),D.select("rect").attr({width:V-2*s.borderwidth+h.scrollBarWidth+h.scrollBarMargin,height:W-2*s.borderwidth,x:s.borderwidth,y:s.borderwidth+re}),c.setClipUrl(I,n),ie(re,K,ne),O.on("wheel",function(){ie(re=a.constrain(s._scrollY+r.event.deltaY/ee*te,0,te),K,ne),0!==re&&re!==te&&r.event.preventDefault()});var ae=r.behavior.drag().on("dragstart",function(){Q=r.event.sourceEvent.clientY,$=re}).on("drag",function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||ie(re=a.constrain((e.clientY-Q)/ne+$,0,te),K,ne)});j.call(ae)}if(e._context.edits.legendPosition)O.classed("cursor-move",!0),l.init({element:O.node(),gd:e,prepFn:function(){var e=c.getTranslate(O);Z=e.x,X=e.y},moveFn:function(e,t){var n=Z+e,r=X+t;c.setTranslate(O,n,r),G=l.align(n,0,B.l,B.l+B.w,s.xanchor),Y=l.align(r,0,B.t+B.h,B.t,s.yanchor)},doneFn:function(){void 0!==G&&void 0!==Y&&o.call("relayout",e,{"legend.x":G,"legend.y":Y})},clickFn:function(n,r){var a=t._infolayer.selectAll("g.traces").filter(function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom});a.size()>0&&M(e,O,a,n,r)}})}function ie(t,n,r){s._scrollY=e._fullLayout.legend._scrollY=t,c.setTranslate(I,0,-t),c.setRect(j,V,h.scrollBarMargin+t*r,h.scrollBarWidth,n),D.select("rect").attr({y:s.borderwidth+t})}}},{"../../constants/alignment":132,"../../constants/interactions":133,"../../lib":152,"../../lib/events":145,"../../lib/svg_text_utils":173,"../../plots/plots":226,"../../registry":241,"../color":32,"../dragelement":54,"../drawing":57,"./anchor_utils":84,"./constants":86,"./get_legend_data":89,"./handle_click":90,"./helpers":91,"./style":93,d3:3}],89:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("./helpers");t.exports=function(e,t){var n,i,o={},s=[],l=!1,c={},u=0;function d(e,n){if(""!==e&&a.isGrouped(t))-1===s.indexOf(e)?(s.push(e),l=!0,o[e]=[[n]]):o[e].push([n]);else{var r="~~i"+u;s.push(r),o[r]=[[n]],u++}}for(n=0;n<e.length;n++){var f=e[n],h=f[0],p=h.trace,g=p.legendgroup;if(a.legendGetsTrace(p)&&p.showlegend)if(r.traceIs(p,"pie"))for(c[g]||(c[g]={}),i=0;i<f.length;i++){var y=f[i].label;c[g][y]||(d(g,{label:y,color:f[i].color,i:f[i].i,trace:p}),c[g][y]=!0)}else d(g,h)}if(!s.length)return[];var m,v,x=s.length;if(l&&a.isGrouped(t))for(v=new Array(x),n=0;n<x;n++)m=o[s[n]],v[n]=a.isReversed(t)?m.reverse():m;else{for(v=[new Array(x)],n=0;n<x;n++)m=o[s[n]][0],v[0][a.isReversed(t)?x-n-1:n]=m;x=1}return t._lgroupsLength=x,v}},{"../../registry":241,"./helpers":91}],90:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../registry"),i=!0;t.exports=function(e,t,n){if(!t._dragged&&!t._editing){var o,s,l,c,u,d=t._fullLayout.hiddenlabels?t._fullLayout.hiddenlabels.slice():[],f=e.data()[0][0],h=t._fullData,p=f.trace,g=p.legendgroup,y={},m=[],v=[],x=[];if(1===n&&i&&t.data&&t._context.showTips?(r.notifier(r._(t,"Double-click on legend to isolate one trace"),"long"),i=!1):i=!1,a.traceIs(p,"pie")){var b=f.label,_=d.indexOf(b);1===n?-1===_?d.push(b):d.splice(_,1):2===n&&(d=[],t.calcdata[0].forEach(function(e){b!==e.label&&d.push(e.label)}),t._fullLayout.hiddenlabels&&t._fullLayout.hiddenlabels.length===d.length&&-1===_&&(d=[])),a.call("relayout",t,"hiddenlabels",d)}else{var w,k=g&&g.length,M=[];if(k)for(o=0;o<h.length;o++)(w=h[o]).visible&&w.legendgroup===g&&M.push(o);if(1===n){var T;switch(p.visible){case!0:T="legendonly";break;case!1:T=!1;break;case"legendonly":T=!0}if(k)for(o=0;o<h.length;o++)!1!==h[o].visible&&h[o].legendgroup===g&&D(h[o],T);else D(p,T)}else if(2===n){var A,S,L=!0;for(o=0;o<h.length;o++)if(!(h[o]===p)&&!(A=k&&h[o].legendgroup===g)&&!0===h[o].visible&&!a.traceIs(h[o],"notLegendIsolatable")){L=!1;break}for(o=0;o<h.length;o++)if(!1!==h[o].visible&&!a.traceIs(h[o],"notLegendIsolatable"))switch(p.visible){case"legendonly":D(h[o],!0);break;case!0:S=!!L||"legendonly",A=h[o]===p||k&&h[o].legendgroup===g,D(h[o],!!A||S)}}for(o=0;o<v.length;o++)if(l=v[o]){var C=l.constructUpdate(),z=Object.keys(C);for(s=0;s<z.length;s++)c=z[s],(y[c]=y[c]||[])[x[o]]=C[c]}for(u=Object.keys(y),o=0;o<u.length;o++)for(c=u[o],s=0;s<m.length;s++)y[c].hasOwnProperty(s)||(y[c][s]=void 0);a.call("restyle",t,y,m)}}function O(e,t,n){var r=m.indexOf(e),a=y[t];return a||(a=y[t]=[]),-1===m.indexOf(e)&&(m.push(e),r=m.length-1),a[r]=n,r}function D(e,t){var n=e._fullInput;if(a.hasTransform(n,"groupby")){var i=v[n.index];if(!i){var o=a.getTransformIndices(n,"groupby"),s=o[o.length-1];i=r.keyedContainer(n,"transforms["+s+"].styles","target","value.visible"),v[n.index]=i}var l=i.get(e._group);void 0===l&&(l=!0),!1!==l&&i.set(e._group,t),x[n.index]=O(n.index,"visible",!1!==n.visible)}else{var c=!1!==n.visible&&t;O(n.index,"visible",c)}}}},{"../../lib":152,"../../registry":241}],91:[function(e,t,n){"use strict";n.legendGetsTrace=function(e){return e.visible&&void 0!==e.showlegend},n.isGrouped=function(e){return-1!==(e.traceorder||"").indexOf("grouped")},n.isVertical=function(e){return"h"!==e.orientation},n.isReversed=function(e){return-1!==(e.traceorder||"").indexOf("reversed")}},{}],92:[function(e,t,n){"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),draw:e("./draw"),style:e("./style")}},{"./attributes":85,"./defaults":87,"./draw":88,"./style":93}],93:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../registry"),i=e("../../lib"),o=e("../drawing"),s=e("../color"),l=e("../../traces/scatter/subtypes"),c=e("../../traces/pie/style_one");t.exports=function(e,t){e.each(function(e){var t=r.select(this),n=i.ensureSingle(t,"g","layers");n.style("opacity",e[0].trace.opacity),n.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),n.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var a=n.selectAll("g.legendsymbols").data([e]);a.enter().append("g").classed("legendsymbols",!0),a.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)}).each(function(e){var t=e[0].trace,n=t.marker||{},i=n.line||{},o=r.select(this).select("g.legendpoints").selectAll("path.legendbar").data(a.traceIs(t,"bar")?[e]:[]);o.enter().append("path").classed("legendbar",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),o.exit().remove(),o.each(function(e){var t=r.select(this),a=e[0],o=(a.mlw+1||i.width+1)-1;t.style("stroke-width",o+"px").call(s.fill,a.mc||n.color),o&&t.call(s.stroke,a.mlc||i.color)})}).each(function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.traceIs(t,"box-violin")&&t.visible?[e]:[]);n.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),n.exit().remove(),n.each(function(){var e=t.line.width,n=r.select(this);n.style("stroke-width",e+"px").call(s.fill,t.fillcolor),e&&s.stroke(n,t.line.color)})}).each(function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendpie").data(a.traceIs(t,"pie")&&t.visible?[e]:[]);n.enter().append("path").classed("legendpie",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),n.exit().remove(),n.size()&&n.call(c,e[0],t)}).each(function(e){var t=e[0].trace,n=t.visible&&t.fill&&"none"!==t.fill,a=l.hasLines(t),i=t.contours;i&&"constraint"===i.type&&(a=i.showlines,n="="!==i._operation);var s=r.select(this).select(".legendfill").selectAll("path").data(n?[e]:[]);s.enter().append("path").classed("js-fill",!0),s.exit().remove(),s.attr("d","M5,0h30v6h-30z").call(o.fillGroupStyle);var c=r.select(this).select(".legendlines").selectAll("path").data(a?[e]:[]);c.enter().append("path").classed("js-line",!0).attr("d","M5,0h30"),c.exit().remove(),c.call(o.lineGroupStyle)}).each(function(e){var n,a,s=e[0],c=s.trace,u=l.hasMarkers(c),d=l.hasText(c),f=l.hasLines(c);function h(e,t,n){var r=i.nestedProperty(c,e).get(),a=Array.isArray(r)&&t?t(r):r;if(n){if(a<n[0])return n[0];if(a>n[1])return n[1]}return a}function p(e){return e[0]}if(u||d||f){var g={},y={};u&&(g.mc=h("marker.color",p),g.mo=h("marker.opacity",i.mean,[.2,1]),g.ms=h("marker.size",i.mean,[2,16]),g.mlc=h("marker.line.color",p),g.mlw=h("marker.line.width",i.mean,[0,5]),y.marker={sizeref:1,sizemin:1,sizemode:"diameter"}),f&&(y.line={width:h("line.width",p,[0,10])}),d&&(g.tx="Aa",g.tp=h("textposition",p),g.ts=10,g.tc=h("textfont.color",p),g.tf=h("textfont.family",p)),n=[i.minExtend(s,g)],(a=i.minExtend(c,y)).selectedpoints=null}var m=r.select(this).select("g.legendpoints"),v=m.selectAll("path.scatterpts").data(u?n:[]);v.enter().append("path").classed("scatterpts",!0).attr("transform","translate(20,0)"),v.exit().remove(),v.call(o.pointStyle,a,t),u&&(n[0].mrc=3);var x=m.selectAll("g.pointtext").data(d?n:[]);x.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),x.exit().remove(),x.selectAll("text").call(o.textPointStyle,a,t)}).each(function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data("candlestick"===t.type&&t.visible?[e,e]:[]);n.enter().append("path").classed("legendcandle",!0).attr("d",function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform","translate(20,0)").style("stroke-miterlimit",1),n.exit().remove(),n.each(function(e,n){var a=t[n?"increasing":"decreasing"],i=a.line.width,o=r.select(this);o.style("stroke-width",i+"px").call(s.fill,a.fillcolor),i&&s.stroke(o,a.line.color)})}).each(function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data("ohlc"===t.type&&t.visible?[e,e]:[]);n.enter().append("path").classed("legendohlc",!0).attr("d",function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform","translate(20,0)").style("stroke-miterlimit",1),n.exit().remove(),n.each(function(e,n){var a=t[n?"increasing":"decreasing"],i=a.line.width,l=r.select(this);l.style("fill","none").call(o.dashLine,a.line.dash,i),i&&s.stroke(l,a.line.color)})})}},{"../../lib":152,"../../registry":241,"../../traces/pie/style_one":251,"../../traces/scatter/subtypes":275,"../color":32,"../drawing":57,d3:3}],94:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("../../plots/plots"),i=e("../../plots/cartesian/axis_ids"),o=e("../../lib"),s=e("../../../build/ploticon"),l=o._,c=t.exports={};function u(e,t){var n,a,o=t.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},d=i.list(e,null,!0),f="on";if("zoom"===s){var h,p="in"===l?.5:2,g=(1+p)/2,y=(1-p)/2;for(a=0;a<d.length;a++)if(!(n=d[a]).fixedrange)if(h=n._name,"auto"===l)u[h+".autorange"]=!0;else if("reset"===l){if(void 0===n._rangeInitial)u[h+".autorange"]=!0;else{var m=n._rangeInitial.slice();u[h+".range[0]"]=m[0],u[h+".range[1]"]=m[1]}void 0!==n._showSpikeInitial&&(u[h+".showspikes"]=n._showSpikeInitial,"on"!==f||n._showSpikeInitial||(f="off"))}else{var v=[n.r2l(n.range[0]),n.r2l(n.range[1])],x=[g*v[0]+y*v[1],g*v[1]+y*v[0]];u[h+".range[0]"]=n.l2r(x[0]),u[h+".range[1]"]=n.l2r(x[1])}c._cartesianSpikesEnabled=f}else{if("hovermode"!==s||"x"!==l&&"y"!==l){if("hovermode"===s&&"closest"===l){for(a=0;a<d.length;a++)n=d[a],"on"!==f||n.showspikes||(f="off");c._cartesianSpikesEnabled=f}}else l=c._isHoriz?"y":"x",o.setAttribute("data-val",l);u[s]=l}r.call("relayout",e,u)}function d(e,t){for(var n=t.currentTarget,a=n.getAttribute("data-attr"),i=n.getAttribute("data-val")||!0,o=e._fullLayout._subplots.gl3d,s={},l=a.split("."),c=0;c<o.length;c++)s[o[c]+"."+l[1]]=i;var u="pan"===i?i:"zoom";s.dragmode=u,r.call("relayout",e,s)}function f(e,t){for(var n=t.currentTarget.getAttribute("data-attr"),a=e._fullLayout,i=a._subplots.gl3d,s={},l=0;l<i.length;l++){var c=i[l],u=c+".camera",d=a[c]._scene;"resetDefault"===n?s[u]=null:"resetLastSave"===n&&(s[u]=o.extendDeep({},d.cameraInitial))}r.call("relayout",e,s)}function h(e,t){var n=t.currentTarget,a=n._previousVal||!1,i=e.layout,s=e._fullLayout,l=s._subplots.gl3d,c=["xaxis","yaxis","zaxis"],u=["showspikes","spikesides","spikethickness","spikecolor"],d={},f={},h={};if(a)h=o.extendDeep(i,a),n._previousVal=null;else{h={"allaxes.showspikes":!1};for(var p=0;p<l.length;p++){var g=l[p],y=s[g],m=d[g]={};m.hovermode=y.hovermode,h[g+".hovermode"]=!1;for(var v=0;v<3;v++){var x=c[v];f=m[x]={};for(var b=0;b<u.length;b++){var _=u[b];f[_]=y[x][_]}}}n._previousVal=o.extendDeep({},d)}r.call("relayout",e,h)}function p(e,t){for(var n=t.currentTarget,a=n.getAttribute("data-attr"),i=n.getAttribute("data-val")||!0,o=e._fullLayout,s=o._subplots.geo,l=0;l<s.length;l++){var c=s[l],u=o[c];if("zoom"===a){var d=u.projection.scale,f="in"===i?2*d:.5*d;r.call("relayout",e,c+".projection.scale",f)}else"reset"===a&&y(e,"geo")}}function g(e){var t,n=e._fullLayout;t=n._has("cartesian")?n._isHoriz?"y":"x":"closest";var a=!e._fullLayout.hovermode&&t;r.call("relayout",e,"hovermode",a)}function y(e,t){for(var n=e._fullLayout,a=n._subplots[t],i={},o=0;o<a.length;o++)for(var s=a[o],l=n[s]._subplot.viewInitial,c=Object.keys(l),u=0;u<c.length;u++){var d=c[u];i[s+"."+d]=l[d]}r.call("relayout",e,i)}c.toImage={name:"toImage",title:function(e){return l(e,"Download plot as a png")},icon:s.camera,click:function(e){var t="png";o.notifier(l(e,"Taking snapshot - this may take a few seconds"),"long"),o.isIE()&&(o.notifier(l(e,"IE only supports svg. Changing format to svg."),"long"),t="svg"),r.call("downloadImage",e,{format:t}).then(function(t){o.notifier(l(e,"Snapshot succeeded")+" - "+t,"long")}).catch(function(){o.notifier(l(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}},c.sendDataToCloud={name:"sendDataToCloud",title:function(e){return l(e,"Edit in Chart Studio")},icon:s.disk,click:function(e){a.sendDataToCloud(e)}},c.zoom2d={name:"zoom2d",title:function(e){return l(e,"Zoom")},attr:"dragmode",val:"zoom",icon:s.zoombox,click:u},c.pan2d={name:"pan2d",title:function(e){return l(e,"Pan")},attr:"dragmode",val:"pan",icon:s.pan,click:u},c.select2d={name:"select2d",title:function(e){return l(e,"Box Select")},attr:"dragmode",val:"select",icon:s.selectbox,click:u},c.lasso2d={name:"lasso2d",title:function(e){return l(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:s.lasso,click:u},c.zoomIn2d={name:"zoomIn2d",title:function(e){return l(e,"Zoom in")},attr:"zoom",val:"in",icon:s.zoom_plus,click:u},c.zoomOut2d={name:"zoomOut2d",title:function(e){return l(e,"Zoom out")},attr:"zoom",val:"out",icon:s.zoom_minus,click:u},c.autoScale2d={name:"autoScale2d",title:function(e){return l(e,"Autoscale")},attr:"zoom",val:"auto",icon:s.autoscale,click:u},c.resetScale2d={name:"resetScale2d",title:function(e){return l(e,"Reset axes")},attr:"zoom",val:"reset",icon:s.home,click:u},c.hoverClosestCartesian={name:"hoverClosestCartesian",title:function(e){return l(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:s.tooltip_basic,gravity:"ne",click:u},c.hoverCompareCartesian={name:"hoverCompareCartesian",title:function(e){return l(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:s.tooltip_compare,gravity:"ne",click:u},c.zoom3d={name:"zoom3d",title:function(e){return l(e,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:s.zoombox,click:d},c.pan3d={name:"pan3d",title:function(e){return l(e,"Pan")},attr:"scene.dragmode",val:"pan",icon:s.pan,click:d},c.orbitRotation={name:"orbitRotation",title:function(e){return l(e,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:s["3d_rotate"],click:d},c.tableRotation={name:"tableRotation",title:function(e){return l(e,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:s["z-axis"],click:d},c.resetCameraDefault3d={name:"resetCameraDefault3d",title:function(e){return l(e,"Reset camera to default")},attr:"resetDefault",icon:s.home,click:f},c.resetCameraLastSave3d={name:"resetCameraLastSave3d",title:function(e){return l(e,"Reset camera to last save")},attr:"resetLastSave",icon:s.movie,click:f},c.hoverClosest3d={name:"hoverClosest3d",title:function(e){return l(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:s.tooltip_basic,gravity:"ne",click:h},c.zoomInGeo={name:"zoomInGeo",title:function(e){return l(e,"Zoom in")},attr:"zoom",val:"in",icon:s.zoom_plus,click:p},c.zoomOutGeo={name:"zoomOutGeo",title:function(e){return l(e,"Zoom out")},attr:"zoom",val:"out",icon:s.zoom_minus,click:p},c.resetGeo={name:"resetGeo",title:function(e){return l(e,"Reset")},attr:"reset",val:null,icon:s.autoscale,click:p},c.hoverClosestGeo={name:"hoverClosestGeo",title:function(e){return l(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:s.tooltip_basic,gravity:"ne",click:g},c.hoverClosestGl2d={name:"hoverClosestGl2d",title:function(e){return l(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:s.tooltip_basic,gravity:"ne",click:g},c.hoverClosestPie={name:"hoverClosestPie",title:function(e){return l(e,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:s.tooltip_basic,gravity:"ne",click:g},c.toggleHover={name:"toggleHover",title:function(e){return l(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:s.tooltip_basic,gravity:"ne",click:function(e,t){g(e),h(e,t)}},c.resetViews={name:"resetViews",title:function(e){return l(e,"Reset views")},icon:s.home,click:function(e,t){var n=t.currentTarget;n.setAttribute("data-attr","zoom"),n.setAttribute("data-val","reset"),u(e,t),n.setAttribute("data-attr","resetLastSave"),f(e,t),y(e,"geo"),y(e,"mapbox")}},c.toggleSpikelines={name:"toggleSpikelines",title:function(e){return l(e,"Toggle Spike Lines")},icon:s.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(e){var t=e._fullLayout;t._cartesianSpikesEnabled="on"===t._cartesianSpikesEnabled?"off":"on";var n=function(e){for(var t,n,r=e._fullLayout,a=i.list(e,null,!0),o={},s=0;s<a.length;s++)t=a[s],n=t._name,o[n+".showspikes"]="on"===r._cartesianSpikesEnabled||t._showSpikeInitial;return o}(e);r.call("relayout",e,n)}},c.resetViewMapbox={name:"resetViewMapbox",title:function(e){return l(e,"Reset view")},attr:"reset",icon:s.home,click:function(e){y(e,"mapbox")}}},{"../../../build/ploticon":12,"../../lib":152,"../../plots/cartesian/axis_ids":197,"../../plots/plots":226,"../../registry":241}],95:[function(e,t,n){"use strict";n.manage=e("./manage")},{"./manage":96}],96:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axis_ids"),a=e("../../traces/scatter/subtypes"),i=e("../../registry"),o=e("./modebar"),s=e("./buttons");t.exports=function(e){var t=e._fullLayout,n=e._context,l=t._modeBar;if(n.displayModeBar){if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var c,u=n.modeBarButtons;c=Array.isArray(u)&&u.length?function(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=0;r<n.length;r++){var a=n[r];if("string"==typeof a){if(void 0===s[a])throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));e[t][r]=s[a]}}return e}(u):function(e,t,n){var o=e._fullLayout,l=e._fullData,c=o._has("cartesian"),u=o._has("gl3d"),d=o._has("geo"),f=o._has("pie"),h=o._has("gl2d"),p=o._has("ternary"),g=o._has("mapbox"),y=o._has("polar"),m=function(e){for(var t=r.list({_fullLayout:e},null,!0),n=0;n<t.length;n++)if(!t[n].fixedrange)return!1;return!0}(o),v=[];function x(e){if(e.length){for(var n=[],r=0;r<e.length;r++){var a=e[r];-1===t.indexOf(a)&&n.push(s[a])}v.push(n)}}x(["toImage","sendDataToCloud"]);var b=[],_=[],w=[],k=[];(c||h||f||p)+d+u+g+y>1?(_=["toggleHover"],w=["resetViews"]):d?(b=["zoomInGeo","zoomOutGeo"],_=["hoverClosestGeo"],w=["resetGeo"]):u?(_=["hoverClosest3d"],w=["resetCameraDefault3d","resetCameraLastSave3d"]):g?(_=["toggleHover"],w=["resetViewMapbox"]):_=h?["hoverClosestGl2d"]:f?["hoverClosestPie"]:["toggleHover"];c&&(_=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]);!c&&!h||m||(b=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==w[0]&&(w=["resetScale2d"]));u?k=["zoom3d","pan3d","orbitRotation","tableRotation"]:(c||h)&&!m||p?k=["zoom2d","pan2d"]:g||d?k=["pan2d"]:y&&(k=["zoom2d"]);(function(e){for(var t=!1,n=0;n<e.length&&!t;n++){var r=e[n];r._module&&r._module.selectPoints&&(i.traceIs(r,"scatter-like")?(a.hasMarkers(r)||a.hasText(r))&&(t=!0):i.traceIs(r,"box-violin")&&"all"!==r.boxpoints&&"all"!==r.points||(t=!0))}return t})(l)&&k.push("select2d","lasso2d");return x(k),x(b.concat(w)),x(_),function(e,t){if(t.length)if(Array.isArray(t[0]))for(var n=0;n<t.length;n++)e.push(t[n]);else e.push(t);return e}(v,n)}(e,n.modeBarButtonsToRemove,n.modeBarButtonsToAdd),l?l.update(e,c):t._modeBar=o(e,c)}else l&&(l.destroy(),delete t._modeBar)}},{"../../plots/cartesian/axis_ids":197,"../../registry":241,"../../traces/scatter/subtypes":275,"./buttons":94,"./modebar":97}],97:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../lib"),i=e("../../../build/ploticon");function o(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var s=o.prototype;s.update=function(e,t){this.graphInfo=e;var n=this.graphInfo._context;"hover"===n.displayModeBar?this.element.className="modebar modebar--hover":this.element.className="modebar";var r=!this.hasButtons(t),a=this.hasLogo!==n.displaylogo,i=this.locale!==n.locale;this.locale=n.locale,(r||a||i)&&(this.removeAllButtons(),this.updateButtons(t),n.displaylogo&&(this.element.appendChild(this.getLogo()),this.hasLogo=!0)),this.updateActiveButton()},s.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(e){var n=t.createGroup();e.forEach(function(e){var r=e.name;if(!r)throw new Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(r))throw new Error("button name '"+r+"' is taken");t.buttonsNames.push(r);var a=t.createButton(e);t.buttonElements.push(a),n.appendChild(a)}),t.element.appendChild(n)})},s.createGroup=function(){var e=document.createElement("div");return e.className="modebar-group",e},s.createButton=function(e){var t=this,n=document.createElement("a");n.setAttribute("rel","tooltip"),n.className="modebar-btn";var a=e.title;void 0===a?a=e.name:"function"==typeof a&&(a=a(this.graphInfo)),(a||0===a)&&n.setAttribute("data-title",a),void 0!==e.attr&&n.setAttribute("data-attr",e.attr);var o=e.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),n.setAttribute("data-val",o)),"function"!=typeof e.click)throw new Error("must provide button 'click' function in button config");return n.addEventListener("click",function(n){e.click(t.graphInfo,n),t.updateActiveButton(n.currentTarget)}),n.setAttribute("data-toggle",e.toggle||!1),e.toggle&&r.select(n).classed("active",!0),n.appendChild(this.createIcon(e.icon||i.question,e.name)),n.setAttribute("data-gravity",e.gravity||"n"),n},s.createIcon=function(e,t){var n=e.ascent-e.descent,r="http://www.w3.org/2000/svg",a=document.createElementNS(r,"svg"),i=document.createElementNS(r,"path");a.setAttribute("height","1em"),a.setAttribute("width",e.width/n+"em"),a.setAttribute("viewBox",[0,0,e.width,n].join(" "));var o="toggleSpikelines"===t?"matrix(1.5 0 0 -1.5 0 "+e.ascent+")":"matrix(1 0 0 -1 0 "+e.ascent+")";return i.setAttribute("d",e.path),i.setAttribute("transform",o),a.appendChild(i),a},s.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,n=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(e){var i=e.getAttribute("data-val")||!0,o=e.getAttribute("data-attr"),s="true"===e.getAttribute("data-toggle"),l=r.select(e);if(s)o===n&&l.classed("active",!l.classed("active"));else{var c=null===o?o:a.nestedProperty(t,o).get();l.classed("active",c===i)}})},s.hasButtons=function(e){var t=this.buttons;if(!t)return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n){if(e[n].length!==t[n].length)return!1;for(var r=0;r<e[n].length;r++)if(e[n][r].name!==t[n][r].name)return!1}return!0},s.getLogo=function(){var e=this.createGroup(),t=document.createElement("a");return t.href="https://plot.ly/",t.target="_blank",t.setAttribute("data-title",a._(this.graphInfo,"Produced with Plotly")),t.className="modebar-btn plotlyjsicon modebar-btn--logo",t.appendChild(this.createIcon(i.plotlylogo)),e.appendChild(t),e},s.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},s.destroy=function(){a.removeElement(this.container.querySelector(".modebar"))},t.exports=function(e,t){var n=e._fullLayout,a=new o({graphInfo:e,container:n._paperdiv.node(),buttons:t});return n._privateplot&&r.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}},{"../../../build/ploticon":12,"../../lib":152,d3:3}],98:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),a=e("../color/attributes"),i=e("../../lib/extend").extendFlat,o=e("./button_attributes");o=i(o,{_isLinkedToArray:"button",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")}),t.exports={visible:{valType:"boolean",role:"info",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:o,x:{valType:"number",min:-2,max:3,role:"style",editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",role:"info",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,role:"style",editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",role:"info",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:r({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:a.lightLine,role:"style",editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",role:"style",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:a.defaultLine,role:"style",editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,role:"style",editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"}},{"../../lib/extend":146,"../../plots/font_attributes":220,"../color/attributes":31,"./button_attributes":99}],99:[function(e,t,n){"use strict";t.exports={step:{valType:"enumerated",role:"info",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",role:"info",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",role:"info",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",role:"info",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot"}},{}],100:[function(e,t,n){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],101:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../color"),i=e("./attributes"),o=e("./button_attributes"),s=e("./constants");t.exports=function(e,t,n,l,c){var u=e.rangeselector||{},d=t.rangeselector={};function f(e,t){return r.coerce(u,d,i,e,t)}if(f("visible",function(e,t,n){var a,i,s=e.buttons||[],l=t.buttons=[];function c(e,t){return r.coerce(a,i,o,e,t)}for(var u=0;u<s.length;u++)if(a=s[u],i={},r.isPlainObject(a)){var d=c("step");"all"!==d&&(!n||"gregorian"===n||"month"!==d&&"year"!==d?c("stepmode"):i.stepmode="backward",c("count")),c("label"),i._index=u,l.push(i)}return l}(u,d,c).length>0)){var h=function(e,t,n){for(var r=n.filter(function(n){return t[n].anchor===e._id}),a=0,i=0;i<r.length;i++){var o=t[r[i]].domain;o&&(a=Math.max(o[1],a))}return[e.domain[0],a+s.yPad]}(t,n,l);f("x",h[0]),f("y",h[1]),r.noneOrAll(e,t,["x","y"]),f("xanchor"),f("yanchor"),r.coerceFont(f,"font",n.font);var p=f("bgcolor");f("activecolor",a.contrast(p,s.lightAmount,s.darkAmount)),f("bordercolor"),f("borderwidth")}}},{"../../lib":152,"../color":32,"./attributes":98,"./button_attributes":99,"./constants":100}],102:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../registry"),i=e("../../plots/plots"),o=e("../color"),s=e("../drawing"),l=e("../../lib"),c=e("../../lib/svg_text_utils"),u=e("../../plots/cartesian/axis_ids"),d=e("../legend/anchor_utils"),f=e("../../constants/alignment"),h=f.LINE_SPACING,p=f.FROM_TL,g=f.FROM_BR,y=e("./constants"),m=e("./get_update_object");function v(e){return e._id}function x(e,t,n){var r=l.ensureSingle(e,"rect","selector-rect",function(e){e.attr("shape-rendering","crispEdges")});r.attr({rx:y.rx,ry:y.ry}),r.call(o.stroke,t.bordercolor).call(o.fill,function(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}(t,n)).style("stroke-width",t.borderwidth+"px")}function b(e,t,n,r){var a;l.ensureSingle(e,"text","selector-text",function(e){e.classed("user-select-none",!0).attr("text-anchor","middle")}).call(s.font,t.font).text((a=n,a.label?a.label:"all"===a.step?"all":a.count+a.step.charAt(0))).call(function(e){c.convertToTspans(e,r)})}t.exports=function(e){var t=e._fullLayout._infolayer.selectAll(".rangeselector").data(function(e){for(var t=u.list(e,"x",!0),n=[],r=0;r<t.length;r++){var a=t[r];a.rangeselector&&a.rangeselector.visible&&n.push(a)}return n}(e),v);t.enter().append("g").classed("rangeselector",!0),t.exit().remove(),t.style({cursor:"pointer","pointer-events":"all"}),t.each(function(t){var n=r.select(this),o=t,l=o.rangeselector,u=n.selectAll("g.button").data(l.buttons);u.enter().append("g").classed("button",!0),u.exit().remove(),u.each(function(t){var n=r.select(this),i=m(o,t);t._isActive=function(e,t,n){if("all"===t.step)return!0===e.autorange;var r=Object.keys(n);return e.range[0]===n[r[0]]&&e.range[1]===n[r[1]]}(o,t,i),n.call(x,l,t),n.call(b,l,t,e),n.on("click",function(){e._dragged||a.call("relayout",e,i)}),n.on("mouseover",function(){t._isHovered=!0,n.call(x,l,t)}),n.on("mouseout",function(){t._isHovered=!1,n.call(x,l,t)})}),function(e,t,n,a,o){var l=0,u=0,f=n.borderwidth;t.each(function(){var e=r.select(this),t=e.select(".selector-text"),a=n.font.size*h,i=Math.max(a*c.lineCount(t),16)+3;u=Math.max(u,i)}),t.each(function(){var e=r.select(this),t=e.select(".selector-rect"),a=e.select(".selector-text"),i=a.node()&&s.bBox(a.node()).width,o=n.font.size*h,d=c.lineCount(a),p=Math.max(i+10,y.minButtonWidth);e.attr("transform","translate("+(f+l)+","+f+")"),t.attr({x:0,y:0,width:p,height:u}),c.positionText(a,p/2,u/2-(d-1)*o/2+3),l+=p+5});var m=e._fullLayout._size,v=m.l+m.w*n.x,x=m.t+m.h*(1-n.y),b="left";d.isRightAnchor(n)&&(v-=l,b="right");d.isCenterAnchor(n)&&(v-=l/2,b="center");var _="top";d.isBottomAnchor(n)&&(x-=u,_="bottom");d.isMiddleAnchor(n)&&(x-=u/2,_="middle");l=Math.ceil(l),u=Math.ceil(u),v=Math.round(v),x=Math.round(x),i.autoMargin(e,a+"-range-selector",{x:n.x,y:n.y,l:l*p[b],r:l*g[b],b:u*g[_],t:u*p[_]}),o.attr("transform","translate("+v+","+x+")")}(e,u,l,o._name,n)})}},{"../../constants/alignment":132,"../../lib":152,"../../lib/svg_text_utils":173,"../../plots/cartesian/axis_ids":197,"../../plots/plots":226,"../../registry":241,"../color":32,"../drawing":57,"../legend/anchor_utils":84,"./constants":100,"./get_update_object":103,d3:3}],103:[function(e,t,n){"use strict";var r=e("d3");t.exports=function(e,t){var n=e._name,a={};if("all"===t.step)a[n+".autorange"]=!0;else{var i=function(e,t){var n,a=e.range,i=new Date(e.r2l(a[1])),o=t.step,s=t.count;switch(t.stepmode){case"backward":n=e.l2r(+r.time[o].utc.offset(i,-s));break;case"todate":var l=r.time[o].utc.offset(i,-s);n=e.l2r(+r.time[o].utc.ceil(l))}var c=a[1];return[n,c]}(e,t);a[n+".range[0]"]=i[0],a[n+".range[1]"]=i[1]}return a}},{d3:3}],104:[function(e,t,n){"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),draw:e("./draw")}},{"./attributes":98,"./defaults":101,"./draw":102}],105:[function(e,t,n){"use strict";var r=e("../color/attributes");t.exports={bgcolor:{valType:"color",dflt:r.background,role:"style",editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:r.defaultLine,role:"style",editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,role:"style",editType:"plot",description:"Sets the border color of the range slider."},autorange:{valType:"boolean",dflt:!0,role:"style",editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",role:"info",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,role:"style",editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,role:"info",editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"}},{"../color/attributes":31}],106:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axis_ids").list,a=e("../../plots/cartesian/autorange").getAutoRange,i=e("./constants");t.exports=function(e){for(var t=r(e,"x",!0),n=0;n<t.length;n++){var o=t[n],s=o[i.name];s&&s.visible&&s.autorange&&o._min.length&&o._max.length&&(s._input.autorange=!0,s._input.range=s.range=a(o))}}},{"../../plots/cartesian/autorange":193,"../../plots/cartesian/axis_ids":197,"./constants":107}],107:[function(e,t,n){"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},{}],108:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("./attributes"),i=e("./oppaxis_attributes"),o=e("../../plots/cartesian/axis_ids");t.exports=function(e,t,n){var s=e[n],l=t[n];if(s.rangeslider||t._requestRangeslider[l._id]){r.isPlainObject(s.rangeslider)||(s.rangeslider={});var c=s.rangeslider,u=l.rangeslider={};if(_("visible")){_("bgcolor",t.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),l._rangesliderAutorange=_("autorange",!l.isValidRange(c.range)),_("range");var d=t._subplots;if(d)for(var f=d.cartesian.filter(function(e){return e.substr(0,e.indexOf("y"))===o.name2id(n)}).map(function(e){return e.substr(e.indexOf("y"),e.length)}),h=r.simpleMap(f,o.id2name),p=0;p<h.length;p++){var g,y=h[p],m=c[y]||{},v=u[y]={},x=t[y];m.range&&x.isValidRange(m.range)&&(g="fixed");var b=w(m,v,"rangemode",g);"match"!==b&&w(m,v,"range",x.range.slice()),x._rangesliderAutorange="auto"===b}u._input=c}}function _(e,t){return r.coerce(c,u,a,e,t)}function w(e,t,n,a){return r.coerce(e,t,i,n,a)}}},{"../../lib":152,"../../plots/cartesian/axis_ids":197,"./attributes":105,"./oppaxis_attributes":111}],109:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../registry"),i=e("../../plots/plots"),o=e("../../lib"),s=e("../drawing"),l=e("../color"),c=e("../titles"),u=e("../../plots/cartesian"),d=e("../../plots/cartesian/axes"),f=e("../dragelement"),h=e("../../lib/setcursor"),p=e("./constants");function g(e,t,n,r){var a=o.ensureSingle(e,"rect",p.bgClassName,function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),i=r.borderwidth%2==0?r.borderwidth:r.borderwidth-1,l=-r._offsetShift,c=s.crispRound(t,r.borderwidth);a.attr({width:r._width+i,height:r._height+i,transform:"translate("+l+","+l+")",fill:r.bgcolor,stroke:r.bordercolor,"stroke-width":c})}function y(e,t,n,r){var a=t._fullLayout;o.ensureSingleById(a._topdefs,"clipPath",r._clipId,function(e){e.append("rect").attr({x:0,y:0})}).select("rect").attr({width:r._width,height:r._height})}function m(e,t,n,a){var l,c=d.getSubplots(t,n),f=t.calcdata,h=e.selectAll("g."+p.rangePlotClassName).data(c,o.identity);h.enter().append("g").attr("class",function(e){return p.rangePlotClassName+" "+e}).call(s.setClipUrl,a._clipId),h.order(),h.exit().remove(),h.each(function(e,o){var s=r.select(this),c=0===o,h=d.getFromId(t,e,"y"),p=h._name,g=a[p],y={data:[],layout:{xaxis:{type:n.type,domain:[0,1],range:a.range.slice(),calendar:n.calendar},width:a._width,height:a._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};y.layout[p]={type:h.type,domain:[0,1],range:"match"!==g.rangemode?g.range.slice():h.range.slice(),calendar:h.calendar},i.supplyDefaults(y);var m={id:e,plotgroup:s,xaxis:y._fullLayout.xaxis,yaxis:y._fullLayout[p],isRangePlot:!0};c?l=m:(m.mainplot="xy",m.mainplotinfo=l),u.rangePlot(t,m,function(e,t){for(var n=[],r=0;r<e.length;r++){var a=e[r],i=a[0].trace;i.xaxis+i.yaxis===t&&n.push(a)}return n}(f,e))})}function v(e,t,n,r,a){(o.ensureSingle(e,"rect",p.maskMinClassName,function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})}).attr("height",r._height).call(l.fill,p.maskColor),o.ensureSingle(e,"rect",p.maskMaxClassName,function(e){e.attr({y:0,"shape-rendering":"crispEdges"})}).attr("height",r._height).call(l.fill,p.maskColor),"match"!==a.rangemode)&&(o.ensureSingle(e,"rect",p.maskMinOppAxisClassName,function(e){e.attr({y:0,"shape-rendering":"crispEdges"})}).attr("width",r._width).call(l.fill,p.maskOppAxisColor),o.ensureSingle(e,"rect",p.maskMaxOppAxisClassName,function(e){e.attr({y:0,"shape-rendering":"crispEdges"})}).attr("width",r._width).style("border-top",p.maskOppBorder).call(l.fill,p.maskOppAxisColor))}function x(e,t,n,r){t._context.staticPlot||o.ensureSingle(e,"rect",p.slideBoxClassName,function(e){e.attr({y:0,cursor:p.slideBoxCursor,"shape-rendering":"crispEdges"})}).attr({height:r._height,fill:p.slideBoxFill})}function b(e,t,n,r){var a=o.ensureSingle(e,"g",p.grabberMinClassName),i=o.ensureSingle(e,"g",p.grabberMaxClassName),s={x:0,width:p.handleWidth,rx:p.handleRadius,fill:l.background,stroke:l.defaultLine,"stroke-width":p.handleStrokeWidth,"shape-rendering":"crispEdges"},c={y:Math.round(r._height/4),height:Math.round(r._height/2)};if(o.ensureSingle(a,"rect",p.handleMinClassName,function(e){e.attr(s)}).attr(c),o.ensureSingle(i,"rect",p.handleMaxClassName,function(e){e.attr(s)}).attr(c),!t._context.staticPlot){var u={width:p.grabAreaWidth,x:0,y:0,fill:p.grabAreaFill,cursor:p.grabAreaCursor};o.ensureSingle(a,"rect",p.grabAreaMinClassName,function(e){e.attr(u)}).attr("height",r._height),o.ensureSingle(i,"rect",p.grabAreaMaxClassName,function(e){e.attr(u)}).attr("height",r._height)}}t.exports=function(e){var t=e._fullLayout,n=function(e){var t=d.list({_fullLayout:e},"x",!0),n=p.name,r=[];if(e._has("gl2d"))return r;for(var a=0;a<t.length;a++){var i=t[a];i[n]&&i[n].visible&&r.push(i)}return r}(t);var s=t._infolayer.selectAll("g."+p.containerClassName).data(n,function(e){return e._name});s.enter().append("g").classed(p.containerClassName,!0).attr("pointer-events","all"),s.exit().each(function(e){var n=r.select(this),a=e[p.name];n.remove(),t._topdefs.select("#"+a._clipId).remove()}),s.exit().size()&&function(e){for(var t=e._fullLayout._pushmargin||{},n=Object.keys(t),r=0;r<n.length;r++){var a=n[r];-1!==a.indexOf(p.name)&&i.autoMargin(e,a)}}(e),0!==n.length&&s.each(function(n){var s=r.select(this),l=n[p.name],u=t[d.id2name(n.anchor)],_=l[d.id2name(n.anchor)];if(l.range){var w=l.range,k=n.range;w[0]=n.l2r(Math.min(n.r2l(w[0]),n.r2l(k[0]))),w[1]=n.l2r(Math.max(n.r2l(w[1]),n.r2l(k[1]))),l._input.range=w.slice()}n.cleanRange("rangeslider.range");for(var M=t.margin,T=t._size,A=n.domain,S=(n._boundingBox||{}).height||0,L=1/0,C=d.getSubplots(e,n),z=0;z<C.length;z++){var O=d.getFromId(e,C[z].substr(C[z].indexOf("y")));L=Math.min(L,O.domain[0])}l._id=p.name+n._id,l._clipId=l._id+"-"+t._uid,l._width=T.w*(A[1]-A[0]),l._height=(t.height-M.b-M.t)*l.thickness,l._offsetShift=Math.floor(l.borderwidth/2);var D=Math.round(M.l+T.w*A[0]),P=Math.round(T.t+T.h*(1-L)+S+l._offsetShift+p.extraPad);s.attr("transform","translate("+D+","+P+")");var I=n.r2l(l.range[0]),j=n.r2l(l.range[1]),E=j-I;if(l.p2d=function(e){return e/l._width*E+I},l.d2p=function(e){return(e-I)/E*l._width},l._rl=[I,j],"match"!==_.rangemode){var N=u.r2l(_.range[0]),R=u.r2l(_.range[1])-N;l.d2pOppAxis=function(e){return(e-N)/R*l._height}}s.call(g,e,n,l).call(y,e,n,l).call(m,e,n,l).call(v,e,n,l,_).call(x,e,n,l).call(b,e,n,l),function(e,t,n,i){var s=e.select("rect."+p.slideBoxClassName).node(),l=e.select("rect."+p.grabAreaMinClassName).node(),c=e.select("rect."+p.grabAreaMaxClassName).node();e.on("mousedown",function(){var u=r.event,d=u.target,p=u.clientX,g=p-e.node().getBoundingClientRect().left,y=i.d2p(n._rl[0]),m=i.d2p(n._rl[1]),v=f.coverSlip();function x(e){var u,f,x,b=+e.clientX-p;switch(d){case s:x="ew-resize",u=y+b,f=m+b;break;case l:x="col-resize",u=y+b,f=m;break;case c:x="col-resize",u=y,f=m+b;break;default:x="ew-resize",u=g,f=g+b}if(f<u){var _=f;f=u,u=_}i._pixelMin=u,i._pixelMax=f,h(r.select(v),x),function(e,t,n,r){function i(e){return n.l2r(o.constrain(e,r._rl[0],r._rl[1]))}var s=i(r.p2d(r._pixelMin)),l=i(r.p2d(r._pixelMax));window.requestAnimationFrame(function(){a.call("relayout",t,n._name+".range",[s,l])})}(0,t,n,i)}v.addEventListener("mousemove",x),v.addEventListener("mouseup",function e(){v.removeEventListener("mousemove",x);v.removeEventListener("mouseup",e);o.removeElement(v)})})}(s,e,n,l),function(e,t,n,r,a,i){var s=p.handleWidth/2;function l(e){return o.constrain(e,0,r._width)}function c(e){return o.constrain(e,0,r._height)}function u(e){return o.constrain(e,-s,r._width+s)}var d=l(r.d2p(n._rl[0])),f=l(r.d2p(n._rl[1]));if(e.select("rect."+p.slideBoxClassName).attr("x",d).attr("width",f-d),e.select("rect."+p.maskMinClassName).attr("width",d),e.select("rect."+p.maskMaxClassName).attr("x",f).attr("width",r._width-f),"match"!==i.rangemode){var h=r._height-c(r.d2pOppAxis(a._rl[1])),g=r._height-c(r.d2pOppAxis(a._rl[0]));e.select("rect."+p.maskMinOppAxisClassName).attr("x",d).attr("height",h).attr("width",f-d),e.select("rect."+p.maskMaxOppAxisClassName).attr("x",d).attr("y",g).attr("height",r._height-g).attr("width",f-d),e.select("rect."+p.slideBoxClassName).attr("y",h).attr("height",g-h)}var y=Math.round(u(d-s))-.5,m=Math.round(u(f-s))+.5;e.select("g."+p.grabberMinClassName).attr("transform","translate("+y+",0.5)"),e.select("g."+p.grabberMaxClassName).attr("transform","translate("+m+",0.5)")}(s,0,n,l,u,_),"bottom"===n.side&&c.draw(e,n._id+"title",{propContainer:n,propName:n._name+".title",placeholder:t._dfltTitle.x,attributes:{x:n._offset+n._length/2,y:P+l._height+l._offsetShift+10+1.5*n.titlefont.size,"text-anchor":"middle"}}),i.autoMargin(e,l._id,{x:A[0],y:L,l:0,r:0,t:0,b:l._height+M.b+S,pad:p.extraPad+2*l._offsetShift})})}},{"../../lib":152,"../../lib/setcursor":171,"../../plots/cartesian":205,"../../plots/cartesian/axes":194,"../../plots/plots":226,"../../registry":241,"../color":32,"../dragelement":54,"../drawing":57,"../titles":125,"./constants":107,d3:3}],110:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("./attributes"),i=e("./oppaxis_attributes");t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:r.extendFlat({},a,{yaxis:i})}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),calcAutorange:e("./calc_autorange"),draw:e("./draw")}},{"../../lib":152,"./attributes":105,"./calc_autorange":106,"./defaults":108,"./draw":109,"./oppaxis_attributes":111}],111:[function(e,t,n){"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",role:"style",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",role:"style",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"}},{}],112:[function(e,t,n){"use strict";var r=e("../annotations/attributes"),a=e("../../traces/scatter/attributes").line,i=e("../drawing/attributes").dash,o=e("../../lib/extend").extendFlat;t.exports={_isLinkedToArray:"shape",visible:{valType:"boolean",role:"info",dflt:!0,editType:"calcIfAutorange+arraydraw",description:["Determines whether or not this shape is visible."].join(" ")},type:{valType:"enumerated",values:["circle","rect","path","line"],role:"info",editType:"calcIfAutorange+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",role:"info",editType:"arraydraw",description:"Specifies whether shapes are drawn below or above traces."},xref:o({},r.xref,{description:["Sets the shape's x coordinate axis.","If set to an x axis id (e.g. *x* or *x2*), the `x` position","refers to an x coordinate.","If set to *paper*, the `x` position refers to the distance from","the left side of the plotting area in normalized coordinates","where *0* (*1*) corresponds to the left (right) side.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, then you must convert","the date to unix time in milliseconds."].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",role:"info",editType:"calcIfAutorange+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:o({},r.yref,{description:["Sets the annotation's y coordinate axis.","If set to an y axis id (e.g. *y* or *y2*), the `y` position","refers to an y coordinate","If set to *paper*, the `y` position refers to the distance from","the bottom of the plotting area in normalized coordinates","where *0* (*1*) corresponds to the bottom (top)."].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",role:"info",editType:"calcIfAutorange+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",role:"info",editType:"calcIfAutorange+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},path:{valType:"string",role:"info",editType:"calcIfAutorange+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,role:"info",editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:o({},a.color,{editType:"arraydraw"}),width:o({},a.width,{editType:"calcIfAutorange+arraydraw"}),dash:o({},i,{editType:"arraydraw"}),role:"info",editType:"calcIfAutorange+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",role:"info",editType:"arraydraw",description:["Sets the color filling the shape's interior."].join(" ")},editType:"arraydraw"}},{"../../lib/extend":146,"../../traces/scatter/attributes":253,"../annotations/attributes":17,"../drawing/attributes":56}],113:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("./constants"),o=e("./helpers");function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,n,a,o,s){var l=e/2,c=s;if("pixel"===t){var u=o?function(e,t){var n=[];return e.match(i.segmentRE).forEach(function(e){var r=t[e.charAt(0)].drawn;if(void 0!==r){var a=e.substr(1).match(i.paramRE);!a||a.length<r||n.push(a[r])}}),n}(o,s?i.paramIsY:i.paramIsX):[n,a],d=r.aggNums(Math.max,null,u),f=r.aggNums(Math.min,null,u),h=f<0?Math.abs(f)+l:l,p=d>0?d+l:l;return{ppad:l,ppadplus:c?h:p,ppadminus:c?p:h}}return{ppad:l}}function u(e,t,n,r,a){var s="category"===e.type?e.r2c:e.d2c;if(void 0!==t)return[s(t),s(n)];if(r){var l,c,u,d,f=1/0,h=-1/0,p=r.match(i.segmentRE);for("date"===e.type&&(s=o.decodeDate(s)),l=0;l<p.length;l++)void 0!==(c=a[p[l].charAt(0)].drawn)&&(!(u=p[l].substr(1).match(i.paramRE))||u.length<c||((d=s(u[c]))<f&&(f=d),d>h&&(h=d)));return h>=f?[f,h]:void 0}}t.exports=function(e){var t=e._fullLayout,n=r.filterVisible(t.shapes);if(n.length&&e._fullData.length)for(var o=0;o<n.length;o++){var c,d,f=n[o];if("paper"!==f.xref){var h="pixel"===f.xsizemode?f.xanchor:f.x0,p="pixel"===f.xsizemode?f.xanchor:f.x1;(d=u(c=a.getFromId(e,f.xref),h,p,f.path,i.paramIsX))&&a.expand(c,d,s(f))}if("paper"!==f.yref){var g="pixel"===f.ysizemode?f.yanchor:f.y0,y="pixel"===f.ysizemode?f.yanchor:f.y1;(d=u(c=a.getFromId(e,f.yref),g,y,f.path,i.paramIsY))&&a.expand(c,d,l(f))}}}},{"../../lib":152,"../../plots/cartesian/axes":194,"./constants":114,"./helpers":117}],114:[function(e,t,n){"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},{}],115:[function(e,t,n){"use strict";var r=e("../../plots/array_container_defaults"),a=e("./shape_defaults");t.exports=function(e,t){r(e,t,{name:"shapes",handleItemDefaults:a})}},{"../../plots/array_container_defaults":190,"./shape_defaults":119}],116:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../color"),s=e("../drawing"),l=e("../dragelement"),c=e("../../lib/setcursor"),u=e("./constants"),d=e("./helpers");function f(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+t+'"]').remove();var n=(e.layout.shapes||[])[t],a=e._fullLayout.shapes[t];if(n&&!1!==a.visible)if("below"!==a.layer)f(e._fullLayout._shapeUpperLayer);else if("paper"===a.xref||"paper"===a.yref)f(e._fullLayout._shapeLowerLayer);else{var u=e._fullLayout._plots[a.xref+a.yref];if(u)f((u.mainplotinfo||u).shapelayer);else f(e._fullLayout._shapeLowerLayer)}function f(n){var u={"data-index":t,"fill-rule":"evenodd",d:h(e,a)},f=a.line.width?a.line.color:"rgba(0,0,0,0)",g=n.append("path").attr(u).style("opacity",a.opacity).call(o.stroke,f).call(o.fill,a.fillcolor).call(s.dashLine,a.line.dash,a.line.width),y=(a.xref+a.yref).replace(/paper/g,"");g.call(s.setClipUrl,y?"clip"+e._fullLayout._uid+y:null),e._context.edits.shapePosition&&function(e,t,n,a){var o,s,u,f,g,y,m,v,x,b,_,w,k,M,T,A,S,L,C,z,O,D,P,I,j,E,N,R,F,B,H,q,V,U,G=10,Y=10,Z="pixel"===n.xsizemode,X="pixel"===n.ysizemode,W={element:t.node(),gd:e,prepFn:function(t){R=i.getFromId(e,n.xref),F=i.getFromId(e,n.yref),B=d.getDataToPixel(e,R),H=d.getDataToPixel(e,F,!0),q=d.getPixelToData(e,R),V=d.getPixelToData(e,F,!0);var r="shapes["+a+"]";Z&&(y=B(n.xanchor),w=r+".xanchor");X&&(m=H(n.yanchor),k=r+".yanchor");"path"===n.type?(E=n.path,N=r+".path"):(s=Z?n.x0:B(n.x0),u=X?n.y0:H(n.y0),f=Z?n.x1:B(n.x1),g=X?n.y1:H(n.y1),v=r+".x0",x=r+".y0",b=r+".x1",_=r+".y1");s<f?(A=s,z=r+".x0",I="x0",S=f,O=r+".x1",j="x1"):(A=f,z=r+".x1",I="x1",S=s,O=r+".x0",j="x0");!X&&u<g||X&&u>g?(M=u,L=r+".y0",D="y0",T=g,C=r+".y1",P="y1"):(M=g,L=r+".y1",D="y1",T=u,C=r+".y0",P="y0");o={},J(t),W.moveFn="move"===U?Q:$},doneFn:function(){c(t),r.call("relayout",e,o)}};function J(e){var n=W.element.getBoundingClientRect(),r=n.right-n.left,a=n.bottom-n.top,i=e.clientX-n.left,o=e.clientY-n.top,s=r>G&&a>Y&&!e.shiftKey?l.getCursor(i/r,1-o/a):"move";c(t,s),U=s.split("-")[0]}function Q(r,a){if("path"===n.type){var i=function(e){return e},l=i,c=i;Z?o[w]=n.xanchor=q(y+r):(l=function(e){return q(B(e)+r)},R&&"date"===R.type&&(l=d.encodeDate(l))),X?o[k]=n.yanchor=V(m+a):(c=function(e){return V(H(e)+a)},F&&"date"===F.type&&(c=d.encodeDate(c))),n.path=p(E,l,c),o[N]=n.path}else Z?o[w]=n.xanchor=q(y+r):(o[v]=n.x0=q(s+r),o[b]=n.x1=q(f+r)),X?o[k]=n.yanchor=V(m+a):(o[x]=n.y0=V(u+a),o[_]=n.y1=V(g+a));t.attr("d",h(e,n))}function $(r,a){if("path"===n.type){var i=function(e){return e},s=i,l=i;Z?o[w]=n.xanchor=q(y+r):(s=function(e){return q(B(e)+r)},R&&"date"===R.type&&(s=d.encodeDate(s))),X?o[k]=n.yanchor=V(m+a):(l=function(e){return V(H(e)+a)},F&&"date"===F.type&&(l=d.encodeDate(l))),n.path=p(E,s,l),o[N]=n.path}else{var c=~U.indexOf("n")?M+a:M,u=~U.indexOf("s")?T+a:T,f=~U.indexOf("w")?A+r:A,g=~U.indexOf("e")?S+r:S;~U.indexOf("n")&&X&&(c=M-a),~U.indexOf("s")&&X&&(u=T-a),(!X&&u-c>Y||X&&c-u>Y)&&(o[L]=n[D]=X?c:V(c),o[C]=n[P]=X?u:V(u)),g-f>G&&(o[z]=n[I]=Z?f:q(f),o[O]=n[j]=Z?g:q(g))}t.attr("d",h(e,n))}l.init(W),t.node().onmousemove=J}(e,g,a,t)}}function h(e,t){var n,r,o,s,l,c,f,h,p=t.type,g=i.getFromId(e,t.xref),y=i.getFromId(e,t.yref),m=e._fullLayout._size;if(g?(n=d.shapePositionToRange(g),r=function(e){return g._offset+g.r2p(n(e,!0))}):r=function(e){return m.l+m.w*e},y?(o=d.shapePositionToRange(y),s=function(e){return y._offset+y.r2p(o(e,!0))}):s=function(e){return m.t+m.h*(1-e)},"path"===p)return g&&"date"===g.type&&(r=d.decodeDate(r)),y&&"date"===y.type&&(s=d.decodeDate(s)),function(e,t,n){var r=e.path,i=e.xsizemode,o=e.ysizemode,s=e.xanchor,l=e.yanchor;return r.replace(u.segmentRE,function(e){var r=0,c=e.charAt(0),d=u.paramIsX[c],f=u.paramIsY[c],h=u.numParams[c],p=e.substr(1).replace(u.paramRE,function(e){return d[r]?e="pixel"===i?t(s)+Number(e):t(e):f[r]&&(e="pixel"===o?n(l)-Number(e):n(e)),++r>h&&(e="X"),e});return r>h&&(p=p.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),c+p})}(t,r,s);if("pixel"===t.xsizemode){var v=r(t.xanchor);l=v+t.x0,c=v+t.x1}else l=r(t.x0),c=r(t.x1);if("pixel"===t.ysizemode){var x=s(t.yanchor);f=x-t.y0,h=x-t.y1}else f=s(t.y0),h=s(t.y1);if("line"===p)return"M"+l+","+f+"L"+c+","+h;if("rect"===p)return"M"+l+","+f+"H"+c+"V"+h+"H"+l+"Z";var b=(l+c)/2,_=(f+h)/2,w=Math.abs(b-l),k=Math.abs(_-f),M="A"+w+","+k,T=b+w+","+_;return"M"+T+M+" 0 1,1 "+(b+","+(_-k))+M+" 0 0,1 "+T+"Z"}function p(e,t,n){return e.replace(u.segmentRE,function(e){var r=0,a=e.charAt(0),i=u.paramIsX[a],o=u.paramIsY[a],s=u.numParams[a];return a+e.substr(1).replace(u.paramRE,function(e){return r>=s?e:(i[r]?e=t(e):o[r]&&(e=n(e)),r++,e)})})}t.exports={draw:function(e){var t=e._fullLayout;for(var n in t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._plots){var r=t._plots[n].shapelayer;r&&r.selectAll("path").remove()}for(var a=0;a<t.shapes.length;a++)t.shapes[a].visible&&f(e,a)},drawOne:f}},{"../../lib":152,"../../lib/setcursor":171,"../../plots/cartesian/axes":194,"../../registry":241,"../color":32,"../dragelement":54,"../drawing":57,"./constants":114,"./helpers":117}],117:[function(e,t,n){"use strict";n.rangeToShapePosition=function(e){return"log"===e.type?e.r2d:function(e){return e}},n.shapePositionToRange=function(e){return"log"===e.type?e.d2r:function(e){return e}},n.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},n.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},n.getDataToPixel=function(e,t,r){var a,i=e._fullLayout._size;if(t){var o=n.shapePositionToRange(t);a=function(e){return t._offset+t.r2p(o(e,!0))},"date"===t.type&&(a=n.decodeDate(a))}else a=r?function(e){return i.t+i.h*(1-e)}:function(e){return i.l+i.w*e};return a},n.getPixelToData=function(e,t,r){var a,i=e._fullLayout._size;if(t){var o=n.rangeToShapePosition(t);a=function(e){return o(t.p2r(e-t._offset))}}else a=r?function(e){return 1-(e-i.t)/i.h}:function(e){return(e-i.l)/i.w};return a}},{}],118:[function(e,t,n){"use strict";var r=e("./draw");t.exports={moduleType:"component",name:"shapes",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("shapes"),calcAutorange:e("./calc_autorange"),draw:r.draw,drawOne:r.drawOne}},{"../../plots/cartesian/include_components":204,"./attributes":112,"./calc_autorange":113,"./defaults":115,"./draw":116}],119:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("./attributes"),o=e("./helpers");t.exports=function(e,t,n,s,l){function c(n,a){return r.coerce(e,t,i,n,a)}if(s=s||{},!c("visible",!(l=l||{}).itemIsNotPlainObject))return t;c("layer"),c("opacity"),c("fillcolor"),c("line.color"),c("line.width"),c("line.dash");for(var u=c("type",e.path?"path":"rect"),d=c("xsizemode"),f=c("ysizemode"),h=["x","y"],p=0;p<2;p++){var g,y,m,v=h[p],x=v+"anchor",b="x"===v?d:f,_={_fullLayout:n},w=a.coerceRef(e,t,_,v,"","paper");if("paper"!==w?(g=a.getFromId(_,w),m=o.rangeToShapePosition(g),y=o.shapePositionToRange(g)):y=m=r.identity,"path"!==u){var k=v+"0",M=v+"1",T=e[k],A=e[M];e[k]=y(e[k],!0),e[M]=y(e[M],!0),"pixel"===b?(c(k,0),c(M,10)):(a.coercePosition(t,_,c,w,k,.25),a.coercePosition(t,_,c,w,M,.75)),t[k]=m(t[k]),t[M]=m(t[M]),e[k]=T,e[M]=A}if("pixel"===b){var S=e[x];e[x]=y(e[x],!0),a.coercePosition(t,_,c,w,x,.25),t[x]=m(t[x]),e[x]=S}}return"path"===u?c("path"):r.noneOrAll(e,t,["x0","x1","y0","y1"]),t}},{"../../lib":152,"../../plots/cartesian/axes":194,"./attributes":112,"./helpers":117}],120:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),a=e("../../plots/pad_attributes"),i=e("../../lib/extend").extendDeepAll,o=e("../../plot_api/edit_types").overrideAll,s=e("../../plots/animation_attributes"),l=e("./constants"),c={_isLinkedToArray:"step",method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",role:"info",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",role:"info",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",role:"info",description:"Sets the text label to appear on the slider"},value:{valType:"string",role:"info",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",role:"info",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}};t.exports=o({_isLinkedToArray:"slider",visible:{valType:"boolean",role:"info",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",role:"info",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:c,lenmode:{valType:"enumerated",values:["fraction","pixels"],role:"info",dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,role:"style",description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,role:"style",description:"Sets the x position (in normalized coordinates) of the slider."},pad:i({},a,{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",role:"info",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,role:"style",description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",role:"info",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",role:"info",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:s.transition.easing.values,role:"info",dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",role:"info",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",role:"info",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,role:"info",description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",role:"info",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",role:"info",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:r({description:"Sets the font of the current value label text."})},font:r({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",role:"style",dflt:l.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",role:"style",dflt:l.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:l.railBorderColor,role:"style",description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth,role:"style",description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:l.tickLength,role:"style",description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:l.tickColor,role:"style",description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,role:"style",description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength,role:"style",description:"Sets the length in pixels of minor step tick marks"}},"arraydraw","from-root")},{"../../lib/extend":146,"../../plot_api/edit_types":179,"../../plots/animation_attributes":189,"../../plots/font_attributes":220,"../../plots/pad_attributes":225,"./constants":121}],121:[function(e,t,n){"use strict";t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],122:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plots/array_container_defaults"),i=e("./attributes"),o=e("./constants").name,s=i.steps;function l(e,t,n){function a(n,a){return r.coerce(e,t,i,n,a)}a("visible",function(e,t){var n,a,i=e.steps||[],o=t.steps=[];function l(e,t){return r.coerce(n,a,s,e,t)}for(var c=0;c<i.length;c++)n=i[c],a={},l("method"),r.isPlainObject(n)&&("skip"===a.method||Array.isArray(n.args))&&(l("args"),l("label","step-"+c),l("value",a.label),l("execute"),o.push(a));return o}(e,t).length>0)&&(a("active"),a("x"),a("y"),r.noneOrAll(e,t,["x","y"]),a("xanchor"),a("yanchor"),a("len"),a("lenmode"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),r.coerceFont(a,"font",n.font),a("currentvalue.visible")&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),r.coerceFont(a,"currentvalue.font",t.font)),a("transition.duration"),a("transition.easing"),a("bgcolor"),a("activebgcolor"),a("bordercolor"),a("borderwidth"),a("ticklen"),a("tickwidth"),a("tickcolor"),a("minorticklen"))}t.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:l})}},{"../../lib":152,"../../plots/array_container_defaults":190,"./attributes":120,"./constants":121}],123:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../plots/plots"),i=e("../color"),o=e("../drawing"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),c=e("../legend/anchor_utils"),u=e("./constants"),d=e("../../constants/alignment"),f=d.LINE_SPACING,h=d.FROM_TL,p=d.FROM_BR;function g(e){return e._index}function y(e,t){var n=o.tester.selectAll("g."+u.labelGroupClass).data(t.steps);n.enter().append("g").classed(u.labelGroupClass,!0);var i=0,s=0;n.each(function(e){var n=x(r.select(this),{step:e},t).node();if(n){var a=o.bBox(n);s=Math.max(s,a.height),i=Math.max(i,a.width)}}),n.remove();var d=t._dims={};d.inputAreaWidth=Math.max(u.railWidth,u.gripHeight);var f=e._fullLayout._size;d.lx=f.l+f.w*t.x,d.ly=f.t+f.h*(1-t.y),"fraction"===t.lenmode?d.outerLength=Math.round(f.w*t.len):d.outerLength=t.len,d.inputAreaStart=0,d.inputAreaLength=Math.round(d.outerLength-t.pad.l-t.pad.r);var g=(d.inputAreaLength-2*u.stepInset)/(t.steps.length-1),y=i+u.labelPadding;if(d.labelStride=Math.max(1,Math.ceil(y/g)),d.labelHeight=s,d.currentValueMaxWidth=0,d.currentValueHeight=0,d.currentValueTotalHeight=0,d.currentValueMaxLines=1,t.currentvalue.visible){var v=o.tester.append("g");n.each(function(e){var n=m(v,t,e.label),r=n.node()&&o.bBox(n.node())||{width:0,height:0},a=l.lineCount(n);d.currentValueMaxWidth=Math.max(d.currentValueMaxWidth,Math.ceil(r.width)),d.currentValueHeight=Math.max(d.currentValueHeight,Math.ceil(r.height)),d.currentValueMaxLines=Math.max(d.currentValueMaxLines,a)}),d.currentValueTotalHeight=d.currentValueHeight+t.currentvalue.offset,v.remove()}d.height=d.currentValueTotalHeight+u.tickOffset+t.ticklen+u.labelOffset+d.labelHeight+t.pad.t+t.pad.b;var b="left";c.isRightAnchor(t)&&(d.lx-=d.outerLength,b="right"),c.isCenterAnchor(t)&&(d.lx-=d.outerLength/2,b="center");var _="top";c.isBottomAnchor(t)&&(d.ly-=d.height,_="bottom"),c.isMiddleAnchor(t)&&(d.ly-=d.height/2,_="middle"),d.outerLength=Math.ceil(d.outerLength),d.height=Math.ceil(d.height),d.lx=Math.round(d.lx),d.ly=Math.round(d.ly),a.autoMargin(e,u.autoMarginIdRoot+t._index,{x:t.x,y:t.y,l:d.outerLength*h[b],r:d.outerLength*p[b],b:d.height*p[_],t:d.height*h[_]})}function m(e,t,n){if(t.currentvalue.visible){var r,a,i=t._dims;switch(t.currentvalue.xanchor){case"right":r=i.inputAreaLength-u.currentValueInset-i.currentValueMaxWidth,a="left";break;case"center":r=.5*i.inputAreaLength,a="middle";break;default:r=u.currentValueInset,a="left"}var c=s.ensureSingle(e,"text",u.labelClass,function(e){e.classed("user-select-none",!0).attr({"text-anchor":a,"data-notex":1})}),d=t.currentvalue.prefix?t.currentvalue.prefix:"";if("string"==typeof n)d+=n;else d+=t.steps[t.active].label;t.currentvalue.suffix&&(d+=t.currentvalue.suffix),c.call(o.font,t.currentvalue.font).text(d).call(l.convertToTspans,t._gd);var h=l.lineCount(c),p=(i.currentValueMaxLines+1-h)*t.currentvalue.font.size*f;return l.positionText(c,r,p),c}}function v(e,t,n){s.ensureSingle(e,"rect",u.gripRectClass,function(r){r.call(k,t,e,n).style("pointer-events","all")}).attr({width:u.gripWidth,height:u.gripHeight,rx:u.gripRadius,ry:u.gripRadius}).call(i.stroke,n.bordercolor).call(i.fill,n.bgcolor).style("stroke-width",n.borderwidth+"px")}function x(e,t,n){var r=s.ensureSingle(e,"text",u.labelClass,function(e){e.classed("user-select-none",!0).attr({"text-anchor":"middle","data-notex":1})});return r.call(o.font,n.font).text(t.step.label).call(l.convertToTspans,n._gd),r}function b(e,t){var n=s.ensureSingle(e,"g",u.labelsClass),a=t._dims,i=n.selectAll("g."+u.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(u.labelGroupClass,!0),i.exit().remove(),i.each(function(e){var n=r.select(this);n.call(x,e,t),o.setTranslate(n,A(t,e.fraction),u.tickOffset+t.ticklen+t.font.size*f+u.labelOffset+a.currentValueTotalHeight)})}function _(e,t,n,r,a){var i=Math.round(r*(n.steps.length-1));i!==n.active&&w(e,t,n,i,!0,a)}function w(e,t,n,r,i,o){var s=n.active;n._input.active=n.active=r;var l=n.steps[n.active];t.call(T,n,n.active/(n.steps.length-1),o),t.call(m,n),e.emit("plotly_sliderchange",{slider:n,step:n.steps[n.active],interaction:i,previousActive:s}),l&&l.method&&i&&(t._nextMethod?(t._nextMethod.step=l,t._nextMethod.doCallback=i,t._nextMethod.doTransition=o):(t._nextMethod={step:l,doCallback:i,doTransition:o},t._nextMethodRaf=window.requestAnimationFrame(function(){var n=t._nextMethod.step;n.method&&(n.execute&&a.executeAPICommand(e,n.method,n.args),t._nextMethod=null,t._nextMethodRaf=null)})))}function k(e,t,n){var a=n.node(),o=r.select(t);function s(){return n.data()[0]}e.on("mousedown",function(){var e=s();t.emit("plotly_sliderstart",{slider:e});var l=n.select("."+u.gripRectClass);r.event.stopPropagation(),r.event.preventDefault(),l.call(i.fill,e.activebgcolor);var c=S(e,r.mouse(a)[0]);_(t,n,e,c,!0),e._dragging=!0,o.on("mousemove",function(){var e=s(),i=S(e,r.mouse(a)[0]);_(t,n,e,i,!1)}),o.on("mouseup",function(){var e=s();e._dragging=!1,l.call(i.fill,e.bgcolor),o.on("mouseup",null),o.on("mousemove",null),t.emit("plotly_sliderend",{slider:e,step:e.steps[e.active]})})})}function M(e,t){var n=e.selectAll("rect."+u.tickRectClass).data(t.steps),a=t._dims;n.enter().append("rect").classed(u.tickRectClass,!0),n.exit().remove(),n.attr({width:t.tickwidth+"px","shape-rendering":"crispEdges"}),n.each(function(e,n){var s=n%a.labelStride==0,l=r.select(this);l.attr({height:s?t.ticklen:t.minorticklen}).call(i.fill,t.tickcolor),o.setTranslate(l,A(t,n/(t.steps.length-1))-.5*t.tickwidth,(s?u.tickOffset:u.minorTickOffset)+a.currentValueTotalHeight)})}function T(e,t,n,r){var a=e.select("rect."+u.gripRectClass),i=A(t,n);if(!t._invokingCommand){var o=a;r&&t.transition.duration>0&&(o=o.transition().duration(t.transition.duration).ease(t.transition.easing)),o.attr("transform","translate("+(i-.5*u.gripWidth)+","+t._dims.currentValueTotalHeight+")")}}function A(e,t){var n=e._dims;return n.inputAreaStart+u.stepInset+(n.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,t))}function S(e,t){var n=e._dims;return Math.min(1,Math.max(0,(t-u.stepInset-n.inputAreaStart)/(n.inputAreaLength-2*u.stepInset-2*n.inputAreaStart)))}function L(e,t,n){var r=n._dims,a=s.ensureSingle(e,"rect",u.railTouchRectClass,function(r){r.call(k,t,e,n).style("pointer-events","all")});a.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,u.tickOffset+n.ticklen+r.labelHeight)}).call(i.fill,n.bgcolor).attr("opacity",0),o.setTranslate(a,0,r.currentValueTotalHeight)}function C(e,t){var n=t._dims,r=n.inputAreaLength-2*u.railInset,a=s.ensureSingle(e,"rect",u.railRectClass);a.attr({width:r,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,u.railInset,.5*(n.inputAreaWidth-u.railWidth)+n.currentValueTotalHeight)}t.exports=function(e){var t=e._fullLayout,n=function(e,t){for(var n=e[u.name],r=[],a=0;a<n.length;a++){var i=n[a];i.visible&&i.steps.length&&(i._gd=t,r.push(i))}return r}(t,e),i=t._infolayer.selectAll("g."+u.containerClassName).data(n.length>0?[0]:[]);if(i.enter().append("g").classed(u.containerClassName,!0).style("cursor","ew-resize"),i.exit().remove(),i.exit().size()&&function(e){for(var t=e._fullLayout._pushmargin||{},n=Object.keys(t),r=0;r<n.length;r++){var i=n[r];-1!==i.indexOf(u.autoMarginIdRoot)&&a.autoMargin(e,i)}}(e),0!==n.length){var s=i.selectAll("g."+u.groupClassName).data(n,g);s.enter().append("g").classed(u.groupClassName,!0),s.exit().each(function(t){r.select(this).remove(),t._commandObserver.remove(),delete t._commandObserver,a.autoMargin(e,u.autoMarginIdRoot+t._index)});for(var l=0;l<n.length;l++){var c=n[l];y(e,c)}s.each(function(t){if(!(t.steps.length<2)){var n=r.select(this);!function(e){var t=e._dims;t.labelSteps=[];for(var n=e.steps.length,r=0;r<n;r+=t.labelStride)t.labelSteps.push({fraction:r/(n-1),step:e.steps[r]})}(t),a.manageCommandObserver(e,t,t.steps,function(t){var r=n.data()[0];r.active!==t.index&&(r._dragging||w(e,n,r,t.index,!1,!0))}),function(e,t,n){n.active>=n.steps.length&&(n.active=0);t.call(m,n).call(C,n).call(b,n).call(M,n).call(L,e,n).call(v,e,n);var r=n._dims;o.setTranslate(t,r.lx+n.pad.l,r.ly+n.pad.t),t.call(T,n,n.active/(n.steps.length-1),!1),t.call(m,n)}(e,r.select(this),t)}})}}},{"../../constants/alignment":132,"../../lib":152,"../../lib/svg_text_utils":173,"../../plots/plots":226,"../color":32,"../drawing":57,"../legend/anchor_utils":84,"./constants":121,d3:3}],124:[function(e,t,n){"use strict";var r=e("./constants");t.exports={moduleType:"component",name:r.name,layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),draw:e("./draw")}},{"./attributes":120,"./constants":121,"./defaults":122,"./draw":123}],125:[function(e,t,n){"use strict";var r=e("d3"),a=e("fast-isnumeric"),i=e("../../plots/plots"),o=e("../../registry"),s=e("../../lib"),l=e("../drawing"),c=e("../color"),u=e("../../lib/svg_text_utils"),d=e("../../constants/interactions");t.exports={draw:function(e,t,n){var h,p=n.propContainer,g=n.propName,y=n.placeholder,m=n.traceIndex,v=n.avoid||{},x=n.attributes,b=n.transform,_=n.containerGroup,w=e._fullLayout,k=p.titlefont||{},M=k.family,T=k.size,A=k.color,S=1,L=!1,C=(p.title||"").trim();"title"===g?h="titleText":-1!==g.indexOf("axis")?h="axisTitleText":g.indexOf(!0)&&(h="colorbarTitleText");var z=e._context.edits[h];""===C?S=0:C.replace(f," % ")===y.replace(f," % ")&&(S=.2,L=!0,z||(C=""));var O=C||z;_||(_=s.ensureSingle(w._infolayer,"g","g-"+t));var D=_.selectAll("text").data(O?[0]:[]);if(D.enter().append("text"),D.text(C).attr("class",t),D.exit().remove(),!O)return _;function P(e){s.syncOrAsync([I,j],e)}function I(t){var n;return b?(n="",b.rotate&&(n+="rotate("+[b.rotate,x.x,x.y]+")"),b.offset&&(n+="translate(0, "+b.offset+")")):n=null,t.attr("transform",n),t.style({"font-family":M,"font-size":r.round(T,2)+"px",fill:c.rgb(A),opacity:S*c.opacity(A),"font-weight":i.fontWeight}).attr(x).call(u.convertToTspans,e),i.previousPromises(e)}function j(e){var t=r.select(e.node().parentNode);if(v&&v.selection&&v.side&&C){t.attr("transform",null);var n=0,i={left:"right",right:"left",top:"bottom",bottom:"top"}[v.side],o=-1!==["left","top"].indexOf(v.side)?-1:1,c=a(v.pad)?v.pad:2,u=l.bBox(t.node()),d={left:0,top:0,right:w.width,bottom:w.height},f=v.maxShift||(d[v.side]-u[v.side])*("left"===v.side||"top"===v.side?-1:1);if(f<0)n=f;else{var h=v.offsetLeft||0,p=v.offsetTop||0;u.left-=h,u.right-=h,u.top-=p,u.bottom-=p,v.selection.each(function(){var e=l.bBox(this);s.bBoxIntersect(u,e,c)&&(n=Math.max(n,o*(e[v.side]-u[i])+c))}),n=Math.min(f,n)}if(n>0||f<0){var g={left:[-n,0],right:[n,0],top:[0,-n],bottom:[0,n]}[v.side];t.attr("transform","translate("+g+")")}}}D.call(P),z&&(C?D.on(".opacity",null):(S=0,L=!0,D.text(y).on("mouseover.opacity",function(){r.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)})),D.call(u.makeEditable,{gd:e}).on("edit",function(t){void 0!==m?o.call("restyle",e,g,t,m):o.call("relayout",e,g,t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(P)}).on("input",function(e){this.text(e||" ").call(u.positionText,x.x,x.y)}));return D.classed("js-placeholder",L),_}};var f=/ [XY][0-9]* /},{"../../constants/interactions":133,"../../lib":152,"../../lib/svg_text_utils":173,"../../plots/plots":226,"../../registry":241,"../color":32,"../drawing":57,d3:3,"fast-isnumeric":5}],126:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),a=e("../color/attributes"),i=e("../../lib/extend").extendFlat,o=e("../../plot_api/edit_types").overrideAll,s=e("../../plots/pad_attributes"),l={_isLinkedToArray:"button",method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",role:"info",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",role:"info",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},label:{valType:"string",role:"info",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",role:"info",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}};t.exports=o({_isLinkedToArray:"updatemenu",_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",role:"info",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",role:"info",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",role:"info",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",role:"info",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",role:"info",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:l,x:{valType:"number",min:-2,max:3,dflt:-.05,role:"style",description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",role:"info",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,role:"style",description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",role:"info",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:i({},s,{description:"Sets the padding around the buttons or dropdown menu."}),font:r({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",role:"style",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:a.borderLine,role:"style",description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,role:"style",editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}},"arraydraw","from-root")},{"../../lib/extend":146,"../../plot_api/edit_types":179,"../../plots/font_attributes":220,"../../plots/pad_attributes":225,"../color/attributes":31}],127:[function(e,t,n){"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},{}],128:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../plots/array_container_defaults"),i=e("./attributes"),o=e("./constants").name,s=i.buttons;function l(e,t,n){function a(n,a){return r.coerce(e,t,i,n,a)}a("visible",function(e,t){var n,a,i=e.buttons||[],o=t.buttons=[];function l(e,t){return r.coerce(n,a,s,e,t)}for(var c=0;c<i.length;c++)n=i[c],a={},l("method"),r.isPlainObject(n)&&("skip"===a.method||Array.isArray(n.args))&&(l("args"),l("label"),l("execute"),a._index=c,o.push(a));return o}(e,t).length>0)&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),r.noneOrAll(e,t,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),r.coerceFont(a,"font",n.font),a("bgcolor",n.paper_bgcolor),a("bordercolor"),a("borderwidth"))}t.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:l})}},{"../../lib":152,"../../plots/array_container_defaults":190,"./attributes":126,"./constants":127}],129:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../plots/plots"),i=e("../color"),o=e("../drawing"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),c=e("../legend/anchor_utils"),u=e("../../constants/alignment").LINE_SPACING,d=e("./constants"),f=e("./scrollbox");function h(e){return e._index}function p(e,t){return+e.attr(d.menuIndexAttrName)===t._index}function g(e,t,n,r,a,i,o,s){t._input.active=t.active=o,"buttons"===t.type?m(e,r,null,null,t):"dropdown"===t.type&&(a.attr(d.menuIndexAttrName,"-1"),y(e,r,a,i,t),s||m(e,r,a,i,t))}function y(e,t,n,r,a){var i=s.ensureSingle(t,"g",d.headerClassName,function(e){e.style("pointer-events","all")}),l=a._dims,c=a.active,u=a.buttons[c]||d.blankHeaderOpts,f={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},h={width:l.headerWidth,height:l.headerHeight};i.call(v,a,u,e).call(T,a,f,h),s.ensureSingle(t,"text",d.headerArrowClassName,function(e){e.classed("user-select-none",!0).attr("text-anchor","end").call(o.font,a.font).text(d.arrowSymbol[a.direction])}).attr({x:l.headerWidth-d.arrowOffsetX+a.pad.l,y:l.headerHeight/2+d.textOffsetY+a.pad.t}),i.on("click",function(){n.call(A),n.attr(d.menuIndexAttrName,p(n,a)?-1:String(a._index)),m(e,t,n,r,a)}),i.on("mouseover",function(){i.call(w)}),i.on("mouseout",function(){i.call(k,a)}),o.setTranslate(t,l.lx,l.ly)}function m(e,t,n,i,o){n||(n=t).attr("pointer-events","all");var s=function(e){return-1==+e.attr(d.menuIndexAttrName)}(n)&&"buttons"!==o.type?[]:o.buttons,l="dropdown"===o.type?d.dropdownButtonClassName:d.buttonClassName,c=n.selectAll("g."+l).data(s),u=c.enter().append("g").classed(l,!0),f=c.exit();"dropdown"===o.type?(u.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var h=0,p=0,y=o._dims,m=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(m?p=y.headerHeight+d.gapButtonHeader:h=y.headerWidth+d.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(p=-d.gapButtonHeader+d.gapButton-y.openHeight),"dropdown"===o.type&&"left"===o.direction&&(h=-d.gapButtonHeader+d.gapButton-y.openWidth);var x={x:y.lx+h+o.pad.l,y:y.ly+p+o.pad.t,yPad:d.gapButton,xPad:d.gapButton,index:0},b={l:x.x+o.borderwidth,t:x.y+o.borderwidth};c.each(function(s,l){var u=r.select(this);u.call(v,o,s,e).call(T,o,x),u.on("click",function(){r.event.defaultPrevented||(g(e,o,0,t,n,i,l),s.execute&&a.executeAPICommand(e,s.method,s.args),e.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))}),u.on("mouseover",function(){u.call(w)}),u.on("mouseout",function(){u.call(k,o),c.call(_,o)})}),c.call(_,o),m?(b.w=Math.max(y.openWidth,y.headerWidth),b.h=x.y-b.t):(b.w=x.x-b.l,b.h=Math.max(y.openHeight,y.headerHeight)),b.direction=o.direction,i&&(c.size()?function(e,t,n,r,a,i){var o,s,l,c=a.direction,u="up"===c||"down"===c,f=a._dims,h=a.active;if(u)for(s=0,l=0;l<h;l++)s+=f.heights[l]+d.gapButton;else for(o=0,l=0;l<h;l++)o+=f.widths[l]+d.gapButton;r.enable(i,o,s),r.hbar&&r.hbar.attr("opacity","0").transition().attr("opacity","1");r.vbar&&r.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,i,o,b):function(e){var t=!!e.hbar,n=!!e.vbar;t&&e.hbar.transition().attr("opacity","0").each("end",function(){t=!1,n||e.disable()});n&&e.vbar.transition().attr("opacity","0").each("end",function(){n=!1,t||e.disable()})}(i))}function v(e,t,n,r){e.call(x,t).call(b,t,n,r)}function x(e,t){s.ensureSingle(e,"rect",d.itemRectClassName,function(e){e.attr({rx:d.rx,ry:d.ry,"shape-rendering":"crispEdges"})}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px")}function b(e,t,n,r){s.ensureSingle(e,"text",d.itemTextClassName,function(e){e.classed("user-select-none",!0).attr({"text-anchor":"start","data-notex":1})}).call(o.font,t.font).text(n.label).call(l.convertToTspans,r)}function _(e,t){var n=t.active;e.each(function(e,a){var o=r.select(this);a===n&&t.showactive&&o.select("rect."+d.itemRectClassName).call(i.fill,d.activeColor)})}function w(e){e.select("rect."+d.itemRectClassName).call(i.fill,d.hoverColor)}function k(e,t){e.select("rect."+d.itemRectClassName).call(i.fill,t.bgcolor)}function M(e,t){var n=t._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},i=o.tester.selectAll("g."+d.dropdownButtonClassName).data(t.buttons);i.enter().append("g").classed(d.dropdownButtonClassName,!0);var s=-1!==["up","down"].indexOf(t.direction);i.each(function(a,i){var c=r.select(this);c.call(v,t,a,e);var f=c.select("."+d.itemTextClassName),h=f.node()&&o.bBox(f.node()).width,p=Math.max(h+d.textPadX,d.minWidth),g=t.font.size*u,y=l.lineCount(f),m=Math.max(g*y,d.minHeight)+d.textOffsetY;m=Math.ceil(m),p=Math.ceil(p),n.widths[i]=p,n.heights[i]=m,n.height1=Math.max(n.height1,m),n.width1=Math.max(n.width1,p),s?(n.totalWidth=Math.max(n.totalWidth,p),n.openWidth=n.totalWidth,n.totalHeight+=m+d.gapButton,n.openHeight+=m+d.gapButton):(n.totalWidth+=p+d.gapButton,n.openWidth+=p+d.gapButton,n.totalHeight=Math.max(n.totalHeight,m),n.openHeight=n.totalHeight)}),s?n.totalHeight-=d.gapButton:n.totalWidth-=d.gapButton,n.headerWidth=n.width1+d.arrowPadX,n.headerHeight=n.height1,"dropdown"===t.type&&(s?(n.width1+=d.arrowPadX,n.totalHeight=n.height1):n.totalWidth=n.width1,n.totalWidth+=d.arrowPadX),i.remove();var f=n.totalWidth+t.pad.l+t.pad.r,h=n.totalHeight+t.pad.t+t.pad.b,p=e._fullLayout._size;n.lx=p.l+p.w*t.x,n.ly=p.t+p.h*(1-t.y);var g="left";c.isRightAnchor(t)&&(n.lx-=f,g="right"),c.isCenterAnchor(t)&&(n.lx-=f/2,g="center");var y="top";c.isBottomAnchor(t)&&(n.ly-=h,y="bottom"),c.isMiddleAnchor(t)&&(n.ly-=h/2,y="middle"),n.totalWidth=Math.ceil(n.totalWidth),n.totalHeight=Math.ceil(n.totalHeight),n.lx=Math.round(n.lx),n.ly=Math.round(n.ly),a.autoMargin(e,d.autoMarginIdRoot+t._index,{x:t.x,y:t.y,l:f*({right:1,center:.5}[g]||0),r:f*({left:1,center:.5}[g]||0),b:h*({top:1,middle:.5}[y]||0),t:h*({bottom:1,middle:.5}[y]||0)})}function T(e,t,n,r){r=r||{};var a=e.select("."+d.itemRectClassName),i=e.select("."+d.itemTextClassName),s=t.borderwidth,c=n.index,f=t._dims;o.setTranslate(e,s+n.x,s+n.y);var h=-1!==["up","down"].indexOf(t.direction),p=r.height||(h?f.heights[c]:f.height1);a.attr({x:0,y:0,width:r.width||(h?f.width1:f.widths[c]),height:p});var g=t.font.size*u,y=(l.lineCount(i)-1)*g/2;l.positionText(i,d.textOffsetX,p/2-y+d.textOffsetY),h?n.y+=f.heights[c]+n.yPad:n.x+=f.widths[c]+n.xPad,n.index++}function A(e){e.selectAll("g."+d.dropdownButtonClassName).remove()}t.exports=function(e){var t=e._fullLayout,n=function(e){for(var t=e[d.name],n=[],r=0;r<t.length;r++){var a=t[r];a.visible&&n.push(a)}return n}(t),i=t._menulayer.selectAll("g."+d.containerClassName).data(n.length>0?[0]:[]);if(i.enter().append("g").classed(d.containerClassName,!0).style("cursor","pointer"),i.exit().remove(),i.exit().size()&&function(e){for(var t=e._fullLayout._pushmargin||{},n=Object.keys(t),r=0;r<n.length;r++){var i=n[r];-1!==i.indexOf(d.autoMarginIdRoot)&&a.autoMargin(e,i)}}(e),0!==n.length){var o=i.selectAll("g."+d.headerGroupClassName).data(n,h);o.enter().append("g").classed(d.headerGroupClassName,!0);for(var l=s.ensureSingle(i,"g",d.dropdownButtonGroupClassName,function(e){e.style("pointer-events","all")}),c=0;c<n.length;c++){var u=n[c];M(e,u)}var v="updatemenus"+t._uid,x=new f(e,l,v);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(A).attr(d.menuIndexAttrName,"-1")),o.exit().each(function(t){r.select(this).remove(),l.call(A).attr(d.menuIndexAttrName,"-1"),a.autoMargin(e,d.autoMarginIdRoot+t._index)}),o.each(function(t){var n=r.select(this),i="dropdown"===t.type?l:null;a.manageCommandObserver(e,t,t.buttons,function(r){g(e,t,t.buttons[r.index],n,i,x,r.index,!0)}),"dropdown"===t.type?(y(e,n,l,x,t),p(l,t)&&m(e,n,l,x,t)):m(e,n,null,null,t)})}}},{"../../constants/alignment":132,"../../lib":152,"../../lib/svg_text_utils":173,"../../plots/plots":226,"../color":32,"../drawing":57,"../legend/anchor_utils":84,"./constants":127,"./scrollbox":131,d3:3}],130:[function(e,t,n){arguments[4][124][0].apply(n,arguments)},{"./attributes":126,"./constants":127,"./defaults":128,"./draw":129,dup:124}],131:[function(e,t,n){"use strict";t.exports=s;var r=e("d3"),a=e("../color"),i=e("../drawing"),o=e("../../lib");function s(e,t,n){this.gd=e,this.container=t,this.id=n,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(e,t,n){var o=this.gd._fullLayout,l=o.width,c=o.height;this.position=e;var u,d,f,h,p=this.position.l,g=this.position.w,y=this.position.t,m=this.position.h,v=this.position.direction,x="down"===v,b="left"===v,_="up"===v,w=g,k=m;x||b||"right"===v||_||(this.position.direction="down",x=!0),x||_?(d=(u=p)+w,x?(f=y,k=(h=Math.min(f+k,c))-f):k=(h=y+k)-(f=Math.max(h-k,0))):(h=(f=y)+k,b?w=(d=p+w)-(u=Math.max(d-w,0)):(u=p,w=(d=Math.min(u+w,l))-u)),this._box={l:u,t:f,w:w,h:k};var M=g>w,T=s.barLength+2*s.barPad,A=s.barWidth+2*s.barPad,S=p,L=y+m;L+A>c&&(L=c-A);var C=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,s.barColor),M?(this.hbar=C.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:L,width:T,height:A}),this._hbarXMin=S+T/2,this._hbarTranslateMax=w-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var z=m>k,O=s.barWidth+2*s.barPad,D=s.barLength+2*s.barPad,P=p+g,I=y;P+O>l&&(P=l-O);var j=this.container.selectAll("rect.scrollbar-vertical").data(z?[0]:[]);j.exit().on(".drag",null).remove(),j.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,s.barColor),z?(this.vbar=j.attr({rx:s.barRadius,ry:s.barRadius,x:P,y:I,width:O,height:D}),this._vbarYMin=I+D/2,this._vbarTranslateMax=k-D):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var E=this.id,N=u-.5,R=z?d+O+.5:d+.5,F=f-.5,B=M?h+A+.5:h+.5,H=o._topdefs.selectAll("#"+E).data(M||z?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",E).append("rect"),M||z?(this._clipRect=H.select("rect").attr({x:Math.floor(N),y:Math.floor(F),width:Math.ceil(R)-Math.floor(N),height:Math.ceil(B)-Math.floor(F)}),this.container.call(i.setClipUrl,E),this.bg.attr({x:p,y:y,width:g,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||z){var q=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(q);var V=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(V),z&&this.vbar.on(".drag",null).call(V)}this.setTranslate(t,n)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},s.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},s.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var n=e+this._hbarXMin,a=n+this._hbarTranslateMax;e=(o.constrain(r.event.x,n,a)-n)/(a-n)*(this.position.w-this._box.w)}if(this.vbar){var i=t+this._vbarYMin,s=i+this._vbarTranslateMax;t=(o.constrain(r.event.y,i,s)-i)/(s-i)*(this.position.h-this._box.h)}this.setTranslate(e,t)},s.prototype.setTranslate=function(e,t){var n=this.position.w-this._box.w,r=this.position.h-this._box.h;if(e=o.constrain(e||0,0,n),t=o.constrain(t||0,0,r),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var a=e/n;this.hbar.call(i.setTranslate,e+a*this._hbarTranslateMax,t)}if(this.vbar){var s=t/r;this.vbar.call(i.setTranslate,e,t+s*this._vbarTranslateMax)}}},{"../../lib":152,"../color":32,"../drawing":57,d3:3}],132:[function(e,t,n){"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},{}],133:[function(e,t,n){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300,DESELECTDIM:.2}},{}],134:[function(e,t,n){"use strict";t.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,MINUS_SIGN:"−"}},{}],135:[function(e,t,n){"use strict";t.exports={entityToUnicode:{mu:"μ","#956":"μ",amp:"&","#28":"&",lt:"<","#60":"<",gt:">","#62":">",nbsp:" ","#160":" ",times:"×","#215":"×",plusmn:"±","#177":"±",deg:"°","#176":"°"}}},{}],136:[function(e,t,n){"use strict";n.xmlns="http://www.w3.org/2000/xmlns/",n.svg="http://www.w3.org/2000/svg",n.xlink="http://www.w3.org/1999/xlink",n.svgAttrs={xmlns:n.svg,"xmlns:xlink":n.xlink}},{}],137:[function(e,t,n){"use strict";n.version="1.37.1",e("es6-promise").polyfill(),e("../build/plotcss"),e("./fonts/mathjax_config");for(var r=e("./registry"),a=n.register=r.register,i=e("./plot_api"),o=Object.keys(i),s=0;s<o.length;s++){var l=o[s];n[l]=i[l],a({moduleType:"apiMethod",name:l,fn:i[l]})}a(e("./traces/scatter")),a([e("./components/fx"),e("./components/legend"),e("./components/annotations"),e("./components/annotations3d"),e("./components/shapes"),e("./components/images"),e("./components/updatemenus"),e("./components/sliders"),e("./components/rangeslider"),e("./components/rangeselector"),e("./components/grid"),e("./components/errorbars")]),a([e("./locale-en"),e("./locale-en-us")]),n.Icons=e("../build/ploticon"),n.Plots=e("./plots/plots"),n.Fx=e("./components/fx"),n.Snapshot=e("./snapshot"),n.PlotSchema=e("./plot_api/plot_schema"),n.Queue=e("./lib/queue"),n.d3=e("d3")},{"../build/plotcss":11,"../build/ploticon":12,"./components/annotations":25,"./components/annotations3d":30,"./components/errorbars":63,"./components/fx":74,"./components/grid":78,"./components/images":83,"./components/legend":92,"./components/rangeselector":104,"./components/rangeslider":110,"./components/shapes":118,"./components/sliders":124,"./components/updatemenus":130,"./fonts/mathjax_config":138,"./lib/queue":166,"./locale-en":177,"./locale-en-us":176,"./plot_api":181,"./plot_api/plot_schema":185,"./plots/plots":226,"./registry":241,"./snapshot":246,"./traces/scatter":265,d3:3,"es6-promise":4}],138:[function(e,t,n){"use strict";"undefined"!=typeof MathJax?(n.MathJax=!0,MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured()):n.MathJax=!1},{}],139:[function(e,t,n){"use strict";var r=Math.PI;n.deg2rad=function(e){return e/180*r},n.rad2deg=function(e){return e/r*180},n.wrap360=function(e){var t=e%360;return t<0?t+360:t},n.wrap180=function(e){return Math.abs(e)>180&&(e-=360*Math.round(e/360)),e}},{}],140:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../constants/numerical").BADNUM,i=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(e){return"string"==typeof e&&(e=e.replace(i,"")),r(e)?Number(e):a}},{"../constants/numerical":134,"fast-isnumeric":5}],141:[function(e,t,n){"use strict";t.exports=function(e){var t=e._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(e){e.regl&&e.regl.clear({color:!0,depth:!0})})}},{}],142:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("tinycolor2"),i=e("../plots/attributes"),o=e("../components/colorscale/get_scale"),s=Object.keys(e("../components/colorscale/scales")),l=e("./nested_property"),c=e("./regex").counter,u=e("../constants/interactions").DESELECTDIM,d=e("./angles").wrap180,f=e("./is_array").isArrayOrTypedArray;n.valObjectMeta={data_array:{description:["An {array} of data.","The value MUST be an {array}, or we ignore it.","Note that typed arrays (e.g. Float32Array) are supported."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,n){f(e)?t.set(e):void 0!==n&&t.set(n)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(e,t,n,r){r.coerceNumber&&(e=+e),-1===r.values.indexOf(e)?t.set(n):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var n=t.values,r=0;r<n.length;r++){var a=String(n[r]);if("/"===a.charAt(0)&&"/"===a.charAt(a.length-1)){if(new RegExp(a.substr(1,a.length-2)).test(e))return!0}else if(e===n[r])return!0}return!1}},boolean:{description:"A boolean (true/false) value.",requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,n){!0===e||!1===e?t.set(e):t.set(n)}},number:{description:["A number or a numeric value","(e.g. a number inside a string).","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(e,t,n,a){!r(e)||void 0!==a.min&&e<a.min||void 0!==a.max&&e>a.max?t.set(n):t.set(+e)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(e,t,n,a){e%1||!r(e)||void 0!==a.min&&e<a.min||void 0!==a.max&&e>a.max?t.set(n):t.set(+e)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(e,t,n,r){if("string"!=typeof e){var a="number"==typeof e;!0!==r.strict&&a?t.set(String(e)):t.set(n)}else r.noBlank&&!e?t.set(n):t.set(e)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(e,t,n){a(e).isValid()?t.set(e):t.set(n)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,n){Array.isArray(e)&&e.length&&e.every(function(e){return a(e).isValid()})?t.set(e):t.set(n)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",s.join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,n){t.set(o(e,n))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,n){"auto"===e?t.set("auto"):r(e)?t.set(d(+e)):t.set(n)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(e,t,n,r){var a=r.regex||c(n);"string"==typeof e&&a.test(e)?t.set(e):t.set(n)},validateFunction:function(e,t){var n=t.dflt;return e===n||"string"==typeof e&&!!c(n).test(e)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(e,t,n,r){if("string"==typeof e)if(-1===(r.extras||[]).indexOf(e)){for(var a=e.split("+"),i=0;i<a.length;){var o=a[i];-1===r.flags.indexOf(o)||a.indexOf(o)<i?a.splice(i,1):i++}a.length?t.set(a.join("+")):t.set(n)}else t.set(e);else t.set(n)}},any:{description:"Any type.",requiredOpts:[],otherOpts:["dflt","values","arrayOk"],coerceFunction:function(e,t,n){void 0===e?t.set(n):t.set(e)}},info_array:{description:["An {array} of plot information."].join(" "),requiredOpts:["items"],otherOpts:["dflt","freeLength","dimensions"],coerceFunction:function(e,t,r,a){function i(e,t,r){var a,i={set:function(e){a=e}};return void 0===r&&(r=t.dflt),n.valObjectMeta[t.valType].coerceFunction(e,i,r,t),a}var o=2===a.dimensions||"1-2"===a.dimensions&&Array.isArray(e)&&Array.isArray(e[0]);if(Array.isArray(e)){var s,l,c,u,d,f,h=a.items,p=[],g=Array.isArray(h),y=g&&o&&Array.isArray(h[0]),m=o&&g&&!y,v=g&&!m?h.length:e.length;if(r=Array.isArray(r)?r:[],o)for(s=0;s<v;s++)for(p[s]=[],c=Array.isArray(e[s])?e[s]:[],d=m?h.length:g?h[s].length:c.length,l=0;l<d;l++)u=m?h[l]:g?h[s][l]:h,void 0!==(f=i(c[l],u,(r[s]||[])[l]))&&(p[s][l]=f);else for(s=0;s<v;s++)void 0!==(f=i(e[s],g?h[s]:h,r[s]))&&(p[s]=f);t.set(p)}else t.set(r)},validateFunction:function(e,t){if(!Array.isArray(e))return!1;var r=t.items,a=Array.isArray(r),i=2===t.dimensions;if(!t.freeLength&&e.length!==r.length)return!1;for(var o=0;o<e.length;o++)if(i){if(!Array.isArray(e[o])||!t.freeLength&&e[o].length!==r[o].length)return!1;for(var s=0;s<e[o].length;s++)if(!n.validate(e[o][s],a?r[o][s]:r))return!1}else if(!n.validate(e[o],a?r[o]:r))return!1;return!0}}},n.coerce=function(e,t,r,a,i){var o=l(r,a).get(),s=l(e,a),c=l(t,a),u=s.get();return void 0===i&&(i=o.dflt),o.arrayOk&&f(u)?(c.set(u),u):(n.valObjectMeta[o.valType].coerceFunction(u,c,i,o),c.get())},n.coerce2=function(e,t,r,a,i){var o=l(e,a),s=n.coerce(e,t,r,a,i),c=o.get();return void 0!==c&&null!==c&&s},n.coerceFont=function(e,t,n){var r={};return n=n||{},r.family=e(t+".family",n.family),r.size=e(t+".size",n.size),r.color=e(t+".color",n.color),r},n.coerceHoverinfo=function(e,t,r){var a,o=t._module.attributes,s=o.hoverinfo?o:i,l=s.hoverinfo;if(1===r._dataLength){var c="all"===l.dflt?l.flags.slice():l.dflt.split("+");c.splice(c.indexOf("name"),1),a=c.join("+")}return n.coerce(e,t,s,"hoverinfo",a)},n.coerceSelectionMarkerOpacity=function(e,t){if(e.marker){var n,r,a=e.marker.opacity;if(void 0!==a)f(a)||e.selected||e.unselected||(n=a,r=u*a),t("selected.marker.opacity",n),t("unselected.marker.opacity",r)}},n.validate=function(e,t){var r=n.valObjectMeta[t.valType];if(t.arrayOk&&f(e))return!0;if(r.validateFunction)return r.validateFunction(e,t);var a={},i=a,o={set:function(e){i=e}};return r.coerceFunction(e,o,a,t),i!==a}},{"../components/colorscale/get_scale":45,"../components/colorscale/scales":51,"../constants/interactions":133,"../plots/attributes":191,"./angles":139,"./is_array":153,"./nested_property":160,"./regex":167,"fast-isnumeric":5,tinycolor2:293}],143:[function(e,t,n){"use strict";var r,a,i=e("d3"),o=e("fast-isnumeric"),s=e("./loggers"),l=e("./mod"),c=e("../constants/numerical"),u=c.BADNUM,d=c.ONEDAY,f=c.ONEHOUR,h=c.ONEMIN,p=c.ONESEC,g=c.EPOCHJD,y=e("../registry"),m=i.time.format.utc,v=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m,b=(new Date).getFullYear()-70;function _(e){return e&&y.componentsRegistry.calendars&&"string"==typeof e&&"gregorian"!==e}function w(e,t){return String(e+Math.pow(10,t)).substr(1)}n.dateTick0=function(e,t){return _(e)?t?y.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:y.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"},n.dfltRange=function(e){return _(e)?y.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]},n.isJSDate=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime},n.dateTime2ms=function(e,t){if(n.isJSDate(e))return(e=Number(e)-e.getTimezoneOffset()*h)>=r&&e<=a?e:u;if("string"!=typeof e&&"number"!=typeof e)return u;e=String(e);var i=_(t),o=e.charAt(0);!i||"G"!==o&&"g"!==o||(e=e.substr(1),t="");var s=i&&"chinese"===t.substr(0,7),l=e.match(s?x:v);if(!l)return u;var c=l[1],m=l[3]||"1",w=Number(l[5]||1),k=Number(l[7]||0),M=Number(l[9]||0),T=Number(l[11]||0);if(i){if(2===c.length)return u;var A;c=Number(c);try{var S=y.getComponentMethod("calendars","getCal")(t);if(s){var L="i"===m.charAt(m.length-1);m=parseInt(m,10),A=S.newDate(c,S.toMonthIndex(c,m,L),w)}else A=S.newDate(c,Number(m),w)}catch(e){return u}return A?(A.toJD()-g)*d+k*f+M*h+T*p:u}c=2===c.length?(Number(c)+2e3-b)%100+b:Number(c),m-=1;var C=new Date(Date.UTC(2e3,m,w,k,M));return C.setUTCFullYear(c),C.getUTCMonth()!==m?u:C.getUTCDate()!==w?u:C.getTime()+T*p},r=n.MIN_MS=n.dateTime2ms("-9999"),a=n.MAX_MS=n.dateTime2ms("9999-12-31 23:59:59.9999"),n.isDateTime=function(e,t){return n.dateTime2ms(e,t)!==u};var k=90*d,M=3*f,T=5*h;function A(e,t,n,r,a){if((t||n||r||a)&&(e+=" "+w(t,2)+":"+w(n,2),(r||a)&&(e+=":"+w(r,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;e+="."+w(a,i)}return e}n.ms2DateTime=function(e,t,n){if("number"!=typeof e||!(e>=r&&e<=a))return u;t||(t=0);var i,o,s,c,v,x,b=Math.floor(10*l(e+.05,1)),w=Math.round(e-b/10);if(_(n)){var S=Math.floor(w/d)+g,L=Math.floor(l(e,d));try{i=y.getComponentMethod("calendars","getCal")(n).fromJD(S).formatDate("yyyy-mm-dd")}catch(e){i=m("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=t<k?Math.floor(L/f):0,s=t<k?Math.floor(L%f/h):0,c=t<M?Math.floor(L%h/p):0,v=t<T?L%p*10+b:0}else x=new Date(w),i=m("%Y-%m-%d")(x),o=t<k?x.getUTCHours():0,s=t<k?x.getUTCMinutes():0,c=t<M?x.getUTCSeconds():0,v=t<T?10*x.getUTCMilliseconds()+b:0;return A(i,o,s,c,v)},n.ms2DateTimeLocal=function(e){if(!(e>=r+d&&e<=a-d))return u;var t=Math.floor(10*l(e+.05,1)),n=new Date(Math.round(e-t/10));return A(i.time.format("%Y-%m-%d")(n),n.getHours(),n.getMinutes(),n.getSeconds(),10*n.getUTCMilliseconds()+t)},n.cleanDate=function(e,t,r){if(n.isJSDate(e)||"number"==typeof e){if(_(r))return s.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(!(e=n.ms2DateTimeLocal(+e))&&void 0!==t)return t}else if(!n.isDateTime(e,r))return s.error("unrecognized date",e),t;return e};var S=/%\d?f/g;function L(e,t,n,r){e=e.replace(S,function(e){var n=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(n).substr(2).replace(/0+$/,"")||"0"});var a=new Date(Math.floor(t+.05));if(_(r))try{e=y.getComponentMethod("calendars","worldCalFmt")(e,t,r)}catch(e){return"Invalid"}return n(e)(a)}var C=[59,59.9,59.99,59.999,59.9999];n.formatDate=function(e,t,n,r,a,i){if(a=_(a)&&a,!t)if("y"===n)t=i.year;else if("m"===n)t=i.month;else{if("d"!==n)return function(e,t){var n=l(e+.05,d),r=w(Math.floor(n/f),2)+":"+w(l(Math.floor(n/h),60),2);if("M"!==t){o(t)||(t=0);var a=(100+Math.min(l(e/p,60),C[t])).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),r+=":"+a}return r}(e,n)+"\n"+L(i.dayMonthYear,e,r,a);t=i.dayMonth+"\n"+i.year}return L(t,e,r,a)};var z=3*d;n.incrementMonth=function(e,t,n){n=_(n)&&n;var r=l(e,d);if(e=Math.round(e-r),n)try{var a=Math.round(e/d)+g,i=y.getComponentMethod("calendars","getCal")(n),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-g)*d+r}catch(t){s.error("invalid ms "+e+" in calendar "+n)}var c=new Date(e+z);return c.setUTCMonth(c.getUTCMonth()+t)+r-z},n.findExactDates=function(e,t){for(var n,r,a=0,i=0,s=0,l=0,c=_(t)&&y.getComponentMethod("calendars","getCal")(t),u=0;u<e.length;u++)if(r=e[u],o(r)){if(!(r%d))if(c)try{1===(n=c.fromJD(r/d+g)).day()?1===n.month()?a++:i++:s++}catch(e){}else 1===(n=new Date(r)).getUTCDate()?0===n.getUTCMonth()?a++:i++:s++}else l++;s+=i+=a;var f=e.length-l;return{exactYears:a/f,exactMonths:i/f,exactDays:s/f}}},{"../constants/numerical":134,"../registry":241,"./loggers":157,"./mod":159,d3:3,"fast-isnumeric":5}],144:[function(e,t,n){"use strict";t.exports=function(e,t){return Array.isArray(e)||(e=[]),e.length=t,e}},{}],145:[function(e,t,n){"use strict";var r=e("events").EventEmitter,a={init:function(e){if(e._ev instanceof r)return e;var t=new r,n=new r;return e._ev=t,e._internalEv=n,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=n.on.bind(n),e._internalOnce=n.once.bind(n),e._removeInternalListener=n.removeListener.bind(n),e._removeAllInternalListeners=n.removeAllListeners.bind(n),e.emit=function(r,a){"undefined"!=typeof jQuery&&jQuery(e).trigger(r,a),t.emit(r,a),n.emit(r,a)},e},triggerHandler:function(e,t,n){var r,a;"undefined"!=typeof jQuery&&(r=jQuery(e).triggerHandler(t,n));var i=e._ev;if(!i)return r;var o,s=i._events[t];if(!s)return r;function l(e){return e.listener?(i.removeListener(t,e.listener),e.fired?void 0:(e.fired=!0,e.listener.apply(i,[n]))):e.apply(i,[n])}for(s=Array.isArray(s)?s:[s],o=0;o<s.length-1;o++)l(s[o]);return a=l(s[o]),void 0!==r?r:a},purge:function(e){return delete e._ev,delete e.on,delete e.once,delete e.removeListener,delete e.removeAllListeners,delete e.emit,delete e._ev,delete e._internalEv,delete e._internalOn,delete e._internalOnce,delete e._removeInternalListener,delete e._removeAllInternalListeners,e}};t.exports=a},{events:2}],146:[function(e,t,n){"use strict";var r=e("./is_plain_object.js"),a=Array.isArray;function i(e,t,n,o){var s,l,c,u,d,f,h=e[0],p=e.length;if(2===p&&a(h)&&a(e[1])&&0===h.length){if(function(e,t){var n,r;for(n=0;n<e.length;n++){if(null!==(r=e[n])&&"object"==typeof r)return!1;void 0!==r&&(t[n]=r)}return!0}(e[1],h))return h;h.splice(0,h.length)}for(var g=1;g<p;g++)for(l in s=e[g])c=h[l],u=s[l],o&&a(u)?h[l]=u:t&&u&&(r(u)||(d=a(u)))?(d?(d=!1,f=c&&a(c)?c:[]):f=c&&r(c)?c:{},h[l]=i([f,u],t,n,o)):(void 0!==u||n)&&(h[l]=u);return h}n.extendFlat=function(){return i(arguments,!1,!1,!1)},n.extendDeep=function(){return i(arguments,!0,!1,!1)},n.extendDeepAll=function(){return i(arguments,!0,!0,!1)},n.extendDeepNoArrays=function(){return i(arguments,!0,!1,!0)}},{"./is_plain_object.js":154}],147:[function(e,t,n){"use strict";t.exports=function(e){for(var t={},n=[],r=0,a=0;a<e.length;a++){var i=e[a];1!==t[i]&&(t[i]=1,n[r++]=i)}return n}},{}],148:[function(e,t,n){"use strict";function r(e){return!0===e.visible}function a(e){return!0===e[0].trace.visible}t.exports=function(e){for(var t,n=(t=e,Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace?a:r),i=[],o=0;o<e.length;o++){var s=e[o];n(s)&&i.push(s)}return i}},{}],149:[function(e,t,n){"use strict";var r,a,i,o=e("./mod");function s(e,t,n,r,a,i,o,s){var l=n-e,c=a-e,u=o-a,d=r-t,f=i-t,h=s-i,p=l*h-u*d;if(0===p)return null;var g=(c*h-u*f)/p,y=(c*d-l*f)/p;return y<0||y>1||g<0||g>1?null:{x:e+l*g,y:t+d*g}}function l(e,t,n,r,a){var i=r*e+a*t;if(i<0)return r*r+a*a;if(i>n){var o=r-e,s=a-t;return o*o+s*s}var l=r*t-a*e;return l*l/n}n.segmentsIntersect=s,n.segmentDistance=function(e,t,n,r,a,i,o,c){if(s(e,t,n,r,a,i,o,c))return 0;var u=n-e,d=r-t,f=o-a,h=c-i,p=u*u+d*d,g=f*f+h*h,y=Math.min(l(u,d,p,a-e,i-t),l(u,d,p,o-e,c-t),l(f,h,g,e-a,t-i),l(f,h,g,n-a,r-i));return Math.sqrt(y)},n.getTextLocation=function(e,t,n,s){if(e===a&&s===i||(r={},a=e,i=s),r[n])return r[n];var l=e.getPointAtLength(o(n-s/2,t)),c=e.getPointAtLength(o(n+s/2,t)),u=Math.atan((c.y-l.y)/(c.x-l.x)),d=e.getPointAtLength(o(n,t)),f={x:(4*d.x+l.x+c.x)/6,y:(4*d.y+l.y+c.y)/6,theta:u};return r[n]=f,f},n.clearLocationCache=function(){a=null},n.getVisibleSegment=function(e,t,n){var r,a,i=t.left,o=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),d=u;function f(t){var n=e.getPointAtLength(t);0===t?r=n:t===u&&(a=n);var c=n.x<i?i-n.x:n.x>o?n.x-o:0,d=n.y<s?s-n.y:n.y>l?n.y-l:0;return Math.sqrt(c*c+d*d)}for(var h=f(c);h;){if((c+=h+n)>d)return;h=f(c)}for(h=f(d);h;){if(c>(d-=h+n))return;h=f(d)}return{min:c,max:d,len:d-c,total:u,isClosed:0===c&&d===u&&Math.abs(r.x-a.x)<.1&&Math.abs(r.y-a.y)<.1}},n.findPointOnPath=function(e,t,n,r){for(var a,i,o,s=(r=r||{}).pathLength||e.getTotalLength(),l=r.tolerance||.001,c=r.iterationLimit||30,u=e.getPointAtLength(0)[n]>e.getPointAtLength(s)[n]?-1:1,d=0,f=0,h=s;d<c;){if(a=(f+h)/2,o=(i=e.getPointAtLength(a))[n]-t,Math.abs(o)<l)return i;u*o>0?h=a:f=a,d++}return i}},{"./mod":159}],150:[function(e,t,n){"use strict";t.exports=function(e){var t;if("string"==typeof e){if(null===(t=document.getElementById(e)))throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}if(null===e||void 0===e)throw new Error("DOM element provided is null or undefined");return e}},{}],151:[function(e,t,n){"use strict";t.exports=function(e){return e}},{}],152:[function(e,t,n){"use strict";var r=e("d3"),a=e("fast-isnumeric"),i=e("../constants/numerical"),o=i.FP_SAFE,s=i.BADNUM,l=t.exports={};l.nestedProperty=e("./nested_property"),l.keyedContainer=e("./keyed_container"),l.relativeAttr=e("./relative_attr"),l.isPlainObject=e("./is_plain_object"),l.mod=e("./mod"),l.toLogRange=e("./to_log_range"),l.relinkPrivateKeys=e("./relink_private"),l.ensureArray=e("./ensure_array");var c=e("./is_array");l.isTypedArray=c.isTypedArray,l.isArrayOrTypedArray=c.isArrayOrTypedArray,l.isArray1D=c.isArray1D;var u=e("./coerce");l.valObjectMeta=u.valObjectMeta,l.coerce=u.coerce,l.coerce2=u.coerce2,l.coerceFont=u.coerceFont,l.coerceHoverinfo=u.coerceHoverinfo,l.coerceSelectionMarkerOpacity=u.coerceSelectionMarkerOpacity,l.validate=u.validate;var d=e("./dates");l.dateTime2ms=d.dateTime2ms,l.isDateTime=d.isDateTime,l.ms2DateTime=d.ms2DateTime,l.ms2DateTimeLocal=d.ms2DateTimeLocal,l.cleanDate=d.cleanDate,l.isJSDate=d.isJSDate,l.formatDate=d.formatDate,l.incrementMonth=d.incrementMonth,l.dateTick0=d.dateTick0,l.dfltRange=d.dfltRange,l.findExactDates=d.findExactDates,l.MIN_MS=d.MIN_MS,l.MAX_MS=d.MAX_MS;var f=e("./search");l.findBin=f.findBin,l.sorterAsc=f.sorterAsc,l.sorterDes=f.sorterDes,l.distinctVals=f.distinctVals,l.roundUp=f.roundUp;var h=e("./stats");l.aggNums=h.aggNums,l.len=h.len,l.mean=h.mean,l.variance=h.variance,l.stdev=h.stdev,l.interp=h.interp;var p=e("./matrix");l.init2dArray=p.init2dArray,l.transposeRagged=p.transposeRagged,l.dot=p.dot,l.translationMatrix=p.translationMatrix,l.rotationMatrix=p.rotationMatrix,l.rotationXYMatrix=p.rotationXYMatrix,l.apply2DTransform=p.apply2DTransform,l.apply2DTransform2=p.apply2DTransform2;var g=e("./angles");l.deg2rad=g.deg2rad,l.rad2deg=g.rad2deg,l.wrap360=g.wrap360,l.wrap180=g.wrap180;var y=e("./geometry2d");l.segmentsIntersect=y.segmentsIntersect,l.segmentDistance=y.segmentDistance,l.getTextLocation=y.getTextLocation,l.clearLocationCache=y.clearLocationCache,l.getVisibleSegment=y.getVisibleSegment,l.findPointOnPath=y.findPointOnPath;var m=e("./extend");l.extendFlat=m.extendFlat,l.extendDeep=m.extendDeep,l.extendDeepAll=m.extendDeepAll,l.extendDeepNoArrays=m.extendDeepNoArrays;var v=e("./loggers");l.log=v.log,l.warn=v.warn,l.error=v.error;var x=e("./regex");l.counterRegex=x.counter;var b=e("./throttle");l.throttle=b.throttle,l.throttleDone=b.done,l.clearThrottle=b.clear,l.getGraphDiv=e("./get_graph_div"),l._=e("./localize"),l.notifier=e("./notifier"),l.filterUnique=e("./filter_unique"),l.filterVisible=e("./filter_visible"),l.pushUnique=e("./push_unique"),l.cleanNumber=e("./clean_number"),l.ensureNumber=function(e){return a(e)?(e=Number(e))<-o||e>o?s:a(e)?Number(e):s:s},l.noop=e("./noop"),l.identity=e("./identity"),l.swapAttrs=function(e,t,n,r){n||(n="x"),r||(r="y");for(var a=0;a<t.length;a++){var i=t[a],o=l.nestedProperty(e,i.replace("?",n)),s=l.nestedProperty(e,i.replace("?",r)),c=o.get();o.set(s.get()),s.set(c)}},l.raiseToTop=function(e){e.parentNode.appendChild(e)},l.cancelTransition=function(e){return e.transition().duration(0)},l.constrain=function(e,t,n){return t>n?Math.max(n,Math.min(t,e)):Math.max(t,Math.min(n,e))},l.bBoxIntersect=function(e,t,n){return n=n||0,e.left<=t.right+n&&t.left<=e.right+n&&e.top<=t.bottom+n&&t.top<=e.bottom+n},l.simpleMap=function(e,t,n,r){for(var a=e.length,i=new Array(a),o=0;o<a;o++)i[o]=t(e[o],n,r);return i},l.randstr=function e(t,n,r){if(r||(r=16),void 0===n&&(n=24),n<=0)return"0";var a,i,o=Math.log(Math.pow(2,n))/Math.log(r),s="";for(a=2;o===1/0;a*=2)o=Math.log(Math.pow(2,n/a))/Math.log(r)*a;var l=o-Math.floor(o);for(a=0;a<Math.floor(o);a++)s=Math.floor(Math.random()*r).toString(r)+s;l&&(i=Math.pow(r,l),s=Math.floor(Math.random()*i).toString(r)+s);var c=parseInt(s,r);return t&&t.indexOf(s)>-1||c!==1/0&&c>=Math.pow(2,n)?e(t,n,r):s},l.OptionControl=function(e,t){e||(e={}),t||(t="opt");var n={optionList:[],_newoption:function(r){r[t]=e,n[r.name]=r,n.optionList.push(r)}};return n["_"+t]=e,n},l.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var n,r,a,i,o=e.length,s=2*o,l=2*t-1,c=new Array(l),u=new Array(o);for(n=0;n<l;n++)c[n]=(1-Math.cos(Math.PI*(n+1)/t))/(2*t);for(n=0;n<o;n++){for(i=0,r=0;r<l;r++)(a=n+r+1-t)<-o?a-=s*Math.round(a/s):a>=s&&(a-=s*Math.floor(a/s)),a<0?a=-1-a:a>=o&&(a=s-1-a),i+=e[a]*c[r];u[n]=i}return u},l.syncOrAsync=function(e,t,n){var r;function a(){return l.syncOrAsync(e,t,n)}for(;e.length;)if((r=(0,e.splice(0,1)[0])(t))&&r.then)return r.then(a).then(void 0,l.promiseError);return n&&n(t)},l.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},l.noneOrAll=function(e,t,n){if(e){var r,a,i=!1,o=!0;for(r=0;r<n.length;r++)void 0!==(a=e[n[r]])&&null!==a?i=!0:o=!1;if(i&&!o)for(r=0;r<n.length;r++)e[n[r]]=t[n[r]]}},l.mergeArray=function(e,t,n){if(l.isArrayOrTypedArray(e))for(var r=Math.min(e.length,t.length),a=0;a<r;a++)t[a][n]=e[a]},l.fillArray=function(e,t,n,r){if(r=r||l.identity,l.isArrayOrTypedArray(e))for(var a=0;a<t.length;a++)t[a][n]=r(e[a])},l.castOption=function(e,t,n,r){r=r||l.identity;var a=l.nestedProperty(e,n).get();return l.isArrayOrTypedArray(a)?Array.isArray(t)&&l.isArrayOrTypedArray(a[t[0]])?r(a[t[0]][t[1]]):r(a[t]):a},l.extractOption=function(e,t,n,r){if(n in e)return e[n];var a=l.nestedProperty(t,r).get();return Array.isArray(a)?void 0:a},l.tagSelected=function(e,t,n){var r,i,o=t.selectedpoints,s=t._indexToPoints;if(s)for(var l in r={},s)for(var c=s[l],u=0;u<c.length;u++)r[c[u]]=l;function d(t){return void 0!==t&&t<e.length}for(var f=0;f<o.length;f++){var h=o[f];if(a(i=h)&&i>=0&&i%1==0){var p=r?r[h]:h,g=n?n[p]:p;d(g)&&(e[g].selected=1)}}},l.getTargetArray=function(e,t){var n=t.target;if("string"==typeof n&&n){var r=l.nestedProperty(e,n).get();return!!Array.isArray(r)&&r}return!!Array.isArray(n)&&n},l.minExtend=function(e,t){var n={};"object"!=typeof t&&(t={});var r,a,i,o=Object.keys(e);for(r=0;r<o.length;r++)i=e[a=o[r]],"_"!==a.charAt(0)&&"function"!=typeof i&&("module"===a?n[a]=i:Array.isArray(i)?n[a]=i.slice(0,3):n[a]=i&&"object"==typeof i?l.minExtend(e[a],t[a]):i);for(o=Object.keys(t),r=0;r<o.length;r++)"object"==typeof(i=t[a=o[r]])&&a in n&&"object"==typeof n[a]||(n[a]=i);return n},l.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},l.containsAny=function(e,t){for(var n=0;n<t.length;n++)if(-1!==e.indexOf(t[n]))return!0;return!1},l.isPlotDiv=function(e){var t=r.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")},l.removeElement=function(e){var t=e&&e.parentNode;t&&t.removeChild(e)},l.addStyleRule=function(e,t){if(!l.styleSheet){var n=document.createElement("style");n.appendChild(document.createTextNode("")),document.head.appendChild(n),l.styleSheet=n.sheet}var r=l.styleSheet;r.insertRule?r.insertRule(e+"{"+t+"}",0):r.addRule?r.addRule(e,t,0):l.warn("addStyleRule failed")},l.isIE=function(){return void 0!==window.navigator.msSaveBlob},l.isD3Selection=function(e){return e&&"function"==typeof e.classed},l.ensureSingle=function(e,t,n,r){var a=e.select(t+(n?"."+n:""));if(a.size())return a;var i=e.append(t).classed(n,!0);return r&&i.call(r),i},l.ensureSingleById=function(e,t,n,r){var a=e.select(t+"#"+n);if(a.size())return a;var i=e.append(t).attr("id",n);return r&&i.call(r),i},l.objectFromPath=function(e,t){for(var n,r=e.split("."),a=n={},i=0;i<r.length;i++){var o=r[i],s=null,l=r[i].match(/(.*)\[([0-9]+)\]/);l?(o=l[1],s=l[2],n=n[o]=[],i===r.length-1?n[s]=t:n[s]={},n=n[s]):(i===r.length-1?n[o]=t:n[o]={},n=n[o])}return a};var _=/^([^\[\.]+)\.(.+)?/,w=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;l.expandObjectPaths=function(e){var t,n,r,a,i,o,s;if("object"==typeof e&&!Array.isArray(e))for(n in e)e.hasOwnProperty(n)&&((t=n.match(_))?(a=e[n],r=t[1],delete e[n],e[r]=l.extendDeepNoArrays(e[r]||{},l.objectFromPath(n,l.expandObjectPaths(a))[r])):(t=n.match(w))?(a=e[n],r=t[1],i=parseInt(t[2]),delete e[n],e[r]=e[r]||[],"."===t[3]?(s=t[4],o=e[r][i]=e[r][i]||{},l.extendDeepNoArrays(o,l.objectFromPath(s,l.expandObjectPaths(a)))):e[r][i]=l.expandObjectPaths(a)):e[n]=l.expandObjectPaths(e[n]));return e},l.numSeparate=function(e,t,n){if(n||(n=!1),"string"!=typeof t||0===t.length)throw new Error("Separator string required for formatting!");"number"==typeof e&&(e=String(e));var r=/(\d+)(\d{3})/,a=t.charAt(0),i=t.charAt(1),o=e.split("."),s=o[0],l=o.length>1?a+o[1]:"";if(i&&(o.length>1||s.length>4||n))for(;r.test(s);)s=s.replace(r,"$1"+i+"$2");return s+l};var k=/%{([^\s%{}]*)}/g,M=/^\w*$/;l.templateString=function(e,t){var n={};return e.replace(k,function(e,r){return M.test(r)?t[r]||"":(n[r]=n[r]||l.nestedProperty(t,r).get,n[r]()||"")})};l.subplotSort=function(e,t){for(var n=Math.min(e.length,t.length)+1,r=0,a=0,i=0;i<n;i++){var o=e.charCodeAt(i)||0,s=t.charCodeAt(i)||0,l=o>=48&&o<=57,c=s>=48&&s<=57;if(l&&(r=10*r+o-48),c&&(a=10*a+s-48),!l||!c){if(r!==a)return r-a;if(o!==s)return o-s}}return a-r};var T=2e9;l.seedPseudoRandom=function(){T=2e9},l.pseudoRandom=function(){var e=T;return T=(69069*T+1)%4294967296,Math.abs(T-e)<429496729?l.pseudoRandom():T/4294967296}},{"../constants/numerical":134,"./angles":139,"./clean_number":140,"./coerce":142,"./dates":143,"./ensure_array":144,"./extend":146,"./filter_unique":147,"./filter_visible":148,"./geometry2d":149,"./get_graph_div":150,"./identity":151,"./is_array":153,"./is_plain_object":154,"./keyed_container":155,"./localize":156,"./loggers":157,"./matrix":158,"./mod":159,"./nested_property":160,"./noop":161,"./notifier":162,"./push_unique":165,"./regex":167,"./relative_attr":168,"./relink_private":169,"./search":170,"./stats":172,"./throttle":174,"./to_log_range":175,d3:3,"fast-isnumeric":5}],153:[function(e,t,n){"use strict";var r="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},a="undefined"==typeof DataView?function(){}:DataView;function i(e){return r.isView(e)&&!(e instanceof a)}function o(e){return Array.isArray(e)||i(e)}t.exports={isTypedArray:i,isArrayOrTypedArray:o,isArray1D:function(e){return!o(e[0])}}},{}],154:[function(e,t,n){"use strict";t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e)===Object.prototype}},{}],155:[function(e,t,n){"use strict";var r=e("./nested_property"),a=/^\w*$/;t.exports=function(e,t,n,i){var o,s,l;n=n||"name",i=i||"value";var c={};t&&t.length?(l=r(e,t),s=l.get()):s=e,t=t||"";var u={};if(s)for(o=0;o<s.length;o++)u[s[o][n]]=o;var d=a.test(i),f={set:function(e,t){var a=null===t?4:0;if(!s){if(!l||4===a)return;s=[],l.set(s)}var o=u[e];if(void 0===o){if(4===a)return;a|=3,o=s.length,u[e]=o}else t!==(d?s[o][i]:r(s[o],i).get())&&(a|=2);var h=s[o]=s[o]||{};return h[n]=e,d?h[i]=t:r(h,i).set(t),null!==t&&(a&=-5),c[o]=c[o]|a,f},get:function(e){if(s){var t=u[e];return void 0===t?void 0:d?s[t][i]:r(s[t],i).get()}},rename:function(e,t){var r=u[e];return void 0===r?f:(c[r]=1|c[r],u[t]=r,delete u[e],s[r][n]=t,f)},remove:function(e){var t=u[e];if(void 0===t)return f;var a=s[t];if(Object.keys(a).length>2)return c[t]=2|c[t],f.set(e,null);if(d){for(o=t;o<s.length;o++)c[o]=3|c[o];for(o=t;o<s.length;o++)u[s[o][n]]--;s.splice(t,1),delete u[e]}else r(a,i).set(null),c[t]=6|c[t];return f},constructUpdate:function(){for(var e,a,o={},l=Object.keys(c),u=0;u<l.length;u++)a=l[u],e=t+"["+a+"]",s[a]?(1&c[a]&&(o[e+"."+n]=s[a][n]),2&c[a]&&(o[e+"."+i]=d?4&c[a]?null:s[a][i]:4&c[a]?null:r(s[a],i).get())):o[e]=null;return o}};return f}},{"./nested_property":160}],156:[function(e,t,n){"use strict";var r=e("../registry");t.exports=function(e,t){for(var n=e._context.locale,a=0;a<2;a++){for(var i=e._context.locales,o=0;o<2;o++){var s=(i[n]||{}).dictionary;if(s){var l=s[t];if(l)return l}i=r.localeRegistry}var c=n.split("-")[0];if(c===n)break;n=c}return t}},{"../registry":241}],157:[function(e,t,n){"use strict";var r=e("../plot_api/plot_config"),a=t.exports={};function i(e,t){if(e.apply)e.apply(e,t);else for(var n=0;n<t.length;n++)e(t[n])}a.log=function(){if(r.logging>1){for(var e=["LOG:"],t=0;t<arguments.length;t++)e.push(arguments[t]);i(console.trace||console.log,e)}},a.warn=function(){if(r.logging>0){for(var e=["WARN:"],t=0;t<arguments.length;t++)e.push(arguments[t]);i(console.trace||console.log,e)}},a.error=function(){if(r.logging>0){for(var e=["ERROR:"],t=0;t<arguments.length;t++)e.push(arguments[t]);i(console.error,e)}}},{"../plot_api/plot_config":184}],158:[function(e,t,n){"use strict";n.init2dArray=function(e,t){for(var n=new Array(e),r=0;r<e;r++)n[r]=new Array(t);return n},n.transposeRagged=function(e){var t,n,r=0,a=e.length;for(t=0;t<a;t++)r=Math.max(r,e[t].length);var i=new Array(r);for(t=0;t<r;t++)for(i[t]=new Array(a),n=0;n<a;n++)i[t][n]=e[n][t];return i},n.dot=function(e,t){if(!e.length||!t.length||e.length!==t.length)return null;var r,a,i=e.length;if(e[0].length)for(r=new Array(i),a=0;a<i;a++)r[a]=n.dot(e[a],t);else if(t[0].length){var o=n.transposeRagged(t);for(r=new Array(o.length),a=0;a<o.length;a++)r[a]=n.dot(e,o[a])}else for(r=0,a=0;a<i;a++)r+=e[a]*t[a];return r},n.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]},n.rotationMatrix=function(e){var t=e*Math.PI/180;return[[Math.cos(t),-Math.sin(t),0],[Math.sin(t),Math.cos(t),0],[0,0,1]]},n.rotationXYMatrix=function(e,t,r){return n.dot(n.dot(n.translationMatrix(t,r),n.rotationMatrix(e)),n.translationMatrix(-t,-r))},n.apply2DTransform=function(e){return function(){var t=arguments;3===t.length&&(t=t[0]);var r=1===arguments.length?t[0]:[t[0],t[1]];return n.dot(e,[r[0],r[1],1]).slice(0,2)}},n.apply2DTransform2=function(e){var t=n.apply2DTransform(e);return function(e){return t(e.slice(0,2)).concat(t(e.slice(2,4)))}}},{}],159:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e%t;return n<0?n+t:n}},{}],160:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("./is_array").isArrayOrTypedArray;t.exports=function(e,t){if(r(t))t=String(t);else if("string"!=typeof t||"[-1]"===t.substr(t.length-4))throw"bad property string";for(var n,i,o,l=0,c=t.split(".");l<c.length;){if(n=String(c[l]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(n[1])c[l]=n[1];else{if(0!==l)throw"bad property string";c.splice(0,1)}for(i=n[2].substr(1,n[2].length-2).split("]["),o=0;o<i.length;o++)l++,c.splice(l,0,Number(i[o]))}l++}return"object"!=typeof e?function(e,t,n){return{set:function(){throw"bad container"},get:function(){},astr:t,parts:n,obj:e}}(e,t,c):{set:s(e,c,t),get:function e(t,n){return function(){var r,i,o,s,l,c=t;for(s=0;s<n.length-1;s++){if(-1===(r=n[s])){for(i=!0,o=[],l=0;l<c.length;l++)o[l]=e(c[l],n.slice(s+1))(),o[l]!==o[0]&&(i=!1);return i?o[0]:o}if("number"==typeof r&&!a(c))return;if("object"!=typeof(c=c[r])||null===c)return}if("object"==typeof c&&null!==c&&null!==(o=c[n[s]]))return o}}(e,c),astr:t,parts:c,obj:e}};var i=/(^|\.)args\[/;function o(e,t){return void 0===e||null===e&&!t.match(i)}function s(e,t,n){return function(r){var i,s,d=e,f="",h=[[e,f]],p=o(r,n);for(s=0;s<t.length-1;s++){if("number"==typeof(i=t[s])&&!a(d))throw"array index but container is not an array";if(-1===i){if(p=!c(d,t.slice(s+1),r,n))break;return}if(!u(d,i,t[s+1],p))break;if("object"!=typeof(d=d[i])||null===d)throw"container is not an object";f=l(f,i),h.push([d,f])}if(p){if(s===t.length-1&&(delete d[t[s]],Array.isArray(d)&&+t[s]==d.length-1))for(;d.length&&void 0===d[d.length-1];)d.pop()}else d[t[s]]=r}}function l(e,t){var n=t;return r(t)?n="["+t+"]":e&&(n="."+t),e+n}function c(e,t,n,r){var i,l=a(n),c=!0,d=n,f=r.replace("-1",0),h=!l&&o(n,f),p=t[0];for(i=0;i<e.length;i++)f=r.replace("-1",i),l&&(h=o(d=n[i%n.length],f)),h&&(c=!1),u(e,i,p,h)&&s(e[i],t,r.replace("-1",i))(d);return c}function u(e,t,n,r){if(void 0===e[t]){if(r)return!1;e[t]="number"==typeof n?[]:{}}return!0}},{"./is_array":153,"fast-isnumeric":5}],161:[function(e,t,n){"use strict";t.exports=function(){}},{}],162:[function(e,t,n){"use strict";var r=e("d3"),a=e("fast-isnumeric"),i=[];t.exports=function(e,t){if(-1===i.indexOf(e)){i.push(e);var n=1e3;a(t)?n=t:"long"===t&&(n=3e3);var o=r.select("body").selectAll(".plotly-notifier").data([0]);o.enter().append("div").classed("plotly-notifier",!0),o.selectAll(".notifier-note").data(i).enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(e){var t=r.select(this);t.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){t.transition().call(s)});for(var a=t.append("p"),i=e.split(/<br\s*\/?>/g),o=0;o<i.length;o++)o&&a.append("br"),a.append("span").text(i[o]);t.transition().duration(700).style("opacity",1).transition().delay(n).call(s)})}function s(e){e.duration(700).style("opacity",0).each("end",function(e){var t=i.indexOf(e);-1!==t&&i.splice(t,1),r.select(this).remove()})}}},{d3:3,"fast-isnumeric":5}],163:[function(e,t,n){"use strict";var r=e("./setcursor"),a="data-savedcursor";t.exports=function(e,t){var n=e.attr(a);if(t){if(!n){for(var i=(e.attr("class")||"").split(" "),o=0;o<i.length;o++){var s=i[o];0===s.indexOf("cursor-")&&e.attr(a,s.substr(7)).classed(s,!1)}e.attr(a)||e.attr(a,"!!")}r(e,t)}else n&&(e.attr(a,null),"!!"===n?r(e):r(e,n))}},{"./setcursor":171}],164:[function(e,t,n){"use strict";var r=e("./matrix").dot,a=e("../constants/numerical").BADNUM,i=t.exports={};i.tester=function(e){if(Array.isArray(e[0][0]))return i.multitester(e);var t,n=e.slice(),r=n[0][0],o=r,s=n[0][1],l=s;for(n.push(n[0]),t=1;t<n.length;t++)r=Math.min(r,n[t][0]),o=Math.max(o,n[t][0]),s=Math.min(s,n[t][1]),l=Math.max(l,n[t][1]);var c,u=!1;5===n.length&&(n[0][0]===n[1][0]?n[2][0]===n[3][0]&&n[0][1]===n[3][1]&&n[1][1]===n[2][1]&&(u=!0,c=function(e){return e[0]===n[0][0]}):n[0][1]===n[1][1]&&n[2][1]===n[3][1]&&n[0][0]===n[3][0]&&n[1][0]===n[2][0]&&(u=!0,c=function(e){return e[1]===n[0][1]}));var d=!0,f=n[0];for(t=1;t<n.length;t++)if(f[0]!==n[t][0]||f[1]!==n[t][1]){d=!1;break}return{xmin:r,xmax:o,ymin:s,ymax:l,pts:n,contains:u?function(e,t){var n=e[0],i=e[1];return!(n===a||n<r||n>o||i===a||i<s||i>l||t&&c(e))}:function(e,t){var i=e[0],c=e[1];if(i===a||i<r||i>o||c===a||c<s||c>l)return!1;var u,d,f,h,p,g=n.length,y=n[0][0],m=n[0][1],v=0;for(u=1;u<g;u++)if(d=y,f=m,y=n[u][0],m=n[u][1],!(i<(h=Math.min(d,y))||i>Math.max(d,y)||c>Math.max(f,m)))if(c<Math.min(f,m))i!==h&&v++;else{if(c===(p=y===d?c:f+(i-d)*(m-f)/(y-d)))return 1!==u||!t;c<=p&&i!==h&&v++}return v%2==1},isRect:u,degenerate:d}},i.multitester=function(e){for(var t=[],n=e[0][0][0],r=n,a=e[0][0][1],o=a,s=0;s<e.length;s++){var l=i.tester(e[s]);l.subtract=e[s].subtract,t.push(l),n=Math.min(n,l.xmin),r=Math.max(r,l.xmax),a=Math.min(a,l.ymin),o=Math.max(o,l.ymax)}return{xmin:n,xmax:r,ymin:a,ymax:o,pts:[],contains:function(e,n){for(var r=!1,a=0;a<t.length;a++)t[a].contains(e,n)&&(r=!1===t[a].subtract);return r},isRect:!1,degenerate:!1}};var o=i.isSegmentBent=function(e,t,n,a){var i,o,s,l=e[t],c=[e[n][0]-l[0],e[n][1]-l[1]],u=r(c,c),d=Math.sqrt(u),f=[-c[1]/d,c[0]/d];for(i=t+1;i<n;i++)if(o=[e[i][0]-l[0],e[i][1]-l[1]],(s=r(o,c))<0||s>u||Math.abs(r(o,f))>a)return!0;return!1};i.filter=function(e,t){var n=[e[0]],r=0,a=0;function i(i){e.push(i);var s=n.length,l=r;n.splice(a+1);for(var c=l+1;c<e.length;c++)(c===e.length-1||o(e,l,c+1,t))&&(n.push(e[c]),n.length<s-2&&(r=c,a=n.length-1),l=c)}e.length>1&&i(e.pop());return{addPt:i,raw:e,filtered:n}}},{"../constants/numerical":134,"./matrix":158}],165:[function(e,t,n){"use strict";t.exports=function(e,t){if(t instanceof RegExp){var n,r=t.toString();for(n=0;n<e.length;n++)if(e[n]instanceof RegExp&&e[n].toString()===r)return e;e.push(t)}else!t&&0!==t||-1!==e.indexOf(t)||e.push(t);return e}},{}],166:[function(e,t,n){"use strict";var r=e("../lib"),a=e("../plot_api/plot_config");var i={add:function(e,t,n,r,i){var o,s;e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},s=e.undoQueue.index,e.autoplay?e.undoQueue.inSequence||(e.autoplay=!1):(!e.undoQueue.sequence||e.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(s,e.undoQueue.queue.length-s,o),e.undoQueue.index+=1):o=e.undoQueue.queue[s-1],e.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(t),o.undo.args.unshift(n),o.redo.calls.push(r),o.redo.args.push(i)),e.undoQueue.queue.length>a.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,n;if(e.framework&&e.framework.isPolar)e.framework.undo();else if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n<t.undo.calls.length;n++)i.plotDo(e,t.undo.calls[n],t.undo.args[n]);e.undoQueue.inSequence=!1,e.autoplay=!1}},redo:function(e){var t,n;if(e.framework&&e.framework.isPolar)e.framework.redo();else if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index>=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n<t.redo.calls.length;n++)i.plotDo(e,t.redo.calls[n],t.redo.args[n]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}}};i.plotDo=function(e,t,n){e.autoplay=!0,n=function(e,t){for(var n,a=[],i=0;i<t.length;i++)n=t[i],a[i]=n===e?n:"object"==typeof n?Array.isArray(n)?r.extendDeep([],n):r.extendDeepAll({},n):n;return a}(e,n),t.apply(null,n)},t.exports=i},{"../lib":152,"../plot_api/plot_config":184}],167:[function(e,t,n){"use strict";n.counter=function(e,t,n){var r=(t||"")+(n?"":"$");return"xy"===e?new RegExp("^x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+r):new RegExp("^"+e+"([2-9]|[1-9][0-9]+)?"+r)}},{}],168:[function(e,t,n){"use strict";var r=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,a=/^[^\.\[\]]+$/;t.exports=function(e,t){for(;t;){var n=e.match(r);if(n)e=n[1];else{if(!e.match(a))throw new Error("bad relativeAttr call:"+[e,t]);e=""}if("^"!==t.charAt(0))break;t=t.slice(1)}return e&&"["!==t.charAt(0)?e+"."+t:e+t}},{}],169:[function(e,t,n){"use strict";var r=e("./is_array").isArrayOrTypedArray,a=e("./is_plain_object");t.exports=function e(t,n){for(var i in n){var o=n[i],s=t[i];if(s!==o)if("_"===i.charAt(0)||"function"==typeof o){if(i in t)continue;t[i]=o}else if(r(o)&&r(s)&&a(o[0])){if("customdata"===i||"ids"===i)continue;for(var l=Math.min(o.length,s.length),c=0;c<l;c++)s[c]!==o[c]&&a(o[c])&&a(s[c])&&e(s[c],o[c])}else a(o)&&a(s)&&(e(s,o),Object.keys(s).length||delete t[i])}}},{"./is_array":153,"./is_plain_object":154}],170:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("./loggers");function i(e,t){return e<t}function o(e,t){return e<=t}function s(e,t){return e>t}function l(e,t){return e>=t}n.findBin=function(e,t,n){if(r(t.start))return n?Math.ceil((e-t.start)/t.size-1e-9)-1:Math.floor((e-t.start)/t.size+1e-9);var c,u,d=0,f=t.length,h=0,p=f>1?(t[f-1]-t[0])/(f-1):1;for(u=p>=0?n?i:o:n?l:s,e+=1e-9*p*(n?-1:1)*(p>=0?1:-1);d<f&&h++<100;)u(t[c=Math.floor((d+f)/2)],e)?d=c+1:f=c;return h>90&&a.log("Long binary search..."),d-1},n.sorterAsc=function(e,t){return e-t},n.sorterDes=function(e,t){return t-e},n.distinctVals=function(e){var t=e.slice();t.sort(n.sorterAsc);for(var r=t.length-1,a=t[r]-t[0]||1,i=a/(r||1)/1e4,o=[t[0]],s=0;s<r;s++)t[s+1]>t[s]+i&&(a=Math.min(a,t[s+1]-t[s]),o.push(t[s+1]));return{vals:o,minDiff:a}},n.roundUp=function(e,t,n){for(var r,a=0,i=t.length-1,o=0,s=n?0:1,l=n?1:0,c=n?Math.ceil:Math.floor;a<i&&o++<100;)t[r=c((a+i)/2)]<=e?a=r+s:i=r-l;return t[a]}},{"./loggers":157,"fast-isnumeric":5}],171:[function(e,t,n){"use strict";t.exports=function(e,t){(e.attr("class")||"").split(" ").forEach(function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)}),t&&e.classed("cursor-"+t,!0)}},{}],172:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("./is_array").isArrayOrTypedArray;n.aggNums=function(e,t,i,o){var s,l;if((!o||o>i.length)&&(o=i.length),r(t)||(t=!1),a(i[0])){for(l=new Array(o),s=0;s<o;s++)l[s]=n.aggNums(e,t,i[s]);i=l}for(s=0;s<o;s++)r(t)?r(i[s])&&(t=e(+t,+i[s])):t=i[s];return t},n.len=function(e){return n.aggNums(function(e){return e+1},0,e)},n.mean=function(e,t){return t||(t=n.len(e)),n.aggNums(function(e,t){return e+t},0,e)/t},n.variance=function(e,t,a){return t||(t=n.len(e)),r(a)||(a=n.mean(e,t)),n.aggNums(function(e,t){return e+Math.pow(t-a,2)},0,e)/t},n.stdev=function(e,t,r){return Math.sqrt(n.variance(e,t,r))},n.interp=function(e,t){if(!r(t))throw"n should be a finite number";if((t=t*e.length-.5)<0)return e[0];if(t>e.length-1)return e[e.length-1];var n=t%1;return n*e[Math.ceil(t)]+(1-n)*e[Math.floor(t)]}},{"./is_array":153,"fast-isnumeric":5}],173:[function(e,t,n){"use strict";var r=e("d3"),a=e("../lib"),i=e("../constants/xmlns_namespaces"),o=e("../constants/string_mappings"),s=e("../constants/alignment").LINE_SPACING;function l(e,t){return e.node().getBoundingClientRect()[t]}var c=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;n.convertToTspans=function(e,t,o){var m=e.text(),C=!e.attr("data-notex")&&"undefined"!=typeof MathJax&&m.match(c),z=r.select(e.node().parentNode);if(!z.empty()){var O=e.attr("class")?e.attr("class").split(" ")[0]:"text";return O+="-math",z.selectAll("svg."+O).remove(),z.selectAll("g."+O+"-group").remove(),e.style("display",null).attr({"data-unformatted":m,"data-math":"N"}),C?(t&&t._promises||[]).push(new Promise(function(t){e.style("display","none");var n=parseInt(e.node().style.fontSize,10),i={fontSize:n};!function(e,t,n){var i="math-output-"+a.randstr([],64),o=r.select("body").append("div").attr({id:i}).style({visibility:"hidden",position:"absolute"}).style({"font-size":t.fontSize+"px"}).text((s=e,s.replace(u,"\\lt ").replace(d,"\\gt ")));var s;MathJax.Hub.Queue(["Typeset",MathJax.Hub,o.node()],function(){var t=r.select("body").select("#MathJax_SVG_glyphs");if(o.select(".MathJax_SVG").empty()||!o.select("svg").node())a.log("There was an error in the tex syntax.",e),n();else{var i=o.select("svg").node().getBoundingClientRect();n(o.select(".MathJax_SVG"),t,i)}o.remove()})}(C[2],i,function(r,a,i){z.selectAll("svg."+O).remove(),z.selectAll("g."+O+"-group").remove();var s=r&&r.select("svg");if(!s||!s.node())return D(),void t();var c=z.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":m,"data-math":"Y"});c.node().appendChild(s.node()),a&&a.node()&&s.node().insertBefore(a.node().cloneNode(!0),s.node().firstChild),s.attr({class:O,height:i.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var u=e.node().style.fill||"black";s.select("g").attr({fill:u,stroke:u});var d=l(s,"width"),f=l(s,"height"),h=+e.attr("x")-d*{start:0,middle:.5,end:1}[e.attr("text-anchor")||"start"],p=-(n||l(e,"height"))/4;"y"===O[0]?(c.attr({transform:"rotate("+[-90,+e.attr("x"),+e.attr("y")]+") translate("+[-d/2,p-f/2]+")"}),s.attr({x:+e.attr("x"),y:+e.attr("y")})):"l"===O[0]?s.attr({x:e.attr("x"),y:p-f/2}):"a"===O[0]?s.attr({x:0,y:p}):s.attr({x:h,y:+e.attr("y")+p-f/2}),o&&o.call(e,c),t(c)})})):D(),e}function D(){z.empty()||(O=e.attr("class")+"-math",z.select("svg."+O).remove()),e.text("").style("white-space","pre"),function(e,t){t=(n=t,function(e,t){if(!e)return"";for(var n=0;n<t.length;n++){var r=t[n];e=e.replace(r.regExp,r.sub)}return e}(n,v)).replace(x," ");var n;var o,l=!1,c=[],u=-1;function d(){u++;var t=document.createElementNS(i.svg,"tspan");r.select(t).attr({class:"line",dy:u*s+"em"}),e.appendChild(t),o=t;var n=c;if(c=[{node:t}],n.length>1)for(var a=1;a<n.length;a++)m(n[a])}function m(e){var t,n=e.type,a={};if("a"===n){t="a";var s=e.target,l=e.href,u=e.popup;l&&(a={"xlink:xlink:show":"_blank"===s||"_"!==s.charAt(0)?"new":"replace",target:s,"xlink:xlink:href":l},u&&(a.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+u+'");return false;'))}else t="tspan";e.style&&(a.style=e.style);var d=document.createElementNS(i.svg,t);if("sup"===n||"sub"===n){C(o,g),o.appendChild(d);var f=document.createElementNS(i.svg,"tspan");C(f,g),r.select(f).attr("dy",p[n]),a.dy=h[n],o.appendChild(d),o.appendChild(f)}else o.appendChild(d);r.select(d).attr(a),o=e.node=d,c.push(e)}function C(e,t){e.appendChild(document.createTextNode(t))}function z(e){if(1!==c.length){var n=c.pop();e!==n.type&&a.log("Start tag <"+n.type+"> doesnt match end tag <"+e+">. Pretending it did match.",t),o=c[c.length-1].node}else a.log("Ignoring unexpected end tag </"+e+">.",t)}w.test(t)?d():(o=e,c=[{node:e}]);for(var O=t.split(b),D=0;D<O.length;D++){var P=O[D],I=P.match(_),j=I&&I[2].toLowerCase(),E=f[j];if("br"===j)d();else if(void 0===E)C(o,P);else if(I[1])z(j);else{var N=I[4],R={type:j},F=S(N,k);if(F?(F=F.replace(L,"$1 fill:"),E&&(F+=";"+E)):E&&(F=E),F&&(R.style=F),"a"===j){l=!0;var B=S(N,M);if(B){var H=document.createElement("a");H.href=B,-1!==y.indexOf(H.protocol)&&(R.href=encodeURI(decodeURI(B)),R.target=S(N,T)||"_blank",R.popup=S(N,A))}}m(R)}}return l}(e.node(),m)&&e.style("pointer-events","all"),n.positionText(e),o&&o.call(e)}};var u=/(<|&lt;|&#60;)/g,d=/(>|&gt;|&#62;)/g;var f={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},h={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},g="​",y=["http:","https:","mailto:","",void 0,":"],m=new RegExp("</?("+Object.keys(f).join("|")+")( [^>]*)?/?>","g"),v=Object.keys(o.entityToUnicode).map(function(e){return{regExp:new RegExp("&"+e+";","g"),sub:o.entityToUnicode[e]}}),x=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,w=/<br(\s+.*)?>/i,k=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,M=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(e,t){if(!e)return null;var n=e.match(t);return n&&(n[3]||n[4])}var L=/(^|;)\s*color:/;function C(e,t,n){var r,a,i,o=n.horizontalAlign,s=n.verticalAlign||"top",l=e.node().getBoundingClientRect(),c=t.node().getBoundingClientRect();return a="bottom"===s?function(){return l.bottom-r.height}:"middle"===s?function(){return l.top+(l.height-r.height)/2}:function(){return l.top},i="right"===o?function(){return l.right-r.width}:"center"===o?function(){return l.left+(l.width-r.width)/2}:function(){return l.left},function(){return r=this.node().getBoundingClientRect(),this.style({top:a()-c.top+"px",left:i()-c.left+"px","z-index":1e3}),this}}n.plainText=function(e){return(e||"").replace(m," ")},n.lineCount=function(e){return e.selectAll("tspan.line").size()||1},n.positionText=function(e,t,n){return e.each(function(){var e=r.select(this);function a(t,n){return void 0===n?null===(n=e.attr(t))&&(e.attr(t,0),n=0):e.attr(t,n),n}var i=a("x",t),o=a("y",n);"text"===this.nodeName&&e.selectAll("tspan.line").attr({x:i,y:o})})},n.makeEditable=function(e,t){var n=t.gd,a=t.delegate,i=r.dispatch("edit","input","cancel"),o=a||e;if(e.style({"pointer-events":a?"none":"all"}),1!==e.size())throw new Error("boo");function s(){!function(){var a=r.select(n).select(".svg-container"),o=a.append("div"),s=e.node().style,c=parseFloat(s.fontSize||12),u=t.text;void 0===u&&(u=e.attr("data-unformatted"));o.classed("plugin-editable editable",!0).style({position:"absolute","font-family":s.fontFamily||"Arial","font-size":c,color:t.fill||s.fill||"black",opacity:1,"background-color":t.background||"transparent",outline:"#ffffff33 1px solid",margin:[-c/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(u).call(C(e,a,t)).on("blur",function(){n._editing=!1,e.text(this.textContent).style({opacity:1});var t,a=r.select(this).attr("class");(t=a?"."+a.split(" ")[0]+"-math-group":"[class*=-math-group]")&&r.select(e.node().parentNode).select(t).style({opacity:0});var o=this.textContent;r.select(this).transition().duration(0).remove(),r.select(document).on("mouseup",null),i.edit.call(e,o)}).on("focus",function(){var e=this;n._editing=!0,r.select(document).on("mouseup",function(){if(r.event.target===e)return!1;document.activeElement===o.node()&&o.node().blur()})}).on("keyup",function(){27===r.event.which?(n._editing=!1,e.style({opacity:1}),r.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),i.cancel.call(e,this.textContent)):(i.input.call(e,this.textContent),r.select(this).call(C(e,a,t)))}).on("keydown",function(){13===r.event.which&&this.blur()}).call(l)}(),e.style({opacity:0});var a,s=o.attr("class");(a=s?"."+s.split(" ")[0]+"-math-group":"[class*=-math-group]")&&r.select(e.node().parentNode).select(a).style({opacity:0})}function l(e){var t=e.node(),n=document.createRange();n.selectNodeContents(t);var r=window.getSelection();r.removeAllRanges(),r.addRange(n),t.focus()}return t.immediate?s():o.on("click",s),r.rebind(e,i,"on")}},{"../constants/alignment":132,"../constants/string_mappings":135,"../constants/xmlns_namespaces":136,"../lib":152,d3:3}],174:[function(e,t,n){"use strict";var r={};function a(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}n.throttle=function(e,t,n){var i=r[e],o=Date.now();if(!i){for(var s in r)r[s].ts<o-6e4&&delete r[s];i=r[e]={ts:0,timer:null}}function l(){n(),i.ts=Date.now(),i.onDone&&(i.onDone(),i.onDone=null)}a(i),o>i.ts+t?l():i.timer=setTimeout(function(){l(),i.timer=null},t)},n.done=function(e){var t=r[e];return t&&t.timer?new Promise(function(e){var n=t.onDone;t.onDone=function(){n&&n(),e(),t.onDone=null}}):Promise.resolve()},n.clear=function(e){if(e)a(r[e]),delete r[e];else for(var t in r)n.clear(t)}},{}],175:[function(e,t,n){"use strict";var r=e("fast-isnumeric");t.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}},{"fast-isnumeric":5}],176:[function(e,t,n){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],177:[function(e,t,n){"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},{}],178:[function(e,t,n){"use strict";var r=e("../registry");t.exports=function(e){for(var t,n,a=r.layoutArrayContainers,i=r.layoutArrayRegexes,o=e.split("[")[0],s=0;s<i.length;s++)if((n=e.match(i[s]))&&0===n.index){t=n[0];break}if(t||(t=a[a.indexOf(o)]),!t)return!1;var l=e.substr(t.length);return l?!!(n=l.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:t,index:Number(n[1]),property:n[3]||""}:{array:t,index:"",property:""}}},{"../registry":241}],179:[function(e,t,n){"use strict";var r=e("../lib"),a=r.extendFlat,i=r.isPlainObject,o={valType:"flaglist",extras:["none"],flags:["calc","calcIfAutorange","clearAxisTypes","plot","style","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full `Plotly.plot` starting by clearing `gd.calcdata`","to force it to be regenerated","*calcIfAutorange* does a full `Plotly.plot`, but only clears and redoes `gd.calcdata`","if there is at least one autoranged axis.","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* calls `Plotly.plot` but without first clearing `gd.calcdata`.","*style* only calls `module.style` for all trace modules and redraws the legend.","*colorbars* only redraws colorbars."].join(" ")},s={valType:"flaglist",extras:["none"],flags:["calc","calcIfAutorange","plot","legend","ticks","axrange","margins","layoutstyle","modebar","camera","arraydraw"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full `Plotly.plot` starting by clearing `gd.calcdata`","to force it to be regenerated","*calcIfAutorange* does a full `Plotly.plot`, but only clears and redoes `gd.calcdata`","if there is at least one autoranged axis.","*plot* calls `Plotly.plot` but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*margins* recomputes ticklabel automargins.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed."].join(" ")},l=o.flags.slice().concat(["clearCalc","fullReplot"]),c=s.flags.slice().concat("layoutReplot");function u(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!1;return t}function d(e,t,n){var r=a({},e);for(var o in r){var s=r[o];i(s)&&(r[o]=f(s,t,n,o))}return"from-root"===n&&(r.editType=t),r}function f(e,t,n,r){if(e.valType){var i=a({},e);if(i.editType=t,Array.isArray(e.items)){i.items=new Array(e.items.length);for(var o=0;o<e.items.length;o++)i.items[o]=f(e.items[o],t,"from-root")}return i}return d(e,t,"_"===r.charAt(0)?"nested":"from-root")}t.exports={traces:o,layout:s,traceFlags:function(){return u(l)},layoutFlags:function(){return u(c)},update:function(e,t){var n=t.editType;if(n&&"none"!==n)for(var r=n.split("+"),a=0;a<r.length;a++)e[r[a]]=!0},overrideAll:d}},{"../lib":152}],180:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("gl-mat4/fromQuat"),i=e("../registry"),o=e("../lib"),s=e("../plots/plots"),l=e("../plots/cartesian/axis_ids"),c=l.cleanId,u=l.getFromTrace,d=e("../components/color");function f(e,t){var n=e[t],r=t.charAt(0);n&&"paper"!==n&&(e[t]=c(n,r))}function h(e){if(!o.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,("string"==typeof t||"number"==typeof t)&&String(t)}function p(e,t,n,r){if(n&&!r)return e;if(r&&!n)return t;if(!e.trim())return t;if(!t.trim())return e;var a,i=Math.min(e.length,t.length);for(a=0;a<i&&e.charAt(a)===t.charAt(a);a++);return e.substr(0,a).trim()}function g(e){var t="middle",n="center";return-1!==e.indexOf("top")?t="top":-1!==e.indexOf("bottom")&&(t="bottom"),-1!==e.indexOf("left")?n="left":-1!==e.indexOf("right")&&(n="right"),t+" "+n}function y(e,t){return t in e&&"object"==typeof e[t]&&0===Object.keys(e[t]).length}n.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},n.cleanLayout=function(e){var t,n;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var r=(s.subplotsRegistry.cartesian||{}).attrRegex,i=(s.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(e);for(t=0;t<l.length;t++){var u=l[t];if(r&&r.test(u)){var h=e[u];h.anchor&&"free"!==h.anchor&&(h.anchor=c(h.anchor)),h.overlaying&&(h.overlaying=c(h.overlaying)),h.type||(h.isdate?h.type="date":h.islog?h.type="log":!1===h.isdate&&!1===h.islog&&(h.type="linear")),"withzero"!==h.autorange&&"tozero"!==h.autorange||(h.autorange=!0,h.rangemode="tozero"),delete h.islog,delete h.isdate,delete h.categories,y(h,"domain")&&delete h.domain,void 0!==h.autotick&&(void 0===h.tickmode&&(h.tickmode=h.autotick?"auto":"linear"),delete h.autotick)}else if(i&&i.test(u)){var p=e[u],g=p.cameraposition;if(Array.isArray(g)&&4===g[0].length){var m=g[0],v=g[1],x=g[2],b=a([],m),_=[];for(n=0;n<3;++n)_[n]=v[n]+x*b[2+4*n];p.camera={eye:{x:_[0],y:_[1],z:_[2]},center:{x:v[0],y:v[1],z:v[2]},up:{x:b[1],y:b[5],z:b[9]}},delete p.cameraposition}}}var w=Array.isArray(e.annotations)?e.annotations.length:0;for(t=0;t<w;t++){var k=e.annotations[t];o.isPlainObject(k)&&(k.ref&&("paper"===k.ref?(k.xref="paper",k.yref="paper"):"data"===k.ref&&(k.xref="x",k.yref="y"),delete k.ref),f(k,"xref"),f(k,"yref"))}var M=Array.isArray(e.shapes)?e.shapes.length:0;for(t=0;t<M;t++){var T=e.shapes[t];o.isPlainObject(T)&&(f(T,"xref"),f(T,"yref"))}var A=e.legend;return A&&(A.x>3?(A.x=1.02,A.xanchor="left"):A.x<-2&&(A.x=-.02,A.xanchor="right"),A.y>3?(A.y=1.02,A.yanchor="bottom"):A.y<-2&&(A.y=-.02,A.yanchor="top")),"rotate"===e.dragmode&&(e.dragmode="orbit"),d.clean(e),e},n.cleanData=function(e,t){for(var r=[],a=e.concat(Array.isArray(t)?t:[]).filter(function(e){return"uid"in e}).map(function(e){return e.uid}),l=0;l<e.length;l++){var u,f=e[l];if(!("uid"in f)||-1!==r.indexOf(f.uid)){var m;for(u=0;u<100&&(m=o.randstr(a),-1!==r.indexOf(m));u++);f.uid=o.randstr(a),a.push(f.uid)}if(r.push(f.uid),"histogramy"===f.type&&"xbins"in f&&!("ybins"in f)&&(f.ybins=f.xbins,delete f.xbins),f.error_y&&"opacity"in f.error_y){var v=d.defaults,x=f.error_y.color||(i.traceIs(f,"bar")?d.defaultLine:v[l%v.length]);f.error_y.color=d.addOpacity(d.rgb(x),d.opacity(x)*f.error_y.opacity),delete f.error_y.opacity}if("bardir"in f&&("h"!==f.bardir||!i.traceIs(f,"bar")&&"histogram"!==f.type.substr(0,9)||(f.orientation="h",n.swapXYData(f)),delete f.bardir),"histogramy"===f.type&&n.swapXYData(f),"histogramx"!==f.type&&"histogramy"!==f.type||(f.type="histogram"),"scl"in f&&(f.colorscale=f.scl,delete f.scl),"reversescl"in f&&(f.reversescale=f.reversescl,delete f.reversescl),f.xaxis&&(f.xaxis=c(f.xaxis,"x")),f.yaxis&&(f.yaxis=c(f.yaxis,"y")),i.traceIs(f,"gl3d")&&f.scene&&(f.scene=s.subplotsRegistry.gl3d.cleanId(f.scene)),!i.traceIs(f,"pie")&&!i.traceIs(f,"bar"))if(Array.isArray(f.textposition))for(u=0;u<f.textposition.length;u++)f.textposition[u]=g(f.textposition[u]);else f.textposition&&(f.textposition=g(f.textposition));if(i.traceIs(f,"2dMap")&&("YIGnBu"===f.colorscale&&(f.colorscale="YlGnBu"),"YIOrRd"===f.colorscale&&(f.colorscale="YlOrRd")),i.traceIs(f,"markerColorscale")&&f.marker){var b=f.marker;"YIGnBu"===b.colorscale&&(b.colorscale="YlGnBu"),"YIOrRd"===b.colorscale&&(b.colorscale="YlOrRd")}if("surface"===f.type&&o.isPlainObject(f.contours)){var _=["x","y","z"];for(u=0;u<_.length;u++){var w=f.contours[_[u]];o.isPlainObject(w)&&(w.highlightColor&&(w.highlightcolor=w.highlightColor,delete w.highlightColor),w.highlightWidth&&(w.highlightwidth=w.highlightWidth,delete w.highlightWidth))}}if("candlestick"===f.type||"ohlc"===f.type){var k=!1!==(f.increasing||{}).showlegend,M=!1!==(f.decreasing||{}).showlegend,T=h(f.increasing),A=h(f.decreasing);if(!1!==T&&!1!==A){var S=p(T,A,k,M);S&&(f.name=S)}else!T&&!A||f.name||(f.name=T||A)}if(Array.isArray(f.transforms)){var L=f.transforms;for(u=0;u<L.length;u++){var C=L[u];if(o.isPlainObject(C))switch(C.type){case"filter":C.filtersrc&&(C.target=C.filtersrc,delete C.filtersrc),C.calendar&&(C.valuecalendar||(C.valuecalendar=C.calendar),delete C.calendar);break;case"groupby":if(C.styles=C.styles||C.style,C.styles&&!Array.isArray(C.styles)){var z=C.styles,O=Object.keys(z);C.styles=[];for(var D=0;D<O.length;D++)C.styles.push({target:O[D],value:z[O[D]]})}}}}y(f,"line")&&delete f.line,"marker"in f&&(y(f.marker,"line")&&delete f.marker.line,y(f,"marker")&&delete f.marker),d.clean(f)}},n.swapXYData=function(e){var t;if(o.swapAttrs(e,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(e.z)&&Array.isArray(e.z[0])&&(e.transpose?delete e.transpose:e.transpose=!0),e.error_x&&e.error_y){var n=e.error_y,r="copy_ystyle"in n?n.copy_ystyle:!(n.color||n.thickness||n.width);o.swapAttrs(e,["error_?.copy_ystyle"]),r&&o.swapAttrs(e,["error_?.color","error_?.thickness","error_?.width"])}if("string"==typeof e.hoverinfo){var a=e.hoverinfo.split("+");for(t=0;t<a.length;t++)"x"===a[t]?a[t]="y":"y"===a[t]&&(a[t]="x");e.hoverinfo=a.join("+")}},n.coerceTraceIndices=function(e,t){return r(t)?[t]:Array.isArray(t)&&t.length?t:e.data.map(function(e,t){return t})},n.manageArrayContainers=function(e,t,n){var a=e.obj,i=e.parts,s=i.length,l=i[s-1],c=r(l);if(c&&null===t){var u=i.slice(0,s-1).join(".");o.nestedProperty(a,u).get().splice(l,1)}else c&&void 0===e.get()?(void 0===e.get()&&(n[e.astr]=null),e.set(t)):e.set(t)};var m=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function v(e){var t=e.search(m);if(t>0)return e.substr(0,t)}n.hasParent=function(e,t){for(var n=v(t);n;){if(n in e)return!0;n=v(n)}return!1};var x=["x","y","z"];n.clearAxisTypes=function(e,t,n){for(var r=0;r<t.length;r++)for(var a=e._fullData[r],i=0;i<3;i++){var s=u(e,a,x[i]);if(s&&"log"!==s.type){var l=s._name,c=s._id.substr(1);if("scene"===c.substr(0,5)){if(void 0!==n[c])continue;l=c+"."+l}var d=l+".type";void 0===n[l]&&void 0===n[d]&&o.nestedProperty(e.layout,d).set(null)}}},n.clearAxisAutomargins=function(e){for(var t=Object.keys(e._fullLayout._pushmargin),n=0;n<t.length;n++)-1!==t[n].indexOf("automargin")&&delete e._fullLayout._pushmargin[t[n]]}},{"../components/color":32,"../lib":152,"../plots/cartesian/axis_ids":197,"../plots/plots":226,"../registry":241,"fast-isnumeric":5,"gl-mat4/fromQuat":6}],181:[function(e,t,n){"use strict";var r=e("./plot_api");n.plot=r.plot,n.newPlot=r.newPlot,n.restyle=r.restyle,n.relayout=r.relayout,n.redraw=r.redraw,n.update=r.update,n.react=r.react,n.extendTraces=r.extendTraces,n.prependTraces=r.prependTraces,n.addTraces=r.addTraces,n.deleteTraces=r.deleteTraces,n.moveTraces=r.moveTraces,n.purge=r.purge,n.addFrames=r.addFrames,n.deleteFrames=r.deleteFrames,n.animate=r.animate,n.setPlotConfig=r.setPlotConfig,n.toImage=e("./to_image"),n.validate=e("./validate"),n.downloadImage=e("../snapshot/download")},{"../snapshot/download":243,"./plot_api":183,"./to_image":187,"./validate":188}],182:[function(e,t,n){"use strict";var r=e("../lib/nested_property"),a=e("../lib/is_plain_object"),i=e("../lib/noop"),o=e("../lib/loggers"),s=e("../lib/search").sorterAsc,l=e("../registry");n.containerArrayMatch=e("./container_array_match");var c=n.isAddVal=function(e){return"add"===e||a(e)},u=n.isRemoveVal=function(e){return null===e||"remove"===e};n.applyContainerArrayChanges=function(e,t,n,a){var d=t.astr,f=l.getComponentMethod(d,"supplyLayoutDefaults"),h=l.getComponentMethod(d,"draw"),p=l.getComponentMethod(d,"drawOne"),g=a.replot||a.recalc||f===i||h===i,y=e.layout,m=e._fullLayout;if(n[""]){Object.keys(n).length>1&&o.warn("Full array edits are incompatible with other edits",d);var v=n[""][""];if(u(v))t.set(null);else{if(!Array.isArray(v))return o.warn("Unrecognized full array edit value",d,v),!0;t.set(v)}return!g&&(f(y,m),h(e),!0)}var x,b,_,w,k,M,T,A=Object.keys(n).map(Number).sort(s),S=t.get(),L=S||[],C=r(m,d).get(),z=[],O=-1,D=L.length;for(x=0;x<A.length;x++)if(w=n[_=A[x]],k=Object.keys(w),M=w[""],T=c(M),_<0||_>L.length-(T?0:1))o.warn("index out of range",d,_);else if(void 0!==M)k.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",d,_),u(M)?z.push(_):T?("add"===M&&(M={}),L.splice(_,0,M),C&&C.splice(_,0,{})):o.warn("Unrecognized full object edit value",d,_,M),-1===O&&(O=_);else for(b=0;b<k.length;b++)r(L[_],k[b]).set(w[k[b]]);for(x=z.length-1;x>=0;x--)L.splice(z[x],1),C&&C.splice(z[x],1);if(L.length?S||t.set(L):t.set(null),g)return!1;if(f(y,m),p!==i){var P;if(-1===O)P=A;else{for(D=Math.max(L.length,D),P=[],x=0;x<A.length&&!((_=A[x])>=O);x++)P.push(_);for(x=O;x<D;x++)P.push(x)}for(x=0;x<P.length;x++)p(e,P[x])}else h(e);return!0}},{"../lib/is_plain_object":154,"../lib/loggers":157,"../lib/nested_property":160,"../lib/noop":161,"../lib/search":170,"../registry":241,"./container_array_match":178}],183:[function(e,t,n){"use strict";var r=e("d3"),a=e("fast-isnumeric"),i=e("has-hover"),o=e("../lib"),s=e("../lib/events"),l=e("../lib/queue"),c=e("../registry"),u=e("./plot_schema"),d=e("../plots/plots"),f=e("../plots/polar/legacy"),h=e("../plots/cartesian/axes"),p=e("../components/drawing"),g=e("../components/color"),y=e("../plots/cartesian/graph_interact").initInteractions,m=e("../constants/xmlns_namespaces"),v=e("../lib/svg_text_utils"),x=e("./plot_config"),b=e("./manage_arrays"),_=e("./helpers"),w=e("./subroutines"),k=e("./edit_types"),M=e("../plots/cartesian/constants").AX_NAME_PATTERN,T=0;function A(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){o.error(e)}}function S(e,t){A(e,g.combine(t,"white"))}function L(e,t){e._context||(e._context=o.extendDeep({},x));var n,r,a,s=e._context;if(t){for(r=Object.keys(t),n=0;n<r.length;n++)"editable"!==(a=r[n])&&"edits"!==a&&a in s&&("setBackground"===a&&"opaque"===t[a]?s[a]=S:s[a]=t[a]);t.plot3dPixelRatio&&!s.plotGlPixelRatio&&(s.plotGlPixelRatio=s.plot3dPixelRatio);var l=t.editable;if(void 0!==l)for(s.editable=l,r=Object.keys(s.edits),n=0;n<r.length;n++)s.edits[r[n]]=l;if(t.edits)for(r=Object.keys(t.edits),n=0;n<r.length;n++)(a=r[n])in s.edits&&(s.edits[a]=t.edits[a])}s.staticPlot&&(s.editable=!1,s.edits={},s.autosizable=!1,s.scrollZoom=!1,s.doubleClick=!1,s.showTips=!1,s.showLink=!1,s.displayModeBar=!1),"hover"!==s.displayModeBar||i||(s.displayModeBar=!0),"transparent"!==s.setBackground&&"function"==typeof s.setBackground||(s.setBackground=A)}function C(e,t){var n,r,a=t+1,i=[];for(n=0;n<e.length;n++)(r=e[n])<0?i.push(a+r):i.push(r);return i}function z(e,t,n){var r,a;for(r=0;r<t.length;r++){if((a=t[r])!==parseInt(a,10))throw new Error("all values in "+n+" must be integers");if(a>=e.data.length||a<-e.data.length)throw new Error(n+" must be valid indices for gd.data.");if(t.indexOf(a,r+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+n+" must be unique.")}}function O(e,t,n){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),z(e,t,"currentIndices"),void 0===n||Array.isArray(n)||(n=[n]),void 0!==n&&z(e,n,"newIndices"),void 0!==n&&t.length!==n.length)throw new Error("current and new indices must be of equal length.")}function D(e,t,n,r,i){!function(e,t,n,r){var a=o.isPlainObject(r);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(t))throw new Error("update must be a key:value object");if(void 0===n)throw new Error("indices must be an integer or array of integers");for(var i in z(e,n,"indices"),t){if(!Array.isArray(t[i])||t[i].length!==n.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in r)||!Array.isArray(r[i])||r[i].length!==t[i].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(e,t,n,r);for(var s=function(e,t,n,r){var i,s,l,c,u,d=o.isPlainObject(r),f=[];for(var h in Array.isArray(n)||(n=[n]),n=C(n,e.data.length-1),t)for(var p=0;p<n.length;p++){if(i=e.data[n[p]],s=(l=o.nestedProperty(i,h)).get(),c=t[h][p],!o.isArrayOrTypedArray(c))throw new Error("attribute: "+h+" index: "+p+" must be an array");if(!o.isArrayOrTypedArray(s))throw new Error("cannot extend missing or non-array attribute: "+h);if(s.constructor!==c.constructor)throw new Error("cannot extend array with an array of a different type: "+h);u=d?r[h][p]:r,a(u)||(u=-1),f.push({prop:l,target:s,insert:c,maxp:Math.floor(u)})}return f}(e,t,n,r),l={},c={},u=0;u<s.length;u++){var d=s[u].prop,f=s[u].maxp,h=i(s[u].target,s[u].insert,f);d.set(h[0]),Array.isArray(l[d.astr])||(l[d.astr]=[]),l[d.astr].push(h[1]),Array.isArray(c[d.astr])||(c[d.astr]=[]),c[d.astr].push(s[u].target.length)}return{update:l,maxPoints:c}}function P(e,t){var n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}function I(e){return void 0===e?null:e}function j(e,t,n){var r,a,i=e._fullLayout,s=e._fullData,l=e.data,f=k.traceFlags(),p={},g={};function y(){return n.map(function(){})}function m(e){var t=h.id2name(e);-1===a.indexOf(t)&&a.push(t)}function v(e){return"LAYOUT"+e+".autorange"}function x(e){return"LAYOUT"+e+".range"}function b(r,a,i){var s;Array.isArray(r)?r.forEach(function(e){b(e,a,i)}):r in t||_.hasParent(t,r)||(s="LAYOUT"===r.substr(0,6)?o.nestedProperty(e.layout,r.replace("LAYOUT","")):o.nestedProperty(l[n[i]],r),r in g||(g[r]=y()),void 0===g[r][i]&&(g[r][i]=I(s.get())),void 0!==a&&s.set(a))}for(var w in t){if(_.hasParent(t,w))throw new Error("cannot set "+w+"and a parent attribute simultaneously");var M,T,A,S,L,C,z=t[w];if(p[w]=z,"LAYOUT"!==w.substr(0,6)){for(g[w]=y(),r=0;r<n.length;r++)if(M=l[n[r]],T=s[n[r]],S=(A=o.nestedProperty(M,w)).get(),void 0!==(L=Array.isArray(z)?z[r%z.length]:z)){if((C=u.getTraceValObject(T,A.parts))&&C.impliedEdits&&null!==L)for(var O in C.impliedEdits)b(o.relativeAttr(w,O),C.impliedEdits[O],r);else if("colorbar.thicknessmode"===w&&A.get()!==L&&-1!==["fraction","pixels"].indexOf(L)&&T.colorbar){var D=-1!==["top","bottom"].indexOf(T.colorbar.orient)?i.height-i.margin.t-i.margin.b:i.width-i.margin.l-i.margin.r;b("colorbar.thickness",T.colorbar.thickness*("fraction"===L?1/D:D),r)}else if("colorbar.lenmode"===w&&A.get()!==L&&-1!==["fraction","pixels"].indexOf(L)&&T.colorbar){var P=-1!==["top","bottom"].indexOf(T.colorbar.orient)?i.width-i.margin.l-i.margin.r:i.height-i.margin.t-i.margin.b;b("colorbar.len",T.colorbar.len*("fraction"===L?1/P:P),r)}else"colorbar.tick0"!==w&&"colorbar.dtick"!==w||b("colorbar.tickmode","linear",r);if("type"===w&&"pie"===L!=("pie"===S)){var j="x",E="y";"bar"!==L&&"bar"!==S||"h"!==M.orientation||(j="y",E="x"),o.swapAttrs(M,["?","?src"],"labels",j),o.swapAttrs(M,["d?","?0"],"label",j),o.swapAttrs(M,["?","?src"],"values",E),"pie"===S?(o.nestedProperty(M,"marker.color").set(o.nestedProperty(M,"marker.colors").get()),i._pielayer.selectAll("g.trace").remove()):c.traceIs(M,"cartesian")&&o.nestedProperty(M,"marker.colors").set(o.nestedProperty(M,"marker.color").get())}g[w][r]=I(S);if(-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(w)){if("orientation"===w){A.set(L);var N=M.x&&!M.y?"h":"v";if((A.get()||N)===T.orientation)continue}else"orientationaxes"===w&&(M.orientation={v:"h",h:"v"}[T.orientation]);_.swapXYData(M),f.calc=f.clearAxisTypes=!0}else-1!==d.dataArrayContainers.indexOf(A.parts[0])?(_.manageArrayContainers(A,L,g),f.calc=!0):(C?C.arrayOk&&(o.isArrayOrTypedArray(L)||o.isArrayOrTypedArray(S))?f.calc=!0:k.update(f,C):f.calc=!0,A.set(L))}if(-1!==["swapxyaxes","orientationaxes"].indexOf(w)&&h.swap(e,n),"orientationaxes"===w){var R=o.nestedProperty(e.layout,"hovermode");"x"===R.get()?R.set("y"):"y"===R.get()&&R.set("x")}if(-1!==["orientation","type"].indexOf(w)){for(a=[],r=0;r<n.length;r++){var F=l[n[r]];c.traceIs(F,"cartesian")&&(m(F.xaxis||"x"),m(F.yaxis||"y"),"type"===w&&b(["autobinx","autobiny"],!0,r))}b(a.map(v),!0,0),b(a.map(x),[0,1],0)}}else A=o.nestedProperty(e.layout,w.replace("LAYOUT","")),g[w]=[I(A.get())],A.set(Array.isArray(z)?z[0]:z),f.calc=!0}var B=!1,H=h.list(e);for(r=0;r<H.length;r++)if(H[r].autorange){B=!0;break}return(f.calc||f.calcIfAutorange&&B)&&(f.clearCalc=!0),(f.calc||f.plot||f.calcIfAutorange)&&(f.fullReplot=!0),{flags:f,undoit:g,redoit:p,traces:n,eventData:o.extendDeepNoArrays([],[p,n])}}function E(e,t){var n,r,a,i=e.layout,s=e._fullLayout,l=Object.keys(t),d=h.list(e),f={};for(r=0;r<l.length;r++)if(0===l[r].indexOf("allaxes")){for(a=0;a<d.length;a++){var p=d[a]._id.substr(1),g=-1!==p.indexOf("scene")?p+".":"",y=l[r].replace("allaxes",g+d[a]._name);t[y]||(t[y]=t[l[r]])}delete t[l[r]]}var m=k.layoutFlags(),v={},x={};function w(e,n){if(Array.isArray(e))e.forEach(function(e){w(e,n)});else if(!(e in t||_.hasParent(t,e))){var r=o.nestedProperty(i,e);e in x||(x[e]=I(r.get())),void 0!==n&&r.set(n)}}var T,A={};function S(e){var t=h.name2id(e.split(".")[0]);return A[t]=1,t}for(var L in t){if(_.hasParent(t,L))throw new Error("cannot set "+L+"and a parent attribute simultaneously");for(var C=o.nestedProperty(i,L),z=t[L],O=C.parts.length,D=O-1;D>0&&"string"!=typeof C.parts[O-1];)D--;var P=C.parts[D],j=C.parts[D-1]+"."+P,E=C.parts.slice(0,D).join("."),F=o.nestedProperty(e.layout,E).get(),B=o.nestedProperty(s,E).get(),H=C.get();if(void 0!==z){v[L]=z,x[L]="reverse"===P?z:I(H);var q=u.getLayoutValObject(s,C.parts);if(q&&q.impliedEdits&&null!==z)for(var V in q.impliedEdits)w(o.relativeAttr(L,V),q.impliedEdits[V]);if(-1!==["width","height"].indexOf(L)&&null===z)s[L]=e._initialAutoSize[L];else if(j.match(/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/))S(j),o.nestedProperty(s,E+"._inputRange").set(null);else if(j.match(/^[xyz]axis[0-9]*\.autorange$/)){S(j),o.nestedProperty(s,E+"._inputRange").set(null);var U=o.nestedProperty(s,E).get();U._inputDomain&&(U._input.domain=U._inputDomain.slice())}else j.match(/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/)&&o.nestedProperty(s,E+"._inputDomain").set(null);if("type"===P){var G=F,Y="linear"===B.type&&"log"===z,Z="log"===B.type&&"linear"===z;if(Y||Z){if(G&&G.range)if(B.autorange)Y&&(G.range=G.range[1]>G.range[0]?[1,2]:[2,1]);else{var X=G.range[0],W=G.range[1];Y?(X<=0&&W<=0&&w(E+".autorange",!0),X<=0?X=W/1e6:W<=0&&(W=X/1e6),w(E+".range[0]",Math.log(X)/Math.LN10),w(E+".range[1]",Math.log(W)/Math.LN10)):(w(E+".range[0]",Math.pow(10,X)),w(E+".range[1]",Math.pow(10,W)))}else w(E+".autorange",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[C.parts[0]]&&"radialaxis"===C.parts[1]&&delete s[C.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(e,B,z,w),c.getComponentMethod("images","convertCoords")(e,B,z,w)}else w(E+".autorange",!0),w(E+".range",null);o.nestedProperty(s,E+"._inputRange").set(null)}else if(P.match(M)){var J=o.nestedProperty(s,L).get(),Q=(z||{}).type;Q&&"-"!==Q||(Q="linear"),c.getComponentMethod("annotations","convertCoords")(e,J,Q,w),c.getComponentMethod("images","convertCoords")(e,J,Q,w)}var $=b.containerArrayMatch(L);if($){n=$.array,r=$.index;var K=$.property,ee=(o.nestedProperty(i,n)||[])[r]||{},te=ee,ne=q||{editType:"calc"},re=-1!==ne.editType.indexOf("calcIfAutorange");""===r?(re?m.calc=!0:k.update(m,ne),re=!1):""===K&&(te=z,b.isAddVal(z)?x[L]=null:b.isRemoveVal(z)?(x[L]=ee,te=ee):o.warn("unrecognized full object value",t)),re&&(R(e,te,"x")||R(e,te,"y"))?m.calc=!0:k.update(m,ne),f[n]||(f[n]={});var ae=f[n][r];ae||(ae=f[n][r]={}),ae[K]=z,delete t[L]}else"reverse"===P?(F.range?F.range.reverse():(w(E+".autorange",!0),F.range=[1,0]),B.autorange?m.calc=!0:m.plot=!0):(s._has("scatter-like")&&s._has("regl")&&"dragmode"===L&&("lasso"===z||"select"===z)&&"lasso"!==H&&"select"!==H?m.plot=!0:q?k.update(m,q):m.calc=!0,C.set(z))}}for(n in f){b.applyContainerArrayChanges(e,o.nestedProperty(i,n),f[n],m)||(m.plot=!0)}var ie=s._axisConstraintGroups||[];for(T in A)for(r=0;r<ie.length;r++){var oe=ie[r];if(oe[T])for(var se in m.calc=!0,oe)A[se]||(h.getFromId(e,se)._constraintShrinkable=!0)}return(N(e)||t.height||t.width)&&(m.plot=!0),(m.plot||m.calc)&&(m.layoutReplot=!0),{flags:m,undoit:x,redoit:v,eventData:o.extendDeep({},v)}}function N(e){var t=e._fullLayout,n=t.width,r=t.height;return e.layout.autosize&&d.plotAutoSize(e,e.layout,t),t.width!==n||t.height!==r}function R(e,t,n){if(!o.isPlainObject(t))return!1;var r=t[n+"ref"]||n,a=h.getFromId(e,r);return a||r.charAt(0)!==n||(a=h.getFromId(e,n)),(a||{}).autorange}function F(e,t,n,r){var a,i,s=r.getValObject,l=r.flags,c=r.immutable,u=r.inArray,d=r.arrayIndex,f=r.gd,h=r.autoranged;function p(){var e=a.editType;-1!==e.indexOf("calcIfAutorange")&&(h||void 0===h&&(R(f,t,"x")||R(f,t,"y")))?l.calc=!0:u&&-1!==e.indexOf("arraydraw")?o.pushUnique(l.arrays[u],d):k.update(l,a)}function g(e){return"data_array"===e.valType||e.arrayOk}for(i in e){if(l.calc)return;var y=e[i],m=t[i];if("_"!==i.charAt(0)&&"function"!=typeof y&&y!==m){if("tick0"===i||"dtick"===i){var v=t.tickmode;if("auto"===v||"array"===v||!v)continue}if(("range"!==i||!t.autorange)&&("zmin"!==i&&"zmax"!==i||"contourcarpet"!==t.type)){var x=n.concat(i);if((a=s(x))&&(!a._compareAsJSON||JSON.stringify(y)!==JSON.stringify(m))){var b,_=a.valType,w=g(a),M=Array.isArray(y),T=Array.isArray(m);if(M&&T){var A="_input_"+i,S=e[A],L=t[A];if(Array.isArray(S)&&S===L)continue}if(void 0===m)w&&M?l.calc=!0:p();else if(a._isLinkedToArray){var C=[],z=!1;u||(l.arrays[i]=C);var O=Math.min(y.length,m.length),D=Math.max(y.length,m.length);if(O!==D){if("arraydraw"!==a.editType){p();continue}z=!0}for(b=0;b<O;b++)F(y[b],m[b],x.concat(b),o.extendFlat({inArray:i,arrayIndex:b},r));if(z)for(b=O;b<D;b++)C.push(b)}else!_&&o.isPlainObject(y)?F(y,m,x,r):w?M&&T?c&&(l.calc=!0):M!==T?l.calc=!0:p():M&&T&&y.length===m.length&&String(y)===String(m)||p()}}}}for(i in t)if(!(i in e||"_"===i.charAt(0)||"function"==typeof t[i])){if(g(a=s(n.concat(i)))&&Array.isArray(t[i]))return void(l.calc=!0);p()}}function B(e){var t=r.select(e),n=e._fullLayout;if(n._container=t.selectAll(".plot-container").data([0]),n._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),n._paperdiv=n._container.selectAll(".svg-container").data([0]),n._paperdiv.enter().append("div").classed("svg-container",!0).style("position","relative"),n._glcontainer=n._paperdiv.selectAll(".gl-container").data([{}]),n._glcontainer.enter().append("div").classed("gl-container",!0),n._glcanvas=null,n._paperdiv.selectAll(".main-svg").remove(),n._paper=n._paperdiv.insert("svg",":first-child").classed("main-svg",!0),n._toppaper=n._paperdiv.append("svg").classed("main-svg",!0),!n._uid){var a=[];r.selectAll("defs").each(function(){this.id&&a.push(this.id.split("-")[1])}),n._uid=o.randstr(a)}n._paperdiv.selectAll(".main-svg").attr(m.svgAttrs),n._defs=n._paper.append("defs").attr("id","defs-"+n._uid),n._clips=n._defs.append("g").classed("clips",!0),n._topdefs=n._toppaper.append("defs").attr("id","topdefs-"+n._uid),n._topclips=n._topdefs.append("g").classed("clips",!0),n._bgLayer=n._paper.append("g").classed("bglayer",!0),n._draggers=n._paper.append("g").classed("draglayer",!0);var i=n._paper.append("g").classed("layer-below",!0);n._imageLowerLayer=i.append("g").classed("imagelayer",!0),n._shapeLowerLayer=i.append("g").classed("shapelayer",!0),n._cartesianlayer=n._paper.append("g").classed("cartesianlayer",!0),n._polarlayer=n._paper.append("g").classed("polarlayer",!0),n._ternarylayer=n._paper.append("g").classed("ternarylayer",!0),n._geolayer=n._paper.append("g").classed("geolayer",!0),n._pielayer=n._paper.append("g").classed("pielayer",!0),n._glimages=n._paper.append("g").classed("glimages",!0);var s=n._toppaper.append("g").classed("layer-above",!0);n._imageUpperLayer=s.append("g").classed("imagelayer",!0),n._shapeUpperLayer=s.append("g").classed("shapelayer",!0),n._infolayer=n._toppaper.append("g").classed("infolayer",!0),n._menulayer=n._toppaper.append("g").classed("menulayer",!0),n._zoomlayer=n._toppaper.append("g").classed("zoomlayer",!0),n._hoverlayer=n._toppaper.append("g").classed("hoverlayer",!0),e.emit("plotly_framework")}n.plot=function(e,t,a,i){var l;if(e=o.getGraphDiv(e),s.init(e),o.isPlainObject(t)){var u=t;t=u.data,a=u.layout,i=u.config,l=u.frames}if(!1===s.triggerHandler(e,"plotly_beforeplot",[t,a,i]))return Promise.reject();t||a||o.isPlotDiv(e)||o.warn("Calling Plotly.plot as if redrawing but this container doesn't yet have a plot.",e),L(e,i),a||(a={}),r.select(e).classed("js-plotly-plot",!0),p.makeTester(),delete p.baseUrl,Array.isArray(e._promises)||(e._promises=[]);var g=0===(e.data||[]).length&&Array.isArray(t);if(Array.isArray(t)&&(_.cleanData(t,e.data),g?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),e.layout&&!g||(e.layout=_.cleanLayout(a)),e._dragging&&!e._transitioning)return e._replotPending=!0,Promise.reject();e._replotPending=!1,d.supplyDefaults(e);var m=e._fullLayout,x=m._has("cartesian");if(!m._has("polar")&&t&&t[0]&&t[0].r)return o.log("Legacy polar charts are deprecated!"),function(e,t,n){var a=r.select(e).selectAll(".plot-container").data([0]);a.enter().insert("div",":first-child").classed("plot-container plotly",!0);var i=a.selectAll(".svg-container").data([0]);i.enter().append("div").classed("svg-container",!0).style("position","relative"),i.html(""),t&&(e.data=t);n&&(e.layout=n);f.manager.fillLayout(e),i.style({width:e._fullLayout.width+"px",height:e._fullLayout.height+"px"}),e.framework=f.manager.framework(e),e.framework({data:e.data,layout:e.layout},i.node()),e.framework.setUndoPoint();var s=e.framework.svg(),l=1,c=e._fullLayout.title;""!==c&&c||(l=0);var u=function(){this.call(v.convertToTspans,e)},h=s.select(".title-group text").call(u);if(e._context.edits.titleText){var p=o._(e,"Click to enter Plot title");c&&c!==p||(l=.2,h.attr({"data-unformatted":p}).text(p).style({opacity:l}).on("mouseover.opacity",function(){r.select(this).transition().duration(100).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(1e3).style("opacity",0)}));var g=function(){this.call(v.makeEditable,{gd:e}).on("edit",function(t){e.framework({layout:{title:t}}),this.text(t).call(u),this.call(g)}).on("cancel",function(){var e=this.attr("data-unformatted");this.text(e).call(u)})};h.call(g)}return e._context.setBackground(e,e._fullLayout.paper_bgcolor),d.addLinks(e),Promise.resolve()}(e,t,a);m._replotting=!0,g&&B(e),e.framework!==B&&(e.framework=B,B(e)),p.initGradients(e),g&&h.saveShowSpikeInitial(e);var b=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;b&&d.doCalcdata(e);for(var k=0;k<e.calcdata.length;k++)e.calcdata[k][0].trace=e._fullData[k];var M=JSON.stringify(m._size);function T(){var t,n,r,a=e.calcdata;for(c.getComponentMethod("legend","draw")(e),c.getComponentMethod("rangeselector","draw")(e),c.getComponentMethod("sliders","draw")(e),c.getComponentMethod("updatemenus","draw")(e),t=0;t<a.length;t++)!0===(r=(n=a[t])[0].trace).visible&&r._module.colorbar?r._module.colorbar(e,n):d.autoMargin(e,"cb"+r.uid);return d.doAutoMargin(e),d.previousPromises(e)}function A(){e._transitioning||(w.doAutoRangeAndConstraints(e),g&&h.saveRangeInitial(e))}var S=[d.previousPromises,function(){if(l)return n.addFrames(e,l)},function(){for(var t=m._basePlotModules,n=0;n<t.length;n++)t[n].drawFramework&&t[n].drawFramework(e);return!m._glcanvas&&m._has("gl")&&(m._glcanvas=m._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(e){return e.key}),m._glcanvas.enter().append("canvas").attr("class",function(e){return"gl-canvas gl-canvas-"+e.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"visible","pointer-events":"none"})),m._glcanvas&&m._glcanvas.attr("width",m.width).attr("height",m.height),d.previousPromises(e)},T,function(){if(JSON.stringify(m._size)!==M)return o.syncOrAsync([T,w.layoutStyles],e)}];x&&S.push(function(){if(b){var t,n,r,a=m._subplots.cartesian,i=m._modules,s=[];for(r=0;r<i.length;r++)o.pushUnique(s,i[r].setPositions);if(s.length)for(n=0;n<a.length;n++)for(t=m._plots[a[n]],r=0;r<s.length;r++)s[r](e,t);return c.getComponentMethod("errorbars","calc")(e),o.syncOrAsync([c.getComponentMethod("shapes","calcAutorange"),c.getComponentMethod("annotations","calcAutorange"),A,c.getComponentMethod("rangeslider","calcAutorange")],e)}A()}),S.push(w.layoutStyles),x&&S.push(function(){return h.doTicks(e,g?"":"redraw")}),S.push(w.drawData,w.finalDraw,y,d.addLinks,d.rehover,d.previousPromises);var C=o.syncOrAsync(S,e);return C&&C.then||(C=Promise.resolve()),C.then(function(){return e.emit("plotly_afterplot"),e})},n.setPlotConfig=function(e){return o.extendFlat(x,e)},n.redraw=function(e){if(e=o.getGraphDiv(e),!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);return _.cleanData(e.data,e.data),_.cleanLayout(e.layout),e.calcdata=void 0,n.plot(e).then(function(){return e.emit("plotly_redraw"),e})},n.newPlot=function(e,t,r,a){return e=o.getGraphDiv(e),d.cleanPlot([],{},e._fullData||[],e._fullLayout||{},e.calcdata||[]),d.purge(e),n.plot(e,t,r,a)},n.extendTraces=function e(t,r,a,i){var s=D(t=o.getGraphDiv(t),r,a,i,function(e,t,n){var r,a;if(o.isTypedArray(e))if(n<0){var i=new e.constructor(0),s=P(e,t);n<0?(r=s,a=i):(r=i,a=s)}else if(r=new e.constructor(n),a=new e.constructor(e.length+t.length-n),n===t.length)r.set(t),a.set(e);else if(n<t.length){var l=t.length-n;r.set(t.subarray(l)),a.set(e),a.set(t.subarray(0,l),e.length)}else{var c=n-t.length,u=e.length-c;r.set(e.subarray(u)),r.set(t,c),a.set(e.subarray(0,u))}else r=e.concat(t),a=n>=0&&n<r.length?r.splice(0,r.length-n):[];return[r,a]}),c=n.redraw(t),u=[t,s.update,a,s.maxPoints];return l.add(t,n.prependTraces,u,e,arguments),c},n.prependTraces=function e(t,r,a,i){var s=D(t=o.getGraphDiv(t),r,a,i,function(e,t,n){var r,a;if(o.isTypedArray(e))if(n<=0){var i=new e.constructor(0),s=P(t,e);n<0?(r=s,a=i):(r=i,a=s)}else if(r=new e.constructor(n),a=new e.constructor(e.length+t.length-n),n===t.length)r.set(t),a.set(e);else if(n<t.length){var l=t.length-n;r.set(t.subarray(0,l)),a.set(t.subarray(l)),a.set(e,l)}else{var c=n-t.length;r.set(t),r.set(e.subarray(0,c),t.length),a.set(e.subarray(c))}else r=t.concat(e),a=n>=0&&n<r.length?r.splice(n,r.length):[];return[r,a]}),c=n.redraw(t),u=[t,s.update,a,s.maxPoints];return l.add(t,n.extendTraces,u,e,arguments),c},n.addTraces=function e(t,r,a){t=o.getGraphDiv(t);var i,s,c=[],u=n.deleteTraces,d=e,f=[t,c],h=[t,r];for(function(e,t,n){var r,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),r=0;r<t.length;r++)if("object"!=typeof(a=t[r])||Array.isArray(a)||null===a)throw new Error("all values in traces array must be non-array objects");if(void 0===n||Array.isArray(n)||(n=[n]),void 0!==n&&n.length!==t.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(t,r,a),Array.isArray(r)||(r=[r]),r=r.map(function(e){return o.extendFlat({},e)}),_.cleanData(r,t.data),i=0;i<r.length;i++)t.data.push(r[i]);for(i=0;i<r.length;i++)c.push(-r.length+i);if(void 0===a)return s=n.redraw(t),l.add(t,u,f,d,h),s;Array.isArray(a)||(a=[a]);try{O(t,c,a)}catch(e){throw t.data.splice(t.data.length-r.length,r.length),e}return l.startSequence(t),l.add(t,u,f,d,h),s=n.moveTraces(t,c,a),l.stopSequence(t),s},n.deleteTraces=function e(t,r){t=o.getGraphDiv(t);var a,i,s=[],c=n.addTraces,u=e,d=[t,s,r],f=[t,r];if(void 0===r)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(r)||(r=[r]),z(t,r,"indices"),(r=C(r,t.data.length-1)).sort(o.sorterDes),a=0;a<r.length;a+=1)i=t.data.splice(r[a],1)[0],s.push(i);var h=n.redraw(t);return l.add(t,c,d,u,f),h},n.moveTraces=function e(t,r,a){var i,s=[],c=[],u=e,d=e,f=[t=o.getGraphDiv(t),a,r],h=[t,r,a];if(O(t,r,a),r=Array.isArray(r)?r:[r],void 0===a)for(a=[],i=0;i<r.length;i++)a.push(-r.length+i);for(a=Array.isArray(a)?a:[a],r=C(r,t.data.length-1),a=C(a,t.data.length-1),i=0;i<t.data.length;i++)-1===r.indexOf(i)&&s.push(t.data[i]);for(i=0;i<r.length;i++)c.push({newIndex:a[i],trace:t.data[r[i]]});for(c.sort(function(e,t){return e.newIndex-t.newIndex}),i=0;i<c.length;i+=1)s.splice(c[i].newIndex,0,c[i].trace);t.data=s;var p=n.redraw(t);return l.add(t,u,f,d,h),p},n.restyle=function e(t,r,a,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var s={};if("string"==typeof r)s[r]=a;else{if(!o.isPlainObject(r))return o.warn("Restyle fail.",r,a,i),Promise.reject();s=o.extendFlat({},r),void 0===i&&(i=a)}Object.keys(s).length&&(t.changed=!0);var c=_.coerceTraceIndices(t,i),u=j(t,s,c),f=u.flags;f.clearCalc&&(t.calcdata=void 0),f.clearAxisTypes&&_.clearAxisTypes(t,c,{});var h=[];f.fullReplot?h.push(n.plot):(h.push(d.previousPromises),d.supplyDefaults(t),f.style&&h.push(w.doTraceStyle),f.colorbars&&h.push(w.doColorBars)),h.push(d.rehover),l.add(t,e,[t,u.undoit,u.traces],e,[t,u.redoit,u.traces]);var p=o.syncOrAsync(h,t);return p&&p.then||(p=Promise.resolve()),p.then(function(){return t.emit("plotly_restyle",u.eventData),t})},n.relayout=function e(t,n,r){if(t=o.getGraphDiv(t),_.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(t);var a={};if("string"==typeof n)a[n]=r;else{if(!o.isPlainObject(n))return o.warn("Relayout fail.",n,r),Promise.reject();a=o.extendFlat({},n)}Object.keys(a).length&&(t.changed=!0);var i=E(t,a),s=i.flags;s.calc&&(t.calcdata=void 0),s.margins&&_.clearAxisAutomargins(t);var c=[d.previousPromises];s.layoutReplot?c.push(w.layoutReplot):Object.keys(a).length&&(d.supplyDefaults(t),s.legend&&c.push(w.doLegend),s.layoutstyle&&c.push(w.layoutStyles),s.axrange&&c.push(w.doAutoRangeAndConstraints,w.doTicksRelayout,w.drawData,w.finalDraw),s.ticks&&c.push(w.doTicksRelayout),s.modebar&&c.push(w.doModeBar),s.camera&&c.push(w.doCamera)),c.push(d.rehover),l.add(t,e,[t,i.undoit],e,[t,i.redoit]);var u=o.syncOrAsync(c,t);return u&&u.then||(u=Promise.resolve(t)),u.then(function(){return t.emit("plotly_relayout",i.eventData),t})},n.update=function e(t,r,a,i){if(t=o.getGraphDiv(t),_.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(t);o.isPlainObject(r)||(r={}),o.isPlainObject(a)||(a={}),Object.keys(r).length&&(t.changed=!0),Object.keys(a).length&&(t.changed=!0);var s=_.coerceTraceIndices(t,i),c=j(t,o.extendFlat({},r),s),u=c.flags,f=E(t,o.extendFlat({},a)),h=f.flags;(u.clearCalc||h.calc)&&(t.calcdata=void 0),u.clearAxisTypes&&_.clearAxisTypes(t,s,a),h.margins&&_.clearAxisAutomargins(t);var p=[];if(u.fullReplot&&h.layoutReplot){var g=t.data,y=t.layout;t.data=void 0,t.layout=void 0,p.push(function(){return n.plot(t,g,y)})}else u.fullReplot?p.push(n.plot):h.layoutReplot?p.push(w.layoutReplot):(p.push(d.previousPromises),d.supplyDefaults(t),u.style&&p.push(w.doTraceStyle),u.colorbars&&p.push(w.doColorBars),h.legend&&p.push(w.doLegend),h.layoutstyle&&p.push(w.layoutStyles),h.axrange&&p.push(w.doAutoRangeAndConstraints,w.doTicksRelayout,w.drawData,w.finalDraw),h.ticks&&p.push(w.doTicksRelayout),h.modebar&&p.push(w.doModeBar),h.camera&&p.push(w.doCamera));p.push(d.rehover),l.add(t,e,[t,c.undoit,f.undoit,c.traces],e,[t,c.redoit,f.redoit,c.traces]);var m=o.syncOrAsync(p,t);return m&&m.then||(m=Promise.resolve(t)),m.then(function(){return t.emit("plotly_update",{data:c.eventData,layout:f.eventData}),t})},n.react=function(e,t,r,a){var i,s;var l=(e=o.getGraphDiv(e))._fullData,f=e._fullLayout;if(o.isPlotDiv(e)&&l&&f){if(o.isPlainObject(t)){var p=t;t=p.data,r=p.layout,a=p.config,i=p.frames}var g=!1;if(a){var y=o.extendDeep({},e._context);e._context=void 0,L(e,a),g=function e(t,n){var r;for(r in t){var a=t[r],i=n[r];if(a!==i)if(o.isPlainObject(a)&&o.isPlainObject(i)){if(e(a,i))return!0}else{if(!Array.isArray(a)||!Array.isArray(i))return!0;if(a.length!==i.length)return!0;for(var s=0;s<a.length;s++)if(a[s]!==i[s]){if(!o.isPlainObject(a[s])||!o.isPlainObject(i[s]))return!0;if(e(a[s],i[s]))return!0}}}}(y,e._context)}e.data=t||[],_.cleanData(e.data,[]),e.layout=r||{},_.cleanLayout(e.layout),d.supplyDefaults(e,{skipUpdateCalc:!0});var m=e._fullData,v=e._fullLayout,x=void 0===v.datarevision,b=function(e,t,n,r){if(t.length!==n.length)return{fullReplot:!0,calc:!0};var a,i,o=k.traceFlags();o.arrays={};var s={getValObject:function(e){return u.getTraceValObject(i,e)},flags:o,immutable:r,gd:e},l={};for(a=0;a<t.length;a++)i=n[a]._fullInput,l[i.uid]||(l[i.uid]=1,s.autoranged=!!i.xaxis&&(h.getFromId(e,i.xaxis).autorange||h.getFromId(e,i.yaxis).autorange),F(t[a]._fullInput,i,[],s));(o.calc||o.plot||o.calcIfAutorange)&&(o.fullReplot=!0);return o}(e,l,m,x),M=function(e,t,n,r){var a=k.layoutFlags();a.arrays={},F(t,n,[],{getValObject:function(e){return u.getLayoutValObject(n,e)},flags:a,immutable:r,gd:e}),(a.plot||a.calc)&&(a.layoutReplot=!0);return a}(e,f,v,x);N(e)&&(M.layoutReplot=!0),b.calc||M.calc?e.calcdata=void 0:d.supplyDefaultsUpdateCalc(e.calcdata,m),M.margins&&_.clearAxisAutomargins(e);var T=[];if(i&&(e._transitionData={},d.createTransitionData(e),T.push(function(){return n.addFrames(e,i)})),b.fullReplot||M.layoutReplot||g)e._fullLayout._skipDefaults=!0,T.push(n.plot);else{for(var A in M.arrays){var S=M.arrays[A];if(S.length){var C=c.getComponentMethod(A,"drawOne");if(C!==o.noop)for(var z=0;z<S.length;z++)C(e,S[z]);else{var O=c.getComponentMethod(A,"draw");if(O===o.noop)throw new Error("cannot draw components: "+A);O(e)}}}T.push(d.previousPromises),b.style&&T.push(w.doTraceStyle),b.colorbars&&T.push(w.doColorBars),M.legend&&T.push(w.doLegend),M.layoutstyle&&T.push(w.layoutStyles),M.axrange&&T.push(w.doAutoRangeAndConstraints,w.doTicksRelayout,w.drawData,w.finalDraw),M.ticks&&T.push(w.doTicksRelayout),M.modebar&&T.push(w.doModeBar),M.camera&&T.push(w.doCamera)}T.push(d.rehover),(s=o.syncOrAsync(T,e))&&s.then||(s=Promise.resolve(e))}else s=n.newPlot(e,t,r,a);return s.then(function(){return e.emit("plotly_react",{data:t,layout:r}),e})},n.animate=function(e,t,n){if(e=o.getGraphDiv(e),!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var r=e._transitionData;r._frameQueue||(r._frameQueue=[]);var a=(n=d.supplyAnimationDefaults(n)).transition,i=n.frame;function s(e){return Array.isArray(a)?e>=a.length?a[0]:a[e]:a}function l(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function c(e,t){var n=0;return function(){if(e&&++n===t)return e()}}return void 0===r._frameWaitingCnt&&(r._frameWaitingCnt=0),new Promise(function(i,u){function f(){r._currentFrame&&r._currentFrame.onComplete&&r._currentFrame.onComplete();var t=r._currentFrame=r._frameQueue.shift();if(t){var n=t.name?t.name.toString():null;e._fullLayout._currentFrame=n,r._lastFrameAt=Date.now(),r._timeToNext=t.frameOpts.duration,d.transition(e,t.frame.data,t.frame.layout,_.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then(function(){t.onComplete&&t.onComplete()}),e.emit("plotly_animatingframe",{name:n,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(r._animationRaf),r._animationRaf=null}function h(){e.emit("plotly_animating"),r._lastFrameAt=-1/0,r._timeToNext=0,r._runningTransitions=0,r._currentFrame=null;var t=function(){r._animationRaf=window.requestAnimationFrame(t),Date.now()-r._lastFrameAt>r._timeToNext&&f()};t()}var p,g,y=0;function m(e){return Array.isArray(a)?y>=a.length?e.transitionOpts=a[y]:e.transitionOpts=a[0]:e.transitionOpts=a,y++,e}var v=[],x=void 0===t||null===t,b=Array.isArray(t);if(!x&&!b&&o.isPlainObject(t))v.push({type:"object",data:m(o.extendFlat({},t))});else if(x||-1!==["string","number"].indexOf(typeof t))for(p=0;p<r._frames.length;p++)(g=r._frames[p])&&(x||String(g.group)===String(t))&&v.push({type:"byname",name:String(g.name),data:m({name:g.name})});else if(b)for(p=0;p<t.length;p++){var w=t[p];-1!==["number","string"].indexOf(typeof w)?(w=String(w),v.push({type:"byname",name:w,data:m({name:w})})):o.isPlainObject(w)&&v.push({type:"object",data:m(o.extendFlat({},w))})}for(p=0;p<v.length;p++)if("byname"===(g=v[p]).type&&!r._frameHash[g.data.name])return o.warn('animate failure: frame not found: "'+g.data.name+'"'),void u();-1!==["next","immediate"].indexOf(n.mode)&&function(){if(0!==r._frameQueue.length){for(;r._frameQueue.length;){var t=r._frameQueue.pop();t.onInterrupt&&t.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}(),"reverse"===n.direction&&v.reverse();var k=e._fullLayout._currentFrame;if(k&&n.fromcurrent){var M=-1;for(p=0;p<v.length;p++)if("byname"===(g=v[p]).type&&g.name===k){M=p;break}if(M>0&&M<v.length-1){var T=[];for(p=0;p<v.length;p++)g=v[p],("byname"!==v[p].type||p>M)&&T.push(g);v=T}}v.length>0?function(t){if(0!==t.length){for(var a=0;a<t.length;a++){var o;o="byname"===t[a].type?d.computeFrame(e,t[a].name):t[a].data;var f=l(a),p=s(a);p.duration=Math.min(p.duration,f.duration);var g={frame:o,name:t[a].name,frameOpts:f,transitionOpts:p};a===t.length-1&&(g.onComplete=c(i,2),g.onInterrupt=u),r._frameQueue.push(g)}"immediate"===n.mode&&(r._lastFrameAt=-1/0),r._animationRaf||h()}}(v):(e.emit("plotly_animated"),i())})},n.addFrames=function(e,t,n){if(e=o.getGraphDiv(e),null===t||void 0===t)return Promise.resolve();if(!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plot.ly/javascript/animations/");var r,a,i,s,c=e._transitionData._frames,u=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var f=c.length+2*t.length,h=[],p={};for(r=t.length-1;r>=0;r--)if(o.isPlainObject(t[r])){var g=t[r].name,y=(u[g]||p[g]||{}).name,m=t[r].name,v=u[y]||p[y];y&&m&&"number"==typeof m&&v&&T<5&&(T++,o.warn('addFrames: overwriting frame "'+(u[y]||p[y]).name+'" with a frame whose name of type "number" also equates to "'+y+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===T&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[g]={name:g},h.push({frame:d.supplyFrameDefaults(t[r]),index:n&&void 0!==n[r]&&null!==n[r]?n[r]:f+r})}h.sort(function(e,t){return e.index>t.index?-1:e.index<t.index?1:0});var x=[],b=[],_=c.length;for(r=h.length-1;r>=0;r--){if("number"==typeof(a=h[r].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+e._transitionData._counter++];);if(u[a.name]){for(i=0;i<c.length&&(c[i]||{}).name!==a.name;i++);x.push({type:"replace",index:i,value:a}),b.unshift({type:"replace",index:i,value:c[i]})}else s=Math.max(0,Math.min(h[r].index,_)),x.push({type:"insert",index:s,value:a}),b.unshift({type:"delete",index:s}),_++}var w=d.modifyFrames,k=d.modifyFrames,M=[e,b],A=[e,x];return l&&l.add(e,w,M,k,A),d.modifyFrames(e,x)},n.deleteFrames=function(e,t){if(e=o.getGraphDiv(e),!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);var n,r,a=e._transitionData._frames,i=[],s=[];if(!t)for(t=[],n=0;n<a.length;n++)t.push(n);for((t=t.slice(0)).sort(),n=t.length-1;n>=0;n--)r=t[n],i.push({type:"delete",index:r}),s.unshift({type:"insert",index:r,value:a[r]});var c=d.modifyFrames,u=d.modifyFrames,f=[e,s],h=[e,i];return l&&l.add(e,c,f,u,h),d.modifyFrames(e,i)},n.purge=function(e){var t=(e=o.getGraphDiv(e))._fullLayout||{},n=e._fullData||[],r=e.calcdata||[];return d.cleanPlot([],{},n,t,r),d.purge(e),s.purge(e),t._container&&t._container.remove(),delete e._context,e}},{"../components/color":32,"../components/drawing":57,"../constants/xmlns_namespaces":136,"../lib":152,"../lib/events":145,"../lib/queue":166,"../lib/svg_text_utils":173,"../plots/cartesian/axes":194,"../plots/cartesian/constants":199,"../plots/cartesian/graph_interact":203,"../plots/plots":226,"../plots/polar/legacy":234,"../registry":241,"./edit_types":179,"./helpers":180,"./manage_arrays":182,"./plot_config":184,"./plot_schema":185,"./subroutines":186,d3:3,"fast-isnumeric":5,"has-hover":7}],184:[function(e,t,n){"use strict";t.exports={staticPlot:!1,editable:!1,edits:{annotationPosition:!1,annotationTail:!1,annotationText:!1,axisTitleText:!1,colorbarPosition:!1,colorbarTitleText:!1,legendPosition:!1,legendText:!1,shapePosition:!1,titleText:!1},autosizable:!1,queueLength:0,fillFrame:!1,frameMargins:0,scrollZoom:!1,doubleClick:"reset+autosize",showTips:!0,showAxisDragHandles:!0,showAxisRangeEntryBoxes:!0,showLink:!1,sendData:!0,linkText:"Edit chart",showSources:!1,displayModeBar:"hover",modeBarButtonsToRemove:[],modeBarButtonsToAdd:[],modeBarButtons:!1,displaylogo:!0,plotGlPixelRatio:2,setBackground:"transparent",topojsonURL:"https://cdn.plot.ly/",mapboxAccessToken:null,logging:1,globalTransforms:[],locale:"en-US",locales:{}}},{}],185:[function(e,t,n){"use strict";var r=e("../registry"),a=e("../lib"),i=e("../plots/attributes"),o=e("../plots/layout_attributes"),s=e("../plots/frame_attributes"),l=e("../plots/animation_attributes"),c=e("../plots/polar/legacy/area_attributes"),u=e("../plots/polar/legacy/axis_attributes"),d=e("./edit_types"),f=a.extendFlat,h=a.extendDeepAll,p=a.isPlainObject,g="_isSubplotObj",y="_isLinkedToArray",m=[g,y,"_arrayAttrRegexps","_deprecated"];function v(e,t,n){if(!e)return!1;if(e._isLinkedToArray)if(x(t[n]))n++;else if(n<t.length)return!1;for(;n<t.length;n++){var r=e[t[n]];if(!p(r))break;if(e=r,n===t.length-1)break;if(e._isLinkedToArray){if(!x(t[++n]))return!1}else if("info_array"===e.valType){var a=t[++n];if(!x(a))return!1;var i=e.items;if(Array.isArray(i)){if(a>=i.length)return!1;if(2===e.dimensions){if(n++,t.length===n)return e;var o=t[n];if(!x(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function x(e){return e===Math.round(e)&&e>=0}function b(e){return function(e){function t(e){return{valType:"string",role:"info",description:["Sets the source reference on plot.ly for ",e,"."].join(" "),editType:"none"}}n.crawl(e,function(e,r,a){n.isValObject(e)?"data_array"===e.valType?(e.role="data",a[r+"src"]=t(r)):!0===e.arrayOk&&(a[r+"src"]=t(r)):p(e)&&(e.role="object")})}(e),function(e){n.crawl(e,function(e,t,n){if(!e)return;var r=e[y];if(!r)return;delete e[y],n[t]={items:{}},n[t].items[r]=e,n[t].role="object"})}(e),function(e){!function e(t){for(var n in t)if(p(t[n]))e(t[n]);else if(Array.isArray(t[n]))for(var r=0;r<t[n].length;r++)e(t[n][r]);else t[n]instanceof RegExp&&(t[n]=t[n].toString())}(e)}(e),e}function _(e,t,n){var r=a.nestedProperty(e,n),i=h({},t.layoutAttributes);i[g]=!0,r.set(i)}function w(e,t,n){var r=a.nestedProperty(e,n);r.set(h(r.get()||{},t))}n.IS_SUBPLOT_OBJ=g,n.IS_LINKED_TO_ARRAY=y,n.DEPRECATED="_deprecated",n.UNDERSCORE_ATTRS=m,n.get=function(){var e={};r.allTypes.concat("area").forEach(function(t){e[t]=function(e){var t,n;"area"===e?(t={attributes:c},n={}):(t=r.modules[e]._module,n=t.basePlotModule);var a={type:null};h(a,i),h(a,t.attributes),n.attributes&&h(a,n.attributes);a.type=e;var o={meta:t.meta||{},attributes:b(a)};if(t.layoutAttributes){var s={};h(s,t.layoutAttributes),o.layoutAttributes=b(s)}return o}(t)});var t,n={};return Object.keys(r.transformsRegistry).forEach(function(e){n[e]=function(e){var t=r.transformsRegistry[e],n=h({},t.attributes);return Object.keys(r.componentsRegistry).forEach(function(t){var a=r.componentsRegistry[t];a.schema&&a.schema.transforms&&a.schema.transforms[e]&&Object.keys(a.schema.transforms[e]).forEach(function(t){w(n,a.schema.transforms[e][t],t)})}),{attributes:b(n)}}(e)}),{defs:{valObjects:a.valObjectMeta,metaKeys:m.concat(["description","role","editType","impliedEdits"]),editType:{traces:d.traces,layout:d.layout},impliedEdits:{description:["Sometimes when an attribute is changed, other attributes","must be altered as well in order to achieve the intended","result. For example, when `range` is specified, it is","important to set `autorange` to `false` or the new `range`","value would be lost in the redraw. `impliedEdits` is the","mechanism to do this: `impliedEdits: {autorange: false}`.","Each key is a relative paths to the attribute string to","change, using *^* to ascend into the parent container,","for example `range[0]` has `impliedEdits: {*^autorange*: false}`.","A value of `undefined` means that the attribute will not be","changed, but its previous value should be recorded in case","we want to reverse this change later. For example, `autorange`","has `impliedEdits: {*range[0]*: undefined, *range[1]*:undefined}","because the range will likely be changed by redraw."].join(" ")}},traces:e,layout:function(){var e,t,n={};for(e in h(n,o),r.subplotsRegistry)if((t=r.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a<t.attr.length;a++)_(n,t,t.attr[a]);else{var i="subplot"===t.attr?t.name:t.attr;_(n,t,i)}for(e in n=function(e){return f(e,{radialaxis:u.radialaxis,angularaxis:u.angularaxis}),f(e,u.layout),e}(n),r.componentsRegistry){var s=(t=r.componentsRegistry[e]).schema;if(s&&(s.subplots||s.layout)){var l=s.subplots;if(l&&l.xaxis&&!l.yaxis)for(var c in l.xaxis)delete n.yaxis[c]}else t.layoutAttributes&&w(n,t.layoutAttributes,t.name)}return{layoutAttributes:b(n)}}(),transforms:n,frames:(t={frames:a.extendDeepAll({},s)},b(t),t.frames),animation:b(l)}},n.crawl=function(e,t,r,a){var i=r||0;a=a||"",Object.keys(e).forEach(function(r){var o=e[r];if(-1===m.indexOf(r)){var s=(a?a+".":"")+r;t(o,r,e,i,s),n.isValObject(o)||p(o)&&"impliedEdits"!==r&&n.crawl(o,t,i+1,s)}})},n.isValObject=function(e){return e&&void 0!==e.valType},n.findArrayAttributes=function(e){var t,r,o=[],s=[],l=[];function c(e,n,i,c){s=s.slice(0,c).concat([n]),l=l.slice(0,c).concat([e&&e._isLinkedToArray]),e&&("data_array"===e.valType||!0===e.arrayOk)&&!("colorbar"===s[c-1]&&("ticktext"===n||"tickvals"===n))&&function e(t,n,i){var c=t[s[n]];var u=i+s[n];if(n===s.length-1)a.isArrayOrTypedArray(c)&&o.push(r+u);else if(l[n]){if(Array.isArray(c))for(var d=0;d<c.length;d++)a.isPlainObject(c[d])&&e(c[d],n+1,u+"["+d+"].")}else a.isPlainObject(c)&&e(c,n+1,u+".")}(t,0,"")}t=e,r="",n.crawl(i,c),e._module&&e._module.attributes&&n.crawl(e._module.attributes,c);var u=e.transforms;if(u)for(var d=0;d<u.length;d++){var f=u[d],h=f._module;h&&(r="transforms["+d+"].",t=f,n.crawl(h.attributes,c))}return o},n.getTraceValObject=function(e,t){var n,a,o=t[0],s=1;if("transforms"===o){if(1===t.length)return i.transforms;var l=e.transforms;if(!Array.isArray(l)||!l.length)return!1;var u=t[1];if(!x(u)||u>=l.length)return!1;a=(n=(r.transformsRegistry[l[u].type]||{}).attributes)&&n[t[2]],s=3}else if("area"===e.type)a=c[o];else{var d=e._module;if(d||(d=(r.modules[e.type||i.type.dflt]||{})._module),!d)return!1;if(!(a=(n=d.attributes)&&n[o])){var f=d.basePlotModule;f&&f.attributes&&(a=f.attributes[o])}a||(a=i[o])}return v(a,t,s)},n.getLayoutValObject=function(e,t){return v(function(e,t){var n,a,i,s,l=e._basePlotModules;if(l){var c;for(n=0;n<l.length;n++){if((i=l[n]).attrRegex&&i.attrRegex.test(t)){if(i.layoutAttrOverrides)return i.layoutAttrOverrides;!c&&i.layoutAttributes&&(c=i.layoutAttributes)}var d=i.baseLayoutAttrOverrides;if(d&&t in d)return d[t]}if(c)return c}var f=e._modules;if(f)for(n=0;n<f.length;n++)if((s=f[n].layoutAttributes)&&t in s)return s[t];for(a in r.componentsRegistry)if(!(i=r.componentsRegistry[a]).schema&&t===i.name)return i.layoutAttributes;if(t in o)return o[t];if("radialaxis"===t||"angularaxis"===t)return u[t];return u.layout[t]||!1}(e,t[0]),t,1)}},{"../lib":152,"../plots/animation_attributes":189,"../plots/attributes":191,"../plots/frame_attributes":221,"../plots/layout_attributes":224,"../plots/polar/legacy/area_attributes":232,"../plots/polar/legacy/axis_attributes":233,"../registry":241,"./edit_types":179}],186:[function(e,t,n){"use strict";var r=e("d3"),a=e("../registry"),i=e("../plots/plots"),o=e("../lib"),s=e("../lib/clear_gl_canvases"),l=e("../components/color"),c=e("../components/drawing"),u=e("../components/titles"),d=e("../components/modebar"),f=e("../plots/cartesian/axes"),h=e("../constants/alignment"),p=e("../plots/cartesian/constraints"),g=p.enforce,y=p.clean,m=e("../plots/cartesian/autorange").doAutoRange;function v(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||"all"===e.mirror||"allticks"===e.mirror)}function x(e,t,n){if(!n.showline||!n._lw)return!1;if("all"===n.mirror||"allticks"===n.mirror)return!0;var r=n._anchorAxis;if(!r)return!1;var a=h.FROM_BL[t];return n.side===t?r.domain[a]===e.domain[a]:n.mirror&&r.domain[1-a]===e.domain[1-a]}function b(e,t,n,r){if(x(e,t,n))return n._lw;for(var a=0;a<r.length;a++){var i=r[a];if(i._mainAxis===n._mainAxis&&x(e,t,i))return i._lw}return 0}n.layoutStyles=function(e){return o.syncOrAsync([i.doAutoMargin,n.lsInner],e)},n.lsInner=function(e){var t,a=e._fullLayout,i=a._size,s=i.p,u=f.list(e),p=a._has("cartesian");function g(e,t,n){var r=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===n?t._offset-s-r:t._offset+t._length+s+r:i.t+i.h*(1-(e.position||0))+r%1:t?"right"===n?t._offset+t._length+s+r:t._offset-s-r:i.l+i.w*(e.position||0)+r%1}for(t=0;t<u.length;t++){var y=u[t];y.setScale();var m=y._anchorAxis;y._linepositions={},y._lw=c.crispRound(e,y.linewidth,1),y._mainLinePosition=g(y,m,y.side),y._mainMirrorPosition=y.mirror&&m?g(y,m,h.OPPOSITE_SIDE[y.side]):null}a._paperdiv.style({width:a.width+"px",height:a.height+"px"}).selectAll(".main-svg").call(c.setSize,a.width,a.height),e._context.setBackground(e,a.paper_bgcolor);var x=a._paper.selectAll("g.subplot"),_=[],w=[];x.each(function(e){var t=a._plots[e];if(t.mainplot)return t.bg&&t.bg.remove(),void(t.bg=void 0);var n=t.xaxis.domain,r=t.yaxis.domain,i=t.plotgroup;if(function(e,t,n){for(var r=0;r<n.length;r++){var a=n[r][0],i=n[r][1];if(!(a[0]>=e[1]||a[1]<=e[0])&&i[0]<t[1]&&i[1]>t[0])return!0}return!1}(n,r,w)){var s=i.node(),l=t.bg=o.ensureSingle(i,"rect","bg");s.insertBefore(l.node(),s.childNodes[0])}else i.select("rect.bg").remove(),_.push(e),w.push([n,r])});var k=a._bgLayer.selectAll(".bg").data(_);return k.enter().append("rect").classed("bg",!0),k.exit().remove(),k.each(function(e){a._plots[e].bg=r.select(this)}),x.each(function(e){var t=a._plots[e],n=t.xaxis,r=t.yaxis;t.bg&&p&&t.bg.call(c.setRect,n._offset-s,r._offset-s,n._length+2*s,r._length+2*s).call(l.fill,a.plot_bgcolor).style("stroke-width",0);var i,d,f=t.clipId="clip"+a._uid+e+"plot",h=o.ensureSingleById(a._clips,"clipPath",f,function(e){e.classed("plotclip",!0).append("rect")});if(t.clipRect=h.select("rect").attr({width:n._length,height:r._length}),c.setTranslate(t.plot,n._offset,r._offset),t._hasClipOnAxisFalse?(i=null,d=f):(i=f,d=null),c.setClipUrl(t.plot,i),t.layerClipId=d,p){var y,m,x,_,w,k,M,T,A,S,L,C,z,O="M0,0";v(n,e)&&(w=b(n,"left",r,u),y=n._offset-(w?s+w:0),k=b(n,"right",r,u),m=n._offset+n._length+(k?s+k:0),x=g(n,r,"bottom"),_=g(n,r,"top"),(z=!n._anchorAxis||e!==n._mainSubplot)&&n.ticks&&"allticks"===n.mirror&&(n._linepositions[e]=[x,_]),O=j(n,P,function(e){return"M"+n._offset+","+e+"h"+n._length}),z&&n.showline&&("all"===n.mirror||"allticks"===n.mirror)&&(O+=P(x)+P(_)),t.xlines.style("stroke-width",n._lw+"px").call(l.stroke,n.showline?n.linecolor:"rgba(0,0,0,0)")),t.xlines.attr("d",O);var D="M0,0";v(r,e)&&(L=b(r,"bottom",n,u),M=r._offset+r._length+(L?s:0),C=b(r,"top",n,u),T=r._offset-(C?s:0),A=g(r,n,"left"),S=g(r,n,"right"),(z=!r._anchorAxis||e!==n._mainSubplot)&&r.ticks&&"allticks"===r.mirror&&(r._linepositions[e]=[A,S]),D=j(r,I,function(e){return"M"+e+","+r._offset+"v"+r._length}),z&&r.showline&&("all"===r.mirror||"allticks"===r.mirror)&&(D+=I(A)+I(S)),t.ylines.style("stroke-width",r._lw+"px").call(l.stroke,r.showline?r.linecolor:"rgba(0,0,0,0)")),t.ylines.attr("d",D)}function P(e){return"M"+y+","+e+"H"+m}function I(e){return"M"+e+","+T+"V"+M}function j(t,n,r){if(!t.showline||e!==t._mainSubplot)return"";if(!t._anchorAxis)return r(t._mainLinePosition);var a=n(t._mainLinePosition);return t.mirror&&(a+=n(t._mainMirrorPosition)),a}}),f.makeClipPaths(e),n.drawMainTitle(e),d.manage(e),e._promises.length&&Promise.all(e._promises)},n.drawMainTitle=function(e){var t=e._fullLayout;u.draw(e,"gtitle",{propContainer:t,propName:"title",placeholder:t._dfltTitle.plot,attributes:{x:t.width/2,y:t._size.t/2,"text-anchor":"middle"}})},n.doTraceStyle=function(e){for(var t=0;t<e.calcdata.length;t++){var n=e.calcdata[t],r=(((n[0]||{}).trace||{})._module||{}).arraysToCalcdata;r&&r(n,n[0].trace)}return i.style(e),a.getComponentMethod("legend","draw")(e),i.previousPromises(e)},n.doColorBars=function(e){for(var t=0;t<e.calcdata.length;t++){var n=e.calcdata[t][0];if((n.t||{}).cb){var r=n.trace,o=n.t.cb;a.traceIs(r,"contour")&&o.line({width:!1!==r.contours.showlines?r.line.width:0,dash:r.line.dash,color:"line"===r.contours.coloring?o._opts.line.color:r.line.color}),a.traceIs(r,"markerColorscale")?o.options(r.marker.colorbar)():o.options(r.colorbar)()}}return i.previousPromises(e)},n.layoutReplot=function(e){var t=e.layout;return e.layout=void 0,a.call("plot",e,"",t)},n.doLegend=function(e){return a.getComponentMethod("legend","draw")(e),i.previousPromises(e)},n.doTicksRelayout=function(e){return f.doTicks(e,"redraw"),e._fullLayout._hasOnlyLargeSploms&&(s(e),a.subplotsRegistry.splom.plot(e)),n.drawMainTitle(e),i.previousPromises(e)},n.doModeBar=function(e){var t=e._fullLayout;d.manage(e);for(var n=0;n<t._basePlotModules.length;n++){var r=t._basePlotModules[n].updateFx;r&&r(t)}return i.previousPromises(e)},n.doCamera=function(e){for(var t=e._fullLayout,n=t._subplots.gl3d,r=0;r<n.length;r++){var a=t[n[r]];a._scene.setCamera(a.camera)}},n.drawData=function(e){var t,n=e._fullLayout,r=e.calcdata;for(t=0;t<r.length;t++){var o=r[t][0].trace;!0===o.visible&&o._module.colorbar||n._infolayer.select(".cb"+o.uid).remove()}s(e);var l=n._basePlotModules;for(t=0;t<l.length;t++)l[t].plot(e);return i.style(e),a.getComponentMethod("shapes","draw")(e),a.getComponentMethod("annotations","draw")(e),n._replotting=!1,i.previousPromises(e)},n.doAutoRangeAndConstraints=function(e){for(var t=f.list(e,"",!0),n=0;n<t.length;n++){var r=t[n];y(e,r),m(r)}g(e)},n.finalDraw=function(e){a.getComponentMethod("shapes","draw")(e),a.getComponentMethod("images","draw")(e),a.getComponentMethod("annotations","draw")(e),a.getComponentMethod("legend","draw")(e),a.getComponentMethod("rangeslider","draw")(e),a.getComponentMethod("rangeselector","draw")(e),a.getComponentMethod("sliders","draw")(e),a.getComponentMethod("updatemenus","draw")(e)}},{"../components/color":32,"../components/drawing":57,"../components/modebar":95,"../components/titles":125,"../constants/alignment":132,"../lib":152,"../lib/clear_gl_canvases":141,"../plots/cartesian/autorange":193,"../plots/cartesian/axes":194,"../plots/cartesian/constraints":201,"../plots/plots":226,"../registry":241,d3:3}],187:[function(e,t,n){"use strict";var r=e("./plot_api"),a=e("../lib"),i=e("../snapshot/helpers"),o=e("../snapshot/tosvg"),s=e("../snapshot/svgtoimg"),l={format:{valType:"enumerated",values:["png","jpeg","webp","svg"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`"].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`"].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}},c=/^data:image\/\w+;base64,/;t.exports=function(e,t){var n,u,d;function f(e){return!(e in t)||a.validate(t[e],l[e])}if(t=t||{},a.isPlainObject(e)?(n=e.data||[],u=e.layout||{},d=e.config||{}):(e=a.getGraphDiv(e),n=a.extendDeep([],e.data),u=a.extendDeep({},e.layout),d=e._context),!f("width")||!f("height"))throw new Error("Height and width should be pixel values.");if(!f("format"))throw new Error("Image format is not jpeg, png, svg or webp.");var h={};function p(e,n){return a.coerce(t,h,l,e,n)}var g=p("format"),y=p("width"),m=p("height"),v=p("scale"),x=p("setBackground"),b=p("imageDataOnly"),_=document.createElement("div");_.style.position="absolute",_.style.left="-5000px",document.body.appendChild(_);var w=a.extendFlat({},u);y&&(w.width=y),m&&(w.height=m);var k=a.extendFlat({},d,{staticPlot:!0,setBackground:x}),M=i.getRedrawFunc(_);function T(){return new Promise(function(e){setTimeout(e,i.getDelay(_._fullLayout))})}function A(){return new Promise(function(e,t){var n=o(_,g,v),i=_._fullLayout.width,l=_._fullLayout.height;if(r.purge(_),document.body.removeChild(_),"svg"===g)return e(b?n:"data:image/svg+xml,"+encodeURIComponent(n));var c=document.createElement("canvas");c.id=a.randstr(),s({format:g,width:i,height:l,scale:v,canvas:c,svg:n,promise:!0}).then(e).catch(t)})}return new Promise(function(e,t){r.plot(_,n,w,k).then(M).then(T).then(A).then(function(t){e(function(e){return b?e.replace(c,""):e}(t))}).catch(function(e){t(e)})})}},{"../lib":152,"../snapshot/helpers":245,"../snapshot/svgtoimg":247,"../snapshot/tosvg":249,"./plot_api":183}],188:[function(e,t,n){"use strict";var r=e("../lib"),a=e("../plots/plots"),i=e("./plot_schema"),o=e("./plot_config"),s=r.isPlainObject,l=Array.isArray,c=r.isArrayOrTypedArray;function u(e,t,n,a,i,o){o=o||[];for(var d=Object.keys(e),f=0;f<d.length;f++){var y=d[f];if("transforms"!==y){var m=o.slice();m.push(y);var v=e[y],x=t[y],b=g(n,y),_="info_array"===(b||{}).valType,w="colorscale"===(b||{}).valType,k=(b||{}).items;if(p(n,y))if(s(v)&&s(x))u(v,x,b,a,i,m);else if(_&&l(v)){v.length>x.length&&a.push(h("unused",i,m.concat(x.length)));var M,T,A,S,L,C=x.length,z=Array.isArray(k);if(z&&(C=Math.min(C,k.length)),2===b.dimensions)for(T=0;T<C;T++)if(l(v[T])){v[T].length>x[T].length&&a.push(h("unused",i,m.concat(T,x[T].length)));var O=x[T].length;for(M=0;M<(z?Math.min(O,k[T].length):O);M++)A=z?k[T][M]:k,S=v[T][M],L=x[T][M],r.validate(S,A)?L!==S&&L!==+S&&a.push(h("dynamic",i,m.concat(T,M),S,L)):a.push(h("value",i,m.concat(T,M),S))}else a.push(h("array",i,m.concat(T),v[T]));else for(T=0;T<C;T++)A=z?k[T]:k,S=v[T],L=x[T],r.validate(S,A)?L!==S&&L!==+S&&a.push(h("dynamic",i,m.concat(T),S,L)):a.push(h("value",i,m.concat(T),S))}else if(b.items&&!_&&l(v)){var D,P,I=k[Object.keys(k)[0]],j=[];for(D=0;D<x.length;D++){var E=x[D]._index||D;(P=m.slice()).push(E),s(v[E])&&s(x[D])&&(j.push(E),u(v[E],x[D],I,a,i,P))}for(D=0;D<v.length;D++)(P=m.slice()).push(D),s(v[D])?-1===j.indexOf(D)&&a.push(h("unused",i,P)):a.push(h("object",i,P,v[D]))}else!s(v)&&s(x)?a.push(h("object",i,m,v)):c(v)||!c(x)||_||w?y in t?r.validate(v,b)?"enumerated"===b.valType&&(b.coerceNumber&&v!==+x||v!==x)&&a.push(h("dynamic",i,m,v,x)):a.push(h("value",i,m,v)):a.push(h("unused",i,m,v)):a.push(h("array",i,m,v));else a.push(h("schema",i,m))}}return a}t.exports=function(e,t){var n,c,d=i.get(),f=[],p={_context:r.extendFlat({},o)};l(e)?(p.data=r.extendDeep([],e),n=e):(p.data=[],n=[],f.push(h("array","data"))),s(t)?(p.layout=r.extendDeep({},t),c=t):(p.layout={},c={},arguments.length>1&&f.push(h("object","layout"))),a.supplyDefaults(p);for(var g=p._fullData,y=n.length,m=0;m<y;m++){var v=n[m],x=["data",m];if(s(v)){var b=g[m],_=b.type,w=d.traces[_].attributes;w.type={valType:"enumerated",values:[_]},!1===b.visible&&!1!==v.visible&&f.push(h("invisible",x)),u(v,b,w,f,x);var k=v.transforms,M=b.transforms;if(k){l(k)||f.push(h("array",x,["transforms"])),x.push("transforms");for(var T=0;T<k.length;T++){var A=["transforms",T],S=k[T].type;if(s(k[T])){var L=d.transforms[S]?d.transforms[S].attributes:{};L.type={valType:"enumerated",values:Object.keys(d.transforms)},u(k[T],M[T],L,f,x,A)}else f.push(h("object",x,A))}}}else f.push(h("object",x))}return u(c,p._fullLayout,function(e,t){for(var n=0;n<t.length;n++){var a=t[n].type,i=e.traces[a].layoutAttributes;i&&r.extendFlat(e.layout.layoutAttributes,i)}return e.layout.layoutAttributes}(d,g),f,"layout"),0===f.length?void 0:f};var d={object:function(e,t){return("layout"===e&&""===t?"The layout argument":"data"===e[0]&&""===t?"Trace "+e[1]+" in the data argument":f(e)+"key "+t)+" must be linked to an object container"},array:function(e,t){return("data"===e?"The data argument":f(e)+"key "+t)+" must be linked to an array container"},schema:function(e,t){return f(e)+"key "+t+" is not part of the schema"},unused:function(e,t,n){var r=s(n)?"container":"key";return f(e)+r+" "+t+" did not get coerced"},dynamic:function(e,t,n,r){return[f(e)+"key",t,"(set to '"+n+"')","got reset to","'"+r+"'","during defaults."].join(" ")},invisible:function(e){return"Trace "+e[1]+" got defaulted to be not visible"},value:function(e,t,n){return[f(e)+"key "+t,"is set to an invalid value ("+n+")"].join(" ")}};function f(e){return l(e)?"In data trace "+e[1]+", ":"In "+e+", "}function h(e,t,n,a,i){var o,s;n=n||"",l(t)?(o=t[0],s=t[1]):(o=t,s=null);var c=function(e){if(!l(e))return String(e);for(var t="",n=0;n<e.length;n++){var r=e[n];"number"==typeof r?t=t.substr(0,t.length-1)+"["+r+"]":t+=r,n<e.length-1&&(t+=".")}return t}(n),u=d[e](t,c,a,i);return r.log(u),{code:e,container:o,trace:s,path:n,astr:c,msg:u}}function p(e,t){var n=m(t),r=n.keyMinusId,a=n.id;return!!(r in e&&e[r]._isSubplotObj&&a)||t in e}function g(e,t){return e[m(t).keyMinusId]}var y=r.counterRegex("([a-z]+)");function m(e){var t=e.match(y);return{keyMinusId:t&&t[1],id:t&&t[2]}}},{"../lib":152,"../plots/plots":226,"./plot_config":184,"./plot_schema":185}],189:[function(e,t,n){"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",role:"info",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",role:"info",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,role:"info",description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",role:"info",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",role:"info",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",role:"info",min:0,dflt:500,description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],role:"info",description:"The easing function used for the transition"}}}},{}],190:[function(e,t,n){"use strict";var r=e("../lib");t.exports=function(e,t,n){var a,i=n.name,o=t[i],s=r.isArrayOrTypedArray(e[i])?e[i]:[],l=t[i]=[];for(a=0;a<s.length;a++){var c=s[a],u={},d={};r.isPlainObject(c)||(d.itemIsNotPlainObject=!0,c={}),n.handleItemDefaults(c,u,t,n,d),u._input=c,u._index=a,l.push(u)}if(r.isArrayOrTypedArray(o)){var f=Math.min(o.length,l.length);for(a=0;a<f;a++)r.relinkPrivateKeys(l[a],o[a])}}},{"../lib":152}],191:[function(e,t,n){"use strict";var r=e("../components/fx/attributes");t.exports={type:{valType:"enumerated",role:"info",values:[],dflt:"scatter",editType:"calc+clearAxisTypes"},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],role:"info",dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",role:"info",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legendgroup:{valType:"string",role:"info",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},opacity:{valType:"number",role:"style",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",role:"info",editType:"style",description:["Sets the trace name.","The trace name appear as the legend item and on hover."].join(" ")},uid:{valType:"string",role:"info",dflt:"",editType:"calc"},ids:{valType:"data_array",editType:"calc",description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},selectedpoints:{valType:"any",role:"info",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",role:"info",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:r.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,role:"info",editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://plot.ly/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,role:"info",editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")}}},{"../components/fx/attributes":66}],192:[function(e,t,n){"use strict";t.exports={xaxis:{valType:"subplotid",role:"info",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",role:"info",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}},{}],193:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").FP_SAFE;function o(e){var t,n,r,i,o,l,c,u,d=[],f=e._min[0].val,h=e._max[0].val,p=0,g=!1,y=s(e);for(t=1;t<e._min.length&&f===h;t++)f=Math.min(f,e._min[t].val);for(t=1;t<e._max.length&&f===h;t++)h=Math.max(h,e._max[t].val);if(e.range){var m=a.simpleMap(e.range,e.r2l);g=m[1]<m[0]}for("reversed"===e.autorange&&(g=!0,e.autorange=!0),t=0;t<e._min.length;t++)for(r=e._min[t],n=0;n<e._max.length;n++)u=(i=e._max[n]).val-r.val,c=e._length-y(r)-y(i),u>0&&c>0&&u/c>p&&(o=r,l=i,p=u/c);if(f===h){var v=f-1,x=f+1;d="tozero"===e.rangemode?f<0?[v,0]:[0,x]:"nonnegative"===e.rangemode?[Math.max(0,v),Math.max(0,x)]:[v,x]}else p&&("linear"!==e.type&&"-"!==e.type||("tozero"===e.rangemode?(o.val>=0&&(o={val:0,pad:0}),l.val<=0&&(l={val:0,pad:0})):"nonnegative"===e.rangemode&&(o.val-p*y(o)<0&&(o={val:0,pad:0}),l.val<0&&(l={val:1,pad:0})),p=(l.val-o.val)/(e._length-y(o)-y(l))),d=[o.val-p*y(o),l.val+p*y(l)]);return d[0]===d[1]&&("tozero"===e.rangemode?d=d[0]<0?[d[0],0]:d[0]>0?[0,d[0]]:[0,1]:(d=[d[0]-1,d[0]+1],"nonnegative"===e.rangemode&&(d[0]=Math.max(0,d[0])))),g&&d.reverse(),a.simpleMap(d,e.l2r||Number)}function s(e){var t=e._length/20;return"domain"===e.constrain&&e._inputDomain&&(t*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(e){return e.pad+(e.extrapad?t:0)}}function l(e){return r(e)&&Math.abs(e)<i}function c(e,t){return e<=t}function u(e,t){return e>=t}t.exports={getAutoRange:o,makePadFn:s,doAutoRange:function(e){e._length||e.setScale();var t,n=e._min&&e._max&&e._min.length&&e._max.length;e.autorange&&n&&(e.range=o(e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l),(t=e._input).range=e.range.slice(),t.autorange=e.autorange);if(e._anchorAxis&&e._anchorAxis.rangeslider){var r=e._anchorAxis.rangeslider[e._name];r&&"auto"===r.rangemode&&(r.range=n?o(e):e._rangeInitial?e._rangeInitial.slice():e.range.slice()),(t=e._anchorAxis._input).rangeslider[e._name]=a.extendFlat({},r)}},expand:function(e,t,n){if(!function(e){return e.autorange||e._rangesliderAutorange}(e)||!t)return;e._min||(e._min=[]);e._max||(e._max=[]);n||(n={});e._m||e.setScale();var a,o,s,d,f,h,p,g,y,m,v,x,b=t.length,_=n.padded||!1,w=n.tozero&&("linear"===e.type||"-"===e.type),k="log"===e.type,M=!1;function T(e){if(Array.isArray(e))return M=!0,function(t){return Math.max(Number(e[t]||0),0)};var t=Math.max(Number(e||0),0);return function(){return t}}var A=T((e._m>0?n.ppadplus:n.ppadminus)||n.ppad||0),S=T((e._m>0?n.ppadminus:n.ppadplus)||n.ppad||0),L=T(n.vpadplus||n.vpad),C=T(n.vpadminus||n.vpad);if(!M){if(v=1/0,x=-1/0,k)for(a=0;a<b;a++)(d=t[a])<v&&d>0&&(v=d),d>x&&d<i&&(x=d);else for(a=0;a<b;a++)(d=t[a])<v&&d>-i&&(v=d),d>x&&d<i&&(x=d);t=[v,x],b=2}function z(n){if(f=t[n],r(f))for(g=A(n),y=S(n),v=f-C(n),x=f+L(n),k&&v<x/10&&(v=x/10),h=e.c2l(v),p=e.c2l(x),w&&(h=Math.min(0,h),p=Math.max(0,p)),s=0;s<2;s++){var a=s?p:h;if(l(a)){var i=s?e._max:e._min,b=s?g:y,M=s?u:c;for(m=!0,o=0;o<i.length&&m;o++){if(d=i[o],M(d.val,a)&&d.pad>=b&&(d.extrapad||!_)){m=!1;break}M(a,d.val)&&d.pad<=b&&(_||!d.extrapad)&&(i.splice(o,1),o--)}if(m){var T=w&&0===a;i.push({val:a,pad:T?0:b,extrapad:!T&&_})}}}}var O=Math.min(6,b);for(a=0;a<O;a++)z(a);for(a=b-1;a>=O;a--)z(a)}}},{"../../constants/numerical":134,"../../lib":152,"fast-isnumeric":5}],194:[function(e,t,n){"use strict";var r=e("d3"),a=e("fast-isnumeric"),i=e("../../plots/plots"),o=e("../../registry"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),c=e("../../components/titles"),u=e("../../components/color"),d=e("../../components/drawing"),f=e("../../constants/numerical"),h=f.ONEAVGYEAR,p=f.ONEAVGMONTH,g=f.ONEDAY,y=f.ONEHOUR,m=f.ONEMIN,v=f.ONESEC,x=f.MINUS_SIGN,b=f.BADNUM,_=e("../../constants/alignment").MID_SHIFT,w=e("../../constants/alignment").LINE_SPACING,k=t.exports={};k.setConvert=e("./set_convert");var M=e("./axis_autotype"),T=e("./axis_ids");k.id2name=T.id2name,k.name2id=T.name2id,k.cleanId=T.cleanId,k.list=T.list,k.listIds=T.listIds,k.getFromId=T.getFromId,k.getFromTrace=T.getFromTrace;var A=e("./autorange");k.expand=A.expand,k.getAutoRange=A.getAutoRange,k.coerceRef=function(e,t,n,r,a,i){var o=r.charAt(r.length-1),l=n._fullLayout._subplots[o+"axis"],c=r+"ref",u={};return a||(a=l[0]||i),i||(i=a),u[c]={valType:"enumerated",values:l.concat(i?[i]:[]),dflt:a},s.coerce(e,t,u,c)},k.coercePosition=function(e,t,n,r,a,i){var o,l;if("paper"===r||"pixel"===r)o=s.ensureNumber,l=n(a,i);else{var c=k.getFromId(t,r);l=n(a,i=c.fraction2r(i)),o=c.cleanPos}e[a]=o(l)},k.cleanPosition=function(e,t,n){return("paper"===n||"pixel"===n?s.ensureNumber:k.getFromId(t,n).cleanPos)(e)};var S=k.getDataConversions=function(e,t,n,r){var a,i="x"===n||"y"===n||"z"===n?n:r;if(Array.isArray(i)){if(a={type:M(r),_categories:[]},k.setConvert(a),"category"===a.type)for(var o=0;o<r.length;o++)a.d2c(r[o])}else a=k.getFromTrace(e,t,i);return a?{d2c:a.d2c,c2d:a.c2d}:"ids"===i?{d2c:C,c2d:C}:{d2c:L,c2d:L}};function L(e){return+e}function C(e){return String(e)}k.getDataToCoordFunc=function(e,t,n,r){return S(e,t,n,r).d2c},k.counterLetter=function(e){var t=e.charAt(0);return"x"===t?"y":"y"===t?"x":void 0},k.minDtick=function(e,t,n,r){-1===["log","category"].indexOf(e.type)&&r?void 0===e._minDtick?(e._minDtick=t,e._forceTick0=n):e._minDtick&&((e._minDtick/t+1e-6)%1<2e-6&&((n-e._forceTick0)/t%1+1.000001)%1<2e-6?(e._minDtick=t,e._forceTick0=n):((t/e._minDtick+1e-6)%1>2e-6||((n-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},k.saveRangeInitial=function(e,t){for(var n=k.list(e,"",!0),r=!1,a=0;a<n.length;a++){var i=n[a],o=void 0===i._rangeInitial,s=o||!(i.range[0]===i._rangeInitial[0]&&i.range[1]===i._rangeInitial[1]);(o&&!1===i.autorange||t&&s)&&(i._rangeInitial=i.range.slice(),r=!0)}return r},k.saveShowSpikeInitial=function(e,t){for(var n=k.list(e,"",!0),r=!1,a="on",i=0;i<n.length;i++){var o=n[i],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||t&&l)&&(o._showSpikeInitial=o.showspikes,r=!0),"on"!==a||o.showspikes||(a="off")}return e._fullLayout._cartesianSpikesEnabled=a,r},k.autoBin=function(e,t,n,r,i){var o,l,c=s.aggNums(Math.min,null,e),u=s.aggNums(Math.max,null,e);if(i||(i=t.calendar),"category"===t.type)return{start:c-.5,end:u+.5,size:1,_dataSpan:u-c};if(n)o=(u-c)/n;else{var d=s.distinctVals(e),f=Math.pow(10,Math.floor(Math.log(d.minDiff)/Math.LN10)),h=f*s.roundUp(d.minDiff/f,[.9,1.9,4.9,9.9],!0);o=Math.max(h,2*s.stdev(e)/Math.pow(e.length,r?.25:.4)),a(o)||(o=1)}l="log"===t.type?{type:"linear",range:[c,u]}:{type:t.type,range:s.simpleMap([c,u],t.c2r,0,i),calendar:i},k.setConvert(l),k.autoTicks(l,o);var p,y=k.tickIncrement(k.tickFirst(l),l.dtick,"reverse",i);if("number"==typeof l.dtick)p=(y=function(e,t,n,r,i){var o=0,s=0,l=0,c=0;function u(t){return(1+100*(t-e)/n.dtick)%100<2}for(var d=0;d<t.length;d++)t[d]%1==0?l++:a(t[d])||c++,u(t[d])&&o++,u(t[d]+n.dtick/2)&&s++;var f=t.length-c;if(l===f&&"date"!==n.type)n.dtick<1?e=r-.5*n.dtick:(e-=.5)+n.dtick<r&&(e+=n.dtick);else if(s<.1*f&&(o>.3*f||u(r)||u(i))){var h=n.dtick/2;e+=e+h<r?h:-h}return e}(y,e,l,c,u))+(1+Math.floor((u-y)/l.dtick))*l.dtick;else for("M"===l.dtick.charAt(0)&&(y=function(e,t,n,r,a){var i=s.findExactDates(t,a);if(i.exactDays>.8){var o=Number(n.substr(1));i.exactYears>.8&&o%12==0?e=k.tickIncrement(e,"M6","reverse")+1.5*g:i.exactMonths>.8?e=k.tickIncrement(e,"M1","reverse")+15.5*g:e-=g/2;var l=k.tickIncrement(e,n);if(l<=r)return l}return e}(y,e,l.dtick,c,i)),p=y,0;p<=u;)p=k.tickIncrement(p,l.dtick,!1,i),0;return{start:t.c2r(y,0,i),end:t.c2r(p,0,i),size:l.dtick,_dataSpan:u-c}},k.prepTicks=function(e){var t=s.simpleMap(e.range,e.r2l);if("auto"===e.tickmode||!e.dtick){var n,r=e.nticks;r||("category"===e.type?(n=e.tickfont?1.2*(e.tickfont.size||12):15,r=e._length/n):(n="y"===e._id.charAt(0)?40:80,r=s.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(r*=2)),"array"===e.tickmode&&(r*=100),k.autoTicks(e,Math.abs(t[1]-t[0])/r),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}e.tick0||(e.tick0="date"===e.type?"2000-01-01":0),R(e)},k.calcTicks=function(e){k.prepTicks(e);var t=s.simpleMap(e.range,e.r2l);if("array"===e.tickmode)return function(e){var t,n,r=e.tickvals,a=e.ticktext,i=new Array(r.length),o=s.simpleMap(e.range,e.r2l),l=1.0001*o[0]-1e-4*o[1],c=1.0001*o[1]-1e-4*o[0],u=Math.min(l,c),d=Math.max(l,c),f=0;Array.isArray(a)||(a=[]);var h="category"===e.type?e.d2l_noadd:e.d2l;"log"===e.type&&"L"!==String(e.dtick).charAt(0)&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(n=0;n<r.length;n++)(t=h(r[n]))>u&&t<d&&(void 0===a[n]?i[f]=k.tickText(e,t):i[f]=F(e,t,String(a[n])),f++);f<r.length&&i.splice(f,r.length-f);return i}(e);e._tmin=k.tickFirst(e);var n=1.0001*t[0]-1e-4*t[1],r=1.0001*t[1]-1e-4*t[0],a=t[1]<t[0];if(e._tmin<n!==a)return[];var i=[];"category"===e.type&&(r=a?Math.max(-.5,r):Math.min(e._categories.length-.5,r));for(var o=null,l=Math.max(1e3,e._length||0),c=e._tmin;(a?c>=r:c<=r)&&!(i.length>l||c===o);c=k.tickIncrement(c,e.dtick,a,e.calendar))o=c,i.push(c);"angular"===e._id&&360===Math.abs(t[1]-t[0])&&i.pop(),e._tmax=i[i.length-1],e._prevDateHead="",e._inCalcTicks=!0;for(var u=new Array(i.length),d=0;d<i.length;d++)u[d]=k.tickText(e,i[d]);return e._inCalcTicks=!1,u};var z=[2,5,10],O=[1,2,3,6,12],D=[1,2,5,10,15,30],P=[1,2,3,7,14],I=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],j=[-.301,0,.301,.699,1],E=[15,30,45,90,180];function N(e,t,n){return t*s.roundUp(e/t,n)}function R(e){var t=e.dtick;if(e._tickexponent=0,a(t)||"string"==typeof t||(t=1),"category"===e.type&&(e._tickround=null),"date"===e.type){var n=e.r2l(e.tick0),r=e.l2r(n).replace(/(^-|i)/g,""),i=r.length;if("M"===String(t).charAt(0))i>10||"01-01"!==r.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12==0?"y":"m";else if(t>=g&&i<=10||t>=15*g)e._tickround="d";else if(t>=m&&i<=16||t>=y)e._tickround="M";else if(t>=v&&i<=19||t>=m)e._tickround="S";else{var o=e.l2r(n+t).replace(/^-/,"").length;e._tickround=Math.max(i,o)-20}}else if(a(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);a(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)>3&&(H(e.exponentformat)&&!q(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function F(e,t,n){var r=e.tickfont||{};return{x:t,dx:0,dy:0,text:n||"",fontSize:r.size,font:r.family,fontColor:r.color}}k.autoTicks=function(e,t){var n;function r(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=s.dateTick0(e.calendar);var i=2*t;i>h?(t/=h,n=r(10),e.dtick="M"+12*N(t,n,z)):i>p?(t/=p,e.dtick="M"+N(t,1,O)):i>g?(e.dtick=N(t,g,P),e.tick0=s.dateTick0(e.calendar,!0)):i>y?e.dtick=N(t,y,O):i>m?e.dtick=N(t,m,D):i>v?e.dtick=N(t,v,D):(n=r(10),e.dtick=N(t,n,z))}else if("log"===e.type){e.tick0=0;var o=s.simpleMap(e.range,e.r2l);if(t>.7)e.dtick=Math.ceil(t);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/t);t=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,n=r(10),e.dtick="L"+N(t,n,z)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):"angular"===e._id?(e.tick0=0,n=1,e.dtick=N(t,n,E)):(e.tick0=0,n=r(10),e.dtick=N(t,n,z));if(0===e.dtick&&(e.dtick=1),!a(e.dtick)&&"string"!=typeof e.dtick){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}},k.tickIncrement=function(e,t,n,i){var o=n?-1:1;if(a(t))return e+o*t;var l=t.charAt(0),c=o*Number(t.substr(1));if("M"===l)return s.incrementMonth(e,c,i);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?j:I,d=e+.01*o,f=s.roundUp(s.mod(d,1),u,n);return Math.floor(d)+Math.log(r.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},k.tickFirst=function(e){var t=e.r2l||Number,n=s.simpleMap(e.range,t),i=n[1]<n[0],o=i?Math.floor:Math.ceil,l=1.0001*n[0]-1e-4*n[1],c=e.dtick,u=t(e.tick0);if(a(c)){var d=o((l-u)/c)*c+u;return"category"===e.type&&(d=s.constrain(d,0,e._categories.length-1)),d}var f=c.charAt(0),h=Number(c.substr(1));if("M"===f){for(var p,g,y,m=0,v=u;m<10;){if(((p=k.tickIncrement(v,c,i,e.calendar))-l)*(v-l)<=0)return i?Math.min(v,p):Math.max(v,p);g=(l-(v+p)/2)/(p-v),y=f+(Math.abs(Math.round(g))||1)*h,v=k.tickIncrement(v,y,g<0?!i:i,e.calendar),m++}return s.error("tickFirst did not converge",e),v}if("L"===f)return Math.log(o((Math.pow(10,l)-u)/h)*h+u)/Math.LN10;if("D"===f){var x="D2"===c?j:I,b=s.roundUp(s.mod(l,1),x,i);return Math.floor(l)+Math.log(r.round(Math.pow(10,b),1))/Math.LN10}throw"unrecognized dtick "+String(c)},k.tickText=function(e,t,n){var r,i,o=F(e,t),l="array"===e.tickmode,c=n||l,u="category"===e.type?e.d2l_noadd:e.d2l;if(l&&Array.isArray(e.ticktext)){var d=s.simpleMap(e.range,e.r2l),f=Math.abs(d[1]-d[0])/1e4;for(i=0;i<e.ticktext.length&&!(Math.abs(t-u(e.tickvals[i]))<f);i++);if(i<e.ticktext.length)return o.text=String(e.ticktext[i]),o}function h(r){var a;return void 0===r||(n?"none"===r:(a={first:e._tmin,last:e._tmax}[r],"all"!==r&&t!==a))}return r=n?"never":"none"!==e.exponentformat&&h(e.showexponent)?"hide":"","date"===e.type?function(e,t,n,r){var i=e._tickround,o=n&&e.hoverformat||k.getTickFormat(e);r&&(i=a(i)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[i]);var l,c=s.formatDate(t.x,o,i,e._dateFormat,e.calendar,e._extraFormat),u=c.indexOf("\n");-1!==u&&(l=c.substr(u+1),c=c.substr(0,u));r&&("00:00:00"===c||"00:00"===c?(c=l,l=""):8===c.length&&(c=c.replace(/:00$/,"")));l&&(n?"d"===i?c+=", "+l:c=l+(c?", "+c:""):e._inCalcTicks&&l===e._prevDateHead||(c+="<br>"+l,e._prevDateHead=l));t.text=c}(e,o,n,c):"log"===e.type?function(e,t,n,r,i){var o=e.dtick,l=t.x,c=e.tickformat;"never"===i&&(i="");!r||"string"==typeof o&&"L"===o.charAt(0)||(o="L3");if(c||"string"==typeof o&&"L"===o.charAt(0))t.text=V(Math.pow(10,l),e,i,r);else if(a(o)||"D"===o.charAt(0)&&s.mod(l+.01,1)<.1){var u=Math.round(l);-1!==["e","E","power"].indexOf(e.exponentformat)||H(e.exponentformat)&&q(u)?(t.text=0===u?1:1===u?"10":u>1?"10<sup>"+u+"</sup>":"10<sup>"+x+-u+"</sup>",t.fontSize*=1.25):(t.text=V(Math.pow(10,l),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==o.charAt(0))throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,s.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var d=String(t.text).charAt(0);"0"!==d&&"1"!==d||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(l<0?.5:.25)))}}(e,o,0,c,r):"category"===e.type?function(e,t){var n=e._categories[Math.round(t.x)];void 0===n&&(n="");t.text=String(n)}(e,o):"angular"===e._id?function(e,t,n,r,a){if("radians"!==e.thetaunit||n)t.text=V(t.x,e,a,r);else{var i=t.x/180;if(0===i)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}var n=function(e){var n=1;for(;!t(Math.round(e*n)/n,e);)n*=10;return n}(e),r=e*n,a=Math.abs(function e(n,r){return t(r,0)?n:e(r,n%r)}(r,n));return[Math.round(r/a),Math.round(n/a)]}(i);if(o[1]>=100)t.text=V(s.deg2rad(t.x),e,a,r);else{var l=t.x<0;1===o[1]?1===o[0]?t.text="π":t.text=o[0]+"π":t.text=["<sup>",o[0],"</sup>","⁄","<sub>",o[1],"</sub>","π"].join(""),l&&(t.text=x+t.text)}}}}(e,o,n,c,r):function(e,t,n,r,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide");t.text=V(t.x,e,a,r)}(e,o,0,c,r),e.tickprefix&&!h(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!h(e.showticksuffix)&&(o.text+=e.ticksuffix),o},k.hoverLabelText=function(e,t,n){if(n!==b&&n!==t)return k.hoverLabelText(e,t)+" - "+k.hoverLabelText(e,n);var r="log"===e.type&&t<=0,a=k.tickText(e,e.c2l(r?-t:t),"hover").text;return r?0===t?"0":x+a:a};var B=["f","p","n","μ","m","","k","M","G","T"];function H(e){return"SI"===e||"B"===e}function q(e){return e>14||e<-15}function V(e,t,n,r){var i=e<0,o=t._tickround,l=n||t.exponentformat||"B",c=t._tickexponent,u=k.getTickFormat(t),d=t.separatethousands;if(r){var f={exponentformat:l,dtick:"none"===t.showexponent?t.dtick:a(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};R(f),o=(Number(f._tickround)||0)+4,c=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,x);var h,p=Math.pow(10,-o)/2;if("none"===l&&(c=0),(e=Math.abs(e))<p)e="0",i=!1;else{if(e+=p,c&&(e*=Math.pow(10,-c),o+=c),0===o)e=String(Math.floor(e));else if(o<0){e=(e=String(Math.round(e))).substr(0,e.length+o);for(var g=o;g<0;g++)e+="0"}else{var y=(e=String(e)).indexOf(".")+1;y&&(e=e.substr(0,y+o).replace(/\.?0+$/,""))}e=s.numSeparate(e,t._separators,d)}c&&"hide"!==l&&(H(l)&&q(c)&&(l="power"),h=c<0?x+-c:"power"!==l?"+"+c:String(c),"e"===l?e+="e"+h:"E"===l?e+="E"+h:"power"===l?e+="×10<sup>"+h+"</sup>":"B"===l&&9===c?e+="B":H(l)&&(e+=B[c/3+5]));return i?x+e:e}function U(e,t){for(var n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n])}function G(e,t,n){var r,a,i=[],o=[],l=e.layout;for(r=0;r<t.length;r++)i.push(k.getFromId(e,t[r]));for(r=0;r<n.length;r++)o.push(k.getFromId(e,n[r]));var c=Object.keys(i[0]),u=["anchor","domain","overlaying","position","side","tickangle"],d=["linear","log"];for(r=0;r<c.length;r++){var f=c[r],h=i[0][f],p=o[0][f],g=!0,y=!1,m=!1;if("_"!==f.charAt(0)&&"function"!=typeof h&&-1===u.indexOf(f)){for(a=1;a<i.length&&g;a++){var v=i[a][f];"type"===f&&-1!==d.indexOf(h)&&-1!==d.indexOf(v)&&h!==v?y=!0:v!==h&&(g=!1)}for(a=1;a<o.length&&g;a++){var x=o[a][f];"type"===f&&-1!==d.indexOf(p)&&-1!==d.indexOf(x)&&p!==x?m=!0:o[a][f]!==p&&(g=!1)}g&&(y&&(l[i[0]._name].type="linear"),m&&(l[o[0]._name].type="linear"),Y(l,f,i,o,e._fullLayout._dfltTitle))}}for(r=0;r<e._fullLayout.annotations.length;r++){var b=e._fullLayout.annotations[r];-1!==t.indexOf(b.xref)&&-1!==n.indexOf(b.yref)&&s.swapAttrs(l.annotations[r],["?"])}}function Y(e,t,n,r,a){var i,o=s.nestedProperty,l=o(e[n[0]._name],t).get(),c=o(e[r[0]._name],t).get();for("title"===t&&(l===a.x&&(l=a.y),c===a.y&&(c=a.x)),i=0;i<n.length;i++)o(e,n[i]._name+"."+t).set(c);for(i=0;i<r.length;i++)o(e,r[i]._name+"."+t).set(l)}k.getTickFormat=function(e){var t,n,r,a,i,o,s;function l(e){return"string"!=typeof e?e:Number(e.replace("M",""))*p}function c(e,t){var n=["L","D"];if(typeof e==typeof t){if("number"==typeof e)return e-t;var r=n.indexOf(e.charAt(0)),a=n.indexOf(t.charAt(0));return r===a?Number(e.replace(/(L|D)/g,""))-Number(t.replace(/(L|D)/g,"")):r-a}return"number"==typeof e?1:-1}function u(e,t){var n=null===t[0],r=null===t[1],a=c(e,t[0])>=0,i=c(e,t[1])<=0;return(n||a)&&(r||i)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t<e.tickformatstops.length;t++)if(r=e.dtick,a=e.tickformatstops[t].dtickrange,i=void 0,void 0,void 0,i=l||function(e){return e},o=a[0],s=a[1],(!o&&"number"!=typeof o||i(o)<=i(r))&&(!s&&"number"!=typeof s||i(s)>=i(r))){n=e.tickformatstops[t];break}break;case"log":for(t=0;t<e.tickformatstops.length;t++)if(u(e.dtick,e.tickformatstops[t].dtickrange)){n=e.tickformatstops[t];break}}return n?n.value:e.tickformat},k.getSubplots=function(e,t){var n=e._fullLayout._subplots,r=n.cartesian.concat(n.gl2d||[]),a=t?k.findSubplotsWithAxis(r,t):r;return a.sort(function(e,t){var n=e.substr(1).split("y"),r=t.substr(1).split("y");return n[0]===r[0]?+n[1]-+r[1]:+n[0]-+r[0]}),a},k.findSubplotsWithAxis=function(e,t){for(var n=new RegExp("x"===t._id.charAt(0)?"^"+t._id+"y":t._id+"$"),r=[],a=0;a<e.length;a++){var i=e[a];n.test(i)&&r.push(i)}return r},k.makeClipPaths=function(e){var t,n,a=e._fullLayout,i={_offset:0,_length:a.width,_id:""},o={_offset:0,_length:a.height,_id:""},s=k.list(e,"x",!0),l=k.list(e,"y",!0),c=[];for(t=0;t<s.length;t++)for(c.push({x:s[t],y:o}),n=0;n<l.length;n++)0===t&&c.push({x:i,y:l[n]}),c.push({x:s[t],y:l[n]});var u=a._clips.selectAll(".axesclip").data(c,function(e){return e.x._id+e.y._id});u.enter().append("clipPath").classed("axesclip",!0).attr("id",function(e){return"clip"+a._uid+e.x._id+e.y._id}).append("rect"),u.exit().remove(),u.each(function(e){r.select(this).select("rect").attr({x:e.x._offset||0,y:e.y._offset||0,width:e.x._length||1,height:e.y._length||1})})},k.doTicks=function(e,t,n){var f,h=e._fullLayout,p=!1;if("object"==typeof t)t=(f=t)._id,p=!0;else if(f=k.getFromId(e,t),"redraw"===t&&h._paper.selectAll("g.subplot").each(function(e){var t=h._plots[e],n=t.xaxis,r=t.yaxis;t.xaxislayer.selectAll("."+n._id+"tick").remove(),t.yaxislayer.selectAll("."+r._id+"tick").remove(),t.gridlayer&&t.gridlayer.selectAll("path").remove(),t.zerolinelayer&&t.zerolinelayer.selectAll("path").remove(),h._infolayer.select(".g-"+n._id+"title").remove(),h._infolayer.select(".g-"+r._id+"title").remove()}),!t||"redraw"===t)return s.syncOrAsync(k.list(e,"",!0).map(function(t){return function(){if(t._id){var n=k.doTicks(e,t._id);return t._r=t.range.slice(),t._rl=s.simpleMap(t._r,t.r2l),n}}}));f.setScale();var g,y,m,v,x,b,M=t.charAt(0),A=k.counterLetter(t),S=f._vals=k.calcTicks(f),L=function(e){return[e.text,e.x,f.mirror,e.font,e.fontSize,e.fontColor].join("_")},C=t+"tick",z=t+"grid",O=t+"zl",D=(f.linewidth||1)/2,P="outside"===f.ticks?f.ticklen:0,I=0,j=d.crispRound(e,f.gridwidth,1),E=d.crispRound(e,f.zerolinewidth,j),N=d.crispRound(e,f.tickwidth,1);if(f._counterangle&&"outside"===f.ticks){var R=f._counterangle*Math.PI/180;P=f.ticklen*Math.cos(R)+1,I=f.ticklen*Math.sin(R)}if(f.showticklabels&&("outside"===f.ticks||f.showline)&&(P+=.2*f.tickfont.size),"x"===M)g=["bottom","top"],y=f._transfn||function(e){return"translate("+(f._offset+f.l2p(e.x))+",0)"},m=function(e,t){if(f._counterangle){var n=f._counterangle*Math.PI/180;return"M0,"+e+"l"+Math.sin(n)*t+","+Math.cos(n)*t}return"M0,"+e+"v"+t};else if("y"===M)g=["left","right"],y=f._transfn||function(e){return"translate(0,"+(f._offset+f.l2p(e.x))+")"},m=function(e,t){if(f._counterangle){var n=f._counterangle*Math.PI/180;return"M"+e+",0l"+Math.cos(n)*t+","+-Math.sin(n)*t}return"M"+e+",0h"+t};else{if("angular"!==t)return void s.warn("Unrecognized doTicks axis:",t);g=["left","right"],y=f._transfn,m=function(e,t){return"M"+e+",0h"+t}}var F=f.side||g[0],B=[-1,1,F===g[1]?1:-1];if("inside"!==f.ticks==("x"===M)&&(B=B.map(function(e){return-e})),f.visible){f._tickFilter&&(S=S.filter(f._tickFilter));var H=S.filter(X);if("angular"===f._id&&(H=S),p){if(W(f._axislayer,m(f._pos+D*B[2],B[2]*f.ticklen)),f._counteraxis)K({gridlayer:f._gridlayer,zerolinelayer:f._zerolinelayer},f._counteraxis);return J(f._axislayer,f._pos)}if(h._has("cartesian")){var q={};(v=k.getSubplots(e,f)).map(function(e){var t=h._plots[e],n=t[A+"axis"],r=n._mainAxis._id;q[r]||(q[r]=1,K(t,n,e))});var V=f._mainSubplot,U=h._plots[V],G=[];if(f.ticks){var Y=B[2],Z=m(f._mainLinePosition+D*Y,Y*f.ticklen);f._anchorAxis&&f.mirror&&!0!==f.mirror&&(Z+=m(f._mainMirrorPosition-D*Y,-Y*f.ticklen)),W(U[M+"axislayer"],Z),G=Object.keys(f._linepositions||{})}return G.map(function(e){var t=h._plots[e][M+"axislayer"],n=f._linepositions[e]||[];function r(e){var t=B[e];return m(n[e]+D*t,t*f.ticklen)}W(t,r(0)+r(1))}),J(U[M+"axislayer"],f._mainLinePosition)}}function X(e){var t=f.l2p(e.x);return t>1&&t<f._length-1}function W(e,t){var n=e.selectAll("path."+C).data("inside"===f.ticks?H:S,L);t&&f.ticks?(n.enter().append("path").classed(C,1).classed("ticks",1).classed("crisp",1).call(u.stroke,f.tickcolor).style("stroke-width",N+"px").attr("d",t),n.attr("transform",y),n.exit().remove()):n.remove()}function J(n,o){if(x=n.selectAll("g."+C).data(S,L),!a(o))return x.remove(),void Q();if(!f.showticklabels)return x.remove(),Q(),void O();var c,u,p,g,m;"x"===M?(c=function(e){return e.dx+I*m},g=o+(P+D)*(m="bottom"===F?1:-1),u=function(e){return e.dy+g+e.fontSize*("bottom"===F?1:-.2)},p=function(e){return a(e)&&0!==e&&180!==e?e*m<0?"end":"start":"middle"}):"y"===M?(m="right"===F?1:-1,u=function(e){return e.dy+e.fontSize*_-I*m},c=function(e){return e.dx+o+(P+D+(90===Math.abs(f.tickangle)?e.fontSize/2:0))*m},p=function(e){return a(e)&&90===Math.abs(e)?"middle":"right"===F?"start":"end"}):"angular"===t&&(f._labelShift=I,f._labelStandoff=P,f._pad=D,c=f._labelx,u=f._labely,p=f._labelanchor);var k=0,T=0,A=[];function z(e,t){e.each(function(e){var n=p(t,e),i=r.select(this),o=i.select(".text-math-group"),s=y.call(i.node(),e)+(a(t)&&0!=+t?" rotate("+t+","+c(e)+","+(u(e)-e.fontSize/2)+")":""),f=function(e,t,n){var r=(e-1)*t;if("x"===M){if(n<-60||60<n)return-.5*r;if("top"===F)return-r}else{if((n*="left"===F?1:-1)<-30)return-r;if(n<30)return-.5*r}return 0}(l.lineCount(i),w*e.fontSize,a(t)?+t:0);if(f&&(s+=" translate(0, "+f+")"),o.empty())i.select("text").attr({transform:s,"text-anchor":n});else{var h=d.bBox(o.node()).width*{end:-.5,start:.5}[n];o.attr("transform",s+(h?"translate("+h+",0)":""))}})}function O(){if(f.showticklabels){var t=e.getBoundingClientRect(),r=n.node().getBoundingClientRect();f._boundingBox={width:r.width,height:r.height,left:r.left-t.left,right:r.right-t.left,top:r.top-t.top,bottom:r.bottom-t.top}}else{var a,i=h._size;"x"===M?(a="free"===f.anchor?i.t+i.h*(1-f.position):i.t+i.h*(1-f._anchorAxis.domain[{bottom:0,top:1}[f.side]]),f._boundingBox={top:a,bottom:a,left:f._offset,right:f._offset+f._length,width:f._length,height:0}):(a="free"===f.anchor?i.l+i.w*f.position:i.l+i.w*f._anchorAxis.domain[{left:0,right:1}[f.side]],f._boundingBox={left:a,right:a,bottom:f._offset+f._length,top:f._offset,height:f._length,width:0})}if(v){var o=f._counterSpan=[1/0,-1/0];for(b=0;b<v.length;b++){var s=h._plots[v[b]]["x"===M?"yaxis":"xaxis"];l(o,[s._offset,s._offset+s._length])}"free"===f.anchor&&l(o,"x"===M?[f._boundingBox.bottom,f._boundingBox.top]:[f._boundingBox.right,f._boundingBox.left])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.max(e[1],t[1])}}x.enter().append("g").classed(C,1).append("text").attr("text-anchor","middle").each(function(t){var n=r.select(this),a=e._promises.length;n.call(l.positionText,c(t),u(t)).call(d.font,t.font,t.fontSize,t.fontColor).text(t.text).call(l.convertToTspans,e),(a=e._promises[a])?A.push(e._promises.pop().then(function(){z(n,f.tickangle)})):z(n,f.tickangle)}),x.exit().remove(),x.each(function(e){k=Math.max(k,e.fontSize)}),"angular"===t&&x.each(function(e){r.select(this).select("text").call(l.positionText,c(e),u(e))}),z(x,f._lastangle||f.tickangle);var j=s.syncOrAsync([function(){return A.length&&Promise.all(A)},function(){if(z(x,f.tickangle),"x"===M&&!a(f.tickangle)&&("log"!==f.type||"D"!==String(f.dtick).charAt(0))){var e=[];for(x.each(function(t){var n=r.select(this),a=n.select(".text-math-group"),i=f.l2p(t.x);a.empty()&&(a=n.select("text"));var o=d.bBox(a.node());e.push({top:0,bottom:10,height:10,left:i-o.width/2,right:i+o.width/2+2,width:o.width+2})}),b=0;b<e.length-1;b++)if(s.bBoxIntersect(e[b],e[b+1])){T=30;break}T&&(Math.abs((S[S.length-1].x-S[0].x)*f._m)/(S.length-1)<2.5*k&&(T=90),z(x,T)),f._lastangle=T}return Q(),t+" done"},O,function(){if(f.automargin&&("x"===M||"y"===M)){var t=f.side[0],n={x:0,y:0,r:0,l:0,t:0,b:0};"x"===M?(n.y="free"===f.anchor?f.position:f._anchorAxis.domain["t"===t?1:0],n[t]+=f._boundingBox.height):(n.x="free"===f.anchor?f.position:f._anchorAxis.domain["r"===t?1:0],n[t]+=f._boundingBox.width),f.title!==h._dfltTitle[M]&&(n[t]+=f.titlefont.size);var r=f._name+".automargin",a=h._pushmargin[r];(!a||a[t].size<n[t])&&i.autoMargin(e,r,n)}}]);return j&&j.then&&e._promises.push(j),j}function Q(){if(!(n||f.rangeslider&&f.rangeslider.visible&&f._boundingBox&&"bottom"===f.side)){var r,a,i,o,s={selection:x,side:f.side},l=t.charAt(0),u=e._fullLayout._size,p=f.titlefont.size;if(x.size()){var g=d.getTranslate(x.node().parentNode);s.offsetLeft=g.x,s.offsetTop=g.y}var y=10+1.5*p+(f.linewidth?f.linewidth-1:0);"x"===l?(a="free"===f.anchor?{_offset:u.t+(1-(f.position||0))*u.h,_length:0}:T.getFromId(e,f.anchor),i=f._offset+f._length/2,o="top"===f.side?-y-p*(f.showticklabels?1:0):a._length+y+p*(f.showticklabels?1.5:.5),o+=a._offset,s.side||(s.side="bottom")):(a="free"===f.anchor?{_offset:u.l+(f.position||0)*u.w,_length:0}:T.getFromId(e,f.anchor),o=f._offset+f._length/2,i="right"===f.side?a._length+y+p*(f.showticklabels?1:.5):-y-p*(f.showticklabels?.5:0),i+=a._offset,r={rotate:"-90",offset:0},s.side||(s.side="left")),c.draw(e,t+"title",{propContainer:f,propName:f._name+".title",placeholder:h._dfltTitle[l],avoid:s,transform:r,attributes:{x:i,y:o,"text-anchor":"middle"}})}}function $(e,t){return!0===e.visible&&e.xaxis+e.yaxis===t&&(!(!o.traceIs(e,"bar")||e.orientation!=={x:"h",y:"v"}[M])||e.fill&&e.fill.charAt(e.fill.length-1)===M)}function K(n,a,i){if(!h._hasOnlyLargeSploms){var o=n.gridlayer.selectAll("."+t),l=n.zerolinelayer,c=n["hidegrid"+M]?[]:H,d=f._gridpath||("x"===M?"M0,"+a._offset+"v":"M"+a._offset+",0h")+a._length,p=o.selectAll("path."+z).data(!1===f.showgrid?[]:c,L);if(p.enter().append("path").classed(z,1).classed("crisp",1).attr("d",d).each(function(e){f.zeroline&&("linear"===f.type||"-"===f.type)&&Math.abs(e.x)<f.dtick/100&&r.select(this).remove()}),p.attr("transform",y).call(u.stroke,f.gridcolor||"#ddd").style("stroke-width",j+"px"),"function"==typeof d&&p.attr("d",d),p.exit().remove(),l){for(var g=!1,m=0;m<e._fullData.length;m++)if($(e._fullData[m],i)){g=!0;break}var v=s.simpleMap(f.range,f.r2l),x=v[0]*v[1]<=0&&f.zeroline&&("linear"===f.type||"-"===f.type)&&c.length&&(g||X({x:0})||!f.showline),b=l.selectAll("path."+O).data(x?[{x:0,id:t}]:[]);b.enter().append("path").classed(O,1).classed("zl",1).classed("crisp",1).attr("d",d).each(function(){l.selectAll("path").sort(function(e,t){return T.idSort(e.id,t.id)})}),b.attr("transform",y).call(u.stroke,f.zerolinecolor||u.defaultLine).style("stroke-width",E+"px"),b.exit().remove()}}}},k.swap=function(e,t){for(var n=function(e,t){var n,r,a=[];for(n=0;n<t.length;n++){var i=[],o=e._fullData[t[n]].xaxis,s=e._fullData[t[n]].yaxis;if(o&&s){for(r=0;r<a.length;r++)-1===a[r].x.indexOf(o)&&-1===a[r].y.indexOf(s)||i.push(r);if(i.length){var l,c=a[i[0]];if(i.length>1)for(r=1;r<i.length;r++)l=a[i[r]],U(c.x,l.x),U(c.y,l.y);U(c.x,[o]),U(c.y,[s])}else a.push({x:[o],y:[s]})}}return a}(e,t),r=0;r<n.length;r++)G(e,n[r].x,n[r].y)}},{"../../components/color":32,"../../components/drawing":57,"../../components/titles":125,"../../constants/alignment":132,"../../constants/numerical":134,"../../lib":152,"../../lib/svg_text_utils":173,"../../plots/plots":226,"../../registry":241,"./autorange":193,"./axis_autotype":195,"./axis_ids":197,"./set_convert":212,d3:3,"fast-isnumeric":5}],195:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").BADNUM;t.exports=function(e,t){return function(e,t){for(var n,i=0,o=0,s=Math.max(1,(e.length-1)/1e3),l=0;l<e.length;l+=s)n=e[Math.round(l)],a.isDateTime(n,t)&&(i+=1),r(n)&&(o+=1);return i>2*o}(e,t)?"date":function(e){for(var t,n=Math.max(1,(e.length-1)/1e3),r=0,o=0,s=0;s<e.length;s+=n)t=e[Math.round(s)],a.cleanNumber(t)!==i?r++:"string"==typeof t&&""!==t&&"None"!==t&&o++;return o>2*r}(e)?"category":function(e){if(!e)return!1;for(var t=0;t<e.length;t++)if(r(e[t]))return!0;return!1}(e)?"linear":"-"}},{"../../constants/numerical":134,"../../lib":152,"fast-isnumeric":5}],196:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("../../lib"),i=e("./layout_attributes"),o=e("./tick_value_defaults"),s=e("./tick_mark_defaults"),l=e("./tick_label_defaults"),c=e("./category_order_defaults"),u=e("./line_grid_defaults"),d=e("./set_convert");t.exports=function(e,t,n,f,h){var p=f.letter,g=t._id,y=f.font||{},m=n("visible",!f.cheateronly),v=t.type;"date"===v&&r.getComponentMethod("calendars","handleDefaults")(e,t,"calendar",f.calendar);d(t,h);var x=n("autorange",!t.isValidRange(e.range));if(t._rangesliderAutorange=!1,x&&n("rangemode"),n("range"),t.cleanRange(),c(e,t,n,f),"category"===v||f.noHover||n("hoverformat"),!m)return t;var b=n("color"),_=b===e.color?b:y.color;return n("title",((h._splomAxes||{})[p]||{})[g]||h._dfltTitle[p]),a.coerceFont(n,"titlefont",{family:y.family,size:Math.round(1.2*y.size),color:_}),o(e,t,n,v),l(e,t,n,v,f),s(e,t,n,f),u(e,t,n,{dfltColor:b,bgColor:f.bgColor,showGrid:f.showGrid,attributes:i}),(t.showline||t.ticks)&&n("mirror"),f.automargin&&n("automargin"),t}},{"../../lib":152,"../../registry":241,"./category_order_defaults":198,"./layout_attributes":206,"./line_grid_defaults":208,"./set_convert":212,"./tick_label_defaults":213,"./tick_mark_defaults":214,"./tick_value_defaults":215}],197:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("./constants");n.id2name=function(e){if("string"==typeof e&&e.match(a.AX_ID_PATTERN)){var t=e.substr(1);return"1"===t&&(t=""),e.charAt(0)+"axis"+t}},n.name2id=function(e){if(e.match(a.AX_NAME_PATTERN)){var t=e.substr(5);return"1"===t&&(t=""),e.charAt(0)+t}},n.cleanId=function(e,t){if(e.match(a.AX_ID_PATTERN)&&(!t||e.charAt(0)===t)){var n=e.substr(1).replace(/^0+/,"");return"1"===n&&(n=""),e.charAt(0)+n}},n.list=function(e,t,r){var a=e._fullLayout;if(!a)return[];var i,o=n.listIds(e,t),s=new Array(o.length);for(i=0;i<o.length;i++){var l=o[i];s[i]=a[l.charAt(0)+"axis"+l.substr(1)]}if(!r){var c=a._subplots.gl3d||[];for(i=0;i<c.length;i++){var u=a[c[i]];t?s.push(u[t+"axis"]):s.push(u.xaxis,u.yaxis,u.zaxis)}}return s},n.listIds=function(e,t){var n=e._fullLayout;if(!n)return[];var r=n._subplots;return t?r[t+"axis"]:r.xaxis.concat(r.yaxis)},n.getFromId=function(e,t,r){var a=e._fullLayout;return"x"===r?t=t.replace(/y[0-9]*/,""):"y"===r&&(t=t.replace(/x[0-9]*/,"")),a[n.id2name(t)]},n.getFromTrace=function(e,t,a){var i=e._fullLayout,o=null;if(r.traceIs(t,"gl3d")){var s=t.scene;"scene"===s.substr(0,5)&&(o=i[s][a+"axis"])}else o=n.getFromId(e,t[a+"axis"]||a);return o},n.idSort=function(e,t){var n=e.charAt(0),r=t.charAt(0);return n!==r?n>r?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)}},{"../../registry":241,"./constants":199}],198:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){if("category"===t.type){var a,i=e.categoryarray,o=Array.isArray(i)&&i.length>0;o&&(a="array");var s,l=n("categoryorder",a);"array"===l&&(s=n("categoryarray")),o||"array"!==l||(l=t.categoryorder="trace"),"trace"===l?t._initialCategories=[]:"array"===l?t._initialCategories=s.slice():(s=function(e,t){var n,r,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)n=t.axData;else for(n=[],r=0;r<t.data.length;r++){var s=t.data[r];s[i+"axis"]===e._id&&n.push(s)}for(r=0;r<n.length;r++){var l=n[r][i];for(a=0;a<l.length;a++){var c=l[a];null!==c&&void 0!==c&&(o[c]=1)}}return Object.keys(o)}(t,r).sort(),"category ascending"===l?t._initialCategories=s:"category descending"===l&&(t._initialCategories=s.reverse()))}}},{}],199:[function(e,t,n){"use strict";var r=e("../../lib/regex").counter;t.exports={idRegex:{x:r("x"),y:r("y")},attrRegex:r("[xy]axis"),xAxisMatch:r("xaxis"),yAxisMatch:r("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:"-select",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["heatmaplayer","contourcarpetlayer","contourlayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},{"../../lib/regex":167}],200:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("./axis_ids").id2name;t.exports=function(e,t,n,i,o){var s=o._axisConstraintGroups,l=t._id,c=l.charAt(0);if(!t.fixedrange&&(n("constrain"),r.coerce(e,t,{constraintoward:{valType:"enumerated",values:"x"===c?["left","center","right"]:["bottom","middle","top"],dflt:"x"===c?"center":"middle"}},"constraintoward"),e.scaleanchor)){var u=function(e,t,n,r){var i,o,s,l,c=r[a(t)].type,u=[];for(o=0;o<n.length;o++)(s=n[o])!==t&&((l=r[a(s)]).type!==c||l.fixedrange||u.push(s));for(i=0;i<e.length;i++)if(e[i][t]){var d=e[i],f=[];for(o=0;o<u.length;o++)s=u[o],d[s]||f.push(s);return{linkableAxes:f,thisGroup:d}}return{linkableAxes:u,thisGroup:null}}(s,l,i,o),d=r.coerce(e,t,{scaleanchor:{valType:"enumerated",values:u.linkableAxes}},"scaleanchor");if(d){var f=n("scaleratio");f||(f=t.scaleratio=1),function(e,t,n,r,a){var i,o,s,l,c;null===t?((t={})[n]=1,c=e.length,e.push(t)):c=e.indexOf(t);var u=Object.keys(t);for(i=0;i<e.length;i++)if(s=e[i],i!==c&&s[r]){var d=s[r];for(o=0;o<u.length;o++)l=u[o],s[l]=d*a*t[l];return void e.splice(c,1)}if(1!==a)for(o=0;o<u.length;o++)t[u[o]]*=a;t[r]=1}(s,u.thisGroup,l,d,f)}else-1!==i.indexOf(e.scaleanchor)&&r.warn("ignored "+t._name+'.scaleanchor: "'+e.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because the targetaxis has fixed range.')}}},{"../../lib":152,"./axis_ids":197}],201:[function(e,t,n){"use strict";var r=e("./axis_ids").id2name,a=e("./scale_zoom"),i=e("./autorange").makePadFn,o=e("../../constants/numerical").ALMOST_EQUAL,s=e("../../constants/alignment").FROM_BL;function l(e,t){var n=e._inputDomain,r=s[e.constraintoward],a=n[0]+(n[1]-n[0])*r;e.domain=e._input.domain=[a+(n[0]-a)/t,a+(n[1]-a)/t]}n.enforce=function(e){var t,n,s,c,u,d,f,h=e._fullLayout,p=h._axisConstraintGroups||[];for(t=0;t<p.length;t++){var g=p[t],y=Object.keys(g),m=1/0,v=0,x=1/0,b={},_={},w=!1;for(n=0;n<y.length;n++)_[s=y[n]]=c=h[r(s)],c._inputDomain?c.domain=c._inputDomain.slice():c._inputDomain=c.domain.slice(),c._inputRange||(c._inputRange=c.range.slice()),c.setScale(),b[s]=u=Math.abs(c._m)/g[s],m=Math.min(m,u),"domain"!==c.constrain&&c._constraintShrinkable||(x=Math.min(x,u)),delete c._constraintShrinkable,v=Math.max(v,u),"domain"===c.constrain&&(w=!0);if(!(m>o*v)||w)for(n=0;n<y.length;n++)if(u=b[s=y[n]],d=(c=_[s]).constrain,u!==x||"domain"===d)if(f=u/x,"range"===d)a(c,f);else{var k=c._inputDomain,M=(c.domain[1]-c.domain[0])/(k[1]-k[0]),T=(c.r2l(c.range[1])-c.r2l(c.range[0]))/(c.r2l(c._inputRange[1])-c.r2l(c._inputRange[0]));if((f/=M)*T<1){c.domain=c._input.domain=k.slice(),a(c,f);continue}if(T<1&&(c.range=c._input.range=c._inputRange.slice(),f*=T),c.autorange&&c._min.length&&c._max.length){var A=c.r2l(c.range[0]),S=c.r2l(c.range[1]),L=(A+S)/2,C=L,z=L,O=Math.abs(S-L),D=L-O*f*1.0001,P=L+O*f*1.0001,I=i(c);l(c,f),c.setScale();var j,E,N=Math.abs(c._m);for(E=0;E<c._min.length;E++)(j=c._min[E].val-I(c._min[E])/N)>D&&j<C&&(C=j);for(E=0;E<c._max.length;E++)(j=c._max[E].val+I(c._max[E])/N)<P&&j>z&&(z=j);f/=(z-C)/(2*O),C=c.l2r(C),z=c.l2r(z),c.range=c._input.range=A<S?[C,z]:[z,C]}l(c,f)}}},n.clean=function(e,t){if(t._inputDomain){for(var n=!1,r=t._id,a=e._fullLayout._axisConstraintGroups,i=0;i<a.length;i++)if(a[i][r]){n=!0;break}n&&"domain"===t.constrain||(t._input.domain=t.domain=t._inputDomain,delete t._inputDomain)}}},{"../../constants/alignment":132,"../../constants/numerical":134,"./autorange":193,"./axis_ids":197,"./scale_zoom":210}],202:[function(e,t,n){"use strict";var r=e("d3"),a=e("tinycolor2"),i=e("has-passive-events"),o=e("../../registry"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),c=e("../../lib/clear_gl_canvases"),u=e("../../components/color"),d=e("../../components/drawing"),f=e("../../components/fx"),h=e("../../lib/setcursor"),p=e("../../components/dragelement"),g=e("../../constants/alignment").FROM_TL,y=e("../plots"),m=e("./axes").doTicks,v=e("./axis_ids").getFromId,x=e("./select").prepSelect,b=e("./select").clearSelect,_=e("./scale_zoom"),w=e("./constants"),k=w.MINDRAG,M=w.MINZOOM,T=!0;function A(e,t,n,r){var a=s.ensureSingle(e.draglayer,t,n,function(t){t.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)});return a.call(h,r),a.node()}function S(e,t,n,a,i,o,s){var l=A(e,"rect",t,n);return r.select(l).call(d.setRect,a,i,o,s),l}function L(e,t){for(var n=0;n<e.length;n++)if(!e[n].fixedrange)return t;return""}function C(e,t,n,r,a){var i,o,s,l;for(i=0;i<e.length;i++)(o=e[i]).fixedrange||(s=o._rl[0],l=o._rl[1]-s,o.range=[o.l2r(s+l*t),o.l2r(s+l*n)],r[o._name+".range[0]"]=o.range[0],r[o._name+".range[1]"]=o.range[1]);if(a&&a.length){var c=(t+(1-n))/2;C(a,c,1-c,r)}}function z(e,t){for(var n=0;n<e.length;n++){var r=e[n];r.fixedrange||(r.range=[r.l2r(r._rl[0]-t/r._m),r.l2r(r._rl[1]-t/r._m)])}}function O(e){return 1-(e>=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function D(e,t,n,r,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+n+", "+r+")").attr("d",a+"Z")}function P(e,t,n){return e.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+t+", "+n+")").attr("d","M0,0Z")}function I(e,t,n,r,a,i){e.attr("d",r+"M"+n.l+","+n.t+"v"+n.h+"h"+n.w+"v-"+n.h+"h-"+n.w+"Z"),j(e,t,a,i)}function j(e,t,n,r){n||(e.transition().style("fill",r>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function E(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function N(e){T&&e.data&&e._context.showTips&&(s.notifier(s._(e,"Double-click to zoom back out"),"long"),T=!1)}function R(e){return"lasso"===e||"select"===e}function F(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,M)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function B(e,t){if(i){var n=void 0!==e.onwheel?"wheel":"mousewheel";e._onwheel&&e.removeEventListener(n,e._onwheel),e._onwheel=t,e.addEventListener(n,t,{passive:!1})}else void 0!==e.onwheel?e.onwheel=t:void 0!==e.onmousewheel&&(e.onmousewheel=t)}function H(e){var t=[];for(var n in e)t.push(e[n]);return t}t.exports={makeDragBox:function(e,t,n,i,u,h,T,A){var j,q,V,U,G,Y,Z,X,W,J,Q,$,K,ee,te,ne,re,ae=e._fullLayout._zoomlayer,ie=T+A==="nsew",oe=1===(T+A).length;function se(){if(j=t.xaxis,q=t.yaxis,W=j._length,J=q._length,Z=j._offset,X=q._offset,(V={})[j._id]=j,(U={})[q._id]=q,T&&A)for(var n=t.overlays,r=0;r<n.length;r++){var a=n[r].xaxis;V[a._id]=a;var i=n[r].yaxis;U[i._id]=i}G=H(V),Y=H(U),$=L(G,A),K=L(Y,T),ee=!K&&!$,Q=function(e,t,n){for(var r,a,i,o,l=e._fullLayout._axisConstraintGroups,c=!1,u={},d={},f=0;f<l.length;f++){var h=l[f];for(r in t)if(h[r]){for(i in h)("x"===i.charAt(0)?t:n)[i]||(u[i]=1);for(a in n)h[a]&&(c=!0)}for(a in n)if(h[a])for(o in h)("x"===o.charAt(0)?t:n)[o]||(d[o]=1)}c&&(s.extendFlat(u,d),d={});var p={},g=[];for(i in u){var y=v(e,i);g.push(y),p[y._id]=y}var m={},x=[];for(o in d){var b=v(e,o);x.push(b),m[b._id]=b}return{xaHash:p,yaHash:m,xaxes:g,yaxes:x,isSubplotConstrained:c}}(e,V,U),te=Q.isSubplotConstrained,ne=A||te,re=T||te}se();var le=function(e,t,n){return e?"nsew"===e?n?"":"pan"===t?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}(K+$,e._fullLayout.dragmode,ie),ce=S(t,T+A+"drag",le,n,i,u,h);if(ee&&!ie)return ce.onmousedown=null,ce.style.pointerEvents="none",ce;var ue,de,fe,he,pe,ge,ye,me,ve,xe={element:ce,gd:e,plotinfo:t,prepFn:function(t,n,r){var i=e._fullLayout.dragmode;se(),ee||(ie?t.shiftKey?"pan"===i?i="zoom":R(i)||(i="pan"):t.ctrlKey&&(i="pan"):i="pan"),xe.minDrag="lasso"===i?1:void 0,R(i)?(xe.xaxes=G,xe.yaxes=Y,x(t,n,r,xe,i)):ee?b(ae):"zoom"===i?(xe.moveFn=_e,xe.doneFn=we,xe.minDrag=1,function(t,n,r){var i=ce.getBoundingClientRect();ue=n-i.left,de=r-i.top,fe={l:ue,r:ue,w:0,t:de,b:de,h:0},he=e._hmpixcount?e._hmlumcount/e._hmpixcount:a(e._fullLayout.plot_bgcolor).getLuminance(),ge=!1,ye="xy",me=D(ae,he,Z,X,pe="M0,0H"+W+"V"+J+"H0V0"),ve=P(ae,Z,X),b(ae)}(0,n,r)):"pan"===i&&(xe.moveFn=Se,xe.doneFn=Ce,b(ae))},clickFn:function(n,a){if(E(e),2!==n||oe||function(){if(!e._transitioningWithDuration){var t,n,r,a=e._context.doubleClick,i=($?G:[]).concat(K?Y:[]),s={};if("reset+autosize"===a)for(a="autosize",n=0;n<i.length;n++)if((t=i[n])._rangeInitial&&(t.range[0]!==t._rangeInitial[0]||t.range[1]!==t._rangeInitial[1])||!t._rangeInitial&&!t.autorange){a="reset";break}if("autosize"===a)for(n=0;n<i.length;n++)(t=i[n]).fixedrange||(s[t._name+".autorange"]=!0);else if("reset"===a)for(($||te)&&(i=i.concat(Q.xaxes)),K&&!te&&(i=i.concat(Q.yaxes)),te&&($?K||(i=i.concat(Y)):i=i.concat(G)),n=0;n<i.length;n++)(t=i[n])._rangeInitial?(r=t._rangeInitial,s[t._name+".range[0]"]=r[0],s[t._name+".range[1]"]=r[1]):s[t._name+".autorange"]=!0;e.emit("plotly_doubleclick",null),o.call("relayout",e,s)}}(),ie)f.click(e,a,t.id);else if(1===n&&oe){var i=T?q:j,s="s"===T||"w"===A?0:1,c=i._name+".range["+s+"]",u=function(e,t){var n,a=e.range[t],i=Math.abs(a-e.range[1-t]);return"date"===e.type?a:"log"===e.type?(n=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,r.format("."+n+"g")(Math.pow(10,a))):(n=Math.floor(Math.log(Math.abs(a))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,r.format("."+String(n)+"g")(a))}(i,s),d="left",h="middle";if(i.fixedrange)return;T?(h="n"===T?"top":"bottom","right"===i.side&&(d="right")):"e"===A&&(d="right"),e._context.showAxisRangeEntryBoxes&&r.select(ce).call(l.makeEditable,{gd:e,immediate:!0,background:e._fullLayout.paper_bgcolor,text:String(u),fill:i.tickfont?i.tickfont.color:"#444",horizontalAlign:d,verticalAlign:h}).on("edit",function(t){var n=i.d2r(t);void 0!==n&&o.call("relayout",e,c,n)})}}};p.init(xe);var be={};function _e(t,n){if(e._transitioningWithDuration)return!1;var r=Math.max(0,Math.min(W,t+ue)),a=Math.max(0,Math.min(J,n+de)),i=Math.abs(r-ue),o=Math.abs(a-de);function s(){ye="",fe.r=fe.l,fe.t=fe.b,ve.attr("d","M0,0Z")}fe.l=Math.min(ue,r),fe.r=Math.max(ue,r),fe.t=Math.min(de,a),fe.b=Math.max(de,a),te?i>M||o>M?(ye="xy",i/W>o/J?(o=i*J/W,de>a?fe.t=de-o:fe.b=de+o):(i=o*W/J,ue>r?fe.l=ue-i:fe.r=ue+i),ve.attr("d",F(fe))):s():!K||o<Math.min(Math.max(.6*i,k),M)?i<k?s():(fe.t=0,fe.b=J,ye="x",ve.attr("d",function(e,t){return"M"+(e.l-.5)+","+(t-M-.5)+"h-3v"+(2*M+1)+"h3ZM"+(e.r+.5)+","+(t-M-.5)+"h3v"+(2*M+1)+"h-3Z"}(fe,de))):!$||i<Math.min(.6*o,M)?(fe.l=0,fe.r=W,ye="y",ve.attr("d",function(e,t){return"M"+(t-M-.5)+","+(e.t-.5)+"v-3h"+(2*M+1)+"v3ZM"+(t-M-.5)+","+(e.b+.5)+"v3h"+(2*M+1)+"v-3Z"}(fe,ue))):(ye="xy",ve.attr("d",F(fe))),fe.w=fe.r-fe.l,fe.h=fe.b-fe.t,I(me,ve,fe,pe,ge,he),ge=!0}function we(){if(Math.min(fe.h,fe.w)<2*k)return E(e);"xy"!==ye&&"x"!==ye||C(G,fe.l/W,fe.r/W,be,Q.xaxes),"xy"!==ye&&"y"!==ye||C(Y,(J-fe.b)/J,(J-fe.t)/J,be,Q.yaxes),E(e),Ce(),N(e)}var ke=[0,0,W,J],Me=null,Te=w.REDRAWDELAY,Ae=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function Se(t,n){if(!e._transitioningWithDuration){if("ew"===$||"ns"===K)return $&&z(G,t),K&&z(Y,n),ze([$?-t:0,K?-n:0,W,J]),void Le(K,$);if(te&&$&&K){var r="w"===$==("n"===K)?1:-1,a=(t/W+r*n/J)/2;t=a*W,n=r*a*J}"w"===$?t=l(G,0,t):"e"===$?t=l(G,1,-t):$||(t=0),"n"===K?n=l(Y,1,n):"s"===K?n=l(Y,0,-n):K||(n=0);var i="w"===$?t:0,o="n"===K?n:0;if(te){var s;if(!$&&1===K.length){for(s=0;s<G.length;s++)G[s].range=G[s]._r.slice(),_(G[s],1-n/J);i=(t=n*W/J)/2}if(!K&&1===$.length){for(s=0;s<Y.length;s++)Y[s].range=Y[s]._r.slice(),_(Y[s],1-t/W);o=(n=t*J/W)/2}}ze([i,o,W-t,J-n]),Le(K,$)}function l(e,t,n){for(var r,a,i=1-t,o=0;o<e.length;o++){var s=e[o];if(!s.fixedrange){r=s,a=s._rl[i]+(s._rl[t]-s._rl[i])/O(n/s._length);var l=s.l2r(a);!1!==l&&void 0!==l&&(s.range[t]=l)}}return r._length*(r._rl[t]-a)/(r._rl[t]-r._rl[i])}}function Le(t,n){var r,a=[];function i(e){for(r=0;r<e.length;r++)e[r].fixedrange||a.push(e[r]._id)}for(ne&&(i(G),i(Q.xaxes)),re&&(i(Y),i(Q.yaxes)),be={},r=0;r<a.length;r++){var s=a[r];m(e,s,!0);var l=v(e,s);be[l._name+".range[0]"]=l.range[0],be[l._name+".range[1]"]=l.range[1]}function c(i,o,s){for(r=0;r<i.length;r++){var l=i[r];if((n&&-1!==a.indexOf(l.xref)||t&&-1!==a.indexOf(l.yref))&&(o(e,r),s))return}}c(e._fullLayout.annotations||[],o.getComponentMethod("annotations","drawOne")),c(e._fullLayout.shapes||[],o.getComponentMethod("shapes","drawOne")),c(e._fullLayout.images||[],o.getComponentMethod("images","draw"),!0)}function Ce(){ze([0,0,W,J]),s.syncOrAsync([y.previousPromises,function(){o.call("relayout",e,be)}],e)}function ze(t){var n,r,a,i,l=e._fullLayout,u=l._plots,f=l._subplots.cartesian,h=l._has("scattergl"),p=l._hasOnlyLargeSploms,g=p||l._has("splom"),y=l._has("svg"),m=l._has("draggedPts");if((g||h)&&c(e),!g||(o.subplotsRegistry.splom.drag(e),!p)){if(h)for(n=0;n<f.length;n++){a=(r=u[f[n]]).xaxis,i=r.yaxis;var v=r._scene;if(v){var x=s.simpleMap(a.range,a.r2l),b=s.simpleMap(i.range,i.r2l);v.update({range:[x[0],b[0],x[1],b[1]]})}}if(y){var _=t[2]/j._length,w=t[3]/q._length;for(n=0;n<f.length;n++){a=(r=u[f[n]]).xaxis,i=r.yaxis;var k,M,S,L,C=ne&&!a.fixedrange&&V[a._id],z=re&&!i.fixedrange&&U[i._id];if(C?(k=_,S=A?t[0]:Pe(a,k)):S=De(a,k=Oe(a,_,w)),z?(M=w,L=T?t[1]:Pe(i,M)):L=De(i,M=Oe(i,_,w)),k||M){k||(k=1),M||(M=1);var O=a._offset-S/k,D=i._offset-L/M;if(r.clipRect.call(d.setTranslate,S,L).call(d.setScale,k,M),r.plot.call(d.setTranslate,O,D).call(d.setScale,1/k,1/M),m){var P=r.plot.selectAll(".scatterlayer .trace, .boxlayer .trace, .violinlayer .trace");P.selectAll(".point").call(d.setPointGroupScale,k,M),P.selectAll(".textpoint").call(d.setTextPointsScale,k,M),P.call(d.hideOutsideRangePoints,r),r.plot.selectAll(".barlayer .trace").call(d.hideOutsideRangePoints,r,".bartext")}}}}}}function Oe(e,t,n){return e.fixedrange?0:ne&&Q.xaHash[e._id]?t:re&&(te?Q.xaHash:Q.yaHash)[e._id]?n:0}function De(e,t){return t?(e.range=e._r.slice(),_(e,t),Pe(e,t)):0}function Pe(e,t){return e._length*(1-t)*g[e.constraintoward||"middle"]}return T.length*A.length!=1&&B(ce,function(t){if(e._context.scrollZoom||e._fullLayout._enablescrollzoom){if(null===Me&&b(ae),e._transitioningWithDuration)return t.preventDefault(),void t.stopPropagation();var n=e.querySelector(".plotly");if(se(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(Me);var r=-t.deltaY;if(isFinite(r)||(r=t.wheelDelta/10),isFinite(r)){var a,i=Math.exp(-Math.min(Math.max(r,-20),20)/200),o=Ae.draglayer.select(".nsewdrag").node().getBoundingClientRect(),l=(t.clientX-o.left)/o.width,c=(o.bottom-t.clientY)/o.height;if(ne){for(A||(l=.5),a=0;a<G.length;a++)u(G[a],l,i);ke[2]*=i,ke[0]+=ke[2]*l*(1/i-1)}if(re){for(T||(c=.5),a=0;a<Y.length;a++)u(Y[a],c,i);ke[3]*=i,ke[1]+=ke[3]*(1-c)*(1/i-1)}ze(ke),Le(T,A),Me=setTimeout(function(){ke=[0,0,W,J],Ce()},Te),t.preventDefault()}else s.log("Did not find wheel motion attributes: ",t)}}function u(e,t,n){if(!e.fixedrange){var r=s.simpleMap(e.range,e.r2l),a=r[0]+(r[1]-r[0])*t;e.range=r.map(function(t){return e.l2r(a+(t-a)*n)})}}}),ce},makeDragger:A,makeRectDragger:S,makeZoombox:D,makeCorners:P,updateZoombox:I,xyCorners:F,transitionZoombox:j,removeZoombox:E,showDoubleClickNotifier:N,attachWheelEventHandler:B}},{"../../components/color":32,"../../components/dragelement":54,"../../components/drawing":57,"../../components/fx":74,"../../constants/alignment":132,"../../lib":152,"../../lib/clear_gl_canvases":141,"../../lib/setcursor":171,"../../lib/svg_text_utils":173,"../../registry":241,"../plots":226,"./axes":194,"./axis_ids":197,"./constants":199,"./scale_zoom":210,"./select":211,d3:3,"has-passive-events":8,tinycolor2:293}],203:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../components/fx"),i=e("../../components/dragelement"),o=e("../../lib/setcursor"),s=e("./dragbox").makeDragBox,l=e("./constants").DRAGGERSIZE;n.initInteractions=function(e){var t=e._fullLayout;if(e._context.staticPlot)r.select(e).selectAll(".drag").remove();else if(t._has("cartesian")||t._has("gl2d")||t._has("splom")){Object.keys(t._plots||{}).sort(function(e,n){if((t._plots[e].mainplot&&!0)===(t._plots[n].mainplot&&!0)){var r=e.split("y"),a=n.split("y");return r[0]===a[0]?Number(r[1]||1)-Number(a[1]||1):Number(r[0]||1)-Number(a[0]||1)}return t._plots[e].mainplot?1:-1}).forEach(function(n){var r=t._plots[n],o=r.xaxis,c=r.yaxis;if(!r.mainplot){var u=s(e,r,o._offset,c._offset,o._length,c._length,"ns","ew");u.onmousemove=function(t){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===n&&a.hover(e,t,n)},a.hover(e,t,n),e._fullLayout._lasthover=u,e._fullLayout._hoversubplot=n},u.onmouseout=function(t){e._dragging||(e._fullLayout._hoversubplot=null,i.unhover(e,t))},e._context.showAxisDragHandles&&(s(e,r,o._offset-l,c._offset-l,l,l,"n","w"),s(e,r,o._offset+o._length,c._offset-l,l,l,"n","e"),s(e,r,o._offset-l,c._offset+c._length,l,l,"s","w"),s(e,r,o._offset+o._length,c._offset+c._length,l,l,"s","e"))}if(e._context.showAxisDragHandles){if(n===o._mainSubplot){var d=o._mainLinePosition;"top"===o.side&&(d-=l),s(e,r,o._offset+.1*o._length,d,.8*o._length,l,"","ew"),s(e,r,o._offset,d,.1*o._length,l,"","w"),s(e,r,o._offset+.9*o._length,d,.1*o._length,l,"","e")}if(n===c._mainSubplot){var f=c._mainLinePosition;"right"!==c.side&&(f-=l),s(e,r,f,c._offset+.1*c._length,l,.8*c._length,"ns",""),s(e,r,f,c._offset+.9*c._length,l,.1*c._length,"s",""),s(e,r,f,c._offset,l,.1*c._length,"n","")}}});var o=t._hoverlayer.node();o.onmousemove=function(n){n.target=e._fullLayout._lasthover,a.hover(e,n,t._hoversubplot)},o.onclick=function(t){t.target=e._fullLayout._lasthover,a.click(e,t)},o.onmousedown=function(t){e._fullLayout._lasthover.onmousedown(t)},n.updateFx(t)}},n.updateFx=function(e){var t="pan"===e.dragmode?"move":"crosshair";o(e._draggers,t)}},{"../../components/dragelement":54,"../../components/fx":74,"../../lib/setcursor":171,"./constants":199,"./dragbox":202,d3:3}],204:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("../../lib");t.exports=function(e){return function(t,n){var i=t[e];if(Array.isArray(i))for(var o=r.subplotsRegistry.cartesian,s=o.idRegex,l=n._subplots,c=l.xaxis,u=l.yaxis,d=l.cartesian,f=n._has("cartesian")||n._has("gl2d"),h=0;h<i.length;h++){var p=i[h];if(a.isPlainObject(p)){var g=p.xref,y=p.yref,m=s.x.test(g),v=s.y.test(y);if(m||v){f||a.pushUnique(n._basePlotModules,o);var x=!1;m&&-1===c.indexOf(g)&&(c.push(g),x=!0),v&&-1===u.indexOf(y)&&(u.push(y),x=!0),x&&m&&v&&d.push(g+y)}}}}}},{"../../lib":152,"../../registry":241}],205:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../registry"),i=e("../../lib"),o=e("../plots"),s=e("../../components/drawing"),l=e("../get_data").getModuleCalcData,c=e("./axis_ids"),u=e("./constants"),d=e("../../constants/xmlns_namespaces"),f=i.ensureSingle;function h(e,t,n){return i.ensureSingle(e,t,n,function(e){e.datum(n)})}function p(e,t,n,i,o){for(var c,d,f,h=u.traceLayerClasses,p=e._fullLayout,g=p._modules,y=[],m=0;m<g.length;m++){var v=(c=g[m]).name;if(a.modules[v].categories.svg){var x=c.layerName||v+"layer",b=c.plot;f=(d=l(n,b))[0],n=d[1],f.length&&y.push({i:h.indexOf(x),className:x,plotMethod:b,cdModule:f})}}y.sort(function(e,t){return e.i-t.i});var _=t.plot.selectAll("g.mlayer").data(y,function(e){return e.className});_.enter().append("g").attr("class",function(e){return e.className}).classed("mlayer",!0),_.exit().remove(),_.order(),_.each(function(n){var a=r.select(this),l=n.className;n.plotMethod(e,t,n.cdModule,a,i,o),"scatterlayer"!==l&&"barlayer"!==l&&s.setClipUrl(a,t.layerClipId)}),p._has("scattergl")&&(c=a.getModule("scattergl"),f=l(n,c)[0],c.plot(e,t,f))}function g(e,t){var n=t.plotgroup,r=t.id,a=u.layerValue2layerClass[t.xaxis.layer],i=u.layerValue2layerClass[t.yaxis.layer],o=e._fullLayout._hasOnlyLargeSploms;if(t.mainplot){var s=t.mainplotinfo,l=s.plotgroup,d=r+"-x",p=r+"-y";t.gridlayer=s.gridlayer,t.zerolinelayer=s.zerolinelayer,f(s.overlinesBelow,"path",d),f(s.overlinesBelow,"path",p),f(s.overaxesBelow,"g",d),f(s.overaxesBelow,"g",p),t.plot=f(s.overplot,"g",r),f(s.overlinesAbove,"path",d),f(s.overlinesAbove,"path",p),f(s.overaxesAbove,"g",d),f(s.overaxesAbove,"g",p),t.xlines=l.select(".overlines-"+a).select("."+d),t.ylines=l.select(".overlines-"+i).select("."+p),t.xaxislayer=l.select(".overaxes-"+a).select("."+d),t.yaxislayer=l.select(".overaxes-"+i).select("."+p)}else if(o)t.plot=f(n,"g","plot"),t.xlines=f(n,"path","xlines-above"),t.ylines=f(n,"path","ylines-above"),t.xaxislayer=f(n,"g","xaxislayer-above"),t.yaxislayer=f(n,"g","yaxislayer-above");else{var g=f(n,"g","layer-subplot");t.shapelayer=f(g,"g","shapelayer"),t.imagelayer=f(g,"g","imagelayer"),t.gridlayer=f(n,"g","gridlayer"),t.zerolinelayer=f(n,"g","zerolinelayer"),f(n,"path","xlines-below"),f(n,"path","ylines-below"),t.overlinesBelow=f(n,"g","overlines-below"),f(n,"g","xaxislayer-below"),f(n,"g","yaxislayer-below"),t.overaxesBelow=f(n,"g","overaxes-below"),t.plot=f(n,"g","plot"),t.overplot=f(n,"g","overplot"),t.xlines=f(n,"path","xlines-above"),t.ylines=f(n,"path","ylines-above"),t.overlinesAbove=f(n,"g","overlines-above"),f(n,"g","xaxislayer-above"),f(n,"g","yaxislayer-above"),t.overaxesAbove=f(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+a),t.ylines=n.select(".ylines-"+i),t.xaxislayer=n.select(".xaxislayer-"+a),t.yaxislayer=n.select(".yaxislayer-"+i)}o||(h(t.gridlayer,"g",t.xaxis._id),h(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").sort(c.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0)}function y(e,t){if(e){var n={};for(var a in e.each(function(e){r.select(this).remove(),m(e,t),n[e]=!0}),t._plots)for(var i=t._plots[a].overlays||[],o=0;o<i.length;o++){var s=i[o];n[s.id]&&s.plot.selectAll(".trace").remove()}}}function m(e,t){t._draggers.selectAll("g."+e).remove(),t._defs.select("#clip"+t._uid+e+"plot").remove()}n.name="cartesian",n.attr=["xaxis","yaxis"],n.idRoot=["x","y"],n.idRegex=u.idRegex,n.attrRegex=u.attrRegex,n.attributes=e("./attributes"),n.layoutAttributes=e("./layout_attributes"),n.supplyLayoutDefaults=e("./layout_defaults"),n.transitionAxes=e("./transition_axes"),n.finalizeSubplots=function(e,t){var n,r,a,o=t._subplots,s=o.xaxis,l=o.yaxis,d=o.cartesian,f=d.concat(o.gl2d||[]),h={},p={};for(n=0;n<f.length;n++){var g=f[n].split("y");h[g[0]]=1,p["y"+g[1]]=1}for(n=0;n<s.length;n++)h[r=s[n]]||(a=(e[c.id2name(r)]||{}).anchor,u.idRegex.y.test(a)||(a="y"),d.push(r+a),f.push(r+a),p[a]||(p[a]=1,i.pushUnique(l,a)));for(n=0;n<l.length;n++)p[a=l[n]]||(r=(e[c.id2name(a)]||{}).anchor,u.idRegex.x.test(r)||(r="x"),d.push(r+a),f.push(r+a),h[r]||(h[r]=1,i.pushUnique(s,r)));if(!f.length){for(var y in r="",a="",e){if(u.attrRegex.test(y))"x"===y.charAt(0)?(!r||+y.substr(5)<+r.substr(5))&&(r=y):(!a||+y.substr(5)<+a.substr(5))&&(a=y)}r=r?c.name2id(r):"x",a=a?c.name2id(a):"y",s.push(r),l.push(a),d.push(r+a)}},n.plot=function(e,t,n,r){var a,i=e._fullLayout,o=i._subplots.cartesian,s=e.calcdata;if(!Array.isArray(t))for(t=[],a=0;a<s.length;a++)t.push(a);for(a=0;a<o.length;a++){for(var l,c=o[a],u=i._plots[c],d=[],f=0;f<s.length;f++){var h=s[f],g=h[0].trace;g.xaxis+g.yaxis===c&&((-1!==t.indexOf(g.index)||g.carpet)&&(l&&l[0].trace.xaxis+l[0].trace.yaxis===c&&-1!==["tonextx","tonexty","tonext"].indexOf(g.fill)&&-1===d.indexOf(l)&&d.push(l),d.push(h)),l=h)}p(e,u,d,n,r)}},n.clean=function(e,t,n,r){var a,i,o,s=r._plots||{},l=t._plots||{},u=r._subplots||{};if(r._hasOnlyLargeSploms&&!t._hasOnlyLargeSploms)for(o in s)(a=s[o]).plotgroup&&a.plotgroup.remove();var d=r._has&&r._has("gl"),f=t._has&&t._has("gl");if(d&&!f)for(o in s)(a=s[o])._scene&&a._scene.destroy();if(u.xaxis&&u.yaxis){var h=c.listIds({_fullLayout:r});for(i=0;i<h.length;i++){var p=h[i];t[c.id2name(p)]||r._infolayer.selectAll(".g-"+p+"title").remove()}}var g=r._has&&r._has("cartesian"),v=t._has&&t._has("cartesian");if(g&&!v)y(r._cartesianlayer.selectAll(".subplot"),r),r._defs.selectAll(".axesclip").remove(),delete r._axisConstraintGroups;else if(u.cartesian)for(i=0;i<u.cartesian.length;i++){var x=u.cartesian[i];if(!l[x]){var b="."+x+",."+x+"-x,."+x+"-y";r._cartesianlayer.selectAll(b).remove(),m(x,r)}}},n.drawFramework=function(e){var t=e._fullLayout,n=function(e){var t=e._fullLayout,n=[],r=[];for(var a in t._plots){var i=t._plots[a],o=i.xaxis._mainAxis,s=i.yaxis._mainAxis,l=o._id+s._id;l!==a&&t._plots[l]?(i.mainplot=l,i.mainplotinfo=t._plots[l],r.push(a)):(n.push(a),i.mainplot=void 0)}return n=n.concat(r)}(e),a=t._cartesianlayer.selectAll(".subplot").data(n,i.identity);a.enter().append("g").attr("class",function(e){return"subplot "+e}),a.order(),a.exit().call(y,t),a.each(function(n){var a=t._plots[n];(a.plotgroup=r.select(this),a.overlays=[],g(e,a),a.mainplot)&&t._plots[a.mainplot].overlays.push(a);a.draglayer=f(t._draggers,"g",n)})},n.rangePlot=function(e,t,n){g(e,t),p(e,t,n),o.style(e)},n.toSVG=function(e){var t=e._fullLayout._glimages,n=r.select(e).selectAll(".svg-container");n.filter(function(e,t){return t===n.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var e=this.toDataURL("image/png");t.append("svg:image").attr({xmlns:d.svg,"xlink:href":e,preserveAspectRatio:"none",x:0,y:0,width:this.width,height:this.height})})},n.updateFx=e("./graph_interact").updateFx},{"../../components/drawing":57,"../../constants/xmlns_namespaces":136,"../../lib":152,"../../registry":241,"../get_data":222,"../plots":226,"./attributes":192,"./axis_ids":197,"./constants":199,"./graph_interact":203,"./layout_attributes":206,"./layout_defaults":207,"./transition_axes":216,d3:3}],206:[function(e,t,n){"use strict";var r=e("../font_attributes"),a=e("../../components/color/attributes"),i=e("../../components/drawing/attributes").dash,o=e("../../lib/extend").extendFlat,s=e("./constants");t.exports={visible:{valType:"boolean",role:"info",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:a.defaultLine,role:"style",editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{valType:"string",role:"info",editType:"ticks+margins",description:"Sets the title of this axis."},titlefont:r({editType:"ticks+margins",description:["Sets this axis' title font."].join(" ")}),type:{valType:"enumerated",values:["-","linear","log","date","category"],dflt:"-",role:"info",editType:"calc",description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,role:"style",editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",role:"style",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data."].join(" ")},range:{valType:"info_array",role:"info",items:[{valType:"any",editType:"axrange+margins",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"axrange+margins",impliedEdits:{"^autorange":!1}}],editType:"axrange+margins",impliedEdits:{autorange:!1},description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,role:"info",editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},scaleanchor:{valType:"enumerated",values:[s.idRegex.x.toString(),s.idRegex.y.toString()],role:"info",editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,role:"info",editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],dflt:"range",role:"info",editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range* (default), or by decreasing the *domain*."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],role:"info",editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},tickmode:{valType:"enumerated",values:["auto","linear","array"],role:"info",editType:"ticks+margins",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},nticks:{valType:"integer",min:0,dflt:0,role:"style",editType:"ticks+margins",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")},tick0:{valType:"any",role:"style",editType:"ticks+margins",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L<f>* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},dtick:{valType:"any",role:"style",editType:"ticks+margins",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L<f>*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M<n>* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},tickvals:{valType:"data_array",editType:"ticks+margins",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},ticktext:{valType:"data_array",editType:"ticks+margins",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:{valType:"enumerated",values:["outside","inside",""],role:"style",editType:"ticks+margins",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,role:"style",editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:{valType:"number",min:0,dflt:5,role:"style",editType:"ticks",description:"Sets the tick length (in px)."},tickwidth:{valType:"number",min:0,dflt:1,role:"style",editType:"ticks",description:"Sets the tick width (in px)."},tickcolor:{valType:"color",dflt:a.defaultLine,role:"style",editType:"ticks",description:"Sets the tick color."},showticklabels:{valType:"boolean",dflt:!0,role:"style",editType:"ticks+margins",description:"Determines whether or not the tick labels are drawn."},automargin:{valType:"boolean",dflt:!1,role:"style",editType:"ticks+margins",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,role:"style",editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,role:"style",editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,role:"style",editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:o({},i,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],role:"style",dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor"],dflt:"data",role:"style",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:r({editType:"ticks+margins",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",role:"style",editType:"ticks+margins",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},tickprefix:{valType:"string",dflt:"",role:"style",editType:"ticks+margins",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",role:"style",editType:"ticks+margins",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",role:"style",editType:"ticks+margins",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",role:"style",editType:"ticks+margins",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",role:"style",editType:"ticks+margins",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",role:"style",editType:"ticks+margins",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,role:"style",editType:"ticks+margins",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",role:"style",editType:"ticks+margins",description:["Sets the tick label formatting rule using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see:","https://github.com/d3/d3-format/blob/master/README.md#locale_format","And for dates see:","https://github.com/d3/d3-time-format/blob/master/README.md#locale_format","We add one item to d3's date formatter: *%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")},tickformatstops:{_isLinkedToArray:"tickformatstop",dtickrange:{valType:"info_array",role:"info",items:[{valType:"any",editType:"ticks+margins"},{valType:"any",editType:"ticks+margins"}],editType:"ticks+margins",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",role:"style",editType:"ticks+margins",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks+margins"},hoverformat:{valType:"string",dflt:"",role:"style",editType:"none",description:["Sets the hover text formatting rule using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see:","https://github.com/d3/d3-format/blob/master/README.md#locale_format","And for dates see:","https://github.com/d3/d3-time-format/blob/master/README.md#locale_format","We add one item to d3's date formatter: *%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")},showline:{valType:"boolean",dflt:!1,role:"style",editType:"layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:a.defaultLine,role:"style",editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,role:"style",editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:{valType:"boolean",role:"style",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")},gridcolor:{valType:"color",dflt:a.lightLine,role:"style",editType:"ticks",description:"Sets the color of the grid lines."},gridwidth:{valType:"number",min:0,dflt:1,role:"style",editType:"ticks",description:"Sets the width (in px) of the grid lines."},zeroline:{valType:"boolean",role:"style",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:a.defaultLine,role:"style",editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,role:"style",editType:"ticks",description:"Sets the width (in px) of the zero line."},anchor:{valType:"enumerated",values:["free",s.idRegex.x.toString(),s.idRegex.y.toString()],role:"info",editType:"plot+margins",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],role:"info",editType:"plot+margins",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",s.idRegex.x.toString(),s.idRegex.y.toString()],role:"info",editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis.","If *false*, this axis does not overlay any same-letter axes."].join(" ")},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",role:"info",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},domain:{valType:"info_array",role:"info",items:[{valType:"number",min:0,max:1,editType:"plot+margins"},{valType:"number",min:0,max:1,editType:"plot+margins"}],dflt:[0,1],editType:"plot+margins",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,role:"style",editType:"plot+margins",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",role:"info",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`."].join(" ")},categoryarray:{valType:"data_array",role:"info",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",role:"info",editType:"ticks+margins",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")}}}},{"../../components/color/attributes":31,"../../components/drawing/attributes":56,"../../lib/extend":146,"../font_attributes":220,"./constants":199}],207:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("../../lib"),i=e("../../components/color"),o=e("../layout_attributes"),s=e("./layout_attributes"),l=e("./type_defaults"),c=e("./axis_defaults"),u=e("./constraint_defaults"),d=e("./position_defaults"),f=e("./axis_ids");t.exports=function(e,t,n){var h,p={},g={},y={},m={};for(h=0;h<n.length;h++){var v=n[h];if(r.traceIs(v,"cartesian")||r.traceIs(v,"gl2d")){var x=f.id2name(v.xaxis),b=f.id2name(v.yaxis);if(r.traceIs(v,"carpet")&&("carpet"!==v.type||v._cheater)||x&&(g[x]=1),"carpet"===v.type&&v._cheater&&x&&(p[x]=1),r.traceIs(v,"2dMap")&&(y[x]=!0,y[b]=!0),r.traceIs(v,"oriented"))m["h"===v.orientation?b:x]=!0}}var _=t._subplots,w=_.xaxis,k=_.yaxis,M=a.simpleMap(w,f.id2name),T=a.simpleMap(k,f.id2name),A=M.concat(T),S=i.background;w.length&&k.length&&(S=a.coerce(e,t,o,"plot_bgcolor"));var L,C,z,O,D=i.combine(S,t.paper_bgcolor);function P(e,t){return a.coerce(z,O,s,e,t)}function I(e,t){return a.coerce2(z,O,s,e,t)}function j(e){return"x"===e?k:w}var E={x:j("x"),y:j("y")};function N(t,n){for(var r="x"===t?M:T,a=[],i=0;i<r.length;i++){var o=r[i];o===n||(e[o]||{}).overlaying||a.push(f.name2id(o))}return a}for(h=0;h<A.length;h++){L=A[h],a.isPlainObject(e[L])||(e[L]={}),z=e[L],O=t[L]={},l(z,O,P,n,L);var R=N(C=L.charAt(0),L),F={letter:C,font:t.font,outerTicks:y[L],showGrid:!m[L],data:n,bgColor:D,calendar:t.calendar,automargin:!0,cheateronly:"x"===C&&p[L]&&!g[L]};c(z,O,P,F,t);var B=I("spikecolor"),H=I("spikethickness"),q=I("spikedash"),V=I("spikemode"),U=I("spikesnap");P("showspikes",!!(B||H||q||V||U))||(delete O.spikecolor,delete O.spikethickness,delete O.spikedash,delete O.spikemode,delete O.spikesnap);var G={letter:C,counterAxes:E[C],overlayableAxes:R,grid:t.grid};d(z,O,P,G),O._input=z}var Y=r.getComponentMethod("rangeslider","handleDefaults"),Z=r.getComponentMethod("rangeselector","handleDefaults");for(h=0;h<M.length;h++)L=M[h],z=e[L],O=t[L],Y(e,t,L),"date"===O.type&&Z(z,O,t,T,O.calendar),P("fixedrange");for(h=0;h<T.length;h++){L=T[h],z=e[L],O=t[L];var X=t[f.id2name(O.anchor)];P("fixedrange",X&&X.rangeslider&&X.rangeslider.visible)}t._axisConstraintGroups=[];var W=E.x.concat(E.y);for(h=0;h<A.length;h++)C=(L=A[h]).charAt(0),z=e[L],O=t[L],u(z,O,P,W,t)}},{"../../components/color":32,"../../lib":152,"../../registry":241,"../layout_attributes":224,"./axis_defaults":196,"./axis_ids":197,"./constraint_defaults":200,"./layout_attributes":206,"./position_defaults":209,"./type_defaults":217}],208:[function(e,t,n){"use strict";var r=e("tinycolor2").mix,a=e("../../components/color/attributes").lightFraction,i=e("../../lib");t.exports=function(e,t,n,o){var s=(o=o||{}).dfltColor;function l(n,r){return i.coerce2(e,t,o.attributes,n,r)}var c=l("linecolor",s),u=l("linewidth");n("showline",o.showLine||!!c||!!u)||(delete t.linecolor,delete t.linewidth);var d=l("gridcolor",r(s,o.bgColor,o.blend||a).toRgbString()),f=l("gridwidth");if(n("showgrid",o.showGrid||!!d||!!f)||(delete t.gridcolor,delete t.gridwidth),!o.noZeroLine){var h=l("zerolinecolor",s),p=l("zerolinewidth");n("zeroline",o.showGrid||!!h||!!p)||(delete t.zerolinecolor,delete t.zerolinewidth)}}},{"../../components/color/attributes":31,"../../lib":152,tinycolor2:293}],209:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../lib");t.exports=function(e,t,n,i){var o,s,l,c,u=i.counterAxes||[],d=i.overlayableAxes||[],f=i.letter,h=i.grid;h&&(s=h._domains[f][h._axisMap[t._id]],o=h._anchors[t._id],s&&(l=h[f+"side"].split(" ")[0],c=h.domain[f]["right"===l||"top"===l?1:0])),s=s||[0,1],o=o||(r(e.position)?"free":u[0]||"free"),l=l||("x"===f?"bottom":"left"),c=c||0,"free"===a.coerce(e,t,{anchor:{valType:"enumerated",values:["free"].concat(u),dflt:o}},"anchor")&&n("position",c),a.coerce(e,t,{side:{valType:"enumerated",values:"x"===f?["bottom","top"]:["left","right"],dflt:l}},"side");var p=!1;if(d.length&&(p=a.coerce(e,t,{overlaying:{valType:"enumerated",values:[!1].concat(d),dflt:!1}},"overlaying")),!p){var g=n("domain",s);g[0]>g[1]-.01&&(t.domain=s),a.noneOrAll(e.domain,t.domain,s)}return n("layer"),t}},{"../../lib":152,"fast-isnumeric":5}],210:[function(e,t,n){"use strict";var r=e("../../constants/alignment").FROM_BL;t.exports=function(e,t,n){void 0===n&&(n=r[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*n;e.range=e._input.range=[e.l2r(i+(a[0]-i)*t),e.l2r(i+(a[1]-i)*t)]}},{"../../constants/alignment":132}],211:[function(e,t,n){"use strict";var r=e("polybooljs"),a=e("../../registry"),i=e("../../components/color"),o=e("../../components/fx"),s=e("../../lib/polygon"),l=e("../../lib/throttle"),c=e("../../components/fx/helpers").makeEventData,u=e("./axis_ids").getFromId,d=e("../sort_modules").sortModules,f=e("./constants"),h=f.MINSELECT,p=s.filter,g=s.tester,y=s.multitester;function m(e){return e._id}function v(e,t,n){var r,i,o,s;if(n){var l=n.points||[];for(r=0;r<t.length;r++)(s=t[r].cd[0].trace).selectedpoints=[],s._input.selectedpoints=[];for(r=0;r<l.length;r++){var c=l[r],u=c.data,f=c.fullData;c.pointIndices?([].push.apply(u.selectedpoints,c.pointIndices),[].push.apply(f.selectedpoints,c.pointIndices)):(u.selectedpoints.push(c.pointIndex),f.selectedpoints.push(c.pointIndex))}}else for(r=0;r<t.length;r++)delete(s=t[r].cd[0].trace).selectedpoints,delete s._input.selectedpoints;var h={};for(r=0;r<t.length;r++){var p=(o=t[r])._module.name;h[p]?h[p].push(o):h[p]=[o]}var g=Object.keys(h).sort(d);for(r=0;r<g.length;r++){var y=h[g[r]],m=y.length,v=y[0],x=v.cd[0].trace,b=v._module,_=b.styleOnSelect||b.style;if(a.traceIs(x,"regl")){var w=new Array(m);for(i=0;i<m;i++)w[i]=y[i].cd;_(e,w)}else for(i=0;i<m;i++)_(e,y[i].cd)}}function x(e,t){if(Array.isArray(e))for(var n=t.cd,r=t.cd[0].trace,a=0;a<e.length;a++)e[a]=c(e[a],r,n);return e}function b(e){e.selectAll(".select-outline").remove()}t.exports={prepSelect:function(e,t,n,a,s){var c,d,_,w,k,M,T,A,S,L=a.gd,C=L._fullLayout,z=C._zoomlayer,O=a.element.getBoundingClientRect(),D=a.plotinfo,P=D.xaxis._offset,I=D.yaxis._offset,j=t-O.left,E=n-O.top,N=j,R=E,F="M"+j+","+E,B=a.xaxes[0]._length,H=a.yaxes[0]._length,q=a.xaxes.map(m),V=a.yaxes.map(m),U=a.xaxes.concat(a.yaxes),G=e.altKey,Y=C._lastSelectedSubplot&&C._lastSelectedSubplot===D.id;Y&&(e.shiftKey||e.altKey)&&D.selection&&D.selection.polygons&&!a.polygons?(a.polygons=D.selection.polygons,a.mergedPolygons=D.selection.mergedPolygons):(!e.shiftKey&&!e.altKey||(e.shiftKey||e.altKey)&&!D.selection)&&(D.selection={},D.selection.polygons=a.polygons=[],D.selection.mergedPolygons=a.mergedPolygons=[]),Y||(b(z),C._lastSelectedSubplot=D.id),"lasso"===s&&(c=p([[j,E]],f.BENDPX));var Z=z.selectAll("path.select-outline-"+D.id).data([1,2]);Z.enter().append("path").attr("class",function(e){return"select-outline select-outline-"+e+" select-outline-"+D.id}).attr("transform","translate("+P+", "+I+")").attr("d",F+"Z");var X,W=z.append("path").attr("class","zoombox-corners").style({fill:i.background,stroke:i.defaultLine,"stroke-width":1}).attr("transform","translate("+P+", "+I+")").attr("d","M0,0Z"),J=[],Q=C._uid+f.SELECTID,$=[];for(k=0;k<L.calcdata.length;k++)if(!0===(T=(M=L.calcdata[k])[0].trace).visible&&T._module&&T._module.selectPoints)if(a.subplot)T.subplot!==a.subplot&&T.geo!==a.subplot||J.push({_module:T._module,cd:M,xaxis:a.xaxes[0],yaxis:a.yaxes[0]});else if("splom"===T.type&&T._xaxes[q[0]]&&T._yaxes[V[0]])J.push({_module:T._module,cd:M,xaxis:a.xaxes[0],yaxis:a.yaxes[0]});else{if(-1===q.indexOf(T.xaxis))continue;if(-1===V.indexOf(T.yaxis))continue;J.push({_module:T._module,cd:M,xaxis:u(L,T.xaxis),yaxis:u(L,T.yaxis)})}function K(e){var t="y"===e._id.charAt(0)?1:0;return function(n){return e.p2d(n[t])}}function ee(e,t){return e-t}X=D.fillRangeItems?D.fillRangeItems:"select"===s?function(e,t){var n=e.range={};for(k=0;k<U.length;k++){var r=U[k],a=r._id.charAt(0);n[r._id]=[r.p2d(t[a+"min"]),r.p2d(t[a+"max"])].sort(ee)}}:function(e,t,n){var r=e.lassoPoints={};for(k=0;k<U.length;k++){var a=U[k];r[a._id]=n.filtered.map(K(a))}},a.moveFn=function(e,t){N=Math.max(0,Math.min(B,e+j)),R=Math.max(0,Math.min(H,t+E));var n=Math.abs(N-j),i=Math.abs(R-E);if("select"===s){var o=C.selectdirection;"h"===(o="any"===C.selectdirection?i<Math.min(.6*n,h)?"h":n<Math.min(.6*i,h)?"v":"d":C.selectdirection)?((w=[[j,0],[j,H],[N,H],[N,0]]).xmin=Math.min(j,N),w.xmax=Math.max(j,N),w.ymin=Math.min(0,H),w.ymax=Math.max(0,H),W.attr("d","M"+w.xmin+","+(E-h)+"h-4v"+2*h+"h4ZM"+(w.xmax-1)+","+(E-h)+"h4v"+2*h+"h-4Z")):"v"===o?((w=[[0,E],[0,R],[B,R],[B,E]]).xmin=Math.min(0,B),w.xmax=Math.max(0,B),w.ymin=Math.min(E,R),w.ymax=Math.max(E,R),W.attr("d","M"+(j-h)+","+w.ymin+"v-4h"+2*h+"v4ZM"+(j-h)+","+(w.ymax-1)+"v4h"+2*h+"v-4Z")):"d"===o&&((w=[[j,E],[j,R],[N,R],[N,E]]).xmin=Math.min(j,N),w.xmax=Math.max(j,N),w.ymin=Math.min(E,R),w.ymax=Math.max(E,R),W.attr("d","M0,0Z"))}else"lasso"===s&&(c.addPt([N,R]),w=c.filtered);a.polygons&&a.polygons.length?(_=function(e,t,n){return n?r.difference({regions:e,inverted:!1},{regions:[t],inverted:!1}).regions:r.union({regions:e,inverted:!1},{regions:[t],inverted:!1}).regions}(a.mergedPolygons,w,G),w.subtract=G,d=y(a.polygons.concat([w]))):(_=[w],d=g(w));var u=[];for(k=0;k<_.length;k++){var p=_[k];u.push(p.join("L")+"L"+p[0])}Z.attr("d","M"+u.join("M")+"Z"),l.throttle(Q,f.SELECTDELAY,function(){$=[];var e,t,n=[];for(k=0;k<J.length;k++)if(t=(A=J[k])._module.selectPoints(A,d),n.push(t),e=x(t,A),$.length)for(var r=0;r<e.length;r++)$.push(e[r]);else $=e;v(L,J,S={points:$}),X(S,w,c),a.gd.emit("plotly_selecting",S)})},a.clickFn=function(e,t){W.remove(),l.done(Q).then(function(){if(l.clear(Q),2===e){for(Z.remove(),k=0;k<J.length;k++)(A=J[k])._module.selectPoints(A,!1);v(L,J),L.emit("plotly_deselect",null)}else L.emit("plotly_selected",void 0);o.click(L,t)})},a.doneFn=function(){W.remove(),l.done(Q).then(function(){l.clear(Q),a.gd.emit("plotly_selected",S),w&&a.polygons&&(w.subtract=G,a.polygons.push(w),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,_))})}},clearSelect:b}},{"../../components/color":32,"../../components/fx":74,"../../components/fx/helpers":71,"../../lib/polygon":164,"../../lib/throttle":174,"../../registry":241,"../sort_modules":239,"./axis_ids":197,"./constants":199,polybooljs:284}],212:[function(e,t,n){"use strict";var r=e("d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=i.cleanNumber,s=i.ms2DateTime,l=i.dateTime2ms,c=i.ensureNumber,u=e("../../constants/numerical"),d=u.FP_SAFE,f=u.BADNUM,h=e("./constants"),p=e("./axis_ids");function g(e){return Math.pow(10,e)}t.exports=function(e,t){t=t||{};var n=(e._id||"x").charAt(0),u=10;function y(t,n){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&n&&e.range&&2===e.range.length){var r=e.range[0],a=e.range[1];return.5*(r+a-3*u*Math.abs(r-a))}return f}function m(t,n,r){var i=l(t,r||e.calendar);if(i===f){if(!a(t))return f;i=l(new Date(+t))}return i}function v(t,n,r){return s(t,n,r||e.calendar)}function x(t){return e._categories[Math.round(t)]}function b(t){if(e._categoriesMap){var n=e._categoriesMap[t];if(void 0!==n)return n}if(a(t))return+t}function _(t){return a(t)?r.round(e._b+e._m*t,2):f}function w(t){return(t-e._b)/e._m}e.c2l="log"===e.type?y:c,e.l2c="log"===e.type?g:c,e.l2p=_,e.p2l=w,e.c2p="log"===e.type?function(e,t){return _(y(e,t))}:_,e.p2c="log"===e.type?function(e){return g(w(e))}:w,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=o,e.c2d=e.c2r=e.l2d=e.l2r=c,e.d2p=e.r2p=function(t){return e.l2p(o(t))},e.p2d=e.p2r=w,e.cleanPos=c):"log"===e.type?(e.d2r=e.d2l=function(e,t){return y(o(e),t)},e.r2d=e.r2c=function(e){return g(o(e))},e.d2c=e.r2l=o,e.c2d=e.l2r=c,e.c2r=y,e.l2d=g,e.d2p=function(t,n){return e.l2p(e.d2r(t,n))},e.p2d=function(e){return g(w(e))},e.r2p=function(t){return e.l2p(o(t))},e.p2r=w,e.cleanPos=c):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=m,e.c2d=e.c2r=e.l2d=e.l2r=v,e.d2p=e.r2p=function(t,n,r){return e.l2p(m(t,0,r))},e.p2d=e.p2r=function(e,t,n){return v(w(e),t,n)},e.cleanPos=function(t){return i.cleanDate(t,f,e.calendar)}):"category"===e.type&&(e.d2c=e.d2l=function(t){if(null!==t&&void 0!==t){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push(t);var n=e._categories.length-1;return e._categoriesMap[t]=n,n}return f},e.r2d=e.c2d=e.l2d=x,e.d2r=e.d2l_noadd=b,e.r2c=function(t){var n=b(t);return void 0!==n?n:e.fraction2r(.5)},e.l2r=e.c2r=c,e.r2l=b,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return x(w(e))},e.r2p=e.d2p,e.p2r=w,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:c(e)}),e.fraction2r=function(t){var n=e.r2l(e.range[0]),r=e.r2l(e.range[1]);return e.l2r(n+t*(r-n))},e.r2fraction=function(t){var n=e.r2l(e.range[0]),r=e.r2l(e.range[1]);return(e.r2l(t)-n)/(r-n)},e.cleanRange=function(t,r){r||(r={}),t||(t="range");var o,s,l=i.nestedProperty(e,t).get();if(s=(s="date"===e.type?i.dfltRange(e.calendar):"y"===n?h.DFLTRANGEY:r.dfltRange||h.DFLTRANGEX).slice(),l&&2===l.length)for("date"===e.type&&(l[0]=i.cleanDate(l[0],f,e.calendar),l[1]=i.cleanDate(l[1],f,e.calendar)),o=0;o<2;o++)if("date"===e.type){if(!i.isDateTime(l[o],e.calendar)){e[t]=s;break}if(e.r2l(l[0])===e.r2l(l[1])){var c=i.constrain(e.r2l(l[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);l[0]=e.l2r(c-1e3),l[1]=e.l2r(c+1e3);break}}else{if(!a(l[o])){if(!a(l[1-o])){e[t]=s;break}l[o]=l[1-o]*(o?10:.1)}if(l[o]<-d?l[o]=-d:l[o]>d&&(l[o]=d),l[0]===l[1]){var u=Math.max(1,Math.abs(1e-6*l[0]));l[0]-=u,l[1]+=u}}else i.nestedProperty(e,t).set(s)},e.setScale=function(r){var a=t._size;if(e._categories||(e._categories=[]),e._categoriesMap||(e._categoriesMap={}),e.overlaying){var i=p.getFromId({_fullLayout:t},e.overlaying);e.domain=i.domain}var o=r&&e._r?"_r":"range",s=e.calendar;e.cleanRange(o);var l=e.r2l(e[o][0],s),c=e.r2l(e[o][1],s);if("y"===n?(e._offset=a.t+(1-e.domain[1])*a.h,e._length=a.h*(e.domain[1]-e.domain[0]),e._m=e._length/(l-c),e._b=-e._m*c):(e._offset=a.l+e.domain[0]*a.w,e._length=a.w*(e.domain[1]-e.domain[0]),e._m=e._length/(c-l),e._b=-e._m*l),!isFinite(e._m)||!isFinite(e._b))throw t._replotting=!1,new Error("Something went wrong with axis scaling")},e.makeCalcdata=function(t,n){var r,a,o,s,l=e.type,c="date"===l&&t[n+"calendar"];if(n in t){if(r=t[n],s=t._length||r.length,i.isTypedArray(r)&&("linear"===l||"log"===l)){if(s===r.length)return r;if(r.subarray)return r.subarray(0,s)}for(a=new Array(s),o=0;o<s;o++)a[o]=e.d2c(r[o],0,c)}else{var u=n+"0"in t?e.d2c(t[n+"0"],0,c):0,d=t["d"+n]?Number(t["d"+n]):1;for(r=t[{x:"y",y:"x"}[n]],s=t._length||r.length,a=new Array(s),o=0;o<s;o++)a[o]=u+o*d}return a},e.isValidRange=function(t){return Array.isArray(t)&&2===t.length&&a(e.r2l(t[0]))&&a(e.r2l(t[1]))},e.isPtWithinRange=function(t,r){var a=e.c2l(t[n],null,r),i=e.r2l(e.range[0]),o=e.r2l(e.range[1]);return i<o?i<=a&&a<=o:o<=a&&a<=i},e.clearCalc=function(){e._min=[],e._max=[],e._categories=(e._initialCategories||[]).slice(),e._categoriesMap={};for(var t=0;t<e._categories.length;t++)e._categoriesMap[e._categories[t]]=t};var k=t._d3locale;"date"===e.type&&(e._dateFormat=k?k.timeFormat.utc:r.time.format.utc,e._extraFormat=t._extraFormat),e._separators=t.separators,e._numFormat=k?k.numberFormat:r.format,delete e._minDtick,delete e._forceTick0}},{"../../constants/numerical":134,"../../lib":152,"./axis_ids":197,"./constants":199,d3:3,"fast-isnumeric":5}],213:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,n,i,o){var s=function(e){var t=["showexponent","showtickprefix","showticksuffix"].filter(function(t){return void 0!==e[t]});if(t.every(function(n){return e[n]===e[t[0]]})||1===t.length)return e[t[0]]}(e);if(n("tickprefix")&&n("showtickprefix",s),n("ticksuffix",o.tickSuffixDflt)&&n("showticksuffix",s),n("showticklabels")){var l=o.font||{},c=t.color===e.color?t.color:l.color;if(r.coerceFont(n,"tickfont",{family:l.family,size:l.size,color:c}),n("tickangle"),"category"!==i){var u=n("tickformat");!function(e,t){var n,i,o=e.tickformatstops,s=t.tickformatstops=[];if(!Array.isArray(o))return;function l(e,t){return r.coerce(n,i,a.tickformatstops,e,t)}for(var c=0;c<o.length;c++)n=o[c],i={},l("dtickrange"),l("value"),s.push(i)}(e,t),u||"date"===i||(n("showexponent",s),n("exponentformat"),n("separatethousands"))}}}},{"../../lib":152,"./layout_attributes":206}],214:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,n,i){var o=r.coerce2(e,t,a,"ticklen"),s=r.coerce2(e,t,a,"tickwidth"),l=r.coerce2(e,t,a,"tickcolor",t.color);n("ticks",i.outerTicks||o||s||l?"outside":"")||(delete t.ticklen,delete t.tickwidth,delete t.tickcolor)}},{"../../lib":152,"./layout_attributes":206}],215:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").ONEDAY;t.exports=function(e,t,n,o){var s="auto";"array"!==e.tickmode||"log"!==o&&"date"!==o||(e.tickmode="auto"),Array.isArray(e.tickvals)?s="array":e.dtick&&(s="linear");var l=n("tickmode",s);if("auto"===l)n("nticks");else if("linear"===l){var c="date"===o?i:1,u=n("dtick",c);if(r(u))t.dtick=u>0?Number(u):c;else if("string"!=typeof u)t.dtick=c;else{var d=u.charAt(0),f=u.substr(1);((f=r(f)?Number(f):0)<=0||!("date"===o&&"M"===d&&f===Math.round(f)||"log"===o&&"L"===d||"log"===o&&"D"===d&&(1===f||2===f)))&&(t.dtick=c)}var h="date"===o?a.dateTick0(t.calendar):0,p=n("tick0",h);"date"===o?t.tick0=a.cleanDate(p,h):r(p)&&"D1"!==u&&"D2"!==u?t.tick0=Number(p):t.tick0=h}else{void 0===n("tickvals")?t.tickmode="auto":n("ticktext")}}},{"../../constants/numerical":134,"../../lib":152,"fast-isnumeric":5}],216:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../registry"),i=e("../../components/drawing"),o=e("./axes"),s=e("./constants").attrRegex;t.exports=function(e,t,n,l){var c=e._fullLayout,u=[];var d,f,h,p,g=function(e){var t,n,r,a,i={};for(t in e)if((n=t.split("."))[0].match(s)){var o=t.charAt(0),l=n[0];if(r=c[l],a={},Array.isArray(e[t])?a.to=e[t].slice(0):Array.isArray(e[t].range)&&(a.to=e[t].range.slice(0)),!a.to)continue;a.axisName=l,a.length=r._length,u.push(o),i[o]=a}return i}(t),y=Object.keys(g),m=function(e,t,n){var r,a,i,o=e._plots,s=[];for(r in o){var l=o[r];if(-1===s.indexOf(l)){var c=l.xaxis._id,u=l.yaxis._id,d=l.xaxis.range,f=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),a=n[c]?n[c].to:d,i=n[u]?n[u].to:f,d[0]===a[0]&&d[1]===a[1]&&f[0]===i[0]&&f[1]===i[1]||-1===t.indexOf(c)&&-1===t.indexOf(u)||s.push(l)}}return s}(c,y,g);if(!m.length)return function(){function t(t,n,r){for(var a=0;a<t.length;a++)if(n(e,a),r)return}t(c.annotations||[],a.getComponentMethod("annotations","drawOne")),t(c.shapes||[],a.getComponentMethod("shapes","drawOne")),t(c.images||[],a.getComponentMethod("images","draw"),!0)}(),!1;function v(e){var t=e.xaxis,n=e.yaxis;c._defs.select("#"+e.clipId+"> rect").call(i.setTranslate,0,0).call(i.setScale,1,1),e.plot.call(i.setTranslate,t._offset,n._offset).call(i.setScale,1,1);var r=e.plot.selectAll(".scatterlayer .trace");r.selectAll(".point").call(i.setPointGroupScale,1,1),r.selectAll(".textpoint").call(i.setTextPointsScale,1,1),r.call(i.hideOutsideRangePoints,e)}function x(t,n){var r,s,l,u=g[t.xaxis._id],d=g[t.yaxis._id],f=[];if(u){s=(r=e._fullLayout[u.axisName])._r,l=u.to,f[0]=(s[0]*(1-n)+n*l[0]-s[0])/(s[1]-s[0])*t.xaxis._length;var h=s[1]-s[0],p=l[1]-l[0];r.range[0]=s[0]*(1-n)+n*l[0],r.range[1]=s[1]*(1-n)+n*l[1],f[2]=t.xaxis._length*(1-n+n*p/h)}else f[0]=0,f[2]=t.xaxis._length;if(d){s=(r=e._fullLayout[d.axisName])._r,l=d.to,f[1]=(s[1]*(1-n)+n*l[1]-s[1])/(s[0]-s[1])*t.yaxis._length;var y=s[1]-s[0],m=l[1]-l[0];r.range[0]=s[0]*(1-n)+n*l[0],r.range[1]=s[1]*(1-n)+n*l[1],f[3]=t.yaxis._length*(1-n+n*m/y)}else f[1]=0,f[3]=t.yaxis._length;!function(t,n){var r,i=[];for(i=[t._id,n._id],r=0;r<i.length;r++)o.doTicks(e,i[r],!0);function s(t,n,a){for(r=0;r<t.length;r++){var o=t[r];if(-1===i.indexOf(o.xref)&&-1===i.indexOf(o.yref)||n(e,r),a)return}}s(c.annotations||[],a.getComponentMethod("annotations","drawOne")),s(c.shapes||[],a.getComponentMethod("shapes","drawOne")),s(c.images||[],a.getComponentMethod("images","draw"),!0)}(t.xaxis,t.yaxis);var v=t.xaxis,x=t.yaxis,b=!!u,_=!!d,w=b?v._length/f[2]:1,k=_?x._length/f[3]:1,M=b?f[0]:0,T=_?f[1]:0,A=b?f[0]/f[2]*v._length:0,S=_?f[1]/f[3]*x._length:0,L=v._offset-A,C=x._offset-S;t.clipRect.call(i.setTranslate,M,T).call(i.setScale,1/w,1/k),t.plot.call(i.setTranslate,L,C).call(i.setScale,w,k).selectAll(".points").selectAll(".point").call(i.setPointGroupScale,1/w,1/k),t.plot.selectAll(".points").selectAll(".textpoint").call(i.setTextPointsScale,1/w,1/k)}l&&(d=l());var b=r.ease(n.easing);return e._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(p),p=null,function(){for(var t={},n=0;n<y.length;n++){var r=e._fullLayout[y[n]+"axis"];t[r._name+".range[0]"]=r.range[0],t[r._name+".range[1]"]=r.range[1],r.range=r._r.slice()}return a.call("relayout",e,t).then(function(){for(var e=0;e<m.length;e++)v(m[e])})}()}),f=Date.now(),p=window.requestAnimationFrame(function t(){h=Date.now();for(var r=Math.min(1,(h-f)/n.duration),i=b(r),o=0;o<m.length;o++)x(m[o],i);h-f>n.duration?(function(){for(var t={},n=0;n<y.length;n++){var r=e._fullLayout[g[y[n]].axisName],i=g[y[n]].to;t[r._name+".range[0]"]=i[0],t[r._name+".range[1]"]=i[1],r.range=i.slice()}d&&d(),a.call("relayout",e,t).then(function(){for(var e=0;e<m.length;e++)v(m[e])})}(),p=window.cancelAnimationFrame(t)):p=window.requestAnimationFrame(t)}),Promise.resolve()}},{"../../components/drawing":57,"../../registry":241,"./axes":194,"./constants":199,d3:3}],217:[function(e,t,n){"use strict";var r=e("../../registry"),a=e("./axis_autotype"),i=e("./axis_ids").name2id;function o(e){return{v:"x",h:"y"}[e.orientation||"v"]}function s(e,t){var n=o(e),a=r.traceIs(e,"box-violin"),i=r.traceIs(e._fullInput||{},"candlestick");return a&&!i&&t===n&&void 0===e[n]&&void 0===e[n+"0"]}t.exports=function(e,t,n,l,c){c&&(t._name=c,t._id=i(c)),"-"===n("type")&&(!function(e,t){if("-"!==e.type)return;var n=e._id,i=n.charAt(0);-1!==n.indexOf("scene")&&(n=i);var l=function(e,t,n){for(var r=0;r<e.length;r++){var a=e[r];if("splom"===a.type&&a._length>0&&a["_"+n+"axes"][t])return a;if((a[n+"axis"]||n)===t){if(s(a,n))return a;if((a[n]||[]).length||a[n+"0"])return a}}}(t,n,i);if(!l)return;if("histogram"===l.type&&i==={v:"y",h:"x"}[l.orientation||"v"])return void(e.type="linear");var c,u=i+"calendar",d=l[u];if(s(l,i)){var f=o(l),h=[];for(c=0;c<t.length;c++){var p=t[c];r.traceIs(p,"box-violin")&&(p[i+"axis"]||i)===n&&(void 0!==p[f]?h.push(p[f][0]):void 0!==p.name?h.push(p.name):h.push("text"),p[u]!==d&&(d=void 0))}e.type=a(h,d)}else if("splom"===l.type){var g=l.dimensions;for(c=0;c<g.length;c++){var y=g[c];if(y.visible){e.type=a(y.values,d);break}}}else e.type=a(l[i]||[l[i+"0"]],d)}(t,l),"-"===t.type?t.type="linear":e.type=t.type)}},{"../../registry":241,"./axis_autotype":195,"./axis_ids":197}],218:[function(e,t,n){"use strict";var r=e("../registry"),a=e("../lib");function i(e,t,n){var r,i,o,s=!1;if("data"===t.type)r=e._fullData[null!==t.traces?t.traces[0]:0];else{if("layout"!==t.type)return!1;r=e._fullLayout}return i=a.nestedProperty(r,t.prop).get(),(o=n[t.type]=n[t.type]||{}).hasOwnProperty(t.prop)&&o[t.prop]!==i&&(s=!0),o[t.prop]=i,{changed:s,value:i}}function o(e,t){var n=[],r=t[0],i={};if("string"==typeof r)i[r]=t[1];else{if(!a.isPlainObject(r))return n;i=r}return l(i,function(e,t,r){n.push({type:"layout",prop:e,value:r})},"",0),n}function s(e,t){var n,r,i,o,s=[];if(r=t[0],i=t[1],n=t[2],o={},"string"==typeof r)o[r]=i;else{if(!a.isPlainObject(r))return s;o=r,void 0===n&&(n=i)}return void 0===n&&(n=null),l(o,function(t,r,a){var i;if(Array.isArray(a)){var o=Math.min(a.length,e.data.length);n&&(o=Math.min(o,n.length)),i=[];for(var l=0;l<o;l++)i[l]=n?n[l]:l}else i=n?n.slice(0):null;if(null===i)Array.isArray(a)&&(a=a[0]);else if(Array.isArray(i)){if(!Array.isArray(a)){var c=a;a=[];for(var u=0;u<i.length;u++)a[u]=c}a.length=Math.min(i.length,a.length)}s.push({type:"data",prop:t,traces:i,value:a})},"",0),s}function l(e,t,n,r){Object.keys(e).forEach(function(i){var o=e[i];if("_"!==i[0]){var s=n+(r>0?".":"")+i;a.isPlainObject(o)?l(o,t,s,r+1):t(s,i,o)}})}n.manageCommandObserver=function(e,t,r,o){var s={},l=!0;t&&t._commandObserver&&(s=t._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=n.hasSimpleAPICommandBindings(e,r,s.lookupTable);if(t&&t._commandObserver){if(c)return s;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,s}if(c){i(e,c,s.cache),s.check=function(){if(l){var t=i(e,c,s.cache);return t.changed&&o&&void 0!==s.lookupTable[t.value]&&(s.disable(),Promise.resolve(o({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[t.value]})).then(s.enable,s.enable)),t.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;d<u.length;d++)e._internalOn(u[d],s.check);s.remove=function(){for(var t=0;t<u.length;t++)e._removeInternalListener(u[t],s.check)}}else a.log("Unable to automatically bind plot updates to API command"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},t&&(t._commandObserver=s),s},n.hasSimpleAPICommandBindings=function(e,t,r){var a,i,o=t.length;for(a=0;a<o;a++){var s,l=t[a],c=l.method,u=l.args;if(Array.isArray(u)||(u=[]),!c)return!1;var d=n.computeAPICommandBindings(e,c,u);if(1!==d.length)return!1;if(i){if((s=d[0]).type!==i.type)return!1;if(s.prop!==i.prop)return!1;if(Array.isArray(i.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var f=0;f<i.traces.length;f++)if(i.traces[f]!==s.traces[f])return!1}else if(s.prop!==i.prop)return!1}else i=d[0],Array.isArray(i.traces)&&i.traces.sort();var h=(s=d[0]).value;if(Array.isArray(h)){if(1!==h.length)return!1;h=h[0]}r&&(r[h]=a)}return i},n.executeAPICommand=function(e,t,n){if("skip"===t)return Promise.resolve();var i=r.apiMethodRegistry[t],o=[e];Array.isArray(n)||(n=[]);for(var s=0;s<n.length;s++)o.push(n[s]);return i.apply(null,o).catch(function(e){return a.warn("API call to Plotly."+t+" rejected.",e),Promise.reject(e)})},n.computeAPICommandBindings=function(e,t,n){var r;switch(Array.isArray(n)||(n=[]),t){case"restyle":r=s(e,n);break;case"relayout":r=o(e,n);break;case"update":r=s(e,[n[0],n[2]]).concat(o(e,[n[1]]));break;case"animate":r=function(e,t){return Array.isArray(t[0])&&1===t[0].length&&-1!==["string","number"].indexOf(typeof t[0][0])?[{type:"layout",prop:"_currentFrame",value:t[0][0].toString()}]:[]}(0,n);break;default:r=[]}return r}},{"../lib":152,"../registry":241}],219:[function(e,t,n){"use strict";var r=e("../lib/extend").extendFlat;n.attributes=function(e,t){e=e||{},t=t||{};var n={valType:"info_array",role:"info",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},a=e.name?e.name+" ":"",i=e.trace?"trace ":"subplot ",o=t.description?" "+t.description:"",s={x:r({},n,{description:["Sets the horizontal domain of this ",a,i,"(in plot fraction).",o].join("")}),y:r({},n,{description:["Sets the vertical domain of this ",a,i,"(in plot fraction).",o].join("")}),editType:e.editType};return e.noGridCell||(s.row={valType:"integer",min:0,dflt:0,role:"info",editType:e.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",a,i,".",o].join("")},s.column={valType:"integer",min:0,dflt:0,role:"info",editType:e.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",a,i,".",o].join("")}),s},n.defaults=function(e,t,n,r){var a=r&&r.x||[0,1],i=r&&r.y||[0,1],o=t.grid;if(o){var s=n("domain.column");void 0!==s&&(s<o.columns?a=o._domains.x[s]:delete e.domain.column);var l=n("domain.row");void 0!==l&&(l<o.rows?i=o._domains.y[l]:delete e.domain.row)}n("domain.x",a),n("domain.y",i)}},{"../lib/extend":146}],220:[function(e,t,n){"use strict";t.exports=function(e){var t=e.editType,n=e.colorEditType;void 0===n&&(n=t);var r={family:{valType:"string",role:"style",noBlank:!0,strict:!0,editType:t,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The plotly service (at https://plot.ly or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",role:"style",min:1,editType:t},color:{valType:"color",role:"style",editType:n},editType:t,description:""+(e.description||"")};return e.arrayOk&&(r.family.arrayOk=!0,r.size.arrayOk=!0,r.color.arrayOk=!0),r}},{}],221:[function(e,t,n){"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string",role:"info",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",role:"info",description:"A label by which to identify the frame"},traces:{valType:"any",role:"info",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",role:"info",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",role:"object",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",role:"object",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}}},{}],222:[function(e,t,n){"use strict";var r=e("../registry"),a=e("./cartesian/constants").SUBPLOT_PATTERN;n.getSubplotCalcData=function(e,t,n){var a=r.subplotsRegistry[t];if(!a)return[];for(var i=a.attr,o=[],s=0;s<e.length;s++){var l=e[s];l[0].trace[i]===n&&o.push(l)}return o},n.getModuleCalcData=function(e,t){var n,a=[],i=[];if(!(n="string"==typeof t?r.getModule(t).plot:"function"==typeof t?t:t.plot))return[a,e];for(var o=0;o<e.length;o++){var s=e[o],l=s[0].trace;!0===l.visible&&(l._module.plot===n?a.push(s):i.push(s))}return[a,i]},n.getSubplotData=function(e,t,n){if(!r.subplotsRegistry[t])return[];var i,o,s,l=r.subplotsRegistry[t].attr,c=[];if("gl2d"===t){var u=n.match(a);o="x"+u[1],s="y"+u[2]}for(var d=0;d<e.length;d++)i=e[d],"gl2d"===t&&r.traceIs(i,"gl2d")?i[l[0]]===o&&i[l[1]]===s&&c.push(i):i[l]===n&&c.push(i);return c},n.getUidsFromCalcData=function(e){for(var t={},n=0;n<e.length;n++){t[e[n][0].trace.uid]=1}return t}},{"../registry":241,"./cartesian/constants":199}],223:[function(e,t,n){"use strict";function r(e,t){var n,r,a=[0,0,0,0];for(n=0;n<4;++n)for(r=0;r<4;++r)a[r]+=e[4*n+r]*t[n];return a}t.exports=function(e,t){return r(e.projection,r(e.view,r(e.model,[t[0],t[1],t[2],1])))}},{}],224:[function(e,t,n){"use strict";var r=e("./font_attributes"),a=e("../components/color/attributes"),i=r({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});i.family.dflt='"Open Sans", verdana, arial, sans-serif',i.size.dflt=12,i.color.dflt=a.defaultLine,t.exports={font:i,title:{valType:"string",role:"info",editType:"layoutstyle",description:["Sets the plot's title."].join(" ")},titlefont:r({editType:"layoutstyle",description:"Sets the title font."}),autosize:{valType:"boolean",role:"info",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",role:"info",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",role:"info",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},margin:{l:{valType:"number",role:"info",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",role:"info",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",role:"info",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",role:"info",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",role:"info",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",role:"info",dflt:!0,editType:"plot"},editType:"plot"},paper_bgcolor:{valType:"color",role:"style",dflt:a.background,editType:"plot",description:"Sets the color of paper where the graph is drawn."},plot_bgcolor:{valType:"color",role:"style",dflt:a.background,editType:"layoutstyle",description:["Sets the color of plotting area in-between x and y axes."].join(" ")},separators:{valType:"string",role:"style",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",role:"info",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the plotly service (at https://plot.ly or on-premise)."].join(" ")},showlegend:{valType:"boolean",role:"info",editType:"legend",description:"Determines whether or not a legend is drawn."},colorway:{valType:"colorlist",dflt:a.defaults,role:"style",editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",role:"info",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")}}},{"../components/color/attributes":31,"./font_attributes":220}],225:[function(e,t,n){"use strict";t.exports={t:{valType:"number",dflt:0,role:"style",editType:"arraydraw",description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,role:"style",editType:"arraydraw",description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,role:"style",editType:"arraydraw",description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,role:"style",editType:"arraydraw",description:"The amount of padding (in px) on the left side of the component."},editType:"arraydraw"}},{}],226:[function(e,t,n){"use strict";var r=e("d3"),a=e("fast-isnumeric"),i=e("../registry"),o=e("../plot_api/plot_schema"),s=e("../lib"),l=e("../components/color"),c=e("../constants/numerical").BADNUM,u=e("../plots/cartesian/axis_ids"),d=e("./sort_modules").sortBasePlotModules,f=e("./animation_attributes"),h=e("./frame_attributes"),p=s.relinkPrivateKeys,g=s._,y=t.exports={};s.extendFlat(y,i),y.attributes=e("./attributes"),y.attributes.type.values=y.allTypes,y.fontAttrs=e("./font_attributes"),y.layoutAttributes=e("./layout_attributes"),y.fontWeight="normal";var m=y.transformsRegistry,v=e("./command");y.executeAPICommand=v.executeAPICommand,y.computeAPICommandBindings=v.computeAPICommandBindings,y.manageCommandObserver=v.manageCommandObserver,y.hasSimpleAPICommandBindings=v.hasSimpleAPICommandBindings,y.redrawText=function(e){if(!((e=s.getGraphDiv(e)).data&&e.data[0]&&e.data[0].r))return new Promise(function(t){setTimeout(function(){i.getComponentMethod("annotations","draw")(e),i.getComponentMethod("legend","draw")(e),(e.calcdata||[]).forEach(function(e){e[0]&&e[0].t&&e[0].t.cb&&e[0].t.cb()}),t(y.previousPromises(e))},300)})},y.resize=function(e){return e=s.getGraphDiv(e),new Promise(function(t,n){e&&!function(e){var t=window.getComputedStyle(e).display;return!t||"none"===t}(e)||n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._redrawTimer=setTimeout(function(){if(e.layout.width&&e.layout.height)t(e);else{delete e.layout.width,delete e.layout.height;var n=e.changed;e.autoplay=!0,i.call("relayout",e,{autosize:!0}).then(function(){e.changed=n,t(e)})}},100)})},y.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})},y.addLinks=function(e){if(e._context.showLink||e._context.showSources){var t=e._fullLayout,n=s.ensureSingle(t._paper,"text","js-plot-link-container",function(e){e.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:l.defaultLine,"pointer-events":"all"}).each(function(){var e=r.select(this);e.append("tspan").classed("js-link-to-tool",!0),e.append("tspan").classed("js-link-spacer",!0),e.append("tspan").classed("js-sourcelinks",!0)})}),a=n.node(),i={y:t._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),n.attr(i);var o=n.select(".js-link-to-tool"),c=n.select(".js-link-spacer"),u=n.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var n=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)n.on("click",function(){y.sendDataToCloud(e)});else{var r=window.location.pathname.split("/"),a=window.location.search;n.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+r[2].split(".")[0]+"/"+r[1]+a})}}(e,o),c.text(o.text()&&u.text()?" - ":"")}},y.sendDataToCloud=function(e){e.emit("plotly_beforeexport");var t=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||"https://plot.ly",n=r.select(e).append("div").attr("id","hiddenform").style("display","none"),a=n.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=y.graphJson(e,!1,"keepdata"),a.node().submit(),n.remove(),e.emit("plotly_afterexport"),!1};var x,b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],_=["year","month","dayMonth","dayMonthYear"];function w(e,t){var n=e._context.locale,r=!1,a={};function o(e){for(var n=!0,i=0;i<t.length;i++){var o=t[i];a[o]||(e[o]?a[o]=e[o]:n=!1)}n&&(r=!0)}for(var s=0;s<2;s++){for(var l=e._context.locales,c=0;c<2;c++){var u=(l[n]||{}).format;if(u&&(o(u),r))break;l=i.localeRegistry}var d=n.split("-")[0];if(r||d===n)break;n=d}return r||o(i.localeRegistry.en.format),a}function k(e,t,n,r){for(var a=e.transforms,i=[e],o=0;o<a.length;o++){var s=a[o],l=m[s.type];l&&l.transform&&(i=l.transform(i,{transform:s,fullTrace:e,fullData:t,layout:n,fullLayout:r,transformIndex:o}))}return i}function M(e){for(var t=0;t<e.length;t++)e[t].clearCalc()}y.supplyDefaults=function(e,t){var n=t&&t.skipUpdateCalc,a=e._fullLayout||{};if(a._skipDefaults)delete a._skipDefaults;else{var o,l=e._fullLayout={},c=e.layout||{},f=e._fullData||[],h=e._fullData=[],m=e.data||[],v=e.calcdata||[],k=e._context||{};e._transitionData||y.createTransitionData(e),l._dfltTitle={plot:g(e,"Click to enter Plot title"),x:g(e,"Click to enter X axis title"),y:g(e,"Click to enter Y axis title"),colorbar:g(e,"Click to enter Colorscale title"),annotation:g(e,"new text")},l._traceWord=g(e,"trace");var M=w(e,b);if(l._mapboxAccessToken=k.mapboxAccessToken,a._initialAutoSizeIsDone){var T=a.width,A=a.height;y.supplyLayoutGlobalDefaults(c,l,M),c.width||(l.width=T),c.height||(l.height=A)}else{y.supplyLayoutGlobalDefaults(c,l,M);var S=!c.width||!c.height,L=l.autosize,C=k.autosizable;S&&(L||C)?y.plotAutoSize(e,c,l):S&&y.sanitizeMargins(e),!L&&S&&(c.width=l.width,c.height=l.height)}l._d3locale=function(e,t){return e.decimal=t.charAt(0),e.thousands=t.charAt(1),r.locale(e)}(M,l.separators),l._extraFormat=w(e,_),l._initialAutoSizeIsDone=!0,l._dataLength=m.length,l._modules=[],l._basePlotModules=[];var z=l._subplots=function(){var e,t,n={};if(!x){x=[];var r=i.subplotsRegistry;for(var a in r){var o=r[a],l=o.attr;if(l&&(x.push(a),Array.isArray(l)))for(t=0;t<l.length;t++)s.pushUnique(x,l[t])}}for(e=0;e<x.length;e++)n[x[e]]=[];return n}(),O=l._splomAxes={x:{},y:{}},D=l._splomSubplots={};l._requestRangeslider={},l._globalTransforms=(e._context||{}).globalTransforms,y.supplyDataDefaults(m,h,c,l);var P=Object.keys(O.x),I=Object.keys(O.y);if(P.length>1&&I.length>1){for(i.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o<P.length;o++)s.pushUnique(z.xaxis,P[o]);for(o=0;o<I.length;o++)s.pushUnique(z.yaxis,I[o]);for(var j in D)s.pushUnique(z.cartesian,j)}l._has=y._hasPlotType.bind(l);var E=l._modules;for(o=0;o<E.length;o++){var N=E[o];N.cleanData&&N.cleanData(h)}if(f.length===h.length)for(o=0;o<h.length;o++)p(h[o],f[o]);y.supplyLayoutModuleDefaults(c,l,h,e._transitionData),l._hasOnlyLargeSploms=1===l._basePlotModules.length&&"splom"===l._basePlotModules[0].name&&P.length>15&&I.length>15&&0===l.shapes.length&&0===l.images.length,l._hasCartesian=l._has("cartesian"),l._hasGeo=l._has("geo"),l._hasGL3D=l._has("gl3d"),l._hasGL2D=l._has("gl2d"),l._hasTernary=l._has("ternary"),l._hasPie=l._has("pie"),y.linkSubplots(h,l,f,a),y.cleanPlot(h,l,f,a,v),p(l,a),y.doAutoMargin(e);var R=u.list(e);for(o=0;o<R.length;o++){R[o].setScale()}n||v.length!==h.length||y.supplyDefaultsUpdateCalc(v,h),l._basePlotModules.sort(d)}},y.supplyDefaultsUpdateCalc=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],a=e[n][0];if(a&&a.trace){var i=a.trace;if(i._hasCalcTransform){var o,l,c,u=i._arrayAttrs;for(o=0;o<u.length;o++)l=u[o],c=s.nestedProperty(i,l).get().slice(),s.nestedProperty(r,l).set(c)}a.trace=r}}},y.createTransitionData=function(e){e._transitionData||(e._transitionData={}),e._transitionData._frames||(e._transitionData._frames=[]),e._transitionData._frameHash||(e._transitionData._frameHash={}),e._transitionData._counter||(e._transitionData._counter=0),e._transitionData._interruptCallbacks||(e._transitionData._interruptCallbacks=[])},y._hasPlotType=function(e){var t,n=this._basePlotModules||[];for(t=0;t<n.length;t++)if(n[t].name===e)return!0;var r=this._modules||[];for(t=0;t<r.length;t++){var a=r[t].name;if(a===e)return!0;var o=i.modules[a];if(o&&o.categories[e])return!0}return!1},y.cleanPlot=function(e,t,n,r,a){var i,o,s=r._basePlotModules||[];for(i=0;i<s.length;i++){var l=s[i];l.clean&&l.clean(e,t,n,r,a)}var c=r._has&&r._has("gl"),u=t._has&&t._has("gl");c&&!u&&void 0!==r._glcontainer&&(r._glcontainer.selectAll(".gl-canvas").remove(),r._glcanvas=null);var d=!!r._infolayer;e:for(i=0;i<n.length;i++){var f=n[i].uid;for(o=0;o<e.length;o++){if(f===e[o].uid)continue e}d&&r._infolayer.select(".cb"+f).remove()}r._zoomlayer&&r._zoomlayer.selectAll(".select-outline").remove()},y.linkSubplots=function(e,t,n,r){var a,i,o,s,l=r._plots||{},c=t._plots={},d=t._subplots,f={_fullData:e,_fullLayout:t},h=d.cartesian.concat(d.gl2d||[]);for(a=0;a<h.length;a++){var p,g=l[o=h[a]],y=u.getFromId(f,o,"x"),m=u.getFromId(f,o,"y");for(g?((p=c[o]=g).xaxis.layer!==y.layer&&(p.xlines.attr("d",null),p.xaxislayer.selectAll("*").remove()),p.yaxis.layer!==m.layer&&(p.ylines.attr("d",null),p.yaxislayer.selectAll("*").remove())):(p=c[o]={}).id=o,p.xaxis=y,p.yaxis=m,p._hasClipOnAxisFalse=!1,i=0;i<e.length;i++){var v=e[i];if(v.xaxis===p.xaxis._id&&v.yaxis===p.yaxis._id&&!1===v.cliponaxis){p._hasClipOnAxisFalse=!0;break}}}var x=u.list(f,null,!0);for(a=0;a<x.length;a++){var b=null;(s=x[a]).overlaying&&(b=u.getFromId(f,s.overlaying))&&b.overlaying&&(s.overlaying=!1,b=null),s._mainAxis=b||s,b&&(s.domain=b.domain.slice()),s._anchorAxis="free"===s.anchor?null:u.getFromId(f,s.anchor)}for(a=0;a<x.length;a++){var _="x"===(s=x[a])._id.charAt(0),w=s._mainAxis._anchorAxis,k="",M="",T="";if(w&&(T=w._mainAxis._id,k=_?s._id+T:T+s._id),!k||!c[k])for(k="",i=0;i<h.length;i++){var A=(o=h[i]).indexOf("y"),S=_?o.substr(0,A):o.substr(A),L=_?o.substr(A):o.substr(0,A);if(S===s._id){M||(M=o);var C=u.getFromId(f,L);if(T&&C.overlaying===T){k=o;break}}}s._mainSubplot=k||M}},y.clearExpandedTraceDefaultColors=function(e){var t,n,r;for(n=[],(t=e._module._colorAttrs)||(e._module._colorAttrs=t=[],o.crawl(e._module.attributes,function(e,r,a,i){n[i]=r,n.length=i+1,"color"===e.valType&&void 0===e.dflt&&t.push(n.join("."))})),r=0;r<t.length;r++){s.nestedProperty(e,"_input."+t[r]).get()||s.nestedProperty(e,t[r]).set(null)}},y.supplyDataDefaults=function(e,t,n,r){var a,o,l,c=r._modules,u=r._basePlotModules,d=0,f=0;function h(e){t.push(e);var n=e._module;n&&(!0===e.visible&&s.pushUnique(c,n),s.pushUnique(u,e._module.basePlotModule),d++,!1!==e._input.visible&&f++)}r._transformModules=[];var g={},m=[];for(a=0;a<e.length;a++){if(l=e[a],(o=y.supplyTraceDefaults(l,f,r,a)).index=a,o._input=l,o._expandedIndex=d,o.transforms&&o.transforms.length)for(var v=k(o,t,n,r),x=0;x<v.length;x++){var b=v[x],_=y.supplyTraceDefaults(b,d,r,a);p(_,b),b.uid=_.uid=o.uid+x,_.index=a,_._input=l,_._fullInput=o,_._expandedIndex=d,_._expandedInput=b,h(_)}else o._fullInput=o,o._expandedInput=o,h(o);i.traceIs(o,"carpetAxis")&&(g[o.carpet]=o),i.traceIs(o,"carpetDependent")&&m.push(a)}for(a=0;a<m.length;a++)if((o=t[m[a]]).visible){var w=g[o.carpet];o._carpet=w,w&&w.visible?(o.xaxis=w.xaxis,o.yaxis=w.yaxis):o.visible=!1}},y.supplyAnimationDefaults=function(e){var t;e=e||{};var n={};function r(t,r){return s.coerce(e||{},n,f,t,r)}if(r("mode"),r("direction"),r("fromcurrent"),Array.isArray(e.frame))for(n.frame=[],t=0;t<e.frame.length;t++)n.frame[t]=y.supplyAnimationFrameDefaults(e.frame[t]||{});else n.frame=y.supplyAnimationFrameDefaults(e.frame||{});if(Array.isArray(e.transition))for(n.transition=[],t=0;t<e.transition.length;t++)n.transition[t]=y.supplyAnimationTransitionDefaults(e.transition[t]||{});else n.transition=y.supplyAnimationTransitionDefaults(e.transition||{});return n},y.supplyAnimationFrameDefaults=function(e){var t={};function n(n,r){return s.coerce(e||{},t,f.frame,n,r)}return n("duration"),n("redraw"),t},y.supplyAnimationTransitionDefaults=function(e){var t={};function n(n,r){return s.coerce(e||{},t,f.transition,n,r)}return n("duration"),n("easing"),t},y.supplyFrameDefaults=function(e){var t={};function n(n,r){return s.coerce(e,t,h,n,r)}return n("group"),n("name"),n("traces"),n("baseframe"),n("data"),n("layout"),t},y.supplyTraceDefaults=function(e,t,n,r){var a,o=n.colorway||l.defaults,c={},u=o[t%o.length];function d(t,n){return s.coerce(e,c,y.attributes,t,n)}var f=d("visible");d("type"),d("uid"),d("name",n._traceWord+" "+r);var h=y.getModule(c);if(c._module=h,h){var p=h.basePlotModule,g=p.attr,m=p.attributes;if(g&&m){var v=n._subplots,x="";if("gl2d"!==p.name||f){if(Array.isArray(g))for(a=0;a<g.length;a++){var b=g[a],_=s.coerce(e,c,m,b);v[b]&&s.pushUnique(v[b],_),x+=_}else x=s.coerce(e,c,m,g);v[p.name]&&s.pushUnique(v[p.name],x)}}}return f&&(d("customdata"),d("ids"),i.traceIs(c,"showLegend")&&(d("showlegend"),d("legendgroup")),i.getComponentMethod("fx","supplyDefaults")(e,c,u,n),h&&(h.supplyDefaults(e,c,u,n),s.coerceHoverinfo(e,c,n)),i.traceIs(c,"noOpacity")||d("opacity"),i.traceIs(c,"notLegendIsolatable")&&(c.visible=!!c.visible),h&&h.selectPoints&&d("selectedpoints"),y.supplyTransformDefaults(e,c,n)),c},y.supplyTransformDefaults=function(e,t,n){if(t._length){var r=n._globalTransforms||[],a=n._transformModules||[];if(Array.isArray(e.transforms)||0!==r.length)for(var i=e.transforms||[],o=r.concat(i),l=t.transforms=[],c=0;c<o.length;c++){var u,d=o[c],f=d.type,h=m[f],p=!(d._module&&d._module===h),g=h&&"function"==typeof h.transform;h||s.warn("Unrecognized transform type "+f+"."),h&&h.supplyDefaults&&(p||g)?((u=h.supplyDefaults(d,t,n,e)).type=f,u._module=h,s.pushUnique(a,h)):u=s.extendFlat({},d),l.push(u)}}},y.supplyLayoutGlobalDefaults=function(e,t,n){function r(n,r){return s.coerce(e,t,y.layoutAttributes,n,r)}var a=s.coerceFont(r,"font");r("title",t._dfltTitle.plot),s.coerceFont(r,"titlefont",{family:a.family,size:Math.round(1.4*a.size),color:a.color}),r("autosize",!(e.width&&e.height)),r("width"),r("height"),r("margin.l"),r("margin.r"),r("margin.t"),r("margin.b"),r("margin.pad"),r("margin.autoexpand"),e.width&&e.height&&y.sanitizeMargins(t),i.getComponentMethod("grid","sizeDefaults")(e,t),r("paper_bgcolor"),r("separators",n.decimal+n.thousands),r("hidesources"),r("colorway"),r("datarevision"),i.getComponentMethod("calendars","handleDefaults")(e,t,"calendar"),i.getComponentMethod("fx","supplyLayoutGlobalDefaults")(e,t,r)},y.plotAutoSize=function(e,t,n){var r,i,o=e._context||{},l=o.frameMargins,c=s.isPlotDiv(e);if(c&&e.emit("plotly_autosize"),o.fillFrame)r=window.innerWidth,i=window.innerHeight,document.body.style.overflow="hidden";else if(a(l)&&l>0){var u=function(e){var t,n={left:0,right:0,bottom:0,top:0};if(e)for(t in e)e.hasOwnProperty(t)&&(n.left+=e[t].left||0,n.right+=e[t].right||0,n.bottom+=e[t].bottom||0,n.top+=e[t].top||0);return n}(e._boundingBoxMargins),d=u.left+u.right,f=u.bottom+u.top,h=1-2*l,p=n._container&&n._container.node?n._container.node().getBoundingClientRect():{width:n.width,height:n.height};r=Math.round(h*(p.width-d)),i=Math.round(h*(p.height-f))}else{var g=c?window.getComputedStyle(e):{};r=parseFloat(g.width)||n.width,i=parseFloat(g.height)||n.height}var m=y.layoutAttributes.width.min,v=y.layoutAttributes.height.min;r<m&&(r=m),i<v&&(i=v);var x=!t.width&&Math.abs(n.width-r)>1,b=!t.height&&Math.abs(n.height-i)>1;(b||x)&&(x&&(n.width=r),b&&(n.height=i)),e._initialAutoSize||(e._initialAutoSize={width:r,height:i}),y.sanitizeMargins(n)},y.supplyLayoutModuleDefaults=function(e,t,n,r){var a,o,l,c=i.componentsRegistry,u=t._basePlotModules,d=i.subplotsRegistry.cartesian;for(a in c)(l=c[a]).includeBasePlot&&l.includeBasePlot(e,t);for(var f in u.length||u.push(d),t._has("cartesian")&&(i.getComponentMethod("grid","contentDefaults")(e,t),d.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(s.subplotSort);for(o=0;o<u.length;o++)(l=u[o]).supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,n);var h=t._modules;for(o=0;o<h.length;o++)(l=h[o]).supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,n);var p=t._transformModules;for(o=0;o<p.length;o++)(l=p[o]).supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,n,r);for(a in c)(l=c[a]).supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,n)},y.purge=function(e){var t=e._fullLayout||{};void 0!==t._glcontainer&&(t._glcontainer.selectAll(".gl-canvas").remove(),t._glcontainer.remove(),t._glcanvas=null),void 0!==t._geocontainer&&t._geocontainer.remove(),t._modeBar&&t._modeBar.destroy(),e._transitionData&&(e._transitionData._interruptCallbacks&&(e._transitionData._interruptCallbacks.length=0),e._transitionData._animationRaf&&window.cancelAnimationFrame(e._transitionData._animationRaf)),s.clearThrottle(),delete e.data,delete e.layout,delete e._fullData,delete e._fullLayout,delete e.calcdata,delete e.framework,delete e.empty,delete e.fid,delete e.undoqueue,delete e.undonum,delete e.autoplay,delete e.changed,delete e._promises,delete e._redrawTimer,delete e.firstscatter,delete e._hmlumcount,delete e._hmpixcount,delete e._transitionData,delete e._transitioning,delete e._initialAutoSize,delete e._transitioningWithDuration,delete e._dragging,delete e._dragged,delete e._hoverdata,delete e._snapshotInProgress,delete e._editing,delete e._replotPending,delete e._mouseDownTime,delete e._legendMouseDownTime,e.removeAllListeners&&e.removeAllListeners()},y.style=function(e){var t,n=e._fullLayout._modules,r=[];for(t=0;t<n.length;t++){var a=n[t];a.style&&s.pushUnique(r,a.style)}for(t=0;t<r.length;t++)r[t](e)},y.sanitizeMargins=function(e){if(e&&e.margin){var t,n=e.width,r=e.height,a=e.margin,i=n-(a.l+a.r),o=r-(a.t+a.b);i<0&&(t=(n-1)/(a.l+a.r),a.l=Math.floor(t*a.l),a.r=Math.floor(t*a.r)),o<0&&(t=(r-1)/(a.t+a.b),a.t=Math.floor(t*a.t),a.b=Math.floor(t*a.b))}},y.autoMargin=function(e,t,n){var r=e._fullLayout;if(r._pushmargin||(r._pushmargin={}),!1!==r.margin.autoexpand){if(n){var a=void 0===n.pad?12:n.pad;n.l+n.r>.5*r.width&&(n.l=n.r=0),n.b+n.t>.5*r.height&&(n.b=n.t=0),r._pushmargin[t]={l:{val:n.x,size:n.l+a},r:{val:n.x,size:n.r+a},b:{val:n.y,size:n.b+a},t:{val:n.y,size:n.t+a}}}else delete r._pushmargin[t];r._replotting||y.doAutoMargin(e)}},y.doAutoMargin=function(e){var t=e._fullLayout;t._size||(t._size={}),t._pushmargin||(t._pushmargin={});var n=t._size,r=JSON.stringify(n),o=Math.max(t.margin.l||0,0),s=Math.max(t.margin.r||0,0),l=Math.max(t.margin.t||0,0),c=Math.max(t.margin.b||0,0),u=t._pushmargin;if(!1!==t.margin.autoexpand)for(var d in u.base={l:{val:0,size:o},r:{val:1,size:s},t:{val:1,size:l},b:{val:0,size:c}},u){var f=u[d].l||{},h=u[d].b||{},p=f.val,g=f.size,y=h.val,m=h.size;for(var v in u){if(a(g)&&u[v].r){var x=u[v].r.val,b=u[v].r.size;if(x>p){var _=(g*x+(b-t.width)*p)/(x-p),w=(b*(1-p)+(g-t.width)*(1-x))/(x-p);_>=0&&w>=0&&_+w>o+s&&(o=_,s=w)}}if(a(m)&&u[v].t){var k=u[v].t.val,M=u[v].t.size;if(k>y){var T=(m*k+(M-t.height)*y)/(k-y),A=(M*(1-y)+(m-t.height)*(1-k))/(k-y);T>=0&&A>=0&&T+A>c+l&&(c=T,l=A)}}}}if(n.l=Math.round(o),n.r=Math.round(s),n.t=Math.round(l),n.b=Math.round(c),n.p=Math.round(t.margin.pad),n.w=Math.round(t.width)-n.l-n.r,n.h=Math.round(t.height)-n.t-n.b,!t._replotting&&"{}"!==r&&r!==JSON.stringify(t._size))return i.call("plot",e)},y.graphJson=function(e,t,n,r,a){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&y.supplyDefaults(e);var i=a?e._fullData:e.data,o=a?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function c(e){if("function"==typeof e)return null;if(s.isPlainObject(e)){var t,r,a={};for(t in e)if("function"!=typeof e[t]&&-1===["_","["].indexOf(t.charAt(0))){if("keepdata"===n){if("src"===t.substr(t.length-3))continue}else if("keepstream"===n){if("string"==typeof(r=e[t+"src"])&&r.indexOf(":")>0&&!s.isPlainObject(e.stream))continue}else if("keepall"!==n&&"string"==typeof(r=e[t+"src"])&&r.indexOf(":")>0)continue;a[t]=c(e[t])}return a}return Array.isArray(e)?e.map(c):s.isJSDate(e)?s.ms2DateTimeLocal(+e):e}var u={data:(i||[]).map(function(e){var n=c(e);return t&&delete n.fit,n})};return t||(u.layout=c(o)),e.framework&&e.framework.isPolar&&(u=e.framework.getConfig()),l&&(u.frames=c(l)),"object"===r?u:JSON.stringify(u)},y.modifyFrames=function(e,t){var n,r,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(n=0;n<t.length;n++)switch((r=t[n]).type){case"replace":a=r.value;var s=(i[r.index]||{}).name,l=a.name;i[r.index]=o[l]=a,l!==s&&(delete o[s],o[l]=a);break;case"insert":o[(a=r.value).name]=a,i.splice(r.index,0,a);break;case"delete":delete o[(a=i[r.index]).name],i.splice(r.index,1)}return Promise.resolve()},y.computeFrame=function(e,t){var n,r,a,i,o=e._transitionData._frameHash;if(!t)throw new Error("computeFrame must be given a string frame name");var s=o[t.toString()];if(!s)return!1;for(var l=[s],c=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===c.indexOf(s.name);)l.push(s),c.push(s.name);for(var u={};s=l.pop();)if(s.layout&&(u.layout=y.extendLayout(u.layout,s.layout)),s.data){if(u.data||(u.data=[]),!(r=s.traces))for(r=[],n=0;n<s.data.length;n++)r[n]=n;for(u.traces||(u.traces=[]),n=0;n<s.data.length;n++)void 0!==(a=r[n])&&null!==a&&(-1===(i=u.traces.indexOf(a))&&(i=u.data.length,u.traces[i]=a),u.data[i]=y.extendTrace(u.data[i],s.data[n]))}return u},y.recomputeFrameHash=function(e){for(var t=e._transitionData._frameHash={},n=e._transitionData._frames,r=0;r<n.length;r++){var a=n[r];a&&a.name&&(t[a.name]=a)}},y.extendObjectWithContainers=function(e,t,n){var r,a,i,o,l,c,u,d=s.extendDeepNoArrays({},t||{}),f=s.expandObjectPaths(d),h={};if(n&&n.length)for(i=0;i<n.length;i++)void 0===(a=(r=s.nestedProperty(f,n[i])).get())?s.nestedProperty(h,n[i]).set(null):(r.set(null),s.nestedProperty(h,n[i]).set(a));if(e=s.extendDeepNoArrays(e||{},f),n&&n.length)for(i=0;i<n.length;i++)if(c=s.nestedProperty(h,n[i]).get()){for(u=(l=s.nestedProperty(e,n[i])).get(),Array.isArray(u)||(u=[],l.set(u)),o=0;o<c.length;o++){var p=c[o];u[o]=null===p?null:y.extendObjectWithContainers(u[o],p)}l.set(u)}return e},y.dataArrayContainers=["transforms","dimensions"],y.layoutArrayContainers=i.layoutArrayContainers,y.extendTrace=function(e,t){return y.extendObjectWithContainers(e,t,y.dataArrayContainers)},y.extendLayout=function(e,t){return y.extendObjectWithContainers(e,t,y.layoutArrayContainers)},y.transition=function(e,t,n,r,a,o){var l,c,u=Array.isArray(t)?t.length:0,d=r.slice(0,u),f=[];var h=!1;for(l=0;l<d.length;l++){c=d[l];e._fullData[c]._module}var p=[y.previousPromises,function(){if(e._transitionData)return e._transitioning=!1,function(e){var t=Promise.resolve();if(!e)return t;for(;e.length;)t=t.then(e.shift());return t}(e._transitionData._interruptCallbacks)},function(){var r;for(r=0;r<d.length;r++){var a=d[r],o=e._fullData[a]._module;o&&(o.animatable&&f.push(a),e.data[d[r]]=y.extendTrace(e.data[d[r]],t[r]))}var l=s.expandObjectPaths(s.extendDeepNoArrays({},n)),c=/^[xy]axis[0-9]*$/;for(var u in l)c.test(u)&&delete l[u].range;return y.extendLayout(e.layout,l),delete e.calcdata,y.supplyDefaults(e),y.doCalcdata(e),i.getComponentMethod("errorbars","calc")(e),Promise.resolve()},y.rehover,function(){return e.emit("plotly_transitioning",[]),new Promise(function(t){e._transitioning=!0,o.duration>0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){h=!0}),a.redraw&&e._transitionData._interruptCallbacks.push(function(){return i.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var r,l,c=0,u=0;function d(){return c++,function(){var n;h||++u!==c||(n=t,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(a.redraw)return i.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(n)))}}var p=e._fullLayout._basePlotModules,g=!1;if(n)for(l=0;l<p.length;l++)if(p[l].transitionAxes){var y=s.expandObjectPaths(n);g=p[l].transitionAxes(e,y,o,d)||g}for(g?(r=s.extendFlat({},o)).duration=0:r=o,l=0;l<p.length;l++)p[l].plot(e,f,r,d);setTimeout(d())})}],g=s.syncOrAsync(p,e);return g&&g.then||(g=Promise.resolve()),g.then(function(){return e})},y.doCalcdata=function(e,t){var n,r,a,s,l=u.list(e),d=e._fullData,f=e._fullLayout,h=new Array(d.length),p=(e.calcdata||[]).slice(0);for(e.calcdata=h,e.firstscatter=!0,f._numBoxes=0,f._numViolins=0,f._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,f._piecolormap={},f._piecolorway=null,f._piedefaultcolorcount=0,a=0;a<d.length;a++)Array.isArray(t)&&-1===t.indexOf(a)&&(h[a]=p[a]);for(a=0;a<d.length;a++)(n=d[a])._arrayAttrs=o.findArrayAttributes(n);var g=f._subplots.polar||[];for(a=0;a<g.length;a++)l.push(f[g[a]].radialaxis,f[g[a]].angularaxis);M(l);var y=!1;for(a=0;a<d.length;a++)if(!0===(n=d[a]).visible&&n.transforms)for((r=n._module)&&r.calc&&r.calc(e,n),s=0;s<n.transforms.length;s++){var v=n.transforms[s];(r=m[v.type])&&r.calcTransform&&(n._hasCalcTransform=!0,y=!0,r.calcTransform(e,n,v))}function x(t,a){if(n=d[t],!!(r=n._module).isContainer===a){var i=[];if(!0===n.visible){var o=n.transforms||[];for(s=o.length-1;s>=0;s--)if(o[s].enabled){n._indexToPoints=o[s]._indexToPoints;break}r&&r.calc&&(i=r.calc(e,n))}Array.isArray(i)&&i[0]||(i=[{x:c,y:c}]),i[0].t||(i[0].t={}),i[0].trace=n,h[t]=i}}for(y&&M(l),a=0;a<d.length;a++)x(a,!0);for(a=0;a<d.length;a++)x(a,!1);i.getComponentMethod("fx","calc")(e)},y.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()},y.generalUpdatePerTraceModule=function(e,t,n,r){var a,i=t.traceHash,o={};for(a=0;a<n.length;a++){var l=n[a],c=l[0].trace;c.visible&&(o[c.type]=o[c.type]||[],o[c.type].push(l))}for(var u in i)if(!o[u]){var d=i[u][0];d[0].trace.visible=!1,o[u]=[d]}for(var f in o){var h=o[f];h[0][0].trace._module.plot(e,t,s.filterVisible(h),r)}t.traceHash=o}},{"../components/color":32,"../constants/numerical":134,"../lib":152,"../plot_api/plot_schema":185,"../plots/cartesian/axis_ids":197,"../registry":241,"./animation_attributes":189,"./attributes":191,"./command":218,"./font_attributes":220,"./frame_attributes":221,"./layout_attributes":224,"./sort_modules":239,d3:3,"fast-isnumeric":5}],227:[function(e,t,n){"use strict";t.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-axis","radial-axis","angular-line","radial-line"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},{}],228:[function(e,t,n){"use strict";var r=e("../../lib");n.setConvertAngular=function(e){var t,n,a={clockwise:-1,counterclockwise:1}[e.direction],i=r.deg2rad(e.rotation);function o(){return e.period?Math.max(e.period,e._categories.length):e._categories.length}function s(e){return(e-i)/a}"linear"===e.type?(t=function(e,t){return"degrees"===t?r.deg2rad(e):e},n=function(e,t){return"degrees"===t?r.rad2deg(e):e}):"category"===e.type&&(t=function(e){var t=o();return 2*e*Math.PI/t},n=function(e){return e*o()/Math.PI/2}),e.unTransformRad=s,e._c2rad=t,e.c2rad=function(e,n){return function(e){return a*e+i}(t(e,n))},e.rad2c=function(e,t){return n(s(e),t)},e.c2deg=function(t,n){return r.rad2deg(e.c2rad(t,n))},e.deg2c=function(t,n){return e.rad2c(r.deg2rad(t),n)}}},{"../../lib":152}],229:[function(e,t,n){"use strict";var r=e("../get_data").getSubplotCalcData,a=e("../../lib").counterRegex,i=e("./polar"),o=e("./constants"),s=o.attr,l=o.name,c=a(l),u={};u[s]={valType:"subplotid",role:"info",dflt:l,editType:"calc",description:["Sets a reference between this trace's data coordinates and","a polar subplot.","If *polar* (the default value), the data refer to `layout.polar`.","If *polar2*, the data refer to `layout.polar2`, and so on."].join(" ")},t.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),plot:function(e){for(var t=e._fullLayout,n=e.calcdata,a=t._subplots[l],o=0;o<a.length;o++){var s=a[o],c=r(n,l,s),u=t[s]._subplot;u||(u=i(e,s),t[s]._subplot=u),u.plot(c,t,e._promises)}},clean:function(e,t,n,r){for(var a=r._subplots[l]||[],i=0;i<a.length;i++){var o=a[i],s=r[o]._subplot;if(!t[o]&&s)for(var c in s.framework.remove(),s.layers["radial-axis-title"].remove(),s.clipPaths)s.clipPaths[c].remove()}},toSVG:e("../cartesian").toSVG}},{"../../lib":152,"../cartesian":205,"../get_data":222,"./constants":227,"./layout_attributes":230,"./layout_defaults":231,"./polar":238}],230:[function(e,t,n){"use strict";var r=e("../../components/color/attributes"),a=e("../cartesian/layout_attributes"),i=e("../domain").attributes,o=e("../../lib").extendFlat,s=e("../../plot_api/edit_types").overrideAll,l=s({color:a.color,showline:o({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:o({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth},"plot","from-root"),c=s({tickmode:a.tickmode,nticks:a.nticks,tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,showticklabels:a.showticklabels,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,separatethousands:a.separatethousands,tickfont:a.tickfont,tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,layer:a.layer},"plot","from-root"),u={visible:o({},a.visible,{dflt:!0}),type:a.type,autorange:a.autorange,rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",role:"style",editType:"calc",description:["If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","If *normal*, the range is computed in relation to the extrema","of the input data (same behavior as for cartesian axes)."].join(" ")},range:a.range,categoryorder:a.categoryorder,categoryarray:a.categoryarray,angle:{valType:"angle",editType:"plot",role:"info",description:["Sets the angle (in degrees) from which the radial axis is drawn.","Note that by default, radial axis line on the theta=0 line","corresponds to a line pointing right (like what mathematicians prefer).","Defaults to the first `polar.sector` angle."].join(" ")},side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot",role:"info",description:["Determines on which side of radial axis line","the tick and tick labels appear."].join(" ")},title:o({},a.title,{editType:"plot",dflt:""}),titlefont:s(a.titlefont,"plot","from-root"),hoverformat:a.hoverformat,editType:"calc"};o(u,l,c);var d={visible:o({},a.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",role:"info",editType:"calc",description:["Sets the angular axis type.","If *linear*, set `thetaunit` to determine the unit in which axis value are shown.","If *category, use `period` to set the number of integer coordinates around polar axis."].join(" ")},categoryorder:a.categoryorder,categoryarray:a.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",role:"info",editType:"calc",description:["Sets the format unit of the formatted *theta* values.","Has an effect only when `angularaxis.type` is *linear*."].join(" ")},period:{valType:"number",editType:"calc",min:0,role:"info",description:["Set the angular period.","Has an effect only when `angularaxis.type` is *category*."].join(" ")},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",role:"info",editType:"calc",description:["Sets the direction corresponding to positive angles."].join(" ")},rotation:{valType:"angle",editType:"calc",role:"info",description:["Sets that start position (in degrees) of the angular axis","By default, polar subplots with `direction` set to *counterclockwise*","get a `rotation` of *0*","which corresponds to due East (like what mathematicians prefer).","In turn, polar with `direction` set to *clockwise* get a rotation of *90*","which corresponds to due North (like on a compass),"].join(" ")},hoverformat:a.hoverformat,editType:"calc"};o(d,l,c),t.exports={domain:i({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],role:"info",editType:"plot",description:["Sets angular span of this polar subplot with two angles (in degrees).","Sector are assumed to be spanned in the counterclockwise direction","with *0* corresponding to rightmost limit of the polar subplot."].join(" ")},bgcolor:{valType:"color",role:"style",editType:"plot",dflt:r.background,description:"Set the background color of the subplot"},radialaxis:u,angularaxis:d,editType:"calc"}},{"../../components/color/attributes":31,"../../lib":152,"../../plot_api/edit_types":179,"../cartesian/layout_attributes":206,"../domain":219}],231:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../components/color"),i=e("../subplot_defaults"),o=e("../get_data").getSubplotData,s=e("../cartesian/tick_value_defaults"),l=e("../cartesian/tick_mark_defaults"),c=e("../cartesian/tick_label_defaults"),u=e("../cartesian/category_order_defaults"),d=e("../cartesian/line_grid_defaults"),f=e("../cartesian/axis_autotype"),h=e("../cartesian/set_convert"),p=e("./helpers").setConvertAngular,g=e("./layout_attributes"),y=e("./constants"),m=y.axisNames;function v(e,t,n,i){var f=n("bgcolor");i.bgColor=a.combine(f,i.paper_bgcolor);var v,b=n("sector"),_=o(i.fullData,y.name,i.id),w=i.layoutOut;function k(e,t){return n(v+"."+e,t)}for(var M=0;M<m.length;M++){v=m[M],r.isPlainObject(e[v])||(e[v]={});var T=e[v],A=t[v]={};A._id=A._name=v;var S=y.axisName2dataArray[v],L=x(T,A,k,_,S);u(T,A,k,{axData:_,dataAttr:S});var C,z,O=k("visible");switch(h(A,w),O&&(z=(C=k("color"))===T.color?C:i.font.color),A._m=1,v){case"radialaxis":var D=k("autorange",!A.isValidRange(T.range));T.autorange=D,D&&k("rangemode"),"reversed"===D&&(A._m=-1),k("range"),A.cleanRange("range",{dfltRange:[0,1]}),O&&(k("side"),k("angle",b[0]),k("title"),r.coerceFont(k,"titlefont",{family:i.font.family,size:Math.round(1.2*i.font.size),color:z}));break;case"angularaxis":if("date"===L){r.log("Polar plots do not support date angular axes yet.");for(var P=0;P<_.length;P++)_[P].visible=!1;L=T.type=A.type="linear"}k("linear"===L?"thetaunit":"period"),k("rotation",{counterclockwise:0,clockwise:90}[k("direction")]),p(A)}if(O)s(T,A,k,A.type),c(T,A,k,A.type,{tickSuffixDflt:"degrees"===A.thetaunit?"°":void 0}),l(T,A,k,{outerTicks:!0}),k("showticklabels")&&(r.coerceFont(k,"tickfont",{family:i.font.family,size:i.font.size,color:z}),k("tickangle"),k("tickformat")),d(T,A,k,{dfltColor:C,bgColor:i.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:g[v]}),k("layer");"category"!==L&&k("hoverformat"),A._input=T}}function x(e,t,n,r,a){if("-"===n("type")){for(var i,o=0;o<r.length;o++)if(r[o].visible){i=r[o];break}i&&(t.type=f(i[a],"gregorian")),"-"===t.type?t.type="linear":e.type=t.type}return t.type}t.exports=function(e,t,n){i(e,t,n,{type:y.name,attributes:g,handleDefaults:v,font:t.font,paper_bgcolor:t.paper_bgcolor,fullData:n,layoutOut:t})}},{"../../components/color":32,"../../lib":152,"../cartesian/axis_autotype":195,"../cartesian/category_order_defaults":198,"../cartesian/line_grid_defaults":208,"../cartesian/set_convert":212,"../cartesian/tick_label_defaults":213,"../cartesian/tick_mark_defaults":214,"../cartesian/tick_value_defaults":215,"../get_data":222,"../subplot_defaults":240,"./constants":227,"./helpers":228,"./layout_attributes":230}],232:[function(e,t,n){"use strict";var r=e("../../../traces/scatter/attributes"),a=r.marker;t.exports={r:r.r,t:r.t,marker:{color:a.color,size:a.size,symbol:a.symbol,opacity:a.opacity,editType:"calc"}}},{"../../../traces/scatter/attributes":253}],233:[function(e,t,n){"use strict";var r=e("../../cartesian/layout_attributes"),a=e("../../../lib/extend").extendFlat,i=e("../../../plot_api/edit_types").overrideAll,o=a({},r.domain,{description:["Polar chart subplots are not supported yet.","This key has currently no effect."].join(" ")});function s(e,t){var n={showline:{valType:"boolean",role:"style",description:["Determines whether or not the line bounding this",e,"axis","will be shown on the figure."].join(" ")},showticklabels:{valType:"boolean",role:"style",description:["Determines whether or not the",e,"axis ticks","will feature tick labels."].join(" ")},tickorientation:{valType:"enumerated",values:["horizontal","vertical"],role:"style",description:["Sets the orientation (from the paper perspective)","of the",e,"axis tick labels."].join(" ")},ticklen:{valType:"number",min:0,role:"style",description:["Sets the length of the tick lines on this",e,"axis."].join(" ")},tickcolor:{valType:"color",role:"style",description:["Sets the color of the tick lines on this",e,"axis."].join(" ")},ticksuffix:{valType:"string",role:"style",description:["Sets the length of the tick lines on this",e,"axis."].join(" ")},endpadding:{valType:"number",role:"style"},visible:{valType:"boolean",role:"info",description:["Determines whether or not this axis will be visible."].join(" ")}};return a({},t,n)}t.exports=i({radialaxis:s("radial",{range:{valType:"info_array",role:"info",items:[{valType:"number"},{valType:"number"}],description:["Defines the start and end point of this radial axis."].join(" ")},domain:o,orientation:{valType:"number",role:"style",description:["Sets the orientation (an angle with respect to the origin)","of the radial axis."].join(" ")}}),angularaxis:s("angular",{range:{valType:"info_array",role:"info",items:[{valType:"number",dflt:0},{valType:"number",dflt:360}],description:["Defines the start and end point of this angular axis."].join(" ")},domain:o}),layout:{direction:{valType:"enumerated",values:["clockwise","counterclockwise"],role:"info",description:["For polar plots only.","Sets the direction corresponding to positive angles."].join(" ")},orientation:{valType:"angle",role:"info",description:["For polar plots only.","Rotates the entire polar by the given angle."].join(" ")}}},"plot","nested")},{"../../../lib/extend":146,"../../../plot_api/edit_types":179,"../../cartesian/layout_attributes":206}],234:[function(e,t,n){"use strict";(t.exports=e("./micropolar")).manager=e("./micropolar_manager")},{"./micropolar":235,"./micropolar_manager":236}],235:[function(e,t,n){var r=e("d3"),a=e("../../../lib").extendDeepAll,i=e("../../../constants/alignment").MID_SHIFT,o=t.exports={version:"0.2.2"};o.Axis=function(){var e,t,n,s,l={data:[],layout:{}},c={},u={},d=r.dispatch("hover"),f={};return f.render=function(c){return function(c){t=c||t;var d=l.data,f=l.layout;("string"==typeof t||t.nodeName)&&(t=r.select(t)),t.datum(d).each(function(t,l){var c=t.slice();u={data:o.util.cloneJson(c),layout:o.util.cloneJson(f)};var d=0;c.forEach(function(e,t){e.color||(e.color=f.defaultColorRange[d],d=(d+1)%f.defaultColorRange.length),e.strokeColor||(e.strokeColor="LinePlot"===e.geometry?e.color:r.rgb(e.color).darker().toString()),u.data[t].color=e.color,u.data[t].strokeColor=e.strokeColor,u.data[t].strokeDash=e.strokeDash,u.data[t].strokeSize=e.strokeSize});var h=c.filter(function(e,t){var n=e.visible;return void 0===n||!0===n}),p=!1,g=h.map(function(e,t){return p=p||void 0!==e.groupId,e});if(p){var y=[],m=r.nest().key(function(e,t){return void 0!==e.groupId?e.groupId:"unstacked"}).entries(g).map(function(e,t){if("unstacked"===e.key)return e.values;var n=e.values[0].r.map(function(e,t){return 0});return e.values.forEach(function(e,t,r){e.yStack=[n],y.push(n),n=o.util.sumArrays(e.r,n)}),e.values});h=r.merge(m)}h.forEach(function(e,t){e.t=Array.isArray(e.t[0])?e.t:[e.t],e.r=Array.isArray(e.r[0])?e.r:[e.r]});var v=Math.min(f.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2;v=Math.max(10,v);var x,b=[f.margin.left+v,f.margin.top+v];x=p?[0,r.max(o.util.sumArrays(o.util.arrayLast(h).r[0],o.util.arrayLast(y)))]:r.extent(o.util.flattenArray(h.map(function(e,t){return e.r}))),f.radialAxis.domain!=o.DATAEXTENT&&(x[0]=0),n=r.scale.linear().domain(f.radialAxis.domain!=o.DATAEXTENT&&f.radialAxis.domain?f.radialAxis.domain:x).range([0,v]),u.layout.radialAxis.domain=n.domain();var _,w=o.util.flattenArray(h.map(function(e,t){return e.t})),k="string"==typeof w[0];k&&(w=o.util.deduplicate(w),_=w.slice(),w=r.range(w.length),h=h.map(function(e,t){var n=e;return e.t=[w],p&&(n.yStack=e.yStack),n}));var M=h.filter(function(e,t){return"LinePlot"===e.geometry||"DotPlot"===e.geometry}).length===h.length,T=null===f.needsEndSpacing?k||!M:f.needsEndSpacing,A=f.angularAxis.domain&&f.angularAxis.domain!=o.DATAEXTENT&&!k&&f.angularAxis.domain[0]>=0?f.angularAxis.domain:r.extent(w),S=Math.abs(w[1]-w[0]);M&&!k&&(S=0);var L=A.slice();T&&k&&(L[1]+=S);var C=f.angularAxis.ticksCount||4;C>8&&(C=C/(C/8)+C%8),f.angularAxis.ticksStep&&(C=(L[1]-L[0])/C);var z=f.angularAxis.ticksStep||(L[1]-L[0])/(C*(f.minorTicks+1));_&&(z=Math.max(Math.round(z),1)),L[2]||(L[2]=z);var O=r.range.apply(this,L);if(O=O.map(function(e,t){return parseFloat(e.toPrecision(12))}),s=r.scale.linear().domain(L.slice(0,2)).range("clockwise"===f.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=T?S:0,void 0===(e=r.select(this).select("svg.chart-root"))||e.empty()){var D=(new DOMParser).parseFromString("<svg xmlns='http://www.w3.org/2000/svg' class='chart-root'>' + '<g class='outer-group'>' + '<g class='chart-group'>' + '<circle class='background-circle'></circle>' + '<g class='geometry-group'></g>' + '<g class='radial axis-group'>' + '<circle class='outside-circle'></circle>' + '</g>' + '<g class='angular axis-group'></g>' + '<g class='guides-group'><line></line><circle r='0'></circle></g>' + '</g>' + '<g class='legend-group'></g>' + '<g class='tooltips-group'></g>' + '<g class='title-group'><text></text></g>' + '</g>' + '</svg>","application/xml"),P=this.appendChild(this.ownerDocument.importNode(D.documentElement,!0));e=r.select(P)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var I,j=e.select(".chart-group"),E={fill:"none",stroke:f.tickColor},N={"font-size":f.font.size,"font-family":f.font.family,fill:f.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map(function(e,t){return" "+e+" 0 "+f.font.outlineColor}).join(",")};if(f.showLegend){I=e.select(".legend-group").attr({transform:"translate("+[v,f.margin.top]+")"}).style({display:"block"});var R=h.map(function(e,t){var n=o.util.cloneJson(e);return n.symbol="DotPlot"===e.geometry?e.dotType||"circle":"LinePlot"!=e.geometry?"square":"line",n.visibleInLegend=void 0===e.visibleInLegend||e.visibleInLegend,n.color="LinePlot"===e.geometry?e.strokeColor:e.color,n});o.Legend().config({data:h.map(function(e,t){return e.name||"Element"+t}),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:I,elements:R,reverseOrder:f.legend.reverseOrder})})();var F=I.node().getBBox();v=Math.min(f.width-F.width-f.margin.left-f.margin.right,f.height-f.margin.top-f.margin.bottom)/2,v=Math.max(10,v),b=[f.margin.left+v,f.margin.top+v],n.range([0,v]),u.layout.radialAxis.domain=n.domain(),I.attr("transform","translate("+[b[0]+v,b[1]-v]+")")}else I=e.select(".legend-group").style({display:"none"});e.attr({width:f.width,height:f.height}).style({opacity:f.opacity}),j.attr("transform","translate("+b+")").style({cursor:"crosshair"});var B=[(f.width-(f.margin.left+f.margin.right+2*v+(F?F.width:0)))/2,(f.height-(f.margin.top+f.margin.bottom+2*v))/2];if(B[0]=Math.max(0,B[0]),B[1]=Math.max(0,B[1]),e.select(".outer-group").attr("transform","translate("+B+")"),f.title){var H=e.select("g.title-group text").style(N).text(f.title),q=H.node().getBBox();H.attr({x:b[0]-q.width/2,y:b[1]-v-20})}var V=e.select(".radial.axis-group");if(f.radialAxis.gridLinesVisible){var U=V.selectAll("circle.grid-circle").data(n.ticks(5));U.enter().append("circle").attr({class:"grid-circle"}).style(E),U.attr("r",n),U.exit().remove()}V.select("circle.outside-circle").attr({r:v}).style(E);var G=e.select("circle.background-circle").attr({r:v}).style({fill:f.backgroundColor,stroke:f.stroke});function Y(e,t){return s(e)%360+f.orientation}if(f.radialAxis.visible){var Z=r.svg.axis().scale(n).ticks(5).tickSize(5);V.call(Z).attr({transform:"rotate("+f.radialAxis.orientation+")"}),V.selectAll(".domain").style(E),V.selectAll("g>text").text(function(e,t){return this.textContent+f.radialAxis.ticksSuffix}).style(N).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(e,t){return"horizontal"===f.radialAxis.tickOrientation?"rotate("+-f.radialAxis.orientation+") translate("+[0,N["font-size"]]+")":"translate("+[0,N["font-size"]]+")"}}),V.selectAll("g>line").style({stroke:"black"})}var X=e.select(".angular.axis-group").selectAll("g.angular-tick").data(O),W=X.enter().append("g").classed("angular-tick",!0);X.attr({transform:function(e,t){return"rotate("+Y(e)+")"}}).style({display:f.angularAxis.visible?"block":"none"}),X.exit().remove(),W.append("line").classed("grid-line",!0).classed("major",function(e,t){return t%(f.minorTicks+1)==0}).classed("minor",function(e,t){return!(t%(f.minorTicks+1)==0)}).style(E),W.selectAll(".minor").style({stroke:f.minorTickColor}),X.select("line.grid-line").attr({x1:f.tickLength?v-f.tickLength:0,x2:v}).style({display:f.angularAxis.gridLinesVisible?"block":"none"}),W.append("text").classed("axis-text",!0).style(N);var J=X.select("text.axis-text").attr({x:v+f.labelOffset,dy:i+"em",transform:function(e,t){var n=Y(e),r=v+f.labelOffset,a=f.angularAxis.tickOrientation;return"horizontal"==a?"rotate("+-n+" "+r+" 0)":"radial"==a?n<270&&n>90?"rotate(180 "+r+" 0)":null:"rotate("+(n<=180&&n>0?-90:90)+" "+r+" 0)"}}).style({"text-anchor":"middle",display:f.angularAxis.labelsVisible?"block":"none"}).text(function(e,t){return t%(f.minorTicks+1)!=0?"":_?_[e]+f.angularAxis.ticksSuffix:e+f.angularAxis.ticksSuffix}).style(N);f.angularAxis.rewriteTicks&&J.text(function(e,t){return t%(f.minorTicks+1)!=0?"":f.angularAxis.rewriteTicks(this.textContent,t)});var Q=r.max(j.selectAll(".angular-tick text")[0].map(function(e,t){return e.getCTM().e+e.getBBox().width}));I.attr({transform:"translate("+[v+Q,f.margin.top]+")"});var $=e.select("g.geometry-group").selectAll("g").size()>0,K=e.select("g.geometry-group").selectAll("g.geometry").data(h);if(K.enter().append("g").attr({class:function(e,t){return"geometry geometry"+t}}),K.exit().remove(),h[0]||$){var ee=[];h.forEach(function(e,t){var r={};r.radialScale=n,r.angularScale=s,r.container=K.filter(function(e,n){return n==t}),r.geometry=e.geometry,r.orientation=f.orientation,r.direction=f.direction,r.index=t,ee.push({data:e,geometryConfig:r})});var te=[];r.nest().key(function(e,t){return void 0!==e.data.groupId||"unstacked"}).entries(ee).forEach(function(e,t){"unstacked"===e.key?te=te.concat(e.values.map(function(e,t){return[e]})):te.push(e.values)}),te.forEach(function(e,t){var n;n=Array.isArray(e)?e[0].geometryConfig.geometry:e.geometryConfig.geometry;var r=e.map(function(e,t){return a(o[n].defaultConfig(),e)});o[n]().config(r)()})}var ne,re,ae=e.select(".guides-group"),ie=e.select(".tooltips-group"),oe=o.tooltipPanel().config({container:ie,fontSize:8})(),se=o.tooltipPanel().config({container:ie,fontSize:8})(),le=o.tooltipPanel().config({container:ie,hasTick:!0})();if(!k){var ce=ae.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});j.on("mousemove.angular-guide",function(e,t){var n=o.util.getMousePos(G).angle;ce.attr({x2:-v,transform:"rotate("+n+")"}).style({opacity:.5});var r=(n+180+360-f.orientation)%360;ne=s.invert(r);var a=o.util.convertToCartesian(v+12,n+180);oe.text(o.util.round(ne)).move([a[0]+b[0],a[1]+b[1]])}).on("mouseout.angular-guide",function(e,t){ae.select("line").style({opacity:0})})}var ue=ae.select("circle").style({stroke:"grey",fill:"none"});j.on("mousemove.radial-guide",function(e,t){var r=o.util.getMousePos(G).radius;ue.attr({r:r}).style({opacity:.5}),re=n.invert(o.util.getMousePos(G).radius);var a=o.util.convertToCartesian(r,f.radialAxis.orientation);se.text(o.util.round(re)).move([a[0]+b[0],a[1]+b[1]])}).on("mouseout.radial-guide",function(e,t){ue.style({opacity:0}),le.hide(),oe.hide(),se.hide()}),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",function(t,n){var a=r.select(this),i=this.style.fill,s="black",l=this.style.opacity||1;if(a.attr({"data-opacity":l}),i&&"none"!==i){a.attr({"data-fill":i}),s=r.hsl(i).darker().toString(),a.style({fill:s,opacity:1});var c={t:o.util.round(t[0]),r:o.util.round(t[1])};k&&(c.t=_[t[0]]);var u="t: "+c.t+", r: "+c.r,d=this.getBoundingClientRect(),f=e.node().getBoundingClientRect(),h=[d.left+d.width/2-B[0]-f.left,d.top+d.height/2-B[1]-f.top];le.config({color:s}).text(u),le.move(h)}else i=this.style.stroke||"black",a.attr({"data-stroke":i}),s=r.hsl(i).darker().toString(),a.style({stroke:s,opacity:1})}).on("mousemove.tooltip",function(e,t){if(0!=r.event.which)return!1;r.select(this).attr("data-fill")&&le.show()}).on("mouseout.tooltip",function(e,t){le.hide();var n=r.select(this),a=n.attr("data-fill");a?n.style({fill:a,opacity:n.attr("data-opacity")}):n.style({stroke:n.attr("data-stroke"),opacity:n.attr("data-opacity")})})})}(c),this},f.config=function(e){if(!arguments.length)return l;var t=o.util.cloneJson(e);return t.data.forEach(function(e,t){l.data[t]||(l.data[t]={}),a(l.data[t],o.Axis.defaultConfig().data[0]),a(l.data[t],e)}),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,t.layout),this},f.getLiveConfig=function(){return u},f.getinputConfig=function(){return c},f.radialScale=function(e){return n},f.angularScale=function(e){return s},f.svg=function(){return e},r.rebind(f,d,"on"),f},o.Axis.defaultConfig=function(e,t){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:r.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(e,t){for(var n in e)n in t&&(t[n]=e[n])},o.util._extend=function(e,t){for(var n in e)t[n]=e[n]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(e,t){var n=t||6;return r.range(0,360+n,n).map(function(t,n){var r=t*Math.PI/180;return[t,e(r)]})},o.util.dataFromEquation=function(e,t,n){var a=t||6,i=[],o=[];r.range(0,360+a,a).forEach(function(t,n){var r=t*Math.PI/180,a=e(r);i.push(t),o.push(a)});var s={t:i,r:o};return n&&(s.name=n),s},o.util.ensureArray=function(e,t){if(void 0===e)return null;var n=[].concat(e);return r.range(t).map(function(e,t){return n[t]||n[0]})},o.util.fillArrays=function(e,t,n){return t.forEach(function(t,r){e[t]=o.util.ensureArray(e[t],n)}),e},o.util.cloneJson=function(e){return JSON.parse(JSON.stringify(e))},o.util.validateKeys=function(e,t){"string"==typeof t&&(t=t.split("."));var n=t.shift();return e[n]&&(!t.length||objHasKeys(e[n],t))},o.util.sumArrays=function(e,t){return r.zip(e,t).map(function(e,t){return r.sum(e)})},o.util.arrayLast=function(e){return e[e.length-1]},o.util.arrayEqual=function(e,t){for(var n=Math.max(e.length,t.length,1);n-- >=0&&e[n]===t[n];);return-2===n},o.util.flattenArray=function(e){for(var t=[];!o.util.arrayEqual(t,e);)t=e,e=[].concat.apply([],e);return e},o.util.deduplicate=function(e){return e.filter(function(e,t,n){return n.indexOf(e)==t})},o.util.convertToCartesian=function(e,t){var n=t*Math.PI/180;return[e*Math.cos(n),e*Math.sin(n)]},o.util.round=function(e,t){var n=t||2,r=Math.pow(10,n);return Math.round(e*r)/r},o.util.getMousePos=function(e){var t=r.mouse(e.node()),n=t[0],a=t[1],i={};return i.x=n,i.y=a,i.pos=t,i.angle=180*(Math.atan2(a,n)+Math.PI)/Math.PI,i.radius=Math.sqrt(n*n+a*a),i},o.util.duplicatesCount=function(e){for(var t,n={},r={},a=0,i=e.length;a<i;a++)(t=e[a])in n?(n[t]++,r[t]=n[t]):n[t]=1;return r},o.util.duplicates=function(e){return Object.keys(o.util.duplicatesCount(e))},o.util.translator=function(e,t,n,r){if(r){var a=n.slice();n=t,t=a}var i=t.reduce(function(e,t){if(void 0!==e)return e[t]},e);void 0!==i&&(t.reduce(function(e,n,r){if(void 0!==e)return r===t.length-1&&delete e[n],e[n]},e),n.reduce(function(e,t,r){return void 0===e[t]&&(e[t]={}),r===n.length-1&&(e[t]=i),e[t]},e))},o.PolyChart=function(){var e=[o.PolyChart.defaultConfig()],t=r.dispatch("hover"),n={solid:"none",dash:[5,2],dot:[2,5]};function i(){var t=e[0].geometryConfig,a=t.container;"string"==typeof a&&(a=r.select(a)),a.datum(e).each(function(e,a){var i=!!e[0].data.yStack,o=e.map(function(e,t){return i?r.zip(e.data.t[0],e.data.r[0],e.data.yStack[0]):r.zip(e.data.t[0],e.data.r[0])}),s=t.angularScale,l=t.radialScale.domain()[0],c={bar:function(n,a,i){var o=e[i].data,l=t.radialScale(n[1])-t.radialScale(0),c=t.radialScale(n[2]||0),u=o.barWidth;r.select(this).attr({class:"mark bar",d:"M"+[[l+c,-u/2],[l+c,u/2],[c,u/2],[c,-u/2]].join("L")+"Z",transform:function(e,n){return"rotate("+(t.orientation+s(e[0]))+")"}})}};c.dot=function(n,a,i){var o=n[2]?[n[0],n[1]+n[2]]:n,s=r.svg.symbol().size(e[i].data.dotSize).type(e[i].data.dotType)(n,a);r.select(this).attr({class:"mark dot",d:s,transform:function(e,n){var r,a,i,s=(r=function(e,n){var r=t.radialScale(e[1]),a=(t.angularScale(e[0])+t.orientation)*Math.PI/180;return{r:r,t:a}}(o),a=r.r*Math.cos(r.t),i=r.r*Math.sin(r.t),{x:a,y:i});return"translate("+[s.x,s.y]+")"}})};var u=r.svg.line.radial().interpolate(e[0].data.lineInterpolation).radius(function(e){return t.radialScale(e[1])}).angle(function(e){return t.angularScale(e[0])*Math.PI/180});c.line=function(n,a,i){var s=n[2]?o[i].map(function(e,t){return[e[0],e[1]+e[2]]}):o[i];if(r.select(this).each(c.dot).style({opacity:function(t,n){return+e[i].data.dotVisible},fill:p.stroke(n,a,i)}).attr({class:"mark dot"}),!(a>0)){var l=r.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:u(s),transform:function(e,n){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(e,t){return p.fill(n,a,i)},"fill-opacity":0,stroke:function(e,t){return p.stroke(n,a,i)},"stroke-width":function(e,t){return p["stroke-width"](n,a,i)},"stroke-dasharray":function(e,t){return p["stroke-dasharray"](n,a,i)},opacity:function(e,t){return p.opacity(n,a,i)},display:function(e,t){return p.display(n,a,i)}})}};var d=t.angularScale.range(),f=Math.abs(d[1]-d[0])/o[0].length*Math.PI/180,h=r.svg.arc().startAngle(function(e){return-f/2}).endAngle(function(e){return f/2}).innerRadius(function(e){return t.radialScale(l+(e[2]||0))}).outerRadius(function(e){return t.radialScale(l+(e[2]||0))+t.radialScale(e[1])});c.arc=function(e,n,a){r.select(this).attr({class:"mark arc",d:h,transform:function(e,n){return"rotate("+(t.orientation+s(e[0])+90)+")"}})};var p={fill:function(t,n,r){return e[r].data.color},stroke:function(t,n,r){return e[r].data.strokeColor},"stroke-width":function(t,n,r){return e[r].data.strokeSize+"px"},"stroke-dasharray":function(t,r,a){return n[e[a].data.strokeDash]},opacity:function(t,n,r){return e[r].data.opacity},display:function(t,n,r){return void 0===e[r].data.visible||e[r].data.visible?"block":"none"}},g=r.select(this).selectAll("g.layer").data(o);g.enter().append("g").attr({class:"layer"});var y=g.selectAll("path.mark").data(function(e,t){return e});y.enter().append("path").attr({class:"mark"}),y.style(p).each(c[t.geometryType]),y.exit().remove(),g.exit().remove()})}return i.config=function(t){return arguments.length?(t.forEach(function(t,n){e[n]||(e[n]={}),a(e[n],o.PolyChart.defaultConfig()),a(e[n],t)}),this):e},i.getColorScale=function(){},r.rebind(i,t,"on"),i},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:r.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){var e=o.Legend.defaultConfig(),t=r.dispatch("hover");function n(){var t=e.legendConfig,i=e.data.map(function(e,n){return[].concat(e).map(function(e,r){var i=a({},t.elements[n]);return i.name=e,i.color=[].concat(t.elements[n].color)[r],i})}),o=r.merge(i);o=o.filter(function(e,n){return t.elements[n]&&(t.elements[n].visibleInLegend||void 0===t.elements[n].visibleInLegend)}),t.reverseOrder&&(o=o.reverse());var s=t.container;("string"==typeof s||s.nodeName)&&(s=r.select(s));var l=o.map(function(e,t){return e.color}),c=t.fontSize,u=null==t.isContinuous?"number"==typeof o[0]:t.isContinuous,d=u?t.height:c*o.length,f=s.classed("legend-group",!0).selectAll("svg").data([0]),h=f.enter().append("svg").attr({width:300,height:d+c,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});h.append("g").classed("legend-axis",!0),h.append("g").classed("legend-marks",!0);var p=r.range(o.length),g=r.scale[u?"linear":"ordinal"]().domain(p).range(l),y=r.scale[u?"linear":"ordinal"]().domain(p)[u?"range":"rangePoints"]([0,d]);if(u){var m=f.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);m.enter().append("stop"),m.attr({offset:function(e,t){return t/(l.length-1)*100+"%"}}).style({"stop-color":function(e,t){return e}}),f.append("rect").classed("legend-mark",!0).attr({height:t.height,width:t.colorBandWidth,fill:"url(#grad1)"})}else{var v=f.select(".legend-marks").selectAll("path.legend-mark").data(o);v.enter().append("path").classed("legend-mark",!0),v.attr({transform:function(e,t){return"translate("+[c/2,y(t)+c/2]+")"},d:function(e,t){var n,a,i,o=e.symbol;return i=3*(a=c),"line"===(n=o)?"M"+[[-a/2,-a/12],[a/2,-a/12],[a/2,a/12],[-a/2,a/12]]+"Z":-1!=r.svg.symbolTypes.indexOf(n)?r.svg.symbol().type(n).size(i)():r.svg.symbol().type("square").size(i)()},fill:function(e,t){return g(t)}}),v.exit().remove()}var x=r.svg.axis().scale(y).orient("right"),b=f.select("g.legend-axis").attr({transform:"translate("+[u?t.colorBandWidth:c,c/2]+")"}).call(x);return b.selectAll(".domain").style({fill:"none",stroke:"none"}),b.selectAll("line").style({fill:"none",stroke:u?t.textColor:"none"}),b.selectAll("text").style({fill:t.textColor,"font-size":t.fontSize}).text(function(e,t){return o[t].name}),n}return n.config=function(t){return arguments.length?(a(e,t),this):e},r.rebind(n,t,"on"),n},o.Legend.defaultConfig=function(e,t){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var e,t,n,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=10,c=function(){var r=(e=i.container.selectAll("g."+s).data([0])).enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return n=r.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),t=r.append("text").attr({dx:i.padding+l,dy:.3*+i.fontSize}),c};return c.text=function(a){var o=r.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",d=a||"";t.style({fill:u,"font-size":i.fontSize+"px"}).text(d);var f=i.padding,h=t.node().getBBox(),p={fill:i.color,stroke:s,"stroke-width":"2px"},g=h.width+2*f+l,y=h.height+2*f;return n.attr({d:"M"+[[l,-y/2],[l,-y/4],[i.hasTick?0:l,0],[l,y/4],[l,y/2],[g,y/2],[g,-y/2]].join("L")+"Z"}).style(p),e.attr({transform:"translate("+[l,-y/2+2*f]+")"}),e.style({display:"block"}),c},c.move=function(t){if(e)return e.attr({transform:"translate("+[t[0],t[1]]+")"}).style({display:"block"}),c},c.hide=function(){if(e)return e.style({display:"none"}),c},c.show=function(){if(e)return e.style({display:"block"}),c},c.config=function(e){return a(i,e),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var e={convert:function(e,t){var n={};if(e.data&&(n.data=e.data.map(function(e,n){var r=a({},e);return[[r,["marker","color"],["color"]],[r,["marker","opacity"],["opacity"]],[r,["marker","line","color"],["strokeColor"]],[r,["marker","line","dash"],["strokeDash"]],[r,["marker","line","width"],["strokeSize"]],[r,["marker","symbol"],["dotType"]],[r,["marker","size"],["dotSize"]],[r,["marker","barWidth"],["barWidth"]],[r,["line","interpolation"],["lineInterpolation"]],[r,["showlegend"],["visibleInLegend"]]].forEach(function(e,n){o.util.translator.apply(null,e.concat(t))}),t||delete r.marker,t&&delete r.groupId,t?("LinePlot"===r.geometry?(r.type="scatter",!0===r.dotVisible?(delete r.dotVisible,r.mode="lines+markers"):r.mode="lines"):"DotPlot"===r.geometry?(r.type="scatter",r.mode="markers"):"AreaChart"===r.geometry?r.type="area":"BarChart"===r.geometry&&(r.type="bar"),delete r.geometry):("scatter"===r.type?"lines"===r.mode?r.geometry="LinePlot":"markers"===r.mode?r.geometry="DotPlot":"lines+markers"===r.mode&&(r.geometry="LinePlot",r.dotVisible=!0):"area"===r.type?r.geometry="AreaChart":"bar"===r.type&&(r.geometry="BarChart"),delete r.mode,delete r.type),r}),!t&&e.layout&&"stack"===e.layout.barmode)){var i=o.util.duplicates(n.data.map(function(e,t){return e.geometry}));n.data.forEach(function(e,t){var r=i.indexOf(e.geometry);-1!=r&&(n.data[t].groupId=r)})}if(e.layout){var s=a({},e.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach(function(e,n){o.util.translator.apply(null,e.concat(t))}),t?(void 0!==s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&void 0!==s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&void 0!==s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&void 0!==s.margin.t){var l=["t","r","b","l","pad"],c=["top","right","bottom","left","pad"],u={};r.entries(s.margin).forEach(function(e,t){u[c[l.indexOf(e.key)]]=e.value}),s.margin=u}t&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),n.layout=s}return n}};return e}},{"../../../constants/alignment":132,"../../../lib":152,d3:3}],236:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../../lib"),i=e("../../../components/color"),o=e("./micropolar"),s=e("./undo_manager"),l=a.extendDeepAll,c=t.exports={};c.framework=function(e){var t,n,a,i,u,d=new s;function f(n,s){return s&&(u=s),r.select(r.select(u).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),t=t?l(t,n):n,a||(a=o.Axis()),i=o.adapter.plotly().convert(t),a.config(i).render(u),e.data=t.data,e.layout=t.layout,c.fillLayout(e),t}return f.isPolar=!0,f.svg=function(){return a.svg()},f.getConfig=function(){return t},f.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},f.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},f.setUndoPoint=function(){var e,r,a=this,i=o.util.cloneJson(t);e=i,r=n,d.add({undo:function(){r&&a(r)},redo:function(){a(e)}}),n=o.util.cloneJson(i)},f.undo=function(){d.undo()},f.redo=function(){d.redo()},f},c.fillLayout=function(e){var t=r.select(e).selectAll(".plot-container"),n=t.selectAll(".svg-container"),a=e.framework&&e.framework.svg&&e.framework.svg(),o={width:800,height:600,paper_bgcolor:i.background,_container:t,_paperdiv:n,_paper:a};e._fullLayout=l(o,e.layout)}},{"../../../components/color":32,"../../../lib":152,"./micropolar":235,"./undo_manager":237,d3:3}],237:[function(e,t,n){"use strict";t.exports=function(){var e,t=[],n=-1,r=!1;function a(e,t){return e?(r=!0,e[t](),r=!1,this):this}return{add:function(e){return r?this:(t.splice(n+1,t.length-n),t.push(e),n=t.length-1,this)},setCallback:function(t){e=t},undo:function(){var r=t[n];return r?(a(r,"undo"),n-=1,e&&e(r.undo),this):this},redo:function(){var r=t[n+1];return r?(a(r,"redo"),n+=1,e&&e(r.redo),this):this},clear:function(){t=[],n=-1},hasUndo:function(){return-1!==n},hasRedo:function(){return n<t.length-1},getCommands:function(){return t},getPreviousCommand:function(){return t[n-1]},getIndex:function(){return n}}}},{}],238:[function(e,t,n){"use strict";var r=e("d3"),a=e("tinycolor2"),i=e("../../registry"),o=e("../../lib"),s=e("../../components/color"),l=e("../../components/drawing"),c=e("../plots"),u=e("../cartesian/axes"),d=e("../cartesian/autorange").doAutoRange,f=e("../../components/dragelement"),h=e("../cartesian/dragbox"),p=e("../../components/fx"),g=e("../../components/titles"),y=e("../cartesian/select").prepSelect,m=e("../cartesian/select").clearSelect,v=e("../../lib/setcursor"),x=e("../../constants/alignment").MID_SHIFT,b=o._,_=o.deg2rad,w=o.rad2deg,k=o.wrap360,M=o.wrap180,T=e("./helpers").setConvertAngular,A=e("./constants");function S(e,t){this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,r="clip"+n._uid+t;this.clipIds.circle=r+"-circle",this.clipPaths.circle=n._clips.append("clipPath").attr("id",this.clipIds.circle),this.clipPaths.circle.append("path"),this.framework=n._polarlayer.append("g").attr("class",t),this.radialTickLayout=null,this.angularTickLayout=null}var L=S.prototype;function C(e,t,n){u.setConvert(e,n),e._min=t._min,e._max=t._max,e.setScale()}function z(e){var t=e.ticks+String(e.ticklen)+String(e.showticklabels);return"side"in e&&(t+=e.side),t}function O(e,t){if(P(t))return l.symbolFuncs[0](e);var n=e*Math.cos(_(t[0])),r=-e*Math.sin(_(t[0])),a=e*Math.cos(_(t[1])),i=-e*Math.sin(_(t[1]));return"M"+[n,r]+"A"+[e,e]+" "+(Math.abs(t[1]-t[0])<=180?[0,0,0]:[0,1,0])+" "+[a,i]}function D(e,t){return O(e,t)+(P(t)?"":"L0,0Z")}function P(e){return 360===Math.abs(e[1]-e[0])}function I(e,t,n){return t?(e.attr("display",null),e.attr(n)):e&&e.attr("display","none"),e}function j(e,t){return"translate("+e+","+t+")"}function E(e){return"rotate("+e+")"}function N(e){return Math.abs(e)<1e-10?0:e>0?1:-1}function R(e){return N(Math.cos(e))}function F(e){return N(Math.sin(e))}t.exports=function(e,t){return new S(e,t)},L.plot=function(e,t){var n=t[this.id];this._hasClipOnAxisFalse=!1;for(var r=0;r<e.length;r++){if(!1===e[r][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(t,n),this.updateLayout(t,n),c.generalUpdatePerTraceModule(this.gd,this,e,n),this.updateFx(t,n)},L.updateLayers=function(e,t){var n=this.layers,a=t.radialaxis,i=t.angularaxis,o=A.layerNames,s=o.indexOf("frontplot"),l=o.slice(0,s),c="below traces"===i.layer,u="below traces"===a.layer;c&&l.push("angular-axis"),u&&l.push("radial-axis"),c&&l.push("angular-line"),u&&l.push("radial-line"),l.push("frontplot"),c||l.push("angular-axis"),u||l.push("radial-axis"),c||l.push("angular-line"),u||l.push("radial-line");var d=this.framework.selectAll(".polarsublayer").data(l,String);d.enter().append("g").attr("class",function(e){return"polarsublayer "+e}).each(function(e){var t=n[e]=r.select(this);switch(e){case"frontplot":t.append("g").classed("scatterlayer",!0);break;case"backplot":t.append("g").classed("maplayer",!0);break;case"plotbg":n.bgcircle=t.append("path");break;case"radial-grid":t.style("fill","none"),t.append("g").classed("x",1);break;case"angular-grid":t.style("fill","none"),t.append("g").classed("angular",1);break;case"radial-line":t.append("line").style("fill","none");break;case"angular-line":t.append("path").style("fill","none")}}),d.order()},L.updateLayout=function(e,t){var n=this,r=n.layers,a=e._size,i=t.domain.x,o=t.domain.y;n.xOffset=a.l+a.w*i[0],n.yOffset=a.t+a.h*(1-o[1]);var c,d,f,h,p,g=n.xLength=a.w*(i[1]-i[0]),y=n.yLength=a.h*(o[1]-o[0]),m=n.sector=t.sector,v=n.sectorBBox=function(e){var t,n,r,a,i=e[0],o=e[1]-i,s=k(i),l=s+o,c=Math.cos(_(s)),u=Math.sin(_(s)),d=Math.cos(_(l)),f=Math.sin(_(l));a=s<=90&&l>=90||s>90&&l>=450?1:u<=0&&f<=0?0:Math.max(u,f);t=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&d>=0?0:Math.min(c,d);n=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&f>=0?0:Math.min(u,f);r=l>=360?1:c<=0&&d<=0?0:Math.max(c,d);return[t,n,r,a]}(m),x=v[2]-v[0],b=v[3]-v[1],w=y/g,M=Math.abs(b/x);w>M?(c=g,p=(y-(d=g*M))/a.h/2,f=[i[0],i[1]],h=[o[0]+p,o[1]-p]):(d=y,p=(g-(c=y/M))/a.w/2,f=[i[0]+p,i[1]-p],h=[o[0],o[1]]),n.xLength2=c,n.yLength2=d,n.xDomain2=f,n.yDomain2=h;var T=n.xOffset2=a.l+a.w*f[0],A=n.yOffset2=a.t+a.h*(1-h[1]),S=n.radius=c/x,L=n.cx=T-S*v[0],C=n.cy=A+S*v[3],z=n.cxx=L-T,O=n.cyy=C-A;n.updateRadialAxis(e,t),n.updateRadialAxisTitle(e,t),n.updateAngularAxis(e,t);var P=n.radialAxis.range,I=P[1]-P[0],E=n.xaxis={type:"linear",_id:"x",range:[v[0]*I,v[2]*I],domain:f};u.setConvert(E,e),E.setScale();var N=n.yaxis={type:"linear",_id:"y",range:[v[1]*I,v[3]*I],domain:h};u.setConvert(N,e),N.setScale(),E.isPtWithinRange=function(e){return n.isPtWithinSector(e)},N.isPtWithinRange=function(){return!0},r.frontplot.attr("transform",j(T,A)).call(l.setClipUrl,n._hasClipOnAxisFalse?null:n.clipIds.circle),r.bgcircle.attr({d:D(S,m),transform:j(L,C)}).call(s.fill,t.bgcolor),n.clipPaths.circle.select("path").attr("d",D(S,m)).attr("transform",j(z,O)),n.framework.selectAll(".crisp").classed("crisp",0)},L.updateRadialAxis=function(e,t){var n=this.gd,r=this.layers,a=this.radius,i=this.cx,l=this.cy,c=e._size,f=t.radialaxis,h=t.sector,p=k(h[0]);this.fillViewInitialKey("radialaxis.angle",f.angle);var g=this.radialAxis=o.extendFlat({},f,{_axislayer:r["radial-axis"],_gridlayer:r["radial-grid"],_id:"x",_pos:0,side:{counterclockwise:"top",clockwise:"bottom"}[f.side],domain:[0,a/c.w],anchor:"free",position:0,_counteraxis:!0,automargin:!1});C(g,f,e),d(g),f.range=g.range.slice(),f._input.range=g.range.slice(),this.fillViewInitialKey("radialaxis.range",g.range.slice()),"auto"===g.tickangle&&p>90&&p<=270&&(g.tickangle=180),g._transfn=function(e){return"translate("+g.l2p(e.x)+",0)"},g._gridpath=function(e){return O(g.r2p(e.x),h)};var y=z(f);this.radialTickLayout!==y&&(r["radial-axis"].selectAll(".xtick").remove(),this.radialTickLayout=y),u.doTicks(n,g,!0),I(r["radial-axis"],f.showticklabels||f.ticks,{transform:j(i,l)+E(-f.angle)}),I(r["radial-grid"],f.showgrid,{transform:j(i,l)}).selectAll("path").attr("transform",null),I(r["radial-line"].select("line"),f.showline,{x1:0,y1:0,x2:a,y2:0,transform:j(i,l)+E(-f.angle)}).attr("stroke-width",f.linewidth).call(s.stroke,f.linecolor)},L.updateRadialAxisTitle=function(e,t,n){var r=this.gd,a=this.radius,i=this.cx,o=this.cy,s=t.radialaxis,c=this.id+"title",u=void 0!==n?n:s.angle,d=_(u),f=Math.cos(d),h=Math.sin(d),p=0;if(s.title){var y=l.bBox(this.layers["radial-axis"].node()).height,m=s.titlefont.size;p="counterclockwise"===s.side?-y-.4*m:y+.8*m}this.layers["radial-axis-title"]=g.draw(r,c,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:b(r,"Click to enter radial axis title"),attributes:{x:i+a/2*f+p*h,y:o-a/2*h+p*f,"text-anchor":"middle"},transform:{rotate:-u}})},L.updateAngularAxis=function(e,t){var n=this,a=n.gd,i=n.layers,l=n.radius,c=n.cx,d=n.cy,f=t.angularaxis,h=t.sector,p=h.map(_);n.fillViewInitialKey("angularaxis.rotation",f.rotation);var g=n.angularAxis=o.extendFlat({},f,{_axislayer:i["angular-axis"],_gridlayer:i["angular-grid"],_id:"angular",_pos:0,side:"right",domain:[0,Math.PI],anchor:"free",position:0,_counteraxis:!0,automargin:!1,autorange:!1});if("linear"===g.type)P(h)?g.range=h.slice():g.range=p.map(g.unTransformRad).map(w),"radians"===g.thetaunit&&(g.tick0=w(g.tick0),g.dtick=w(g.dtick));else if("category"===g.type){var y=f.period?Math.max(f.period,f._categories.length):f._categories.length;g.range=[0,y],g._tickFilter=function(e){return n.isPtWithinSector({r:n.radialAxis.range[1],rad:g.c2rad(e.x)})}}function m(e){return g.c2rad(e.x,"degrees")}function v(e){return[l*Math.cos(e),l*Math.sin(e)]}C(g,f,e),g._transfn=function(e){var t=m(e),n=v(t),a=j(c+n[0],d-n[1]),i=r.select(this);return i&&i.node()&&i.classed("ticks")&&(a+=E(-w(t))),a},g._gridpath=function(e){var t=v(m(e));return"M0,0L"+-t[0]+","+t[1]};var b="outside"!==f.ticks?.7:.5;g._labelx=function(e){var t=m(e),n=g._labelStandoff,r=g._pad;return(0===F(t)?0:Math.cos(t)*(n+r+b*e.fontSize))+R(t)*(e.dx+n+r)},g._labely=function(e){var t=m(e),n=g._labelStandoff,r=g._labelShift,a=g._pad;return e.dy+e.fontSize*x-r+-Math.sin(t)*(n+a+b*e.fontSize)},g._labelanchor=function(e,t){var n=m(t);return 0===F(n)?R(n)>0?"start":"end":"middle"};var k=z(f);n.angularTickLayout!==k&&(i["angular-axis"].selectAll(".angulartick").remove(),n.angularTickLayout=k),u.doTicks(a,g,!0),I(i["angular-line"].select("path"),f.showline,{d:D(l,h),transform:j(c,d)}).attr("stroke-width",f.linewidth).call(s.stroke,f.linecolor)},L.updateFx=function(e,t){this.gd._context.staticPlot||(this.updateAngularDrag(e,t),this.updateRadialDrag(e,t),this.updateMainDrag(e,t))},L.updateMainDrag=function(e,t){var n=this,o=n.gd,s=n.layers,l=e._zoomlayer,c=A.MINZOOM,u=A.OFFEDGE,d=n.radius,g=n.cx,v=n.cy,x=n.cxx,b=n.cyy,_=t.sector,w=h.makeDragger(s,"path","maindrag","crosshair");r.select(w).attr("d",D(d,_)).attr("transform",j(g,v));var k,M,T,S,L,C,z,O,P,I={element:w,gd:o,subplot:n.id,plotinfo:{xaxis:n.xaxis,yaxis:n.yaxis},xaxes:[n.xaxis],yaxes:[n.yaxis]};function E(e,t){var n=e-x,r=t-b;return Math.sqrt(n*n+r*r)}function N(e,t){return Math.atan2(b-t,e-x)}function R(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function F(e,t){var n=A.cornerLen,r=A.cornerHalfWidth;if(0===e)return D(2*r,_);var a=n/e/2,i=t-a,o=t+a,s=Math.max(0,Math.min(e,d)),l=s-r,c=s+r;return"M"+R(l,i)+"A"+[l,l]+" 0,0,0 "+R(l,o)+"L"+R(c,o)+"A"+[c,c]+" 0,0,1 "+R(c,i)+"Z"}function B(e,t){var n,r,a=k+e,i=M+t,o=E(k,M),s=Math.min(E(a,i),d),l=N(k,M),f=N(a,i);o<u?o=0:d-o<u?o=d:s<u?s=0:d-s<u&&(s=d),Math.abs(s-o)>c?(o<s?(T=o,S=s):(T=s,S=o,f=[l,l=f][0]),n=L+D(S,_)+D(T,_),r=F(T,l)+F(S,f)):(T=null,S=null,n=L,r="M0,0Z"),O.attr("d",n),P.attr("d",r),h.transitionZoombox(O,P,C,z),C=!0}function H(){if(h.removeZoombox(o),null!==T&&null!==S){h.showDoubleClickNotifier(o);var e=n.radialAxis.range,t=e[1]-e[0],r={};r[n.id+".radialaxis.range"]=[e[0]+T*t/d,e[0]+S*t/d],i.call("relayout",o,r)}}I.prepFn=function(e,t,r){var i=o._fullLayout.dragmode,s=w.getBoundingClientRect();switch(k=t-s.left,M=r-s.top,i){case"zoom":I.moveFn=B,I.doneFn=H,function(){T=null,S=null,L=D(d,_),C=!1;var e=o._fullLayout[n.id];z=a(e.bgcolor).getLuminance(),(O=h.makeZoombox(l,z,g,v,L)).attr("fill-rule","evenodd"),P=h.makeCorners(l,g,v),m(l)}();break;case"select":case"lasso":y(e,t,r,I,i)}},I.clickFn=function(e,t){if(h.removeZoombox(o),2===e){var r={};for(var a in n.viewInitial)r[n.id+"."+a]=n.viewInitial[a];o.emit("plotly_doubleclick",null),i.call("relayout",o,r)}p.click(o,t,n.id)},w.onmousemove=function(e){p.hover(o,e,n.id),o._fullLayout._lasthover=w,o._fullLayout._hoversubplot=n.id},w.onmouseout=function(e){o._dragging||f.unhover(o,e)},f.init(I)},L.updateRadialDrag=function(e,t){var n=this,a=n.gd,s=n.layers,l=n.radius,c=n.cx,d=n.cy,p=n.radialAxis,g=t.radialaxis,y=_(g.angle),v=p.range.slice(),x=v[1]-v[0],b=A.radialDragBoxSize,k=b/2;if(g.visible){var M,T,S,L=h.makeRectDragger(s,"radialdrag","crosshair",-k,-k,b,b),C={element:L,gd:a},z=c+(l+k)*Math.cos(y),O=d-(l+k)*Math.sin(y);r.select(L).attr("transform",j(z,O)),C.prepFn=function(){M=null,T=null,S=null,C.moveFn=D,C.doneFn=P,m(e._zoomlayer)},C.clampFn=function(e,t){return Math.sqrt(e*e+t*t)<A.MINDRAG&&(e=0,t=0),[e,t]},f.init(C)}function D(e,t){if(M)M(e,t);else{var n=[e,-t],r=[Math.cos(y),Math.sin(y)],a=Math.abs(o.dot(n,r)/Math.sqrt(o.dot(n,n)));isNaN(a)||(M=a<.5?I:N)}}function P(){null!==T?i.call("relayout",a,n.id+".radialaxis.angle",T):null!==S&&i.call("relayout",a,n.id+".radialaxis.range[1]",S)}function I(e,t){var r=z+e,a=O+t;T=w(Math.atan2(d-a,r-c));var i=j(c,d)+E(-T);s["radial-axis"].attr("transform",i),s["radial-line"].select("line").attr("transform",i);var o=n.gd._fullLayout,l=o[n.id];n.updateRadialAxisTitle(o,l,T)}function N(e,t){var r=o.dot([e,-t],[Math.cos(y),Math.sin(y)]),f=v[1]-x*r/l*.75;if(x>0==f>v[0]){S=p.range[1]=f,u.doTicks(a,n.radialAxis,!0),s["radial-grid"].attr("transform",j(c,d)).selectAll("path").attr("transform",null);var h=S-v[0],g=n.sectorBBox;for(var m in n.xaxis.range=[g[0]*h,g[2]*h],n.yaxis.range=[g[1]*h,g[3]*h],n.xaxis.setScale(),n.yaxis.setScale(),n.traceHash){var b=n.traceHash[m],_=o.filterVisible(b),w=b[0][0].trace._module,k=a._fullLayout[n.id];if(w.plot(a,n,_,k),!i.traceIs(m,"gl"))for(var M=0;M<_.length;M++)w.style(a,_[M])}}}},L.updateAngularDrag=function(e,t){var n=this,a=n.gd,s=n.layers,c=n.radius,d=n.cx,p=n.cy,g=n.cxx,y=n.cyy,x=t.sector,b=A.angularDragBoxSize,k=h.makeDragger(s,"path","angulardrag","move"),S={element:k,gd:a};function L(e,t){return Math.atan2(y+b-t,e-g-b)}r.select(k).attr("d",function(e,t,n){var r,a,i,o=Math.abs(n[1]-n[0])<=180?0:1;function s(e,t){return[e*Math.cos(t),-e*Math.sin(t)]}function l(e,t,n){return"A"+[e,e]+" "+[0,o,n]+" "+s(e,t)}return P(n)?(r=0,i=2*Math.PI,a=Math.PI,"M"+s(e,r)+l(e,a,0)+l(e,i,0)+"ZM"+s(t,r)+l(t,a,1)+l(t,i,1)+"Z"):(r=_(n[0]),i=_(n[1]),"M"+s(e,r)+"L"+s(t,r)+l(t,i,0)+"L"+s(e,i)+l(e,r,1)+"Z")}(c,c+b,x)).attr("transform",j(d,p)).call(v,"move");var C,z,O,D,I,N,R=s.frontplot.select(".scatterlayer").selectAll(".trace"),F=R.selectAll(".point"),B=R.selectAll(".textpoint");function H(e,t){var c=L(C+e,z+t),d=w(c-N);D=O+d,s.frontplot.attr("transform",j(n.xOffset2,n.yOffset2)+E([-d,g,y])),n.clipPaths.circle.select("path").attr("transform",j(g,y)+E(d)),F.each(function(){var e=r.select(this),t=l.getTranslate(e);e.attr("transform",j(t.x,t.y)+E([d]))}),B.each(function(){var e=r.select(this),t=e.select("text"),n=l.getTranslate(e);e.attr("transform",E([d,t.attr("x"),t.attr("y")])+j(n.x,n.y))});var f=n.angularAxis;for(var h in f.rotation=M(D),"linear"!==f.type||P(x)||(f.range=I.map(_).map(f.unTransformRad).map(w)),T(f),u.doTicks(a,f,!0),n._hasClipOnAxisFalse&&!P(x)&&(n.sector=[I[0]-d,I[1]-d],R.call(l.hideOutsideRangePoints,n)),n.traceHash)if(i.traceIs(h,"gl")){var p=n.traceHash[h],m=o.filterVisible(p),v=p[0][0].trace._module,b=a._fullLayout[n.id];v.plot(a,n,m,b)}}function q(){B.select("text").attr("transform",null);var e={};e[n.id+".angularaxis.rotation"]=D,i.call("relayout",a,e)}S.prepFn=function(t,r,a){var i=e[n.id];I=i.sector.slice(),O=i.angularaxis.rotation;var o=k.getBoundingClientRect();C=r-o.left,z=a-o.top,N=L(C,z),S.moveFn=H,S.doneFn=q,m(e._zoomlayer)},f.init(S)},L.isPtWithinSector=function(e){var t=this.sector,n=this.radialAxis,r=n.range,a=n.c2r(e.r),i=k(t[0]),o=k(t[1]);i>o&&(o+=360);var s,l,c=k(w(e.rad)),u=c+360;return r[1]>=r[0]?(s=r[0],l=r[1]):(s=r[1],l=r[0]),a>=s&&a<=l&&(P(t)||c>=i&&c<=o||u>=i&&u<=o)},L.fillViewInitialKey=function(e,t){e in this.viewInitial||(this.viewInitial[e]=t)}},{"../../components/color":32,"../../components/dragelement":54,"../../components/drawing":57,"../../components/fx":74,"../../components/titles":125,"../../constants/alignment":132,"../../lib":152,"../../lib/setcursor":171,"../../registry":241,"../cartesian/autorange":193,"../cartesian/axes":194,"../cartesian/dragbox":202,"../cartesian/select":211,"../plots":226,"./constants":227,"./helpers":228,d3:3,tinycolor2:293}],239:[function(e,t,n){"use strict";function r(e,t){return"splom"===e?-1:"splom"===t?1:0}t.exports={sortBasePlotModules:function(e,t){return r(e.name,t.name)},sortModules:r}},{}],240:[function(e,t,n){"use strict";var r=e("../lib"),a=e("./domain").defaults;t.exports=function(e,t,n,i){var o,s,l=i.type,c=i.attributes,u=i.handleDefaults,d=i.partition||"x",f=t._subplots[l],h=f.length;function p(e,t){return r.coerce(o,s,c,e,t)}for(var g=0;g<h;g++){var y=f[g];o=e[y]?e[y]:e[y]={},t[y]=s={};var m={};m[d]=[g/h,(g+1)/h],a(s,t,p,m),i.id=y,u(o,s,p,i)}}},{"../lib":152,"./domain":219}],241:[function(e,t,n){"use strict";var r=e("./lib/loggers"),a=e("./lib/noop"),i=e("./lib/push_unique"),o=e("./lib/is_plain_object"),s=e("./lib/extend"),l=e("./plots/attributes"),c=e("./plots/layout_attributes"),u=s.extendFlat,d=s.extendDeepAll;function f(e){var t=e.name,a=e.categories,i=e.meta;if(n.modules[t])r.log("Type "+t+" already registered");else{n.subplotsRegistry[e.basePlotModule.name]||function(e){var t=e.name;if(n.subplotsRegistry[t])return void r.log("Plot type "+t+" already registered.");for(var a in y(e),n.subplotsRegistry[t]=e,n.componentsRegistry)x(a,e.name)}(e.basePlotModule);for(var o={},s=0;s<a.length;s++)o[a[s]]=!0,n.allCategories[a[s]]=!0;for(var l in n.modules[t]={_module:e,categories:o},i&&Object.keys(i).length&&(n.modules[t].meta=i),n.allTypes.push(t),n.componentsRegistry)m(l,t);e.layoutAttributes&&u(n.traceLayoutAttributes,e.layoutAttributes)}}function h(e){if("string"!=typeof e.name)throw new Error("Component module *name* must be a string.");var t=e.name;for(var r in n.componentsRegistry[t]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&i(n.layoutArrayContainers,t),y(e)),n.modules)m(t,r);for(var a in n.subplotsRegistry)x(t,a);for(var o in n.transformsRegistry)v(t,o);e.schema&&e.schema.layout&&d(c,e.schema.layout)}function p(e){if("string"!=typeof e.name)throw new Error("Transform module *name* must be a string.");var t="Transform module "+e.name,a="function"==typeof e.transform,i="function"==typeof e.calcTransform;if(!a&&!i)throw new Error(t+" is missing a *transform* or *calcTransform* method.");for(var s in a&&i&&r.log([t+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),o(e.attributes)||r.log(t+" registered without an *attributes* object."),"function"!=typeof e.supplyDefaults&&r.log(t+" registered without a *supplyDefaults* method."),n.transformsRegistry[e.name]=e,n.componentsRegistry)v(s,e.name)}function g(e){var t=e.name,r=t.split("-")[0],a=e.dictionary,i=e.format,o=a&&Object.keys(a).length,s=i&&Object.keys(i).length,l=n.localeRegistry,c=l[t];if(c||(l[t]=c={}),r!==t){var u=l[r];u||(l[r]=u={}),o&&u.dictionary===c.dictionary&&(u.dictionary=a),s&&u.format===c.format&&(u.format=i)}o&&(c.dictionary=a),s&&(c.format=i)}function y(e){if(e.layoutAttributes){var t=e.layoutAttributes._arrayAttrRegexps;if(t)for(var r=0;r<t.length;r++)i(n.layoutArrayRegexes,t[r])}}function m(e,t){var r=n.componentsRegistry[e].schema;if(r&&r.traces){var a=r.traces[t];a&&d(n.modules[t]._module.attributes,a)}}function v(e,t){var r=n.componentsRegistry[e].schema;if(r&&r.transforms){var a=r.transforms[t];a&&d(n.transformsRegistry[t].attributes,a)}}function x(e,t){var r=n.componentsRegistry[e].schema;if(r&&r.subplots){var a=n.subplotsRegistry[t],i=a.layoutAttributes,o="subplot"===a.attr?a.name:a.attr;Array.isArray(o)&&(o=o[0]);var s=r.subplots[o];i&&s&&d(i,s)}}function b(e){return"object"==typeof e&&(e=e.type),e}n.modules={},n.allCategories={},n.allTypes=[],n.subplotsRegistry={},n.transformsRegistry={},n.componentsRegistry={},n.layoutArrayContainers=[],n.layoutArrayRegexes=[],n.traceLayoutAttributes={},n.localeRegistry={},n.apiMethodRegistry={},n.register=function(e){if(!e)throw new Error("No argument passed to Plotly.register.");e&&!Array.isArray(e)&&(e=[e]);for(var t=0;t<e.length;t++){var r=e[t];if(!r)throw new Error("Invalid module was attempted to be registered!");switch(r.moduleType){case"trace":f(r);break;case"transform":p(r);break;case"component":h(r);break;case"locale":g(r);break;case"apiMethod":var a=r.name;n.apiMethodRegistry[a]=r.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},n.getModule=function(e){var t=n.modules[b(e)];return!!t&&t._module},n.traceIs=function(e,t){if("various"===(e=b(e)))return!1;var a=n.modules[e];return a||(e&&"area"!==e&&r.log("Unrecognized trace type "+e+"."),a=n.modules[l.type.dflt]),!!a.categories[t]},n.getTransformIndices=function(e,t){for(var n=[],r=e.transforms||[],a=0;a<r.length;a++)r[a].type===t&&n.push(a);return n},n.hasTransform=function(e,t){for(var n=e.transforms||[],r=0;r<n.length;r++)if(n[r].type===t)return!0;return!1},n.getComponentMethod=function(e,t){var r=n.componentsRegistry[e];return r&&r[t]||a},n.call=function(){var e=arguments[0],t=[].slice.call(arguments,1);return n.apiMethodRegistry[e].apply(null,t)}},{"./lib/extend":146,"./lib/is_plain_object":154,"./lib/loggers":157,"./lib/noop":161,"./lib/push_unique":165,"./plots/attributes":191,"./plots/layout_attributes":224}],242:[function(e,t,n){"use strict";var r=e("../lib"),a=r.extendFlat,i=r.extendDeep;function o(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:"",showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:"",hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}t.exports=function(e,t){var n;e.framework&&e.framework.isPolar&&(e=e.framework.getConfig());var r,s=e.data,l=e.layout,c=i([],s),u=i({},l,o(t.tileClass)),d=e._context||{};if(t.width&&(u.width=t.width),t.height&&(u.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){u.annotations=[];var f=Object.keys(u);for(n=0;n<f.length;n++)r=f[n],["xaxis","yaxis","zaxis"].indexOf(r.slice(0,5))>-1&&(u[f[n]].title="");for(n=0;n<c.length;n++){var h=c[n];h.showscale=!1,h.marker&&(h.marker.showscale=!1),"pie"===h.type&&(h.textposition="none")}}if(Array.isArray(t.annotations))for(n=0;n<t.annotations.length;n++)u.annotations.push(t.annotations[n]);var p=Object.keys(u).filter(function(e){return e.match(/^scene\d*$/)});if(p.length){var g={};for("thumbnail"===t.tileClass&&(g={title:"",showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),n=0;n<p.length;n++){var y=u[p[n]];y.xaxis||(y.xaxis={}),y.yaxis||(y.yaxis={}),y.zaxis||(y.zaxis={}),a(y.xaxis,g),a(y.yaxis,g),a(y.zaxis,g),y._scene=null}}var m=document.createElement("div");t.tileClass&&(m.className=t.tileClass);var v={gd:m,td:m,layout:u,data:c,config:{staticPlot:void 0===t.staticPlot||t.staticPlot,plotGlPixelRatio:void 0===t.plotGlPixelRatio?2:t.plotGlPixelRatio,displaylogo:t.displaylogo||!1,showLink:t.showLink||!1,showTips:t.showTips||!1,mapboxAccessToken:d.mapboxAccessToken}};return"transparent"!==t.setBackground&&(v.config.setBackground=t.setBackground||"opaque"),v.gd.defaultLayout=o(t.tileClass),v}},{"../lib":152}],243:[function(e,t,n){"use strict";var r=e("../plot_api/to_image"),a=e("../lib"),i=e("./filesaver");t.exports=function(e,t){return(t=t||{}).format=t.format||"png",new Promise(function(n,o){e._snapshotInProgress&&o(new Error("Snapshotting already in progress.")),a.isIE()&&"svg"!==t.format&&o(new Error("Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.")),e._snapshotInProgress=!0;var s=r(e,t),l=t.filename||e.fn||"newplot";l+="."+t.format,s.then(function(t){return e._snapshotInProgress=!1,i(t,l)}).then(function(e){n(e)}).catch(function(t){e._snapshotInProgress=!1,o(t)})})}},{"../lib":152,"../plot_api/to_image":187,"./filesaver":244}],244:[function(e,t,n){"use strict";t.exports=function(e,t){var n=document.createElement("a"),r="download"in n,a=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent);return new Promise(function(i,o){if("undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent)&&o(new Error("IE < 10 unsupported")),a&&(document.location.href="data:application/octet-stream"+e.slice(e.search(/[,;]/)),i(t)),t||(t="download"),r&&(n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),i(t)),"undefined"!=typeof navigator&&navigator.msSaveBlob){var s=e.split(/^data:image\/svg\+xml,/)[1],l=decodeURIComponent(s);navigator.msSaveBlob(new Blob([l]),t),i(t)}o(new Error("download error"))})}},{}],245:[function(e,t,n){"use strict";n.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("gl2d")||e._has("mapbox"))?500:0},n.getRedrawFunc=function(e){var t=e._fullLayout||{};if(!(!(t._has&&t._has("polar"))&&e.data&&e.data[0]&&e.data[0].r))return function(){(e.calcdata||[]).forEach(function(e){e[0]&&e[0].t&&e[0].t.cb&&e[0].t.cb()})}}},{}],246:[function(e,t,n){"use strict";var r=e("./helpers"),a={getDelay:r.getDelay,getRedrawFunc:r.getRedrawFunc,clone:e("./cloneplot"),toSVG:e("./tosvg"),svgToImg:e("./svgtoimg"),toImage:e("./toimage"),downloadImage:e("./download")};t.exports=a},{"./cloneplot":242,"./download":243,"./helpers":245,"./svgtoimg":247,"./toimage":248,"./tosvg":249}],247:[function(e,t,n){"use strict";var r=e("../lib"),a=e("events").EventEmitter;t.exports=function(e){var t=e.emitter||new a,n=new Promise(function(a,i){var o=window.Image,s=e.svg,l=e.format||"png";if(r.isIE()&&"svg"!==l){var c=new Error("Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.");return i(c),e.promise?n:t.emit("error",c)}var u=e.canvas,d=e.scale||1,f=d*(e.width||300),h=d*(e.height||150),p=u.getContext("2d"),g=new o,y="data:image/svg+xml,"+encodeURIComponent(s);u.width=f,u.height=h,g.onload=function(){var n;switch("svg"!==l&&p.drawImage(g,0,0,f,h),l){case"jpeg":n=u.toDataURL("image/jpeg");break;case"png":n=u.toDataURL("image/png");break;case"webp":n=u.toDataURL("image/webp");break;case"svg":n=y;break;default:var r="Image format is not jpeg, png, svg or webp.";if(i(new Error(r)),!e.promise)return t.emit("error",r)}a(n),e.promise||t.emit("success",n)},g.onerror=function(n){if(i(n),!e.promise)return t.emit("error",n)},g.src=y});return e.promise?n:t}},{"../lib":152,events:2}],248:[function(e,t,n){"use strict";var r=e("events").EventEmitter,a=e("../registry"),i=e("../lib"),o=e("./helpers"),s=e("./cloneplot"),l=e("./tosvg"),c=e("./svgtoimg");t.exports=function(e,t){var n=new r,u=s(e,{format:"png"}),d=u.gd;d.style.position="absolute",d.style.left="-5000px",document.body.appendChild(d);var f=o.getRedrawFunc(d);return a.call("plot",d,u.data,u.layout,u.config).then(f).then(function(){var e=o.getDelay(d._fullLayout);setTimeout(function(){var e=l(d),r=document.createElement("canvas");r.id=i.randstr(),(n=c({format:t.format,width:d._fullLayout.width,height:d._fullLayout.height,canvas:r,emitter:n,svg:e})).clean=function(){d&&document.body.removeChild(d)}},e)}).catch(function(e){n.emit("error",e)}),n}},{"../lib":152,"../registry":241,"./cloneplot":242,"./helpers":245,"./svgtoimg":247,"./tosvg":249,events:2}],249:[function(e,t,n){"use strict";var r=e("d3"),a=e("../lib"),i=e("../components/drawing"),o=e("../components/color"),s=e("../constants/xmlns_namespaces"),l=/"/g,c=new RegExp('("TOBESTRIPPED)|(TOBESTRIPPED")',"g");t.exports=function(e,t,n){var u,d=e._fullLayout,f=d._paper,h=d._toppaper,p=d.width,g=d.height;f.insert("rect",":first-child").call(i.setRect,0,0,p,g).call(o.fill,d.paper_bgcolor);var y=d._basePlotModules||[];for(u=0;u<y.length;u++){var m=y[u];m.toSVG&&m.toSVG(e)}if(h){var v=h.node().childNodes,x=Array.prototype.slice.call(v);for(u=0;u<x.length;u++){var b=x[u];b.childNodes.length&&f.node().appendChild(b)}}d._draggers&&d._draggers.remove(),f.node().style.background="",f.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var e=r.select(this);if("hidden"!==this.style.visibility&&"none"!==this.style.display){e.style({visibility:null,display:null});var t=this.style.fontFamily;t&&-1!==t.indexOf('"')&&e.style("font-family",t.replace(l,"TOBESTRIPPED"))}else e.remove()}),f.selectAll(".point,.scatterpts").each(function(){var e=r.select(this),t=this.style.fill;t&&-1!==t.indexOf("url(")&&e.style("fill",t.replace(l,"TOBESTRIPPED"))}),"pdf"!==t&&"eps"!==t||f.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),f.node().setAttributeNS(s.xmlns,"xmlns",s.svg),f.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===t&&n&&(f.attr("width",n*p),f.attr("height",n*g),f.attr("viewBox","0 0 "+p+" "+g));var _=(new window.XMLSerializer).serializeToString(f.node());return _=function(e){var t=r.select("body").append("div").style({display:"none"}).html(""),n=e.replace(/(&[^;]*;)/gi,function(e){return"&lt;"===e?"&#60;":"&rt;"===e?"&#62;":-1!==e.indexOf("<")||-1!==e.indexOf(">")?"":t.html(e).text()});return t.remove(),n}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")).replace(c,"'"),a.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},{"../components/color":32,"../components/drawing":57,"../constants/xmlns_namespaces":136,"../lib":152,d3:3}],250:[function(e,t,n){"use strict";var r=e("../../lib");n.formatPiePercent=function(e,t){var n=(100*e).toPrecision(3);return-1!==n.lastIndexOf(".")&&(n=n.replace(/[.]?0+$/,"")),r.numSeparate(n,t)+"%"},n.formatPieValue=function(e,t){var n=e.toPrecision(10);return-1!==n.lastIndexOf(".")&&(n=n.replace(/[.]?0+$/,"")),r.numSeparate(n,t)},n.getFirstFilled=function(e,t){if(Array.isArray(e))for(var n=0;n<t.length;n++){var r=e[t[n]];if(r||0===r)return r}},n.castOption=function(e,t){return Array.isArray(e)?n.getFirstFilled(e,t):e||void 0}},{"../../lib":152}],251:[function(e,t,n){"use strict";var r=e("../../components/color"),a=e("./helpers").castOption;t.exports=function(e,t,n){var i=n.marker.line,o=a(i.color,t.pts)||r.defaultLine,s=a(i.width,t.pts)||0;e.style({"stroke-width":s}).call(r.fill,t.color).call(r.stroke,o)}},{"../../components/color":32,"./helpers":250}],252:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t){for(var n=0;n<e.length;n++)e[n].i=n;r.mergeArray(t.text,e,"tx"),r.mergeArray(t.hovertext,e,"htx"),r.mergeArray(t.customdata,e,"data"),r.mergeArray(t.textposition,e,"tp"),t.textfont&&(r.mergeArray(t.textfont.size,e,"ts"),r.mergeArray(t.textfont.color,e,"tc"),r.mergeArray(t.textfont.family,e,"tf"));var a=t.marker;if(a){r.mergeArray(a.size,e,"ms"),r.mergeArray(a.opacity,e,"mo"),r.mergeArray(a.symbol,e,"mx"),r.mergeArray(a.color,e,"mc");var i=a.line;a.line&&(r.mergeArray(i.color,e,"mlc"),r.mergeArray(i.width,e,"mlw"));var o=a.gradient;o&&"none"!==o.type&&(r.mergeArray(o.type,e,"mgt"),r.mergeArray(o.color,e,"mgc"))}}},{"../../lib":152}],253:[function(e,t,n){"use strict";var r=e("../../components/colorscale/color_attributes"),a=e("../../components/colorbar/attributes"),i=e("../../plots/font_attributes"),o=e("../../components/drawing/attributes").dash,s=e("../../components/drawing"),l=e("./constants"),c=e("../../lib/extend").extendFlat;t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,role:"info",editType:"calc+clearAxisTypes",description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,role:"info",editType:"calc",description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,role:"info",editType:"calc+clearAxisTypes",description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,role:"info",editType:"calc",description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},text:{valType:"string",role:"info",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",role:"info",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],role:"info",editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+l.PTS_LINESONLY+" points,","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],role:"info",editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},line:{color:{valType:"color",role:"style",editType:"style",description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,role:"style",editType:"style",description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",role:"style",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,role:"style",editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:c({},o,{editType:"style"}),simplify:{valType:"boolean",dflt:!0,role:"info",editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,role:"info",editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,role:"info",editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],dflt:"none",role:"style",editType:"calc",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")},fillcolor:{valType:"color",role:"style",editType:"style",description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},marker:c({symbol:{valType:"enumerated",values:s.symbolList,dflt:"circle",arrayOk:!0,role:"style",editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,role:"style",editType:"style",description:"Sets the marker opacity."},size:{valType:"number",min:0,dflt:6,arrayOk:!0,role:"style",editType:"calcIfAutorange",description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,role:"style",editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,role:"style",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,role:"style",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",role:"info",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},showscale:{valType:"boolean",role:"info",dflt:!1,editType:"calc",description:["Has an effect only if `marker.color` is set to a numerical array.","Determines whether or not a colorbar is displayed."].join(" ")},colorbar:a,line:c({width:{valType:"number",min:0,arrayOk:!0,role:"style",editType:"style",description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},r("marker.line")),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",role:"style",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,role:"style",editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},r("marker")),selected:{marker:{opacity:{valType:"number",min:0,max:1,role:"style",editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",role:"style",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,role:"style",editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",role:"style",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,role:"style",editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",role:"style",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,role:"style",editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",role:"style",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,role:"style",editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:i({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."}),r:{valType:"data_array",editType:"calc",description:["For legacy polar chart only.","Please switch to *scatterpolar* trace type.","Sets the radial coordinates."].join("")},t:{valType:"data_array",editType:"calc",description:["For legacy polar chart only.","Please switch to *scatterpolar* trace type.","Sets the angular coordinates."].join("")}}},{"../../components/colorbar/attributes":33,"../../components/colorscale/color_attributes":40,"../../components/drawing":57,"../../components/drawing/attributes":56,"../../lib/extend":146,"../../plots/font_attributes":220,"./constants":259}],254:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../lib").isArrayOrTypedArray,i=e("../../plots/cartesian/axes"),o=e("../../constants/numerical").BADNUM,s=e("./subtypes"),l=e("./colorscale_calc"),c=e("./arrays_to_calcdata"),u=e("./calc_selection");function d(e,t,n,r,a,o,l){var c=t._length;n._minDtick=0,r._minDtick=0;var u={padded:!0},d={padded:!0};l&&(u.ppad=d.ppad=l),!("tozerox"===t.fill||"tonextx"===t.fill&&e.firstscatter)||a[0]===a[c-1]&&o[0]===o[c-1]?(t.error_y||{}).visible||-1===["tonexty","tozeroy"].indexOf(t.fill)&&(s.hasMarkers(t)||s.hasText(t))||(u.padded=!1,u.ppad=0):u.tozero=!0,!("tozeroy"===t.fill||"tonexty"===t.fill&&e.firstscatter)||a[0]===a[c-1]&&o[0]===o[c-1]?-1!==["tonextx","tozerox"].indexOf(t.fill)&&(d.padded=!1):d.tozero=!0,i.expand(n,a,u),i.expand(r,o,d)}function f(e,t){if(s.hasMarkers(e)){var n,r=e.marker,o=1.6*(e.marker.sizeref||1);if(n="area"===e.marker.sizemode?function(e){return Math.max(Math.sqrt((e||0)/o),3)}:function(e){return Math.max((e||0)/o,3)},a(r.size)){var l={type:"linear"};i.setConvert(l);for(var c=l.makeCalcdata(e.marker,"size"),u=new Array(t),d=0;d<t;d++)u[d]=n(c[d]);return u}return n(r.size)}}t.exports={calc:function(e,t){var n=i.getFromId(e,t.xaxis||"x"),a=i.getFromId(e,t.yaxis||"y"),s=n.makeCalcdata(t,"x"),h=a.makeCalcdata(t,"y"),p=t._length,g=new Array(p);d(e,t,n,a,s,h,f(t,p));for(var y=0;y<p;y++)g[y]=r(s[y])&&r(h[y])?{x:s[y],y:h[y]}:{x:o,y:o},t.ids&&(g[y].id=String(t.ids[y]));return c(g,t),l(t),u(g,t),e.firstscatter=!1,g},calcMarkerSize:f,calcAxisExpansion:d}},{"../../constants/numerical":134,"../../lib":152,"../../plots/cartesian/axes":194,"./arrays_to_calcdata":252,"./calc_selection":255,"./colorscale_calc":258,"./subtypes":275,"fast-isnumeric":5}],255:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t){r.isArrayOrTypedArray(t.selectedpoints)&&r.tagSelected(e,t)}},{"../../lib":152}],256:[function(e,t,n){"use strict";t.exports=function(e){for(var t=0;t<e.length;t++){var n=e[t];if("scatter"===n.type){var r=n.fill;if("none"!==r&&"toself"!==r&&(n.opacity=void 0,"tonexty"===r||"tonextx"===r))for(var a=t-1;a>=0;a--){var i=e[a];if("scatter"===i.type&&i.xaxis===n.xaxis&&i.yaxis===n.yaxis){i.opacity=void 0;break}}}}}},{}],257:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../lib"),i=e("../../plots/plots"),o=e("../../components/colorscale"),s=e("../../components/colorbar/draw");t.exports=function(e,t){var n=t[0].trace,l=n.marker,c="cb"+n.uid;if(e._fullLayout._infolayer.selectAll("."+c).remove(),void 0!==l&&l.showscale){var u=l.color,d=l.cmin,f=l.cmax;r(d)||(d=a.aggNums(Math.min,null,u)),r(f)||(f=a.aggNums(Math.max,null,u));var h=t[0].t.cb=s(e,c),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,d,f),{noNumericCheck:!0});h.fillcolor(p).filllevels({start:d,end:f,size:(f-d)/254}).options(l.colorbar)()}else i.autoMargin(e,c)}},{"../../components/colorbar/draw":36,"../../components/colorscale":47,"../../lib":152,"../../plots/plots":226,"fast-isnumeric":5}],258:[function(e,t,n){"use strict";var r=e("../../components/colorscale/has_colorscale"),a=e("../../components/colorscale/calc"),i=e("./subtypes");t.exports=function(e){i.hasLines(e)&&r(e,"line")&&a(e,e.line.color,"line","c"),i.hasMarkers(e)&&(r(e,"marker")&&a(e,e.marker.color,"marker","c"),r(e,"marker.line")&&a(e,e.marker.line.color,"marker.line","c"))}},{"../../components/colorscale/calc":39,"../../components/colorscale/has_colorscale":46,"./subtypes":275}],259:[function(e,t,n){"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20}},{}],260:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../registry"),i=e("./attributes"),o=e("./constants"),s=e("./subtypes"),l=e("./xy_defaults"),c=e("./marker_defaults"),u=e("./line_defaults"),d=e("./line_shape_defaults"),f=e("./text_defaults"),h=e("./fillcolor_defaults");t.exports=function(e,t,n,p){function g(n,a){return r.coerce(e,t,i,n,a)}var y=l(e,t,p,g),m=y<o.PTS_LINESONLY?"lines+markers":"lines";if(y){g("text"),g("hovertext"),g("mode",m),s.hasLines(t)&&(u(e,t,n,p,g),d(e,t,g),g("connectgaps"),g("line.simplify")),s.hasMarkers(t)&&c(e,t,n,p,g,{gradient:!0}),s.hasText(t)&&f(e,t,p,g);var v=[];(s.hasMarkers(t)||s.hasText(t))&&(g("cliponaxis"),g("marker.maxdisplayed"),v.push("points")),g("fill"),"none"!==t.fill&&(h(e,t,n,g),s.hasLines(t)||d(e,t,g)),"tonext"!==t.fill&&"toself"!==t.fill||v.push("fills"),g("hoveron",v.join("+")||"points");var x=a.getComponentMethod("errorbars","supplyDefaults");x(e,t,n,{axis:"y"}),x(e,t,n,{axis:"x",inherit:"y"}),r.coerceSelectionMarkerOpacity(t,g)}else t.visible=!1}},{"../../lib":152,"../../registry":241,"./attributes":253,"./constants":259,"./fillcolor_defaults":262,"./line_defaults":266,"./line_shape_defaults":268,"./marker_defaults":271,"./subtypes":275,"./text_defaults":276,"./xy_defaults":277}],261:[function(e,t,n){"use strict";var r=e("../../lib");function a(e){return e||0===e}t.exports=function(e,t,n){var i=Array.isArray(n)?function(e){n.push(e)}:function(e){n.text=e},o=r.extractOption(e,t,"htx","hovertext");if(a(o))return i(o);var s=r.extractOption(e,t,"tx","text");return a(s)?i(s):void 0}},{"../../lib":152}],262:[function(e,t,n){"use strict";var r=e("../../components/color"),a=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,n,i){var o=!1;if(t.marker){var s=t.marker.color,l=(t.marker.line||{}).color;s&&!a(s)?o=s:l&&!a(l)&&(o=l)}i("fillcolor",r.addOpacity((t.line||{}).color||o||n,.5))}},{"../../components/color":32,"../../lib":152}],263:[function(e,t,n){"use strict";var r=e("../../components/color"),a=e("./subtypes");t.exports=function(e,t){var n,i;if("lines"===e.mode)return(n=e.line.color)&&r.opacity(n)?n:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var o=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(i=o&&r.opacity(o)?o:s&&r.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?r.opacity(i)<.3?r.addOpacity(i,.3):i:(n=(e.line||{}).color)&&r.opacity(n)&&a.hasLines(e)&&e.line.width?n:e.fillcolor}},{"../../components/color":32,"./subtypes":275}],264:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../../components/fx"),i=e("../../registry"),o=e("./get_trace_color"),s=e("../../components/color"),l=e("./fill_hover_text");t.exports=function(e,t,n,c){var u=e.cd,d=u[0].trace,f=e.xa,h=e.ya,p=f.c2p(t),g=h.c2p(n),y=[p,g],m=d.hoveron||"",v=-1!==d.mode.indexOf("markers")?3:.5;if(-1!==m.indexOf("points")){var x=function(e){var t=Math.max(v,e.mrc||0),n=f.c2p(e.x)-p,r=h.c2p(e.y)-g;return Math.max(Math.sqrt(n*n+r*r)-t,1-v/t)},b=a.getDistanceFunction(c,function(e){var t=Math.max(3,e.mrc||0),n=1-1/t,r=Math.abs(f.c2p(e.x)-p);return r<t?n*r/t:r-t+n},function(e){var t=Math.max(3,e.mrc||0),n=1-1/t,r=Math.abs(h.c2p(e.y)-g);return r<t?n*r/t:r-t+n},x);if(a.getClosest(u,b,e),!1!==e.index){var _=u[e.index],w=f.c2p(_.x,!0),k=h.c2p(_.y,!0),M=_.mrc||1;return r.extendFlat(e,{color:o(d,_),x0:w-M,x1:w+M,xLabelVal:_.x,y0:k-M,y1:k+M,yLabelVal:_.y,spikeDistance:x(_)}),l(_,d,e),i.getComponentMethod("errorbars","hoverInfo")(_,d,e),[e]}}if(-1!==m.indexOf("fills")&&d._polygons){var T,A,S,L,C,z,O,D,P,I=d._polygons,j=[],E=!1,N=1/0,R=-1/0,F=1/0,B=-1/0;for(T=0;T<I.length;T++)(S=I[T]).contains(y)&&(E=!E,j.push(S),F=Math.min(F,S.ymin),B=Math.max(B,S.ymax));if(E){var H=((F=Math.max(F,0))+(B=Math.min(B,h._length)))/2;for(T=0;T<j.length;T++)for(L=j[T].pts,A=1;A<L.length;A++)(D=L[A-1][1])>H!=(P=L[A][1])>=H&&(z=L[A-1][0],O=L[A][0],P-D&&(C=z+(O-z)*(H-D)/(P-D),N=Math.min(N,C),R=Math.max(R,C)));N=Math.max(N,0),R=Math.min(R,f._length);var q=s.defaultLine;return s.opacity(d.fillcolor)?q=d.fillcolor:s.opacity((d.line||{}).color)&&(q=d.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:N,x1:R,y0:H,y1:H,color:q}),delete e.index,d.text&&!Array.isArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}}},{"../../components/color":32,"../../components/fx":74,"../../lib":152,"../../registry":241,"./fill_hover_text":261,"./get_trace_color":263}],265:[function(e,t,n){"use strict";var r={},a=e("./subtypes");r.hasLines=a.hasLines,r.hasMarkers=a.hasMarkers,r.hasText=a.hasText,r.isBubble=a.isBubble,r.attributes=e("./attributes"),r.supplyDefaults=e("./defaults"),r.cleanData=e("./clean_data"),r.calc=e("./calc").calc,r.arraysToCalcdata=e("./arrays_to_calcdata"),r.plot=e("./plot"),r.colorbar=e("./colorbar"),r.style=e("./style").style,r.styleOnSelect=e("./style").styleOnSelect,r.hoverPoints=e("./hover"),r.selectPoints=e("./select"),r.animatable=!0,r.moduleType="trace",r.name="scatter",r.basePlotModule=e("../../plots/cartesian"),r.categories=["cartesian","svg","symbols","markerColorscale","errorBarsOK","showLegend","scatter-like","draggedPts"],r.meta={description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")},t.exports=r},{"../../plots/cartesian":205,"./arrays_to_calcdata":252,"./attributes":253,"./calc":254,"./clean_data":256,"./colorbar":257,"./defaults":260,"./hover":264,"./plot":272,"./select":273,"./style":274,"./subtypes":275}],266:[function(e,t,n){"use strict";var r=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale/has_colorscale"),i=e("../../components/colorscale/defaults");t.exports=function(e,t,n,o,s,l){var c=(e.marker||{}).color;(s("line.color",n),a(e,"line"))?i(e,t,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!r(c)&&c||n);s("line.width"),(l||{}).noDash||s("line.dash")}},{"../../components/colorscale/defaults":42,"../../components/colorscale/has_colorscale":46,"../../lib":152}],267:[function(e,t,n){"use strict";var r=e("../../constants/numerical").BADNUM,a=e("../../lib"),i=a.segmentsIntersect,o=a.constrain,s=e("./constants");t.exports=function(e,t){var n,l,c,u,d,f,h,p,g,y,m,v,x,b,_,w,k=t.xaxis,M=t.yaxis,T=t.simplify,A=t.connectGaps,S=t.baseTolerance,L=t.shape,C="linear"===L,z=[],O=s.minTolerance,D=new Array(e.length),P=0;function I(t){var n=e[t],a=k.c2p(n.x),i=M.c2p(n.y);return a===r||i===r?n.intoCenter||!1:[a,i]}function j(e){var t=e[0]/k._length,n=e[1]/M._length;return(1+s.toleranceGrowth*Math.max(0,-t,t-1,-n,n-1))*S}function E(e,t){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}T||(S=O=-1);var N,R,F,B,H,q,V,U=s.maxScreensAway,G=-k._length*U,Y=k._length*(1+U),Z=-M._length*U,X=M._length*(1+U),W=[[G,Z,Y,Z],[Y,Z,Y,X],[Y,X,G,X],[G,X,G,Z]];function J(e){if(e[0]<G||e[0]>Y||e[1]<Z||e[1]>X)return[o(e[0],G,Y),o(e[1],Z,X)]}function Q(e,t){return e[0]===t[0]&&(e[0]===G||e[0]===Y)||(e[1]===t[1]&&(e[1]===Z||e[1]===X)||void 0)}function $(e,t,n){return function(r,i){var o=J(r),s=J(i),l=[];if(o&&s&&Q(o,s))return l;o&&l.push(o),s&&l.push(s);var c=2*a.constrain((r[e]+i[e])/2,t,n)-((o||r)[e]+(s||i)[e]);c&&((o&&s?c>0==o[e]>s[e]?o:s:o||s)[e]+=c);return l}}function K(e){var t=e[0],n=e[1],r=t===D[P-1][0],a=n===D[P-1][1];if(!r||!a)if(P>1){var i=t===D[P-2][0],o=n===D[P-2][1];r&&(t===G||t===Y)&&i?o?P--:D[P-1]=e:a&&(n===Z||n===X)&&o?i?P--:D[P-1]=e:D[P++]=e}else D[P++]=e}function ee(e){D[P-1][0]!==e[0]&&D[P-1][1]!==e[1]&&K([F,B]),K(e),H=null,F=B=0}function te(e){if(N=e[0]<G?G:e[0]>Y?Y:0,R=e[1]<Z?Z:e[1]>X?X:0,N||R){if(P)if(H){var t=V(H,e);t.length>1&&(ee(t[0]),D[P++]=t[1])}else q=V(D[P-1],e)[0],D[P++]=q;else D[P++]=[N||e[0],R||e[1]];var n=D[P-1];N&&R&&(n[0]!==N||n[1]!==R)?(H&&(F!==N&&B!==R?K(F&&B?(r=H,i=(a=e)[0]-r[0],o=(a[1]-r[1])/i,(r[1]*a[0]-a[1]*r[0])/i>0?[o>0?G:Y,X]:[o>0?Y:G,Z]):[F||N,B||R]):F&&B&&K([F,B])),K([N,R])):F-N&&B-R&&K([N||F,R||B]),H=e,F=N,B=R}else H&&ee(V(H,e)[0]),D[P++]=e;var r,a,i,o}for("linear"===L||"spline"===L?V=function(e,t){for(var n=[],r=0,a=0;a<4;a++){var o=W[a],s=i(e[0],e[1],t[0],t[1],o[0],o[1],o[2],o[3]);s&&(!r||Math.abs(s.x-n[0][0])>1||Math.abs(s.y-n[0][1])>1)&&(s=[s.x,s.y],r&&E(s,e)<E(n[0],e)?n.unshift(s):n.push(s),r++)}return n}:"hv"===L||"vh"===L?V=function(e,t){var n=[],r=J(e),a=J(t);return r&&a&&Q(r,a)?n:(r&&n.push(r),a&&n.push(a),n)}:"hvh"===L?V=$(0,G,Y):"vhv"===L&&(V=$(1,Z,X)),n=0;n<e.length;n++)if(l=I(n)){for(P=0,H=null,te(l),n++;n<e.length;n++){if(!(u=I(n))){if(A)continue;break}if(C){if(!((y=E(u,l))<j(u)*O)){for(p=[(u[0]-l[0])/y,(u[1]-l[1])/y],d=l,m=y,v=b=_=0,h=!1,c=u,n++;n<e.length;n++){if(!(f=I(n))){if(A)continue;break}if(w=(g=[f[0]-l[0],f[1]-l[1]])[0]*p[1]-g[1]*p[0],b=Math.min(b,w),(_=Math.max(_,w))-b>j(f))break;c=f,(x=g[0]*p[0]+g[1]*p[1])>m?(m=x,u=f,h=!1):x<v&&(v=x,d=f,h=!0)}if(h?(te(u),c!==d&&te(d)):(d!==l&&te(d),c!==u&&te(u)),te(c),n>=e.length||!f)break;te(f),l=f}}else te(u)}H&&K([F||H[0],B||H[1]]),z.push(D.slice(0,P))}return z}},{"../../constants/numerical":134,"../../lib":152,"./constants":259}],268:[function(e,t,n){"use strict";t.exports=function(e,t,n){"spline"===n("line.shape")&&n("line.smoothing")}},{}],269:[function(e,t,n){"use strict";t.exports=function(e,t,n){var r,a,i=null;for(a=0;a<n.length;++a)!0===(r=n[a][0].trace).visible?(r._nexttrace=null,-1!==["tonextx","tonexty","tonext"].indexOf(r.fill)&&(r._prevtrace=i,i&&(i._nexttrace=r)),i=r):r._prevtrace=r._nexttrace=null}},{}],270:[function(e,t,n){"use strict";var r=e("fast-isnumeric");t.exports=function(e){var t=e.marker,n=t.sizeref||1,a=t.sizemin||0,i="area"===t.sizemode?function(e){return Math.sqrt(e/n)}:function(e){return e/n};return function(e){var t=i(e/2);return r(t)&&t>0?Math.max(t,a):0}}},{"fast-isnumeric":5}],271:[function(e,t,n){"use strict";var r=e("../../components/color"),a=e("../../components/colorscale/has_colorscale"),i=e("../../components/colorscale/defaults"),o=e("./subtypes");t.exports=function(e,t,n,s,l,c){var u=o.isBubble(e),d=(e.line||{}).color;(c=c||{},d&&(n=d),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),l("marker.color",n),a(e,"marker")&&i(e,t,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:u?r.background:r.defaultLine),a(e,"marker.line")&&i(e,t,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient)&&("none"!==l("marker.gradient.type")&&l("marker.gradient.color"))}},{"../../components/color":32,"../../components/colorscale/defaults":42,"../../components/colorscale/has_colorscale":46,"./subtypes":275}],272:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../registry"),i=e("../../lib"),o=e("../../components/drawing"),s=e("./subtypes"),l=e("./line_points"),c=e("./link_traces"),u=e("../../lib/polygon").tester;function d(e,t,n,c,d,f,h){var p,g;!function(e,t,n,a,o){var l=n.xaxis,c=n.yaxis,u=r.extent(i.simpleMap(l.range,l.r2c)),d=r.extent(i.simpleMap(c.range,c.r2c)),f=a[0].trace;if(!s.hasMarkers(f))return;var h=f.marker.maxdisplayed;if(0===h)return;var p=a.filter(function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=d[0]&&e.y<=d[1]}),g=Math.ceil(p.length/h),y=0;o.forEach(function(e,n){var r=e[0].trace;s.hasMarkers(r)&&r.marker.maxdisplayed>0&&n<t&&y++});var m=Math.round(y*g/3+Math.floor(y/3)*g/7.1);a.forEach(function(e){delete e.vis}),p.forEach(function(e,t){0===Math.round((t+m)%g)&&(e.vis=!0)})}(0,t,n,c,d);var y=!!h&&h.duration>0;function m(e){return y?e.transition():e}var v=n.xaxis,x=n.yaxis,b=c[0].trace,_=b.line,w=r.select(f);if(a.getComponentMethod("errorbars","plot")(w,n,h),!0===b.visible){var k,M;m(w).style("opacity",b.opacity);var T=b.fill.charAt(b.fill.length-1);"x"!==T&&"y"!==T&&(T=""),n.isRangePlot||(c[0].node3=w);var A="",S=[],L=b._prevtrace;L&&(A=L._prevRevpath||"",M=L._nextFill,S=L._polygons);var C,z,O,D,P,I,j,E,N,R="",F="",B=[],H=i.noop;if(k=b._ownFill,s.hasLines(b)||"none"!==b.fill){for(M&&M.datum(c),-1!==["hv","vh","hvh","vhv"].indexOf(_.shape)?(O=o.steps(_.shape),D=o.steps(_.shape.split("").reverse().join(""))):O=D="spline"===_.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?o.smoothclosed(e.slice(1),_.smoothing):o.smoothopen(e,_.smoothing)}:function(e){return"M"+e.join("L")},P=function(e){return D(e.reverse())},B=l(c,{xaxis:v,yaxis:x,connectGaps:b.connectgaps,baseTolerance:Math.max(_.width||1,3)/4,shape:_.shape,simplify:_.simplify}),N=b._polygons=new Array(B.length),g=0;g<B.length;g++)b._polygons[g]=u(B[g]);B.length&&(I=B[0][0],E=(j=B[B.length-1])[j.length-1]),H=function(e){return function(t){if(C=O(t),z=P(t),R?T?(R+="L"+C.substr(1),F=z+"L"+F.substr(1)):(R+="Z"+C,F=z+"Z"+F):(R=C,F=z),s.hasLines(b)&&t.length>1){var n=r.select(this);if(n.datum(c),e)m(n.style("opacity",0).attr("d",C).call(o.lineGroupStyle)).style("opacity",1);else{var a=m(n);a.attr("d",C),o.singleLineStyle(c,a)}}}}}var q=w.selectAll(".js-line").data(B);m(q.exit()).style("opacity",0).remove(),q.each(H(!1)),q.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(o.lineGroupStyle).each(H(!0)),o.setClipUrl(q,n.layerClipId),B.length?(k?I&&E&&(T?("y"===T?I[1]=E[1]=x.c2p(0,!0):"x"===T&&(I[0]=E[0]=v.c2p(0,!0)),m(k).attr("d","M"+E+"L"+I+"L"+R.substr(1)).call(o.singleFillStyle)):m(k).attr("d",R+"Z").call(o.singleFillStyle)):M&&("tonext"===b.fill.substr(0,6)&&R&&A?("tonext"===b.fill?m(M).attr("d",R+"Z"+A+"Z").call(o.singleFillStyle):m(M).attr("d",R+"L"+A.substr(1)+"Z").call(o.singleFillStyle),b._polygons=b._polygons.concat(S)):(U(M),b._polygons=null)),b._prevRevpath=F,b._prevPolygons=N):(k?U(k):M&&U(M),b._polygons=b._prevRevpath=b._prevPolygons=null);var V=w.selectAll(".points");p=V.data([c]),V.each(W),p.enter().append("g").classed("points",!0).each(W),p.exit().remove(),p.each(function(e){var t=!1===e[0].trace.cliponaxis;o.setClipUrl(r.select(this),t?null:n.layerClipId)})}function U(e){m(e).attr("d","M0,0Z")}function G(e){return e.filter(function(e){return e.vis})}function Y(e){return e.id}function Z(e){if(e.ids)return Y}function X(){return!1}function W(t){var a,l=t[0].trace,c=r.select(this),u=s.hasMarkers(l),d=s.hasText(l),f=Z(l),h=X,p=X;u&&(h=l.marker.maxdisplayed||l._needsCull?G:i.identity),d&&(p=l.marker.maxdisplayed||l._needsCull?G:i.identity);var g,b=(a=c.selectAll("path.point").data(h,f)).enter().append("path").classed("point",!0);y&&b.call(o.pointStyle,l,e).call(o.translatePoints,v,x).style("opacity",0).transition().style("opacity",1),a.order(),u&&(g=o.makePointStyleFns(l)),a.each(function(t){var a=r.select(this),i=m(a);o.translatePoint(t,i,v,x)?(o.singlePointStyle(t,i,l,g,e),n.layerClipId&&o.hideOutsideRangePoint(t,i,v,x,l.xcalendar,l.ycalendar),l.customdata&&a.classed("plotly-customdata",null!==t.data&&void 0!==t.data)):i.remove()}),y?a.exit().transition().style("opacity",0).remove():a.exit().remove(),(a=c.selectAll("g").data(p,f)).enter().append("g").classed("textpoint",!0).append("text"),a.order(),a.each(function(e){var t=r.select(this),a=m(t.select("text"));o.translatePoint(e,a,v,x)?n.layerClipId&&o.hideOutsideRangePoint(e,t,v,x,l.xcalendar,l.ycalendar):t.remove()}),a.selectAll("text").call(o.textPointStyle,l,e).each(function(e){var t=v.c2p(e.x),n=x.c2p(e.y);r.select(this).selectAll("tspan.line").each(function(){m(r.select(this)).attr({x:t,y:n})})}),a.exit().remove()}}t.exports=function(e,t,n,a,i,s){var l,u,f,h,p=!i,g=!!i&&i.duration>0;for((f=a.selectAll("g.trace").data(n,function(e){return e[0].trace.uid})).enter().append("g").attr("class",function(e){return"trace scatter trace"+e[0].trace.uid}).style("stroke-miterlimit",2),c(e,t,n),function(e,t,n){var a;t.selectAll("g.trace").each(function(e){var t=r.select(this);if((a=e[0].trace)._nexttrace){if(a._nextFill=t.select(".js-fill.js-tonext"),!a._nextFill.size()){var i=":first-child";t.select(".js-fill.js-tozero").size()&&(i+=" + *"),a._nextFill=t.insert("path",i).attr("class","js-fill js-tonext")}}else t.selectAll(".js-fill.js-tonext").remove(),a._nextFill=null;a.fill&&("tozero"===a.fill.substr(0,6)||"toself"===a.fill||"to"===a.fill.substr(0,2)&&!a._prevtrace)?(a._ownFill=t.select(".js-fill.js-tozero"),a._ownFill.size()||(a._ownFill=t.insert("path",":first-child").attr("class","js-fill js-tozero"))):(t.selectAll(".js-fill.js-tozero").remove(),a._ownFill=null),t.selectAll(".js-fill").call(o.setClipUrl,n.layerClipId)})}(0,a,t),l=0,u={};l<n.length;l++)u[n[l][0].trace.uid]=l;(a.selectAll("g.trace").sort(function(e,t){return u[e[0].trace.uid]>u[t[0].trace.uid]?1:-1}),g)?(s&&(h=s()),r.transition().duration(i.duration).ease(i.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).each(function(){a.selectAll("g.trace").each(function(r,a){d(e,a,t,r,n,this,i)})})):a.selectAll("g.trace").each(function(r,a){d(e,a,t,r,n,this,i)});p&&f.exit().remove(),a.selectAll("path:not([d])").remove()}},{"../../components/drawing":57,"../../lib":152,"../../lib/polygon":164,"../../registry":241,"./line_points":267,"./link_traces":269,"./subtypes":275,d3:3}],273:[function(e,t,n){"use strict";var r=e("./subtypes");t.exports=function(e,t){var n,a,i,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],d=s[0].trace;if(!r.hasMarkers(d)&&!r.hasText(d))return[];if(!1===t)for(n=0;n<s.length;n++)s[n].selected=0;else for(n=0;n<s.length;n++)a=s[n],i=l.c2p(a.x),o=c.c2p(a.y),t.contains([i,o])?(u.push({pointNumber:n,x:l.c2d(a.x),y:c.c2d(a.y)}),a.selected=1):a.selected=0;return u}},{"./subtypes":275}],274:[function(e,t,n){"use strict";var r=e("d3"),a=e("../../components/drawing"),i=e("../../registry");function o(e,t,n){a.pointStyle(e.selectAll("path.point"),t,n),a.textPointStyle(e.selectAll("text"),t,n)}t.exports={style:function(e,t){var n=t?t[0].node3:r.select(e).selectAll("g.trace.scatter");n.style("opacity",function(e){return e[0].trace.opacity}),n.selectAll("g.points").each(function(t){o(r.select(this),t.trace||t[0].trace,e)}),n.selectAll("g.trace path.js-line").call(a.lineGroupStyle),n.selectAll("g.trace path.js-fill").call(a.fillGroupStyle),i.getComponentMethod("errorbars","style")(n)},stylePoints:o,styleOnSelect:function(e,t){var n=t[0].node3,r=t[0].trace;r.selectedpoints?(a.selectedPointStyle(n.selectAll("path.point"),r),a.selectedTextStyle(n.selectAll("text"),r)):o(n,r,e)}}},{"../../components/drawing":57,"../../registry":241,d3:3}],275:[function(e,t,n){"use strict";var r=e("../../lib");t.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){return r.isPlainObject(e.marker)&&r.isArrayOrTypedArray(e.marker.size)}}},{"../../lib":152}],276:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t,n,a,i){i=i||{},a("textposition"),r.coerceFont(a,"textfont",n.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}},{"../../lib":152}],277:[function(e,t,n){"use strict";var r=e("../../registry");t.exports=function(e,t,n,a){var i,o=a("x"),s=a("y");if(r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],n),o)s?i=Math.min(o.length,s.length):(i=o.length,a("y0"),a("dy"));else{if(!s)return 0;i=t.y.length,a("x0"),a("dx")}return t._length=i,i}},{"../../registry":241}],278:[function(e,t,n){"use strict";var r=e("../../lib/extend").extendFlat,a=e("../scatter/attributes"),i=e("../../plots/attributes"),o=a.line;t.exports={mode:a.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the radial coordinates"},theta:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the angular coordinates"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",role:"info",editType:"calc+clearAxisTypes",description:["Sets the unit of input *theta* values.","Has an effect only when on *linear* angular axes."].join(" ")},text:a.text,hovertext:a.hovertext,line:{color:o.color,width:o.width,dash:o.dash,shape:r({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:a.connectgaps,marker:a.marker,cliponaxis:r({},a.cliponaxis,{dflt:!1}),textposition:a.textposition,textfont:a.textfont,fill:r({},a.fill,{values:["none","toself","tonext"],description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scatterpolar has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:a.fillcolor,hoverinfo:r({},i.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:a.hoveron,selected:a.selected,unselected:a.unselected}},{"../../lib/extend":146,"../../plots/attributes":191,"../scatter/attributes":253}],279:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),a=e("../../constants/numerical").BADNUM,i=e("../../plots/cartesian/axes"),o=e("../scatter/colorscale_calc"),s=e("../scatter/arrays_to_calcdata"),l=e("../scatter/calc_selection"),c=e("../scatter/calc").calcMarkerSize;t.exports=function(e,t){var n,u=e._fullLayout,d=t.subplot,f=u[d].radialaxis,h=u[d].angularaxis,p=f.makeCalcdata(t,"r"),g=h.makeCalcdata(t,"theta"),y=t._length,m=new Array(y);for(var v=0;v<y;v++){var x=p[v],b=g[v],_=m[v]={};r(x)&&r(b)?(_.r=x,_.theta=b,_.rad=(n=b,h.c2rad(n,t.thetaunit))):_.r=a}var w=c(t,y);return i.expand(f,p,{ppad:w}),o(t),s(m,t),l(m,t),m}},{"../../constants/numerical":134,"../../plots/cartesian/axes":194,"../scatter/arrays_to_calcdata":252,"../scatter/calc":254,"../scatter/calc_selection":255,"../scatter/colorscale_calc":258,"fast-isnumeric":5}],280:[function(e,t,n){"use strict";var r=e("../../lib"),a=e("../scatter/subtypes"),i=e("../scatter/marker_defaults"),o=e("../scatter/line_defaults"),s=e("../scatter/line_shape_defaults"),l=e("../scatter/text_defaults"),c=e("../scatter/fillcolor_defaults"),u=e("../scatter/constants").PTS_LINESONLY,d=e("./attributes");t.exports=function(e,t,n,f){function h(n,a){return r.coerce(e,t,d,n,a)}var p=h("r"),g=h("theta"),y=p&&g?Math.min(p.length,g.length):0;if(y){t._length=y,h("thetaunit"),h("mode",y<u?"lines+markers":"lines"),h("text"),h("hovertext"),a.hasLines(t)&&(o(e,t,n,f,h),s(e,t,h),h("connectgaps")),a.hasMarkers(t)&&i(e,t,n,f,h,{gradient:!0}),a.hasText(t)&&l(e,t,f,h);var m=[];(a.hasMarkers(t)||a.hasText(t))&&(h("cliponaxis"),h("marker.maxdisplayed"),m.push("points")),h("fill"),"none"!==t.fill&&(c(e,t,n,h),a.hasLines(t)||s(e,t,h)),"tonext"!==t.fill&&"toself"!==t.fill||m.push("fills"),h("hoveron",m.join("+")||"points"),r.coerceSelectionMarkerOpacity(t,h)}else t.visible=!1}},{"../../lib":152,"../scatter/constants":259,"../scatter/fillcolor_defaults":262,"../scatter/line_defaults":266,"../scatter/line_shape_defaults":268,"../scatter/marker_defaults":271,"../scatter/subtypes":275,"../scatter/text_defaults":276,"./attributes":278}],281:[function(e,t,n){"use strict";var r=e("../scatter/hover"),a=e("../../plots/cartesian/axes"),i=e("../../lib");function o(e,t,n){var r=n.radialAxis,o=n.angularAxis,s=(e.hi||t.hoverinfo).split("+"),l=[];r._hovertitle="r",o._hovertitle="θ";var c,u=o._c2rad(e.theta,t.thetaunit);function d(e,t){l.push(e._hovertitle+": "+a.tickText(e,t,"hover").text)}return c="linear"===o.type&&t.thetaunit!==o.thetaunit?"degrees"===o.thetaunit?i.rad2deg(u):u:e.theta,-1!==s.indexOf("all")&&(s=["r","theta"]),-1!==s.indexOf("r")&&d(r,r.c2r(e.r)),-1!==s.indexOf("theta")&&d(o,c),l.join("<br>")}t.exports={hoverPoints:function(e,t,n,a){var i=r(e,t,n,a);if(i&&!1!==i[0].index){var s=i[0];if(void 0===s.index)return i;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtWithinSector(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,s.extraText=o(c,u,l),i}},makeHoverPointText:o}},{"../../lib":152,"../../plots/cartesian/axes":194,"../scatter/hover":264}],282:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e("../../plots/polar"),categories:["polar","symbols","markerColorscale","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scatter/select"),meta:{hrName:"scatter_polar",description:["The scatterpolar trace type encompasses line charts, scatter charts, text charts, and bubble charts","in polar coordinates.","The data visualized as scatter point or lines is set in","`r` (radial) and `theta` (angular) coordinates","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},{"../../plots/polar":229,"../scatter/select":273,"../scatter/style":274,"./attributes":278,"./calc":279,"./defaults":280,"./hover":281,"./plot":283}],283:[function(e,t,n){"use strict";var r=e("../scatter/plot"),a=e("../../constants/numerical").BADNUM;t.exports=function(e,t,n){var i,o,s,l={xaxis:t.xaxis,yaxis:t.yaxis,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.circle:null},c=t.radialAxis,u=c.range;for(s=u[0]>u[1]?function(e){return e<=0}:function(e){return e>=0},i=0;i<n.length;i++)for(o=0;o<n[i].length;o++){var d=n[i][o],f=d.r;if(f!==a){var h=c.c2r(f)-u[0];if(s(h)){var p=d.rad;d.x=h*Math.cos(p),d.y=h*Math.sin(p);continue}d.intoCenter=[t.cxx,t.cyy]}d.x=a,d.y=a}var g=t.layers.frontplot.select("g.scatterlayer");r(e,l,n,g)}},{"../../constants/numerical":134,"../scatter/plot":272}],284:[function(e,t,n){var r,a=e("./lib/build-log"),i=e("./lib/epsilon"),o=e("./lib/intersecter"),s=e("./lib/segment-chainer"),l=e("./lib/segment-selector"),c=e("./lib/geojson"),u=!1,d=i();function f(e,t,n){var a=r.segments(e),i=r.segments(t),o=n(r.combine(a,i));return r.polygon(o)}r={buildLog:function(e){return!0===e?u=a():!1===e&&(u=!1),!1!==u&&u.list},epsilon:function(e){return d.epsilon(e)},segments:function(e){var t=o(!0,d,u);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:o(!1,d,u).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:l.union(e.combined,u),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:l.intersect(e.combined,u),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:l.difference(e.combined,u),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:l.differenceRev(e.combined,u),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:l.xor(e.combined,u),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:s(e.segments,d,u),inverted:e.inverted}},polygonFromGeoJSON:function(e){return c.toPolygon(r,e)},polygonToGeoJSON:function(e){return c.fromPolygon(r,d,e)},union:function(e,t){return f(e,t,r.selectUnion)},intersect:function(e,t){return f(e,t,r.selectIntersect)},difference:function(e,t){return f(e,t,r.selectDifference)},differenceRev:function(e,t){return f(e,t,r.selectDifferenceRev)},xor:function(e,t){return f(e,t,r.selectXor)}},"object"==typeof window&&(window.PolyBool=r),t.exports=r},{"./lib/build-log":285,"./lib/epsilon":286,"./lib/geojson":287,"./lib/intersecter":288,"./lib/segment-chainer":290,"./lib/segment-selector":291}],285:[function(e,t,n){t.exports=function(){var e,t=0,n=!1;function r(t,n){return e.list.push({type:t,data:n?JSON.parse(JSON.stringify(n)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return r("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return r("div_seg",{seg:e,pt:t}),r("chop",{seg:e,pt:t})},statusRemove:function(e){return r("pop_seg",{seg:e})},segmentUpdate:function(e){return r("seg_update",{seg:e})},segmentNew:function(e,t){return r("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return r("rem_seg",{seg:e})},tempStatus:function(e,t,n){return r("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return r("rewind",{seg:e})},status:function(e,t,n){return r("status",{seg:e,above:t,below:n})},vert:function(t){return t===n?e:(n=t,r("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),r("log",{txt:e})},reset:function(){return r("reset")},selected:function(e){return r("selected",{segs:e})},chainStart:function(e){return r("chain_start",{seg:e})},chainRemoveHead:function(e,t){return r("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return r("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return r("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return r("chain_match",{index:e})},chainClose:function(e){return r("chain_close",{index:e})},chainAddHead:function(e,t){return r("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return r("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return r("chain_con",{index1:e,index2:t})},chainReverse:function(e){return r("chain_rev",{index:e})},chainJoin:function(e,t){return r("chain_join",{index1:e,index2:t})},done:function(){return r("done")}}}},{}],286:[function(e,t,n){t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,n,r){var a=n[0],i=n[1],o=r[0],s=r[1],l=t[0];return(o-a)*(t[1]-i)-(s-i)*(l-a)>=-e},pointBetween:function(t,n,r){var a=t[1]-n[1],i=r[0]-n[0],o=t[0]-n[0],s=r[1]-n[1],l=o*i+a*s;return!(l<e||l-(i*i+s*s)>-e)},pointsSameX:function(t,n){return Math.abs(t[0]-n[0])<e},pointsSameY:function(t,n){return Math.abs(t[1]-n[1])<e},pointsSame:function(e,n){return t.pointsSameX(e,n)&&t.pointsSameY(e,n)},pointsCompare:function(e,n){return t.pointsSameX(e,n)?t.pointsSameY(e,n)?0:e[1]<n[1]?-1:1:e[0]<n[0]?-1:1},pointsCollinear:function(t,n,r){var a=t[0]-n[0],i=t[1]-n[1],o=n[0]-r[0],s=n[1]-r[1];return Math.abs(a*s-o*i)<e},linesIntersect:function(t,n,r,a){var i=n[0]-t[0],o=n[1]-t[1],s=a[0]-r[0],l=a[1]-r[1],c=i*l-o*s;if(Math.abs(c)<e)return!1;var u=t[0]-r[0],d=t[1]-r[1],f=(s*d-l*u)/c,h=(i*d-o*u)/c,p={alongA:0,alongB:0,pt:[t[0]+f*i,t[1]+f*o]};return p.alongA=f<=-e?-2:f<e?-1:f-1<=-e?0:f-1<e?1:2,p.alongB=h<=-e?-2:h<e?-1:h-1<=-e?0:h-1<e?1:2,p},pointInsideRegion:function(t,n){for(var r=t[0],a=t[1],i=n[n.length-1][0],o=n[n.length-1][1],s=!1,l=0;l<n.length;l++){var c=n[l][0],u=n[l][1];u-a>e!=o-a>e&&(i-c)*(a-u)/(o-u)+c-r>e&&(s=!s),i=c,o=u}return s}};return t}},{}],287:[function(e,t,n){var r={toPolygon:function(e,t){function n(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function n(t){var n=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[n]})}for(var r=n(t[0]),a=1;a<t.length;a++)r=e.selectDifference(e.combine(r,n(t[a])));return r}if("Polygon"===t.type)return e.polygon(n(t.coordinates));if("MultiPolygon"===t.type){for(var r=e.segments({inverted:!1,regions:[]}),a=0;a<t.coordinates.length;a++)r=e.selectUnion(e.combine(r,n(t.coordinates[a])));return e.polygon(r)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,t,n){function r(e,n){return t.pointInsideRegion([.5*(e[0][0]+e[1][0]),.5*(e[0][1]+e[1][1])],n)}function a(e){return{region:e,children:[]}}n=e.polygon(e.segments(n));var i=a(null);function o(e,t){for(var n=0;n<e.children.length;n++){if(r(t,(s=e.children[n]).region))return void o(s,t)}var i=a(t);for(n=0;n<e.children.length;n++){var s;r((s=e.children[n]).region,t)&&(i.children.push(s),e.children.splice(n,1),n--)}e.children.push(i)}for(var s=0;s<n.regions.length;s++){var l=n.regions[s];l.length<3||o(i,l)}function c(e,t){for(var n=0,r=e[e.length-1][0],a=e[e.length-1][1],i=[],o=0;o<e.length;o++){var s=e[o][0],l=e[o][1];i.push([s,l]),n+=l*r-s*a,r=s,a=l}return n<0!==t&&i.reverse(),i.push([i[0][0],i[0][1]]),i}var u=[];function d(e){var t=[c(e.region,!1)];u.push(t);for(var n=0;n<e.children.length;n++)t.push(f(e.children[n]))}function f(e){for(var t=0;t<e.children.length;t++)d(e.children[t]);return c(e.region,!0)}for(s=0;s<i.children.length;s++)d(i.children[s]);return u.length<=0?{type:"Polygon",coordinates:[]}:1==u.length?{type:"Polygon",coordinates:u[0]}:{type:"MultiPolygon",coordinates:u}}};t.exports=r},{}],288:[function(e,t,n){var r=e("./linked-list");t.exports=function(e,t,n){function a(e,t,r){return{id:n?n.segmentId():-1,start:e,end:t,myFill:{above:r.myFill.above,below:r.myFill.below},otherFill:null}}var i=r.create();function o(e,n){i.insertBefore(e,function(r){return function(e,n,r,a,i,o){var s=t.pointsCompare(n,i);return 0!==s?s:t.pointsSame(r,o)?0:e!==a?e?1:-1:t.pointAboveOrOnLine(r,a?i:o,a?o:i)?1:-1}(e.isStart,e.pt,n,r.isStart,r.pt,r.other.pt)<0})}function s(e,t){var n=function(e,t){var n=r.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return o(n,e.end),n}(e,t);return function(e,t,n){var a=r.node({isStart:!1,pt:t.end,seg:t,primary:n,other:e,status:null});e.other=a,o(a,e.pt)}(n,e,t),n}function l(e,t){var r=a(t,e.seg.end,e.seg);return function(e,t){n&&n.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,o(e.other,e.pt)}(e,t),s(r,e.primary)}function c(a,o){var s=r.create();function c(e){return s.findTransition(function(n){var r,a,i,o,s,l;return r=e,a=n.ev,i=r.seg.start,o=r.seg.end,s=a.seg.start,l=a.seg.end,(t.pointsCollinear(i,s,l)?t.pointsCollinear(o,s,l)?1:t.pointAboveOrOnLine(o,s,l)?1:-1:t.pointAboveOrOnLine(i,s,l)?1:-1)>0})}function u(e,r){var a=e.seg,i=r.seg,o=a.start,s=a.end,c=i.start,u=i.end;n&&n.checkIntersection(a,i);var d=t.linesIntersect(o,s,c,u);if(!1===d){if(!t.pointsCollinear(o,s,c))return!1;if(t.pointsSame(o,u)||t.pointsSame(s,c))return!1;var f=t.pointsSame(o,c),h=t.pointsSame(s,u);if(f&&h)return r;var p=!f&&t.pointBetween(o,c,u),g=!h&&t.pointBetween(s,c,u);if(f)return g?l(r,s):l(e,u),r;p&&(h||(g?l(r,s):l(e,u)),l(r,o))}else 0===d.alongA&&(-1===d.alongB?l(e,c):0===d.alongB?l(e,d.pt):1===d.alongB&&l(e,u)),0===d.alongB&&(-1===d.alongA?l(r,o):0===d.alongA?l(r,d.pt):1===d.alongA&&l(r,s));return!1}for(var d=[];!i.isEmpty();){var f=i.getHead();if(n&&n.vert(f.pt[0]),f.isStart){n&&n.segmentNew(f.seg,f.primary);var h=c(f),p=h.before?h.before.ev:null,g=h.after?h.after.ev:null;function y(){if(p){var e=u(f,p);if(e)return e}return!!g&&u(f,g)}n&&n.tempStatus(f.seg,!!p&&p.seg,!!g&&g.seg);var m,v,x=y();if(x)e?(v=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=f.seg.myFill,n&&n.segmentUpdate(x.seg),f.other.remove(),f.remove();if(i.getHead()!==f){n&&n.rewind(f.seg);continue}e?(v=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=g?g.seg.myFill.above:a,f.seg.myFill.above=v?!f.seg.myFill.below:f.seg.myFill.below):null===f.seg.otherFill&&(m=g?f.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:f.primary?o:a,f.seg.otherFill={above:m,below:m}),n&&n.status(f.seg,!!p&&p.seg,!!g&&g.seg),f.other.status=h.insert(r.node({ev:f}))}else{var b=f.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(b.prev)&&s.exists(b.next)&&u(b.prev.ev,b.next.ev),n&&n.statusRemove(b.ev.seg),b.remove(),!f.primary){var _=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=_}d.push(f.seg)}i.getHead().remove()}return n&&n.done(),d}return e?{addRegion:function(e){for(var r,a,i,o=e[e.length-1],l=0;l<e.length;l++){r=o,o=e[l];var c=t.pointsCompare(r,o);0!==c&&s((a=c<0?r:o,i=c<0?o:r,{id:n?n.segmentId():-1,start:a,end:i,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(e){return c(e,!1)}}:{calculate:function(e,t,n,r){return e.forEach(function(e){s(a(e.start,e.end,e),!0)}),n.forEach(function(e){s(a(e.start,e.end,e),!1)}),c(t,r)}}}},{"./linked-list":289}],289:[function(e,t,n){t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,n){for(var r=e.root,a=e.root.next;null!==a;){if(n(a))return t.prev=a.prev,t.next=a,a.prev.next=t,void(a.prev=t);r=a,a=a.next}r.next=t,t.prev=r,t.next=null},findTransition:function(t){for(var n=e.root,r=e.root.next;null!==r&&!t(r);)n=r,r=r.next;return{before:n===e.root?null:n,after:r,insert:function(e){return e.prev=n,e.next=r,n.next=e,null!==r&&(r.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}},{}],290:[function(e,t,n){t.exports=function(e,t,n){var r=[],a=[];return e.forEach(function(e){var i=e.start,o=e.end;if(t.pointsSame(i,o))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{n&&n.chainStart(e);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u<r.length;u++){var d=(y=r[u])[0],f=(y[1],y[y.length-1]);if(y[y.length-2],t.pointsSame(d,i)){if(M(u,!0,!0))break}else if(t.pointsSame(d,o)){if(M(u,!0,!1))break}else if(t.pointsSame(f,i)){if(M(u,!1,!0))break}else if(t.pointsSame(f,o)&&M(u,!1,!1))break}if(c===s)return r.push([i,o]),void(n&&n.chainNew(i,o));if(c===l){n&&n.chainMatch(s.index);var h=s.index,p=s.matches_pt1?o:i,g=s.matches_head,y=r[h],m=g?y[0]:y[y.length-1],v=g?y[1]:y[y.length-2],x=g?y[y.length-1]:y[0],b=g?y[y.length-2]:y[1];return t.pointsCollinear(v,m,p)&&(g?(n&&n.chainRemoveHead(s.index,p),y.shift()):(n&&n.chainRemoveTail(s.index,p),y.pop()),m=v),t.pointsSame(x,p)?(r.splice(h,1),t.pointsCollinear(b,x,m)&&(g?(n&&n.chainRemoveTail(s.index,m),y.pop()):(n&&n.chainRemoveHead(s.index,m),y.shift())),n&&n.chainClose(s.index),void a.push(y)):void(g?(n&&n.chainAddHead(s.index,p),y.unshift(p)):(n&&n.chainAddTail(s.index,p),y.push(p)))}var _=s.index,w=l.index;n&&n.chainConnect(_,w);var k=r[_].length<r[w].length;s.matches_head?l.matches_head?k?(T(_),A(_,w)):(T(w),A(w,_)):A(w,_):l.matches_head?A(_,w):k?(T(_),A(w,_)):(T(w),A(_,w))}function M(e,t,n){return c.index=e,c.matches_head=t,c.matches_pt1=n,c===s?(c=l,!1):(c=null,!0)}function T(e){n&&n.chainReverse(e),r[e].reverse()}function A(e,a){var i=r[e],o=r[a],s=i[i.length-1],l=i[i.length-2],c=o[0],u=o[1];t.pointsCollinear(l,s,c)&&(n&&n.chainRemoveTail(e,s),i.pop(),s=l),t.pointsCollinear(s,c,u)&&(n&&n.chainRemoveHead(a,c),o.shift()),n&&n.chainJoin(e,a),r[e]=i.concat(o),r.splice(a,1)}}),a}},{}],291:[function(e,t,n){function r(e,t,n){var r=[];return e.forEach(function(e){var a=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[a]&&r.push({id:n?n.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[a],below:2===t[a]},otherFill:null})}),n&&n.selected(r),r}var a={union:function(e,t){return r(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return r(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return r(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return r(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return r(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};t.exports=a},{}],292:[function(e,t,n){var r,a,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var c,u=[],d=!1,f=-1;function h(){d&&c&&(d=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!d){var e=l(h);d=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,d=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===s||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new g(e,t)),1!==u.length||d||l(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],293:[function(e,t,n){!function(e){var n=/^\s+/,r=/\s+$/,a=0,i=e.round,o=e.min,s=e.max,l=e.random;function c(t,l){if(t=t||"",l=l||{},t instanceof c)return t;if(!(this instanceof c))return new c(t,l);var u=function(t){var a={r:0,g:0,b:0},i=1,l=null,c=null,u=null,d=!1,f=!1;"string"==typeof t&&(t=function(e){e=e.replace(n,"").replace(r,"").toLowerCase();var t,a=!1;if(S[e])e=S[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=B.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=B.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=B.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=B.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=B.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=B.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=B.hex8.exec(e))return{r:D(t[1]),g:D(t[2]),b:D(t[3]),a:E(t[4]),format:a?"name":"hex8"};if(t=B.hex6.exec(e))return{r:D(t[1]),g:D(t[2]),b:D(t[3]),format:a?"name":"hex"};if(t=B.hex4.exec(e))return{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),a:E(t[4]+""+t[4]),format:a?"name":"hex8"};if(t=B.hex3.exec(e))return{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),format:a?"name":"hex"};return!1}(t));"object"==typeof t&&(H(t.r)&&H(t.g)&&H(t.b)?(h=t.r,p=t.g,g=t.b,a={r:255*z(h,255),g:255*z(p,255),b:255*z(g,255)},d=!0,f="%"===String(t.r).substr(-1)?"prgb":"rgb"):H(t.h)&&H(t.s)&&H(t.v)?(l=I(t.s),c=I(t.v),a=function(t,n,r){t=6*z(t,360),n=z(n,100),r=z(r,100);var a=e.floor(t),i=t-a,o=r*(1-n),s=r*(1-i*n),l=r*(1-(1-i)*n),c=a%6;return{r:255*[r,s,o,o,l,r][c],g:255*[l,r,r,s,o,o][c],b:255*[o,o,l,r,r,s][c]}}(t.h,l,c),d=!0,f="hsv"):H(t.h)&&H(t.s)&&H(t.l)&&(l=I(t.s),u=I(t.l),a=function(e,t,n){var r,a,i;function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=z(e,360),t=z(t,100),n=z(n,100),0===t)r=a=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),a=o(l,s,e),i=o(l,s,e-1/3)}return{r:255*r,g:255*a,b:255*i}}(t.h,l,u),d=!0,f="hsl"),t.hasOwnProperty("a")&&(i=t.a));var h,p,g;return i=C(i),{ok:d,format:t.format||f,r:o(255,s(a.r,0)),g:o(255,s(a.g,0)),b:o(255,s(a.b,0)),a:i}}(t);this._originalInput=t,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=i(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=u.ok,this._tc_id=a++}function u(e,t,n){e=z(e,255),t=z(t,255),n=z(n,255);var r,a,i=s(e,t,n),l=o(e,t,n),c=(i+l)/2;if(i==l)r=a=0;else{var u=i-l;switch(a=c>.5?u/(2-i-l):u/(i+l),i){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:a,l:c}}function d(e,t,n){e=z(e,255),t=z(t,255),n=z(n,255);var r,a,i=s(e,t,n),l=o(e,t,n),c=i,u=i-l;if(a=0===i?0:u/i,i==l)r=0;else{switch(i){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:a,v:c}}function f(e,t,n,r){var a=[P(i(e).toString(16)),P(i(t).toString(16)),P(i(n).toString(16))];return r&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function h(e,t,n,r){return[P(j(r)),P(i(e).toString(16)),P(i(t).toString(16)),P(i(n).toString(16))].join("")}function p(e,t){t=0===t?0:t||10;var n=c(e).toHsl();return n.s-=t/100,n.s=O(n.s),c(n)}function g(e,t){t=0===t?0:t||10;var n=c(e).toHsl();return n.s+=t/100,n.s=O(n.s),c(n)}function y(e){return c(e).desaturate(100)}function m(e,t){t=0===t?0:t||10;var n=c(e).toHsl();return n.l+=t/100,n.l=O(n.l),c(n)}function v(e,t){t=0===t?0:t||10;var n=c(e).toRgb();return n.r=s(0,o(255,n.r-i(-t/100*255))),n.g=s(0,o(255,n.g-i(-t/100*255))),n.b=s(0,o(255,n.b-i(-t/100*255))),c(n)}function x(e,t){t=0===t?0:t||10;var n=c(e).toHsl();return n.l-=t/100,n.l=O(n.l),c(n)}function b(e,t){var n=c(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,c(n)}function _(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function w(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+120)%360,s:t.s,l:t.l}),c({h:(n+240)%360,s:t.s,l:t.l})]}function k(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+90)%360,s:t.s,l:t.l}),c({h:(n+180)%360,s:t.s,l:t.l}),c({h:(n+270)%360,s:t.s,l:t.l})]}function M(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+72)%360,s:t.s,l:t.l}),c({h:(n+216)%360,s:t.s,l:t.l})]}function T(e,t,n){t=t||6,n=n||30;var r=c(e).toHsl(),a=360/n,i=[c(e)];for(r.h=(r.h-(a*t>>1)+720)%360;--t;)r.h=(r.h+a)%360,i.push(c(r));return i}function A(e,t){t=t||6;for(var n=c(e).toHsv(),r=n.h,a=n.s,i=n.v,o=[],s=1/t;t--;)o.push(c({h:r,s:a,v:i})),i=(i+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var t,n,r,a=this.toRgb();return t=a.r/255,n=a.g/255,r=a.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=C(e),this._roundA=i(100*this._a)/100,this},toHsv:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=d(this._r,this._g,this._b),t=i(360*e.h),n=i(100*e.s),r=i(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=u(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=u(this._r,this._g,this._b),t=i(360*e.h),n=i(100*e.s),r=i(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return f(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,a){var o=[P(i(e).toString(16)),P(i(t).toString(16)),P(i(n).toString(16)),P(j(r))];if(a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*z(this._r,255))+"%",g:i(100*z(this._g,255))+"%",b:i(100*z(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*z(this._r,255))+"%, "+i(100*z(this._g,255))+"%, "+i(100*z(this._b,255))+"%)":"rgba("+i(100*z(this._r,255))+"%, "+i(100*z(this._g,255))+"%, "+i(100*z(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(L[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+h(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var a=c(e);n="#"+h(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(T,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:I(e[r]));e=n}return c(e,t)},c.equals=function(e,t){return!(!e||!t)&&c(e).toRgbString()==c(t).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(e,t,n){n=0===n?0:n||50;var r=c(e).toRgb(),a=c(t).toRgb(),i=n/100;return c({r:(a.r-r.r)*i+r.r,g:(a.g-r.g)*i+r.g,b:(a.b-r.b)*i+r.b,a:(a.a-r.a)*i+r.a})},c.readability=function(t,n){var r=c(t),a=c(n);return(e.max(r.getLuminance(),a.getLuminance())+.05)/(e.min(r.getLuminance(),a.getLuminance())+.05)},c.isReadable=function(e,t,n){var r,a,i=c.readability(e,t);switch(a=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},c.mostReadable=function(e,t,n){var r,a,i,o,s=null,l=0;a=(n=n||{}).includeFallbackColors,i=n.level,o=n.size;for(var u=0;u<t.length;u++)(r=c.readability(e,t[u]))>l&&(l=r,s=c(t[u]));return c.isReadable(e,s,{level:i,size:o})||!a?s:(n.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],n))};var S=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},L=c.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(S);function C(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function z(t,n){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(t)&&(t="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(t);return t=o(n,s(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),e.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function O(e){return o(1,s(0,e))}function D(e){return parseInt(e,16)}function P(e){return 1==e.length?"0"+e:""+e}function I(e){return e<=1&&(e=100*e+"%"),e}function j(t){return e.round(255*parseFloat(t)).toString(16)}function E(e){return D(e)/255}var N,R,F,B=(R="[\\s|\\(]+("+(N="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",F="[\\s|\\(]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",{CSS_UNIT:new RegExp(N),rgb:new RegExp("rgb"+R),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+R),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+R),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function H(e){return!!B.CSS_UNIT.exec(e)}void 0!==t&&t.exports?t.exports=c:"function"==typeof define&&define.amd?define(function(){return c}):window.tinycolor=c}(Math)},{}]},{},[1]);
</script>
</html>
var Plotly = require('plotly.js/lib/core')
Plotly.register(require('plotly.js/lib/scatterpolar'))
var figUrl = 'https://raw.githubusercontent.com/plotly/plotly.js/61e155cfa0a1525baf9a8383faa8264627d2a47b/test/image/mocks/polar_scatter.json'
var gd = document.createElement('div')
document.body.appendChild(gd)
var buttons = [{
fn: zoom,
arg: 'in',
cnt: 'zoom in'
}, {
fn: zoom,
arg: 'out',
cnt: 'zoom out'
}, {
fn: cutSector,
arg: [0, 90],
cnt: '0-90 sector'
}, {
fn: cutSector,
arg: [0, 180],
cnt: '0-180 sector'
}, {
fn: cutSector,
arg: [0, 270],
cnt: '0-270 sector'
}, {
fn: cutSector,
arg: [0, 360],
cnt: 'reset sector'
}, {
fn: setThetaUnit,
arg: 'radians',
cnt: 'show in radians'
}, {
fn: setThetaUnit,
arg: 'degrees',
cnt: 'show in degrees'
}, {
fn: factorTicks,
arg: 2,
cnt: 'more angular ticks'
}, {
fn: factorTicks,
arg: 0.5,
cnt: 'less angular ticks'
}]
Plotly.d3.json(figUrl, (err, fig) => {
fig.layout.width = Math.max(700, window.innerWidth)
fig.layout.height = Math.max(500, window.innerHeight - 200)
Plotly.newPlot(gd, fig)
let fn = buttons[0].fn
buttons.forEach(opts => {
if (fn !== opts.fn) {
var br = document.createElement('br')
document.body.appendChild(br)
}
var btn = document.createElement('button')
document.body.appendChild(btn)
btn.onclick = () => opts.fn(opts.arg)
btn.innerHTML = opts.cnt
fn = opts.fn
})
})
function zoom(inOrOut) {
var rRange = gd.layout.polar.radialaxis.range
var range = [rRange[0], rRange[1] + {in: -dr, out: dr}[inOrOut]]
if (range[0] < range[1]) {
Plotly.relayout(gd, 'polar.radialaxis.range', range)
}
}
function cutSector(sector) {
Plotly.relayout(gd, 'polar.sector', sector)
}
function setThetaUnit(unit) {
Plotly.relayout(gd, 'polar.angularaxis.thetaunit', unit)
}
function factorTicks(factor) {
var nticks = gd._fullLayout.polar.angularaxis.nticks || 12
Plotly.relayout(gd, 'polar.angularaxis.nticks', nticks * factor)
}
function radialType(type) {
Plotly.relayout(gd, 'polar.radialaxis.type', type)
}
This file has been truncated, but you can view the full file.
{
"name": "plotly.js-polar-charts",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"3d-view": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/3d-view/-/3d-view-2.0.0.tgz",
"integrity": "sha1-gxrpQtdQjFCAHj4G+v4ejFdOF74=",
"requires": {
"matrix-camera-controller": "2.1.3",
"orbit-camera-controller": "4.0.0",
"turntable-camera-controller": "3.0.1"
}
},
"3d-view-controls": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/3d-view-controls/-/3d-view-controls-2.2.2.tgz",
"integrity": "sha512-WL0u3PN41lEx/4qvKqV6bJlweUYoW18FXMshW/qHb41AVdZxDReLoJNGYsI7x6jf9bYelEF62BJPQmO7yEnG2w==",
"requires": {
"3d-view": "2.0.0",
"has-passive-events": "1.0.0",
"mouse-change": "1.4.0",
"mouse-event-offset": "3.0.2",
"mouse-wheel": "1.2.0",
"right-now": "1.0.0"
}
},
"@mapbox/geojson-area": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@mapbox/geojson-area/-/geojson-area-0.2.2.tgz",
"integrity": "sha1-GNeBSqNr8j+7zDefjiaiKSfevxA=",
"requires": {
"wgs84": "0.0.0"
}
},
"@mapbox/gl-matrix": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/@mapbox/gl-matrix/-/gl-matrix-0.0.1.tgz",
"integrity": "sha1-5RJqq01kw2uBx6l9CuDd3eV3PSs="
},
"@mapbox/mapbox-gl-supported": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.3.1.tgz",
"integrity": "sha512-tMdtbKjxVaA3WZubFTKIPjAHKNz8PCqUGdRgT7RIpqLHLxZi3eQWzixrnyYA5dglEnbfcIEPvtRQu/4yXPt2YQ=="
},
"@mapbox/point-geometry": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz",
"integrity": "sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI="
},
"@mapbox/shelf-pack": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@mapbox/shelf-pack/-/shelf-pack-3.1.0.tgz",
"integrity": "sha1-Ht6pwL9nFbIXFxumBkbCAa9SD2o="
},
"@mapbox/tiny-sdf": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-1.1.0.tgz",
"integrity": "sha512-dnhyk8X2BkDRWImgHILYAGgo+kuciNYX30CUKj/Qd5eNjh54OWM/mdOS/PWsPeN+3abtN+QDGYM4G220ynVJKA=="
},
"@mapbox/unitbezier": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz",
"integrity": "sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4="
},
"@mapbox/vector-tile": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz",
"integrity": "sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==",
"requires": {
"@mapbox/point-geometry": "0.1.0"
}
},
"@mapbox/whoots-js": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@mapbox/whoots-js/-/whoots-js-3.0.0.tgz",
"integrity": "sha1-wd5CkwgUJNo6wwwjr6hQrxAZu1Q="
},
"@plotly/d3-sankey": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@plotly/d3-sankey/-/d3-sankey-0.5.0.tgz",
"integrity": "sha1-si+up0LlglEzXuXZ+6JIdyYHgA8=",
"requires": {
"d3-array": "1.2.1",
"d3-collection": "1.0.4",
"d3-interpolate": "1.2.0"
}
},
"JSONStream": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz",
"integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=",
"dev": true,
"requires": {
"jsonparse": "1.3.1",
"through": "2.3.8"
}
},
"JSV": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz",
"integrity": "sha1-0Hf2glVx+CEy+d/67Vh7QCn+/1c="
},
"a-big-triangle": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/a-big-triangle/-/a-big-triangle-1.0.3.tgz",
"integrity": "sha1-7v0wsCqPUl6LH3K7a7GwwWdRx5Q=",
"requires": {
"gl-buffer": "2.1.2",
"gl-vao": "1.3.0",
"weak-map": "1.0.5"
}
},
"abs-svg-path": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/abs-svg-path/-/abs-svg-path-0.1.1.tgz",
"integrity": "sha1-32Acjo0roQ1KdtYl4japo5wnI78="
},
"acorn": {
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz",
"integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ=="
},
"acorn-dynamic-import": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz",
"integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==",
"requires": {
"acorn": "5.5.3"
}
},
"acorn-jsx": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz",
"integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==",
"requires": {
"acorn": "5.5.3"
}
},
"acorn-node": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.3.0.tgz",
"integrity": "sha512-efP54n3d1aLfjL2UMdaXa6DsswwzJeI5rqhbFvXMrKiJ6eJFpf+7R0zN7t8IC+XKn2YOAFAv6xbBNgHUkoHWLw==",
"dev": true,
"requires": {
"acorn": "5.5.3",
"xtend": "4.0.1"
}
},
"acorn-object-spread": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/acorn-object-spread/-/acorn-object-spread-1.0.0.tgz",
"integrity": "sha1-SOrQ9KjrFplaF6Dbn/xqyq2kumg=",
"requires": {
"acorn": "3.3.0"
},
"dependencies": {
"acorn": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
"integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo="
}
}
},
"add-line-numbers": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/add-line-numbers/-/add-line-numbers-1.0.1.tgz",
"integrity": "sha1-SNu96kfb0jTer+rGyTzqb3C0t+M=",
"requires": {
"pad-left": "1.0.2"
}
},
"affine-hull": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/affine-hull/-/affine-hull-1.0.0.tgz",
"integrity": "sha1-dj/x040GPOt+Jy8X7k17vK+QXF0=",
"requires": {
"robust-orientation": "1.1.3"
}
},
"align-text": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
"integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
"requires": {
"kind-of": "3.2.2",
"longest": "1.0.1",
"repeat-string": "1.6.1"
}
},
"almost-equal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/almost-equal/-/almost-equal-1.1.0.tgz",
"integrity": "sha1-+FHGMROHV5lCdqou++jfowZszN0="
},
"alpha-complex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/alpha-complex/-/alpha-complex-1.0.0.tgz",
"integrity": "sha1-kIZYcNawVCrnPAwTHU75iWabctI=",
"requires": {
"circumradius": "1.0.0",
"delaunay-triangulate": "1.1.6"
}
},
"alpha-shape": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/alpha-shape/-/alpha-shape-1.0.0.tgz",
"integrity": "sha1-yDEJkj7P2mZ9IWP+Tyb+JHJvZKk=",
"requires": {
"alpha-complex": "1.0.0",
"simplicial-complex-boundary": "1.0.1"
}
},
"amdefine": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "1.9.1"
}
},
"ansicolors": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.2.1.tgz",
"integrity": "sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8="
},
"anymatch": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz",
"integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==",
"dev": true,
"requires": {
"micromatch": "2.3.11",
"normalize-path": "2.1.1"
}
},
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"requires": {
"sprintf-js": "1.0.3"
},
"dependencies": {
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
}
}
},
"arr-diff": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
"integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
"dev": true,
"requires": {
"arr-flatten": "1.1.0"
}
},
"arr-flatten": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
"integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
"dev": true
},
"array-bounds": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/array-bounds/-/array-bounds-1.0.1.tgz",
"integrity": "sha512-8wdW3ZGk6UjMPJx/glyEt0sLzzwAE1bhToPsO1W2pbpR2gULyxe3BjSiuJFheP50T/GgODVPz2fuMUmIywt8cQ=="
},
"array-filter": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz",
"integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=",
"dev": true
},
"array-map": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz",
"integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=",
"dev": true
},
"array-normalize": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/array-normalize/-/array-normalize-1.1.3.tgz",
"integrity": "sha1-c/uDf0gW7BkVHTxejYU6RZDOAb0=",
"requires": {
"array-bounds": "1.0.1"
}
},
"array-range": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/array-range/-/array-range-1.0.1.tgz",
"integrity": "sha1-9W5GWRhDYRxqVvd+8C7afFAIm/w="
},
"array-rearrange": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/array-rearrange/-/array-rearrange-2.2.2.tgz",
"integrity": "sha512-UfobP5N12Qm4Qu4fwLDIi2v6+wZsSf6snYSxAMeKhrh37YGnNWZPRmVEKc/2wfms53TLQnzfpG8wCx2Y/6NG1w=="
},
"array-reduce": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz",
"integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=",
"dev": true
},
"array-unique": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
"dev": true
},
"asn1.js": {
"version": "4.10.1",
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
"integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==",
"dev": true,
"requires": {
"bn.js": "4.11.8",
"inherits": "2.0.3",
"minimalistic-assert": "1.0.1"
}
},
"assert": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
"integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
"dev": true,
"requires": {
"util": "0.10.3"
}
},
"astw": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz",
"integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=",
"dev": true,
"requires": {
"acorn": "4.0.13"
},
"dependencies": {
"acorn": {
"version": "4.0.13",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
"integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
"dev": true
}
}
},
"async-each": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
"integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=",
"dev": true
},
"atob-lite": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-1.0.0.tgz",
"integrity": "sha1-uI3KYAaSK5YglPdVaCa6sxxKKWs="
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"dev": true,
"requires": {
"chalk": "1.1.3",
"esutils": "2.0.2",
"js-tokens": "3.0.2"
},
"dependencies": {
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
"dev": true
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"requires": {
"ansi-styles": "2.2.1",
"escape-string-regexp": "1.0.5",
"has-ansi": "2.0.0",
"strip-ansi": "3.0.1",
"supports-color": "2.0.0"
}
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
"dev": true
}
}
},
"babel-core": {
"version": "6.26.3",
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz",
"integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==",
"dev": true,
"requires": {
"babel-code-frame": "6.26.0",
"babel-generator": "6.26.1",
"babel-helpers": "6.24.1",
"babel-messages": "6.23.0",
"babel-register": "6.26.0",
"babel-runtime": "6.26.0",
"babel-template": "6.26.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"convert-source-map": "1.5.1",
"debug": "2.6.9",
"json5": "0.5.1",
"lodash": "4.17.10",
"minimatch": "3.0.4",
"path-is-absolute": "1.0.1",
"private": "0.1.8",
"slash": "1.0.0",
"source-map": "0.5.7"
},
"dependencies": {
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
}
}
},
"babel-generator": {
"version": "6.26.1",
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
"integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
"dev": true,
"requires": {
"babel-messages": "6.23.0",
"babel-runtime": "6.26.0",
"babel-types": "6.26.0",
"detect-indent": "4.0.0",
"jsesc": "1.3.0",
"lodash": "4.17.10",
"source-map": "0.5.7",
"trim-right": "1.0.1"
},
"dependencies": {
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
}
}
},
"babel-helpers": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
"integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
"dev": true,
"requires": {
"babel-runtime": "6.26.0",
"babel-template": "6.26.0"
}
},
"babel-messages": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
"dev": true,
"requires": {
"babel-runtime": "6.26.0"
}
},
"babel-plugin-check-es2015-constants": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz",
"integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=",
"dev": true,
"requires": {
"babel-runtime": "6.26.0"
}
},
"babel-plugin-transform-es2015-arrow-functions": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",
"integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=",
"dev": true,
"requires": {
"babel-runtime": "6.26.0"
}
},
"babel-plugin-transform-es2015-block-scoping": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz",
"integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=",
"dev": true,
"requires": {
"babel-runtime": "6.26.0",
"babel-template": "6.26.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"lodash": "4.17.10"
}
},
"babel-plugin-transform-es2015-template-literals": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz",
"integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=",
"dev": true,
"requires": {
"babel-runtime": "6.26.0"
}
},
"babel-preset-es2020": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/babel-preset-es2020/-/babel-preset-es2020-1.0.2.tgz",
"integrity": "sha1-SJJyypyLH8pZss/EsqL6sC7t63k=",
"dev": true,
"requires": {
"babel-plugin-check-es2015-constants": "6.22.0",
"babel-plugin-transform-es2015-arrow-functions": "6.22.0",
"babel-plugin-transform-es2015-block-scoping": "6.26.0",
"babel-plugin-transform-es2015-template-literals": "6.22.0"
}
},
"babel-register": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
"integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
"dev": true,
"requires": {
"babel-core": "6.26.3",
"babel-runtime": "6.26.0",
"core-js": "2.5.6",
"home-or-tmp": "2.0.0",
"lodash": "4.17.10",
"mkdirp": "0.5.1",
"source-map-support": "0.4.18"
}
},
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"dev": true,
"requires": {
"core-js": "2.5.6",
"regenerator-runtime": "0.11.1"
}
},
"babel-template": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
"dev": true,
"requires": {
"babel-runtime": "6.26.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lodash": "4.17.10"
}
},
"babel-traverse": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
"dev": true,
"requires": {
"babel-code-frame": "6.26.0",
"babel-messages": "6.23.0",
"babel-runtime": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"debug": "2.6.9",
"globals": "9.18.0",
"invariant": "2.2.4",
"lodash": "4.17.10"
}
},
"babel-types": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
"dev": true,
"requires": {
"babel-runtime": "6.26.0",
"esutils": "2.0.2",
"lodash": "4.17.10",
"to-fast-properties": "1.0.3"
}
},
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"barycentric": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/barycentric/-/barycentric-1.0.1.tgz",
"integrity": "sha1-8VYruJGyb0/sRjqC7to2V4AOxog=",
"requires": {
"robust-linear-solve": "1.0.0"
}
},
"base64-js": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
"integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==",
"dev": true
},
"big-rat": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/big-rat/-/big-rat-1.0.4.tgz",
"integrity": "sha1-do0JO7V5MN0Y7Vdcf8on3FORreo=",
"requires": {
"bit-twiddle": "1.0.2",
"bn.js": "4.11.8",
"double-bits": "1.1.1"
}
},
"binary-extensions": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz",
"integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=",
"dev": true
},
"binary-search-bounds": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/binary-search-bounds/-/binary-search-bounds-1.0.0.tgz",
"integrity": "sha1-MjyjF+PypA9CRMclX1OEpbIHu2k="
},
"bit-twiddle": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bit-twiddle/-/bit-twiddle-1.0.2.tgz",
"integrity": "sha1-DGwfq+KyPRcXPZpht7cJPrnhdp4="
},
"bitmap-sdf": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/bitmap-sdf/-/bitmap-sdf-1.0.3.tgz",
"integrity": "sha512-ojYySSvWTx21cbgntR942zgEgqj38wHctN64vr4vYRFf3GKVmI23YlA94meWGkFslidwLwGCsMy2laJ3g/94Sg==",
"requires": {
"clamp": "1.0.1"
}
},
"bl": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
"requires": {
"readable-stream": "2.3.6",
"safe-buffer": "5.1.2"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.2",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "5.1.2"
}
}
}
},
"bn.js": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA=="
},
"bole": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/bole/-/bole-2.0.0.tgz",
"integrity": "sha1-2KocaQRnv7T+Ebh0rLLoOH44JhU=",
"dev": true,
"requires": {
"core-util-is": "1.0.2",
"individual": "3.0.0",
"json-stringify-safe": "5.0.1"
}
},
"boundary-cells": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/boundary-cells/-/boundary-cells-2.0.1.tgz",
"integrity": "sha1-6QWo0UGc9Hyza+Pb9SXbXiTeAEI=",
"requires": {
"tape": "4.9.0"
}
},
"box-intersect": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/box-intersect/-/box-intersect-1.0.1.tgz",
"integrity": "sha1-tyilnj8aPHPCJJM8JmC5J6oTeQI=",
"requires": {
"bit-twiddle": "1.0.2",
"typedarray-pool": "1.1.0"
}
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
"braces": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
"integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
"dev": true,
"requires": {
"expand-range": "1.8.2",
"preserve": "0.2.0",
"repeat-element": "1.1.2"
}
},
"brfs": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/brfs/-/brfs-1.6.1.tgz",
"integrity": "sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ==",
"requires": {
"quote-stream": "1.0.2",
"resolve": "1.5.0",
"static-module": "2.2.5",
"through2": "2.0.3"
},
"dependencies": {
"duplexer2": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
"integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
"requires": {
"readable-stream": "2.3.6"
}
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"object-inspect": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.4.1.tgz",
"integrity": "sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw=="
},
"quote-stream": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz",
"integrity": "sha1-hJY/jJwmuULhU/7rU6rnRlK34LI=",
"requires": {
"buffer-equal": "0.0.1",
"minimist": "1.2.0",
"through2": "2.0.3"
}
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.2",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"static-module": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/static-module/-/static-module-2.2.5.tgz",
"integrity": "sha512-D8vv82E/Kpmz3TXHKG8PPsCPg+RAX6cbCOyvjM6x04qZtQ47EtJFVwRsdov3n5d6/6ynrOY9XB4JkaZwB2xoRQ==",
"requires": {
"concat-stream": "1.6.2",
"convert-source-map": "1.5.1",
"duplexer2": "0.1.4",
"escodegen": "1.9.1",
"falafel": "2.1.0",
"has": "1.0.1",
"magic-string": "0.22.5",
"merge-source-map": "1.0.4",
"object-inspect": "1.4.1",
"quote-stream": "1.0.2",
"readable-stream": "2.3.6",
"shallow-copy": "0.0.1",
"static-eval": "2.0.0",
"through2": "2.0.3"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "5.1.2"
}
},
"through2": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
"integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
"requires": {
"readable-stream": "2.3.6",
"xtend": "4.0.1"
}
}
}
},
"brorand": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
"dev": true
},
"browser-pack": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz",
"integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==",
"dev": true,
"requires": {
"JSONStream": "1.3.2",
"combine-source-map": "0.8.0",
"defined": "1.0.0",
"safe-buffer": "5.1.2",
"through2": "2.0.3",
"umd": "3.0.3"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.2",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "5.1.2"
}
},
"through2": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
"integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
"dev": true,
"requires": {
"readable-stream": "2.3.6",
"xtend": "4.0.1"
}
}
}
},
"browser-resolve": {
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz",
"integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=",
"dev": true,
"requires": {
"resolve": "1.1.7"
},
"dependencies": {
"resolve": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
"integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
"dev": true
}
}
},
"browserify": {
"version": "16.2.2",
"resolved": "https://registry.npmjs.org/browserify/-/browserify-16.2.2.tgz",
"integrity": "sha512-fMES05wq1Oukts6ksGUU2TMVHHp06LyQt0SIwbXIHm7waSrQmNBZePsU0iM/4f94zbvb/wHma+D1YrdzWYnF/A==",
"dev": true,
"requires": {
"JSONStream": "1.3.2",
"assert": "1.4.1",
"browser-pack": "6.1.0",
"browser-resolve": "1.11.2",
"browserify-zlib": "0.2.0",
"buffer": "5.1.0",
"cached-path-relative": "1.0.1",
"concat-stream": "1.6.2",
"console-browserify": "1.1.0",
"constants-browserify": "1.0.0",
"crypto-browserify": "3.12.0",
"defined": "1.0.0",
"deps-sort": "2.0.0",
"domain-browser": "1.2.0",
"duplexer2": "0.1.4",
"events": "2.0.0",
"glob": "7.1.2",
"has": "1.0.1",
"htmlescape": "1.1.1",
"https-browserify": "1.0.0",
"inherits": "2.0.3",
"insert-module-globals": "7.1.0",
"labeled-stream-splicer": "2.0.1",
"mkdirp": "0.5.1",
"module-deps": "6.1.0",
"os-browserify": "0.3.0",
"parents": "1.0.1",
"path-browserify": "0.0.0",
"process": "0.11.10",
"punycode": "1.4.1",
"querystring-es3": "0.2.1",
"read-only-stream": "2.0.0",
"readable-stream": "2.3.6",
"resolve": "1.5.0",
"shasum": "1.0.2",
"shell-quote": "1.6.1",
"stream-browserify": "2.0.1",
"stream-http": "2.8.2",
"string_decoder": "1.1.1",
"subarg": "1.0.0",
"syntax-error": "1.4.0",
"through2": "2.0.3",
"timers-browserify": "1.4.2",
"tty-browserify": "0.0.1",
"url": "0.11.0",
"util": "0.10.3",
"vm-browserify": "1.0.1",
"xtend": "4.0.1"
},
"dependencies": {
"duplexer2": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
"integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
"dev": true,
"requires": {
"readable-stream": "2.3.6"
}
},
"events": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/events/-/events-2.0.0.tgz",
"integrity": "sha512-r/M5YkNg9zwI8QbSf7tsDWWJvO3PGwZXyG7GpFAxtMASnHL2eblFd7iHiGPtyGKKFPZ59S63NeX10Ws6WqGDcg==",
"dev": true
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.2",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "5.1.2"
}
},
"through2": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
"integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
"dev": true,
"requires": {
"readable-stream": "2.3.6",
"xtend": "4.0.1"
}
}
}
},
"browserify-aes": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
"integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
"dev": true,
"requires": {
"buffer-xor": "1.0.3",
"cipher-base": "1.0.4",
"create-hash": "1.2.0",
"evp_bytestokey": "1.0.3",
"inherits": "2.0.3",
"safe-buffer": "5.1.2"
}
},
"browserify-cipher": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
"integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
"dev": true,
"requires": {
"browserify-aes": "1.2.0",
"browserify-des": "1.0.1",
"evp_bytestokey": "1.0.3"
}
},
"browserify-des": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz",
"integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==",
"dev": true,
"requires": {
"cipher-base": "1.0.4",
"des.js": "1.0.0",
"inherits": "2.0.3"
}
},
"browserify-package-json": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/browserify-package-json/-/browserify-package-json-1.0.1.tgz",
"integrity": "sha1-mN3oqlxWH9bT/km7qhArdLOW/eo="
},
"browserify-rsa": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
"integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
"dev": true,
"requires": {
"bn.js": "4.11.8",
"randombytes": "2.0.6"
}
},
"browserify-sign": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
"integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=",
"dev": true,
"requires": {
"bn.js": "4.11.8",
"browserify-rsa": "4.0.1",
"create-hash": "1.2.0",
"create-hmac": "1.1.7",
"elliptic": "6.4.0",
"inherits": "2.0.3",
"parse-asn1": "5.1.1"
}
},
"browserify-zlib": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
"integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
"dev": true,
"requires": {
"pako": "1.0.6"
}
},
"buble": {
"version": "0.19.3",
"resolved": "https://registry.npmjs.org/buble/-/buble-0.19.3.tgz",
"integrity": "sha512-3B0Lcy2u6x6km0BqTz/FS3UnrOJlnIlBWsyjvtqzdtmWkqiS0+Sg4hc6L9Mmm63hZKTACpYS9vUeIoKSi1vcrQ==",
"requires": {
"acorn": "5.5.3",
"acorn-dynamic-import": "3.0.0",
"acorn-jsx": "4.1.1",
"chalk": "2.4.1",
"magic-string": "0.22.5",
"minimist": "1.2.0",
"os-homedir": "1.0.2",
"vlq": "1.0.0"
}
},
"bubleify": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/bubleify/-/bubleify-1.2.0.tgz",
"integrity": "sha512-SJnUsR+f8WeDw0K2l1S+VuYI33Cu5Gfghe5jTow/fpJueNtnwyoECyfCGsDuFoQt4QGhjpV3LYPpN0hxy90LgA==",
"requires": {
"buble": "0.19.3"
}
},
"budo": {
"version": "11.2.2",
"resolved": "https://registry.npmjs.org/budo/-/budo-11.2.2.tgz",
"integrity": "sha512-WIYwB1NOG/v+fda5K6V0eGwmRhUiHpLrINCsj8MwvzFQU+9vqkO1gpGqzyTZos55Mst00V77WogRiiOc+RJy+g==",
"dev": true,
"requires": {
"bole": "2.0.0",
"browserify": "16.2.2",
"chokidar": "1.7.0",
"connect-pushstate": "1.1.0",
"escape-html": "1.0.3",
"events": "1.1.1",
"garnish": "5.2.0",
"get-ports": "1.0.3",
"inject-lr-script": "2.1.0",
"internal-ip": "3.0.1",
"micromatch": "2.3.11",
"on-finished": "2.3.0",
"on-headers": "1.0.1",
"once": "1.4.0",
"opn": "3.0.3",
"path-is-absolute": "1.0.1",
"pem": "1.12.5",
"reload-css": "1.0.2",
"resolve": "1.5.0",
"serve-static": "1.13.2",
"simple-html-index": "1.5.0",
"stacked": "1.1.1",
"stdout-stream": "1.4.0",
"strip-ansi": "3.0.1",
"subarg": "1.0.0",
"term-color": "1.0.1",
"url-trim": "1.0.0",
"watchify-middleware": "1.8.0",
"ws": "1.1.5",
"xtend": "4.0.1"
}
},
"buffer": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.1.0.tgz",
"integrity": "sha512-YkIRgwsZwJWTnyQrsBTWefizHh+8GYj3kbL1BTiAQ/9pwpino0G7B2gp5tx/FUBqUlvtxV85KNR3mwfAtv15Yw==",
"dev": true,
"requires": {
"base64-js": "1.3.0",
"ieee754": "1.1.11"
}
},
"buffer-equal": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz",
"integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs="
},
"buffer-from": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz",
"integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA=="
},
"buffer-xor": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
"dev": true
},
"builtin-status-codes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
"integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
"dev": true
},
"cached-path-relative": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz",
"integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=",
"dev": true
},
"call-matcher": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/call-matcher/-/call-matcher-1.0.1.tgz",
"integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=",
"requires": {
"core-js": "2.5.6",
"deep-equal": "1.0.1",
"espurify": "1.8.0",
"estraverse": "4.2.0"
}
},
"camelcase": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
"integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk="
},
"canvas-fit": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/canvas-fit/-/canvas-fit-1.5.0.tgz",
"integrity": "sha1-rhO+Zq3kL1vg5IfjRfzjCl5bXl8=",
"requires": {
"element-size": "1.1.1"
}
},
"cardinal": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/cardinal/-/cardinal-0.4.4.tgz",
"integrity": "sha1-ylu2iltRG5D+k7ms6km97lwyv+I=",
"requires": {
"ansicolors": "0.2.1",
"redeyed": "0.4.4"
}
},
"cdt2d": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/cdt2d/-/cdt2d-1.0.0.tgz",
"integrity": "sha1-TyEkNLzWe9s9aLj+9KzcLFRBUUE=",
"requires": {
"binary-search-bounds": "2.0.4",
"robust-in-sphere": "1.1.3",
"robust-orientation": "1.1.3"
},
"dependencies": {
"binary-search-bounds": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/binary-search-bounds/-/binary-search-bounds-2.0.4.tgz",
"integrity": "sha512-2hg5kgdKql5ClF2ErBcSx0U5bnl5hgS4v7wMnLFodyR47yMtj2w+UAZB+0CiqyHct2q543i7Bi4/aMIegorCCg=="
}
}
},
"cell-orientation": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cell-orientation/-/cell-orientation-1.0.1.tgz",
"integrity": "sha1-tQStlqZq0obZ7dmFoiU9A7gNKFA="
},
"center-align": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
"integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
"requires": {
"align-text": "0.1.4",
"lazy-cache": "1.0.4"
}
},
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "3.2.1",
"escape-string-regexp": "1.0.5",
"supports-color": "5.4.0"
}
},
"charenc": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=",
"dev": true
},
"chokidar": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
"integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=",
"dev": true,
"requires": {
"anymatch": "1.3.2",
"async-each": "1.0.1",
"fsevents": "1.2.4",
"glob-parent": "2.0.0",
"inherits": "2.0.3",
"is-binary-path": "1.0.1",
"is-glob": "2.0.1",
"path-is-absolute": "1.0.1",
"readdirp": "2.1.0"
}
},
"cipher-base": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
"integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
"dev": true,
"requires": {
"inherits": "2.0.3",
"safe-buffer": "5.1.2"
}
},
"circumcenter": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/circumcenter/-/circumcenter-1.0.0.tgz",
"integrity": "sha1-INeqE7F/usUvUtpPVMasi5Bu5Sk=",
"requires": {
"dup": "1.0.0",
"robust-linear-solve": "1.0.0"
}
},
"circumradius": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/circumradius/-/circumradius-1.0.0.tgz",
"integrity": "sha1-cGxEfj5VzR7T0RvRM+N8JSzDBbU=",
"requires": {
"circumcenter": "1.0.0"
}
},
"clamp": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz",
"integrity": "sha1-ZqDmQBGBbjcZaCj9yMjBRzEshjQ="
},
"clean-pslg": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/clean-pslg/-/clean-pslg-1.1.2.tgz",
"integrity": "sha1-vTXHRgt+irWp92Gl7VF5aqPIbBE=",
"requires": {
"big-rat": "1.0.4",
"box-intersect": "1.0.1",
"nextafter": "1.0.0",
"rat-vec": "1.1.1",
"robust-segment-intersect": "1.0.1",
"union-find": "1.0.2",
"uniq": "1.0.1"
}
},
"cliui": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
"requires": {
"center-align": "0.1.3",
"right-align": "0.1.3",
"wordwrap": "0.0.2"
},
"dependencies": {
"wordwrap": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8="
}
}
},
"color-alpha": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/color-alpha/-/color-alpha-1.0.3.tgz",
"integrity": "sha512-ap5UCPpnpsSQu09ccl/5cNQDJlSFvkuXHMBY1+1vu6iKj6H9zw7Sz852snsETFsrYlPUnvTByCFAnYVynKJb9A==",
"requires": {
"color-parse": "1.3.5"
}
},
"color-convert": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz",
"integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==",
"requires": {
"color-name": "1.1.3"
}
},
"color-id": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/color-id/-/color-id-1.1.0.tgz",
"integrity": "sha512-2iRtAn6dC/6/G7bBIo0uupVrIne1NsQJvJxZOBCzQOfk7jRq97feaDZ3RdzuHakRXXnHGNwglto3pqtRx1sX0g==",
"requires": {
"clamp": "1.0.1"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"color-normalize": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/color-normalize/-/color-normalize-1.0.3.tgz",
"integrity": "sha512-bUyyoiyeJSm24u+y5ePwVssNg9zACjHKHUS0thYZEmCafrTg4RX1b43V6M141V2EdlaBoS5OV3VvyAXxdup+YA==",
"requires": {
"clamp": "1.0.1",
"color-rgba": "2.0.0",
"dtype": "2.0.0"
}
},
"color-parse": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/color-parse/-/color-parse-1.3.5.tgz",
"integrity": "sha1-TIEPcugI5Pc7Y/cqzXjaU4pRVWQ=",
"requires": {
"color-name": "1.1.3",
"defined": "1.0.0",
"is-plain-obj": "1.1.0"
}
},
"color-rgba": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/color-rgba/-/color-rgba-2.0.0.tgz",
"integrity": "sha1-0BURTOPoQ2h5XJ1t3+9Vb5gXOcU=",
"requires": {
"clamp": "1.0.1",
"color-parse": "1.3.5",
"color-space": "1.16.0"
}
},
"color-space": {
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/color-space/-/color-space-1.16.0.tgz",
"integrity": "sha512-A6WMiFzunQ8KEPFmj02OnnoUnqhmSaHaZ/0LVFcPTdlvm8+3aMJ5x1HRHy3bDHPkovkf4sS0f4wsVvwk71fKkg==",
"requires": {
"hsluv": "0.0.3",
"mumath": "3.3.4"
}
},
"colormap": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/colormap/-/colormap-2.3.0.tgz",
"integrity": "sha512-Mkk6mQUMbCleXEeStFm2xLwv5zbRakZMUFB1T1+iNEv58VKBByfPwYIjMQDwSRmXNM1gvo5y3WTYAhmdMn/rbg==",
"requires": {
"lerp": "1.0.3"
}
},
"colors": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz",
"integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w="
},
"combine-source-map": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz",
"integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=",
"dev": true,
"requires": {
"convert-source-map": "1.1.3",
"inline-source-map": "0.6.2",
"lodash.memoize": "3.0.4",
"source-map": "0.5.7"
},
"dependencies": {
"convert-source-map": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz",
"integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=",
"dev": true
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
}
}
},
"commander": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.1.0.tgz",
"integrity": "sha1-0SG7roYNmZKj1Re6lvVliOR8Z4E="
},
"compare-angle": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/compare-angle/-/compare-angle-1.0.1.tgz",
"integrity": "sha1-pOtjQW6jx0f8a9bItjZotN5PoSk=",
"requires": {
"robust-orientation": "1.1.3",
"robust-product": "1.0.0",
"robust-sum": "1.0.0",
"signum": "0.0.0",
"two-sum": "1.0.0"
}
},
"compare-cell": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/compare-cell/-/compare-cell-1.0.0.tgz",
"integrity": "sha1-qetwj24OQa73qlZrEw8ZaNyeGqo="
},
"compare-oriented-cell": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/compare-oriented-cell/-/compare-oriented-cell-1.0.1.tgz",
"integrity": "sha1-ahSf7vnfxPj8YjWOUd1C7/u9w54=",
"requires": {
"cell-orientation": "1.0.1",
"compare-cell": "1.0.0"
}
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"concat-stream": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
"requires": {
"buffer-from": "1.0.0",
"inherits": "2.0.3",
"readable-stream": "2.3.6",
"typedarray": "0.0.6"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.2",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "5.1.2"
}
}
}
},
"connect-pushstate": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/connect-pushstate/-/connect-pushstate-1.1.0.tgz",
"integrity": "sha1-vKsiQnHEOWBKD7D2FMCl9WPojiQ=",
"dev": true
},
"console-browserify": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
"integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
"dev": true,
"requires": {
"date-now": "0.1.4"
}
},
"constants-browserify": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
"integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
"dev": true
},
"convert-source-map": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz",
"integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU="
},
"convex-hull": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/convex-hull/-/convex-hull-1.0.3.tgz",
"integrity": "sha1-IKOqbOh/St6i/30XlxyfwcZ+H/8=",
"requires": {
"affine-hull": "1.0.0",
"incremental-convex-hull": "1.0.1",
"monotone-convex-hull-2d": "1.0.1"
}
},
"core-js": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz",
"integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ=="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"country-regex": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/country-regex/-/country-regex-1.1.0.tgz",
"integrity": "sha1-UcMz3N8Sknt+XuucEKyBEqYSCJY="
},
"create-ecdh": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz",
"integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==",
"dev": true,
"requires": {
"bn.js": "4.11.8",
"elliptic": "6.4.0"
}
},
"create-hash": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
"dev": true,
"requires": {
"cipher-base": "1.0.4",
"inherits": "2.0.3",
"md5.js": "1.3.4",
"ripemd160": "2.0.2",
"sha.js": "2.4.11"
}
},
"create-hmac": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
"dev": true,
"requires": {
"cipher-base": "1.0.4",
"create-hash": "1.2.0",
"inherits": "2.0.3",
"ripemd160": "2.0.2",
"safe-buffer": "5.1.2",
"sha.js": "2.4.11"
}
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"dev": true,
"requires": {
"nice-try": "1.0.4",
"path-key": "2.0.1",
"semver": "5.5.0",
"shebang-command": "1.2.0",
"which": "1.3.0"
}
},
"crypt": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=",
"dev": true
},
"crypto-browserify": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
"integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
"dev": true,
"requires": {
"browserify-cipher": "1.0.1",
"browserify-sign": "4.0.4",
"create-ecdh": "4.0.3",
"create-hash": "1.2.0",
"create-hmac": "1.1.7",
"diffie-hellman": "5.0.3",
"inherits": "2.0.3",
"pbkdf2": "3.0.16",
"public-encrypt": "4.0.2",
"randombytes": "2.0.6",
"randomfill": "1.0.4"
}
},
"csscolorparser": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/csscolorparser/-/csscolorparser-1.0.3.tgz",
"integrity": "sha1-s085HupNqPPpgjHizNjfnAQfFxs="
},
"cubic-hermite": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/cubic-hermite/-/cubic-hermite-1.0.0.tgz",
"integrity": "sha1-hOOy8nKzFFToOTuZu2rtRRaMFOU="
},
"cwise": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/cwise/-/cwise-1.0.10.tgz",
"integrity": "sha1-JO7mBy69/WuMb12tsXCQtkmxK+8=",
"requires": {
"cwise-compiler": "1.1.3",
"cwise-parser": "1.0.3",
"static-module": "1.5.0",
"uglify-js": "2.8.29"
}
},
"cwise-compiler": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz",
"integrity": "sha1-9NZnQQ6FDToxOn0tt7HlBbsDTMU=",
"requires": {
"uniq": "1.0.1"
}
},
"cwise-parser": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/cwise-parser/-/cwise-parser-1.0.3.tgz",
"integrity": "sha1-jkk8F9VPl8sDCp6YVLyGyd+zVP4=",
"requires": {
"esprima": "1.2.5",
"uniq": "1.0.1"
},
"dependencies": {
"esprima": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz",
"integrity": "sha1-CZNQL+r2aBODJXVvMPmlH+7sEek="
}
}
},
"d": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"requires": {
"es5-ext": "0.10.42"
}
},
"d3": {
"version": "3.5.17",
"resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz",
"integrity": "sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g="
},
"d3-array": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.1.tgz",
"integrity": "sha512-CyINJQ0SOUHojDdFDH4JEM0552vCR1utGyLHegJHyYH0JyCpSeTPxi4OBqHMA2jJZq4NH782LtaJWBImqI/HBw=="
},
"d3-collection": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.4.tgz",
"integrity": "sha1-NC39EoN8kJdPM/HMCnha6lcNzcI="
},
"d3-color": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.2.0.tgz",
"integrity": "sha512-dmL9Zr/v39aSSMnLOTd58in2RbregCg4UtGyUArvEKTTN6S3HKEy+ziBWVYo9PTzRyVW+pUBHUtRKz0HYX+SQg=="
},
"d3-dispatch": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.3.tgz",
"integrity": "sha1-RuFJHqqbWMNY/OW+TovtYm54cfg="
},
"d3-force": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.1.0.tgz",
"integrity": "sha512-2HVQz3/VCQs0QeRNZTYb7GxoUCeb6bOzMp/cGcLa87awY9ZsPvXOGeZm0iaGBjXic6I1ysKwMn+g+5jSAdzwcg==",
"requires": {
"d3-collection": "1.0.4",
"d3-dispatch": "1.0.3",
"d3-quadtree": "1.0.3",
"d3-timer": "1.0.7"
}
},
"d3-interpolate": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.2.0.tgz",
"integrity": "sha512-zLvTk8CREPFfc/2XglPQriAsXkzoRDAyBzndtKJWrZmHw7kmOWHNS11e40kPTd/oGk8P5mFJW5uBbcFQ+ybxyA==",
"requires": {
"d3-color": "1.2.0"
}
},
"d3-quadtree": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.3.tgz",
"integrity": "sha1-rHmH4+I/6AWpkPKOG1DTj8uCJDg="
},
"d3-timer": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.7.tgz",
"integrity": "sha512-vMZXR88XujmG/L5oB96NNKH5lCWwiLM/S2HyyAQLcjWJCloK5shxta4CwOFYLZoY3AWX73v8Lgv4cCAdWtRmOA=="
},
"date-now": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
"dev": true
},
"debounce": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/debounce/-/debounce-1.1.0.tgz",
"integrity": "sha512-ZQVKfRVlwRfD150ndzEK8M90ABT+Y/JQKs4Y7U4MXdpuoUkkrr4DwKbVux3YjylA5bUMUj0Nc3pMxPJX6N2QQQ==",
"dev": true
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
"deep-equal": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
"integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
},
"deep-is": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
},
"default-gateway": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.1.tgz",
"integrity": "sha512-3UOsgF6oWP0js8hoDp1tcrYYndTznfl8aWr+ziU1z/p9Uv+a2UztSegX/3wwdxaM4SpPgGe3G//tJJeNEog9Zg==",
"dev": true,
"requires": {
"execa": "0.10.0",
"ip-regex": "2.1.0"
}
},
"define-properties": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
"integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=",
"requires": {
"foreach": "2.0.5",
"object-keys": "1.0.11"
}
},
"defined": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
"integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM="
},
"delaunay-triangulate": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/delaunay-triangulate/-/delaunay-triangulate-1.1.6.tgz",
"integrity": "sha1-W7yiGweBmNS8PHV5ajXLuYwllUw=",
"requires": {
"incremental-convex-hull": "1.0.1",
"uniq": "1.0.1"
}
},
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
"dev": true
},
"deps-sort": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz",
"integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=",
"dev": true,
"requires": {
"JSONStream": "1.3.2",
"shasum": "1.0.2",
"subarg": "1.0.0",
"through2": "2.0.3"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.2",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "5.1.2"
}
},
"through2": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
"integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
"dev": true,
"requires": {
"readable-stream": "2.3.6",
"xtend": "4.0.1"
}
}
}
},
"des.js": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
"integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=",
"dev": true,
"requires": {
"inherits": "2.0.3",
"minimalistic-assert": "1.0.1"
}
},
"destroy": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=",
"dev": true
},
"detect-indent": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
"integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
"dev": true,
"requires": {
"repeating": "2.0.1"
}
},
"detective": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/detective/-/detective-5.1.0.tgz",
"integrity": "sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ==",
"dev": true,
"requires": {
"acorn-node": "1.3.0",
"defined": "1.0.0",
"minimist": "1.2.0"
}
},
"diffie-hellman": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
"integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
"dev": true,
"requires": {
"bn.js": "4.11.8",
"miller-rabin": "4.0.1",
"randombytes": "2.0.6"
}
},
"domain-browser": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
"integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
"dev": true
},
"double-bits": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/double-bits/-/double-bits-1.1.1.tgz",
"integrity": "sha1-WKu6RUlNpND6Nrc60RoobJGEscY="
},
"draw-svg-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/draw-svg-path/-/draw-svg-path-1.0.0.tgz",
"integrity": "sha1-bxFtli3TFLmepTTW9Y3WbNvWk3k=",
"requires": {
"abs-svg-path": "0.1.1",
"normalize-svg-path": "0.1.0"
}
},
"dtype": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/dtype/-/dtype-2.0.0.tgz",
"integrity": "sha1-zQUjI84GFETs0uj1dI9popvihDQ="
},
"dup": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/dup/-/dup-1.0.0.tgz",
"integrity": "sha1-UfxaxoX4GWRp3wuQXpNLIK9bQCk="
},
"duplexer2": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
"integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=",
"requires": {
"readable-stream": "1.1.14"
},
"dependencies": {
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "0.0.1",
"string_decoder": "0.10.31"
}
}
}
},
"duplexify": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz",
"integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==",
"requires": {
"end-of-stream": "1.4.1",
"inherits": "2.0.3",
"readable-stream": "2.3.6",
"stream-shift": "1.0.0"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.2",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "5.1.2"
}
}
}
},
"earcut": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/earcut/-/earcut-2.1.3.tgz",
"integrity": "sha512-AxdCdWUk1zzK/NuZ7e1ljj6IGC+VAdC3Qb7QQDsXpfNrc5IM8tL9nNXUmEGE6jRHTfZ10zhzRhtDmWVsR5pd3A=="
},
"edges-to-adjacency-list": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/edges-to-adjacency-list/-/edges-to-adjacency-list-1.0.0.tgz",
"integrity": "sha1-wUbS4ISt37p0pRKTxuAZmkn3V/E=",
"requires": {
"uniq": "1.0.1"
}
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
"dev": true
},
"element-size": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/element-size/-/element-size-1.1.1.tgz",
"integrity": "sha1-ZOXxWdlxIWMYRby67K8nnDm1404="
},
"elliptic": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",
"integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",
"dev": true,
"requires": {
"bn.js": "4.11.8",
"brorand": "1.1.0",
"hash.js": "1.1.3",
"hmac-drbg": "1.0.1",
"inherits": "2.0.3",
"minimalistic-assert": "1.0.1",
"minimalistic-crypto-utils": "1.0.1"
}
},
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment