-
Notifications
You must be signed in to change notification settings - Fork 122
/
Copy pathplotly-basic.min.js
24 lines (24 loc) · 974 KB
/
plotly-basic.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
* plotly.js (basic - minified) v2.7.0
* Copyright 2012-2021, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Plotly=e()}}((function(){return function e(t,r,n){function a(o,l){if(!r[o]){if(!t[o]){var s="function"==typeof require&&require;if(!l&&s)return s(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=r[o]={exports:{}};t[o][0].call(u.exports,(function(e){return a(t[o][1][e]||e)}),u,u.exports,e,t,r,n)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}({1:[function(e,t,r){"use strict";var n=e("../src/lib"),a={"X,X div":'direction:ltr;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 .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","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:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:#fff;","X .select-outline-2":"stroke:#000;stroke-dasharray:2px 2px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.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");n.addStyleRule(o,a[i])}},{"../src/lib":232}],2:[function(e,t,r){"use strict";t.exports=e("../src/transforms/aggregate")},{"../src/transforms/aggregate":386}],3:[function(e,t,r){"use strict";t.exports=e("../src/traces/bar")},{"../src/traces/bar":336}],4:[function(e,t,r){"use strict";t.exports=e("../src/components/calendars")},{"../src/components/calendars":100}],5:[function(e,t,r){"use strict";t.exports=e("../src/core")},{"../src/core":214}],6:[function(e,t,r){"use strict";t.exports=e("../src/transforms/filter")},{"../src/transforms/filter":387}],7:[function(e,t,r){"use strict";t.exports=e("../src/transforms/groupby")},{"../src/transforms/groupby":388}],8:[function(e,t,r){"use strict";var n=e("./core");n.register([e("./bar"),e("./pie"),e("./aggregate"),e("./filter"),e("./groupby"),e("./sort"),e("./calendars")]),t.exports=n},{"./aggregate":2,"./bar":3,"./calendars":4,"./core":5,"./filter":6,"./groupby":7,"./pie":9,"./sort":10}],9:[function(e,t,r){"use strict";t.exports=e("../src/traces/pie")},{"../src/traces/pie":351}],10:[function(e,t,r){"use strict";t.exports=e("../src/transforms/sort")},{"../src/transforms/sort":390}],11:[function(e,t,r){(function(){var e={version:"3.8.0"},r=[].slice,n=function(e){return r.call(e)},a=self.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{n(a.documentElement.childNodes)[0].nodeType}catch(e){n=function(e){for(var t=e.length,r=new Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var l=this.Element.prototype,s=l.setAttribute,c=l.setAttributeNS,u=this.CSSStyleDeclaration.prototype,d=u.setProperty;l.setAttribute=function(e,t){s.call(this,e,t+"")},l.setAttributeNS=function(e,t,r){c.call(this,e,t,r+"")},u.setProperty=function(e,t,r){d.call(this,e,t+"",r)}}function f(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function p(e){return null===e?NaN:+e}function h(e){return!isNaN(e)}function m(e){return{left:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n<a;){var i=n+a>>>1;e(t[i],r)<0?n=i+1:a=i}return n},right:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n<a;){var i=n+a>>>1;e(t[i],r)>0?a=i:n=i+1}return n}}}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 r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a<i;)if(null!=(n=e[a])&&n>=n){r=n;break}for(;++a<i;)null!=(n=e[a])&&r>n&&(r=n)}else{for(;++a<i;)if(null!=(n=t.call(e,e[a],a))&&n>=n){r=n;break}for(;++a<i;)null!=(n=t.call(e,e[a],a))&&r>n&&(r=n)}return r},e.max=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a<i;)if(null!=(n=e[a])&&n>=n){r=n;break}for(;++a<i;)null!=(n=e[a])&&n>r&&(r=n)}else{for(;++a<i;)if(null!=(n=t.call(e,e[a],a))&&n>=n){r=n;break}for(;++a<i;)null!=(n=t.call(e,e[a],a))&&n>r&&(r=n)}return r},e.extent=function(e,t){var r,n,a,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(n=e[i])&&n>=n){r=a=n;break}for(;++i<o;)null!=(n=e[i])&&(r>n&&(r=n),a<n&&(a=n))}else{for(;++i<o;)if(null!=(n=t.call(e,e[i],i))&&n>=n){r=a=n;break}for(;++i<o;)null!=(n=t.call(e,e[i],i))&&(r>n&&(r=n),a<n&&(a=n))}return[r,a]},e.sum=function(e,t){var r,n=0,a=e.length,i=-1;if(1===arguments.length)for(;++i<a;)h(r=+e[i])&&(n+=r);else for(;++i<a;)h(r=+t.call(e,e[i],i))&&(n+=r);return n},e.mean=function(e,t){var r,n=0,a=e.length,i=-1,o=a;if(1===arguments.length)for(;++i<a;)h(r=p(e[i]))?n+=r:--o;else for(;++i<a;)h(r=p(t.call(e,e[i],i)))?n+=r:--o;if(o)return n/o},e.quantile=function(e,t){var r=(e.length-1)*t+1,n=Math.floor(r),a=+e[n-1],i=r-n;return i?a+i*(e[n]-a):a},e.median=function(t,r){var n,a=[],i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)h(n=p(t[o]))&&a.push(n);else for(;++o<i;)h(n=p(r.call(t,t[o],o)))&&a.push(n);if(a.length)return e.quantile(a.sort(f),.5)},e.variance=function(e,t){var r,n,a=e.length,i=0,o=0,l=-1,s=0;if(1===arguments.length)for(;++l<a;)h(r=p(e[l]))&&(o+=(n=r-i)*(r-(i+=n/++s)));else for(;++l<a;)h(r=p(t.call(e,e[l],l)))&&(o+=(n=r-i)*(r-(i+=n/++s)));if(s>1)return o/(s-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t?Math.sqrt(t):t};var g=m(f);function v(e){return e.length}e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return m(1===e.length?function(t,r){return f(e(t),r)}:e)},e.shuffle=function(e,t,r){(i=arguments.length)<3&&(r=e.length,i<2&&(t=0));for(var n,a,i=r-t;i;)a=Math.random()*i--|0,n=e[i+t],e[i+t]=e[a+t],e[a+t]=n;return e},e.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},e.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],a=new Array(r<0?0:r);t<r;)a[t]=[n,n=e[++t]];return a},e.transpose=function(t){if(!(i=t.length))return[];for(var r=-1,n=e.min(t,v),a=new Array(n);++r<n;)for(var i,o=-1,l=a[r]=new Array(i);++o<i;)l[o]=t[o][r];return a},e.zip=function(){return e.transpose(arguments)},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t},e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},e.merge=function(e){for(var t,r,n,a=e.length,i=-1,o=0;++i<a;)o+=e[i].length;for(r=new Array(o);--a>=0;)for(t=(n=e[a]).length;--t>=0;)r[--o]=n[t];return r};var y=Math.abs;function x(e){for(var t=1;e*t%1;)t*=10;return t}function b(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function _(){this._=Object.create(null)}e.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r==1/0)throw new Error("infinite range");var n,a=[],i=x(y(r)),o=-1;if(e*=i,t*=i,(r*=i)<0)for(;(n=e+r*++o)>t;)a.push(n/i);else for(;(n=e+r*++o)<t;)a.push(n/i);return a},e.map=function(e,t){var r=new _;if(e instanceof _)e.forEach((function(e,t){r.set(e,t)}));else if(Array.isArray(e)){var n,a=-1,i=e.length;if(1===arguments.length)for(;++a<i;)r.set(a,e[a]);else for(;++a<i;)r.set(t.call(e,n=e[a],a),n)}else for(var o in e)r.set(o,e[o]);return r};function w(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function T(e){return"\0"===(e+="")[0]?e.slice(1):e}function M(e){return w(e)in this._}function k(e){return(e=w(e))in this._&&delete this._[e]}function A(){var e=[];for(var t in this._)e.push(T(t));return e}function L(){var e=0;for(var t in this._)++e;return e}function S(){for(var e in this._)return!1;return!0}function D(){this._=Object.create(null)}function C(e){return e}function O(e,t,r){return function(){var n=r.apply(t,arguments);return n===t?e:n}}function P(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,n=I.length;r<n;++r){var a=I[r]+t;if(a in e)return a}}b(_,{has:M,get:function(e){return this._[w(e)]},set:function(e,t){return this._[w(e)]=t},remove:k,keys:A,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:T(t),value:this._[t]});return e},size:L,empty:S,forEach:function(e){for(var t in this._)e.call(this,T(t),this._[t])}}),e.nest=function(){var t,r,n={},a=[],i=[];function o(e,i,l){if(l>=a.length)return r?r.call(n,i):t?i.sort(t):i;for(var s,c,u,d,f=-1,p=i.length,h=a[l++],m=new _;++f<p;)(d=m.get(s=h(c=i[f])))?d.push(c):m.set(s,[c]);return e?(c=e(),u=function(t,r){c.set(t,o(e,r,l))}):(c={},u=function(t,r){c[t]=o(e,r,l)}),m.forEach(u),c}return n.map=function(e,t){return o(t,e,0)},n.entries=function(t){return function e(t,r){if(r>=a.length)return t;var n=[],o=i[r++];return t.forEach((function(t,a){n.push({key:t,values:e(a,r)})})),o?n.sort((function(e,t){return o(e.key,t.key)})):n}(o(e.map,t,0),0)},n.key=function(e){return a.push(e),n},n.sortKeys=function(e){return i[a.length-1]=e,n},n.sortValues=function(e){return t=e,n},n.rollup=function(e){return r=e,n},n},e.set=function(e){var t=new D;if(e)for(var r=0,n=e.length;r<n;++r)t.add(e[r]);return t},b(D,{has:M,add:function(e){return this._[w(e+="")]=!0,e},remove:k,values:A,size:L,empty:S,forEach:function(e){for(var t in this._)e.call(this,T(t))}}),e.behavior={},e.rebind=function(e,t){for(var r,n=1,a=arguments.length;++n<a;)e[r=arguments[n]]=O(e,t,t[r]);return e};var I=["webkit","ms","moz","Moz","o","O"];function R(){}function z(){}function N(e){var t=[],r=new _;function n(){for(var r,n=t,a=-1,i=n.length;++a<i;)(r=n[a].on)&&r.apply(this,arguments);return e}return n.on=function(n,a){var i,o=r.get(n);return arguments.length<2?o&&o.on:(o&&(o.on=null,t=t.slice(0,i=t.indexOf(o)).concat(t.slice(i+1)),r.remove(n)),a&&t.push(r.set(n,{on:a})),e)},n}function F(){e.event.preventDefault()}function E(){for(var t,r=e.event;t=r.sourceEvent;)r=t;return r}function j(t){for(var r=new z,n=0,a=arguments.length;++n<a;)r[arguments[n]]=N(r);return r.of=function(n,a){return function(i){try{var o=i.sourceEvent=e.event;i.target=t,e.event=i,r[i.type].apply(n,a)}finally{e.event=o}}},r}e.dispatch=function(){for(var e=new z,t=-1,r=arguments.length;++t<r;)e[arguments[t]]=N(e);return e},z.prototype.on=function(e,t){var r=e.indexOf("."),n="";if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},e.event=null,e.requote=function(e){return e.replace(H,"\\$&")};var H=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,B={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function Y(e){return B(e,G),e}var V=function(e,t){return t.querySelector(e)},U=function(e,t){return t.querySelectorAll(e)},q=function(e,t){var r=e.matches||e[P(e,"matchesSelector")];return(q=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(V=function(e,t){return Sizzle(e,t)[0]||null},U=Sizzle,q=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var G=e.selection.prototype=[];function Z(e){return"function"==typeof e?e:function(){return V(e,this)}}function W(e){return"function"==typeof e?e:function(){return U(e,this)}}G.select=function(e){var t,r,n,a,i=[];e=Z(e);for(var o=-1,l=this.length;++o<l;){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=-1,c=n.length;++s<c;)(a=n[s])?(t.push(r=e.call(a,a.__data__,s,o)),r&&"__data__"in a&&(r.__data__=a.__data__)):t.push(null)}return Y(i)},G.selectAll=function(e){var t,r,a=[];e=W(e);for(var i=-1,o=this.length;++i<o;)for(var l=this[i],s=-1,c=l.length;++s<c;)(r=l[s])&&(a.push(t=n(e.call(r,r.__data__,s,i))),t.parentNode=r);return Y(a)};var X="http://www.w3.org/1999/xhtml",J={svg:"http://www.w3.org/2000/svg",xhtml:X,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Q(t,r){return t=e.ns.qualify(t),null==r?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof r?t.local?function(){var e=r.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}:function(){var e=r.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}:t.local?function(){this.setAttributeNS(t.space,t.local,r)}:function(){this.setAttribute(t,r)}}function K(e){return e.trim().replace(/\s+/g," ")}function $(t){return new RegExp("(?:^|\\s+)"+e.requote(t)+"(?:\\s+|$)","g")}function ee(e){return(e+"").trim().split(/^|\s+/)}function te(e,t){var r=(e=ee(e).map(re)).length;return"function"==typeof t?function(){for(var n=-1,a=t.apply(this,arguments);++n<r;)e[n](this,a)}:function(){for(var n=-1;++n<r;)e[n](this,t)}}function re(e){var t=$(e);return function(r,n){if(a=r.classList)return n?a.add(e):a.remove(e);var a=r.getAttribute("class")||"";n?(t.lastIndex=0,t.test(a)||r.setAttribute("class",K(a+" "+e))):r.setAttribute("class",K(a.replace(t," ")))}}function ne(e,t,r){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?this.style.removeProperty(e):this.style.setProperty(e,n,r)}:function(){this.style.setProperty(e,t,r)}}function ae(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?delete this[e]:this[e]=r}:function(){this[e]=t}}function ie(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,r=this.namespaceURI;return r===X&&e.documentElement.namespaceURI===X?e.createElement(t):e.createElementNS(r,t)}}function oe(){var e=this.parentNode;e&&e.removeChild(this)}function le(e){return{__data__:e}}function se(e){return function(){return q(this,e)}}function ce(e){return arguments.length||(e=f),function(t,r){return t&&r?e(t.__data__,r.__data__):!t-!r}}function ue(e,t){for(var r=0,n=e.length;r<n;r++)for(var a,i=e[r],o=0,l=i.length;o<l;o++)(a=i[o])&&t(a,o,r);return e}function de(e){return B(e,fe),e}e.ns={prefix:J,qualify:function(e){var t=e.indexOf(":"),r=e;return t>=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),J.hasOwnProperty(r)?{space:J[r],local:e}:e}},G.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=e.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(r in t)this.each(Q(r,t[r]));return this}return this.each(Q(t,r))},G.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=ee(e)).length,a=-1;if(t=r.classList){for(;++a<n;)if(!t.contains(e[a]))return!1}else for(t=r.getAttribute("class");++a<n;)if(!$(e[a]).test(t))return!1;return!0}for(t in e)this.each(te(t,e[t]));return this}return this.each(te(e,t))},G.style=function(e,t,r){var n=arguments.length;if(n<3){if("string"!=typeof e){for(r in n<2&&(t=""),e)this.each(ne(r,e[r],t));return this}if(n<2){var a=this.node();return o(a).getComputedStyle(a,null).getPropertyValue(e)}r=""}return this.each(ne(e,t,r))},G.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(ae(t,e[t]));return this}return this.each(ae(e,t))},G.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},G.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},G.append=function(e){return e=ie(e),this.select((function(){return this.appendChild(e.apply(this,arguments))}))},G.insert=function(e,t){return e=ie(e),t=Z(t),this.select((function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)}))},G.remove=function(){return this.each(oe)},G.data=function(e,t){var r,n,a=-1,i=this.length;if(!arguments.length){for(e=new Array(i=(r=this[0]).length);++a<i;)(n=r[a])&&(e[a]=n.__data__);return e}function o(e,r){var n,a,i,o=e.length,u=r.length,d=Math.min(o,u),f=new Array(u),p=new Array(u),h=new Array(o);if(t){var m,g=new _,v=new Array(o);for(n=-1;++n<o;)(a=e[n])&&(g.has(m=t.call(a,a.__data__,n))?h[n]=a:g.set(m,a),v[n]=m);for(n=-1;++n<u;)(a=g.get(m=t.call(r,i=r[n],n)))?!0!==a&&(f[n]=a,a.__data__=i):p[n]=le(i),g.set(m,!0);for(n=-1;++n<o;)n in v&&!0!==g.get(v[n])&&(h[n]=e[n])}else{for(n=-1;++n<d;)a=e[n],i=r[n],a?(a.__data__=i,f[n]=a):p[n]=le(i);for(;n<u;++n)p[n]=le(r[n]);for(;n<o;++n)h[n]=e[n]}p.update=f,p.parentNode=f.parentNode=h.parentNode=e.parentNode,l.push(p),s.push(f),c.push(h)}var l=de([]),s=Y([]),c=Y([]);if("function"==typeof e)for(;++a<i;)o(r=this[a],e.call(r,r.parentNode.__data__,a));else for(;++a<i;)o(r=this[a],e);return s.enter=function(){return l},s.exit=function(){return c},s},G.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},G.filter=function(e){var t,r,n,a=[];"function"!=typeof e&&(e=se(e));for(var i=0,o=this.length;i<o;i++){a.push(t=[]),t.parentNode=(r=this[i]).parentNode;for(var l=0,s=r.length;l<s;l++)(n=r[l])&&e.call(n,n.__data__,l,i)&&t.push(n)}return Y(a)},G.order=function(){for(var e=-1,t=this.length;++e<t;)for(var r,n=this[e],a=n.length-1,i=n[a];--a>=0;)(r=n[a])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},G.sort=function(e){e=ce.apply(this,arguments);for(var t=-1,r=this.length;++t<r;)this[t].sort(e);return this.order()},G.each=function(e){return ue(this,(function(t,r,n){e.call(t,t.__data__,r,n)}))},G.call=function(e){var t=n(arguments);return e.apply(t[0]=this,t),this},G.empty=function(){return!this.node()},G.node=function(){for(var e=0,t=this.length;e<t;e++)for(var r=this[e],n=0,a=r.length;n<a;n++){var i=r[n];if(i)return i}return null},G.size=function(){var e=0;return ue(this,(function(){++e})),e};var fe=[];function pe(e){var t,r;return function(n,a,i){var o,l=e[i].update,s=l.length;for(i!=r&&(r=i,t=0),a>=t&&(t=a+1);!(o=l[t])&&++t<s;);return o}}function he(t,r,a){var i="__on"+t,o=t.indexOf("."),l=ge;o>0&&(t=t.slice(0,o));var s=me.get(t);function c(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}return s&&(t=s,l=ve),o?r?function(){var e=l(r,n(arguments));c.call(this),this.addEventListener(t,this[i]=e,e.$=a),e._=r}:c:r?R:function(){var r,n=new RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var a in this)if(r=a.match(n)){var i=this[a];this.removeEventListener(r[1],i,i.$),delete this[a]}}}e.selection.enter=de,e.selection.enter.prototype=fe,fe.append=G.append,fe.empty=G.empty,fe.node=G.node,fe.call=G.call,fe.size=G.size,fe.select=function(e){for(var t,r,n,a,i,o=[],l=-1,s=this.length;++l<s;){n=(a=this[l]).update,o.push(t=[]),t.parentNode=a.parentNode;for(var c=-1,u=a.length;++c<u;)(i=a[c])?(t.push(n[c]=r=e.call(a.parentNode,i.__data__,c,l)),r.__data__=i.__data__):t.push(null)}return Y(o)},fe.insert=function(e,t){return arguments.length<2&&(t=pe(this)),G.insert.call(this,e,t)},e.select=function(e){var t;return"string"==typeof e?(t=[V(e,a)]).parentNode=a.documentElement:(t=[e]).parentNode=i(e),Y([t])},e.selectAll=function(e){var t;return"string"==typeof e?(t=n(U(e,a))).parentNode=a.documentElement:(t=n(e)).parentNode=null,Y([t])},G.on=function(e,t,r){var n=arguments.length;if(n<3){if("string"!=typeof e){for(r in n<2&&(t=!1),e)this.each(he(r,e[r],t));return this}if(n<2)return(n=this.node()["__on"+e])&&n._;r=!1}return this.each(he(e,t,r))};var me=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});function ge(t,r){return function(n){var a=e.event;e.event=n,r[0]=this.__data__;try{t.apply(this,r)}finally{e.event=a}}}function ve(e,t){var r=ge(e,t);return function(e){var t=e.relatedTarget;t&&(t===this||8&t.compareDocumentPosition(this))||r.call(this,e)}}a&&me.forEach((function(e){"on"+e in a&&me.remove(e)}));var ye,xe=0;function be(t){var r=".dragsuppress-"+ ++xe,n="click"+r,a=e.select(o(t)).on("touchmove"+r,F).on("dragstart"+r,F).on("selectstart"+r,F);if(null==ye&&(ye=!("onselectstart"in t)&&P(t.style,"userSelect")),ye){var l=i(t).style,s=l[ye];l[ye]="none"}return function(e){if(a.on(r,null),ye&&(l[ye]=s),e){var t=function(){a.on(n,null)};a.on(n,(function(){F(),t()}),!0),setTimeout(t,0)}}}e.mouse=function(e){return we(e,E())};var _e=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function we(t,r){r.changedTouches&&(r=r.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var a=n.createSVGPoint();if(_e<0){var i=o(t);if(i.scrollX||i.scrollY){var l=(n=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();_e=!(l.f||l.e),n.remove()}}return _e?(a.x=r.pageX,a.y=r.pageY):(a.x=r.clientX,a.y=r.clientY),[(a=a.matrixTransform(t.getScreenCTM().inverse())).x,a.y]}var s=t.getBoundingClientRect();return[r.clientX-s.left-t.clientLeft,r.clientY-s.top-t.clientTop]}function Te(){return e.event.changedTouches[0].identifier}e.touch=function(e,t,r){if(arguments.length<3&&(r=t,t=E().changedTouches),t)for(var n,a=0,i=t.length;a<i;++a)if((n=t[a]).identifier===r)return we(e,n)},e.behavior.drag=function(){var t=j(i,"drag","dragstart","dragend"),r=null,n=l(R,e.mouse,o,"mousemove","mouseup"),a=l(Te,e.touch,C,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",a)}function l(n,a,i,o,l){return function(){var s,c=this,u=e.event.target.correspondingElement||e.event.target,d=c.parentNode,f=t.of(c,arguments),p=0,h=n(),m=".drag"+(null==h?"":"-"+h),g=e.select(i(u)).on(o+m,x).on(l+m,b),v=be(u),y=a(d,h);function x(){var e,t,r=a(d,h);r&&(e=r[0]-y[0],t=r[1]-y[1],p|=e|t,y=r,f({type:"drag",x:r[0]+s[0],y:r[1]+s[1],dx:e,dy:t}))}function b(){a(d,h)&&(g.on(o+m,null).on(l+m,null),v(p),f({type:"dragend"}))}s=r?[(s=r.apply(c,arguments)).x-y[0],s.y-y[1]]:[0,0],f({type:"dragstart"})}}return i.origin=function(e){return arguments.length?(r=e,i):r},e.rebind(i,t,"on")},e.touches=function(e,t){return arguments.length<2&&(t=E().touches),t?n(t).map((function(t){var r=we(e,t);return r.identifier=t.identifier,r})):[]};var Me=1e-6,ke=Math.PI,Ae=2*ke,Le=Ae-Me,Se=ke/2,De=ke/180,Ce=180/ke;function Oe(e){return e>1?Se:e<-1?-Se:Math.asin(e)}function Pe(e){return((e=Math.exp(e))+1/e)/2}var Ie=Math.SQRT2;e.interpolateZoom=function(e,t){var r,n,a=e[0],i=e[1],o=e[2],l=t[0],s=t[1],c=t[2],u=l-a,d=s-i,f=u*u+d*d;if(f<1e-12)n=Math.log(c/o)/Ie,r=function(e){return[a+e*u,i+e*d,o*Math.exp(Ie*e*n)]};else{var p=Math.sqrt(f),h=(c*c-o*o+4*f)/(2*o*2*p),m=(c*c-o*o-4*f)/(2*c*2*p),g=Math.log(Math.sqrt(h*h+1)-h),v=Math.log(Math.sqrt(m*m+1)-m);n=(v-g)/Ie,r=function(e){var t,r=e*n,l=Pe(g),s=o/(2*p)*(l*(t=Ie*r+g,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[a+s*u,i+s*d,o*l/Pe(Ie*r+g)]}}return r.duration=1e3*n,r},e.behavior.zoom=function(){var t,r,n,i,l,s,c,u,d,f={x:0,y:0,k:1},p=[960,500],h=Ne,m=250,g=0,v="mousedown.zoom",y="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=j(w,"zoomstart","zoom","zoomend");function w(e){e.on(v,O).on(ze+".zoom",I).on("dblclick.zoom",R).on(b,P)}function T(e){return[(e[0]-f.x)/f.k,(e[1]-f.y)/f.k]}function M(e){f.k=Math.max(h[0],Math.min(h[1],e))}function k(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,n,a,i){t.__chart__={x:f.x,y:f.y,k:f.k},M(Math.pow(2,i)),k(r=n,a),t=e.select(t),m>0&&(t=t.transition().duration(m)),t.call(w.event)}function L(){c&&c.domain(s.range().map((function(e){return(e-f.x)/f.k})).map(s.invert)),d&&d.domain(u.range().map((function(e){return(e-f.y)/f.k})).map(u.invert))}function S(e){g++||e({type:"zoomstart"})}function D(e){L(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function C(e){--g||(e({type:"zoomend"}),r=null)}function O(){var t=this,r=_.of(t,arguments),n=0,a=e.select(o(t)).on(y,s).on(x,c),i=T(e.mouse(t)),l=be(t);function s(){n=1,k(e.mouse(t),i),D(r)}function c(){a.on(y,null).on(x,null),l(n),C(r)}za.call(t),S(r)}function P(){var t,r=this,n=_.of(r,arguments),a={},i=0,o=".zoom-"+e.event.changedTouches[0].identifier,s="touchmove"+o,c="touchend"+o,u=[],d=e.select(r),p=be(r);function h(){var n=e.touches(r);return t=f.k,n.forEach((function(e){e.identifier in a&&(a[e.identifier]=T(e))})),n}function m(){var t=e.event.target;e.select(t).on(s,g).on(c,y),u.push(t);for(var n=e.event.changedTouches,o=0,d=n.length;o<d;++o)a[n[o].identifier]=null;var p=h(),m=Date.now();if(1===p.length){if(m-l<500){var v=p[0];A(r,v,a[v.identifier],Math.floor(Math.log(f.k)/Math.LN2)+1),F()}l=m}else if(p.length>1){v=p[0];var x=p[1],b=v[0]-x[0],_=v[1]-x[1];i=b*b+_*_}}function g(){var o,s,c,u,d=e.touches(r);za.call(r);for(var f=0,p=d.length;f<p;++f,u=null)if(c=d[f],u=a[c.identifier]){if(s)break;o=c,s=u}if(u){var h=(h=c[0]-o[0])*h+(h=c[1]-o[1])*h,m=i&&Math.sqrt(h/i);o=[(o[0]+c[0])/2,(o[1]+c[1])/2],s=[(s[0]+u[0])/2,(s[1]+u[1])/2],M(m*t)}l=null,k(o,s),D(n)}function y(){if(e.event.touches.length){for(var t=e.event.changedTouches,r=0,i=t.length;r<i;++r)delete a[t[r].identifier];for(var l in a)return void h()}e.selectAll(u).on(o,null),d.on(v,O).on(b,P),p(),C(n)}m(),S(n),d.on(v,null).on(b,m)}function I(){var a=_.of(this,arguments);i?clearTimeout(i):(za.call(this),t=T(r=n||e.mouse(this)),S(a)),i=setTimeout((function(){i=null,C(a)}),50),F(),M(Math.pow(2,.002*Re())*f.k),k(r,t),D(a)}function R(){var t=e.mouse(this),r=Math.log(f.k)/Math.LN2;A(this,t,T(t),e.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1)}return ze||(ze="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),n=f;Ea?e.select(this).transition().each("start.zoom",(function(){f=this.__chart__||{x:0,y:0,k:1},S(t)})).tween("zoom:zoom",(function(){var a=p[0],i=p[1],o=r?r[0]:a/2,l=r?r[1]:i/2,s=e.interpolateZoom([(o-f.x)/f.k,(l-f.y)/f.k,a/f.k],[(o-n.x)/n.k,(l-n.y)/n.k,a/n.k]);return function(e){var r=s(e),n=a/r[2];this.__chart__=f={x:o-r[0]*n,y:l-r[1]*n,k:n},D(t)}})).each("interrupt.zoom",(function(){C(t)})).each("end.zoom",(function(){C(t)})):(this.__chart__=f,S(t),D(t),C(t))}))},w.translate=function(e){return arguments.length?(f={x:+e[0],y:+e[1],k:f.k},L(),w):[f.x,f.y]},w.scale=function(e){return arguments.length?(f={x:f.x,y:f.y,k:null},M(+e),L(),w):f.k},w.scaleExtent=function(e){return arguments.length?(h=null==e?Ne:[+e[0],+e[1]],w):h},w.center=function(e){return arguments.length?(n=e&&[+e[0],+e[1]],w):n},w.size=function(e){return arguments.length?(p=e&&[+e[0],+e[1]],w):p},w.duration=function(e){return arguments.length?(m=+e,w):m},w.x=function(e){return arguments.length?(c=e,s=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,ze,Ne=[0,1/0];function Fe(){}function Ee(e,t,r){return this instanceof Ee?(this.h=+e,this.s=+t,void(this.l=+r)):arguments.length<2?e instanceof Ee?new Ee(e.h,e.s,e.l):nt(""+e,at,Ee):new Ee(e,t,r)}e.color=Fe,Fe.prototype.toString=function(){return this.rgb()+""},e.hsl=Ee;var je=Ee.prototype=new Fe;function He(e,t,r){var n,a;function i(e){return Math.round(255*function(e){return e>360?e-=360:e<0&&(e+=360),e<60?n+(a-n)*e/60:e<180?a:e<240?n+(a-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(a=r<=.5?r*(1+t):r+t-r*t),new Ke(i(e+120),i(e),i(e-120))}function Be(t,r,n){return this instanceof Be?(this.h=+t,this.c=+r,void(this.l=+n)):arguments.length<2?t instanceof Be?new Be(t.h,t.c,t.l):We(t instanceof Ue?t.l:(t=it((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Be(t,r,n)}je.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ee(this.h,this.s,this.l/e)},je.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ee(this.h,this.s,e*this.l)},je.rgb=function(){return He(this.h,this.s,this.l)},e.hcl=Be;var Ye=Be.prototype=new Fe;function Ve(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Ue(r,Math.cos(e*=De)*t,Math.sin(e)*t)}function Ue(e,t,r){return this instanceof Ue?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Ue?new Ue(e.l,e.a,e.b):e instanceof Be?Ve(e.h,e.c,e.l):it((e=Ke(e)).r,e.g,e.b):new Ue(e,t,r)}Ye.brighter=function(e){return new Be(this.h,this.c,Math.min(100,this.l+qe*(arguments.length?e:1)))},Ye.darker=function(e){return new Be(this.h,this.c,Math.max(0,this.l-qe*(arguments.length?e:1)))},Ye.rgb=function(){return Ve(this.h,this.c,this.l).rgb()},e.lab=Ue;var qe=18,Ge=Ue.prototype=new Fe;function Ze(e,t,r){var n=(e+16)/116,a=n+t/500,i=n-r/200;return new Ke(Qe(3.2404542*(a=.95047*Xe(a))-1.5371385*(n=1*Xe(n))-.4985314*(i=1.08883*Xe(i))),Qe(-.969266*a+1.8760108*n+.041556*i),Qe(.0556434*a-.2040259*n+1.0572252*i))}function We(e,t,r){return e>0?new Be(Math.atan2(r,t)*Ce,Math.sqrt(t*t+r*r),e):new Be(NaN,NaN,e)}function Xe(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Je(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function Qe(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function Ke(e,t,r){return this instanceof Ke?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof Ke?new Ke(e.r,e.g,e.b):nt(""+e,Ke,He):new Ke(e,t,r)}function $e(e){return new Ke(e>>16,e>>8&255,255&e)}function et(e){return $e(e)+""}Ge.brighter=function(e){return new Ue(Math.min(100,this.l+qe*(arguments.length?e:1)),this.a,this.b)},Ge.darker=function(e){return new Ue(Math.max(0,this.l-qe*(arguments.length?e:1)),this.a,this.b)},Ge.rgb=function(){return Ze(this.l,this.a,this.b)},e.rgb=Ke;var tt=Ke.prototype=new Fe;function rt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function nt(e,t,r){var n,a,i,o=0,l=0,s=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(lt(a[0]),lt(a[1]),lt(a[2]))}return(i=st.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,l=240&i,l|=l>>4,s=15&i,s|=s<<4):7===e.length&&(o=(16711680&i)>>16,l=(65280&i)>>8,s=255&i)),t(o,l,s))}function at(e,t,r){var n,a,i=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),l=o-i,s=(o+i)/2;return l?(a=s<.5?l/(o+i):l/(2-o-i),n=e==o?(t-r)/l+(t<r?6:0):t==o?(r-e)/l+2:(e-t)/l+4,n*=60):(n=NaN,a=s>0&&s<1?0:n),new Ee(n,a,s)}function it(e,t,r){var n=Je((.4124564*(e=ot(e))+.3575761*(t=ot(t))+.1804375*(r=ot(r)))/.95047),a=Je((.2126729*e+.7151522*t+.072175*r)/1);return Ue(116*a-16,500*(n-a),200*(a-Je((.0193339*e+.119192*t+.9503041*r)/1.08883)))}function ot(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}tt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,a=30;return t||r||n?(t&&t<a&&(t=a),r&&r<a&&(r=a),n&&n<a&&(n=a),new Ke(Math.min(255,t/e),Math.min(255,r/e),Math.min(255,n/e))):new Ke(a,a,a)},tt.darker=function(e){return new Ke((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},tt.hsl=function(){return at(this.r,this.g,this.b)},tt.toString=function(){return"#"+rt(this.r)+rt(this.g)+rt(this.b)};var st=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 ct(e){return"function"==typeof e?e:function(){return e}}function ut(e){return function(t,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),dt(t,r,e,n)}}function dt(t,r,a,i){var o={},l=e.dispatch("beforesend","progress","load","error"),s={},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 l.error.call(o,e)}l.load.call(o,e)}else l.error.call(o,c)}return self.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 r=e.event;e.event=t;try{l.progress.call(o,c)}finally{e.event=r}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",o):r},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(n(arguments)))}})),o.send=function(e,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),c.open(e,t,!0),null==r||"accept"in s||(s.accept=r+",*/*"),c.setRequestHeader)for(var i in s)c.setRequestHeader(i,s[i]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=a&&o.on("error",a).on("load",(function(e){a(null,e)})),l.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},e.rebind(o,l,"on"),null==i?o:o.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(i))}st.forEach((function(e,t){st.set(e,$e(t))})),e.functor=ct,e.xhr=ut(C),e.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function a(e,r,n){arguments.length<3&&(n=r,r=null);var a=dt(e,t,null==r?i:o(r),n);return a.row=function(e){return arguments.length?a.response(null==(r=e)?i:o(e)):r},a}function i(e){return a.parse(e.responseText)}function o(e){return function(t){return a.parse(t.responseText,e)}}function l(t){return t.map(s).join(e)}function s(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return a.parse=function(e,t){var r;return a.parseRows(e,(function(e,n){if(r)return r(e,n-1);var a=function(t){for(var r={},n=e.length,a=0;a<n;++a)r[e[a]]=t[a];return r};r=t?function(e,r){return t(a(e),r)}:a}))},a.parseRows=function(e,t){var r,a,i={},o={},l=[],s=e.length,c=0,u=0;function d(){if(c>=s)return o;if(a)return a=!1,i;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++<s;)if(34===e.charCodeAt(r)){if(34!==e.charCodeAt(r+1))break;++r}return c=r+2,13===(l=e.charCodeAt(r+1))?(a=!0,10===e.charCodeAt(r+2)&&++c):10===l&&(a=!0),e.slice(t+1,r).replace(/""/g,'"')}for(;c<s;){var l,u=1;if(10===(l=e.charCodeAt(c++)))a=!0;else if(13===l)a=!0,10===e.charCodeAt(c)&&(++c,++u);else if(l!==n)continue;return e.slice(t,c-u)}return e.slice(t)}for(;(r=d())!==o;){for(var f=[];r!==i&&r!==o;)f.push(r),r=d();t&&null==(f=t(f,u++))||l.push(f)}return l},a.format=function(t){if(Array.isArray(t[0]))return a.formatRows(t);var r=new D,n=[];return t.forEach((function(e){for(var t in e)r.has(t)||n.push(r.add(t))})),[n.map(s).join(e)].concat(t.map((function(t){return n.map((function(e){return s(t[e])})).join(e)}))).join("\n")},a.formatRows=function(e){return e.map(l).join("\n")},a},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv("\t","text/tab-separated-values");var ft,pt,ht,mt,gt=this[P(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function vt(e,t,r){var n=arguments.length;n<2&&(t=0),n<3&&(r=Date.now());var a=r+t,i={c:e,t:a,n:null};return pt?pt.n=i:ft=i,pt=i,ht||(mt=clearTimeout(mt),ht=1,gt(yt)),i}function yt(){var e=xt(),t=bt()-e;t>24?(isFinite(t)&&(clearTimeout(mt),mt=setTimeout(yt,t)),ht=0):(ht=1,gt(yt))}function xt(){for(var e=Date.now(),t=ft;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function bt(){for(var e,t=ft,r=1/0;t;)t.c?(t.t<r&&(r=t.t),t=(e=t).n):t=e?e.n=t.n:ft=t.n;return pt=e,r}function _t(e){return e[0]}function wt(e){return e[1]}function Tt(e){for(var t,r,n,a=e.length,i=[0,1],o=2,l=2;l<a;l++){for(;o>1&&(t=e[i[o-2]],r=e[i[o-1]],n=e[l],(r[0]-t[0])*(n[1]-t[1])-(r[1]-t[1])*(n[0]-t[0])<=0);)--o;i[o++]=l}return i.slice(0,o)}function Mt(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){vt.apply(this,arguments)},e.timer.flush=function(){xt(),bt()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.geom={},e.geom.hull=function(e){var t=_t,r=wt;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,a=ct(t),i=ct(r),o=e.length,l=[],s=[];for(n=0;n<o;n++)l.push([+a.call(this,e[n],n),+i.call(this,e[n],n),n]);for(l.sort(Mt),n=0;n<o;n++)s.push([l[n][0],-l[n][1]]);var c=Tt(l),u=Tt(s),d=u[0]===c[0],f=u[u.length-1]===c[c.length-1],p=[];for(n=c.length-1;n>=0;--n)p.push(e[l[c[n]][2]]);for(n=+d;n<u.length-f;++n)p.push(e[l[u[n]][2]]);return p}return n.x=function(e){return arguments.length?(t=e,n):t},n.y=function(e){return arguments.length?(r=e,n):r},n},e.geom.polygon=function(e){return B(e,kt),e};var kt=e.geom.polygon.prototype=[];function At(e,t,r){return(r[0]-t[0])*(e[1]-t[1])<(r[1]-t[1])*(e[0]-t[0])}function Lt(e,t,r,n){var a=e[0],i=r[0],o=t[0]-a,l=n[0]-i,s=e[1],c=r[1],u=t[1]-s,d=n[1]-c,f=(l*(s-c)-d*(a-i))/(d*o-l*u);return[a+f*o,s+f*u]}function St(e){var t=e[0],r=e[e.length-1];return!(t[0]-r[0]||t[1]-r[1])}kt.area=function(){for(var e,t=-1,r=this.length,n=this[r-1],a=0;++t<r;)e=n,n=this[t],a+=e[1]*n[0]-e[0]*n[1];return.5*a},kt.centroid=function(e){var t,r,n=-1,a=this.length,i=0,o=0,l=this[a-1];for(arguments.length||(e=-1/(6*this.area()));++n<a;)t=l,l=this[n],r=t[0]*l[1]-l[0]*t[1],i+=(t[0]+l[0])*r,o+=(t[1]+l[1])*r;return[i*e,o*e]},kt.clip=function(e){for(var t,r,n,a,i,o,l=St(e),s=-1,c=this.length-St(this),u=this[c-1];++s<c;){for(t=e.slice(),e.length=0,a=this[s],i=t[(n=t.length-l)-1],r=-1;++r<n;)At(o=t[r],u,a)?(At(i,u,a)||e.push(Lt(i,o,u,a)),e.push(o)):At(i,u,a)&&e.push(Lt(i,o,u,a)),i=o;l&&e.push(e[0]),u=a}return e};var Dt,Ct,Ot,Pt,It,Rt=[],zt=[];function Nt(){tr(this),this.edge=this.site=this.circle=null}function Ft(e){var t=Rt.pop()||new Nt;return t.site=e,t}function Et(e){Zt(e),Ot.remove(e),Rt.push(e),tr(e)}function jt(e){var t=e.circle,r=t.x,n=t.cy,a={x:r,y:n},i=e.P,o=e.N,l=[e];Et(e);for(var s=i;s.circle&&y(r-s.circle.x)<Me&&y(n-s.circle.cy)<Me;)i=s.P,l.unshift(s),Et(s),s=i;l.unshift(s),Zt(s);for(var c=o;c.circle&&y(r-c.circle.x)<Me&&y(n-c.circle.cy)<Me;)o=c.N,l.push(c),Et(c),c=o;l.push(c),Zt(c);var u,d=l.length;for(u=1;u<d;++u)c=l[u],s=l[u-1],Kt(c.edge,s.site,c.site,a);s=l[0],(c=l[d-1]).edge=Jt(s.site,c.site,null,a),Gt(s),Gt(c)}function Ht(e){for(var t,r,n,a,i=e.x,o=e.y,l=Ot._;l;)if((n=Bt(l,o)-i)>Me)l=l.L;else{if(!((a=i-Yt(l,o))>Me)){n>-Me?(t=l.P,r=l):a>-Me?(t=l,r=l.N):t=r=l;break}if(!l.R){t=l;break}l=l.R}var s=Ft(e);if(Ot.insert(t,s),t||r){if(t===r)return Zt(t),r=Ft(t.site),Ot.insert(s,r),s.edge=r.edge=Jt(t.site,s.site),Gt(t),void Gt(r);if(r){Zt(t),Zt(r);var c=t.site,u=c.x,d=c.y,f=e.x-u,p=e.y-d,h=r.site,m=h.x-u,g=h.y-d,v=2*(f*g-p*m),y=f*f+p*p,x=m*m+g*g,b={x:(g*y-p*x)/v+u,y:(f*x-m*y)/v+d};Kt(r.edge,c,h,b),s.edge=Jt(c,e,null,b),r.edge=Jt(e,h,null,b),Gt(t),Gt(r)}else s.edge=Jt(t.site,s.site)}}function Bt(e,t){var r=e.site,n=r.x,a=r.y,i=a-t;if(!i)return n;var o=e.P;if(!o)return-1/0;var l=(r=o.site).x,s=r.y,c=s-t;if(!c)return l;var u=l-n,d=1/i-1/c,f=u/c;return d?(-f+Math.sqrt(f*f-2*d*(u*u/(-2*c)-s+c/2+a-i/2)))/d+n:(n+l)/2}function Yt(e,t){var r=e.N;if(r)return Bt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Vt(e){this.site=e,this.edges=[]}function Ut(e,t){return t.angle-e.angle}function qt(){tr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Gt(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,a=e.site,i=r.site;if(n!==i){var o=a.x,l=a.y,s=n.x-o,c=n.y-l,u=i.x-o,d=2*(s*(g=i.y-l)-c*u);if(!(d>=-1e-12)){var f=s*s+c*c,p=u*u+g*g,h=(g*f-c*p)/d,m=(s*p-u*f)/d,g=m+l,v=zt.pop()||new qt;v.arc=e,v.site=a,v.x=h+o,v.y=g+Math.sqrt(h*h+m*m),v.cy=g,e.circle=v;for(var y=null,x=It._;x;)if(v.y<x.y||v.y===x.y&&v.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}It.insert(y,v),y||(Pt=v)}}}}function Zt(e){var t=e.circle;t&&(t.P||(Pt=t.N),It.remove(t),zt.push(t),tr(t),e.circle=null)}function Wt(e,t){var r=e.b;if(r)return!0;var n,a,i=e.a,o=t[0][0],l=t[1][0],s=t[0][1],c=t[1][1],u=e.l,d=e.r,f=u.x,p=u.y,h=d.x,m=d.y,g=(f+h)/2,v=(p+m)/2;if(m===p){if(g<o||g>=l)return;if(f>h){if(i){if(i.y>=c)return}else i={x:g,y:s};r={x:g,y:c}}else{if(i){if(i.y<s)return}else i={x:g,y:c};r={x:g,y:s}}}else if(a=v-(n=(f-h)/(m-p))*g,n<-1||n>1)if(f>h){if(i){if(i.y>=c)return}else i={x:(s-a)/n,y:s};r={x:(c-a)/n,y:c}}else{if(i){if(i.y<s)return}else i={x:(c-a)/n,y:c};r={x:(s-a)/n,y:s}}else if(p<m){if(i){if(i.x>=l)return}else i={x:o,y:n*o+a};r={x:l,y:n*l+a}}else{if(i){if(i.x<o)return}else i={x:l,y:n*l+a};r={x:o,y:n*o+a}}return e.a=i,e.b=r,!0}function Xt(e,t){this.l=e,this.r=t,this.a=this.b=null}function Jt(e,t,r,n){var a=new Xt(e,t);return Dt.push(a),r&&Kt(a,e,t,r),n&&Kt(a,t,e,n),Ct[e.i].edges.push(new $t(a,e,t)),Ct[t.i].edges.push(new $t(a,t,e)),a}function Qt(e,t,r){var n=new Xt(e,null);return n.a=t,n.b=r,Dt.push(n),n}function Kt(e,t,r,n){e.a||e.b?e.l===r?e.b=n:e.a=n:(e.a=n,e.l=t,e.r=r)}function $t(e,t,r){var n=e.a,a=e.b;this.edge=e,this.site=t,this.angle=r?Math.atan2(r.y-t.y,r.x-t.x):e.l===t?Math.atan2(a.x-n.x,n.y-a.y):Math.atan2(n.x-a.x,a.y-n.y)}function er(){this._=null}function tr(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function rr(e,t){var r=t,n=t.R,a=r.U;a?a.L===r?a.L=n:a.R=n:e._=n,n.U=a,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function nr(e,t){var r=t,n=t.L,a=r.U;a?a.L===r?a.L=n:a.R=n:e._=n,n.U=a,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function ar(e){for(;e.L;)e=e.L;return e}function ir(e,t){var r,n,a,i=e.sort(or).pop();for(Dt=[],Ct=new Array(e.length),Ot=new er,It=new er;;)if(a=Pt,i&&(!a||i.y<a.y||i.y===a.y&&i.x<a.x))i.x===r&&i.y===n||(Ct[i.i]=new Vt(i),Ht(i),r=i.x,n=i.y),i=e.pop();else{if(!a)break;jt(a.arc)}t&&(function(e){for(var t,r,n,a,i,o=Dt,l=(r=e[0][0],n=e[0][1],a=e[1][0],i=e[1][1],function(e){var t,o=e.a,l=e.b,s=o.x,c=o.y,u=0,d=1,f=l.x-s,p=l.y-c;if(t=r-s,f||!(t>0)){if(t/=f,f<0){if(t<u)return;t<d&&(d=t)}else if(f>0){if(t>d)return;t>u&&(u=t)}if(t=a-s,f||!(t<0)){if(t/=f,f<0){if(t>d)return;t>u&&(u=t)}else if(f>0){if(t<u)return;t<d&&(d=t)}if(t=n-c,p||!(t>0)){if(t/=p,p<0){if(t<u)return;t<d&&(d=t)}else if(p>0){if(t>d)return;t>u&&(u=t)}if(t=i-c,p||!(t<0)){if(t/=p,p<0){if(t>d)return;t>u&&(u=t)}else if(p>0){if(t<u)return;t<d&&(d=t)}return u>0&&(e.a={x:s+u*f,y:c+u*p}),d<1&&(e.b={x:s+d*f,y:c+d*p}),e}}}}}),s=o.length;s--;)(!Wt(t=o[s],e)||!l(t)||y(t.a.x-t.b.x)<Me&&y(t.a.y-t.b.y)<Me)&&(t.a=t.b=null,o.splice(s,1))}(t),function(e){for(var t,r,n,a,i,o,l,s,c,u,d=e[0][0],f=e[1][0],p=e[0][1],h=e[1][1],m=Ct,g=m.length;g--;)if((i=m[g])&&i.prepare())for(s=(l=i.edges).length,o=0;o<s;)n=(u=l[o].end()).x,a=u.y,t=(c=l[++o%s].start()).x,r=c.y,(y(n-t)>Me||y(a-r)>Me)&&(l.splice(o,0,new $t(Qt(i.site,u,y(n-d)<Me&&h-a>Me?{x:d,y:y(t-d)<Me?r:h}:y(a-h)<Me&&f-n>Me?{x:y(r-h)<Me?t:f,y:h}:y(n-f)<Me&&a-p>Me?{x:f,y:y(t-f)<Me?r:p}:y(a-p)<Me&&n-d>Me?{x:y(r-p)<Me?t:d,y:p}:null),i.site,null)),++s)}(t));var o={cells:Ct,edges:Dt};return Ot=It=Dt=Ct=null,o}function or(e,t){return t.y-e.y||t.x-e.x}Vt.prototype.prepare=function(){for(var e,t=this.edges,r=t.length;r--;)(e=t[r].edge).b&&e.a||t.splice(r,1);return t.sort(Ut),t.length},$t.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}},er.prototype={insert:function(e,t){var r,n,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;r=e}else this._?(e=ar(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)r===(n=r.U).L?(a=n.R)&&a.C?(r.C=a.C=!1,n.C=!0,e=n):(e===r.R&&(rr(this,r),r=(e=r).U),r.C=!1,n.C=!0,nr(this,n)):(a=n.L)&&a.C?(r.C=a.C=!1,n.C=!0,e=n):(e===r.L&&(nr(this,r),r=(e=r).U),r.C=!1,n.C=!0,rr(this,n)),r=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,r,n,a=e.U,i=e.L,o=e.R;if(r=i?o?ar(o):i:o,a?a.L===e?a.L=r:a.R=r:this._=r,i&&o?(n=r.C,r.C=e.C,r.L=i,i.U=r,r!==o?(a=r.U,r.U=e.U,e=r.R,a.L=e,r.R=o,o.U=r):(r.U=a,a=r,e=r.R)):(n=e.C,e=r),e&&(e.U=a),!n)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,rr(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,nr(this,t),t=a.R),t.C=a.C,a.C=t.R.C=!1,rr(this,a),e=this._;break}}else if((t=a.L).C&&(t.C=!1,a.C=!0,nr(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,rr(this,t),t=a.L),t.C=a.C,a.C=t.L.C=!1,nr(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=_t,r=wt,n=t,a=r,i=lr;if(e)return o(e);function o(e){var t=new Array(e.length),r=i[0][0],n=i[0][1],a=i[1][0],o=i[1][1];return ir(l(e),i).cells.forEach((function(i,l){var s=i.edges,c=i.site;(t[l]=s.length?s.map((function(e){var t=e.start();return[t.x,t.y]})):c.x>=r&&c.x<=a&&c.y>=n&&c.y<=o?[[r,o],[a,o],[a,n],[r,n]]:[]).point=e[l]})),t}function l(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/Me)*Me,y:Math.round(a(e,t)/Me)*Me,i:t}}))}return o.links=function(e){return ir(l(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 ir(l(e)).cells.forEach((function(r,n){for(var a,i,o,l,s=r.site,c=r.edges.sort(Ut),u=-1,d=c.length,f=c[d-1].edge,p=f.l===s?f.r:f.l;++u<d;)f,a=p,p=(f=c[u].edge).l===s?f.r:f.l,n<a.i&&n<p.i&&(o=a,l=p,((i=s).x-l.x)*(o.y-i.y)-(i.x-o.x)*(l.y-i.y)<0)&&t.push([e[n],e[a.i],e[p.i]])})),t},o.x=function(e){return arguments.length?(n=ct(t=e),o):t},o.y=function(e){return arguments.length?(a=ct(r=e),o):r},o.clipExtent=function(e){return arguments.length?(i=null==e?lr:e,o):i===lr?null:i},o.size=function(e){return arguments.length?o.clipExtent(e&&[[0,0],e]):i===lr?null:i&&i[1]},o};var lr=[[-1e6,-1e6],[1e6,1e6]];function sr(e){return e.x}function cr(e){return e.y}function ur(e,t,r,n,a,i){if(!e(t,r,n,a,i)){var o=.5*(r+a),l=.5*(n+i),s=t.nodes;s[0]&&ur(e,s[0],r,n,o,l),s[1]&&ur(e,s[1],o,n,a,l),s[2]&&ur(e,s[2],r,l,o,i),s[3]&&ur(e,s[3],o,l,a,i)}}function dr(e,t,r,n,a,i,o){var l,s=1/0;return function e(c,u,d,f,p){if(!(u>i||d>o||f<n||p<a)){if(h=c.point){var h,m=t-c.x,g=r-c.y,v=m*m+g*g;if(v<s){var y=Math.sqrt(s=v);n=t-y,a=r-y,i=t+y,o=r+y,l=h}}for(var x=c.nodes,b=.5*(u+f),_=.5*(d+p),w=(r>=_)<<1|t>=b,T=w+4;w<T;++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,p);break;case 3:e(c,b,_,f,p)}}}(e,n,a,i,o),l}function fr(t,r){t=e.rgb(t),r=e.rgb(r);var n=t.r,a=t.g,i=t.b,o=r.r-n,l=r.g-a,s=r.b-i;return function(e){return"#"+rt(Math.round(n+o*e))+rt(Math.round(a+l*e))+rt(Math.round(i+s*e))}}function pr(e,t){var r,n={},a={};for(r in e)r in t?n[r]=yr(e[r],t[r]):a[r]=e[r];for(r in t)r in e||(a[r]=t[r]);return function(e){for(r in n)a[r]=n[r](e);return a}}function hr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function mr(e,t){var r,n,a,i=gr.lastIndex=vr.lastIndex=0,o=-1,l=[],s=[];for(e+="",t+="";(r=gr.exec(e))&&(n=vr.exec(t));)(a=n.index)>i&&(a=t.slice(i,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(n=n[0])?l[o]?l[o]+=n:l[++o]=n:(l[++o]=null,s.push({i:o,x:hr(r,n)})),i=vr.lastIndex;return i<t.length&&(a=t.slice(i),l[o]?l[o]+=a:l[++o]=a),l.length<2?s[0]?(t=s[0].x,function(e){return t(e)+""}):function(){return t}:(t=s.length,function(e){for(var r,n=0;n<t;++n)l[(r=s[n]).i]=r.x(e);return l.join("")})}e.geom.delaunay=function(t){return e.geom.voronoi().triangles(t)},e.geom.quadtree=function(e,t,r,n,a){var i,o=_t,l=wt;if(i=arguments.length)return o=sr,l=cr,3===i&&(a=r,n=t,r=t=0),s(e);function s(e){var s,c,u,d,f,p,h,m,g,v=ct(o),x=ct(l);if(null!=t)p=t,h=r,m=n,g=a;else if(m=g=-(p=h=1/0),c=[],u=[],f=e.length,i)for(d=0;d<f;++d)(s=e[d]).x<p&&(p=s.x),s.y<h&&(h=s.y),s.x>m&&(m=s.x),s.y>g&&(g=s.y),c.push(s.x),u.push(s.y);else for(d=0;d<f;++d){var b=+v(s=e[d],d),_=+x(s,d);b<p&&(p=b),_<h&&(h=_),b>m&&(m=b),_>g&&(g=_),c.push(b),u.push(_)}var w=m-p,T=g-h;function M(e,t,r,n,a,i,o,l){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var s=e.x,c=e.y;if(null!=s)if(y(s-r)+y(c-n)<.01)k(e,t,r,n,a,i,o,l);else{var u=e.point;e.x=e.y=e.point=null,k(e,u,s,c,a,i,o,l),k(e,t,r,n,a,i,o,l)}else e.x=r,e.y=n,e.point=t}else k(e,t,r,n,a,i,o,l)}function k(e,t,r,n,a,i,o,l){var s=.5*(a+o),c=.5*(i+l),u=r>=s,d=n>=c,f=d<<1|u;e.leaf=!1,u?a=s:o=s,d?i=c:l=c,M(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,a,i,o,l)}w>T?g=h+w:m=p+T;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){M(A,e,+v(e,++d),+x(e,d),p,h,m,g)},visit:function(e){ur(e,A,p,h,m,g)},find:function(e){return dr(A,e[0],e[1],p,h,m,g)}};if(d=-1,null==t){for(;++d<f;)M(A,e[d],c[d],u[d],p,h,m,g);--d}else e.forEach(A.add);return c=u=e=s=null,A}return s.x=function(e){return arguments.length?(o=e,s):o},s.y=function(e){return arguments.length?(l=e,s):l},s.extent=function(e){return arguments.length?(null==e?t=r=n=a=null:(t=+e[0][0],r=+e[0][1],n=+e[1][0],a=+e[1][1]),s):null==t?null:[[t,r],[n,a]]},s.size=function(e){return arguments.length?(null==e?t=r=n=a=null:(t=r=0,n=+e[0],a=+e[1]),s):null==t?null:[n-t,a-r]},s},e.interpolateRgb=fr,e.interpolateObject=pr,e.interpolateNumber=hr,e.interpolateString=mr;var gr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vr=new RegExp(gr.source,"g");function yr(t,r){for(var n,a=e.interpolators.length;--a>=0&&!(n=e.interpolators[a](t,r)););return n}function xr(e,t){var r,n=[],a=[],i=e.length,o=t.length,l=Math.min(e.length,t.length);for(r=0;r<l;++r)n.push(yr(e[r],t[r]));for(;r<i;++r)a[r]=e[r];for(;r<o;++r)a[r]=t[r];return function(e){for(r=0;r<l;++r)a[r]=n[r](e);return a}}e.interpolate=yr,e.interpolators=[function(e,t){var r=typeof t;return("string"===r?st.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?fr:mr:t instanceof Fe?fr:Array.isArray(t)?xr:"object"===r&&isNaN(t)?pr:hr)(e,t)}],e.interpolateArray=xr;var br=function(){return C},_r=e.map({linear:br,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return Ar},cubic:function(){return Lr},sin:function(){return Dr},exp:function(){return Cr},circle:function(){return Or},elastic:function(e,t){var r;arguments.length<2&&(t=.45);arguments.length?r=t/Ae*Math.asin(1/e):(e=1,r=t/4);return function(n){return 1+e*Math.pow(2,-10*n)*Math.sin((n-r)*Ae/t)}},back:function(e){e||(e=1.70158);return function(t){return t*t*((e+1)*t-e)}},bounce:function(){return Pr}}),wr=e.map({in:C,out:Mr,"in-out":kr,"out-in":function(e){return kr(Mr(e))}});function Tr(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function Mr(e){return function(t){return 1-e(1-t)}}function kr(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Ar(e){return e*e}function Lr(e){return e*e*e}function Sr(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function Dr(e){return 1-Math.cos(e*Se)}function Cr(e){return Math.pow(2,10*(e-1))}function Or(e){return 1-Math.sqrt(1-e*e)}function Pr(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 Ir(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Rr(e){var t,r,n,a=[e.a,e.b],i=[e.c,e.d],o=Nr(a),l=zr(a,i),s=Nr(((t=i)[0]+=(n=-l)*(r=a)[0],t[1]+=n*r[1],t))||0;a[0]*i[1]<i[0]*a[1]&&(a[0]*=-1,a[1]*=-1,o*=-1,l*=-1),this.rotate=(o?Math.atan2(a[1],a[0]):Math.atan2(-i[0],i[1]))*Ce,this.translate=[e.e,e.f],this.scale=[o,s],this.skew=s?Math.atan2(l,s)*Ce:0}function zr(e,t){return e[0]*t[0]+e[1]*t[1]}function Nr(e){var t=Math.sqrt(zr(e,e));return t&&(e[0]/=t,e[1]/=t),t}e.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,a=t>=0?e.slice(t+1):"in";return n=_r.get(n)||br,Tr((a=wr.get(a)||C)(n.apply(null,r.call(arguments,1))))},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var n=t.h,a=t.c,i=t.l,o=r.h-n,l=r.c-a,s=r.l-i;isNaN(l)&&(l=0,a=isNaN(a)?r.c:a);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(e){return Ve(n+o*e,a+l*e,i+s*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var n=t.h,a=t.s,i=t.l,o=r.h-n,l=r.s-a,s=r.l-i;isNaN(l)&&(l=0,a=isNaN(a)?r.s:a);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(e){return He(n+o*e,a+l*e,i+s*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var n=t.l,a=t.a,i=t.b,o=r.l-n,l=r.a-a,s=r.b-i;return function(e){return Ze(n+o*e,a+l*e,i+s*e)+""}},e.interpolateRound=Ir,e.transform=function(t){var r=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new Rr(t?t.matrix:Fr)})(t)},Rr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Fr={a:1,b:0,c:0,d:1,e:0,f:0};function Er(e){return e.length?e.pop()+",":""}function jr(t,r){var n=[],a=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push("translate(",null,",",null,")");n.push({i:a-4,x:hr(e[0],t[0])},{i:a-2,x:hr(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,n,a),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Er(r)+"rotate(",null,")")-2,x:hr(e,t)})):t&&r.push(Er(r)+"rotate("+t+")")}(t.rotate,r.rotate,n,a),function(e,t,r,n){e!==t?n.push({i:r.push(Er(r)+"skewX(",null,")")-2,x:hr(e,t)}):t&&r.push(Er(r)+"skewX("+t+")")}(t.skew,r.skew,n,a),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push(Er(r)+"scale(",null,",",null,")");n.push({i:a-4,x:hr(e[0],t[0])},{i:a-2,x:hr(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(Er(r)+"scale("+t+")")}(t.scale,r.scale,n,a),t=r=null,function(e){for(var t,r=-1,i=a.length;++r<i;)n[(t=a[r]).i]=t.x(e);return n.join("")}}function Hr(e,t){return t=(t-=e=+e)||1/t,function(r){return(r-e)/t}}function Br(e,t){return t=(t-=e=+e)||1/t,function(r){return Math.max(0,Math.min(1,(r-e)/t))}}function Yr(e){for(var t=e.source,r=e.target,n=function(e,t){if(e===t)return e;var r=Vr(e),n=Vr(t),a=r.pop(),i=n.pop(),o=null;for(;a===i;)o=a,a=r.pop(),i=n.pop();return o}(t,r),a=[t];t!==n;)t=t.parent,a.push(t);for(var i=a.length;r!==n;)a.splice(i,0,r),r=r.parent;return a}function Vr(e){for(var t=[],r=e.parent;null!=r;)t.push(e),e=r,r=r.parent;return t.push(e),t}function Ur(e){e.fixed|=2}function qr(e){e.fixed&=-7}function Gr(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Zr(e){e.fixed&=-5}e.interpolateTransform=jr,e.layout={},e.layout.bundle=function(){return function(e){for(var t=[],r=-1,n=e.length;++r<n;)t.push(Yr(e[r]));return t}},e.layout.chord=function(){var t,r,n,a,i,o,l,s={},c=0;function u(){var s,u,f,p,h,m={},g=[],v=e.range(a),y=[];for(t=[],r=[],s=0,p=-1;++p<a;){for(u=0,h=-1;++h<a;)u+=n[p][h];g.push(u),y.push(e.range(a)),s+=u}for(i&&v.sort((function(e,t){return i(g[e],g[t])})),o&&y.forEach((function(e,t){e.sort((function(e,r){return o(n[t][e],n[t][r])}))})),s=(Ae-c*a)/s,u=0,p=-1;++p<a;){for(f=u,h=-1;++h<a;){var x=v[p],b=y[x][h],_=n[x][b],w=u,T=u+=_*s;m[x+"-"+b]={index:x,subindex:b,startAngle:w,endAngle:T,value:_}}r[x]={index:x,startAngle:f,endAngle:u,value:g[x]},u+=c}for(p=-1;++p<a;)for(h=p-1;++h<a;){var M=m[p+"-"+h],k=m[h+"-"+p];(M.value||k.value)&&t.push(M.value<k.value?{source:k,target:M}:{source:M,target:k})}l&&d()}function d(){t.sort((function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)}))}return s.matrix=function(e){return arguments.length?(a=(n=e)&&n.length,t=r=null,s):n},s.padding=function(e){return arguments.length?(c=e,t=r=null,s):c},s.sortGroups=function(e){return arguments.length?(i=e,t=r=null,s):i},s.sortSubgroups=function(e){return arguments.length?(o=e,t=null,s):o},s.sortChords=function(e){return arguments.length?(l=e,t&&d(),s):l},s.chords=function(){return t||u(),t},s.groups=function(){return r||u(),r},s},e.layout.force=function(){var t,r,n,a,i,o,l={},s=e.dispatch("start","tick","end"),c=[1,1],u=.9,d=Wr,f=Xr,p=-30,h=Jr,m=.1,g=.64,v=[],y=[];function x(e){return function(t,r,n,a){if(t.point!==e){var i=t.cx-e.x,o=t.cy-e.y,l=a-r,s=i*i+o*o;if(l*l/g<s){if(s<h){var c=t.charge/s;e.px-=i*c,e.py-=o*c}return!0}if(t.point&&s&&s<h){c=t.pointCharge/s;e.px-=i*c,e.py-=o*c}}return!t.charge}}function b(t){t.px=e.event.x,t.py=e.event.y,l.resume()}return l.tick=function(){if((n*=.99)<.005)return t=null,s.end({type:"end",alpha:n=0}),!0;var r,l,d,f,h,g,b,_,w,T=v.length,M=y.length;for(l=0;l<M;++l)f=(d=y[l]).source,(g=(_=(h=d.target).x-f.x)*_+(w=h.y-f.y)*w)&&(_*=g=n*i[l]*((g=Math.sqrt(g))-a[l])/g,w*=g,h.x-=_*(b=f.weight+h.weight?f.weight/(f.weight+h.weight):.5),h.y-=w*b,f.x+=_*(b=1-b),f.y+=w*b);if((b=n*m)&&(_=c[0]/2,w=c[1]/2,l=-1,b))for(;++l<T;)(d=v[l]).x+=(_-d.x)*b,d.y+=(w-d.y)*b;if(p)for(!function e(t,r,n){var a=0,i=0;if(t.charge=0,!t.leaf)for(var o,l=t.nodes,s=l.length,c=-1;++c<s;)null!=(o=l[c])&&(e(o,r,n),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=r*n[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}(r=e.geom.quadtree(v),n,o),l=-1;++l<T;)(d=v[l]).fixed||r.visit(x(d));for(l=-1;++l<T;)(d=v[l]).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);s.tick({type:"tick",alpha:n})},l.nodes=function(e){return arguments.length?(v=e,l):v},l.links=function(e){return arguments.length?(y=e,l):y},l.size=function(e){return arguments.length?(c=e,l):c},l.linkDistance=function(e){return arguments.length?(d="function"==typeof e?e:+e,l):d},l.distance=l.linkDistance,l.linkStrength=function(e){return arguments.length?(f="function"==typeof e?e:+e,l):f},l.friction=function(e){return arguments.length?(u=+e,l):u},l.charge=function(e){return arguments.length?(p="function"==typeof e?e:+e,l):p},l.chargeDistance=function(e){return arguments.length?(h=e*e,l):Math.sqrt(h)},l.gravity=function(e){return arguments.length?(m=+e,l):m},l.theta=function(e){return arguments.length?(g=e*e,l):Math.sqrt(g)},l.alpha=function(e){return arguments.length?(e=+e,n?e>0?n=e:(t.c=null,t.t=NaN,t=null,s.end({type:"end",alpha:n=0})):e>0&&(s.start({type:"start",alpha:n=e}),t=vt(l.tick)),l):n},l.start=function(){var e,t,r,n=v.length,s=y.length,u=c[0],h=c[1];for(e=0;e<n;++e)(r=v[e]).index=e,r.weight=0;for(e=0;e<s;++e)"number"==typeof(r=y[e]).source&&(r.source=v[r.source]),"number"==typeof r.target&&(r.target=v[r.target]),++r.source.weight,++r.target.weight;for(e=0;e<n;++e)r=v[e],isNaN(r.x)&&(r.x=m("x",u)),isNaN(r.y)&&(r.y=m("y",h)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(a=[],"function"==typeof d)for(e=0;e<s;++e)a[e]=+d.call(this,y[e],e);else for(e=0;e<s;++e)a[e]=d;if(i=[],"function"==typeof f)for(e=0;e<s;++e)i[e]=+f.call(this,y[e],e);else for(e=0;e<s;++e)i[e]=f;if(o=[],"function"==typeof p)for(e=0;e<n;++e)o[e]=+p.call(this,v[e],e);else for(e=0;e<n;++e)o[e]=p;function m(r,a){if(!t){for(t=new Array(n),c=0;c<n;++c)t[c]=[];for(c=0;c<s;++c){var i=y[c];t[i.source.index].push(i.target),t[i.target.index].push(i.source)}}for(var o,l=t[e],c=-1,u=l.length;++c<u;)if(!isNaN(o=l[c][r]))return o;return Math.random()*a}return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){if(r||(r=e.behavior.drag().origin(C).on("dragstart.force",Ur).on("drag.force",b).on("dragend.force",qr)),!arguments.length)return r;this.on("mouseover.force",Gr).on("mouseout.force",Zr).call(r)},e.rebind(l,s,"on")};var Wr=20,Xr=1,Jr=1/0;function Qr(t,r){return e.rebind(t,r,"sort","children","value"),t.nodes=t,t.links=nn,t}function Kr(e,t){for(var r=[e];null!=(e=r.pop());)if(t(e),(a=e.children)&&(n=a.length))for(var n,a;--n>=0;)r.push(a[n])}function $r(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(i=e.children)&&(a=i.length))for(var a,i,o=-1;++o<a;)r.push(i[o]);for(;null!=(e=n.pop());)t(e)}function en(e){return e.children}function tn(e){return e.value}function rn(e,t){return t.value-e.value}function nn(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=rn,t=en,r=tn;function n(a){var i,o=[a],l=[];for(a.depth=0;null!=(i=o.pop());)if(l.push(i),(c=t.call(n,i,i.depth))&&(s=c.length)){for(var s,c,u;--s>=0;)o.push(u=c[s]),u.parent=i,u.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return $r(a,(function(t){var n,a;e&&(n=t.children)&&n.sort(e),r&&(a=t.parent)&&(a.value+=t.value)})),l}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(Kr(e,(function(e){e.children&&(e.value=0)})),$r(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function n(e,n){var a=t.call(this,e,n);return function e(t,r,n,a){var i=t.children;if(t.x=r,t.y=t.depth*a,t.dx=n,t.dy=a,i&&(o=i.length)){var o,l,s,c=-1;for(n=t.value?n/t.value:0;++c<o;)e(l=i[c],r,s=l.value*n,a),r+=s}}(a[0],0,r[0],r[1]/function e(t){var r=t.children,n=0;if(r&&(a=r.length))for(var a,i=-1;++i<a;)n=Math.max(n,e(r[i]));return 1+n}(a[0])),a}return n.size=function(e){return arguments.length?(r=e,n):r},Qr(n,t)},e.layout.pie=function(){var t=Number,r=an,n=0,a=Ae,i=0;function o(l){var s,c=l.length,u=l.map((function(e,r){return+t.call(o,e,r)})),d=+("function"==typeof n?n.apply(this,arguments):n),f=("function"==typeof a?a.apply(this,arguments):a)-d,p=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),h=p*(f<0?-1:1),m=e.sum(u),g=m?(f-c*h)/m:0,v=e.range(c),y=[];return null!=r&&v.sort(r===an?function(e,t){return u[t]-u[e]}:function(e,t){return r(l[e],l[t])}),v.forEach((function(e){y[e]={data:l[e],value:s=u[e],startAngle:d,endAngle:d+=s*g+h,padAngle:p}})),y}return o.value=function(e){return arguments.length?(t=e,o):t},o.sort=function(e){return arguments.length?(r=e,o):r},o.startAngle=function(e){return arguments.length?(n=e,o):n},o.endAngle=function(e){return arguments.length?(a=e,o):a},o.padAngle=function(e){return arguments.length?(i=e,o):i},o};var an={};function on(e){return e.x}function ln(e){return e.y}function sn(e,t,r){e.y0=t,e.y=r}e.layout.stack=function(){var t=C,r=dn,n=fn,a=sn,i=on,o=ln;function l(s,c){if(!(p=s.length))return s;var u=s.map((function(e,r){return t.call(l,e,r)})),d=u.map((function(e){return e.map((function(e,t){return[i.call(l,e,t),o.call(l,e,t)]}))})),f=r.call(l,d,c);u=e.permute(u,f),d=e.permute(d,f);var p,h,m,g,v=n.call(l,d,c),y=u[0].length;for(m=0;m<y;++m)for(a.call(l,u[0][m],g=v[m],d[0][m][1]),h=1;h<p;++h)a.call(l,u[h][m],g+=d[h-1][m][1],d[h][m][1]);return s}return l.values=function(e){return arguments.length?(t=e,l):t},l.order=function(e){return arguments.length?(r="function"==typeof e?e:cn.get(e)||dn,l):r},l.offset=function(e){return arguments.length?(n="function"==typeof e?e:un.get(e)||fn,l):n},l.x=function(e){return arguments.length?(i=e,l):i},l.y=function(e){return arguments.length?(o=e,l):o},l.out=function(e){return arguments.length?(a=e,l):a},l};var cn=e.map({"inside-out":function(t){var r,n,a=t.length,i=t.map(pn),o=t.map(hn),l=e.range(a).sort((function(e,t){return i[e]-i[t]})),s=0,c=0,u=[],d=[];for(r=0;r<a;++r)n=l[r],s<c?(s+=o[n],u.push(n)):(c+=o[n],d.push(n));return d.reverse().concat(u)},reverse:function(t){return e.range(t.length).reverse()},default:dn}),un=e.map({silhouette:function(e){var t,r,n,a=e.length,i=e[0].length,o=[],l=0,s=[];for(r=0;r<i;++r){for(t=0,n=0;t<a;t++)n+=e[t][r][1];n>l&&(l=n),o.push(n)}for(r=0;r<i;++r)s[r]=(l-o[r])/2;return s},wiggle:function(e){var t,r,n,a,i,o,l,s,c,u=e.length,d=e[0],f=d.length,p=[];for(p[0]=s=c=0,r=1;r<f;++r){for(t=0,a=0;t<u;++t)a+=e[t][r][1];for(t=0,i=0,l=d[r][0]-d[r-1][0];t<u;++t){for(n=0,o=(e[t][r][1]-e[t][r-1][1])/(2*l);n<t;++n)o+=(e[n][r][1]-e[n][r-1][1])/l;i+=o*e[t][r][1]}p[r]=s-=a?i/a*l:0,s<c&&(c=s)}for(r=0;r<f;++r)p[r]-=c;return p},expand:function(e){var t,r,n,a=e.length,i=e[0].length,o=1/a,l=[];for(r=0;r<i;++r){for(t=0,n=0;t<a;t++)n+=e[t][r][1];if(n)for(t=0;t<a;t++)e[t][r][1]/=n;else for(t=0;t<a;t++)e[t][r][1]=o}for(r=0;r<i;++r)l[r]=0;return l},zero:fn});function dn(t){return e.range(t.length)}function fn(e){for(var t=-1,r=e[0].length,n=[];++t<r;)n[t]=0;return n}function pn(e){for(var t,r=1,n=0,a=e[0][1],i=e.length;r<i;++r)(t=e[r][1])>a&&(n=r,a=t);return n}function hn(e){return e.reduce(mn,0)}function mn(e,t){return e+t[1]}function gn(e,t){return vn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function vn(e,t){for(var r=-1,n=+e[0],a=(e[1]-n)/t,i=[];++r<=t;)i[r]=a*r+n;return i}function yn(t){return[e.min(t),e.max(t)]}function xn(e,t){return e.value-t.value}function bn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function _n(e,t){e._pack_next=t,t._pack_prev=e}function wn(e,t){var r=t.x-e.x,n=t.y-e.y,a=e.r+t.r;return.999*a*a>r*r+n*n}function Tn(e){if((t=e.children)&&(s=t.length)){var t,r,n,a,i,o,l,s,c=1/0,u=-1/0,d=1/0,f=-1/0;if(t.forEach(Mn),(r=t[0]).x=-r.r,r.y=0,x(r),s>1&&((n=t[1]).x=n.r,n.y=0,x(n),s>2))for(An(r,n,a=t[2]),x(a),bn(r,a),r._pack_prev=a,bn(a,n),n=r._pack_next,i=3;i<s;i++){An(r,n,a=t[i]);var p=0,h=1,m=1;for(o=n._pack_next;o!==n;o=o._pack_next,h++)if(wn(o,a)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!wn(l,a);l=l._pack_prev,m++);p?(h<m||h==m&&n.r<r.r?_n(r,n=o):_n(r=l,n),i--):(bn(r,a),n=a,x(a))}var g=(c+u)/2,v=(d+f)/2,y=0;for(i=0;i<s;i++)(a=t[i]).x-=g,a.y-=v,y=Math.max(y,a.r+Math.sqrt(a.x*a.x+a.y*a.y));e.r=y,t.forEach(kn)}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 Mn(e){e._pack_next=e._pack_prev=e}function kn(e){delete e._pack_next,delete e._pack_prev}function An(e,t,r){var n=e.r+r.r,a=t.x-e.x,i=t.y-e.y;if(n&&(a||i)){var o=t.r+r.r,l=a*a+i*i,s=.5+((n*=n)-(o*=o))/(2*l),c=Math.sqrt(Math.max(0,2*o*(n+l)-(n-=l)*n-o*o))/(2*l);r.x=e.x+s*a+c*i,r.y=e.y+s*i-c*a}else r.x=e.x+n,r.y=e.y}function Ln(e,t){return e.parent==t.parent?1:2}function Sn(e){var t=e.children;return t.length?t[0]:e.t}function Dn(e){var t,r=e.children;return(t=r.length)?r[t-1]:e.t}function Cn(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function On(e,t,r){return e.a.parent===t.parent?e.a:r}function Pn(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function In(e,t){var r=e.x+t[3],n=e.y+t[0],a=e.dx-t[1]-t[3],i=e.dy-t[0]-t[2];return a<0&&(r+=a/2,a=0),i<0&&(n+=i/2,i=0),{x:r,y:n,dx:a,dy:i}}function Rn(e){var t=e[0],r=e[e.length-1];return t<r?[t,r]:[r,t]}function zn(e){return e.rangeExtent?e.rangeExtent():Rn(e.range())}function Nn(e,t,r,n){var a=r(e[0],e[1]),i=n(t[0],t[1]);return function(e){return i(a(e))}}function Fn(e,t){var r,n=0,a=e.length-1,i=e[n],o=e[a];return o<i&&(r=n,n=a,a=r,r=i,i=o,o=r),e[n]=t.floor(i),e[a]=t.ceil(o),e}function En(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:jn}e.layout.histogram=function(){var t=!0,r=Number,n=yn,a=gn;function i(i,o){for(var l,s,c=[],u=i.map(r,this),d=n.call(this,u,o),f=a.call(this,d,u,o),p=(o=-1,u.length),h=f.length-1,m=t?1:1/p;++o<h;)(l=c[o]=[]).dx=f[o+1]-(l.x=f[o]),l.y=0;if(h>0)for(o=-1;++o<p;)(s=u[o])>=d[0]&&s<=d[1]&&((l=c[e.bisect(f,s,1,h)-1]).y+=m,l.push(i[o]));return c}return i.value=function(e){return arguments.length?(r=e,i):r},i.range=function(e){return arguments.length?(n=ct(e),i):n},i.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return vn(t,e)}:ct(e),i):a},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(xn),n=0,a=[1,1];function i(e,i){var o=r.call(this,e,i),l=o[0],s=a[0],c=a[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(l.x=l.y=0,$r(l,(function(e){e.r=+u(e.value)})),$r(l,Tn),n){var d=n*(t?1:Math.max(2*l.r/s,2*l.r/c))/2;$r(l,(function(e){e.r+=d})),$r(l,Tn),$r(l,(function(e){e.r-=d}))}return function e(t,r,n,a){var i=t.children;if(t.x=r+=a*t.x,t.y=n+=a*t.y,t.r*=a,i)for(var o=-1,l=i.length;++o<l;)e(i[o],r,n,a)}(l,s/2,c/2,t?1:1/Math.max(2*l.r/s,2*l.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?(n=+e,i):n},Qr(i,r)},e.layout.tree=function(){var t=e.layout.hierarchy().sort(null).value(null),r=Ln,n=[1,1],a=null;function i(e,i){var c=t.call(this,e,i),u=c[0],d=function(e){var t,r={A:null,children:[e]},n=[r];for(;null!=(t=n.pop());)for(var a,i=t.children,o=0,l=i.length;o<l;++o)n.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 r.children[0]}(u);if($r(d,o),d.parent.m=-d.z,Kr(d,l),a)Kr(u,s);else{var f=u,p=u,h=u;Kr(u,(function(e){e.x<f.x&&(f=e),e.x>p.x&&(p=e),e.depth>h.depth&&(h=e)}));var m=r(f,p)/2-f.x,g=n[0]/(p.x+r(p,f)/2+m),v=n[1]/(h.depth||1);Kr(u,(function(e){e.x=(e.x+m)*g,e.y=e.depth*v}))}return c}function o(e){var t=e.children,n=e.parent.children,a=e.i?n[e.i-1]:null;if(t.length){!function(e){var t,r=0,n=0,a=e.children,i=a.length;for(;--i>=0;)(t=a[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var i=(t[0].z+t[t.length-1].z)/2;a?(e.z=a.z+r(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+r(e._,a._));e.parent.A=function(e,t,n){if(t){for(var a,i=e,o=e,l=t,s=i.parent.children[0],c=i.m,u=o.m,d=l.m,f=s.m;l=Dn(l),i=Sn(i),l&&i;)s=Sn(s),(o=Dn(o)).a=e,(a=l.z+d-i.z-c+r(l._,i._))>0&&(Cn(On(l,e,n),e,a),c+=a,u+=a),d+=l.m,c+=i.m,f+=s.m,u+=o.m;l&&!Dn(o)&&(o.t=l,o.m+=d-u),i&&!Sn(s)&&(s.t=i,s.m+=c-f,n=e)}return n}(e,a,e.parent.A||n[0])}function l(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=n[0],e.y=e.depth*n[1]}return i.separation=function(e){return arguments.length?(r=e,i):r},i.size=function(e){return arguments.length?(a=null==(n=e)?s:null,i):a?null:n},i.nodeSize=function(e){return arguments.length?(a=null==(n=e)?null:s,i):a?n:null},Qr(i,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=Ln,n=[1,1],a=!1;function i(i,o){var l,s=t.call(this,i,o),c=s[0],u=0;$r(c,(function(t){var n=t.children;n&&n.length?(t.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),t.y=function(t){return 1+e.max(t,(function(e){return e.y}))}(n)):(t.x=l?u+=r(t,l):0,t.y=0,l=t)}));var d=function e(t){var r=t.children;return r&&r.length?e(r[0]):t}(c),f=function e(t){var r,n=t.children;return n&&(r=n.length)?e(n[r-1]):t}(c),p=d.x-r(d,f)/2,h=f.x+r(f,d)/2;return $r(c,a?function(e){e.x=(e.x-c.x)*n[0],e.y=(c.y-e.y)*n[1]}:function(e){e.x=(e.x-p)/(h-p)*n[0],e.y=(1-(c.y?e.y/c.y:1))*n[1]}),s}return i.separation=function(e){return arguments.length?(r=e,i):r},i.size=function(e){return arguments.length?(a=null==(n=e),i):a?null:n},i.nodeSize=function(e){return arguments.length?(a=null!=(n=e),i):a?n:null},Qr(i,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),n=Math.round,a=[1,1],i=null,o=Pn,l=!1,s="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,a=-1,i=e.length;++a<i;)n=(r=e[a]).value*(t<0?0:t),r.area=isNaN(n)||n<=0?0:n}function d(e){var t=e.children;if(t&&t.length){var r,n,a,i=o(e),l=[],c=t.slice(),f=1/0,m="slice"===s?i.dx:"dice"===s?i.dy:"slice-dice"===s?1&e.depth?i.dy:i.dx:Math.min(i.dx,i.dy);for(u(c,i.dx*i.dy/e.value),l.area=0;(a=c.length)>0;)l.push(r=c[a-1]),l.area+=r.area,"squarify"!==s||(n=p(l,m))<=f?(c.pop(),f=n):(l.area-=l.pop().area,h(l,m,i,!1),m=Math.min(i.dx,i.dy),l.length=l.area=0,f=1/0);l.length&&(h(l,m,i,!0),l.length=l.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var r,n=o(e),a=t.slice(),i=[];for(u(a,n.dx*n.dy/e.value),i.area=0;r=a.pop();)i.push(r),i.area+=r.area,null!=r.z&&(h(i,r.z?n.dx:n.dy,n,!a.length),i.length=i.area=0);t.forEach(f)}}function p(e,t){for(var r,n=e.area,a=0,i=1/0,o=-1,l=e.length;++o<l;)(r=e[o].area)&&(r<i&&(i=r),r>a&&(a=r));return t*=t,(n*=n)?Math.max(t*a*c/n,n/(t*i*c)):1/0}function h(e,t,r,a){var i,o=-1,l=e.length,s=r.x,c=r.y,u=t?n(e.area/t):0;if(t==r.dx){for((a||u>r.dy)&&(u=r.dy);++o<l;)(i=e[o]).x=s,i.y=c,i.dy=u,s+=i.dx=Math.min(r.x+r.dx-s,u?n(i.area/u):0);i.z=!0,i.dx+=r.x+r.dx-s,r.y+=u,r.dy-=u}else{for((a||u>r.dx)&&(u=r.dx);++o<l;)(i=e[o]).x=s,i.y=c,i.dx=u,c+=i.dy=Math.min(r.y+r.dy-c,u?n(i.area/u):0);i.z=!1,i.dy+=r.y+r.dy-c,r.x+=u,r.dx-=u}}function m(e){var n=t||r(e),i=n[0];return i.x=i.y=0,i.value?(i.dx=a[0],i.dy=a[1]):i.dx=i.dy=0,t&&r.revalue(i),u([i],i.dx*i.dy/i.value),(t?f:d)(i),l&&(t=n),n}return m.size=function(e){return arguments.length?(a=e,m):a},m.padding=function(e){if(!arguments.length)return i;function t(t){var r=e.call(m,t,t.depth);return null==r?Pn(t):In(t,"number"==typeof r?[r,r,r,r]:r)}function r(t){return In(t,e)}var n;return o=null==(i=e)?Pn:"function"==(n=typeof e)?t:"number"===n?(e=[e,e,e,e],r):r,m},m.round=function(e){return arguments.length?(n=e?Math.round:Number,m):n!=Number},m.sticky=function(e){return arguments.length?(l=e,t=null,m):l},m.ratio=function(e){return arguments.length?(c=e,m):c},m.mode=function(e){return arguments.length?(s=e+"",m):s},Qr(m,r)},e.random={normal:function(e,t){var r=arguments.length;return r<2&&(t=1),r<1&&(e=0),function(){var r,n,a;do{a=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!a||a>1);return e+t*r*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 r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r<e;r++)t+=Math.random();return t}}},e.scale={};var jn={floor:C,ceil:C};function Hn(t,r,n,a){var i=[],o=[],l=0,s=Math.min(t.length,r.length)-1;for(t[s]<t[0]&&(t=t.slice().reverse(),r=r.slice().reverse());++l<=s;)i.push(n(t[l-1],t[l])),o.push(a(r[l-1],r[l]));return function(r){var n=e.bisect(t,r,1,s)-1;return o[n](i[n](r))}}function Bn(t,r){return e.rebind(t,r,"range","rangeRound","interpolate","clamp")}function Yn(e,t){return Fn(e,En(Vn(e,t)[2])),Fn(e,En(Vn(e,t)[2])),e}function Vn(e,t){null==t&&(t=10);var r=Rn(e),n=r[1]-r[0],a=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),i=t/n*a;return i<=.15?a*=10:i<=.35?a*=5:i<=.75&&(a*=2),r[0]=Math.ceil(r[0]/a)*a,r[1]=Math.floor(r[1]/a)*a+.5*a,r[2]=a,r}function Un(t,r){return e.range.apply(e,Vn(t,r))}e.scale.linear=function(){return function e(t,r,n,a){var i,o;function l(){var e=Math.min(t.length,r.length)>2?Hn:Nn,l=a?Br:Hr;return i=e(t,r,l,n),o=e(r,t,l,yr),s}function s(e){return i(e)}return s.invert=function(e){return o(e)},s.domain=function(e){return arguments.length?(t=e.map(Number),l()):t},s.range=function(e){return arguments.length?(r=e,l()):r},s.rangeRound=function(e){return s.range(e).interpolate(Ir)},s.clamp=function(e){return arguments.length?(a=e,l()):a},s.interpolate=function(e){return arguments.length?(n=e,l()):n},s.ticks=function(e){return Un(t,e)},s.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},s.nice=function(e){return Yn(t,e),l()},s.copy=function(){return e(t,r,n,a)},l()}([0,1],[0,1],yr,!1)};e.scale.log=function(){return function e(t,r,n,a){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(r)}function o(e){return n?Math.pow(r,e):-Math.pow(r,-e)}function l(e){return t(i(e))}return l.invert=function(e){return o(t.invert(e))},l.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((a=e.map(Number)).map(i)),l):a},l.base=function(e){return arguments.length?(r=+e,t.domain(a.map(i)),l):r},l.nice=function(){var e=Fn(a.map(i),n?Math:qn);return t.domain(e),a=e.map(o),l},l.ticks=function(){var e=Rn(a),t=[],l=e[0],s=e[1],c=Math.floor(i(l)),u=Math.ceil(i(s)),d=r%1?2:r;if(isFinite(u-c)){if(n){for(;c<u;c++)for(var f=1;f<d;f++)t.push(o(c)*f);t.push(o(c))}else for(t.push(o(c));c++<u;)for(f=d-1;f>0;f--)t.push(o(c)*f);for(c=0;t[c]<l;c++);for(u=t.length;t[u-1]>s;u--);t=t.slice(c,u)}return t},l.copy=function(){return e(t.copy(),r,n,a)},Bn(l,t)}(e.scale.linear().domain([0,1]),10,!0,[1,10])};var qn={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Gn(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}e.scale.pow=function(){return function e(t,r,n){var a=Gn(r),i=Gn(1/r);function o(e){return t(a(e))}return o.invert=function(e){return i(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(a)),o):n},o.ticks=function(e){return Un(n,e)},o.tickFormat=function(e,t){return d3_scale_linearTickFormat(n,e,t)},o.nice=function(e){return o.domain(Yn(n,e))},o.exponent=function(e){return arguments.length?(a=Gn(r=e),i=Gn(1/r),t.domain(n.map(a)),o):r},o.copy=function(){return e(t.copy(),r,n)},Bn(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(r,n){var a,i,o;function l(e){return i[((a.get(e)||("range"===n.t?a.set(e,r.push(e)):NaN))-1)%i.length]}function s(t,n){return e.range(r.length).map((function(e){return t+n*e}))}return l.domain=function(e){if(!arguments.length)return r;r=[],a=new _;for(var t,i=-1,o=e.length;++i<o;)a.has(t=e[i])||a.set(t,r.push(t));return l[n.t].apply(l,n.a)},l.range=function(e){return arguments.length?(i=e,o=0,n={t:"range",a:arguments},l):i},l.rangePoints=function(e,t){arguments.length<2&&(t=0);var a=e[0],c=e[1],u=r.length<2?(a=(a+c)/2,0):(c-a)/(r.length-1+t);return i=s(a+u*t/2,u),o=0,n={t:"rangePoints",a:arguments},l},l.rangeRoundPoints=function(e,t){arguments.length<2&&(t=0);var a=e[0],c=e[1],u=r.length<2?(a=c=Math.round((a+c)/2),0):(c-a)/(r.length-1+t)|0;return i=s(a+Math.round(u*t/2+(c-a-(r.length-1+t)*u)/2),u),o=0,n={t:"rangeRoundPoints",a:arguments},l},l.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)/(r.length-t+2*a);return i=s(u+f*a,f),c&&i.reverse(),o=f*(1-t),n={t:"rangeBands",a:arguments},l},l.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)/(r.length-t+2*a));return i=s(u+Math.round((d-u-(r.length-t)*f)/2),f),c&&i.reverse(),o=Math.round(f*(1-t)),n={t:"rangeRoundBands",a:arguments},l},l.rangeBand=function(){return o},l.rangeExtent=function(){return Rn(n.a[0])},l.copy=function(){return t(r,n)},l.domain(r)}([],{t:"range",a:[[]]})},e.scale.category10=function(){return e.scale.ordinal().range(Zn)},e.scale.category20=function(){return e.scale.ordinal().range(Wn)},e.scale.category20b=function(){return e.scale.ordinal().range(Xn)},e.scale.category20c=function(){return e.scale.ordinal().range(Jn)};var Zn=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(et),Wn=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(et),Xn=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(et),Jn=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(et);function Qn(){return 0}e.scale.quantile=function(){return function t(r,n){var a;function i(){var t=0,i=n.length;for(a=[];++t<i;)a[t-1]=e.quantile(r,t/i);return o}function o(t){if(!isNaN(t=+t))return n[e.bisect(a,t)]}return o.domain=function(e){return arguments.length?(r=e.map(p).filter(h).sort(f),i()):r},o.range=function(e){return arguments.length?(n=e,i()):n},o.quantiles=function(){return a},o.invertExtent=function(e){return(e=n.indexOf(e))<0?[NaN,NaN]:[e>0?a[e-1]:r[0],e<a.length?a[e]:r[r.length-1]]},o.copy=function(){return t(r,n)},i()}([],[])},e.scale.quantize=function(){return function e(t,r,n){var a,i;function o(e){return n[Math.max(0,Math.min(i,Math.floor(a*(e-t))))]}function l(){return a=n.length/(r-t),i=n.length-1,o}return o.domain=function(e){return arguments.length?(t=+e[0],r=+e[e.length-1],l()):[t,r]},o.range=function(e){return arguments.length?(n=e,l()):n},o.invertExtent=function(e){return[e=(e=n.indexOf(e))<0?NaN:e/a+t,e+1/a]},o.copy=function(){return e(t,r,n)},l()}(0,1,[0,1])},e.scale.threshold=function(){return function t(r,n){function a(t){if(t<=t)return n[e.bisect(r,t)]}return a.domain=function(e){return arguments.length?(r=e,a):r},a.range=function(e){return arguments.length?(n=e,a):n},a.invertExtent=function(e){return e=n.indexOf(e),[r[e-1],r[e]]},a.copy=function(){return t(r,n)},a}([.5],[0,1])},e.scale.identity=function(){return function e(t){function r(e){return+e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=e.map(r),r):t},r.ticks=function(e){return Un(t,e)},r.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},r.copy=function(){return e(t)},r}([0,1])},e.svg={},e.svg.arc=function(){var e=$n,t=ea,r=Qn,n=Kn,a=ta,i=ra,o=na;function l(){var l=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+t.apply(this,arguments)),u=a.apply(this,arguments)-Se,d=i.apply(this,arguments)-Se,f=Math.abs(d-u),p=u>d?0:1;if(c<l&&(h=c,c=l,l=h),f>=Le)return s(c,p)+(l?s(l,1-p):"")+"Z";var h,m,g,v,y,x,b,_,w,T,M,k,A=0,L=0,S=[];if((v=(+o.apply(this,arguments)||0)/2)&&(g=n===Kn?Math.sqrt(l*l+c*c):+n.apply(this,arguments),p||(L*=-1),c&&(L=Oe(g/c*Math.sin(v))),l&&(A=Oe(g/l*Math.sin(v)))),c){y=c*Math.cos(u+L),x=c*Math.sin(u+L),b=c*Math.cos(d-L),_=c*Math.sin(d-L);var D=Math.abs(d-u-2*L)<=ke?0:1;if(L&&aa(y,x,b,_)===p^D){var C=(u+d)/2;y=c*Math.cos(C),x=c*Math.sin(C),b=_=null}}else y=x=0;if(l){w=l*Math.cos(d-A),T=l*Math.sin(d-A),M=l*Math.cos(u+A),k=l*Math.sin(u+A);var O=Math.abs(u-d+2*A)<=ke?0:1;if(A&&aa(w,T,M,k)===1-p^O){var P=(u+d)/2;w=l*Math.cos(P),T=l*Math.sin(P),M=k=null}}else w=T=0;if(f>Me&&(h=Math.min(Math.abs(c-l)/2,+r.apply(this,arguments)))>.001){m=l<c^p?0:1;var I=h,R=h;if(f<ke){var z=null==M?[w,T]:null==b?[y,x]:Lt([y,x],[M,k],[b,_],[w,T]),N=y-z[0],F=x-z[1],E=b-z[0],j=_-z[1],H=1/Math.sin(Math.acos((N*E+F*j)/(Math.sqrt(N*N+F*F)*Math.sqrt(E*E+j*j)))/2),B=Math.sqrt(z[0]*z[0]+z[1]*z[1]);R=Math.min(h,(l-B)/(H-1)),I=Math.min(h,(c-B)/(H+1))}if(null!=b){var Y=ia(null==M?[w,T]:[M,k],[y,x],c,I,p),V=ia([b,_],[w,T],c,I,p);h===I?S.push("M",Y[0],"A",I,",",I," 0 0,",m," ",Y[1],"A",c,",",c," 0 ",1-p^aa(Y[1][0],Y[1][1],V[1][0],V[1][1]),",",p," ",V[1],"A",I,",",I," 0 0,",m," ",V[0]):S.push("M",Y[0],"A",I,",",I," 0 1,",m," ",V[0])}else S.push("M",y,",",x);if(null!=M){var U=ia([y,x],[M,k],l,-R,p),q=ia([w,T],null==b?[y,x]:[b,_],l,-R,p);h===R?S.push("L",q[0],"A",R,",",R," 0 0,",m," ",q[1],"A",l,",",l," 0 ",p^aa(q[1][0],q[1][1],U[1][0],U[1][1]),",",1-p," ",U[1],"A",R,",",R," 0 0,",m," ",U[0]):S.push("L",q[0],"A",R,",",R," 0 0,",m," ",U[0])}else S.push("L",w,",",T)}else S.push("M",y,",",x),null!=b&&S.push("A",c,",",c," 0 ",D,",",p," ",b,",",_),S.push("L",w,",",T),null!=M&&S.push("A",l,",",l," 0 ",O,",",1-p," ",M,",",k);return S.push("Z"),S.join("")}function s(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}return l.innerRadius=function(t){return arguments.length?(e=ct(t),l):e},l.outerRadius=function(e){return arguments.length?(t=ct(e),l):t},l.cornerRadius=function(e){return arguments.length?(r=ct(e),l):r},l.padRadius=function(e){return arguments.length?(n=e==Kn?Kn:ct(e),l):n},l.startAngle=function(e){return arguments.length?(a=ct(e),l):a},l.endAngle=function(e){return arguments.length?(i=ct(e),l):i},l.padAngle=function(e){return arguments.length?(o=ct(e),l):o},l.centroid=function(){var r=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,n=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-Se;return[Math.cos(n)*r,Math.sin(n)*r]},l};var Kn="auto";function $n(e){return e.innerRadius}function ea(e){return e.outerRadius}function ta(e){return e.startAngle}function ra(e){return e.endAngle}function na(e){return e&&e.padAngle}function aa(e,t,r,n){return(e-r)*t-(t-n)*e>0?0:1}function ia(e,t,r,n,a){var i=e[0]-t[0],o=e[1]-t[1],l=(a?n:-n)/Math.sqrt(i*i+o*o),s=l*o,c=-l*i,u=e[0]+s,d=e[1]+c,f=t[0]+s,p=t[1]+c,h=(u+f)/2,m=(d+p)/2,g=f-u,v=p-d,y=g*g+v*v,x=r-n,b=u*p-f*d,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-g*_)/y,T=(-b*g-v*_)/y,M=(b*v+g*_)/y,k=(-b*g+v*_)/y,A=w-h,L=T-m,S=M-h,D=k-m;return A*A+L*L>S*S+D*D&&(w=M,T=k),[[w-s,T-c],[w*r/x,T*r/x]]}function oa(){return!0}function la(e){var t=_t,r=wt,n=oa,a=ca,i=a.key,o=.7;function l(i){var l,s=[],c=[],u=-1,d=i.length,f=ct(t),p=ct(r);function h(){s.push("M",a(e(c),o))}for(;++u<d;)n.call(this,l=i[u],u)?c.push([+f.call(this,l,u),+p.call(this,l,u)]):c.length&&(h(),c=[]);return c.length&&h(),s.length?s.join(""):null}return l.x=function(e){return arguments.length?(t=e,l):t},l.y=function(e){return arguments.length?(r=e,l):r},l.defined=function(e){return arguments.length?(n=e,l):n},l.interpolate=function(e){return arguments.length?(i="function"==typeof e?a=e:(a=sa.get(e)||ca).key,l):i},l.tension=function(e){return arguments.length?(o=e,l):o},l}e.svg.line=function(){return la(C)};var sa=e.map({linear:ca,"linear-closed":ua,step:function(e){var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];for(;++t<r;)a.push("H",(n[0]+(n=e[t])[0])/2,"V",n[1]);r>1&&a.push("H",n[0]);return a.join("")},"step-before":da,"step-after":fa,basis:ma,"basis-open":function(e){if(e.length<4)return ca(e);var t,r=[],n=-1,a=e.length,i=[0],o=[0];for(;++n<3;)t=e[n],i.push(t[0]),o.push(t[1]);r.push(ga(xa,i)+","+ga(xa,o)),--n;for(;++n<a;)t=e[n],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),ba(r,i,o);return r.join("")},"basis-closed":function(e){var t,r,n=-1,a=e.length,i=a+4,o=[],l=[];for(;++n<4;)r=e[n%a],o.push(r[0]),l.push(r[1]);t=[ga(xa,o),",",ga(xa,l)],--n;for(;++n<i;)r=e[n%a],o.shift(),o.push(r[0]),l.shift(),l.push(r[1]),ba(t,o,l);return t.join("")},bundle:function(e,t){var r=e.length-1;if(r)for(var n,a,i=e[0][0],o=e[0][1],l=e[r][0]-i,s=e[r][1]-o,c=-1;++c<=r;)n=e[c],a=c/r,n[0]=t*n[0]+(1-t)*(i+a*l),n[1]=t*n[1]+(1-t)*(o+a*s);return ma(e)},cardinal:function(e,t){return e.length<3?ca(e):e[0]+pa(e,ha(e,t))},"cardinal-open":function(e,t){return e.length<4?ca(e):e[1]+pa(e.slice(1,-1),ha(e,t))},"cardinal-closed":function(e,t){return e.length<3?ua(e):e[0]+pa((e.push(e[0]),e),ha([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?ca(e):e[0]+pa(e,function(e){var t,r,n,a,i=[],o=function(e){var t=0,r=e.length-1,n=[],a=e[0],i=e[1],o=n[0]=_a(a,i);for(;++t<r;)n[t]=(o+(o=_a(a=i,i=e[t+1])))/2;return n[t]=o,n}(e),l=-1,s=e.length-1;for(;++l<s;)t=_a(e[l],e[l+1]),y(t)<Me?o[l]=o[l+1]=0:(r=o[l]/t,n=o[l+1]/t,(a=r*r+n*n)>9&&(a=3*t/Math.sqrt(a),o[l]=a*r,o[l+1]=a*n));l=-1;for(;++l<=s;)a=(e[Math.min(s,l+1)][0]-e[Math.max(0,l-1)][0])/(6*(1+o[l]*o[l])),i.push([a||0,o[l]*a||0]);return i}(e))}});function ca(e){return e.length>1?e.join("L"):e+"Z"}function ua(e){return e.join("L")+"Z"}function da(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t<r;)a.push("V",(n=e[t])[1],"H",n[0]);return a.join("")}function fa(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t<r;)a.push("H",(n=e[t])[0],"V",n[1]);return a.join("")}function pa(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return ca(e);var r=e.length!=t.length,n="",a=e[0],i=e[1],o=t[0],l=o,s=1;if(r&&(n+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],a=e[1],s=2),t.length>1){l=t[1],i=e[s],s++,n+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-l[0])+","+(i[1]-l[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,s++)i=e[s],l=t[c],n+="S"+(i[0]-l[0])+","+(i[1]-l[1])+","+i[0]+","+i[1]}if(r){var u=e[s];n+="Q"+(i[0]+2*l[0]/3)+","+(i[1]+2*l[1]/3)+","+u[0]+","+u[1]}return n}function ha(e,t){for(var r,n=[],a=(1-t)/2,i=e[0],o=e[1],l=1,s=e.length;++l<s;)r=i,i=o,o=e[l],n.push([a*(o[0]-r[0]),a*(o[1]-r[1])]);return n}function ma(e){if(e.length<3)return ca(e);var t=1,r=e.length,n=e[0],a=n[0],i=n[1],o=[a,a,a,(n=e[1])[0]],l=[i,i,i,n[1]],s=[a,",",i,"L",ga(xa,o),",",ga(xa,l)];for(e.push(e[r-1]);++t<=r;)n=e[t],o.shift(),o.push(n[0]),l.shift(),l.push(n[1]),ba(s,o,l);return e.pop(),s.push("L",n),s.join("")}function ga(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}sa.forEach((function(e,t){t.key=e,t.closed=/-closed$/.test(e)}));var va=[0,2/3,1/3,0],ya=[0,1/3,2/3,0],xa=[0,1/6,2/3,1/6];function ba(e,t,r){e.push("C",ga(va,t),",",ga(va,r),",",ga(ya,t),",",ga(ya,r),",",ga(xa,t),",",ga(xa,r))}function _a(e,t){return(t[1]-e[1])/(t[0]-e[0])}function wa(e){for(var t,r,n,a=-1,i=e.length;++a<i;)r=(t=e[a])[0],n=t[1]-Se,t[0]=r*Math.cos(n),t[1]=r*Math.sin(n);return e}function Ta(e){var t=_t,r=_t,n=0,a=wt,i=oa,o=ca,l=o.key,s=o,c="L",u=.7;function d(l){var d,f,p,h=[],m=[],g=[],v=-1,y=l.length,x=ct(t),b=ct(n),_=t===r?function(){return f}:ct(r),w=n===a?function(){return p}:ct(a);function T(){h.push("M",o(e(g),u),c,s(e(m.reverse()),u),"Z")}for(;++v<y;)i.call(this,d=l[v],v)?(m.push([f=+x.call(this,d,v),p=+b.call(this,d,v)]),g.push([+_.call(this,d,v),+w.call(this,d,v)])):m.length&&(T(),m=[],g=[]);return m.length&&T(),h.length?h.join(""):null}return d.x=function(e){return arguments.length?(t=r=e,d):r},d.x0=function(e){return arguments.length?(t=e,d):t},d.x1=function(e){return arguments.length?(r=e,d):r},d.y=function(e){return arguments.length?(n=a=e,d):a},d.y0=function(e){return arguments.length?(n=e,d):n},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?(l="function"==typeof e?o=e:(o=sa.get(e)||ca).key,s=o.reverse||o,c=o.closed?"M":"L",d):l},d.tension=function(e){return arguments.length?(u=e,d):u},d}function Ma(e){return e.source}function ka(e){return e.target}function Aa(e){return e.radius}function La(e){return[e.x,e.y]}function Sa(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Se;return[r*Math.cos(n),r*Math.sin(n)]}}function Da(){return 64}function Ca(){return"circle"}function Oa(e){var t=Math.sqrt(e/ke);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=la(wa);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},da.reverse=fa,fa.reverse=da,e.svg.area=function(){return Ta(C)},e.svg.area.radial=function(){var e=Ta(wa);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=Ma,t=ka,r=Aa,n=ta,a=ra;function i(r,n){var a,i,c=o(this,e,r,n),u=o(this,t,r,n);return"M"+c.p0+l(c.r,c.p1,c.a1-c.a0)+(i=u,((a=c).a0==i.a0&&a.a1==i.a1?s(c.r,c.p1,c.r,c.p0):s(c.r,c.p1,u.r,u.p0)+l(u.r,u.p1,u.a1-u.a0)+s(u.r,u.p1,c.r,c.p0))+"Z")}function o(e,t,i,o){var l=t.call(e,i,o),s=r.call(e,l,o),c=n.call(e,l,o)-Se,u=a.call(e,l,o)-Se;return{r:s,a0:c,a1:u,p0:[s*Math.cos(c),s*Math.sin(c)],p1:[s*Math.cos(u),s*Math.sin(u)]}}function l(e,t,r){return"A"+e+","+e+" 0 "+ +(r>ke)+",1 "+t}function s(e,t,r,n){return"Q 0,0 "+n}return i.radius=function(e){return arguments.length?(r=ct(e),i):r},i.source=function(t){return arguments.length?(e=ct(t),i):e},i.target=function(e){return arguments.length?(t=ct(e),i):t},i.startAngle=function(e){return arguments.length?(n=ct(e),i):n},i.endAngle=function(e){return arguments.length?(a=ct(e),i):a},i},e.svg.diagonal=function(){var e=Ma,t=ka,r=La;function n(n,a){var i=e.call(this,n,a),o=t.call(this,n,a),l=(i.y+o.y)/2,s=[i,{x:i.x,y:l},{x:o.x,y:l},o];return"M"+(s=s.map(r))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return n.source=function(t){return arguments.length?(e=ct(t),n):e},n.target=function(e){return arguments.length?(t=ct(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=La,n=t.projection;return t.projection=function(e){return arguments.length?n(Sa(r=e)):r},t},e.svg.symbol=function(){var e=Ca,t=Da;function r(r,n){return(Pa.get(e.call(this,r,n))||Oa)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=ct(t),r):e},r.size=function(e){return arguments.length?(t=ct(e),r):t},r};var Pa=e.map({circle:Oa,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*Ra)),r=t*Ra;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",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/Ia),r=t*Ia/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ia),r=t*Ia/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=Pa.keys();var Ia=Math.sqrt(3),Ra=Math.tan(30*De);G.transition=function(e){for(var t,r,n=Ea||++Ba,a=Ua(e),i=[],o=ja||{time:Date.now(),ease:Sr,delay:0,duration:250},l=-1,s=this.length;++l<s;){i.push(t=[]);for(var c=this[l],u=-1,d=c.length;++u<d;)(r=c[u])&&qa(r,u,a,n,o),t.push(r)}return Fa(i,a,n)},G.interrupt=function(e){return this.each(null==e?za:Na(Ua(e)))};var za=Na(Ua());function Na(e){return function(){var t,r,n;(t=this[e])&&(n=t[r=t.active])&&(n.timer.c=null,n.timer.t=NaN,--t.count?delete t[r]:delete this[e],t.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function Fa(e,t,r){return B(e,Ha),e.namespace=t,e.id=r,e}var Ea,ja,Ha=[],Ba=0;function Ya(e,t,r,n){var a=e.id,i=e.namespace;return ue(e,"function"==typeof r?function(e,o,l){e[i][a].tween.set(t,n(r.call(e,e.__data__,o,l)))}:(r=n(r),function(e){e[i][a].tween.set(t,r)}))}function Va(e){return null==e&&(e=""),function(){this.textContent=e}}function Ua(e){return null==e?"__transition__":"__transition_"+e+"__"}function qa(e,t,r,n,a){var i,o,l,s,c,u=e[r]||(e[r]={active:0,count:0}),d=u[n];function f(r){var a=u.active,f=u[a];for(var h 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(+h<n){var m=u[h];m.timer.c=null,m.timer.t=NaN,--u.count,delete u[h]}o.c=p,vt((function(){return o.c&&p(r||1)&&(o.c=null,o.t=NaN),1}),0,i),u.active=n,d.event&&d.event.start.call(e,e.__data__,t),c=[],d.tween.forEach((function(r,n){(n=n.call(e,e.__data__,t))&&c.push(n)})),s=d.ease,l=d.duration}function p(a){for(var i=a/l,o=s(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[n]:delete e[r],1}d||(i=a.time,o=vt((function(e){var t=d.delay;if(o.t=t+i,t<=e)return f(e-t);o.c=f}),0,i),d=u[n]={tween:new _,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++u.count)}Ha.call=G.call,Ha.empty=G.empty,Ha.node=G.node,Ha.size=G.size,e.transition=function(t,r){return t&&t.transition?Ea?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=Ha,Ha.select=function(e){var t,r,n,a=this.id,i=this.namespace,o=[];e=Z(e);for(var l=-1,s=this.length;++l<s;){o.push(t=[]);for(var c=this[l],u=-1,d=c.length;++u<d;)(n=c[u])&&(r=e.call(n,n.__data__,u,l))?("__data__"in n&&(r.__data__=n.__data__),qa(r,u,i,a,n[i][a]),t.push(r)):t.push(null)}return Fa(o,i,a)},Ha.selectAll=function(e){var t,r,n,a,i,o=this.id,l=this.namespace,s=[];e=W(e);for(var c=-1,u=this.length;++c<u;)for(var d=this[c],f=-1,p=d.length;++f<p;)if(n=d[f]){i=n[l][o],r=e.call(n,n.__data__,f,c),s.push(t=[]);for(var h=-1,m=r.length;++h<m;)(a=r[h])&&qa(a,h,l,o,i),t.push(a)}return Fa(s,l,o)},Ha.filter=function(e){var t,r,n=[];"function"!=typeof e&&(e=se(e));for(var a=0,i=this.length;a<i;a++){n.push(t=[]);for(var o,l=0,s=(o=this[a]).length;l<s;l++)(r=o[l])&&e.call(r,r.__data__,l,a)&&t.push(r)}return Fa(n,this.namespace,this.id)},Ha.tween=function(e,t){var r=this.id,n=this.namespace;return arguments.length<2?this.node()[n][r].tween.get(e):ue(this,null==t?function(t){t[n][r].tween.remove(e)}:function(a){a[n][r].tween.set(e,t)})},Ha.attr=function(t,r){if(arguments.length<2){for(r in t)this.attr(r,t[r]);return this}var n="transform"==t?jr:yr,a=e.ns.qualify(t);function i(){this.removeAttribute(a)}function o(){this.removeAttributeNS(a.space,a.local)}function l(e){return null==e?i:(e+="",function(){var t,r=this.getAttribute(a);return r!==e&&(t=n(r,e),function(e){this.setAttribute(a,t(e))})})}function s(e){return null==e?o:(e+="",function(){var t,r=this.getAttributeNS(a.space,a.local);return r!==e&&(t=n(r,e),function(e){this.setAttributeNS(a.space,a.local,t(e))})})}return Ya(this,"attr."+t,r,a.local?s:l)},Ha.attrTween=function(t,r){var n=e.ns.qualify(t);return this.tween("attr."+t,n.local?function(e,t){var a=r.call(this,e,t,this.getAttributeNS(n.space,n.local));return a&&function(e){this.setAttributeNS(n.space,n.local,a(e))}}:function(e,t){var a=r.call(this,e,t,this.getAttribute(n));return a&&function(e){this.setAttribute(n,a(e))}})},Ha.style=function(e,t,r){var n=arguments.length;if(n<3){if("string"!=typeof e){for(r in n<2&&(t=""),e)this.style(r,e[r],t);return this}r=""}function a(){this.style.removeProperty(e)}function i(t){return null==t?a:(t+="",function(){var n,a=o(this).getComputedStyle(this,null).getPropertyValue(e);return a!==t&&(n=yr(a,t),function(t){this.style.setProperty(e,n(t),r)})})}return Ya(this,"style."+e,t,i)},Ha.styleTween=function(e,t,r){function n(n,a){var i=t.call(this,n,a,o(this).getComputedStyle(this,null).getPropertyValue(e));return i&&function(t){this.style.setProperty(e,i(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+e,n)},Ha.text=function(e){return Ya(this,"text",e,Va)},Ha.remove=function(){var e=this.namespace;return this.each("end.transition",(function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)}))},Ha.ease=function(t){var r=this.id,n=this.namespace;return arguments.length<1?this.node()[n][r].ease:("function"!=typeof t&&(t=e.ease.apply(e,arguments)),ue(this,(function(e){e[n][r].ease=t})))},Ha.delay=function(e){var t=this.id,r=this.namespace;return arguments.length<1?this.node()[r][t].delay:ue(this,"function"==typeof e?function(n,a,i){n[r][t].delay=+e.call(n,n.__data__,a,i)}:(e=+e,function(n){n[r][t].delay=e}))},Ha.duration=function(e){var t=this.id,r=this.namespace;return arguments.length<1?this.node()[r][t].duration:ue(this,"function"==typeof e?function(n,a,i){n[r][t].duration=Math.max(1,e.call(n,n.__data__,a,i))}:(e=Math.max(1,e),function(n){n[r][t].duration=e}))},Ha.each=function(t,r){var n=this.id,a=this.namespace;if(arguments.length<2){var i=ja,o=Ea;try{Ea=n,ue(this,(function(e,r,i){ja=e[a][n],t.call(e,e.__data__,r,i)}))}finally{ja=i,Ea=o}}else ue(this,(function(i){var o=i[a][n];(o.event||(o.event=e.dispatch("start","end","interrupt"))).on(t,r)}));return this},Ha.transition=function(){for(var e,t,r,n=this.id,a=++Ba,i=this.namespace,o=[],l=0,s=this.length;l<s;l++){o.push(e=[]);for(var c,u=0,d=(c=this[l]).length;u<d;u++)(t=c[u])&&qa(t,u,i,a,{time:(r=t[i][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),e.push(t)}return Fa(o,i,a)},e.svg.axis=function(){var t,r=e.scale.linear(),a=Ga,i=6,o=6,l=3,s=[10],c=null;function u(n){n.each((function(){var n,u=e.select(this),d=this.__chart__||r,f=this.__chart__=r.copy(),p=null==c?f.ticks?f.ticks.apply(f,s):f.domain():c,h=null==t?f.tickFormat?f.tickFormat.apply(f,s):C:t,m=u.selectAll(".tick").data(p,f),g=m.enter().insert("g",".domain").attr("class","tick").style("opacity",Me),v=e.transition(m.exit()).style("opacity",Me).remove(),y=e.transition(m.order()).style("opacity",1),x=Math.max(i,0)+l,b=zn(f),_=u.selectAll(".domain").data([0]),w=(_.enter().append("path").attr("class","domain"),e.transition(_));g.append("line"),g.append("text");var T,M,k,A,L=g.select("line"),S=y.select("line"),D=m.select("text").text(h),O=g.select("text"),P=y.select("text"),I="top"===a||"left"===a?-1:1;if("bottom"===a||"top"===a?(n=Wa,T="x",k="y",M="x2",A="y2",D.attr("dy",I<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+I*o+"V0H"+b[1]+"V"+I*o)):(n=Xa,T="y",k="x",M="y2",A="x2",D.attr("dy",".32em").style("text-anchor",I<0?"end":"start"),w.attr("d","M"+I*o+","+b[0]+"H0V"+b[1]+"H"+I*o)),L.attr(A,I*i),O.attr(k,I*x),S.attr(M,0).attr(A,I*i),P.attr(T,0).attr(k,I*x),f.rangeBand){var R=f,z=R.rangeBand()/2;d=f=function(e){return R(e)+z}}else d.rangeBand?d=f:v.call(n,f,d);g.call(n,d,f),y.call(n,f,f)}))}return u.scale=function(e){return arguments.length?(r=e,u):r},u.orient=function(e){return arguments.length?(a=e in Za?e+"":Ga,u):a},u.ticks=function(){return arguments.length?(s=n(arguments),u):s},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?(l=+e,u):l},u.tickSubdivide=function(){return arguments.length&&u},u};var Ga="bottom",Za={top:1,right:1,bottom:1,left:1};function Wa(e,t,r){e.attr("transform",(function(e){var n=t(e);return"translate("+(isFinite(n)?n:r(e))+",0)"}))}function Xa(e,t,r){e.attr("transform",(function(e){var n=t(e);return"translate(0,"+(isFinite(n)?n:r(e))+")"}))}e.svg.brush=function(){var t,r,n=j(f,"brushstart","brush","brushend"),a=null,i=null,l=[0,0],s=[0,0],c=!0,u=!0,d=Qa[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",g).on("touchstart.brush",g),r=t.selectAll(".background").data([0]);r.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 n=t.selectAll(".resize").data(d,C);n.exit().remove(),n.enter().append("g").attr("class",(function(e){return"resize "+e})).style("cursor",(function(e){return Ja[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"),n.style("display",f.empty()?"none":null);var o,l=e.transition(t),s=e.transition(r);a&&(o=zn(a),s.attr("x",o[0]).attr("width",o[1]-o[0]),h(l)),i&&(o=zn(i),s.attr("y",o[0]).attr("height",o[1]-o[0]),m(l)),p(l)}))}function p(e){e.selectAll(".resize").attr("transform",(function(e){return"translate("+l[+/e$/.test(e)]+","+s[+/^s/.test(e)]+")"}))}function h(e){e.select(".extent").attr("x",l[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function m(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var d,g,v=this,y=e.select(e.event.target),x=n.of(v,arguments),b=e.select(v),_=y.datum(),w=!/^(n|s)$/.test(_)&&a,T=!/^(e|w)$/.test(_)&&i,M=y.classed("extent"),k=be(v),A=e.mouse(v),L=e.select(o(v)).on("keydown.brush",C).on("keyup.brush",O);if(e.event.changedTouches?L.on("touchmove.brush",P).on("touchend.brush",R):L.on("mousemove.brush",P).on("mouseup.brush",R),b.interrupt().selectAll("*").interrupt(),M)A[0]=l[0]-A[0],A[1]=s[0]-A[1];else if(_){var S=+/w$/.test(_),D=+/^n/.test(_);g=[l[1-S]-A[0],s[1-D]-A[1]],A[0]=l[S],A[1]=s[D]}else e.event.altKey&&(d=A.slice());function C(){32==e.event.keyCode&&(M||(d=null,A[0]-=l[1],A[1]-=s[1],M=2),F())}function O(){32==e.event.keyCode&&2==M&&(A[0]+=l[1],A[1]+=s[1],M=0,F())}function P(){var t=e.mouse(v),r=!1;g&&(t[0]+=g[0],t[1]+=g[1]),M||(e.event.altKey?(d||(d=[(l[0]+l[1])/2,(s[0]+s[1])/2]),A[0]=l[+(t[0]<d[0])],A[1]=s[+(t[1]<d[1])]):d=null),w&&I(t,a,0)&&(h(b),r=!0),T&&I(t,i,1)&&(m(b),r=!0),r&&(p(b),x({type:"brush",mode:M?"move":"resize"}))}function I(e,n,a){var i,o,f=zn(n),p=f[0],h=f[1],m=A[a],g=a?s:l,v=g[1]-g[0];if(M&&(p-=m,h-=v+m),i=(a?u:c)?Math.max(p,Math.min(h,e[a])):e[a],M?o=(i+=m)+v:(d&&(m=Math.max(p,Math.min(h,2*d[a]-i))),m<i?(o=i,i=m):o=m),g[0]!=i||g[1]!=o)return a?r=null:t=null,g[0]=i,g[1]=o,!0}function R(){P(),b.style("pointer-events","all").selectAll(".resize").style("display",f.empty()?"none":null),e.select("body").style("cursor",null),L.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),k(),x({type:"brushend"})}b.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",y.style("cursor")),x({type:"brushstart"}),P()}return f.event=function(a){a.each((function(){var a=n.of(this,arguments),i={x:l,y:s,i:t,j:r},o=this.__chart__||i;this.__chart__=i,Ea?e.select(this).transition().each("start.brush",(function(){t=o.i,r=o.j,l=o.x,s=o.y,a({type:"brushstart"})})).tween("brush:brush",(function(){var e=xr(l,i.x),n=xr(s,i.y);return t=r=null,function(t){l=i.x=e(t),s=i.y=n(t),a({type:"brush",mode:"resize"})}})).each("end.brush",(function(){t=i.i,r=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=Qa[!(a=e)<<1|!i],f):a},f.y=function(e){return arguments.length?(d=Qa[!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 n,o,c,u,d;return arguments.length?(a&&(n=e[0],o=e[1],i&&(n=n[0],o=o[0]),t=[n,o],a.invert&&(n=a(n),o=a(o)),o<n&&(d=n,n=o,o=d),n==l[0]&&o==l[1]||(l=[n,o])),i&&(c=e[0],u=e[1],a&&(c=c[1],u=u[1]),r=[c,u],i.invert&&(c=i(c),u=i(u)),u<c&&(d=c,c=u,u=d),c==s[0]&&u==s[1]||(s=[c,u])),f):(a&&(t?(n=t[0],o=t[1]):(n=l[0],o=l[1],a.invert&&(n=a.invert(n),o=a.invert(o)),o<n&&(d=n,n=o,o=d))),i&&(r?(c=r[0],u=r[1]):(c=s[0],u=s[1],i.invert&&(c=i.invert(c),u=i.invert(u)),u<c&&(d=c,c=u,u=d))),a&&i?[[n,c],[o,u]]:a?[n,o]:i&&[c,u])},f.clear=function(){return f.empty()||(l=[0,0],s=[0,0],t=r=null),f},f.empty=function(){return!!a&&l[0]==l[1]||!!i&&s[0]==s[1]},e.rebind(f,n,"on")};var Ja={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Qa=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];function Ka(e){return JSON.parse(e.responseText)}function $a(e){var t=a.createRange();return t.selectNode(a.body),t.createContextualFragment(e.responseText)}e.text=ut((function(e){return e.responseText})),e.json=function(e,t){return dt(e,"application/json",Ka,t)},e.html=function(e,t){return dt(e,"text/html",$a,t)},e.xml=ut((function(e){return e.responseXML})),"object"==typeof t&&t.exports?t.exports=e:this.d3=e}).apply(self)},{}],12:[function(e,t,r){"use strict";var n,a="object"==typeof Reflect?Reflect:null,i=a&&"function"==typeof a.apply?a.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}t.exports=l,t.exports.once=function(e,t){return new Promise((function(r,n){function a(){void 0!==i&&e.removeListener("error",i),r([].slice.call(arguments))}var i;"error"!==t&&(i=function(r){e.removeListener(t,a),n(r)},e.once("error",i)),e.once(t,a)}))},l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var a,i,o,l;if(c(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(a=u(e))>0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,l=s,console&&console.warn&&console.warn(l)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=f.bind(n);return a.listener=r,n.wrapFn=a,a}function h(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"==typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(a):g(a,a.length)}function m(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),l.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,a=this._events;if(void 0!==a)n=n&&void 0===a.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else{var c=s.length,u=g(s,c);for(r=0;r<c;++r)i(u[r],this,t)}return!0},l.prototype.addListener=function(e,t){return d(this,e,t,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(e,t){return d(this,e,t,!0)},l.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},l.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},l.prototype.removeListener=function(e,t){var r,n,a,i,o;if(c(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(a=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,a=i;break}if(a<0)return this;0===a?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,a),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var a,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(a=i[n])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},l.prototype.listeners=function(e){return h(this,e,!0)},l.prototype.rawListeners=function(e){return h(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},l.prototype.listenerCount=m,l.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],13:[function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?n(r):n((e="undefined"!=typeof globalThis?globalThis:e||self).d3=e.d3||{})}(this,(function(e){"use strict";function t(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function r(e){return(e=t(Math.abs(e)))?e[1]:NaN}var n,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(e){if(!(t=a.exec(e)))throw new Error("invalid format: "+e);var t;return new o({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function o(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function l(e,r){var n=t(e,r);if(!n)return e+"";var a=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+a:a.length>i+1?a.slice(0,i+1)+"."+a.slice(i+1):a+new Array(i-a.length+2).join("0")}i.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var s={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return l(100*e,t)},r:l,s:function(e,r){var a=t(e,r);if(!a)return e+"";var i=a[0],o=a[1],l=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length;return l===s?i:l>s?i+new Array(l-s+1).join("0"):l>0?i.slice(0,l)+"."+i.slice(l):"0."+new Array(1-l).join("0")+t(e,Math.max(0,r+l-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function c(e){return e}var u,d=Array.prototype.map,f=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function p(e){var t,a,o=void 0===e.grouping||void 0===e.thousands?c:(t=d.call(e.grouping,Number),a=e.thousands+"",function(e,r){for(var n=e.length,i=[],o=0,l=t[0],s=0;n>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),i.push(e.substring(n-=l,n+l)),!((s+=l+1)>r));)l=t[o=(o+1)%t.length];return i.reverse().join(a)}),l=void 0===e.currency?"":e.currency[0]+"",u=void 0===e.currency?"":e.currency[1]+"",p=void 0===e.decimal?".":e.decimal+"",h=void 0===e.numerals?c:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(d.call(e.numerals,String)),m=void 0===e.percent?"%":e.percent+"",g=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=i(e)).fill,r=e.align,a=e.sign,c=e.symbol,d=e.zero,y=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):s[w]||(void 0===b&&(b=12),_=!0,w="g"),(d||"0"===t&&"="===r)&&(d=!0,t="0",r="=");var T="$"===c?l:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",M="$"===c?u:/[%p]/.test(w)?m:"",k=s[w],A=/[defgprs%]/.test(w);function L(e){var i,l,s,c=T,u=M;if("c"===w)u=k(e)+u,e="";else{var m=(e=+e)<0||1/e<0;if(e=isNaN(e)?v:k(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,n=1,a=-1;n<r;++n)switch(e[n]){case".":a=t=n;break;case"0":0===a&&(a=n),t=n;break;default:if(!+e[n])break e;a>0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),m&&0==+e&&"+"!==a&&(m=!1),c=(m?"("===a?a:g:"-"===a||"("===a?"":a)+c,u=("s"===w?f[8+n/3]:"")+u+(m&&"("===a?")":""),A)for(i=-1,l=e.length;++i<l;)if(48>(s=e.charCodeAt(i))||s>57){u=(46===s?p+e.slice(i+1):e.slice(i))+u,e=e.slice(0,i);break}}x&&!d&&(e=o(e,1/0));var L=c.length+e.length+u.length,S=L<y?new Array(y-L+1).join(t):"";switch(x&&d&&(e=o(S+e,S.length?y-u.length:1/0),S=""),r){case"<":e=c+e+u+S;break;case"=":e=c+S+e+u;break;case"^":e=S.slice(0,L=S.length>>1)+c+e+u+S.slice(L);break;default:e=S+c+e+u}return h(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),L.toString=function(){return e+""},L}return{format:y,formatPrefix:function(e,t){var n=y(((e=i(e)).type="f",e)),a=3*Math.max(-8,Math.min(8,Math.floor(r(t)/3))),o=Math.pow(10,-a),l=f[8+a/3];return function(e){return n(o*e)+l}}}}function h(t){return u=p(t),e.format=u.format,e.formatPrefix=u.formatPrefix,u}h({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=o,e.formatDefaultLocale=h,e.formatLocale=p,e.formatSpecifier=i,e.precisionFixed=function(e){return Math.max(0,-r(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(t)/3)))-r(Math.abs(e)))},e.precisionRound=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,r(t)-r(e))+1},Object.defineProperty(e,"__esModule",{value:!0})}))},{}],14:[function(e,t,r){!function(n,a){"object"==typeof r&&void 0!==t?a(r,e("d3-time")):a((n=n||self).d3=n.d3||{},n.d3)}(this,(function(e,t){"use strict";function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function a(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function i(e){var i=e.dateTime,o=e.date,s=e.time,c=e.periods,u=e.days,d=e.shortDays,f=e.months,ye=e.shortMonths,xe=p(c),be=h(c),_e=p(u),we=h(u),Te=p(d),Me=h(d),ke=p(f),Ae=h(f),Le=p(ye),Se=h(ye),De={a:function(e){return d[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return ye[e.getMonth()]},B:function(e){return f[e.getMonth()]},c:null,d:z,e:z,f:H,H:N,I:F,j:E,L:j,m:B,M:Y,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ge,s:ve,S:V,u:U,U:q,V:G,w:Z,W:W,x:null,X:null,y:X,Y:J,Z:Q,"%":me},Ce={a:function(e){return d[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return ye[e.getUTCMonth()]},B:function(e){return f[e.getUTCMonth()]},c:null,d:K,e:K,f:ne,H:$,I:ee,j:te,L:re,m:ae,M:ie,p:function(e){return c[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ge,s:ve,S:oe,u:le,U:se,V:ce,w:ue,W:de,x:null,X:null,y:fe,Y:pe,Z:he,"%":me},Oe={a:function(e,t,r){var n=Te.exec(t.slice(r));return n?(e.w=Me[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=_e.exec(t.slice(r));return n?(e.w=we[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Le.exec(t.slice(r));return n?(e.m=Se[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=ke.exec(t.slice(r));return n?(e.m=Ae[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,t,r){return Re(e,i,t,r)},d:k,e:k,f:O,H:L,I:L,j:A,L:C,m:M,M:S,p:function(e,t,r){var n=xe.exec(t.slice(r));return n?(e.p=be[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:I,s:R,S:D,u:g,U:v,V:y,w:m,W:x,x:function(e,t,r){return Re(e,o,t,r)},X:function(e,t,r){return Re(e,s,t,r)},y:_,Y:b,Z:w,"%":P};function Pe(e,t){return function(r){var n,a,i,o=[],s=-1,c=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++s<u;)37===e.charCodeAt(s)&&(o.push(e.slice(c,s)),null!=(a=l[n=e.charAt(++s)])?n=e.charAt(++s):a="e"===n?" ":"0",(i=t[n])&&(n=i(r,a)),o.push(n),c=s+1);return o.push(e.slice(c,s)),o.join("")}}function Ie(e,i){return function(o){var l,s,c=a(1900,void 0,1);if(Re(c,e,o+="",0)!=o.length)return null;if("Q"in c)return new Date(c.Q);if("s"in c)return new Date(1e3*c.s+("L"in c?c.L:0));if(i&&!("Z"in c)&&(c.Z=0),"p"in c&&(c.H=c.H%12+12*c.p),void 0===c.m&&(c.m="q"in c?c.q:0),"V"in c){if(c.V<1||c.V>53)return null;"w"in c||(c.w=1),"Z"in c?(s=(l=n(a(c.y,0,1))).getUTCDay(),l=s>4||0===s?t.utcMonday.ceil(l):t.utcMonday(l),l=t.utcDay.offset(l,7*(c.V-1)),c.y=l.getUTCFullYear(),c.m=l.getUTCMonth(),c.d=l.getUTCDate()+(c.w+6)%7):(s=(l=r(a(c.y,0,1))).getDay(),l=s>4||0===s?t.timeMonday.ceil(l):t.timeMonday(l),l=t.timeDay.offset(l,7*(c.V-1)),c.y=l.getFullYear(),c.m=l.getMonth(),c.d=l.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),s="Z"in c?n(a(c.y,0,1)).getUTCDay():r(a(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(s+5)%7:c.w+7*c.U-(s+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function Re(e,t,r,n){for(var a,i,o=0,s=t.length,c=r.length;o<s;){if(n>=c)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=Oe[a in l?t.charAt(o++):a])||(n=i(e,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}return De.x=Pe(o,De),De.X=Pe(s,De),De.c=Pe(i,De),Ce.x=Pe(o,Ce),Ce.X=Pe(s,Ce),Ce.c=Pe(i,Ce),{format:function(e){var t=Pe(e+="",De);return t.toString=function(){return e},t},parse:function(e){var t=Ie(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Pe(e+="",Ce);return t.toString=function(){return e},t},utcParse:function(e){var t=Ie(e+="",!0);return t.toString=function(){return e},t}}}var o,l={"-":"",_:" ",0:"0"},s=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function d(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function f(e){return e.replace(u,"\\$&")}function p(e){return new RegExp("^(?:"+e.map(f).join("|")+")","i")}function h(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function m(e,t,r){var n=s.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function g(e,t,r){var n=s.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function v(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function y(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function x(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function b(e,t,r){var n=s.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function _(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function w(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function T(e,t,r){var n=s.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function M(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function k(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function A(e,t,r){var n=s.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function L(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function S(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function D(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function C(e,t,r){var n=s.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function O(e,t,r){var n=s.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function P(e,t,r){var n=c.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function I(e,t,r){var n=s.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function R(e,t,r){var n=s.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function z(e,t){return d(e.getDate(),t,2)}function N(e,t){return d(e.getHours(),t,2)}function F(e,t){return d(e.getHours()%12||12,t,2)}function E(e,r){return d(1+t.timeDay.count(t.timeYear(e),e),r,3)}function j(e,t){return d(e.getMilliseconds(),t,3)}function H(e,t){return j(e,t)+"000"}function B(e,t){return d(e.getMonth()+1,t,2)}function Y(e,t){return d(e.getMinutes(),t,2)}function V(e,t){return d(e.getSeconds(),t,2)}function U(e){var t=e.getDay();return 0===t?7:t}function q(e,r){return d(t.timeSunday.count(t.timeYear(e)-1,e),r,2)}function G(e,r){var n=e.getDay();return e=n>=4||0===n?t.timeThursday(e):t.timeThursday.ceil(e),d(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),r,2)}function Z(e){return e.getDay()}function W(e,r){return d(t.timeMonday.count(t.timeYear(e)-1,e),r,2)}function X(e,t){return d(e.getFullYear()%100,t,2)}function J(e,t){return d(e.getFullYear()%1e4,t,4)}function Q(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+d(t/60|0,"0",2)+d(t%60,"0",2)}function K(e,t){return d(e.getUTCDate(),t,2)}function $(e,t){return d(e.getUTCHours(),t,2)}function ee(e,t){return d(e.getUTCHours()%12||12,t,2)}function te(e,r){return d(1+t.utcDay.count(t.utcYear(e),e),r,3)}function re(e,t){return d(e.getUTCMilliseconds(),t,3)}function ne(e,t){return re(e,t)+"000"}function ae(e,t){return d(e.getUTCMonth()+1,t,2)}function ie(e,t){return d(e.getUTCMinutes(),t,2)}function oe(e,t){return d(e.getUTCSeconds(),t,2)}function le(e){var t=e.getUTCDay();return 0===t?7:t}function se(e,r){return d(t.utcSunday.count(t.utcYear(e)-1,e),r,2)}function ce(e,r){var n=e.getUTCDay();return e=n>=4||0===n?t.utcThursday(e):t.utcThursday.ceil(e),d(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),r,2)}function ue(e){return e.getUTCDay()}function de(e,r){return d(t.utcMonday.count(t.utcYear(e)-1,e),r,2)}function fe(e,t){return d(e.getUTCFullYear()%100,t,2)}function pe(e,t){return d(e.getUTCFullYear()%1e4,t,4)}function he(){return"+0000"}function me(){return"%"}function ge(e){return+e}function ve(e){return Math.floor(+e/1e3)}function ye(t){return o=i(t),e.timeFormat=o.format,e.timeParse=o.parse,e.utcFormat=o.utcFormat,e.utcParse=o.utcParse,o}ye({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]});var xe=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");var be=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");e.isoFormat=xe,e.isoParse=be,e.timeFormatDefaultLocale=ye,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})}))},{"d3-time":15}],15:[function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?n(r):n((e=e||self).d3=e.d3||{})}(this,(function(e){"use strict";var t=new Date,r=new Date;function n(e,a,i,o){function l(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return l.floor=function(t){return e(t=new Date(+t)),t},l.ceil=function(t){return e(t=new Date(t-1)),a(t,1),e(t),t},l.round=function(e){var t=l(e),r=l.ceil(e);return e-t<r-e?t:r},l.offset=function(e,t){return a(e=new Date(+e),null==t?1:Math.floor(t)),e},l.range=function(t,r,n){var i,o=[];if(t=l.ceil(t),n=null==n?1:Math.floor(n),!(t<r&&n>0))return o;do{o.push(i=new Date(+t)),a(t,n),e(t)}while(i<t&&t<r);return o},l.filter=function(t){return n((function(r){if(r>=r)for(;e(r),!t(r);)r.setTime(r-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;a(e,-1),!t(e););else for(;--r>=0;)for(;a(e,1),!t(e););}))},i&&(l.count=function(n,a){return t.setTime(+n),r.setTime(+a),e(t),e(r),Math.floor(i(t,r))},l.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?l.filter(o?function(t){return o(t)%e==0}:function(t){return l.count(0,t)%e==0}):l:null}),l}var a=n((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?n((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):a:null};var i=a.range,o=n((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),l=o.range,s=n((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),c=s.range,u=n((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()})),d=u.range,f=n((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1})),p=f.range;function h(e){return n((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var m=h(0),g=h(1),v=h(2),y=h(3),x=h(4),b=h(5),_=h(6),w=m.range,T=g.range,M=v.range,k=y.range,A=x.range,L=b.range,S=_.range,D=n((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),C=D.range,O=n((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));O.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null};var P=O.range,I=n((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),R=I.range,z=n((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),N=z.range,F=n((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1})),E=F.range;function j(e){return n((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var H=j(0),B=j(1),Y=j(2),V=j(3),U=j(4),q=j(5),G=j(6),Z=H.range,W=B.range,X=Y.range,J=V.range,Q=U.range,K=q.range,$=G.range,ee=n((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),te=ee.range,re=n((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));re.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};var ne=re.range;e.timeDay=f,e.timeDays=p,e.timeFriday=b,e.timeFridays=L,e.timeHour=u,e.timeHours=d,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=s,e.timeMinutes=c,e.timeMonday=g,e.timeMondays=T,e.timeMonth=D,e.timeMonths=C,e.timeSaturday=_,e.timeSaturdays=S,e.timeSecond=o,e.timeSeconds=l,e.timeSunday=m,e.timeSundays=w,e.timeThursday=x,e.timeThursdays=A,e.timeTuesday=v,e.timeTuesdays=M,e.timeWednesday=y,e.timeWednesdays=k,e.timeWeek=m,e.timeWeeks=w,e.timeYear=O,e.timeYears=P,e.utcDay=F,e.utcDays=E,e.utcFriday=q,e.utcFridays=K,e.utcHour=z,e.utcHours=N,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=I,e.utcMinutes=R,e.utcMonday=B,e.utcMondays=W,e.utcMonth=ee,e.utcMonths=te,e.utcSaturday=G,e.utcSaturdays=$,e.utcSecond=o,e.utcSeconds=l,e.utcSunday=H,e.utcSundays=Z,e.utcThursday=U,e.utcThursdays=Q,e.utcTuesday=Y,e.utcTuesdays=X,e.utcWednesday=V,e.utcWednesdays=J,e.utcWeek=H,e.utcWeeks=Z,e.utcYear=re,e.utcYears=ne,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],16:[function(e,t,r){arguments[4][15][0].apply(r,arguments)},{dup:15}],17:[function(e,t,r){"use strict";var n=e("is-string-blank");t.exports=function(e){var t=typeof e;if("string"===t){var r=e;if(0===(e=+e)&&n(r))return!1}else if("number"!==t)return!1;return e-e<1}},{"is-string-blank":52}],18:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],d=t[9],f=t[10],p=t[11],h=t[12],m=t[13],g=t[14],v=t[15];return e[0]=l*(f*v-p*g)-d*(s*v-c*g)+m*(s*p-c*f),e[1]=-(n*(f*v-p*g)-d*(a*v-i*g)+m*(a*p-i*f)),e[2]=n*(s*v-c*g)-l*(a*v-i*g)+m*(a*c-i*s),e[3]=-(n*(s*p-c*f)-l*(a*p-i*f)+d*(a*c-i*s)),e[4]=-(o*(f*v-p*g)-u*(s*v-c*g)+h*(s*p-c*f)),e[5]=r*(f*v-p*g)-u*(a*v-i*g)+h*(a*p-i*f),e[6]=-(r*(s*v-c*g)-o*(a*v-i*g)+h*(a*c-i*s)),e[7]=r*(s*p-c*f)-o*(a*p-i*f)+u*(a*c-i*s),e[8]=o*(d*v-p*m)-u*(l*v-c*m)+h*(l*p-c*d),e[9]=-(r*(d*v-p*m)-u*(n*v-i*m)+h*(n*p-i*d)),e[10]=r*(l*v-c*m)-o*(n*v-i*m)+h*(n*c-i*l),e[11]=-(r*(l*p-c*d)-o*(n*p-i*d)+u*(n*c-i*l)),e[12]=-(o*(d*g-f*m)-u*(l*g-s*m)+h*(l*f-s*d)),e[13]=r*(d*g-f*m)-u*(n*g-a*m)+h*(n*f-a*d),e[14]=-(r*(l*g-s*m)-o*(n*g-a*m)+h*(n*s-a*l)),e[15]=r*(l*f-s*d)-o*(n*f-a*d)+u*(n*s-a*l),e}},{}],19:[function(e,t,r){t.exports=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],20:[function(e,t,r){t.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],21:[function(e,t,r){t.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],22:[function(e,t,r){t.exports=function(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],l=e[6],s=e[7],c=e[8],u=e[9],d=e[10],f=e[11],p=e[12],h=e[13],m=e[14],g=e[15];return(t*o-r*i)*(d*g-f*m)-(t*l-n*i)*(u*g-f*h)+(t*s-a*i)*(u*m-d*h)+(r*l-n*o)*(c*g-f*p)-(r*s-a*o)*(c*m-d*p)+(n*s-a*l)*(c*h-u*p)}},{}],23:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,l=n+n,s=a+a,c=r*o,u=n*o,d=n*l,f=a*o,p=a*l,h=a*s,m=i*o,g=i*l,v=i*s;return e[0]=1-d-h,e[1]=u+v,e[2]=f-g,e[3]=0,e[4]=u-v,e[5]=1-c-h,e[6]=p+m,e[7]=0,e[8]=f+g,e[9]=p-m,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],24:[function(e,t,r){t.exports=function(e,t,r){var n,a,i,o=r[0],l=r[1],s=r[2],c=Math.sqrt(o*o+l*l+s*s);if(Math.abs(c)<1e-6)return null;return o*=c=1/c,l*=c,s*=c,n=Math.sin(t),a=Math.cos(t),i=1-a,e[0]=o*o*i+a,e[1]=l*o*i+s*n,e[2]=s*o*i-l*n,e[3]=0,e[4]=o*l*i-s*n,e[5]=l*l*i+a,e[6]=s*l*i+o*n,e[7]=0,e[8]=o*s*i+l*n,e[9]=l*s*i-o*n,e[10]=s*s*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],25:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=n+n,s=a+a,c=i+i,u=n*l,d=n*s,f=n*c,p=a*s,h=a*c,m=i*c,g=o*l,v=o*s,y=o*c;return e[0]=1-(p+m),e[1]=d+y,e[2]=f-v,e[3]=0,e[4]=d-y,e[5]=1-(u+m),e[6]=h+g,e[7]=0,e[8]=f+v,e[9]=h-g,e[10]=1-(u+p),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},{}],26:[function(e,t,r){t.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],27:[function(e,t,r){t.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},{}],28:[function(e,t,r){t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],29:[function(e,t,r){t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],30:[function(e,t,r){t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],31:[function(e,t,r){t.exports=function(e,t,r,n,a,i,o){var l=1/(r-t),s=1/(a-n),c=1/(i-o);return e[0]=2*i*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*i*s,e[6]=0,e[7]=0,e[8]=(r+t)*l,e[9]=(a+n)*s,e[10]=(o+i)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*c,e[15]=0,e}},{}],32:[function(e,t,r){t.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],33:[function(e,t,r){t.exports={create:e("./create"),clone:e("./clone"),copy:e("./copy"),identity:e("./identity"),transpose:e("./transpose"),invert:e("./invert"),adjoint:e("./adjoint"),determinant:e("./determinant"),multiply:e("./multiply"),translate:e("./translate"),scale:e("./scale"),rotate:e("./rotate"),rotateX:e("./rotateX"),rotateY:e("./rotateY"),rotateZ:e("./rotateZ"),fromRotation:e("./fromRotation"),fromRotationTranslation:e("./fromRotationTranslation"),fromScaling:e("./fromScaling"),fromTranslation:e("./fromTranslation"),fromXRotation:e("./fromXRotation"),fromYRotation:e("./fromYRotation"),fromZRotation:e("./fromZRotation"),fromQuat:e("./fromQuat"),frustum:e("./frustum"),perspective:e("./perspective"),perspectiveFromFieldOfView:e("./perspectiveFromFieldOfView"),ortho:e("./ortho"),lookAt:e("./lookAt"),str:e("./str")}},{"./adjoint":18,"./clone":19,"./copy":20,"./create":21,"./determinant":22,"./fromQuat":23,"./fromRotation":24,"./fromRotationTranslation":25,"./fromScaling":26,"./fromTranslation":27,"./fromXRotation":28,"./fromYRotation":29,"./fromZRotation":30,"./frustum":31,"./identity":32,"./invert":34,"./lookAt":35,"./multiply":36,"./ortho":37,"./perspective":38,"./perspectiveFromFieldOfView":39,"./rotate":40,"./rotateX":41,"./rotateY":42,"./rotateZ":43,"./scale":44,"./str":45,"./translate":46,"./transpose":47}],34:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],d=t[9],f=t[10],p=t[11],h=t[12],m=t[13],g=t[14],v=t[15],y=r*l-n*o,x=r*s-a*o,b=r*c-i*o,_=n*s-a*l,w=n*c-i*l,T=a*c-i*s,M=u*m-d*h,k=u*g-f*h,A=u*v-p*h,L=d*g-f*m,S=d*v-p*m,D=f*v-p*g,C=y*D-x*S+b*L+_*A-w*k+T*M;if(!C)return null;return C=1/C,e[0]=(l*D-s*S+c*L)*C,e[1]=(a*S-n*D-i*L)*C,e[2]=(m*T-g*w+v*_)*C,e[3]=(f*w-d*T-p*_)*C,e[4]=(s*A-o*D-c*k)*C,e[5]=(r*D-a*A+i*k)*C,e[6]=(g*b-h*T-v*x)*C,e[7]=(u*T-f*b+p*x)*C,e[8]=(o*S-l*A+c*M)*C,e[9]=(n*A-r*S-i*M)*C,e[10]=(h*w-m*b+v*y)*C,e[11]=(d*b-u*w-p*y)*C,e[12]=(l*k-o*L-s*M)*C,e[13]=(r*L-n*k+a*M)*C,e[14]=(m*x-h*_-g*y)*C,e[15]=(u*_-d*x+f*y)*C,e}},{}],35:[function(e,t,r){var n=e("./identity");t.exports=function(e,t,r,a){var i,o,l,s,c,u,d,f,p,h,m=t[0],g=t[1],v=t[2],y=a[0],x=a[1],b=a[2],_=r[0],w=r[1],T=r[2];if(Math.abs(m-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-T)<1e-6)return n(e);d=m-_,f=g-w,p=v-T,h=1/Math.sqrt(d*d+f*f+p*p),i=x*(p*=h)-b*(f*=h),o=b*(d*=h)-y*p,l=y*f-x*d,(h=Math.sqrt(i*i+o*o+l*l))?(i*=h=1/h,o*=h,l*=h):(i=0,o=0,l=0);s=f*l-p*o,c=p*i-d*l,u=d*o-f*i,(h=Math.sqrt(s*s+c*c+u*u))?(s*=h=1/h,c*=h,u*=h):(s=0,c=0,u=0);return e[0]=i,e[1]=s,e[2]=d,e[3]=0,e[4]=o,e[5]=c,e[6]=f,e[7]=0,e[8]=l,e[9]=u,e[10]=p,e[11]=0,e[12]=-(i*m+o*g+l*v),e[13]=-(s*m+c*g+u*v),e[14]=-(d*m+f*g+p*v),e[15]=1,e}},{"./identity":32}],36:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],d=t[8],f=t[9],p=t[10],h=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*l+_*d+w*m,e[1]=x*a+b*s+_*f+w*g,e[2]=x*i+b*c+_*p+w*v,e[3]=x*o+b*u+_*h+w*y,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*l+_*d+w*m,e[5]=x*a+b*s+_*f+w*g,e[6]=x*i+b*c+_*p+w*v,e[7]=x*o+b*u+_*h+w*y,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*l+_*d+w*m,e[9]=x*a+b*s+_*f+w*g,e[10]=x*i+b*c+_*p+w*v,e[11]=x*o+b*u+_*h+w*y,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*l+_*d+w*m,e[13]=x*a+b*s+_*f+w*g,e[14]=x*i+b*c+_*p+w*v,e[15]=x*o+b*u+_*h+w*y,e}},{}],37:[function(e,t,r){t.exports=function(e,t,r,n,a,i,o){var l=1/(t-r),s=1/(n-a),c=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*l,e[13]=(a+n)*s,e[14]=(o+i)*c,e[15]=1,e}},{}],38:[function(e,t,r){t.exports=function(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}},{}],39:[function(e,t,r){t.exports=function(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(o+l),c=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-l)*s*.5,e[9]=(a-i)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}},{}],40:[function(e,t,r){t.exports=function(e,t,r,n){var a,i,o,l,s,c,u,d,f,p,h,m,g,v,y,x,b,_,w,T,M,k,A,L,S=n[0],D=n[1],C=n[2],O=Math.sqrt(S*S+D*D+C*C);if(Math.abs(O)<1e-6)return null;S*=O=1/O,D*=O,C*=O,a=Math.sin(r),i=Math.cos(r),o=1-i,l=t[0],s=t[1],c=t[2],u=t[3],d=t[4],f=t[5],p=t[6],h=t[7],m=t[8],g=t[9],v=t[10],y=t[11],x=S*S*o+i,b=D*S*o+C*a,_=C*S*o-D*a,w=S*D*o-C*a,T=D*D*o+i,M=C*D*o+S*a,k=S*C*o+D*a,A=D*C*o-S*a,L=C*C*o+i,e[0]=l*x+d*b+m*_,e[1]=s*x+f*b+g*_,e[2]=c*x+p*b+v*_,e[3]=u*x+h*b+y*_,e[4]=l*w+d*T+m*M,e[5]=s*w+f*T+g*M,e[6]=c*w+p*T+v*M,e[7]=u*w+h*T+y*M,e[8]=l*k+d*A+m*L,e[9]=s*k+f*A+g*L,e[10]=c*k+p*A+v*L,e[11]=u*k+h*A+y*L,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e}},{}],41:[function(e,t,r){t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],l=t[6],s=t[7],c=t[8],u=t[9],d=t[10],f=t[11];t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[4]=i*a+c*n,e[5]=o*a+u*n,e[6]=l*a+d*n,e[7]=s*a+f*n,e[8]=c*a-i*n,e[9]=u*a-o*n,e[10]=d*a-l*n,e[11]=f*a-s*n,e}},{}],42:[function(e,t,r){t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],c=t[8],u=t[9],d=t[10],f=t[11];t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[0]=i*a-c*n,e[1]=o*a-u*n,e[2]=l*a-d*n,e[3]=s*a-f*n,e[8]=i*n+c*a,e[9]=o*n+u*a,e[10]=l*n+d*a,e[11]=s*n+f*a,e}},{}],43:[function(e,t,r){t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],c=t[4],u=t[5],d=t[6],f=t[7];t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[0]=i*a+c*n,e[1]=o*a+u*n,e[2]=l*a+d*n,e[3]=s*a+f*n,e[4]=c*a-i*n,e[5]=u*a-o*n,e[6]=d*a-l*n,e[7]=f*a-s*n,e}},{}],44:[function(e,t,r){t.exports=function(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],45:[function(e,t,r){t.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},{}],46:[function(e,t,r){t.exports=function(e,t,r){var n,a,i,o,l,s,c,u,d,f,p,h,m=r[0],g=r[1],v=r[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],d=t[8],f=t[9],p=t[10],h=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=l,e[5]=s,e[6]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=p,e[11]=h,e[12]=n*m+l*g+d*v+t[12],e[13]=a*m+s*g+f*v+t[13],e[14]=i*m+c*g+p*v+t[14],e[15]=o*m+u*g+h*v+t[15]);return e}},{}],47:[function(e,t,r){t.exports=function(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},{}],48:[function(e,t,r){(function(r){(function(){"use strict";var n,a=e("is-browser");n="function"==typeof r.matchMedia?!r.matchMedia("(hover: none)").matches:a,t.exports=n}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"is-browser":50}],49:[function(e,t,r){"use strict";var n=e("is-browser");t.exports=n&&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":50}],50:[function(e,t,r){t.exports=!0},{}],51:[function(e,t,r){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var n=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function i(e){e||(e={});var t=e.ua;if(t||"undefined"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;var r=e.tablet?a.test(t):n.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(r=!0),r}},{}],52:[function(e,t,r){"use strict";t.exports=function(e){for(var t,r=e.length,n=0;n<r;n++)if(((t=e.charCodeAt(n))<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}},{}],53:[function(e,t,r){var n={left:0,top:0};t.exports=function(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var a=e.clientX||0,i=e.clientY||0,o=(l=t,l===window||l===document||l===document.body?n:l.getBoundingClientRect());var l;return r[0]=a-o.left,r[1]=i-o.top,r}},{}],54:[function(e,t,r){(function(e,r){(function(){
/*! Native Promise Only
v0.8.1 (c) Kyle Simpson
MIT License: http://getify.mit-license.org
*/
var n,a,i;i=function(){"use strict";var e,t,n,a=Object.prototype.toString,i=void 0!==r?function(e){return r(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch(t){e=function(e,t,r){return e[t]=r,e}}function o(e,r){n.add(e,r),t||(t=i(n.drain))}function l(e){var t,r=typeof e;return null==e||"object"!=r&&"function"!=r||(t=e.then),"function"==typeof t&&t}function s(){for(var e=0;e<this.chain.length;e++)c(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function c(e,t,r){var n,a;try{!1===t?r.reject(e.msg):(n=!0===t?e.msg:t.call(void 0,e.msg))===r.promise?r.reject(TypeError("Promise-chain cycle")):(a=l(n))?a.call(n,r.resolve,r.reject):r.resolve(n)}catch(e){r.reject(e)}}function u(e){var t,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(t=l(e))?o((function(){var n=new p(r);try{t.call(e,(function(){u.apply(n,arguments)}),(function(){d.apply(n,arguments)}))}catch(e){d.call(n,e)}})):(r.msg=e,r.state=1,r.chain.length>0&&o(s,r))}catch(e){d.call(new p(r),e)}}}function d(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&o(s,t))}function f(e,t,r,n){for(var a=0;a<t.length;a++)!function(a){e.resolve(t[a]).then((function(e){r(a,e)}),n)}(a)}function p(e){this.def=e,this.triggered=!1}function h(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function m(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new h(this);this.then=function(e,r){var n={success:"function"!=typeof e||e,failure:"function"==typeof r&&r};return n.promise=new this.constructor((function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t})),t.chain.push(n),0!==t.state&&o(s,t),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,(function(e){u.call(t,e)}),(function(e){d.call(t,e)}))}catch(e){d.call(t,e)}}n=function(){var e,r,n;function a(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(t,i){n=new a(t,i),r?r.next=n:e=n,r=n,n=void 0},drain:function(){var n=e;for(e=r=t=void 0;n;)n.fn.call(n.self),n=n.next}}}();var g=e({},"constructor",m,!1);return m.prototype=g,e(g,"__NPO__",0,!1),e(m,"resolve",(function(e){return e&&"object"==typeof e&&1===e.__NPO__?e:new this((function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");t(e)}))})),e(m,"reject",(function(e){return new this((function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");r(e)}))})),e(m,"all",(function(e){var t=this;return"[object Array]"!=a.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t((function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");var a=e.length,i=Array(a),o=0;f(t,e,(function(e,t){i[e]=t,++o===a&&r(i)}),n)}))})),e(m,"race",(function(e){var t=this;return"[object Array]"!=a.call(e)?t.reject(TypeError("Not an array")):new t((function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");f(t,e,(function(e,t){r(t)}),n)}))})),m},(a=void 0!==e?e:this)[n="Promise"]=a[n]||i(),void 0!==t&&t.exports&&(t.exports=a[n])}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{timers:66}],55:[function(e,t,r){
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
"use strict";var n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,l,s=o(e),c=1;c<arguments.length;c++){for(var u in r=Object(arguments[c]))a.call(r,u)&&(s[u]=r[u]);if(n){l=n(r);for(var d=0;d<l.length;d++)i.call(r,l[d])&&(s[l[d]]=r[l[d]])}}return s}},{}],56:[function(e,t,r){t.exports=function(e){var t=[];return e.replace(a,(function(e,r,a){var o=r.toLowerCase();for(a=function(e){var t=e.match(i);return t?t.map(Number):[]}(a),"m"==o&&a.length>2&&(t.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==n[o])return a.unshift(r),t.push(a);if(a.length<n[o])throw new Error("malformed path data");t.push([r].concat(a.splice(0,n[o])))}})),t};var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},a=/([astvzqmhlc])([^astvzqmhlc]*)/gi;var i=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},{}],57:[function(e,t,r){
/*
* @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
* @license MIT
* @preserve Project Home: https://github.com/voidqk/polybooljs
*/
var n,a=e("./lib/build-log"),i=e("./lib/epsilon"),o=e("./lib/intersecter"),l=e("./lib/segment-chainer"),s=e("./lib/segment-selector"),c=e("./lib/geojson"),u=!1,d=i();function f(e,t,r){var a=n.segments(e),i=n.segments(t),o=r(n.combine(a,i));return n.polygon(o)}n={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:s.union(e.combined,u),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:s.intersect(e.combined,u),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:s.difference(e.combined,u),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:s.differenceRev(e.combined,u),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:s.xor(e.combined,u),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:l(e.segments,d,u),inverted:e.inverted}},polygonFromGeoJSON:function(e){return c.toPolygon(n,e)},polygonToGeoJSON:function(e){return c.fromPolygon(n,d,e)},union:function(e,t){return f(e,t,n.selectUnion)},intersect:function(e,t){return f(e,t,n.selectIntersect)},difference:function(e,t){return f(e,t,n.selectDifference)},differenceRev:function(e,t){return f(e,t,n.selectDifferenceRev)},xor:function(e,t){return f(e,t,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},{"./lib/build-log":58,"./lib/epsilon":59,"./lib/geojson":60,"./lib/intersecter":61,"./lib/segment-chainer":63,"./lib/segment-selector":64}],58:[function(e,t,r){t.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}},{}],59:[function(e,t,r){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,r,n){var a=r[0],i=r[1],o=n[0],l=n[1],s=t[0];return(o-a)*(t[1]-i)-(l-i)*(s-a)>=-e},pointBetween:function(t,r,n){var a=t[1]-r[1],i=n[0]-r[0],o=t[0]-r[0],l=n[1]-r[1],s=o*i+a*l;return!(s<e)&&!(s-(i*i+l*l)>-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])<e},pointsSameY:function(t,r){return Math.abs(t[1]-r[1])<e},pointsSame:function(e,r){return t.pointsSameX(e,r)&&t.pointsSameY(e,r)},pointsCompare:function(e,r){return t.pointsSameX(e,r)?t.pointsSameY(e,r)?0:e[1]<r[1]?-1:1:e[0]<r[0]?-1:1},pointsCollinear:function(t,r,n){var a=t[0]-r[0],i=t[1]-r[1],o=r[0]-n[0],l=r[1]-n[1];return Math.abs(a*l-o*i)<e},linesIntersect:function(t,r,n,a){var i=r[0]-t[0],o=r[1]-t[1],l=a[0]-n[0],s=a[1]-n[1],c=i*s-o*l;if(Math.abs(c)<e)return!1;var u=t[0]-n[0],d=t[1]-n[1],f=(l*d-s*u)/c,p=(i*d-o*u)/c,h={alongA:0,alongB:0,pt:[t[0]+f*i,t[1]+f*o]};return h.alongA=f<=-e?-2:f<e?-1:f-1<=-e?0:f-1<e?1:2,h.alongB=p<=-e?-2:p<e?-1:p-1<=-e?0:p-1<e?1:2,h},pointInsideRegion:function(t,r){for(var n=t[0],a=t[1],i=r[r.length-1][0],o=r[r.length-1][1],l=!1,s=0;s<r.length;s++){var c=r[s][0],u=r[s][1];u-a>e!=o-a>e&&(i-c)*(a-u)/(o-u)+c-n>e&&(l=!l),i=c,o=u}return l}};return t}},{}],60:[function(e,t,r){var n={toPolygon:function(e,t){function r(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function r(t){var r=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[r]})}for(var n=r(t[0]),a=1;a<t.length;a++)n=e.selectDifference(e.combine(n,r(t[a])));return n}if("Polygon"===t.type)return e.polygon(r(t.coordinates));if("MultiPolygon"===t.type){for(var n=e.segments({inverted:!1,regions:[]}),a=0;a<t.coordinates.length;a++)n=e.selectUnion(e.combine(n,r(t.coordinates[a])));return e.polygon(n)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,t,r){function n(e,r){return t.pointInsideRegion([.5*(e[0][0]+e[1][0]),.5*(e[0][1]+e[1][1])],r)}function a(e){return{region:e,children:[]}}r=e.polygon(e.segments(r));var i=a(null);function o(e,t){for(var r=0;r<e.children.length;r++){if(n(t,(l=e.children[r]).region))return void o(l,t)}var i=a(t);for(r=0;r<e.children.length;r++){var l;n((l=e.children[r]).region,t)&&(i.children.push(l),e.children.splice(r,1),r--)}e.children.push(i)}for(var l=0;l<r.regions.length;l++){var s=r.regions[l];s.length<3||o(i,s)}function c(e,t){for(var r=0,n=e[e.length-1][0],a=e[e.length-1][1],i=[],o=0;o<e.length;o++){var l=e[o][0],s=e[o][1];i.push([l,s]),r+=s*n-l*a,n=l,a=s}return r<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 r=0;r<e.children.length;r++)t.push(f(e.children[r]))}function f(e){for(var t=0;t<e.children.length;t++)d(e.children[t]);return c(e.region,!0)}for(l=0;l<i.children.length;l++)d(i.children[l]);return u.length<=0?{type:"Polygon",coordinates:[]}:1==u.length?{type:"Polygon",coordinates:u[0]}:{type:"MultiPolygon",coordinates:u}}};t.exports=n},{}],61:[function(e,t,r){var n=e("./linked-list");t.exports=function(e,t,r){function a(e,t,n){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var i=n.create();function o(e,r){i.insertBefore(e,(function(n){return function(e,r,n,a,i,o){var l=t.pointsCompare(r,i);return 0!==l?l:t.pointsSame(n,o)?0:e!==a?e?1:-1:t.pointAboveOrOnLine(n,a?i:o,a?o:i)?1:-1}(e.isStart,e.pt,r,n.isStart,n.pt,n.other.pt)<0}))}function l(e,t){var r=function(e,t){var r=n.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return o(r,e.end),r}(e,t);return function(e,t,r){var a=n.node({isStart:!1,pt:t.end,seg:t,primary:r,other:e,status:null});e.other=a,o(a,e.pt)}(r,e,t),r}function s(e,t){var n=a(t,e.seg.end,e.seg);return function(e,t){r&&r.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,o(e.other,e.pt)}(e,t),l(n,e.primary)}function c(a,o){var l=n.create();function c(e){return l.findTransition((function(r){var n,a,i,o,l,s;return(n=e,a=r.ev,i=n.seg.start,o=n.seg.end,l=a.seg.start,s=a.seg.end,t.pointsCollinear(i,l,s)?t.pointsCollinear(o,l,s)||t.pointAboveOrOnLine(o,l,s)?1:-1:t.pointAboveOrOnLine(i,l,s)?1:-1)>0}))}function u(e,n){var a=e.seg,i=n.seg,o=a.start,l=a.end,c=i.start,u=i.end;r&&r.checkIntersection(a,i);var d=t.linesIntersect(o,l,c,u);if(!1===d){if(!t.pointsCollinear(o,l,c))return!1;if(t.pointsSame(o,u)||t.pointsSame(l,c))return!1;var f=t.pointsSame(o,c),p=t.pointsSame(l,u);if(f&&p)return n;var h=!f&&t.pointBetween(o,c,u),m=!p&&t.pointBetween(l,c,u);if(f)return m?s(n,l):s(e,u),n;h&&(p||(m?s(n,l):s(e,u)),s(n,o))}else 0===d.alongA&&(-1===d.alongB?s(e,c):0===d.alongB?s(e,d.pt):1===d.alongB&&s(e,u)),0===d.alongB&&(-1===d.alongA?s(n,o):0===d.alongA?s(n,d.pt):1===d.alongA&&s(n,l));return!1}for(var d=[];!i.isEmpty();){var f=i.getHead();if(r&&r.vert(f.pt[0]),f.isStart){r&&r.segmentNew(f.seg,f.primary);var p=c(f),h=p.before?p.before.ev:null,m=p.after?p.after.ev:null;function g(){if(h){var e=u(f,h);if(e)return e}return!!m&&u(f,m)}r&&r.tempStatus(f.seg,!!h&&h.seg,!!m&&m.seg);var v,y=g();if(y){var x;if(e)(x=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=f.seg.myFill;r&&r.segmentUpdate(y.seg),f.other.remove(),f.remove()}if(i.getHead()!==f){r&&r.rewind(f.seg);continue}if(e)x=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=m?m.seg.myFill.above:a,f.seg.myFill.above=x?!f.seg.myFill.below:f.seg.myFill.below;else if(null===f.seg.otherFill)v=m?f.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:f.primary?o:a,f.seg.otherFill={above:v,below:v};r&&r.status(f.seg,!!h&&h.seg,!!m&&m.seg),f.other.status=p.insert(n.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(l.exists(b.prev)&&l.exists(b.next)&&u(b.prev.ev,b.next.ev),r&&r.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 r&&r.done(),d}return e?{addRegion:function(e){for(var n,a,i,o=e[e.length-1],s=0;s<e.length;s++){n=o,o=e[s];var c=t.pointsCompare(n,o);0!==c&&l((a=c<0?n:o,i=c<0?o:n,{id:r?r.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,r,n){return e.forEach((function(e){l(a(e.start,e.end,e),!0)})),r.forEach((function(e){l(a(e.start,e.end,e),!1)})),c(t,n)}}}},{"./linked-list":62}],62:[function(e,t,r){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,r){for(var n=e.root,a=e.root.next;null!==a;){if(r(a))return t.prev=a.prev,t.next=a,a.prev.next=t,void(a.prev=t);n=a,a=a.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.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}}},{}],63:[function(e,t,r){t.exports=function(e,t,r){var n=[],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{r&&r.chainStart(e);for(var l={index:0,matches_head:!1,matches_pt1:!1},s={index:0,matches_head:!1,matches_pt1:!1},c=l,u=0;u<n.length;u++){var d=(g=n[u])[0],f=(g[1],g[g.length-1]);g[g.length-2];if(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===l)return n.push([i,o]),void(r&&r.chainNew(i,o));if(c===s){r&&r.chainMatch(l.index);var p=l.index,h=l.matches_pt1?o:i,m=l.matches_head,g=n[p],v=m?g[0]:g[g.length-1],y=m?g[1]:g[g.length-2],x=m?g[g.length-1]:g[0],b=m?g[g.length-2]:g[1];return t.pointsCollinear(y,v,h)&&(m?(r&&r.chainRemoveHead(l.index,h),g.shift()):(r&&r.chainRemoveTail(l.index,h),g.pop()),v=y),t.pointsSame(x,h)?(n.splice(p,1),t.pointsCollinear(b,x,v)&&(m?(r&&r.chainRemoveTail(l.index,v),g.pop()):(r&&r.chainRemoveHead(l.index,v),g.shift())),r&&r.chainClose(l.index),void a.push(g)):void(m?(r&&r.chainAddHead(l.index,h),g.unshift(h)):(r&&r.chainAddTail(l.index,h),g.push(h)))}var _=l.index,w=s.index;r&&r.chainConnect(_,w);var T=n[_].length<n[w].length;l.matches_head?s.matches_head?T?(k(_),A(_,w)):(k(w),A(w,_)):A(w,_):s.matches_head?A(_,w):T?(k(_),A(w,_)):(k(w),A(_,w))}function M(e,t,r){return c.index=e,c.matches_head=t,c.matches_pt1=r,c===l?(c=s,!1):(c=null,!0)}function k(e){r&&r.chainReverse(e),n[e].reverse()}function A(e,a){var i=n[e],o=n[a],l=i[i.length-1],s=i[i.length-2],c=o[0],u=o[1];t.pointsCollinear(s,l,c)&&(r&&r.chainRemoveTail(e,l),i.pop(),l=s),t.pointsCollinear(l,c,u)&&(r&&r.chainRemoveHead(a,c),o.shift()),r&&r.chainJoin(e,a),n[e]=i.concat(o),n.splice(a,1)}})),a}},{}],64:[function(e,t,r){function n(e,t,r){var n=[];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]&&n.push({id:r?r.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[a],below:2===t[a]},otherFill:null})})),r&&r.selected(n),n}var a={union:function(e,t){return n(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return n(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return n(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return n(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return n(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};t.exports=a},{}],65:[function(e,t,r){var n,a,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{a="function"==typeof clearTimeout?clearTimeout:l}catch(e){a=l}}();var c,u=[],d=!1,f=-1;function p(){d&&c&&(d=!1,c.length?u=c.concat(u):f=-1,u.length&&h())}function h(){if(!d){var e=s(p);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===l||!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 m(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new m(e,t)),1!==u.length||d||s(h)},m.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=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,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}},{}],66:[function(e,t,r){(function(t,n){(function(){var a=e("process/browser.js").nextTick,i=Function.prototype.apply,o=Array.prototype.slice,l={},s=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(i.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(i.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=s++,n=!(arguments.length<2)&&o.call(arguments,1);return l[t]=!0,a((function(){l[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete l[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":65,timers:66}],67:[function(e,t,r){!function(e){var r=/^\s+/,n=/\s+$/,a=0,i=e.round,o=e.min,l=e.max,s=e.random;function c(t,s){if(s=s||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,s);var u=function(t){var a={r:0,g:0,b:0},i=1,s=null,c=null,u=null,d=!1,f=!1;"string"==typeof t&&(t=function(e){e=e.replace(r,"").replace(n,"").toLowerCase();var t,a=!1;if(L[e])e=L[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=H.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=H.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=H.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=H.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=H.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=H.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=H.hex8.exec(e))return{r:P(t[1]),g:P(t[2]),b:P(t[3]),a:N(t[4]),format:a?"name":"hex8"};if(t=H.hex6.exec(e))return{r:P(t[1]),g:P(t[2]),b:P(t[3]),format:a?"name":"hex"};if(t=H.hex4.exec(e))return{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),a:N(t[4]+""+t[4]),format:a?"name":"hex8"};if(t=H.hex3.exec(e))return{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),format:a?"name":"hex"};return!1}(t));"object"==typeof t&&(B(t.r)&&B(t.g)&&B(t.b)?(p=t.r,h=t.g,m=t.b,a={r:255*C(p,255),g:255*C(h,255),b:255*C(m,255)},d=!0,f="%"===String(t.r).substr(-1)?"prgb":"rgb"):B(t.h)&&B(t.s)&&B(t.v)?(s=R(t.s),c=R(t.v),a=function(t,r,n){t=6*C(t,360),r=C(r,100),n=C(n,100);var a=e.floor(t),i=t-a,o=n*(1-r),l=n*(1-i*r),s=n*(1-(1-i)*r),c=a%6;return{r:255*[n,l,o,o,s,n][c],g:255*[s,n,n,l,o,o][c],b:255*[o,o,s,n,n,l][c]}}(t.h,s,c),d=!0,f="hsv"):B(t.h)&&B(t.s)&&B(t.l)&&(s=R(t.s),u=R(t.l),a=function(e,t,r){var n,a,i;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=C(e,360),t=C(t,100),r=C(r,100),0===t)n=a=i=r;else{var l=r<.5?r*(1+t):r+t-r*t,s=2*r-l;n=o(s,l,e+1/3),a=o(s,l,e),i=o(s,l,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(t.h,s,u),d=!0,f="hsl"),t.hasOwnProperty("a")&&(i=t.a));var p,h,m;return i=D(i),{ok:d,format:t.format||f,r:o(255,l(a.r,0)),g:o(255,l(a.g,0)),b:o(255,l(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=s.format||u.format,this._gradientType=s.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,r){e=C(e,255),t=C(t,255),r=C(r,255);var n,a,i=l(e,t,r),s=o(e,t,r),c=(i+s)/2;if(i==s)n=a=0;else{var u=i-s;switch(a=c>.5?u/(2-i-s):u/(i+s),i){case e:n=(t-r)/u+(t<r?6:0);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:n,s:a,l:c}}function d(e,t,r){e=C(e,255),t=C(t,255),r=C(r,255);var n,a,i=l(e,t,r),s=o(e,t,r),c=i,u=i-s;if(a=0===i?0:u/i,i==s)n=0;else{switch(i){case e:n=(t-r)/u+(t<r?6:0);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:n,s:a,v:c}}function f(e,t,r,n){var a=[I(i(e).toString(16)),I(i(t).toString(16)),I(i(r).toString(16))];return n&&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 p(e,t,r,n){return[I(z(n)),I(i(e).toString(16)),I(i(t).toString(16)),I(i(r).toString(16))].join("")}function h(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.s-=t/100,r.s=O(r.s),c(r)}function m(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.s+=t/100,r.s=O(r.s),c(r)}function g(e){return c(e).desaturate(100)}function v(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.l+=t/100,r.l=O(r.l),c(r)}function y(e,t){t=0===t?0:t||10;var r=c(e).toRgb();return r.r=l(0,o(255,r.r-i(-t/100*255))),r.g=l(0,o(255,r.g-i(-t/100*255))),r.b=l(0,o(255,r.b-i(-t/100*255))),c(r)}function x(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.l-=t/100,r.l=O(r.l),c(r)}function b(e,t){var r=c(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,c(r)}function _(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function w(e){var t=c(e).toHsl(),r=t.h;return[c(e),c({h:(r+120)%360,s:t.s,l:t.l}),c({h:(r+240)%360,s:t.s,l:t.l})]}function T(e){var t=c(e).toHsl(),r=t.h;return[c(e),c({h:(r+90)%360,s:t.s,l:t.l}),c({h:(r+180)%360,s:t.s,l:t.l}),c({h:(r+270)%360,s:t.s,l:t.l})]}function M(e){var t=c(e).toHsl(),r=t.h;return[c(e),c({h:(r+72)%360,s:t.s,l:t.l}),c({h:(r+216)%360,s:t.s,l:t.l})]}function k(e,t,r){t=t||6,r=r||30;var n=c(e).toHsl(),a=360/r,i=[c(e)];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(c(n));return i}function A(e,t){t=t||6;for(var r=c(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/t;t--;)o.push(c({h:n,s:a,v:i})),i=(i+l)%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,r,n,a=this.toRgb();return t=a.r/255,r=a.g/255,n=a.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=D(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),r=i(100*e.s),n=i(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+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),r=i(100*e.s),n=i(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+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,r,n,a){var o=[I(i(e).toString(16)),I(i(t).toString(16)),I(i(r).toString(16)),I(z(n))];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*C(this._r,255))+"%",g:i(100*C(this._g,255))+"%",b:i(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*C(this._r,255))+"%, "+i(100*C(this._g,255))+"%, "+i(100*C(this._b,255))+"%)":"rgba("+i(100*C(this._r,255))+"%, "+i(100*C(this._g,255))+"%, "+i(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+p(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=c(e);r="#"+p(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(g,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(k,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(T,arguments)}},c.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:R(e[n]));e=r}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:s(),g:s(),b:s()})},c.mix=function(e,t,r){r=0===r?0:r||50;var n=c(e).toRgb(),a=c(t).toRgb(),i=r/100;return c({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},c.readability=function(t,r){var n=c(t),a=c(r);return(e.max(n.getLuminance(),a.getLuminance())+.05)/(e.min(n.getLuminance(),a.getLuminance())+.05)},c.isReadable=function(e,t,r){var n,a,i=c.readability(e,t);switch(a=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.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,r){var n,a,i,o,l=null,s=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;u<t.length;u++)(n=c.readability(e,t[u]))>s&&(s=n,l=c(t[u]));return c.isReadable(e,l,{level:i,size:o})||!a?l:(r.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],r))};var L=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"},S=c.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(L);function D(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function C(t,r){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(t)&&(t="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(t);return t=o(r,l(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function O(e){return o(1,l(0,e))}function P(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function z(t){return e.round(255*parseFloat(t)).toString(16)}function N(e){return P(e)/255}var F,E,j,H=(E="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",j="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+E),rgba:new RegExp("rgba"+j),hsl:new RegExp("hsl"+E),hsla:new RegExp("hsla"+j),hsv:new RegExp("hsv"+E),hsva:new RegExp("hsva"+j),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 B(e){return!!H.CSS_UNIT.exec(e)}void 0!==t&&t.exports?t.exports=c:window.tinycolor=c}(Math)},{}],68:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(s);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if("string"==typeof e){var t=e.match(c);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(u);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"\u95f0"===t[0]&&(r=!0,t=t.substring(1)),"\u6708"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(t);else{var a=t[t.length-1];r="i"===a||"I"===a}return this.toMonthIndex(e,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var a=this.intercalaryMonth(e);if(r&&t!==a||t<1||t>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&t<=a?t-1:t:t-1},toChineseMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);if(t<0||t>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?t<r?t+1:t:t+1},intercalaryMonth:function(e){return e=this._validateYear(e),d[e-d[0]]>>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(e,t,r){var a,o=this._validateYear(e,n.local.invalidyear),l=f[o-f[0]],s=l>>9&4095,c=l>>5&15,u=31&l;(a=i.newDate(s,c,u)).add(4-(a.dayOfWeek()||7),"d");var d=this.toJD(e,t,r)-a.toJD();return 1+Math.floor(d/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=d[e-d[0]];if(t>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-t?30:29},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,l,r,n.local.invalidDate);e=this._validateYear(a.year()),t=a.month(),r=a.day();var o=this.isIntercalaryMonth(e,t),l=this.toChineseMonth(e,t),s=function(e,t,r,n,a){var i,o,l;if("object"==typeof e)o=e,i=t||{};else{var s;if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(s=!1,i=n):(s=!!n,i=a||{}),o={year:e,month:t,day:r,isIntercalary:s}}l=o.day-1;var c,u=d[o.year-d[0]],p=u>>13;c=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var h=0;h<c;h++){l+=u&1<<12-h?30:29}var m=f[o.year-f[0]],g=new Date(m>>9&4095,(m>>5&15)-1,(31&m)+l);return i.year=g.getFullYear(),i.month=1+g.getMonth(),i.day=g.getDate(),i}(e,l,r,o);return i.toJD(s.year,s.month,s.day)},fromJD:function(e){var t=i.fromJD(e),r=function(e,t,r,n){var a,i;if("object"==typeof e)a=e,i=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i=n||{}}var o=f[a.year-f[0]],l=a.year<<9|a.month<<5|a.day;i.year=l>=o?a.year:a.year-1,o=f[i.year-f[0]];var s,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(a.year,a.month-1,a.day);s=Math.round((u-c)/864e5);var p,h=d[i.year-d[0]];for(p=0;p<13;p++){var m=h&1<<12-p?30:29;if(s<m)break;s-=m}var g=h>>13;!g||p<g?(i.isIntercalary=!1,i.month=1+p):p===g?(i.isIntercalary=!0,i.month=p):(i.isIntercalary=!1,i.month=p);return i.day=1+s,i}(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(l),r=this._validateYear(+t[1]),n=+t[2],a=!!t[3],i=this.toMonthIndex(r,n,a),o=+t[4];return this.newDate(r,i,o)},add:function(e,t,r){var n=e.year(),a=e.month(),i=this.isIntercalaryMonth(n,a),l=this.toChineseMonth(n,a),s=Object.getPrototypeOf(o.prototype).add.call(this,e,t,r);if("y"===r){var c=s.year(),u=s.month(),d=this.isIntercalaryMonth(c,l),f=i&&d?this.toMonthIndex(c,l,!0):this.toMonthIndex(c,l,!1);f!==u&&s.month(f)}return s}});var l=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,s=/^\d?\d[iI]?/m,c=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,u=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;n.calendars.chinese=o;var d=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],f=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{"../main":82,"object-assign":55}],69:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==3||e%4==-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return(e=a.year())<0&&e++,a.day()+30*(a.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.coptic=i},{"../main":82,"object-assign":55}],70:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){return(this._validate(e,t,r,n.local.invalidDate).day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year()+(a.year()<0?1:0),t=a.month(),(r=a.day())+(t>1?16:0)+(t>2?32*(t-2):0)+400*(e-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-32*(r-1)+1;return this.newDate(t<=0?t-1:t,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=i},{"../main":82,"object-assign":55}],71:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==3||e%4==-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return(e=a.year())<0&&e++,a.day()+30*(a.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},{"../main":82,"object-assign":55}],72:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return o(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===e?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),12===t&&this.leapYear(e)||8===t&&5===o(this.daysInYear(e),10)?30:9===t&&3===o(this.daysInYear(e),10)?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e<=0?e+1:e,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var l=7;l<=this.monthsInYear(e);l++)o+=this.daysInMonth(e,l);for(l=1;l<t;l++)o+=this.daysInMonth(e,l)}else for(l=7;l<t;l++)o+=this.daysInMonth(e,l);return o},_delay1:function(e){var t=Math.floor((235*e-234)/19),r=12084+13753*t,n=29*t+Math.floor(r/25920);return o(3*(n+1),7)<3&&n++,n},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e);return this._delay1(e+1)-r==356?2:r-t==382?1:0},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor(98496*(e-this.jdEpoch)/35975351)-1;e>=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=e<this.toJD(t,1,1)?7:1;e>this.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.hebrew=i},{"../main":82,"object-assign":55}],73:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){return(11*this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),e=e<=0?e+1:e,(r=a.day())+Math.ceil(29.5*(t-1))+354*(e-1)+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.islamic=i},{"../main":82,"object-assign":55}],74:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()<0?t.year()+1:t.year())%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),r=a.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),a=Math.floor((t-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),l=t-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,l)}}),n.calendars.julian=i},{"../main":82,"object-assign":55}],75:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}function l(e,t){return o(e-1,t)+1}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(e){e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year();var t=Math.floor(e/400);return e%=400,e+=e<0?400:0,t+"."+Math.floor(e/20)+"."+e%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r<e.length;r++){var n=parseInt(e[r],10);if(Math.abs(n)>19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate).day()},weekDay:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),!0},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate).toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=o((e-=this.jdEpoch)+8+340,365);return[Math.floor(t/20)+1,o(t,20)]},_toTzolkin:function(e){return[l((e-=this.jdEpoch)+20,20),l(e+4,13)]},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}}),n.calendars.mayan=i},{"../main":82,"object-assign":55}],76:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar;var o=n.instance("gregorian");a(i.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidMonth);(e=a.year())<0&&e++;for(var i=a.day(),l=1;l<a.month();l++)i+=this.daysPerMonth[l-1];return i+o.toJD(e+1468,3,13)},fromJD:function(e){e=Math.floor(e+.5);for(var t=Math.floor((e-(this.jdEpoch-1))/366);e>=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),n.calendars.nanakshahi=i},{"../main":82,"object-assign":55}],77:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){if(e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[e])return this.daysPerYear;for(var t=0,r=this.minMonth;r<=12;r++)t+=this.NEPALI_CALENDAR_DATA[e][r];return t},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[e]?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=n.instance(),o=0,l=t,s=e;this._createMissingCalendarData(e);var c=e-(l>9||9===l&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(9!==t&&(o=r,l--);9!==l;)l<=0&&(l=12,s--),o+=this.NEPALI_CALENDAR_DATA[s][l],l--;return 9===t?(o+=r-this.NEPALI_CALENDAR_DATA[s][0])<0&&(o+=i.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(e){var t=n.instance().fromJD(e),r=t.year(),a=t.dayOfYear(),i=r+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;a>s;)++o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var c=this.NEPALI_CALENDAR_DATA[i][o]-(s-a);return this.newDate(i,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r<e+2;r++)void 0===this.NEPALI_CALENDAR_DATA[r]&&(this.NEPALI_CALENDAR_DATA[r]=t)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),n.calendars.nepali=i},{"../main":82,"object-assign":55}],78:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xe6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xe6","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return 682*((t.year()-(t.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e-(e>=0?474:473),l=474+o(i,2820);return r+(t<=7?31*(t-1):30*(t-1)+6)+Math.floor((682*l-110)/2816)+365*(l-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(e){var t=(e=Math.floor(e)+.5)-this.toJD(475,1,1),r=Math.floor(t/1029983),n=o(t,1029983),a=2820;if(1029982!==n){var i=Math.floor(n/366),l=o(n,366);a=Math.floor((2134*i+2816*l+2815)/1028522)+i+1}var s=a+2820*r+474;s=s<=0?s-1:s;var c=e-this.toJD(s,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),d=e-this.toJD(s,u,1)+1;return this.newDate(s,u,d)}}),n.calendars.persian=i,n.calendars.jalali=i},{"../main":82,"object-assign":55}],79:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);e=this._t2gYear(t.year());return i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);e=this._t2gYear(a.year());return i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=this._t2gYear(a.year());return i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{"../main":82,"object-assign":55}],80:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);e=this._t2gYear(t.year());return i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);e=this._t2gYear(a.year());return i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=this._t2gYear(a.year());return i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),n.calendars.thai=o},{"../main":82,"object-assign":55}],81:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,a=0,i=0;i<o.length;i++){if(o[i]>r)return o[a]-o[a-1];a++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;n<o.length&&!(o[n]>t);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),l=i+1,s=a-12*i,c=t-o[r-1]+1;return this.newDate(l,s,c)},isValid:function(e,t,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(e=null!=e.year?e.year:e)>=1276&&e<=1500),a},_validate:function(e,t,r,a){var i=n.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),n.calendars.ummalqura=i;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":82,"object-assign":55}],82:[function(e,t,r){var n=e("object-assign");function a(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function l(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}n(a.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,a):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(0===i?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),n(i.prototype,{newDate:function(e,t,r){return this._calendar.newDate(null==e?this:e,t,r)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(l.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new i(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+o(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);a=e.day();"y"===r?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):"m"===r&&(!function(e){for(;o<e.minMonth;)i--,o+=e.monthsInYear(i);for(var t=e.monthsInYear(i);o>t-1+e.minMonth;)i++,o-=t,t=e.monthsInYear(i)}(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==t[0]&&e.year()>0==t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),a="m"===r?t:e.month(),i="d"===r?t:e.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth<this.monthsInYear(a)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(a)}return this._validateLevel--,n},toJSDate:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return c.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(e){return this.fromJD(c.instance().fromJSDate(e).toJD())},_validate:function(e,t,r,n){if(e.year){if(0===this._validateLevel&&this.name!==e.calendar().name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,e.calendar().local.name);return e}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(e,t,r))throw n.replace(/\{0\}/,this.local.name);var a=this.newDate(e,t,r);return this._validateLevel--,a}catch(e){throw this._validateLevel--,e}}}),s.prototype=new l,n(s.prototype,{name:"Gregorian",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==0&&(e%100!=0||e%400==0)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<3&&(t+=12,e--);var a=Math.floor(e/100),i=2-a+Math.floor(a/4);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+i-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-1867216.25)/36524.25),n=(r=t+1+r-Math.floor(r/4))+1524,a=Math.floor((n-122.1)/365.25),i=Math.floor(365.25*a),o=Math.floor((n-i)/30.6001),l=n-i-Math.floor(30.6001*o),s=o-(o>13.5?13:1),c=a-(s>2.5?4716:4715);return c<=0&&c--,this.newDate(c,s,l)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var c=t.exports=new a;c.cdate=i,c.baseCalendar=l,c.calendars.gregorian=s},{"object-assign":55}],83:[function(e,t,r){var n=e("object-assign"),a=e("./main");n(a.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),a.local=a.regionalOptions[""],n(a.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),n(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if("string"!=typeof e&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var n,i,o,l,s=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,d=r.monthNamesShort||this.local.monthNamesShort,f=r.monthNames||this.local.monthNames,p=(r.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;w+n<e.length&&e.charAt(w+n)===t;)n++;return w+=n-1,Math.floor(n/(r||1))>1}),h=function(e,t,r,n){var a=""+t;if(p(e,n))for(;a.length<r;)a="0"+a;return a},m=this,g=function(e){return"function"==typeof u?u.call(m,e,p("m")):x(h("m",e.month(),2))},v=function(e,t){return t?"function"==typeof f?f.call(m,e):f[e.month()-m.minMonth]:"function"==typeof d?d.call(m,e):d[e.month()-m.minMonth]},y=this.local.digits,x=function(e){return r.localNumbers&&y?y(e):e},b="",_=!1,w=0;w<e.length;w++)if(_)"'"!==e.charAt(w)||p("'")?b+=e.charAt(w):_=!1;else switch(e.charAt(w)){case"d":b+=x(h("d",t.day(),2));break;case"D":b+=(n="D",i=t.dayOfWeek(),o=s,l=c,p(n)?l[i]:o[i]);break;case"o":b+=h("o",t.dayOfYear(),3);break;case"w":b+=h("w",t.weekOfYear(),2);break;case"m":b+=g(t);break;case"M":b+=v(t,p("M"));break;case"y":b+=p("y",2)?t.year():(t.year()%100<10?"0":"")+t.year()%100;break;case"Y":p("Y",2),b+=t.formatYear();break;case"J":b+=t.toJD();break;case"@":b+=(t.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":b+=(t.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":p("'")?b+="'":_=!0;break;default:b+=e.charAt(w)}return b},parseDate:function(e,t,r){if(null==t)throw a.local.invalidArguments||a.regionalOptions[""].invalidArguments;if(""===(t="object"==typeof t?t.toString():t+""))return null;e=e||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n="string"!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var i=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,l=r.parseMonth||this.local.parseMonth,s=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,d=-1,f=-1,p=-1,h=-1,m=-1,g=!1,v=!1,y=function(t,r){for(var n=1;A+n<e.length&&e.charAt(A+n)===t;)n++;return A+=n-1,Math.floor(n/(r||1))>1},x=function(e,r){var n=y(e,r),i=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+i+"}"),l=t.substring(k).match(o);if(!l)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,k);return k+=l[0].length,parseInt(l[0],10)},b=this,_=function(){if("function"==typeof s){y("m");var e=s.call(b,t.substring(k));return k+=e.length,e}return x("m")},w=function(e,r,n,i){for(var o=y(e,i)?n:r,l=0;l<o.length;l++)if(t.substr(k,o[l].length).toLowerCase()===o[l].toLowerCase())return k+=o[l].length,l+b.minMonth;throw(a.local.unknownNameAt||a.regionalOptions[""].unknownNameAt).replace(/\{0\}/,k)},T=function(){if("function"==typeof u){var e=y("M")?u.call(b,t.substring(k)):c.call(b,t.substring(k));return k+=e.length,e}return w("M",c,u)},M=function(){if(t.charAt(k)!==e.charAt(A))throw(a.local.unexpectedLiteralAt||a.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,k);k++},k=0,A=0;A<e.length;A++)if(v)"'"!==e.charAt(A)||y("'")?M():v=!1;else switch(e.charAt(A)){case"d":h=x("d");break;case"D":w("D",i,o);break;case"o":m=x("o");break;case"w":x("w");break;case"m":p=_();break;case"M":p=T();break;case"y":var L=A;g=!y("y",2),A=L,f=x("y",2);break;case"Y":f=x("Y",2);break;case"J":d=x("J")+.5,"."===t.charAt(k)&&(k++,x("J"));break;case"@":d=x("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":d=x("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":k=t.length;break;case"'":y("'")?M():v=!0;break;default:M()}if(k<t.length)throw a.local.unexpectedText||a.regionalOptions[""].unexpectedText;if(-1===f?f=this.today().year():f<100&&g&&(f+=-1===n?1900:this.today().year()-this.today().year()%100-(f<=n?0:100)),"string"==typeof p&&(p=l.call(this,f,p)),m>-1){p=1,h=m;for(var S=this.daysInMonth(f,p);h>S;S=this.daysInMonth(f,p))p++,h-=S}return d>-1?this.fromJD(d):this.newDate(f,p,h)},determineDate:function(e,t,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return t=t?t.newDate():null,e=null==e?t:"string"==typeof e?function(e){try{return i.parseDate(n,e,a)}catch(e){}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,l=o.exec(e);l;)t.add(parseInt(l[1],10),l[2]||"d"),l=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e)}})},{"./main":82,"object-assign":55}],84:[function(e,t,r){"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}]},{}],85:[function(e,t,r){"use strict";var n=e("./arrow_paths"),a=e("../../plots/font_attributes"),i=e("../../plots/cartesian/constants"),o=e("../../plot_api/plot_template").templatedArray;e("../../constants/axis_placeable_objects");t.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../constants/axis_placeable_objects":208,"../../plot_api/plot_template":268,"../../plots/cartesian/constants":286,"../../plots/font_attributes":310,"./arrow_paths":84}],86:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("./draw").draw;function o(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach((function(t){var r=a.getFromId(e,t.xref),n=a.getFromId(e,t.yref),i=a.getRefType(t.xref),o=a.getRefType(t.yref);t._extremes={},"range"===i&&l(t,r),"range"===o&&l(t,n)}))}function l(e,t){var r,n=t._id,i=n.charAt(0),o=e[i],l=e["a"+i],s=e[i+"ref"],c=e["a"+i+"ref"],u=e["_"+i+"padplus"],d=e["_"+i+"padminus"],f={x:1,y:-1}[i]*e[i+"shift"],p=3*e.arrowsize*e.arrowwidth||0,h=p+f,m=p-f,g=3*e.startarrowsize*e.arrowwidth||0,v=g+f,y=g-f;if(c===s){var x=a.findExtremes(t,[t.r2c(o)],{ppadplus:h,ppadminus:m}),b=a.findExtremes(t,[t.r2c(l)],{ppadplus:Math.max(u,v),ppadminus:Math.max(d,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=l?v+l:v,y=l?y-l:y,r=a.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(u,h,v),ppadminus:Math.max(d,m,y)});e._extremes[n]=r}t.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([i,o],e)}},{"../../lib":232,"../../plots/cartesian/axes":279,"./draw":91}],87:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("../../plot_api/plot_template").arrayEditor;function o(e,t){var r,n,a,i,o,s,c,u=e._fullLayout.annotations,d=[],f=[],p=[],h=(t||[]).length;for(r=0;r<u.length;r++)if(i=(a=u[r]).clicktoshow){for(n=0;n<h;n++)if(s=(o=t[n]).xaxis,c=o.yaxis,s._id===a.xref&&c._id===a.yref&&s.d2r(o.x)===l(a._xclick,s)&&c.d2r(o.y)===l(a._yclick,c)){(a.visible?"onout"===i?f:p:d).push(r);break}n===h&&a.visible&&"onout"===i&&f.push(r)}return{on:d,off:f,explicitOff:p}}function l(e,t){return"log"===t.type?t.l2r(e):t.d2r(e)}t.exports={hasClickToShow:function(e,t){var r=o(e,t);return r.on.length>0||r.explicitOff.length>0},onClick:function(e,t){var r,l,s=o(e,t),c=s.on,u=s.off.concat(s.explicitOff),d={},f=e._fullLayout.annotations;if(!c.length&&!u.length)return;for(r=0;r<c.length;r++)(l=i(e.layout,"annotations",f[c[r]])).modifyItem("visible",!0),n.extendFlat(d,l.getUpdateObj());for(r=0;r<u.length;r++)(l=i(e.layout,"annotations",f[u[r]])).modifyItem("visible",!1),n.extendFlat(d,l.getUpdateObj());return a.call("update",e,{},d)}}},{"../../lib":232,"../../plot_api/plot_template":268,"../../registry":318}],88:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../color");t.exports=function(e,t,r,i){i("opacity");var o=i("bgcolor"),l=i("bordercolor"),s=a.opacity(l);i("borderpad");var c=i("borderwidth"),u=i("showarrow");if(i("text",u?" ":r._dfltTitle.annotation),i("textangle"),n.coerceFont(i,"font",r.font),i("width"),i("align"),i("height")&&i("valign"),u){var d,f,p=i("arrowside");-1!==p.indexOf("end")&&(d=i("arrowhead"),f=i("arrowsize")),-1!==p.indexOf("start")&&(i("startarrowhead",d),i("startarrowsize",f)),i("arrowcolor",s?t.bordercolor:a.defaultLine),i("arrowwidth",2*(s&&c||1)),i("standoff"),i("startstandoff")}var h=i("hovertext"),m=r.hoverlabel||{};if(h){var g=i("hoverlabel.bgcolor",m.bgcolor||(a.opacity(o)?a.rgb(o):a.defaultLine)),v=i("hoverlabel.bordercolor",m.bordercolor||a.contrast(g));n.coerceFont(i,"hoverlabel.font",{family:m.font.family,size:m.font.size,color:m.font.color||v})}i("captureevents",!!h)}},{"../../lib":232,"../color":102}],89:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib/to_log_range");t.exports=function(e,t,r,i){t=t||{};var o="log"===r&&"linear"===t.type,l="linear"===r&&"log"===t.type;if(o||l)for(var s,c,u=e._fullLayout.annotations,d=t._id.charAt(0),f=0;f<u.length;f++)s=u[f],c="annotations["+f+"].",s[d+"ref"]===t._id&&p(d),s["a"+d+"ref"]===t._id&&p("a"+d);function p(e){var r=s[e],l=null;l=o?a(r,t.range):Math.pow(10,r),n(l)||(l=null),i(c+e,l)}}},{"../../lib/to_log_range":257,"fast-isnumeric":17}],90:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../../plots/array_container_defaults"),o=e("./common_defaults"),l=e("./attributes");function s(e,t,r){function i(r,a){return n.coerce(e,t,l,r,a)}var s=i("visible"),c=i("clicktoshow");if(s||c){o(e,t,r,i);for(var u=t.showarrow,d=["x","y"],f=[-10,-30],p={_fullLayout:r},h=0;h<2;h++){var m=d[h],g=a.coerceRef(e,t,p,m,"","paper");if("paper"!==g)a.getFromId(p,g)._annIndices.push(t._index);if(a.coercePosition(t,p,i,g,m,.5),u){var v="a"+m,y=a.coerceRef(e,t,p,v,"pixel",["pixel","paper"]);"pixel"!==y&&y!==g&&(y=t[v]="pixel");var x="pixel"===y?f[h]:.4;a.coercePosition(t,p,i,y,v,x)}i(m+"anchor"),i(m+"shift")}if(n.noneOrAll(e,t,["x","y"]),u&&n.noneOrAll(e,t,["ax","ay"]),c){var b=i("xclick"),_=i("yclick");t._xclick=void 0===b?t.x:a.cleanPosition(b,p,t.xref),t._yclick=void 0===_?t.y:a.cleanPosition(_,p,t.yref)}}}t.exports=function(e,t){i(e,t,{name:"annotations",handleItemDefaults:s})}},{"../../lib":232,"../../plots/array_container_defaults":274,"../../plots/cartesian/axes":279,"./attributes":85,"./common_defaults":88}],91:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../registry"),i=e("../../plots/plots"),o=e("../../lib"),l=o.strTranslate,s=e("../../plots/cartesian/axes"),c=e("../color"),u=e("../drawing"),d=e("../fx"),f=e("../../lib/svg_text_utils"),p=e("../../lib/setcursor"),h=e("../dragelement"),m=e("../../plot_api/plot_template").arrayEditor,g=e("./draw_arrow_head");function v(e,t){var r=e._fullLayout.annotations[t]||{},n=s.getFromId(e,r.xref),a=s.getFromId(e,r.yref);n&&n.setScale(),a&&a.setScale(),x(e,r,t,!1,n,a)}function y(e,t,r,n,a){var i=a[r],o=a[r+"ref"],l=-1!==r.indexOf("y"),c="domain"===s.getRefType(o),u=l?n.h:n.w;return e?c?i+(l?-t:t)/e._length:e.p2r(e.r2p(i)+t):i+(l?-t:t)/u}function x(e,t,r,i,v,x){var b,_,w=e._fullLayout,T=e._fullLayout._size,M=e._context.edits;i?(b="annotation-"+i,_=i+".annotations"):(b="annotation",_="annotations");var k=m(e.layout,_,t),A=k.modifyBase,L=k.modifyItem,S=k.getUpdateObj;w._infolayer.selectAll("."+b+'[data-index="'+r+'"]').remove();var D="clip"+w._uid+"_ann"+r;if(t._input&&!1!==t.visible){var C={x:{},y:{}},O=+t.textangle||0,P=w._infolayer.append("g").classed(b,!0).attr("data-index",String(r)).style("opacity",t.opacity),I=P.append("g").classed("annotation-text-g",!0),R=M[t.showarrow?"annotationTail":"annotationPosition"],z=t.captureevents||M.annotationText||R,N=I.append("g").style("pointer-events",z?"all":null).call(p,"pointer").on("click",(function(){e._dragging=!1,e.emit("plotly_clickannotation",G(n.event))}));t.hovertext&&N.on("mouseover",(function(){var r=t.hoverlabel,n=r.font,a=this.getBoundingClientRect(),i=e.getBoundingClientRect();d.loneHover({x0:a.left-i.left,x1:a.right-i.left,y:(a.top+a.bottom)/2-i.top,text:t.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:e})})).on("mouseout",(function(){d.loneUnhover(w._hoverlayer.node())}));var F=t.borderwidth,E=t.borderpad,j=F+E,H=N.append("rect").attr("class","bg").style("stroke-width",F+"px").call(c.stroke,t.bordercolor).call(c.fill,t.bgcolor),B=t.width||t.height,Y=w._topclips.selectAll("#"+D).data(B?[0]:[]);Y.enter().append("clipPath").classed("annclip",!0).attr("id",D).append("rect"),Y.exit().remove();var V=t.font,U=w._meta?o.templateString(t.text,w._meta):t.text,q=N.append("text").classed("annotation-text",!0).text(U);M.annotationText?q.call(f.makeEditable,{delegate:N,gd:e}).call(Z).on("edit",(function(r){t.text=r,this.call(Z),L("text",r),v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0),a.call("_guiRelayout",e,S())})):q.call(Z)}else n.selectAll("#"+D).remove();function G(e){var n={index:r,annotation:t._input,fullAnnotation:t,event:e};return i&&(n.subplotId=i),n}function Z(r){return r.call(u.font,V).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),f.convertToTspans(r,e,W),r}function W(){var r=q.selectAll("a");1===r.size()&&r.text()===q.text()&&N.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(H.node());var n=N.select(".annotation-text-math-group"),d=!n.empty(),m=u.bBox((d?n:q).node()),b=m.width,_=m.height,k=t.width||b,z=t.height||_,E=Math.round(k+2*j),V=Math.round(z+2*j);function U(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]}for(var Z=!1,W=["x","y"],X=0;X<W.length;X++){var J,Q,K,$,ee,te=W[X],re=t[te+"ref"]||te,ne=t["a"+te+"ref"],ae={x:v,y:x}[te],ie=(O+("x"===te?0:-90))*Math.PI/180,oe=E*Math.cos(ie),le=V*Math.sin(ie),se=Math.abs(oe)+Math.abs(le),ce=t[te+"anchor"],ue=t[te+"shift"]*("x"===te?1:-1),de=C[te],fe=s.getRefType(re);if(ae&&"domain"!==fe){var pe=ae.r2fraction(t[te]);(pe<0||pe>1)&&(ne===re?((pe=ae.r2fraction(t["a"+te]))<0||pe>1)&&(Z=!0):Z=!0),J=ae._offset+ae.r2p(t[te]),$=.5}else{var he="domain"===fe;"x"===te?(K=t[te],J=he?ae._offset+ae._length*K:J=T.l+T.w*K):(K=1-t[te],J=he?ae._offset+ae._length*K:J=T.t+T.h*K),$=t.showarrow?.5:K}if(t.showarrow){de.head=J;var me=t["a"+te];if(ee=oe*U(.5,t.xanchor)-le*U(.5,t.yanchor),ne===re){var ge=s.getRefType(ne);"domain"===ge?("y"===te&&(me=1-me),de.tail=ae._offset+ae._length*me):"paper"===ge?"y"===te?(me=1-me,de.tail=T.t+T.h*me):de.tail=T.l+T.w*me:de.tail=ae._offset+ae.r2p(me),Q=ee}else de.tail=J+me,Q=ee+me;de.text=de.tail+ee;var ve=w["x"===te?"width":"height"];if("paper"===re&&(de.head=o.constrain(de.head,1,ve-1)),"pixel"===ne){var ye=-Math.max(de.tail-3,de.text),xe=Math.min(de.tail+3,de.text)-ve;ye>0?(de.tail+=ye,de.text+=ye):xe>0&&(de.tail-=xe,de.text-=xe)}de.tail+=ue,de.head+=ue}else Q=ee=se*U($,ce),de.text=J+ee;de.text+=ue,ee+=ue,Q+=ue,t["_"+te+"padplus"]=se/2+Q,t["_"+te+"padminus"]=se/2-Q,t["_"+te+"size"]=se,t["_"+te+"shift"]=ee}if(Z)N.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(k-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(z-_)*("middle"===t.valign?.5:1)),d)n.select("svg").attr({x:j+be-1,y:j+_e}).call(u.setClipUrl,B?D:null,e);else{var we=j+_e-m.top,Te=j+be-m.left;q.call(f.positionText,Te,we).call(u.setClipUrl,B?D:null,e)}Y.select("rect").call(u.setRect,j,j,k,z),H.call(u.setRect,F/2,F/2,E-F,V-F),N.call(u.setTranslate,Math.round(C.x.text-E/2),Math.round(C.y.text-V/2)),I.attr({transform:"rotate("+O+","+C.x.text+","+C.y.text+")"});var Me,ke=function(r,n){P.selectAll(".annotation-arrow-g").remove();var s=C.x.head,d=C.y.head,f=C.x.tail+r,p=C.y.tail+n,m=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(O,m,b),w=o.apply2DTransform(_),k=o.apply2DTransform2(_),D=+H.attr("width"),R=+H.attr("height"),z=m-.5*D,F=z+D,E=b-.5*R,j=E+R,B=[[z,E,z,j],[z,j,F,j],[F,j,F,E],[F,E,z,E]].map(k);if(!B.reduce((function(e,t){return e^!!o.segmentsIntersect(s,d,s+1e6,d+1e6,t[0],t[1],t[2],t[3])}),!1)){B.forEach((function(e){var t=o.segmentsIntersect(f,p,s,d,e[0],e[1],e[2],e[3]);t&&(f=t.x,p=t.y)}));var Y=t.arrowwidth,V=t.arrowcolor,U=t.arrowside,q=P.append("g").style({opacity:c.opacity(V)}).classed("annotation-arrow-g",!0),G=q.append("path").attr("d","M"+f+","+p+"L"+s+","+d).style("stroke-width",Y+"px").call(c.stroke,c.rgb(V));if(g(G,U,t),M.annotationPosition&&G.node().parentNode&&!i){var Z=s,W=d;if(t.standoff){var X=Math.sqrt(Math.pow(s-f,2)+Math.pow(d-p,2));Z+=t.standoff*(f-s)/X,W+=t.standoff*(p-d)/X}var J,Q,K=q.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-Z)+","+(p-W),transform:l(Z,W)}).style("stroke-width",Y+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");h.init({element:K.node(),gd:e,prepFn:function(){var e=u.getTranslate(N);J=e.x,Q=e.y,v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(e,r){var n=w(J,Q),a=n[0]+e,i=n[1]+r;N.call(u.setTranslate,a,i),L("x",y(v,e,"x",T,t)),L("y",y(x,r,"y",T,t)),t.axref===t.xref&&L("ax",y(v,e,"ax",T,t)),t.ayref===t.yref&&L("ay",y(x,r,"ay",T,t)),q.attr("transform",l(e,r)),I.attr({transform:"rotate("+O+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",e,S());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};if(t.showarrow&&ke(0,0),R)h.init({element:N.node(),gd:e,prepFn:function(){Me=I.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?L("ax",y(v,e,"ax",T,t)):L("ax",t.ax+e),t.ayref===t.yref?L("ay",y(x,r,"ay",T.w,t)):L("ay",t.ay+r),ke(e,r);else{if(i)return;var a,o;if(v)a=y(v,e,"x",T,t);else{var s=t._xsize/T.w,c=t.x+(t._xshift-t.xshift)/T.w-s/2;a=h.align(c+e/T.w,s,0,1,t.xanchor)}if(x)o=y(x,r,"y",T,t);else{var u=t._ysize/T.h,d=t.y-(t._yshift+t.yshift)/T.h-u/2;o=h.align(d-r/T.h,u,0,1,t.yanchor)}L("x",a),L("y",o),v&&x||(n=h.getCursor(v?.5:a,x?.5:o,t.xanchor,t.yanchor))}I.attr({transform:l(e,r)+Me}),p(N,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",G(n))},doneFn:function(){p(N),a.call("_guiRelayout",e,S());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 r=0;r<t.annotations.length;r++)t.annotations[r].visible&&v(e,r);return i.previousPromises(e)},drawOne:v,drawRaw:x}},{"../../lib":232,"../../lib/setcursor":252,"../../lib/svg_text_utils":255,"../../plot_api/plot_template":268,"../../plots/cartesian/axes":279,"../../plots/plots":316,"../../registry":318,"../color":102,"../dragelement":121,"../drawing":124,"../fx":142,"./draw_arrow_head":92,"@plotly/d3":11}],92:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../color"),i=e("./arrow_paths"),o=e("../../lib"),l=o.strScale,s=o.strRotate,c=o.strTranslate;t.exports=function(e,t,r){var o,u,d,f,p=e.node(),h=i[r.arrowhead||0],m=i[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),v=(r.arrowwidth||1)*(r.startarrowsize||1),y=t.indexOf("start")>=0,x=t.indexOf("end")>=0,b=h.backoff*g+r.standoff,_=m.backoff*v+r.startstandoff;if("line"===p.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=o.x-u.x,T=o.y-u.y;if(f=(d=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void R();if(b){if(b*b>w*w+T*T)return void R();var M=b*Math.cos(d),k=b*Math.sin(d);u.x+=M,u.y+=k,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void R();var A=_*Math.cos(d),L=_*Math.sin(d);o.x-=A,o.y-=L,e.attr({x1:o.x,y1:o.y})}}else if("path"===p.nodeName){var S=p.getTotalLength(),D="";if(S<b+_)return void R();var C=p.getPointAtLength(0),O=p.getPointAtLength(.1);d=Math.atan2(C.y-O.y,C.x-O.x),o=p.getPointAtLength(Math.min(_,S)),D="0px,"+_+"px,";var P=p.getPointAtLength(S),I=p.getPointAtLength(S-.1);f=Math.atan2(P.y-I.y,P.x-I.x),u=p.getPointAtLength(Math.max(0,S-b)),D+=S-(D?_+b:b)+"px,"+S+"px",e.style("stroke-dasharray",D)}function R(){e.style("stroke-dasharray","0px,100px")}function z(t,i,o,u){t.path&&(t.noRotate&&(o=0),n.select(p.parentNode).append("path").attr({class:e.attr("class"),d:t.path,transform:c(i.x,i.y)+s(180*o/Math.PI)+l(u)}).style({fill:a.rgb(r.arrowcolor),"stroke-width":0}))}y&&z(m,o,d,v),x&&z(h,u,f,g)}},{"../../lib":232,"../color":102,"./arrow_paths":84,"@plotly/d3":11}],93:[function(e,t,r){"use strict";var n=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:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:a.hasClickToShow,onClick:a.onClick,convertCoords:e("./convert_coords")}},{"../../plots/cartesian/include_components":292,"./attributes":85,"./calc_autorange":86,"./click":87,"./convert_coords":89,"./defaults":90,"./draw":91}],94:[function(e,t,r){"use strict";var n=e("../annotations/attributes"),a=e("../../plot_api/edit_types").overrideAll,i=e("../../plot_api/plot_template").templatedArray;t.exports=a(i("annotation",{visible:n.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},{"../../plot_api/edit_types":261,"../../plot_api/plot_template":268,"../annotations/attributes":85}],95:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes");function i(e,t){var r=t.fullSceneLayout.domain,i=t.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},n.extendFlat(e._xa,o),a.setConvert(e._xa),e._xa._offset=i.l+r.x[0]*i.w,e._xa.l2p=function(){return.5*(1+e._pdata[0]/e._pdata[3])*i.w*(r.x[1]-r.x[0])},e._ya={},n.extendFlat(e._ya,o),a.setConvert(e._ya),e._ya._offset=i.t+(1-r.y[1])*i.h,e._ya.l2p=function(){return.5*(1-e._pdata[1]/e._pdata[3])*i.h*(r.y[1]-r.y[0])}}t.exports=function(e){for(var t=e.fullSceneLayout.annotations,r=0;r<t.length;r++)i(t[r],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()}},{"../../lib":232,"../../plots/cartesian/axes":279}],96:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../../plots/array_container_defaults"),o=e("../annotations/common_defaults"),l=e("./attributes");function s(e,t,r,i){function s(r,a){return n.coerce(e,t,l,r,a)}function c(e){var n=e+"axis",i={_fullLayout:{}};return i._fullLayout[n]=r[n],a.coercePosition(t,i,s,e,e,.5)}s("visible")&&(o(e,t,i.fullLayout,s),c("x"),c("y"),c("z"),n.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",s("xanchor"),s("yanchor"),s("xshift"),s("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",s("ax",-10),s("ay",-30),n.noneOrAll(e,t,["ax","ay"])))}t.exports=function(e,t,r){i(e,t,{name:"annotations",handleItemDefaults:s,fullLayout:r.fullLayout})}},{"../../lib":232,"../../plots/array_container_defaults":274,"../../plots/cartesian/axes":279,"../annotations/common_defaults":88,"./attributes":94}],97:[function(e,t,r){"use strict";var n=e("../annotations/draw").drawRaw,a=e("../../plots/gl3d/project"),i=["x","y","z"];t.exports=function(e){for(var t=e.fullSceneLayout,r=e.dataScale,o=t.annotations,l=0;l<o.length;l++){for(var s=o[l],c=!1,u=0;u<3;u++){var d=i[u],f=s[d],p=t[d+"axis"].r2fraction(f);if(p<0||p>1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+l+'"]').remove():(s._pdata=a(e.glplot.cameraParams,[t.xaxis.r2l(s.x)*r[0],t.yaxis.r2l(s.y)*r[1],t.zaxis.r2l(s.z)*r[2]]),n(e.graphDiv,s,l,e.id,s._xa,s._ya))}}},{"../../plots/gl3d/project":313,"../annotations/draw":91}],98:[function(e,t,r){"use strict";var n=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 r=n.subplotsRegistry.gl3d;if(!r)return;for(var i=r.attrRegex,o=Object.keys(e),l=0;l<o.length;l++){var s=o[l];i.test(s)&&(e[s].annotations||[]).length&&(a.pushUnique(t._basePlotModules,r),a.pushUnique(t._subplots.gl3d,s))}},convert:e("./convert"),draw:e("./draw")}},{"../../lib":232,"../../registry":318,"./attributes":94,"./convert":95,"./defaults":96,"./draw":97}],99:[function(e,t,r){"use strict";t.exports=e("world-calendars/dist/main"),e("world-calendars/dist/plus"),e("world-calendars/dist/calendars/chinese"),e("world-calendars/dist/calendars/coptic"),e("world-calendars/dist/calendars/discworld"),e("world-calendars/dist/calendars/ethiopian"),e("world-calendars/dist/calendars/hebrew"),e("world-calendars/dist/calendars/islamic"),e("world-calendars/dist/calendars/julian"),e("world-calendars/dist/calendars/mayan"),e("world-calendars/dist/calendars/nanakshahi"),e("world-calendars/dist/calendars/nepali"),e("world-calendars/dist/calendars/persian"),e("world-calendars/dist/calendars/taiwan"),e("world-calendars/dist/calendars/thai"),e("world-calendars/dist/calendars/ummalqura")},{"world-calendars/dist/calendars/chinese":68,"world-calendars/dist/calendars/coptic":69,"world-calendars/dist/calendars/discworld":70,"world-calendars/dist/calendars/ethiopian":71,"world-calendars/dist/calendars/hebrew":72,"world-calendars/dist/calendars/islamic":73,"world-calendars/dist/calendars/julian":74,"world-calendars/dist/calendars/mayan":75,"world-calendars/dist/calendars/nanakshahi":76,"world-calendars/dist/calendars/nepali":77,"world-calendars/dist/calendars/persian":78,"world-calendars/dist/calendars/taiwan":79,"world-calendars/dist/calendars/thai":80,"world-calendars/dist/calendars/ummalqura":81,"world-calendars/dist/main":82,"world-calendars/dist/plus":83}],100:[function(e,t,r){"use strict";var n=e("./calendars"),a=e("../../lib"),i=e("../../constants/numerical"),o=i.EPOCHJD,l=i.ONEDAY,s={valType:"enumerated",values:a.sortObjectKeys(n.calendars),editType:"calc",dflt:"gregorian"},c=function(e,t,r,n){var i={};return i[r]=s,a.coerce(e,t,i,r,n)},u={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:"##",w:"##",c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};var d={};function f(e){var t=d[e];return t||(t=d[e]=n.instance(e))}function p(e){return a.extendFlat({},s,{description:e})}function h(e){return"Sets the calendar system to use with `"+e+"` date data."}var m={xcalendar:p(h("x"))},g=a.extendFlat({},m,{ycalendar:p(h("y"))}),v=a.extendFlat({},g,{zcalendar:p(h("z"))}),y=p(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:g,bar:g,box:g,heatmap:g,contour:g,histogram:g,histogram2d:g,histogram2dcontour:g,scatter3d:v,surface:v,mesh3d:v,scattergl:g,ohlc:m,candlestick:m},layout:{calendar:p(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:y},yaxis:{calendar:y},scene:{xaxis:{calendar:y},yaxis:{calendar:y},zaxis:{calendar:y}},polar:{radialaxis:{calendar:y}}},transforms:{filter:{valuecalendar:p(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:p(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:s,handleDefaults:c,handleTraceDefaults:function(e,t,r,n){for(var a=0;a<r.length;a++)c(e,t,r[a]+"calendar",n.calendar)},CANONICAL_SUNDAY:{chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},CANONICAL_TICK:{chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},DFLTRANGE:{chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},getCal:f,worldCalFmt:function(e,t,r){for(var n,a,i,s,c,d=Math.floor((t+.05)/l)+o,p=f(r).fromJD(d),h=0;-1!==(h=e.indexOf("%",h));)"0"===(n=e.charAt(h+1))||"-"===n||"_"===n?(i=3,a=e.charAt(h+2),"_"===n&&(n="-")):(a=n,n="0",i=2),(s=u[a])?(c="##"===s?"##":p.formatDate(s[n]),e=e.substr(0,h)+c+e.substr(h+i),h+=c.length):h+=i;return e}}},{"../../constants/numerical":212,"../../lib":232,"./calendars":99}],101:[function(e,t,r){"use strict";r.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],r.defaultLine="#444",r.lightLine="#eee",r.background="#fff",r.borderLine="#BEC8D9",r.lightFraction=1e3/11},{}],102:[function(e,t,r){"use strict";var n=e("tinycolor2"),a=e("fast-isnumeric"),i=e("../../lib/array").isTypedArray,o=t.exports={},l=e("./attributes");o.defaults=l.defaults;var s=o.defaultLine=l.defaultLine;o.lightLine=l.lightLine;var c=o.background=l.background;function u(e){if(a(e)||"string"!=typeof e)return e;var t=e.trim();if("rgb"!==t.substr(0,3))return e;var r=t.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return e;var n=r[1].trim().split(/\s*[\s,]\s*/),i="a"===t.charAt(3)&&4===n.length;if(!i&&3!==n.length)return e;for(var o=0;o<n.length;o++){if(!n[o].length)return e;if(n[o]=Number(n[o]),!(n[o]>=0))return e;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var l=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+l+", "+n[3]+")":"rgb("+l+")"}o.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},o.rgb=function(e){return o.tinyRGB(n(e))},o.opacity=function(e){return e?n(e).getAlpha():0},o.addOpacity=function(e,t){var r=n(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"},o.combine=function(e,t){var r=n(e).toRgb();if(1===r.a)return n(e).toRgbString();var a=n(t||c).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-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.contrast=function(e,t,r){var a=n(e);return 1!==a.getAlpha()&&(a=n(o.combine(e,c))),(a.isDark()?t?a.lighten(t):c:r?a.darken(r):s).toString()},o.stroke=function(e,t){var r=n(t);e.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(e,t){var r=n(t);e.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(e){if(e&&"object"==typeof e){var t,r,n,a,l=Object.keys(e);for(t=0;t<l.length;t++)if(a=e[n=l[t]],"color"===n.substr(n.length-5))if(Array.isArray(a))for(r=0;r<a.length;r++)a[r]=u(a[r]);else e[n]=u(a);else if("colorscale"===n.substr(n.length-10)&&Array.isArray(a))for(r=0;r<a.length;r++)Array.isArray(a[r])&&(a[r][1]=u(a[r][1]));else if(Array.isArray(a)){var s=a[0];if(!Array.isArray(s)&&s&&"object"==typeof s)for(r=0;r<a.length;r++)o.clean(a[r])}else a&&"object"==typeof a&&!i(a)&&o.clean(a)}}},{"../../lib/array":218,"./attributes":101,"fast-isnumeric":17,tinycolor2:67}],103:[function(e,t,r){"use strict";var n=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"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",dflt:1.02,min:-2,max:3},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number",dflt:.5,min:-2,max:3},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle"},ypad:{valType:"number",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:n.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:i({},n.ticks,{dflt:""}),ticklabeloverflow:i({},n.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside bottom","inside bottom"],dflt:"outside"},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,tickfont:a({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string"},font:a({}),side:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}},_deprecated:{title:{valType:"string"},titlefont:a({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},{"../../lib/extend":226,"../../plot_api/edit_types":261,"../../plots/cartesian/layout_attributes":294,"../../plots/font_attributes":310}],104:[function(e,t,r){"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"}}},{}],105:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plot_api/plot_template"),i=e("../../plots/cartesian/tick_value_defaults"),o=e("../../plots/cartesian/tick_mark_defaults"),l=e("../../plots/cartesian/tick_label_defaults"),s=e("../../plots/cartesian/prefix_suffix_defaults"),c=e("./attributes");t.exports=function(e,t,r){var u=a.newContainer(t,"colorbar"),d=e.colorbar||{};function f(e,t){return n.coerce(d,u,c,e,t)}var p=f("thicknessmode");f("thickness","fraction"===p?30/(r.width-r.margin.l-r.margin.r):30);var h=f("lenmode");f("len","fraction"===h?1:r.height-r.margin.t-r.margin.b),f("x"),f("xanchor"),f("xpad"),f("y"),f("yanchor"),f("ypad"),n.noneOrAll(d,u,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var m=f("ticklabelposition");f("ticklabeloverflow",-1!==m.indexOf("inside")?"hide past domain":"hide past div"),i(d,u,f,"linear");var g=r.font,v={outerTicks:!1,font:g};-1!==m.indexOf("inside")&&(v.bgColor="black"),s(d,u,f,"linear",v),l(d,u,f,"linear",v),o(d,u,f,"linear",v),f("title.text",r._dfltTitle.colorbar);var y=u.tickfont,x=n.extendFlat({},y,{color:g.color,size:n.bigFont(y.size)});n.coerceFont(f,"title.font",x),f("title.side")}},{"../../lib":232,"../../plot_api/plot_template":268,"../../plots/cartesian/prefix_suffix_defaults":298,"../../plots/cartesian/tick_label_defaults":303,"../../plots/cartesian/tick_mark_defaults":304,"../../plots/cartesian/tick_value_defaults":305,"./attributes":103}],106:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("tinycolor2"),i=e("../../plots/plots"),o=e("../../registry"),l=e("../../plots/cartesian/axes"),s=e("../dragelement"),c=e("../../lib"),u=c.strTranslate,d=e("../../lib/extend").extendFlat,f=e("../../lib/setcursor"),p=e("../drawing"),h=e("../color"),m=e("../titles"),g=e("../../lib/svg_text_utils"),v=e("../colorscale/helpers").flipScale,y=e("../../plots/cartesian/axis_defaults"),x=e("../../plots/cartesian/position_defaults"),b=e("../../plots/cartesian/layout_attributes"),_=e("../../constants/alignment"),w=_.LINE_SPACING,T=_.FROM_TL,M=_.FROM_BR,k=e("./constants").cn;t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+k.colorbar).data(function(e){var t,r,n,a,i=e._fullLayout,o=e.calcdata,l=[];function s(e){return d(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof a.calc?a.calc(e,n,t):(t._fillgradient=r.reversescale?v(r.colorscale):r.colorscale,t._zrange=[r[a.min],r[a.max]])}for(var u=0;u<o.length;u++){var f=o[u],p=(n=f[0].trace)._module.colorbar;if(!0===n.visible&&p)for(var h=Array.isArray(p),m=h?p:[p],g=0;g<m.length;g++){var y=(a=m[g]).container;(r=y?n[y]:n)&&r.showscale&&((t=s(r.colorbar))._id="cb"+n.uid+(h&&y?"-"+y:""),t._traceIndex=n.index,t._propPrefix=(y?y+".":"")+"colorbar.",t._meta=n._meta,c(),l.push(t))}}for(var x in i._colorAxes)if((r=i[x]).showscale){var b=i._colorAxes[x];(t=s(r.colorbar))._id="cb"+x,t._propPrefix=x+".colorbar.",t._meta=i._meta,a={min:"cmin",max:"cmax"},"heatmap"!==b[0]&&(n=b[1],a.calc=n._module.colorbar.calc),c(),l.push(t)}return l}(e),(function(e){return e._id}));t.enter().append("g").attr("class",(function(e){return e._id})).classed(k.colorbar,!0),t.each((function(t){var r=n.select(this);c.ensureSingle(r,"rect",k.cbbg),c.ensureSingle(r,"g",k.cbfills),c.ensureSingle(r,"g",k.cblines),c.ensureSingle(r,"g",k.cbaxis,(function(e){e.classed(k.crisp,!0)})),c.ensureSingle(r,"g",k.cbtitleunshift,(function(e){e.append("g").classed(k.cbtitle,!0)})),c.ensureSingle(r,"rect",k.cboutline);var v=function(e,t,r){var o=t.len,s=t.lenmode,f=t.thickness,v=t.thicknessmode,_=t.outlinewidth,A=t.borderwidth,L=t.xanchor,S=t.yanchor,D=t.xpad,C=t.ypad,O=t.x,P=t.y,I=r._fullLayout,R=I._size,z=t._fillcolor,N=t._line,F=t.title,E=F.side,j=t._zrange||n.extent(("function"==typeof z?z:N.color).domain()),H="function"==typeof N.color?N.color:function(){return N.color},B="function"==typeof z?z:function(){return z},Y=t._levels,V=function(e,t,r){var n,a,i=t._levels,o=[],l=[],s=i.end+i.size/100,c=i.size,u=1.001*r[0]-.001*r[1],d=1.001*r[1]-.001*r[0];for(a=0;a<1e5&&(n=i.start+a*c,!(c>0?n>=s:n<=s));a++)n>u&&n<d&&o.push(n);if(t._fillgradient)l=[0];else if("function"==typeof t._fillcolor){var f=t._filllevels;if(f)for(s=f.end+f.size/100,c=f.size,a=0;a<1e5&&(n=f.start+a*c,!(c>0?n>=s:n<=s));a++)n>r[0]&&n<r[1]&&l.push(n);else(l=o.map((function(e){return e-i.size/2}))).push(l[l.length-1]+i.size)}else t._fillcolor&&"string"==typeof t._fillcolor&&(l=[0]);i.size<0&&(o.reverse(),l.reverse());return{line:o,fill:l}}(0,t,j),U=V.fill,q=V.line,G=Math.round(f*("fraction"===v?R.w:1)),Z=G/R.w,W=Math.round(o*("fraction"===s?R.h:1)),X=W/R.h,J=D/R.w,Q=(A+_)/2,K=C/R.h,$=Math.round(O*R.w+D),ee=O-Z*({center:.5,right:1}[L]||0),te=P+X*(({top:-.5,bottom:.5}[S]||0)-.5),re=Math.round(R.h*(1-te));t._lenFrac=X,t._thickFrac=Z,t._uFrac=ee,t._vFrac=te;var ne=t._axis=function(e,t,r){var n=e._fullLayout,a={type:"linear",range:r,tickmode:t.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:t.ticks,ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,showticklabels:t.showticklabels,ticklabelposition:t.ticklabelposition,ticklabeloverflow:t.ticklabeloverflow,tickfont:t.tickfont,tickangle:t.tickangle,tickformat:t.tickformat,exponentformat:t.exponentformat,minexponent:t.minexponent,separatethousands:t.separatethousands,showexponent:t.showexponent,showtickprefix:t.showtickprefix,tickprefix:t.tickprefix,showticksuffix:t.showticksuffix,ticksuffix:t.ticksuffix,title:t.title,showline:!0,anchor:"free",side:"right",position:1},i={type:"linear",_id:"y"+t._id},o={letter:"y",font:n.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:n.calendar};function l(e,t){return c.coerce(a,i,b,e,t)}return y(a,i,l,o,n),x(a,i,l,o),i}(r,t,j);ne.position=O+J+Z,-1!==["top","bottom"].indexOf(E)&&(ne.title.side=E,ne.titlex=O+J,ne.titley=te+("top"===F.side?X-K:K));if(N.color&&"auto"===t.tickmode){ne.tickmode="linear",ne.tick0=Y.start;var ae=Y.size,ie=c.constrain(W/50,4,15)+1,oe=(j[1]-j[0])/((t.nticks||ie)*ae);if(oe>1){var le=Math.pow(10,Math.floor(Math.log(oe)/Math.LN10));ae*=le*c.roundUp(oe/le,[2,5,10]),(Math.abs(Y.start)/Y.size+1e-6)%1<2e-6&&(ne.tick0=0)}ne.dtick=ae}ne.domain=[te+K,te+X-K],ne.setScale(),e.attr("transform",u(Math.round(R.l),Math.round(R.t)));var se,ce=e.select("."+k.cbtitleunshift).attr("transform",u(-Math.round(R.l),-Math.round(R.t))),ue=e.select("."+k.cbaxis),de=0;function fe(n,a){var i={propContainer:ne,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:I._dfltTitle.colorbar,containerGroup:e.select("."+k.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(r,n,d(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){if(-1!==["top","bottom"].indexOf(E)){var e,t=R.l+(O+J)*R.w,r=ne.title.font.size;e="top"===E?(1-(te+X-K))*R.h+R.t+3+.75*r:(1-(te+K))*R.h+R.t-3-.25*r,fe(ne._id+"title",{attributes:{x:t,y:e,"text-anchor":"start"}})}},function(){if(-1!==["top","bottom"].indexOf(E)){var i=e.select("."+k.cbtitle),o=i.select("text"),s=[-_/2,_/2],d=i.select(".h"+ne._id+"title-math-group").node(),f=15.6;if(o.node()&&(f=parseInt(o.node().style.fontSize,10)*w),d?(de=p.bBox(d).height)>f&&(s[1]-=(de-f)/2):o.node()&&!o.classed(k.jsPlaceholder)&&(de=p.bBox(o.node()).height),de){if(de+=5,"top"===E)ne.domain[1]-=de/R.h,s[1]*=-1;else{ne.domain[0]+=de/R.h;var h=g.lineCount(o);s[1]+=(1-h)*f}i.attr("transform",u(s[0],s[1])),ne.setScale()}}e.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",u(0,Math.round(R.h*(1-ne.domain[1])))),ue.attr("transform",u(0,Math.round(-R.t)));var m=e.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(U);m.enter().append("rect").classed(k.cbfill,!0).style("stroke","none"),m.exit().remove();var v=j.map(ne.c2p).map(Math.round).sort((function(e,t){return e-t}));m.each((function(e,i){var o=[0===i?j[0]:(U[i]+U[i-1])/2,i===U.length-1?j[1]:(U[i]+U[i+1])/2].map(ne.c2p).map(Math.round);o[1]=c.constrain(o[1]+(o[1]>o[0])?1:-1,v[0],v[1]);var l=n.select(this).attr({x:$,width:Math.max(G,2),y:n.min(o),height:Math.max(n.max(o)-n.min(o),2)});if(t._fillgradient)p.gradient(l,r,t._id,"vertical",t._fillgradient,"fill");else{var s=B(e).replace("e-","");l.attr("fill",a(s).toHexString())}}));var y=e.select("."+k.cblines).selectAll("path."+k.cbline).data(N.color&&N.width?q:[]);y.enter().append("path").classed(k.cbline,!0),y.exit().remove(),y.each((function(e){n.select(this).attr("d","M"+$+","+(Math.round(ne.c2p(e))+N.width/2%1)+"h"+G).call(p.lineGroupStyle,N.width,H(e),N.dash)})),ue.selectAll("g."+ne._id+"tick,path").remove();var x=$+G+(_||0)/2-("outside"===t.ticks?1:0),b=l.calcTicks(ne),T=l.getTickSigns(ne)[2];return l.drawTicks(r,ne,{vals:"inside"===ne.ticks?l.clipEnds(ne,b):b,layer:ue,path:l.makeTickPath(ne,x,T),transFn:l.makeTransTickFn(ne)}),l.drawLabels(r,ne,{vals:b,layer:ue,transFn:l.makeTransTickLabelFn(ne),labelFns:l.makeLabelFns(ne,x)})},function(){if(-1===["top","bottom"].indexOf(E)){var e=ne.title.font.size,t=ne._offset+ne._length/2,a=R.l+(ne.position||0)*R.w+("right"===ne.side?10+e*(ne.showticklabels?1:.5):-10-e*(ne.showticklabels?.5:0));fe("h"+ne._id+"title",{avoid:{selection:n.select(r).selectAll("g."+ne._id+"tick"),side:E,offsetLeft:R.l,offsetTop:0,maxShift:I.width},attributes:{x:a,y:t,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}},i.previousPromises,function(){var n=G+_/2;if(-1===ne.ticklabelposition.indexOf("inside")&&(n+=p.bBox(ue.node()).width),(se=ce.select("text")).node()&&!se.classed(k.jsPlaceholder)){var a,l=ce.select(".h"+ne._id+"title-math-group").node();a=l&&-1!==["top","bottom"].indexOf(E)?p.bBox(l).width:p.bBox(ce.node()).right-$-R.l,n=Math.max(n,a)}var c=2*D+n+A+_/2;e.select("."+k.cbbg).attr({x:$-D-(A+_)/2,y:re-W-Q,width:Math.max(c,2),height:Math.max(W+2*Q,2)}).call(h.fill,t.bgcolor).call(h.stroke,t.bordercolor).style("stroke-width",A),e.selectAll("."+k.cboutline).attr({x:$,y:re-W+C+("top"===E?de:0),width:Math.max(G,2),height:Math.max(W-2*C-de,2)}).call(h.stroke,t.outlinecolor).style({fill:"none","stroke-width":_});var d=({center:.5,right:1}[L]||0)*c;e.attr("transform",u(R.l-d,R.t));var m={},g=T[S],y=M[S];"pixels"===s?(m.y=P,m.t=W*g,m.b=W*y):(m.t=m.b=0,m.yt=P+o*g,m.yb=P-o*y);var x=T[L],b=M[L];if("pixels"===v)m.x=O,m.l=c*x,m.r=c*b;else{var w=c-G;m.l=w*x,m.r=w*b,m.xl=O-f*x,m.xr=O+f*b}i.autoMargin(r,t._id,m)}],r)}(r,t,e);v&&v.then&&(e._promises||[]).push(v),e._context.edits.colorbarPosition&&function(e,t,r){var n,a,i,l=r._fullLayout._size;s.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),f(e)},moveFn:function(r,o){e.attr("transform",n+u(r,o)),a=s.align(t._uFrac+r/l.w,t._thickFrac,0,1,t.xanchor),i=s.align(t._vFrac-o/l.h,t._lenFrac,0,1,t.yanchor);var c=s.getCursor(a,i,t.xanchor,t.yanchor);f(e,c)},doneFn:function(){if(f(e),void 0!==a&&void 0!==i){var n={};n[t._propPrefix+"x"]=a,n[t._propPrefix+"y"]=i,void 0!==t._traceIndex?o.call("_guiRestyle",r,n,t._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}},{"../../constants/alignment":207,"../../lib":232,"../../lib/extend":226,"../../lib/setcursor":252,"../../lib/svg_text_utils":255,"../../plots/cartesian/axes":279,"../../plots/cartesian/axis_defaults":281,"../../plots/cartesian/layout_attributes":294,"../../plots/cartesian/position_defaults":297,"../../plots/plots":316,"../../registry":318,"../color":102,"../colorscale/helpers":113,"../dragelement":121,"../drawing":124,"../titles":200,"./constants":104,"@plotly/d3":11,tinycolor2:67}],107:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e){return n.isPlainObject(e.colorbar)}},{"../../lib":232}],108:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:e("./attributes"),supplyDefaults:e("./defaults"),draw:e("./draw").draw,hasColorbar:e("./has_colorbar")}},{"./attributes":103,"./defaults":105,"./draw":106,"./has_colorbar":107}],109:[function(e,t,r){"use strict";var n=e("../colorbar/attributes"),a=e("../../lib/regex").counter,i=e("../../lib/sort_object_keys"),o=e("./scales.js").scales;i(o);function l(e){return"`"+e+"`"}t.exports=function(e,t){e=e||"";var r,i=(t=t||{}).cLetter||"c",s=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),c="showScaleDflt"in t?t.showScaleDflt:"z"===i,u="string"==typeof t.colorscaleDflt?o[t.colorscaleDflt]:null,d=t.editTypeOverride||"",f=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,t.colorAttr):l(f+(r={z:"z",c:"color"}[i]));var p=i+"auto",h=i+"min",m=i+"max",g=i+"mid",v=(l(f+p),l(f+h),l(f+m),{});v[h]=v[m]=void 0;var y={};y[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:d||"style"},t.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},x[h]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[m]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=n),t.noColorAxis||(x.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),x}},{"../../lib/regex":248,"../../lib/sort_object_keys":253,"../colorbar/attributes":103,"./scales.js":117}],110:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("./helpers").extractOpts;t.exports=function(e,t,r){var o,l=e._fullLayout,s=r.vals,c=r.containerStr,u=c?a.nestedProperty(t,c).get():t,d=i(u),f=!1!==d.auto,p=d.min,h=d.max,m=d.mid,g=function(){return a.aggNums(Math.min,null,s)},v=function(){return a.aggNums(Math.max,null,s)};(void 0===p?p=g():f&&(p=u._colorAx&&n(p)?Math.min(p,g()):g()),void 0===h?h=v():f&&(h=u._colorAx&&n(h)?Math.max(h,v()):v()),f&&void 0!==m&&(h-m>m-p?p=m-(h-m):h-m<m-p&&(h=m+(m-p))),p===h&&(p-=.5,h+=.5),d._sync("min",p),d._sync("max",h),d.autocolorscale)&&(o=p*h<0?l.colorscale.diverging:p>=0?l.colorscale.sequential:l.colorscale.sequentialminus,d._sync("colorscale",o))}},{"../../lib":232,"./helpers":113,"fast-isnumeric":17}],111:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./helpers").hasColorscale,i=e("./helpers").extractOpts;t.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,a){var o=a.container?n.nestedProperty(e,a.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var l=i(o),s=l.auto;(s||void 0===l.min)&&r(o,a.min),(s||void 0===l.max)&&r(o,a.max),l.autocolorscale&&r(o,"colorscale")}}for(var l=0;l<e.length;l++){var s=e[l],c=s._module.colorbar;if(c)if(Array.isArray(c))for(var u=0;u<c.length;u++)o(s,c[u]);else o(s,c);a(s,"marker.line")&&o(s,{container:"marker.line",min:"cmin",max:"cmax"})}for(var d in t._colorAxes)o(t[d],{min:"cmin",max:"cmax"})}},{"../../lib":232,"./helpers":113}],112:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../colorbar/has_colorbar"),o=e("../colorbar/defaults"),l=e("./scales").isValid,s=e("../../registry").traceIs;function c(e,t){var r=t.slice(0,t.length-1);return t?a.nestedProperty(e,r).get()||{}:e}t.exports=function e(t,r,u,d,f){var p=f.prefix,h=f.cLetter,m="_module"in r,g=c(t,p),v=c(r,p),y=c(r._template||{},p)||{},x=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,u,d,f)};if(m){var b=u._colorAxes||{},_=d(p+"coloraxis");if(_){var w=s(r,"contour")&&a.nestedProperty(r,"contours.coloring").get()||"heatmap",T=b[_];return void(T?(T[2].push(x),T[0]!==w&&(T[0]=!1,a.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[_]=[w,r,[x]])}}var M=g[h+"min"],k=g[h+"max"],A=n(M)&&n(k)&&M<k;d(p+h+"auto",!A)?d(p+h+"mid"):(d(p+h+"min"),d(p+h+"max"));var L,S,D=g.colorscale,C=y.colorscale;(void 0!==D&&(L=!l(D)),void 0!==C&&(L=!l(C)),d(p+"autocolorscale",L),d(p+"colorscale"),d(p+"reversescale"),"marker.line."!==p)&&(p&&m&&(S=i(g)),d(p+"showscale",S)&&(p&&y&&(v._template=y),o(g,v,u)))}},{"../../lib":232,"../../registry":318,"../colorbar/defaults":105,"../colorbar/has_colorbar":107,"./scales":117,"fast-isnumeric":17}],113:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("tinycolor2"),i=e("fast-isnumeric"),o=e("../../lib"),l=e("../color"),s=e("./scales").isValid;var c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],u=["min","max","mid","auto"];function d(e){var t,r,n,a=e._colorAx,i=a||e,o={};for(r=0;r<c.length;r++)o[n=c[r]]=i[n];if(a)for(t="c",r=0;r<u.length;r++)o[n=u[r]]=i["c"+n];else{var l;for(r=0;r<u.length;r++)((l="c"+(n=u[r]))in i||(l="z"+n)in i)&&(o[n]=i[l]);t=l.charAt(0)}return o._sync=function(e,r){var n=-1!==u.indexOf(e)?t+e:e;i[n]=i["_"+n]=r},o}function f(e){for(var t=d(e),r=t.min,n=t.max,a=t.reversescale?p(t.colorscale):t.colorscale,i=a.length,o=new Array(i),l=new Array(i),s=0;s<i;s++){var c=a[s];o[s]=r+c[0]*(n-r),l[s]=c[1]}return{domain:o,range:l}}function p(e){for(var t=e.length,r=new Array(t),n=t-1,a=0;n>=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function h(e,t){t=t||{};for(var r=e.domain,o=e.range,s=o.length,c=new Array(s),u=0;u<s;u++){var d=a(o[u]).toRgb();c[u]=[d.r,d.g,d.b,d.a]}var f,p=n.scale.linear().domain(r).range(c).clamp(!0),h=t.noNumericCheck,g=t.returnArray;return(f=h&&g?p:h?function(e){return m(p(e))}:g?function(e){return i(e)?p(e):a(e).isValid()?e:l.defaultLine}:function(e){return i(e)?m(p(e)):a(e).isValid()?e:l.defaultLine}).domain=p.domain,f.range=function(){return o},f}function m(e){var t={r:e[0],g:e[1],b:e[2],a:e[3]};return a(t).toRgbString()}t.exports={hasColorscale:function(e,t,r){var n=t?o.nestedProperty(e,t).get()||{}:e,a=n[r||"color"],l=!1;if(o.isArrayOrTypedArray(a))for(var c=0;c<a.length;c++)if(i(a[c])){l=!0;break}return o.isPlainObject(n)&&(l||!0===n.showscale||i(n.cmin)&&i(n.cmax)||s(n.colorscale)||o.isPlainObject(n.colorbar))},extractOpts:d,extractScale:f,flipScale:p,makeColorScaleFunc:h,makeColorScaleFuncFromTrace:function(e,t){return h(f(e),t)}}},{"../../lib":232,"../color":102,"./scales":117,"@plotly/d3":11,"fast-isnumeric":17,tinycolor2:67}],114:[function(e,t,r){"use strict";var n=e("./scales"),a=e("./helpers");t.exports={moduleType:"component",name:"colorscale",attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),handleDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),calc:e("./calc"),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:a.hasColorscale,extractOpts:a.extractOpts,extractScale:a.extractScale,flipScale:a.flipScale,makeColorScaleFunc:a.makeColorScaleFunc,makeColorScaleFuncFromTrace:a.makeColorScaleFuncFromTrace}},{"./attributes":109,"./calc":110,"./cross_trace_defaults":111,"./defaults":112,"./helpers":113,"./layout_attributes":115,"./layout_defaults":116,"./scales":117}],115:[function(e,t,r){"use strict";var n=e("../../lib/extend").extendFlat,a=e("./attributes"),i=e("./scales").scales;t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:i.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:i.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:i.RdBu,editType:"calc"}},coloraxis:n({_isSubplotObj:!0,editType:"calc"},a("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},{"../../lib/extend":226,"./attributes":109,"./scales":117}],116:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plot_api/plot_template"),i=e("./layout_attributes"),o=e("./defaults");t.exports=function(e,t){function r(r,a){return n.coerce(e,t,i,r,a)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var l,s,c=t._colorAxes;function u(e,t){return n.coerce(l,s,i.coloraxis,e,t)}for(var d in c){var f=c[d];if(f[0])l=e[d]||{},(s=a.newContainer(t,d,"coloraxis"))._name=d,o(l,s,t,u,{prefix:"",cLetter:"c"});else{for(var p=0;p<f[2].length;p++)f[2][p]();delete t._colorAxes[d]}}}},{"../../lib":232,"../../plot_api/plot_template":268,"./defaults":112,"./layout_attributes":115}],117:[function(e,t,r){"use strict";var n=e("tinycolor2"),a={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)"]]},i=a.RdBu;function o(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 r=0;r<e.length;r++){var a=e[r];if(2!==a.length||+a[0]<t||!n(a[1]).isValid())return!1;t=+a[0]}return!0}t.exports={scales:a,defaultScale:i,get:function(e,t){if(t||(t=i),!e)return t;function r(){try{e=a[e]||JSON.parse(e)}catch(r){e=t}}return"string"==typeof e&&(r(),"string"==typeof e&&r()),o(e)?e:t},isValid:function(e){return void 0!==a[e]||o(e)}}},{tinycolor2:67}],118:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a){var i=(e-r)/(n-r),o=i+t/(n-r),l=(i+o)/2;return"left"===a||"bottom"===a?i:"center"===a||"middle"===a?l:"right"===a||"top"===a?o:i<2/3-l?i:o>4/3-l?o:l}},{}],119:[function(e,t,r){"use strict";var n=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,r,i){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*t),0,2),a[t][e]}},{"../../lib":232}],120:[function(e,t,r){"use strict";r.selectMode=function(e){return"lasso"===e||"select"===e},r.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},r.openMode=function(e){return"drawline"===e||"drawopenpath"===e},r.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},r.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},r.selectingOrDrawing=function(e){return r.freeMode(e)||r.rectMode(e)}},{}],121:[function(e,t,r){"use strict";var n=e("mouse-event-offset"),a=e("has-hover"),i=e("has-passive-events"),o=e("../../lib").removeElement,l=e("../../plots/cartesian/constants"),s=t.exports={};s.align=e("./align"),s.getCursor=e("./cursor");var c=e("./unhover");function u(){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 d(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=c.wrapped,s.unhoverRaw=c.raw,s.init=function(e){var t,r,n,c,f,p,h,m,g=e.gd,v=1,y=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,i?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,r){return Math.abs(e)<r&&(e=0),Math.abs(t)<r&&(t=0),[e,t]};function _(i){g._dragged=!1,g._dragging=!0;var o=d(i);t=o[0],r=o[1],h=i.target,p=i,m=2===i.buttons||i.ctrlKey,void 0===i.clientX&&void 0===i.clientY&&(i.clientX=t,i.clientY=r),(n=(new Date).getTime())-g._mouseDownTime<y?v+=1:(v=1,g._mouseDownTime=n),e.prepFn&&e.prepFn(i,t,r),a&&!m?(f=u()).style.cursor=window.getComputedStyle(x).cursor:a||(f=document,c=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(x).cursor),document.addEventListener("mouseup",T),document.addEventListener("touchend",T),!1!==e.dragmode&&(i.preventDefault(),document.addEventListener("mousemove",w),document.addEventListener("touchmove",w,{passive:!1}))}function w(n){n.preventDefault();var a=d(n),i=e.minDrag||l.MINDRAG,o=b(a[0]-t,a[1]-r,i),c=o[0],u=o[1];(c||u)&&(g._dragged=!0,s.unhover(g,n)),g._dragged&&e.moveFn&&!m&&(g._dragdata={element:x,dx:c,dy:u},e.moveFn(c,u))}function T(t){if(delete g._dragdata,!1!==e.dragmode&&(t.preventDefault(),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w)),document.removeEventListener("mouseup",T),document.removeEventListener("touchend",T),a?o(f):c&&(f.documentElement.style.cursor=c,c=null),g._dragging){if(g._dragging=!1,(new Date).getTime()-g._mouseDownTime>y&&(v=Math.max(v-1,1)),g._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(v,p),!m){var r;try{r=new MouseEvent("click",t)}catch(e){var n=d(t);(r=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,n[0],n[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}h.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},s.coverSlip=u},{"../../lib":232,"../../plots/cartesian/constants":286,"./align":118,"./cursor":119,"./unhover":122,"has-hover":48,"has-passive-events":49,"mouse-event-offset":53}],122:[function(e,t,r){"use strict";var n=e("../../lib/events"),a=e("../../lib/throttle"),i=e("../../lib/dom").getGraphDiv,o=e("../fx/constants"),l=t.exports={};l.wrapped=function(e,t,r){(e=i(e))._fullLayout&&a.clear(e._fullLayout._uid+o.HOVERID),l.raw(e,t,r)},l.raw=function(e,t){var r=e._fullLayout,a=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===n.triggerHandler(e,"plotly_beforehover",t)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&a&&e.emit("plotly_unhover",{event:t,points:a}))}},{"../../lib/dom":224,"../../lib/events":225,"../../lib/throttle":256,"../fx/constants":136}],123:[function(e,t,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},r.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},{}],124:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib"),i=a.numberFormat,o=e("fast-isnumeric"),l=e("tinycolor2"),s=e("../../registry"),c=e("../color"),u=e("../colorscale"),d=a.strTranslate,f=e("../../lib/svg_text_utils"),p=e("../../constants/xmlns_namespaces"),h=e("../../constants/alignment").LINE_SPACING,m=e("../../constants/interactions").DESELECTDIM,g=e("../../traces/scatter/subtypes"),v=e("../../traces/scatter/make_bubble_size_func"),y=e("../../components/fx/helpers").appendArrayPointValue,x=t.exports={};x.font=function(e,t,r,n){a.isPlainObject(t)&&(n=t.color,r=t.size,t=t.family),t&&e.style("font-family",t),r+1&&e.style("font-size",r+"px"),n&&e.call(c.fill,n)},x.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},x.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},x.setRect=function(e,t,r,n,a){e.call(x.setPosition,t,r).call(x.setSize,n,a)},x.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);return!!(o(a)&&o(i)&&t.node())&&("text"===t.node().nodeName?t.attr("x",a).attr("y",i):t.attr("transform",d(a,i)),!0)},x.translatePoints=function(e,t,r){e.each((function(e){var a=n.select(this);x.translatePoint(e,a,t,r)}))},x.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,a=t.yaxis;e.each((function(t){var i=t[0].trace,o=i.xcalendar,l=i.ycalendar,c=s.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each((function(e){x.hideOutsideRangePoint(e,n.select(this),r,a,o,l)}))}))}},x.crispRound=function(e,t,r){return t&&o(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},x.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";c.stroke(t,n||i.color),x.dashLine(t,l,o)},x.lineGroupStyle=function(e,t,r,a){e.style("fill","none").each((function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";n.select(this).call(c.stroke,r||i.color).call(x.dashLine,l,o)}))},x.dashLine=function(e,t,r){r=+r||0,t=x.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},x.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},x.singleFillStyle=function(e){var t=(((n.select(e.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;t&&e.call(c.fill,t)},x.fillGroupStyle=function(e){e.style("stroke-width",0).each((function(e){var t=n.select(this);e[0].trace&&t.call(c.fill,e[0].trace.fillcolor)}))};var b=e("./symbol_defs");x.symbolNames=[],x.symbolFuncs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(b).forEach((function(e){var t=b[e],r=t.n;x.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),x.symbolNames[r]=e,x.symbolFuncs[r]=t.f,t.needLine&&(x.symbolNeedLines[r]=!0),t.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(x.symbolNoFill[r]=!0)}));var _=x.symbolNames.length;function w(e,t){var r=e%100;return x.symbolFuncs[r](t)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(e){if(o(e))e=+e;else 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=x.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=_||e>=400?0:Math.floor(Math.max(e,0))};var T={x1:1,x2:0,y1:0,y2:0},M={x1:0,x2:0,y1:1,y2:0},k=i("~f"),A={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:T},horizontalreversed:{node:"linearGradient",attrs:T,reversed:!0},vertical:{node:"linearGradient",attrs:M},verticalreversed:{node:"linearGradient",attrs:M,reversed:!0}};x.gradient=function(e,t,r,i,o,s){for(var u=o.length,d=A[i],f=new Array(u),p=0;p<u;p++)d.reversed?f[u-1-p]=[k(100*(1-o[p][0])),o[p][1]]:f[p]=[k(100*o[p][0]),o[p][1]];var h=t._fullLayout,m="g"+h._uid+"-"+r,g=h._defs.select(".gradients").selectAll("#"+m).data([i+f.join(";")],a.identity);g.exit().remove(),g.enter().append(d.node).each((function(){var e=n.select(this);d.attrs&&e.attr(d.attrs),e.attr("id",m);var t=e.selectAll("stop").data(f);t.exit().remove(),t.enter().append("stop"),t.each((function(e){var t=l(e[1]);n.select(this).attr({offset:e[0]+"%","stop-color":c.tinyRGB(t),"stop-opacity":t.getAlpha()})}))})),e.style(s,z(m,t)).style(s+"-opacity",null);var v=function(e){return"."+e.attr("class").replace(/\s/g,".")},y=v(n.select(e.node().parentNode))+">"+v(e);h._gradientUrlQueryParts[y]=1},x.pattern=function(e,t,r,i,o,l,s,u,d,f,p,h){var m="legend"===t;u&&("overlay"===d?(f=u,p=c.contrast(f)):(f=void 0,p=u));var g,v,y,x,b,_,w,T,M,k,A,L=r._fullLayout,S="p"+L._uid+"-"+i,D={};switch(o){case"/":g=l*Math.sqrt(2),v=l*Math.sqrt(2),_="path",D={d:y="M-"+g/4+","+v/4+"l"+g/2+",-"+v/2+"M0,"+v+"L"+g+",0M"+g/4*3+","+v/4*5+"l"+g/2+",-"+v/2,opacity:h,stroke:p,"stroke-width":(x=s*l)+"px"};break;case"\\":g=l*Math.sqrt(2),v=l*Math.sqrt(2),_="path",D={d:y="M"+g/4*3+",-"+v/4+"l"+g/2+","+v/2+"M0,0L"+g+","+v+"M-"+g/4+","+v/4*3+"l"+g/2+","+v/2,opacity:h,stroke:p,"stroke-width":(x=s*l)+"px"};break;case"x":g=l*Math.sqrt(2),v=l*Math.sqrt(2),y="M-"+g/4+","+v/4+"l"+g/2+",-"+v/2+"M0,"+v+"L"+g+",0M"+g/4*3+","+v/4*5+"l"+g/2+",-"+v/2+"M"+g/4*3+",-"+v/4+"l"+g/2+","+v/2+"M0,0L"+g+","+v+"M-"+g/4+","+v/4*3+"l"+g/2+","+v/2,x=l-l*Math.sqrt(1-s),_="path",D={d:y,opacity:h,stroke:p,"stroke-width":x+"px"};break;case"|":_="path",_="path",D={d:y="M"+(g=l)/2+",0L"+g/2+","+(v=l),opacity:h,stroke:p,"stroke-width":(x=s*l)+"px"};break;case"-":_="path",_="path",D={d:y="M0,"+(v=l)/2+"L"+(g=l)+","+v/2,opacity:h,stroke:p,"stroke-width":(x=s*l)+"px"};break;case"+":_="path",y="M"+(g=l)/2+",0L"+g/2+","+(v=l)+"M0,"+v/2+"L"+g+","+v/2,x=l-l*Math.sqrt(1-s),_="path",D={d:y,opacity:h,stroke:p,"stroke-width":x+"px"};break;case".":g=l,v=l,s<Math.PI/4?b=Math.sqrt(s*l*l/Math.PI):(w=s,T=Math.PI/4,M=1,k=l/2,A=l/Math.sqrt(2),b=k+(A-k)*(w-T)/(M-T)),_="circle",D={cx:g/2,cy:v/2,r:b,opacity:h,fill:p}}var C=[o||"noSh",f||"noBg",p||"noFg",l,s].join(";"),O=L._defs.select(".patterns").selectAll("#"+S).data([C],a.identity);O.exit().remove(),O.enter().append("pattern").each((function(){var e=n.select(this);if(e.attr({id:S,width:g+"px",height:v+"px",patternUnits:"userSpaceOnUse",patternTransform:m?"scale(0.8)":""}),f){var t=e.selectAll("rect").data([0]);t.exit().remove(),t.enter().append("rect").attr({width:g+"px",height:v+"px",fill:f})}var r=e.selectAll(_).data([0]);r.exit().remove(),r.enter().append(_).attr(D)})),e.style("fill",z(S,r)).style("fill-opacity",null),e.classed("pattern_filled",!0);var P="."+n.select(e.node().parentNode).attr("class").replace(/\s/g,".")+">.pattern_filled";L._patternUrlQueryParts[P]=1},x.initGradients=function(e){var t=e._fullLayout;a.ensureSingle(t._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),t._gradientUrlQueryParts={}},x.initPatterns=function(e){var t=e._fullLayout;a.ensureSingle(t._defs,"g","patterns").selectAll("pattern").remove(),t._patternUrlQueryParts={}},x.getPatternAttr=function(e,t,r){return e&&a.isArrayOrTypedArray(e)?t<e.length?e[t]:r:e},x.pointStyle=function(e,t,r){if(e.size()){var a=x.makePointStyleFns(t);e.each((function(e){x.singlePointStyle(e,n.select(this),t,a,r)}))}},x.singlePointStyle=function(e,t,r,n,i){var o=r.marker,l=o.line;if(t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?o.opacity:e.mo),n.ms2mrc){var s;s="various"===e.ms||"various"===o.size?3:n.ms2mrc(e.ms),e.mrc=s,n.selectedSizeFn&&(s=e.mrc=n.selectedSizeFn(e));var u=x.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100,t.attr("d",w(u,s))}var d,f,p,h=!1;if(e.so)p=l.outlierwidth,f=l.outliercolor,d=o.outliercolor;else{var m=(l||{}).width;p=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,f="mlc"in e?e.mlcc=n.lineScale(e.mlc):a.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,a.isArrayOrTypedArray(o.color)&&(d=c.defaultLine,h=!0),d="mc"in e?e.mcc=n.markerScale(e.mc):o.color||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(e))}if(e.om)t.call(c.stroke,d).style({"stroke-width":(p||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:p)+"px");var g=o.gradient,v=e.mgt;v?h=!0:v=g&&g.type,a.isArrayOrTypedArray(v)&&(v=v[0],A[v]||(v=0));var y=o.pattern,b=y&&x.getPatternAttr(y.shape,e.i,"");if(v&&"none"!==v){var _=e.mgc;_?h=!0:_=g.color;var T=r.uid;h&&(T+="-"+e.i),x.gradient(t,i,T,v,[[0,_],[1,d]],"fill")}else if(b){var M=x.getPatternAttr(y.bgcolor,e.i,null),k=x.getPatternAttr(y.fgcolor,e.i,null),L=y.fgopacity,S=x.getPatternAttr(y.size,e.i,8),D=x.getPatternAttr(y.solidity,e.i,.3),C=e.mcc||a.isArrayOrTypedArray(y.shape)||a.isArrayOrTypedArray(y.bgcolor)||a.isArrayOrTypedArray(y.size)||a.isArrayOrTypedArray(y.solidity),O=r.uid;C&&(O+="-"+e.i),x.pattern(t,"point",i,O,b,S,D,e.mcc,y.fillmode,M,k,L)}else c.fill(t,d);p&&c.stroke(t,f)}},x.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=x.tryColorscale(r,""),t.lineScale=x.tryColorscale(r,"line"),s.traceIs(e,"symbols")&&(t.ms2mrc=g.isBubble(e)?v(e):function(){return(r.size||6)/2}),e.selectedpoints&&a.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},o=r.marker||{},l=n.marker||{},c=i.opacity,u=o.opacity,d=l.opacity,f=void 0!==u,p=void 0!==d;(a.isArrayOrTypedArray(c)||f||p)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?i.opacity:e.mo;return e.selected?f?u:t:p?d:m*t});var h=i.color,g=o.color,v=l.color;(g||v)&&(t.selectedColorFn=function(e){var t=e.mcc||h;return e.selected?g||t:v||t});var y=i.size,x=o.size,b=l.size,_=void 0!==x,w=void 0!==b;return s.traceIs(e,"symbols")&&(_||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?_?x/2:t:w?b/2:t}),t},x.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,s=i.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?s||t:u||(s?t:c.addOpacity(t,m))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];r.selectedOpacityFn&&i.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&i.push((function(e,t){c.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&i.push((function(e,t){var n=t.mx||a.symbol||0,i=r.selectedSizeFn(t);e.attr("d",w(x.symbolNumber(n),i)),t.mrc2=i})),i.length&&e.each((function(e){for(var t=n.select(this),r=0;r<i.length;r++)i[r](t,e)}))}},x.tryColorscale=function(e,t){var r=t?a.nestedProperty(e,t).get():e;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&a.isArrayOrTypedArray(n))return u.makeColorScaleFuncFromTrace(r)}return a.identity};var L={start:1,end:-1,middle:0,bottom:1,top:-1};function S(e,t,r,a,i){var o=n.select(e.node().parentNode),l=-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle",s=-1!==t.indexOf("left")?"end":-1!==t.indexOf("right")?"start":"middle",c=a?a/.8+1:0,u=(f.lineCount(e)-1)*h+1,p=L[s]*c,m=.75*r+L[l]*c+(L[l]-1)*u*r/2;e.attr("text-anchor",s),i||o.attr("transform",d(p,m))}function D(e,t){var r=e.ts||t.textfont.size;return o(r)&&r>0?r:0}x.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var o=x.makeSelectedTextStyleFns(t);i=o.selectedTextColorFn}var l=t.texttemplate,s=r._fullLayout;e.each((function(e){var o=n.select(this),c=l?a.extractOption(e,t,"txt","texttemplate"):a.extractOption(e,t,"tx","text");if(c||0===c){if(l){var u=t._module.formatLabels,d=u?u(e,t,s):{},p={};y(p,t,e.i);var h=t._meta||{};c=a.texttemplateString(c,d,s._d3locale,p,e,h)}var m=e.tp||t.textposition,g=D(e,t),v=i?i(e):e.tc||t.textfont.color;o.call(x.font,e.tf||t.textfont.family,g,v).text(c).call(f.convertToTspans,r).call(S,m,g,e.mrc)}else o.remove()}))}},x.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedTextStyleFns(t);e.each((function(e){var a=n.select(this),i=r.selectedTextColorFn(e),o=e.tp||t.textposition,l=D(e,t);c.fill(a,i);var u=s.traceIs(t,"bar-like");S(a,o,l,e.mrc2||e.mrc,u)}))}};function C(e,t,r,a){var i=e[0]-t[0],o=e[1]-t[1],l=r[0]-t[0],s=r[1]-t[1],c=Math.pow(i*i+o*o,.25),u=Math.pow(l*l+s*s,.25),d=(u*u*i-c*c*l)*a,f=(u*u*o-c*c*s)*a,p=3*u*(c+u),h=3*c*(c+u);return[[n.round(t[0]+(p&&d/p),2),n.round(t[1]+(p&&f/p),2)],[n.round(t[0]-(h&&d/h),2),n.round(t[1]-(h&&f/h),2)]]}x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],a=[];for(r=1;r<e.length-1;r++)a.push(C(e[r-1],e[r],e[r+1],t));for(n+="Q"+a[0][0]+" "+e[1],r=2;r<e.length-1;r++)n+="C"+a[r-2][1]+" "+a[r-1][0]+" "+e[r];return n+="Q"+a[e.length-3][1]+" "+e[e.length-1]},x.smoothclosed=function(e,t){if(e.length<3)return"M"+e.join("L")+"Z";var r,n="M"+e[0],a=e.length-1,i=[C(e[a],e[0],e[1],t)];for(r=1;r<a;r++)i.push(C(e[r-1],e[r],e[r+1],t));for(i.push(C(e[a-1],e[a],e[0],t)),r=1;r<=a;r++)n+="C"+i[r-1][1]+" "+i[r][0]+" "+e[r];return n+="C"+i[a][1]+" "+i[0][0]+" "+e[0]+"Z"};var O={hv:function(e,t){return"H"+n.round(t[0],2)+"V"+n.round(t[1],2)},vh:function(e,t){return"V"+n.round(t[1],2)+"H"+n.round(t[0],2)},hvh:function(e,t){return"H"+n.round((e[0]+t[0])/2,2)+"V"+n.round(t[1],2)+"H"+n.round(t[0],2)},vhv:function(e,t){return"V"+n.round((e[1]+t[1])/2,2)+"H"+n.round(t[0],2)+"V"+n.round(t[1],2)}},P=function(e,t){return"L"+n.round(t[0],2)+","+n.round(t[1],2)};x.steps=function(e){var t=O[e]||P;return function(e){for(var r="M"+n.round(e[0][0],2)+","+n.round(e[0][1],2),a=1;a<e.length;a++)r+=t(e[a-1],e[a]);return r}},x.makeTester=function(){var e=a.ensureSingleById(n.select("body"),"svg","js-plotly-tester",(function(e){e.attr(p.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})})),t=a.ensureSingle(e,"path","js-reference-point",(function(e){e.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})}));x.tester=e,x.testref=t},x.savedBBoxes={};var I=0;function R(e){var t=e.getAttribute("data-unformatted");if(null!==t)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}function z(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}x.bBox=function(e,t,r){var i,o,l;if(r||(r=R(e)),r){if(i=x.savedBBoxes[r])return a.extendFlat({},i)}else if(1===e.childNodes.length){var s=e.childNodes[0];if(r=R(s)){var c=+s.getAttribute("x")||0,u=+s.getAttribute("y")||0,d=s.getAttribute("transform");if(!d){var p=x.bBox(s,!1,r);return c&&(p.left+=c,p.right+=c),u&&(p.top+=u,p.bottom+=u),p}if(r+="~"+c+"~"+u+"~"+d,i=x.savedBBoxes[r])return a.extendFlat({},i)}}t?o=e:(l=x.tester.node(),o=e.cloneNode(!0),l.appendChild(o)),n.select(o).attr("transform",null).call(f.positionText,0,0);var h=o.getBoundingClientRect(),m=x.testref.node().getBoundingClientRect();t||l.removeChild(o);var g={height:h.height,width:h.width,left:h.left-m.left,top:h.top-m.top,right:h.right-m.left,bottom:h.bottom-m.top};return I>=1e4&&(x.savedBBoxes={},I=0),r&&(x.savedBBoxes[r]=g),I++,a.extendFlat({},g)},x.setClipUrl=function(e,t,r){e.attr("clip-path",z(t,r))},x.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},x.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=d(t,r)).trim(),e[a]("transform",i),i},x.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},x.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+="scale("+t+","+r+")").trim(),e[a]("transform",i),i};var N=/\s*sc.*/;x.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(N,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var F=/translate\([^)]*\)\s*$/;x.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,a=n.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(a.attr("transform")||"").match(F);e=1===t&&1===r?[]:[d(o,l),"scale("+t+","+r+")",d(-o,-l)],s&&e.push(s),a.attr("transform",e.join(""))}}))}},{"../../components/fx/helpers":138,"../../constants/alignment":207,"../../constants/interactions":211,"../../constants/xmlns_namespaces":213,"../../lib":232,"../../lib/svg_text_utils":255,"../../registry":318,"../../traces/scatter/make_bubble_size_func":375,"../../traces/scatter/subtypes":383,"../color":102,"../colorscale":114,"./symbol_defs":125,"@plotly/d3":11,"fast-isnumeric":17,tinycolor2:67}],125:[function(e,t,r){"use strict";var n=e("@plotly/d3");t.exports={circle:{n:0,f:function(e){var t=n.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=n.round(e,2);return"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"}},diamond:{n:2,f:function(e){var t=n.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"Z"}},cross:{n:3,f:function(e){var t=n.round(.4*e,2),r=n.round(1.2*e,2);return"M"+r+","+t+"H"+t+"V"+r+"H-"+t+"V"+t+"H-"+r+"V-"+t+"H-"+t+"V-"+r+"H"+t+"V-"+t+"H"+r+"Z"}},x:{n:4,f:function(e){var t=n.round(.8*e/Math.sqrt(2),2),r="l"+t+","+t,a="l"+t+",-"+t,i="l-"+t+",-"+t,o="l-"+t+","+t;return"M0,"+t+r+a+i+a+i+o+i+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+t+","+n.round(e/2,2)+"H"+t+"L0,-"+n.round(e,2)+"Z"}},"triangle-down":{n:6,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+t+",-"+n.round(e/2,2)+"H"+t+"L0,"+n.round(e,2)+"Z"}},"triangle-left":{n:7,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M"+n.round(e/2,2)+",-"+t+"V"+t+"L-"+n.round(e,2)+",0Z"}},"triangle-right":{n:8,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+n.round(e/2,2)+",-"+t+"V"+t+"L"+n.round(e,2)+",0Z"}},"triangle-ne":{n:9,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M-"+r+",-"+t+"H"+t+"V"+r+"Z"}},"triangle-se":{n:10,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M"+t+",-"+r+"V"+t+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M"+r+","+t+"H-"+t+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M-"+t+","+r+"V-"+t+"H"+r+"Z"}},pentagon:{n:13,f:function(e){var t=n.round(.951*e,2),r=n.round(.588*e,2),a=n.round(-e,2),i=n.round(-.309*e,2);return"M"+t+","+i+"L"+r+","+n.round(.809*e,2)+"H-"+r+"L-"+t+","+i+"L0,"+a+"Z"}},hexagon:{n:14,f:function(e){var t=n.round(e,2),r=n.round(e/2,2),a=n.round(e*Math.sqrt(3)/2,2);return"M"+a+",-"+r+"V"+r+"L0,"+t+"L-"+a+","+r+"V-"+r+"L0,-"+t+"Z"}},hexagon2:{n:15,f:function(e){var t=n.round(e,2),r=n.round(e/2,2),a=n.round(e*Math.sqrt(3)/2,2);return"M-"+r+","+a+"H"+r+"L"+t+",0L"+r+",-"+a+"H-"+r+"L-"+t+",0Z"}},octagon:{n:16,f:function(e){var t=n.round(.924*e,2),r=n.round(.383*e,2);return"M-"+r+",-"+t+"H"+r+"L"+t+",-"+r+"V"+r+"L"+r+","+t+"H-"+r+"L-"+t+","+r+"V-"+r+"Z"}},star:{n:17,f:function(e){var t=1.4*e,r=n.round(.225*t,2),a=n.round(.951*t,2),i=n.round(.363*t,2),o=n.round(.588*t,2),l=n.round(-t,2),s=n.round(-.309*t,2),c=n.round(.118*t,2),u=n.round(.809*t,2);return"M"+r+","+s+"H"+a+"L"+i+","+c+"L"+o+","+u+"L0,"+n.round(.382*t,2)+"L-"+o+","+u+"L-"+i+","+c+"L-"+a+","+s+"H-"+r+"L0,"+l+"Z"}},hexagram:{n:18,f:function(e){var t=n.round(.66*e,2),r=n.round(.38*e,2),a=n.round(.76*e,2);return"M-"+a+",0l-"+r+",-"+t+"h"+a+"l"+r+",-"+t+"l"+r+","+t+"h"+a+"l-"+r+","+t+"l"+r+","+t+"h-"+a+"l-"+r+","+t+"l-"+r+",-"+t+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(e){var t=n.round(e*Math.sqrt(3)*.8,2),r=n.round(.8*e,2),a=n.round(1.6*e,2),i=n.round(4*e,2),o="A "+i+","+i+" 0 0 1 ";return"M-"+t+","+r+o+t+","+r+o+"0,-"+a+o+"-"+t+","+r+"Z"}},"star-triangle-down":{n:20,f:function(e){var t=n.round(e*Math.sqrt(3)*.8,2),r=n.round(.8*e,2),a=n.round(1.6*e,2),i=n.round(4*e,2),o="A "+i+","+i+" 0 0 1 ";return"M"+t+",-"+r+o+"-"+t+",-"+r+o+"0,"+a+o+t+",-"+r+"Z"}},"star-square":{n:21,f:function(e){var t=n.round(1.1*e,2),r=n.round(2*e,2),a="A "+r+","+r+" 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=n.round(1.4*e,2),r=n.round(1.9*e,2),a="A "+r+","+r+" 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=n.round(.7*e,2),r=n.round(1.4*e,2);return"M0,"+r+"L"+t+",0L0,-"+r+"L-"+t+",0Z"}},"diamond-wide":{n:24,f:function(e){var t=n.round(1.4*e,2),r=n.round(.7*e,2);return"M0,"+r+"L"+t+",0L0,-"+r+"L-"+t+",0Z"}},hourglass:{n:25,f:function(e){var t=n.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=n.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=n.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=n.round(e,2),r=n.round(e/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"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=n.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=n.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=n.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=n.round(1.3*e,2),r=n.round(.65*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e){var t=n.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=n.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=n.round(1.2*e,2),r=n.round(.85*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e){var t=n.round(e/2,2),r=n.round(e,2);return"M"+t+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+t+"H-"+r+"m0,-"+r+"H"+r},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+t+","+a+"L0,0M"+t+","+a+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+t+",-"+a+"L0,0M"+t+",-"+a+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M"+a+","+t+"L0,0M"+a+",-"+t+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+a+","+t+"L0,0M-"+a+",-"+t+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e){var t=n.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=n.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=n.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=n.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e){var t=n.round(e,2);return"M0,0L-"+t+","+n.round(2*e,2)+"H"+t+"Z"},noDot:!0},"arrow-down":{n:46,f:function(e){var t=n.round(e,2);return"M0,0L-"+t+",-"+n.round(2*e,2)+"H"+t+"Z"},noDot:!0},"arrow-left":{n:47,f:function(e){var t=n.round(2*e,2),r=n.round(e,2);return"M0,0L"+t+",-"+r+"V"+r+"Z"},noDot:!0},"arrow-right":{n:48,f:function(e){var t=n.round(2*e,2),r=n.round(e,2);return"M0,0L-"+t+",-"+r+"V"+r+"Z"},noDot:!0},"arrow-bar-up":{n:49,f:function(e){var t=n.round(e,2);return"M-"+t+",0H"+t+"M0,0L-"+t+","+n.round(2*e,2)+"H"+t+"Z"},needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e){var t=n.round(e,2);return"M-"+t+",0H"+t+"M0,0L-"+t+",-"+n.round(2*e,2)+"H"+t+"Z"},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e){var t=n.round(2*e,2),r=n.round(e,2);return"M0,-"+r+"V"+r+"M0,0L"+t+",-"+r+"V"+r+"Z"},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e){var t=n.round(2*e,2),r=n.round(e,2);return"M0,-"+r+"V"+r+"M0,0L-"+t+",-"+r+"V"+r+"Z"},needLine:!0,noDot:!0}}},{"@plotly/d3":11}],126:[function(e,t,r){"use strict";t.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},{}],127:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../registry"),i=e("../../plots/cartesian/axes"),o=e("../../lib"),l=e("./compute_error");function s(e,t,r,a){var s=t["error_"+a]||{},c=[];if(s.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=l(s),d=0;d<e.length;d++){var f=e[d],p=f.i;if(void 0===p)p=d;else if(null===p)continue;var h=f[a];if(n(r.c2l(h))){var m=u(h,p);if(n(m[0])&&n(m[1])){var g=f[a+"s"]=h-m[0],v=f[a+"h"]=h+m[1];c.push(g,v)}}}var y=r._id,x=t._extremes[y],b=i.findExtremes(r,c,o.extendFlat({tozero:x.opts.tozero},{padded:!0}));x.min=x.min.concat(b.min),x.max=x.max.concat(b.max)}}t.exports=function(e){for(var t=e.calcdata,r=0;r<t.length;r++){var n=t[r],o=n[0].trace;if(!0===o.visible&&a.traceIs(o,"errorBarsOK")){var l=i.getFromId(e,o.xaxis),c=i.getFromId(e,o.yaxis);s(n,o,l,"x"),s(n,o,c,"y")}}}},{"../../lib":232,"../../plots/cartesian/axes":279,"../../registry":318,"./compute_error":128,"fast-isnumeric":17}],128:[function(e,t,r){"use strict";function n(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,r=e.symmetric;if("data"===t){var a=e.array||[];if(r)return function(e,t){var r=+a[t];return[r,r]};var i=e.arrayminus||[];return function(e,t){var r=+a[t],n=+i[t];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=n(t,e.value),l=n(t,e.valueminus);return r||void 0===e.valueminus?function(e){var t=o(e);return[t,t]}:function(e){return[l(e),o(e)]}}},{}],129:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../registry"),i=e("../../lib"),o=e("../../plot_api/plot_template"),l=e("./attributes");t.exports=function(e,t,r,s){var c="error_"+s.axis,u=o.newContainer(t,c),d=e[c]||{};function f(e,t){return i.coerce(d,u,l,e,t)}if(!1!==f("visible",void 0!==d.array||void 0!==d.value||"sqrt"===d.type)){var p=f("type","array"in d?"data":"percent"),h=!0;"sqrt"!==p&&(h=f("symmetric",!(("data"===p?"arrayminus":"valueminus")in d))),"data"===p?(f("array"),f("traceref"),h||(f("arrayminus"),f("tracerefminus"))):"percent"!==p&&"constant"!==p||(f("value"),h||f("valueminus"));var m="copy_"+s.inherit+"style";if(s.inherit)(t["error_"+s.inherit]||{}).visible&&f(m,!(d.color||n(d.thickness)||n(d.width)));s.inherit&&u[m]||(f("color",r),f("thickness"),f("width",a.traceIs(t,"gl3d")?0:4))}}},{"../../lib":232,"../../plot_api/plot_template":268,"../../registry":318,"./attributes":126,"fast-isnumeric":17}],130:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plot_api/edit_types").overrideAll,i=e("./attributes"),o={error_x:n.extendFlat({},i),error_y:n.extendFlat({},i)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var l={error_x:n.extendFlat({},i),error_y:n.extendFlat({},i),error_z:n.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:o,bar:o,histogram:o,scatter3d:a(l,"calc","nested"),scattergl:a(o,"calc","nested")}},supplyDefaults:e("./defaults"),calc:e("./calc"),makeComputeError:e("./compute_error"),plot:e("./plot"),style:e("./style"),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys));(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}},{"../../lib":232,"../../plot_api/edit_types":261,"./attributes":126,"./calc":127,"./compute_error":128,"./defaults":129,"./plot":131,"./style":132}],131:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("../drawing"),o=e("../../traces/scatter/subtypes");t.exports=function(e,t,r,l){var s=r.xaxis,c=r.yaxis,u=l&&l.duration>0;t.each((function(t){var d,f=t[0].trace,p=f.error_x||{},h=f.error_y||{};f.ids&&(d=function(e){return e.id});var m=o.hasMarkers(f)&&f.marker.maxdisplayed>0;h.visible||p.visible||(t=[]);var g=n.select(this).selectAll("g.errorbar").data(t,d);if(g.exit().remove(),t.length){p.visible||g.selectAll("path.xerror").remove(),h.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var v=g.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(l.duration).style("opacity",1),i.setClipUrl(g,r.layerClipId,e),g.each((function(e){var t=n.select(this),r=function(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),a(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0)));void 0!==e.xh&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),a(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0)));return n}(e,s,c);if(!m||e.vis){var i,o=t.select("path.yerror");if(h.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var d=h.width;i="M"+(r.x-d)+","+r.yh+"h"+2*d+"m-"+d+",0V"+r.ys,r.noYS||(i+="m-"+d+",0h"+2*d),!o.size()?o=t.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0):u&&(o=o.transition().duration(l.duration).ease(l.easing)),o.attr("d",i)}else o.remove();var f=t.select("path.xerror");if(p.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var g=(p.copy_ystyle?h:p).width;i="M"+r.xh+","+(r.y-g)+"v"+2*g+"m0,-"+g+"H"+r.xs,r.noXS||(i+="m0,-"+g+"v"+2*g),!f.size()?f=t.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):u&&(f=f.transition().duration(l.duration).ease(l.easing)),f.attr("d",i)}else f.remove()}}))}}))}},{"../../traces/scatter/subtypes":383,"../drawing":124,"@plotly/d3":11,"fast-isnumeric":17}],132:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../color");t.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},i=t.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),i.copy_ystyle&&(i=r),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)}))}},{"../color":102,"@plotly/d3":11}],133:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("./layout_attributes").hoverlabel,i=e("../../lib/extend").extendFlat;t.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":226,"../../plots/font_attributes":310,"./layout_attributes":143}],134:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry");function i(e,t,r,a){a=a||n.identity,Array.isArray(e)&&(t[0][r]=a(e))}t.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},r)}}for(var l=0;l<t.length;l++){var s=t[l],c=s[0].trace;if(!a.traceIs(c,"pie-like")){var u=a.traceIs(c,"2dMap")?i:n.fillArray;u(c.hoverinfo,s,"hi",o(c)),c.hovertemplate&&u(c.hovertemplate,s,"ht"),c.hoverlabel&&(u(c.hoverlabel.bgcolor,s,"hbg"),u(c.hoverlabel.bordercolor,s,"hbc"),u(c.hoverlabel.font.size,s,"hts"),u(c.hoverlabel.font.color,s,"htc"),u(c.hoverlabel.font.family,s,"htf"),u(c.hoverlabel.namelength,s,"hnl"),u(c.hoverlabel.align,s,"hta"))}}}},{"../../lib":232,"../../registry":318}],135:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("./hover").hover;t.exports=function(e,t,r){var i=n.getComponentMethod("annotations","onClick")(e,e._hoverdata);function o(){e.emit("plotly_click",{points:e._hoverdata,event:t})}void 0!==r&&a(e,t,r,!0),e._hoverdata&&t&&t.target&&(i&&i.then?i.then(o):o(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}},{"../../registry":318,"./hover":139}],136:[function(e,t,r){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},{}],137:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("./hoverlabel_defaults");t.exports=function(e,t,r,o){var l=n.extendFlat({},o.hoverlabel);t.hovertemplate&&(l.namelength=-1),i(e,t,(function(r,i){return n.coerce(e,t,a,r,i)}),l)}},{"../../lib":232,"./attributes":133,"./hoverlabel_defaults":140}],138:[function(e,t,r){"use strict";var n=e("../../lib");r.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},r.isTraceInSubplots=function(e,t){if("splom"===e.type){for(var n=e.xaxes||[],a=e.yaxes||[],i=0;i<n.length;i++)for(var o=0;o<a.length;o++)if(-1!==t.indexOf(n[i]+a[o]))return!0;return!1}return-1!==t.indexOf(r.getSubplot(e))},r.flat=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=t;return r},r.p2c=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=e[n].p2c(t);return r},r.getDistanceFunction=function(e,t,n,a){return"closest"===e?a||r.quadrature(t,n):"x"===e.charAt(0)?t:n},r.getClosest=function(e,t,r){if(!1!==r.index)r.index>=0&&r.index<e.length?r.distance=0:r.index=!1;else for(var n=0;n<e.length;n++){var a=t(e[n]);a<=r.distance&&(r.index=n,r.distance=a)}return r},r.inbox=function(e,t,r){return e*t<0||0===e?r:1/0},r.quadrature=function(e,t){return function(r){var n=e(r),a=t(r);return Math.sqrt(n*n+a*a)}},r.makeEventData=function(e,t,n){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,n,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)),r.appendArrayPointValue(i,t,a),i},r.appendArrayPointValue=function(e,t,r){var a=t._arrayAttrs;if(a)for(var l=0;l<a.length;l++){var s=a[l],c=i(s);if(void 0===e[c]){var u=o(n.nestedProperty(t,s).get(),r);void 0!==u&&(e[c]=u)}}},r.appendArrayMultiPointValues=function(e,t,r){var a=t._arrayAttrs;if(a)for(var l=0;l<a.length;l++){var s=a[l],c=i(s);if(void 0===e[c]){for(var u=n.nestedProperty(t,s).get(),d=new Array(r.length),f=0;f<r.length;f++)d[f]=o(u,r[f]);e[c]=d}}};var a={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};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]}var l={x:!0,y:!0},s={"x unified":!0,"y unified":!0};r.isUnifiedHover=function(e){return"string"==typeof e&&!!s[e]},r.isXYhover=function(e){return"string"==typeof e&&!!l[e]}},{"../../lib":232}],139:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("tinycolor2"),o=e("../../lib"),l=o.strTranslate,s=o.strRotate,c=e("../../lib/events"),u=e("../../lib/svg_text_utils"),d=e("../../lib/override_cursor"),f=e("../drawing"),p=e("../color"),h=e("../dragelement"),m=e("../../plots/cartesian/axes"),g=e("../../registry"),v=e("./helpers"),y=e("./constants"),x=e("../legend/defaults"),b=e("../legend/draw"),_=y.YANGLE,w=Math.PI*_/180,T=1/Math.sin(w),M=Math.cos(w),k=Math.sin(w),A=y.HOVERARROWSIZE,L=y.HOVERTEXTPAD,S={box:!0,ohlc:!0,violin:!0,candlestick:!0},D={scatter:!0,scattergl:!0,splom:!0};function C(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}r.hover=function(e,t,r,i){e=o.getGraphDiv(e);var l=t.target;o.throttle(e._fullLayout._uid+y.HOVERID,y.HOVERMINTIME,(function(){!function(e,t,r,i,l){r||(r="xy");var s=Array.isArray(r)?r:[r],u=e._fullLayout,f=u._plots||[],m=f[r],y=u._has("cartesian");if(m){var x=m.overlays.map((function(e){return e.id}));s=s.concat(x)}for(var b=s.length,_=new Array(b),w=new Array(b),M=!1,k=0;k<b;k++){var A=s[k];if(f[A])M=!0,_[k]=f[A].xaxis,w[k]=f[A].yaxis;else{if(!u[A]||!u[A]._subplot)return void o.warn("Unrecognized subplot: "+A);var L=u[A]._subplot;_[k]=L.xaxis,w[k]=L.yaxis}}var O=t.hovermode||u.hovermode;O&&!M&&(O="closest");if(-1===["x","y","closest","x unified","y unified"].indexOf(O)||!e.calcdata||e.querySelector(".zoombox")||e._dragging)return h.unhoverRaw(e,t);var I=u.hoverdistance;-1===I&&(I=1/0);var E=u.spikedistance;-1===E&&(E=1/0);var Y,V,U,q,G,Z,W,X,J,Q,K,$,ee,te=[],re=[],ne={hLinePoint:null,vLinePoint:null},ae=!1;if(Array.isArray(t))for(O="array",U=0;U<t.length;U++)(G=e.calcdata[t[U].curveNumber||0])&&(Z=G[0].trace,"skip"!==G[0].trace.hoverinfo&&(re.push(G),"h"===Z.orientation&&(ae=!0)));else{for(q=0;q<e.calcdata.length;q++)G=e.calcdata[q],"skip"!==(Z=G[0].trace).hoverinfo&&v.isTraceInSubplots(Z,s)&&(re.push(G),"h"===Z.orientation&&(ae=!0));var ie,oe;if(!l)ie="xpx"in t?t.xpx:_[0]._length/2,oe="ypx"in t?t.ypx:w[0]._length/2;else{if(!1===c.triggerHandler(e,"plotly_beforehover",t))return;var le=l.getBoundingClientRect();ie=t.clientX-le.left,oe=t.clientY-le.top,u._calcInverseTransform(e);var se=o.apply3DTransform(u._invTransform)(ie,oe);if(ie=se[0],oe=se[1],ie<0||ie>_[0]._length||oe<0||oe>w[0]._length)return h.unhoverRaw(e,t)}if(t.pointerX=ie+_[0]._offset,t.pointerY=oe+w[0]._offset,Y="xval"in t?v.flat(s,t.xval):v.p2c(_,ie),V="yval"in t?v.flat(s,t.yval):v.p2c(w,oe),!a(Y[0])||!a(V[0]))return o.warn("Fx.hover failed",t,e),h.unhoverRaw(e,t)}var ce=1/0;function ue(e,r){for(q=0;q<re.length;q++)if((G=re[q])&&G[0]&&G[0].trace&&!0===(Z=G[0].trace).visible&&0!==Z._length&&-1===["carpet","contourcarpet"].indexOf(Z._module.name)){if("splom"===Z.type?W=s[X=0]:(W=v.getSubplot(Z),X=s.indexOf(W)),J=O,v.isUnifiedHover(J)&&(J=J.charAt(0)),$={cd:G,trace:Z,xa:_[X],ya:w[X],maxHoverDistance:I,maxSpikeDistance:E,index:!1,distance:Math.min(ce,I),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:p.defaultLine,name:Z.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[W]&&($.subplot=u[W]._subplot),u._splomScenes&&u._splomScenes[Z.uid]&&($.scene=u._splomScenes[Z.uid]),ee=te.length,"array"===J){var n=t[q];"pointNumber"in n?($.index=n.pointNumber,J="closest"):(J="","xval"in n&&(Q=n.xval,J="x"),"yval"in n&&(K=n.yval,J=J?"closest":"y"))}else void 0!==e&&void 0!==r?(Q=e,K=r):(Q=Y[X],K=V[X]);if(0!==I)if(Z._module&&Z._module.hoverPoints){var i=Z._module.hoverPoints($,Q,K,J,{finiteRange:!0,hoverLayer:u._hoverlayer});if(i)for(var l,c=0;c<i.length;c++)l=i[c],a(l.x0)&&a(l.y0)&&te.push(z(l,O))}else o.log("Unrecognized trace type in hover:",Z);if("closest"===O&&te.length>ee&&(te.splice(0,ee),ce=te[0].distance),y&&0!==E&&0===te.length){$.distance=E,$.index=!1;var d=Z._module.hoverPoints($,Q,K,"closest",{hoverLayer:u._hoverlayer});if(d&&(d=d.filter((function(e){return e.spikeDistance<=E}))),d&&d.length){var f,h=d.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(h.length){var m=h[0];a(m.x0)&&a(m.y0)&&(f=fe(m),(!ne.vLinePoint||ne.vLinePoint.spikeDistance>f.spikeDistance)&&(ne.vLinePoint=f))}var g=d.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(g.length){var x=g[0];a(x.x0)&&a(x.y0)&&(f=fe(x),(!ne.hLinePoint||ne.hLinePoint.spikeDistance>f.spikeDistance)&&(ne.hLinePoint=f))}}}}}function de(e,t,r){for(var n,a=null,i=1/0,o=0;o<e.length;o++)n=e[o].spikeDistance,r&&0===o&&(n=-1/0),n<=i&&n<=t&&(a=e[o],i=n);return a}function fe(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}ue();var pe={fullLayout:u,container:u._hoverlayer,event:t},he=e._spikepoints,me={vLinePoint:ne.vLinePoint,hLinePoint:ne.hLinePoint};e._spikepoints=me;var ge=function(){te.sort((function(e,t){return e.distance-t.distance})),te=function(e,t){for(var r=t.charAt(0),n=[],a=[],i=[],o=0;o<e.length;o++){var l=e[o];g.traceIs(l.trace,"bar-like")||g.traceIs(l.trace,"box-violin")?i.push(l):l.trace[r+"period"]?a.push(l):n.push(l)}return n.concat(a).concat(i)}(te,O)};ge();var ve=O.charAt(0),ye=("x"===ve||"y"===ve)&&te[0]&&D[te[0].trace.type];if(y&&0!==E&&0!==te.length){var xe=de(te.filter((function(e){return e.ya.showspikes})),E,ye);ne.hLinePoint=fe(xe);var be=de(te.filter((function(e){return e.xa.showspikes})),E,ye);ne.vLinePoint=fe(be)}if(0===te.length){var _e=h.unhoverRaw(e,t);return!y||null===ne.hLinePoint&&null===ne.vLinePoint||F(he)&&N(e,ne,pe),_e}y&&F(he)&&N(e,ne,pe);if(v.isXYhover(J)&&0!==te[0].length&&"splom"!==te[0].trace.type){var we=te[0],Te=(te=S[we.trace.type]?te.filter((function(e){return e.trace.index===we.trace.index})):[we]).length,Me=j("x",we,u),ke=j("y",we,u);ue(Me,ke);var Ae,Le=[],Se={},De=0,Ce=function(e){var t=S[e.trace.type]?C(e):e.trace.index;if(Se[t]){var r=Se[t]-1,n=Le[r];r>0&&Math.abs(e.distance)<Math.abs(n.distance)&&(Le[r]=e)}else De++,Se[t]=De,Le.push(e)};for(Ae=0;Ae<Te;Ae++)Ce(te[Ae]);for(Ae=te.length-1;Ae>Te-1;Ae--)Ce(te[Ae]);te=Le,ge()}var Oe=e._hoverdata,Pe=[],Ie=H(e),Re=B(e);for(U=0;U<te.length;U++){var ze=te[U],Ne=v.makeEventData(ze,ze.trace,ze.cd);if(!1!==ze.hovertemplate){var Fe=!1;ze.cd[ze.index]&&ze.cd[ze.index].ht&&(Fe=ze.cd[ze.index].ht),ze.hovertemplate=Fe||ze.trace.hovertemplate||!1}if(ze.xa&&ze.ya){var Ee=ze.x0+ze.xa._offset,je=ze.x1+ze.xa._offset,He=ze.y0+ze.ya._offset,Be=ze.y1+ze.ya._offset,Ye=Math.min(Ee,je),Ve=Math.max(Ee,je),Ue=Math.min(He,Be),qe=Math.max(He,Be);Ne.bbox={x0:Ye+Re,x1:Ve+Re,y0:Ue+Ie,y1:qe+Ie}}ze.eventData=[Ne],Pe.push(Ne)}e._hoverdata=Pe;var Ge="y"===O&&(re.length>1||te.length>1)||"closest"===O&&ae&&te.length>1,Ze=p.combine(u.plot_bgcolor||p.background,u.paper_bgcolor),We=P(te,{gd:e,hovermode:O,rotateLabels:Ge,bgColor:Ze,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});v.isUnifiedHover(O)||(!function(e,t,r){var n,a,i,o,l,s,c,u=0,d=1,f=e.size(),p=new Array(f),h=0;function m(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,i=r.pos+r.dp+r.size-t.pmax,a>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=a;n=!1}if(!(i<.01)){if(a<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=i;n=!1}if(n){var c=0;for(o=0;o<e.length;o++)(s=e[o]).pos+s.dp+s.size>t.pmax&&c++;for(o=e.length-1;o>=0&&!(c<=0);o--)(s=e[o]).pos>t.pmax-1&&(s.del=!0,c--);for(o=0;o<e.length&&!(c<=0);o++)if((s=e[o]).pos<t.pmin+1)for(s.del=!0,c--,i=2*s.size,l=e.length-1;l>=0;l--)e[l].dp-=i;for(o=e.length-1;o>=0&&!(c<=0);o--)(s=e[o]).pos+s.dp+s.size>t.pmax&&(s.del=!0,c--)}}}e.each((function(e){var n=e[t],a="x"===n._id.charAt(0),i=n.range;0===h&&i&&i[0]>i[1]!==a&&(d=-1),p[h++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?T:1)/2,pmin:0,pmax:a?r.width:r.height}]})),p.sort((function(e,t){return e[0].posref-t[0].posref||d*(t[0].traceIndex-e[0].traceIndex)}));for(;!n&&u<=f;){for(u++,n=!0,o=0;o<p.length-1;){var g=p[o],v=p[o+1],y=g[g.length-1],x=v[0];if((a=y.pos+y.dp+y.size-x.pos-x.dp+x.size)>.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(l=v.length-1;l>=0;l--)v[l].dp+=a;for(g.push.apply(g,v),p.splice(o+1,1),c=0,l=g.length-1;l>=0;l--)c+=g[l].dp;for(i=c/g.length,l=g.length-1;l>=0;l--)g[l].dp-=i;n=!1}else o++}p.forEach(m)}for(o=p.length-1;o>=0;o--){var b=p[o];for(l=b.length-1;l>=0;l--){var _=b[l],w=_.datum;w.offset=_.dp,w.del=_.del}}}(We,Ge?"xa":"ya",u),R(We,Ge,u._invScaleX,u._invScaleY));if(l&&l.tagName){var Xe=g.getComponentMethod("annotations","hasClickToShow")(e,Pe);d(n.select(l),Xe?"pointer":"")}if(!l||i||!function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(e,0,Oe))return;Oe&&e.emit("plotly_unhover",{event:t,points:Oe});e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:_,yaxes:w,xvals:Y,yvals:V})}(e,t,r,i,l)}))},r.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var a=t.gd,i=H(a),o=B(a),l=P(e.map((function(e){var r=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,l=e._y0||e.y0||e.y||0,s=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(r,n),d=Math.max(r,n),f=Math.min(l,s),h=Math.max(l,s),m=e.trace;if(g.traceIs(m,"gl3d")){var v=a._fullLayout[m.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,d+=y,f+=x,h+=x}c.bbox={x0:u+o,x1:d+o,y0:f+i,y1:h+i},t.inOut_bbox&&t.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||p.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,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}})),{gd:a,hovermode:"closest",rotateLabels:!1,bgColor:t.bgColor||p.background,container:n.select(t.container),outerContainer:t.outerContainer||t.container}),s=0,c=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,r){var n=e.y0-e.by/2;e.offset=n-5<s?s-n+5:0,s=n+e.by+e.offset,r===t.anchorIndex&&(c=e.offset)})).each((function(e){e.offset-=c})),R(l,!1,a._fullLayout._invScaleX,a._fullLayout._invScaleY),r?l:l.node()};var O=/<extra>([\s\S]*)<\/extra>/;function P(e,t){var r=t.gd,a=r._fullLayout,i=t.hovermode,c=t.rotateLabels,d=t.bgColor,h=t.container,m=t.outerContainer,w=t.commonLabelOpts||{};if(0===e.length)return[[]];var T=t.fontFamily||y.HOVERFONT,M=t.fontSize||y.HOVERFONTSIZE,k=e[0],S=k.xa,D=k.ya,O=i.charAt(0),P=k[O+"Label"],R=Y(r,m),z=R.top,N=R.width,F=R.height,E=void 0!==P&&k.distance<=t.hoverdistance&&("x"===i||"y"===i);if(E){var j,H,B=!0;for(j=0;j<e.length;j++)if(B&&void 0===e[j].zLabel&&(B=!1),H=e[j].hoverinfo||e[j].trace.hoverinfo){var V=Array.isArray(H)?H:H.split("+");if(-1===V.indexOf("all")&&-1===V.indexOf(i)){E=!1;break}}B&&(E=!1)}var U=h.selectAll("g.axistext").data(E?[0]:[]);if(U.enter().append("g").classed("axistext",!0),U.exit().remove(),U.each((function(){var e=n.select(this),t=o.ensureSingle(e,"path","",(function(e){e.style({"stroke-width":"1px"})})),s=o.ensureSingle(e,"text","",(function(e){e.attr("data-notex",1)})),c=w.bgcolor||p.defaultLine,d=w.bordercolor||p.contrast(c),h=p.contrast(c),m={family:w.font.family||T,size:w.font.size||M,color:w.font.color||h};t.style({fill:c,stroke:d}),s.text(P).call(f.font,m).call(u.positionText,0,0).call(u.convertToTspans,r),e.attr("transform","");var g,v,y=Y(r,s.node());if("x"===i){var x="top"===S.side?"-":"";s.attr("text-anchor","middle").call(u.positionText,0,"top"===S.side?z-y.bottom-A-L:z-y.top+A+L),g=S._offset+(k.x0+k.x1)/2,v=D._offset+("top"===S.side?0:D._length);var b=y.width/2+L;g<b?(g=b,t.attr("d","M-"+(b-A)+",0L-"+(b-2*A)+","+x+A+"H"+(L+y.width/2)+"v"+x+(2*L+y.height)+"H-"+b+"V"+x+A+"Z")):g>a.width-b?(g=a.width-b,t.attr("d","M"+(b-A)+",0L"+b+","+x+A+"v"+x+(2*L+y.height)+"H-"+b+"V"+x+A+"H"+(b-2*A)+"Z")):t.attr("d","M0,0L"+A+","+x+A+"H"+(L+y.width/2)+"v"+x+(2*L+y.height)+"H-"+(L+y.width/2)+"V"+x+A+"H-"+A+"Z")}else{var _,C,O;"right"===D.side?(_="start",C=1,O="",g=S._offset+S._length):(_="end",C=-1,O="-",g=S._offset),v=D._offset+(k.y0+k.y1)/2,s.attr("text-anchor",_),t.attr("d","M0,0L"+O+A+","+A+"V"+(L+y.height/2)+"h"+O+(2*L+y.width)+"V-"+(L+y.height/2)+"H"+O+A+"V-"+A+"Z");var I,R=y.height/2,N=z-y.top-R,F="clip"+a._uid+"commonlabel"+D._id;if(g<y.width+2*L+A){I="M-"+(A+L)+"-"+R+"h-"+(y.width-L)+"V"+R+"h"+(y.width-L)+"Z";var E=y.width-g+L;u.positionText(s,E,N),"end"===_&&s.selectAll("tspan").each((function(){var e=n.select(this),t=f.tester.append("text").text(e.text()).call(f.font,m),a=Y(r,t.node());Math.round(a.width)<Math.round(y.width)&&e.attr("x",E-a.width),t.remove()}))}else u.positionText(s,C*(L+A),N),I=null;var j=a._topclips.selectAll("#"+F).data(I?[0]:[]);j.enter().append("clipPath").attr("id",F).append("path"),j.exit().remove(),j.select("path").attr("d",I),f.setClipUrl(s,I?F:null,r)}e.attr("transform",l(g,v))})),v.isUnifiedHover(i)){h.selectAll("g.hovertext").remove();var q=e.filter((function(e){return"none"!==e.hoverinfo}));if(0===q.length)return;var G=a.hoverlabel,Z=G.font,W={showlegend:!0,legend:{title:{text:P,font:Z},font:Z,bgcolor:G.bgcolor,bordercolor:G.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},X={};x(W,X,r._fullData);var J=X.legend;J.entries=[];for(var Q=0;Q<q.length;Q++){var K=q[Q];if("none"!==K.hoverinfo){var $=I(K,!0,i,a,P),ee=$[0],te=$[1];K.name=te,K.text=""!==te?te+" : "+ee:ee;var re=K.cd[K.index];re&&(re.mc&&(K.mc=re.mc),re.mcc&&(K.mc=re.mcc),re.mlc&&(K.mlc=re.mlc),re.mlcc&&(K.mlc=re.mlcc),re.mlw&&(K.mlw=re.mlw),re.mrc&&(K.mrc=re.mrc),re.dir&&(K.dir=re.dir)),K._distinct=!0,J.entries.push([K])}}J.entries.sort((function(e,t){return e[0].trace.index-t[0].trace.index})),J.layer=h,J._inHover=!0,J._groupTitleFont=Z,b(r,J);var ne,ae,ie,oe,le=h.select("g.legend"),se=Y(r,le.node()),ce=se.width+2*L,ue=se.height+2*L,de=q[0],fe=(de.x0+de.x1)/2,pe=(de.y0+de.y1)/2,he=!(g.traceIs(de.trace,"bar-like")||g.traceIs(de.trace,"box-violin"));"y"===O?he?(ae=pe-L,ne=pe+L):(ae=Math.min.apply(null,q.map((function(e){return Math.min(e.y0,e.y1)}))),ne=Math.max.apply(null,q.map((function(e){return Math.max(e.y0,e.y1)})))):ae=ne=o.mean(q.map((function(e){return(e.y0+e.y1)/2})))-ue/2,"x"===O?he?(ie=fe+L,oe=fe-L):(ie=Math.max.apply(null,q.map((function(e){return Math.max(e.x0,e.x1)}))),oe=Math.min.apply(null,q.map((function(e){return Math.min(e.x0,e.x1)})))):ie=oe=o.mean(q.map((function(e){return(e.x0+e.x1)/2})))-ce/2;var me,ge,ve=S._offset,ye=D._offset;return oe+=ve-ce,ae+=ye-ue,me=(ie+=ve)+ce<N&&ie>=0?ie:oe+ce<N&&oe>=0?oe:ve+ce<N?ve:ie-fe<fe-oe+ce?N-ce:0,me+=L,ge=(ne+=ye)+ue<F&&ne>=0?ne:ae+ue<F&&ae>=0?ae:ye+ue<F?ye:ne-pe<pe-ae+ue?F-ue:0,ge+=L,le.attr("transform",l(me-1,ge-1)),le}var xe=h.selectAll("g.hovertext").data(e,(function(e){return C(e)}));return xe.enter().append("g").classed("hovertext",!0).each((function(){var e=n.select(this);e.append("rect").call(p.fill,p.addOpacity(d,.8)),e.append("text").classed("name",!0),e.append("path").style("stroke-width","1px"),e.append("text").classed("nums",!0).call(f.font,T,M)})),xe.exit().remove(),xe.each((function(e){var t=n.select(this).attr("transform",""),o=e.color;Array.isArray(o)&&(o=o[e.eventData[0].pointNumber]);var h=e.bgcolor||o,m=p.combine(p.opacity(h)?h:p.defaultLine,d),g=p.combine(p.opacity(o)?o:p.defaultLine,d),v=e.borderColor||p.contrast(m),y=I(e,E,i,a,P,t),x=y[0],b=y[1],w=t.select("text.nums").call(f.font,e.fontFamily||T,e.fontSize||M,e.fontColor||v).text(x).attr("data-notex",1).call(u.positionText,0,0).call(u.convertToTspans,r),k=t.select("text.name"),S=0,D=0;if(b&&b!==x){k.call(f.font,e.fontFamily||T,e.fontSize||M,g).text(b).attr("data-notex",1).call(u.positionText,0,0).call(u.convertToTspans,r);var C=Y(r,k.node());S=C.width+2*L,D=C.height+2*L}else k.remove(),t.select("rect").remove();t.select("path").style({fill:m,stroke:v});var O=e.xa._offset+(e.x0+e.x1)/2,R=e.ya._offset+(e.y0+e.y1)/2,j=Math.abs(e.x1-e.x0),H=Math.abs(e.y1-e.y0),B=Y(r,w.node()),V=B.width/a._invScaleX,U=B.height/a._invScaleY;e.ty0=(z-B.top)/a._invScaleY,e.bx=V+2*L,e.by=Math.max(U+2*L,D),e.anchor="start",e.txwidth=V,e.tx2width=S,e.offset=0;var q,G,Z=(V+A+L+S)*a._invScaleX;if(c)e.pos=O,q=R+H/2+Z<=F,G=R-H/2-Z>=0,"top"!==e.idealAlign&&q||!G?q?(R+=H/2,e.anchor="start"):e.anchor="middle":(R-=H/2,e.anchor="end");else if(e.pos=R,q=O+j/2+Z<=N,G=O-j/2-Z>=0,"left"!==e.idealAlign&&q||!G)if(q)O+=j/2,e.anchor="start";else{e.anchor="middle";var W=Z/2,X=O+W-N,J=O-W;X>0&&(O-=X),J<0&&(O+=-J)}else O-=j/2,e.anchor="end";w.attr("text-anchor",e.anchor),S&&k.attr("text-anchor",e.anchor),t.attr("transform",l(O,R)+(c?s(_):""))})),xe}function I(e,t,r,n,a,i){var l="",s="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=o.templateString(e.name,e.trace._meta)),l=E(e.name,e.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(s+="x: "+e.xLabel+"<br>"),void 0!==e.yLabel&&(s+="y: "+e.yLabel+"<br>"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[c+"Label"]===a?s=e[u+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(s=e.yLabel):s=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(s+=(s?"<br>":"")+e.text),void 0!==e.extraText&&(s+=(s?"<br>":"")+e.extraText),i&&""===s&&!e.hovertemplate&&(""===l&&i.remove(),s=l);var d=e.hovertemplate||!1;if(d){var f=e.hovertemplateLabels||e;e[c+"Label"]!==a&&(f[c+"other"]=f[c+"Val"],f[c+"otherLabel"]=f[c+"Label"]),s=(s=o.hovertemplateString(d,f,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(O,(function(t,r){return l=E(r,e.nameLength),""}))}return[s,l]}function R(e,t,r,a){var i=function(e){return e*r},o=function(e){return e*a};e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var a=r.select("text.nums"),l=e.anchor,s="end"===l?-1:1,c={start:1,end:-1,middle:0}[l],d=c*(A+L),p=d+c*(e.txwidth+L),h=0,m=e.offset,g="middle"===l;g&&(d-=e.tx2width/2,p+=e.txwidth/2+L),t&&(m*=-k,h=e.offset*M),r.select("path").attr("d",g?"M-"+i(e.bx/2+e.tx2width/2)+","+o(m-e.by/2)+"h"+i(e.bx)+"v"+o(e.by)+"h-"+i(e.bx)+"Z":"M0,0L"+i(s*A+h)+","+o(A+m)+"v"+o(e.by/2-A)+"h"+i(s*e.bx)+"v-"+o(e.by)+"H"+i(s*A+h)+"V"+o(m-A)+"Z");var v=h+d,y=m+e.ty0-e.by/2+L,x=e.textAlign||"auto";"auto"!==x&&("left"===x&&"start"!==l?(a.attr("text-anchor","start"),v=g?-e.bx/2-e.tx2width/2+L:-e.bx-L):"right"===x&&"end"!==l&&(a.attr("text-anchor","end"),v=g?e.bx/2-e.tx2width/2-L:e.bx+L)),a.call(u.positionText,i(v),o(y)),e.tx2width&&(r.select("text.name").call(u.positionText,i(p+c*L+h),o(m+e.ty0-e.by/2+L)),r.select("rect").call(f.setRect,i(p+(c-1)*e.tx2width/2+h),o(m-e.by/2-1),i(e.tx2width),o(e.by+2)))}))}function z(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],l=e.cd[r]||{};function s(e){return e||a(e)&&0===e}var c=Array.isArray(r)?function(e,t){var a=o.castOption(i,r,e);return s(a)?a:o.extractOption({},n,"",t)}:function(e,t){return o.extractOption(l,n,e,t)};function u(t,r,n){var a=c(r,n);s(a)&&(e[t]=a)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===n.orientation?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:m.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:m.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),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 d=m.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+d+" / -"+m.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xb1 "+d,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var f=m.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+f+" / -"+m.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xb1 "+f,"y"===t&&(e.distance+=1)}var p=e.hoverinfo||e.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===p.indexOf("y")&&(e.yLabel=void 0),-1===p.indexOf("z")&&(e.zLabel=void 0),-1===p.indexOf("text")&&(e.text=void 0),-1===p.indexOf("name")&&(e.name=void 0)),e}function N(e,t,r){var n,a,o=r.container,l=r.fullLayout,s=l._size,c=r.event,u=!!t.hLinePoint,d=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),d||u){var h=p.combine(l.plot_bgcolor,l.paper_bgcolor);if(u){var g,v,y=t.hLinePoint;n=y&&y.xa,"cursor"===(a=y&&y.ya).spikesnap?(g=c.pointerX,v=c.pointerY):(g=n._offset+y.x,v=a._offset+y.y);var x,b,_=i.readability(y.color,h)<1.5?p.contrast(h):y.color,w=a.spikemode,T=a.spikethickness,M=a.spikecolor||_,k=m.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=k,b=g),-1!==w.indexOf("across")){var A=a._counterDomainMin,L=a._counterDomainMax;"free"===a.anchor&&(A=Math.min(A,a.position),L=Math.max(L,a.position)),x=s.l+A*s.w,b=s.l+L*s.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":T,stroke:M,"stroke-dasharray":f.dashStyle(a.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":T+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:k+("right"!==a.side?T:-T),cy:v,r:T,fill:M}).classed("spikeline",!0)}if(d){var S,D,C=t.vLinePoint;n=C&&C.xa,a=C&&C.ya,"cursor"===n.spikesnap?(S=c.pointerX,D=c.pointerY):(S=n._offset+C.x,D=a._offset+C.y);var O,P,I=i.readability(C.color,h)<1.5?p.contrast(h):C.color,R=n.spikemode,z=n.spikethickness,N=n.spikecolor||I,F=m.getPxPosition(e,n);if(-1!==R.indexOf("toaxis")||-1!==R.indexOf("across")){if(-1!==R.indexOf("toaxis")&&(O=F,P=D),-1!==R.indexOf("across")){var E=n._counterDomainMin,j=n._counterDomainMax;"free"===n.anchor&&(E=Math.min(E,n.position),j=Math.max(j,n.position)),O=s.t+(1-j)*s.h,P=s.t+(1-E)*s.h}o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:P,"stroke-width":z,stroke:N,"stroke-dasharray":f.dashStyle(n.spikedash,z)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:P,"stroke-width":z+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==R.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:S,cy:F-("top"!==n.side?z:-z),r:z,fill:N}).classed("spikeline",!0)}}}function F(e,t){return!t||(t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint)}function E(e,t){return u.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function j(e,t,r){var n=t[e+"a"],a=t[e+"Val"],i=t.cd[0];if("category"===n.type)a=n._categoriesMap[a];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var l=t.cd[t.index],s=l[e+"Start"];void 0===s&&(s=l[e]);var c=l[e+"End"];void 0===c&&(c=l[e]);var u=c-s;"end"===o?a+=u:"middle"===o&&(a+=u/2)}a=n.d2c(a)}return i&&i.t&&i.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(a+=i.t.dPos)),a}function H(e){return e.offsetTop+e.clientTop}function B(e){return e.offsetLeft+e.clientLeft}function Y(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.x,i=n.y,l=a+n.width,s=i+n.height,c=o.apply3DTransform(r._invTransform)(a,i),u=o.apply3DTransform(r._invTransform)(l,s),d=c[0],f=c[1],p=u[0],h=u[1];return{x:d,y:f,width:p-d,height:h-f,top:Math.min(f,h),left:Math.min(d,p),right:Math.max(d,p),bottom:Math.max(f,h)}}},{"../../lib":232,"../../lib/events":225,"../../lib/override_cursor":243,"../../lib/svg_text_utils":255,"../../plots/cartesian/axes":279,"../../registry":318,"../color":102,"../dragelement":121,"../drawing":124,"../legend/defaults":154,"../legend/draw":155,"./constants":136,"./helpers":138,"@plotly/d3":11,"fast-isnumeric":17,tinycolor2:67}],140:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../color"),i=e("./helpers").isUnifiedHover;t.exports=function(e,t,r,o){function l(e){o.font[e]||(o.font[e]=t.legend?t.legend.font[e]:t.font[e])}o=o||{},t&&i(t.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),t.legend?(o.bgcolor||(o.bgcolor=a.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},{"../../lib":232,"../color":102,"./helpers":138}],141:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t){function r(r,i){return void 0!==t[r]?t[r]:n.coerce(e,t,a,r,i)}return r("clickmode"),r("hovermode")}},{"../../lib":232,"./layout_attributes":143}],142:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib"),i=e("../dragelement"),o=e("./helpers"),l=e("./layout_attributes"),s=e("./hover");t.exports={moduleType:"component",name:"fx",constants:e("./constants"),schema:{layout:l},attributes:e("./attributes"),layoutAttributes:l,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,r){return a.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return a.castOption(e,r,"hoverinfo",(function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:s.hover,unhover:i.unhover,loneHover:s.loneHover,loneUnhover:function(e){var t=a.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e("./click")}},{"../../lib":232,"../dragelement":121,"./attributes":133,"./calc":134,"./click":135,"./constants":136,"./defaults":137,"./helpers":138,"./hover":139,"./layout_attributes":143,"./layout_defaults":144,"./layout_global_defaults":145,"@plotly/d3":11}],143:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../plots/font_attributes")({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},{"../../plots/font_attributes":310,"./constants":136}],144:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes"),i=e("./hovermode_defaults"),o=e("./hoverlabel_defaults");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}i(e,t)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var l=t._has("mapbox"),s=t._has("geo"),c=t._basePlotModules.length;"zoom"===t.dragmode&&((l||s)&&1===c||l&&s&&2===c)&&(t.dragmode="pan"),o(e,t,r)}},{"../../lib":232,"./hoverlabel_defaults":140,"./hovermode_defaults":141,"./layout_attributes":143}],145:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./hoverlabel_defaults"),i=e("./layout_attributes");t.exports=function(e,t){a(e,t,(function(r,a){return n.coerce(e,t,i,r,a)}))}},{"../../lib":232,"./hoverlabel_defaults":140,"./layout_attributes":143}],146:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../lib/regex").counter,i=e("../../plots/domain").attributes,o=e("../../plots/cartesian/constants").idRegex,l=e("../../plot_api/plot_template"),s={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[a("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:i({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function c(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:a.length?a:void 0}function u(e,t,r,n,a,i){var o=t(e+"gap",r),l=t("domain."+e);t(e+"side",n);for(var s=new Array(a),c=l[0],u=(l[1]-c)/(a-o),d=u*(1-o),f=0;f<a;f++){var p=c+u*f;s[i?a-1-f:f]=[p,p+d]}return s}function d(e,t,r,n,a){var i,o=new Array(r);function l(e,r){-1!==t.indexOf(r)&&void 0===n[r]?(o[e]=r,n[r]=e):o[e]=""}if(Array.isArray(e))for(i=0;i<r;i++)l(i,e[i]);else for(l(0,a),i=1;i<r;i++)l(i,a+(i+1));return o}t.exports={moduleType:"component",name:"grid",schema:{layout:{grid:s}},layoutAttributes:s,sizeDefaults:function(e,t){var r=e.grid||{},a=c(t,r,"x"),i=c(t,r,"y");if(e.grid||a||i){var o,d,f=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),p=Array.isArray(a),h=Array.isArray(i),m=p&&a!==r.xaxes&&h&&i!==r.yaxes;f?(o=r.subplots.length,d=r.subplots[0].length):(h&&(o=i.length),p&&(d=a.length));var g=l.newContainer(t,"grid"),v=M("rows",o),y=M("columns",d);if(v*y>1){if(!f&&!p&&!h)"independent"===M("pattern")&&(f=!0);g._hasSubplotGrid=f;var x,b,_="top to bottom"===M("roworder"),w=f?.2:.1,T=f?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:u("x",M,w,x,y),y:u("y",M,T,b,v,_)}}else delete t.grid}function M(e,t){return n.coerce(r,g,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,a,i,o,l,s,u,f=e.grid||{},p=t._subplots,h=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,y=r._axisMap={};if(h){var x=f.subplots||[];s=r.subplots=new Array(m);var b=1;for(n=0;n<m;n++){var _=s[n]=new Array(g),w=x[n]||[];for(a=0;a<g;a++)if(v?(l=1===b?"xy":"x"+b+"y"+b,b++):l=w[a],_[a]="",-1!==p.cartesian.indexOf(l)){if(u=l.indexOf("y"),i=l.slice(0,u),o=l.slice(u),void 0!==y[i]&&y[i]!==a||void 0!==y[o]&&y[o]!==n)continue;_[a]=l,y[i]=a,y[o]=n}}}else{var T=c(t,f,"x"),M=c(t,f,"y");r.xaxes=d(T,p.xaxis,g,y,"x"),r.yaxes=d(M,p.yaxis,m,y,"y")}var k=r._anchors={},A="top to bottom"===r.roworder;for(var L in y){var S,D,C,O=L.charAt(0),P=r[O+"side"];if(P.length<8)k[L]="free";else if("x"===O){if("t"===P.charAt(0)===A?(S=0,D=1,C=m):(S=m-1,D=-1,C=-1),h){var I=y[L];for(n=S;n!==C;n+=D)if((l=s[n][I])&&(u=l.indexOf("y"),l.slice(0,u)===L)){k[L]=l.slice(u);break}}else for(n=S;n!==C;n+=D)if(o=r.yaxes[n],-1!==p.cartesian.indexOf(L+o)){k[L]=o;break}}else if("l"===P.charAt(0)?(S=0,D=1,C=g):(S=g-1,D=-1,C=-1),h){var R=y[L];for(n=S;n!==C;n+=D)if((l=s[R][n])&&(u=l.indexOf("y"),l.slice(u)===L)){k[L]=l.slice(0,u);break}}else for(n=S;n!==C;n+=D)if(i=r.xaxes[n],-1!==p.cartesian.indexOf(i+L)){k[L]=i;break}}}}}},{"../../lib":232,"../../lib/regex":248,"../../plot_api/plot_template":268,"../../plots/cartesian/constants":286,"../../plots/domain":309}],147:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/constants"),a=e("../../plot_api/plot_template").templatedArray;e("../../constants/axis_placeable_objects");t.exports=a("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},{"../../constants/axis_placeable_objects":208,"../../plot_api/plot_template":268,"../../plots/cartesian/constants":286}],148:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib/to_log_range");t.exports=function(e,t,r,i){t=t||{};var o="log"===r&&"linear"===t.type,l="linear"===r&&"log"===t.type;if(o||l)for(var s,c,u=e._fullLayout.images,d=t._id.charAt(0),f=0;f<u.length;f++)if(c="images["+f+"].",(s=u[f])[d+"ref"]===t._id){var p=s[d],h=s["size"+d],m=null,g=null;if(o){m=a(p,t.range);var v=h/Math.pow(10,m)/2;g=2*Math.log(v+Math.sqrt(1+v*v))/Math.LN10}else g=(m=Math.pow(10,p))*(Math.pow(10,h/2)-Math.pow(10,-h/2));n(m)?n(g)||(g=null):(m=null,g=null),i(c+d,m),i(c+"size"+d,g)}}},{"../../lib/to_log_range":257,"fast-isnumeric":17}],149:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../../plots/array_container_defaults"),o=e("./attributes");function l(e,t,r){function i(r,a){return n.coerce(e,t,o,r,a)}var l=i("source");if(!i("visible",!!l))return t;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var s={_fullLayout:r},c=["x","y"],u=0;u<2;u++){var d=c[u],f=a.coerceRef(e,t,s,d,"paper",void 0);if("paper"!==f)a.getFromId(s,f)._imgIndices.push(t._index);a.coercePosition(t,s,i,f,d,0)}return t}t.exports=function(e,t){i(e,t,{name:"images",handleItemDefaults:l})}},{"../../lib":232,"../../plots/array_container_defaults":274,"../../plots/cartesian/axes":279,"./attributes":147}],150:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../drawing"),i=e("../../plots/cartesian/axes"),o=e("../../plots/cartesian/axis_ids"),l=e("../../constants/xmlns_namespaces");t.exports=function(e){var t,r,s=e._fullLayout,c=[],u={},d=[];for(r=0;r<s.images.length;r++){var f=s.images[r];if(f.visible)if("below"===f.layer&&"paper"!==f.xref&&"paper"!==f.yref){t=o.ref2id(f.xref)+o.ref2id(f.yref);var p=s._plots[t];if(!p){d.push(f);continue}p.mainplot&&(t=p.mainplot.id),u[t]||(u[t]=[]),u[t].push(f)}else"above"===f.layer?c.push(f):d.push(f)}var h={left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},m={top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}};function g(t){var r=n.select(this);if(this._imgSrc!==t.source)if(r.attr("xmlns",l.svg),t.source&&"data:"===t.source.slice(0,5))r.attr("xlink:href",t.source),this._imgSrc=t.source;else{var a=new Promise(function(e){var n=new Image;function a(){r.remove(),e()}this.img=n,n.setAttribute("crossOrigin","anonymous"),n.onerror=a,n.onload=function(){var t=document.createElement("canvas");t.width=this.width,t.height=this.height,t.getContext("2d").drawImage(this,0,0);var n=t.toDataURL("image/png");r.attr("xlink:href",n),e()},r.on("error",a),n.src=t.source,this._imgSrc=t.source}.bind(this));e._promises.push(a)}}function v(t){var r,o,l=n.select(this),c=i.getFromId(e,t.xref),u=i.getFromId(e,t.yref),d="domain"===i.getRefType(t.xref),f="domain"===i.getRefType(t.yref),p=s._size;r=void 0!==c?"string"==typeof t.xref&&d?c._length*t.sizex:Math.abs(c.l2p(t.sizex)-c.l2p(0)):t.sizex*p.w,o=void 0!==u?"string"==typeof t.yref&&f?u._length*t.sizey:Math.abs(u.l2p(t.sizey)-u.l2p(0)):t.sizey*p.h;var g,v,y=r*h[t.xanchor].offset,x=o*m[t.yanchor].offset,b=h[t.xanchor].sizing+m[t.yanchor].sizing;switch(g=void 0!==c?"string"==typeof t.xref&&d?c._length*t.x+c._offset:c.r2p(t.x)+c._offset:t.x*p.w+p.l,g+=y,v=void 0!==u?"string"==typeof t.yref&&f?u._length*(1-t.y)+u._offset:u.r2p(t.y)+u._offset:p.h-t.y*p.h+p.t,v+=x,t.sizing){case"fill":b+=" slice";break;case"stretch":b="none"}l.attr({x:g,y:v,width:r,height:o,preserveAspectRatio:b,opacity:t.opacity});var _=(c&&"domain"!==i.getRefType(t.xref)?c._id:"")+(u&&"domain"!==i.getRefType(t.yref)?u._id:"");a.setClipUrl(l,_?"clip"+s._uid+_:null,e)}var y=s._imageLowerLayer.selectAll("image").data(d),x=s._imageUpperLayer.selectAll("image").data(c);y.enter().append("image"),x.enter().append("image"),y.exit().remove(),x.exit().remove(),y.each((function(e){g.bind(this)(e),v.bind(this)(e)})),x.each((function(e){g.bind(this)(e),v.bind(this)(e)}));var b=Object.keys(s._plots);for(r=0;r<b.length;r++){t=b[r];var _=s._plots[t];if(_.imagelayer){var w=_.imagelayer.selectAll("image").data(u[t]||[]);w.enter().append("image"),w.exit().remove(),w.each((function(e){g.bind(this)(e),v.bind(this)(e)}))}}}},{"../../constants/xmlns_namespaces":213,"../../plots/cartesian/axes":279,"../../plots/cartesian/axis_ids":283,"../drawing":124,"@plotly/d3":11}],151:[function(e,t,r){"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":292,"./attributes":147,"./convert_coords":148,"./defaults":149,"./draw":150}],152:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../color/attributes");t.exports={bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:a.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:n({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",min:-2,max:3,editType:"legend"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",min:-2,max:3,editType:"legend"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:n({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend"},editType:"legend"},editType:"legend"}},{"../../plots/font_attributes":310,"../color/attributes":101}],153:[function(e,t,r){"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},{}],154:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../plot_api/plot_template"),o=e("./attributes"),l=e("../../plots/layout_attributes"),s=e("./helpers");t.exports=function(e,t,r){for(var c=e.legend||{},u=0,d=!1,f="normal",p=0;p<r.length;p++){var h=r[p];h.visible&&((h.showlegend||h._dfltShowLegend&&!(h._module&&h._module.attributes&&h._module.attributes.showlegend&&!1===h._module.attributes.showlegend.dflt))&&(u++,h.showlegend&&(d=!0,(n.traceIs(h,"pie-like")||!0===h._input.showlegend)&&u++)),(n.traceIs(h,"bar")&&"stack"===t.barmode||-1!==["tonextx","tonexty"].indexOf(h.fill))&&(f=s.isGrouped({traceorder:f})?"grouped+reversed":"reversed"),void 0!==h.legendgroup&&""!==h.legendgroup&&(f=s.isReversed({traceorder:f})?"reversed+grouped":"grouped"))}var m=a.coerce(e,t,l,"showlegend",d&&u>1);if(!1!==m||c.uirevision){var g=i.newContainer(t,"legend");if(T("uirevision",t.uirevision),!1!==m){T("bgcolor",t.paper_bgcolor),T("bordercolor"),T("borderwidth");var v,y,x,b=a.coerceFont(T,"font",t.font),_="h"===T("orientation");if(_?(v=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(y=1.1,x="bottom"):(y=-.1,x="top")):(v=1.02,y=1,x="auto"),T("traceorder",f),s.isGrouped(t.legend)&&T("tracegroupgap"),T("itemsizing"),T("itemwidth"),T("itemclick"),T("itemdoubleclick"),T("groupclick"),T("x",v),T("xanchor"),T("y",y),T("yanchor",x),T("valign"),a.noneOrAll(c,g,["x","y"]),T("title.text")){T("title.side",_?"left":"top");var w=a.extendFlat({},b,{size:a.bigFont(b.size)});a.coerceFont(T,"title.font",w)}}}function T(e,t){return a.coerce(c,g,o,e,t)}}},{"../../lib":232,"../../plot_api/plot_template":268,"../../plots/layout_attributes":314,"../../registry":318,"./attributes":152,"./helpers":158}],155:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib"),i=e("../../plots/plots"),o=e("../../registry"),l=e("../../lib/events"),s=e("../dragelement"),c=e("../drawing"),u=e("../color"),d=e("../../lib/svg_text_utils"),f=e("./handle_click"),p=e("./constants"),h=e("../../constants/alignment"),m=h.LINE_SPACING,g=h.FROM_TL,v=h.FROM_BR,y=e("./get_legend_data"),x=e("./style"),b=e("./helpers");function _(e,t,r,n,a){var i=r.data()[0][0].trace,s={event:a,node:r.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&&(s.group=i._group),o.traceIs(i,"pie-like")&&(s.label=r.datum()[0].label),!1!==l.triggerHandler(e,"plotly_legendclick",s))if(1===n)t._clickTimeout=setTimeout((function(){e._fullLayout&&f(r,e,n)}),e._context.doubleClickDelay);else if(2===n){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==l.triggerHandler(e,"plotly_legenddoubleclick",s)&&f(r,e,n)}}function w(e,t,r){var n,i,l=e.data()[0][0],s=l.trace,u=o.traceIs(s,"pie-like"),f=!r._inHover&&t._context.edits.legendText&&!u,h=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,i=l.groupTitle.font):(i=r.font,r.entries?n=l.text:(n=u?l.label:s.name,s._meta&&(n=a.templateString(n,s._meta))));var m=a.ensureSingle(e,"text","legendtext");m.attr("text-anchor","start").call(c.font,i).text(f?T(n,h):n);var g=r.itemwidth+2*p.itemGap;d.positionText(m,g,0),f?m.call(d.makeEditable,{gd:t,text:n}).call(k,e,t,r).on("edit",(function(n){this.text(T(n,h)).call(k,e,t,r);var i=l.trace._fullInput||{},c={};if(o.hasTransform(i,"groupby")){var u=o.getTransformIndices(i,"groupby"),d=u[u.length-1],f=a.keyedContainer(i,"transforms["+d+"].styles","target","value.name");f.set(l.trace._group,n),c=f.constructUpdate()}else c.name=n;return o.call("_guiRestyle",t,c,s.index)})):k(m,e,t,r)}function T(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function M(e,t){var r,i=t._context.doubleClickDelay,o=1,l=a.ensureSingle(e,"rect","legendtoggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(u.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(l.on("mousedown",(function(){(r=(new Date).getTime())-t._legendMouseDownTime<i?o+=1:(o=1,t._legendMouseDownTime=r)})),l.on("mouseup",(function(){if(!t._dragged&&!t._editing){var r=t._fullLayout.legend;(new Date).getTime()-t._legendMouseDownTime>i&&(o=Math.max(o-1,1)),_(t,r,e,o,n.event)}})))}function k(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),d.convertToTspans(e,r,(function(){!function(e,t,r,n){var a=e.data()[0][0];if(!r._inHover&&a&&!a.trace.showlegend)return void e.remove();var i=e.select("g[class*=math-group]"),o=i.node();r||(r=t._fullLayout.legend);var l,s=r.borderwidth;l=1===n?r.title.font:a.groupTitle?a.groupTitle.font:r.font;var u,f,h=l.size*m;if(o){var g=c.bBox(o);u=g.height,f=g.width,1===n?c.setTranslate(i,s,s+.75*u):c.setTranslate(i,0,.25*u)}else{var v=e.select(1===n?".legendtitletext":".legendtext"),y=d.lineCount(v),x=v.node();if(u=h*y,f=x?c.bBox(x).width:0,1===n)"left"===r.title.side&&(f+=2*p.itemGap),d.positionText(v,s+p.titlePad,s+h);else{var b=2*p.itemGap+r.itemwidth;a.groupTitle&&(b=p.itemGap,f-=r.itemwidth),d.positionText(v,b,-h*((y-1)/2-.3))}}1===n?(r._titleWidth=f,r._titleHeight=u):(a.lineHeight=h,a.height=Math.max(u,16)+3,a.width=f)}(t,r,n,a)}))}function A(e){return a.isRightAnchor(e)?"right":a.isCenterAnchor(e)?"center":"left"}function L(e){return a.isBottomAnchor(e)?"bottom":a.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e,t){return t||(t=e._fullLayout.legend||{}),function(e,t){var r,l,d=e._fullLayout,f="legend"+d._uid,h=t._inHover;h?(r=t.layer,f+="-hover"):r=d._infolayer;if(!r)return;e._legendMouseDownTime||(e._legendMouseDownTime=0);if(h){if(!t.entries)return;l=y(t.entries,t)}else{if(!e.calcdata)return;l=d.showlegend&&y(e.calcdata,t)}var m=d.hiddenlabels||[];if(!(h||d.showlegend&&l.length))return r.selectAll(".legend").remove(),d._topdefs.select("#"+f).remove(),i.autoMargin(e,"legend");var T=a.ensureSingle(r,"g","legend",(function(e){h||e.attr("pointer-events","all")})),S=a.ensureSingleById(d._topdefs,"clipPath",f,(function(e){e.append("rect")})),D=a.ensureSingle(T,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));D.call(u.stroke,t.bordercolor).call(u.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var C=a.ensureSingle(T,"g","scrollbox"),O=t.title;if(t._titleWidth=0,t._titleHeight=0,O.text){var P=a.ensureSingle(C,"text","legendtitletext");P.attr("text-anchor","start").call(c.font,O.font).text(O.text),k(P,C,e,t,1)}else C.selectAll(".legendtitletext").remove();var I=a.ensureSingle(T,"rect","scrollbar",(function(e){e.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),R=C.selectAll("g.groups").data(l);R.enter().append("g").attr("class","groups"),R.exit().remove();var z=R.selectAll("g.traces").data(a.identity);z.enter().append("g").attr("class","traces"),z.exit().remove(),z.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==m.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(w,e,t)})).call(x,e,t).each((function(){h||n.select(this).call(M,e)})),a.syncOrAsync([i.previousPromises,function(){return function(e,t,r,a){var i=e._fullLayout;a||(a=i.legend);var o=i._size,l=b.isVertical(a),s=b.isGrouped(a),u=a.borderwidth,d=2*u,f=p.itemGap,h=a.itemwidth+2*f,m=2*(u+f),g=L(a),v=a.y<0||0===a.y&&"top"===g,y=a.y>1||1===a.y&&"bottom"===g,x=a.tracegroupgap;a._maxHeight=Math.max(v||y?i.height/2:o.h,30);var _=0;a._width=0,a._height=0;var w=function(e){var t=0,r=0,n=e.title.side;n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight));return[t,r]}(a);if(l)r.each((function(e){var t=e[0].height;c.setTranslate(this,u+w[0],u+w[1]+a._height+t/2+f),a._height+=t,a._width=Math.max(a._width,e[0].width)})),_=h+a._width,a._width+=f+h+d,a._height+=m,s&&(t.each((function(e,t){c.setTranslate(this,0,t*a.tracegroupgap)})),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var T=A(a),M=a.x<0||0===a.x&&"right"===T,k=a.x>1||1===a.x&&"left"===T,S=y||v,D=i.width/2;a._maxWidth=Math.max(M?S&&"left"===T?o.l+o.w:D:k?S&&"right"===T?o.r+o.w:D:o.w,2*h);var C=0,O=0;r.each((function(e){var t=e[0].width+h;C=Math.max(C,t),O+=t})),_=null;var P=0;if(s){var I=0,R=0,z=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=r[0].width,a=r[0].height;c.setTranslate(this,w[0],w[1]+u+f+a/2+t),t+=a,e=Math.max(e,h+n)})),I=Math.max(I,t);var r=e+f;R>0&&r+u+R>a._maxWidth&&(P=Math.max(P,R),R=0,z+=I+x,I=t),c.setTranslate(this,R,z),R+=r})),a._width=Math.max(P,R)+u,a._height=z+I+m}else{var N=r.size(),F=O+d+(N-1)*f<a._maxWidth,E=0,j=0,H=0,B=0;r.each((function(e){var t=e[0].height,r=h+e[0].width,n=(F?r:C)+f;n+u+j-f>=a._maxWidth&&(P=Math.max(P,B),j=0,H+=E,a._height+=E,E=0),c.setTranslate(this,w[0]+u+j,w[1]+u+H+t/2+f),B=j+r+f,j+=n,E=Math.max(E,t)})),F?(a._width=j+d,a._height=E+m):(a._width=Math.max(P,B)+d,a._height+=E+m)}}a._width=Math.ceil(Math.max(a._width+w[0],a._titleWidth+2*(u+p.titlePad))),a._height=Math.ceil(Math.max(a._height+w[1],a._titleHeight+2*(u+p.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var Y=e._context.edits,V=Y.legendText||Y.legendPosition;r.each((function(e){var t=n.select(this).select(".legendtoggle"),r=e[0].height,a=V?h:_||h+e[0].width;l||(a+=f/2),c.setRect(t,0,-r/2,a,r)}))}(e,R,z,t)},function(){var l,u,m,y,x=d._size,b=t.borderwidth;if(!h){if(function(e){var t=e._fullLayout.legend,r=A(t),n=L(t);return i.autoMargin(e,"legend",{x:t.x,y:t.y,l:t._width*g[r],r:t._width*v[r],b:t._effHeight*v[n],t:t._effHeight*g[n]})}(e))return;var w=x.l+x.w*t.x-g[A(t)]*t._width,M=x.t+x.h*(1-t.y)-g[L(t)]*t._effHeight;if(d.margin.autoexpand){var k=w,O=M;w=a.constrain(w,0,d.width-t._width),M=a.constrain(M,0,d.height-t._effHeight),w!==k&&a.log("Constrain legend.x to make legend fit inside graph"),M!==O&&a.log("Constrain legend.y to make legend fit inside graph")}c.setTranslate(T,w,M)}if(I.on(".drag",null),T.on("wheel",null),h||t._height<=t._maxHeight||e._context.staticPlot){var P=t._effHeight;h&&(P=t._height),D.attr({width:t._width-b,height:P-b,x:b/2,y:b/2}),c.setTranslate(C,0,0),S.select("rect").attr({width:t._width-2*b,height:P-2*b,x:b,y:b}),c.setClipUrl(C,f,e),c.setRect(I,0,0,0,0),delete t._scrollY}else{var R,z,N,F=Math.max(p.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),E=t._effHeight-F-2*p.scrollBarMargin,j=t._height-t._effHeight,H=E/j,B=Math.min(t._scrollY||0,j);D.attr({width:t._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:t._effHeight-b,x:b/2,y:b/2}),S.select("rect").attr({width:t._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:t._effHeight-2*b,x:b,y:b+B}),c.setClipUrl(C,f,e),U(B,F,H),T.on("wheel",(function(){U(B=a.constrain(t._scrollY+n.event.deltaY/E*j,0,j),F,H),0!==B&&B!==j&&n.event.preventDefault()}));var Y=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;R="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,N=B})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(z="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,U(B=function(e,t,r){var n=(r-t)/H+e;return a.constrain(n,0,j)}(N,R,z),F,H))}));I.call(Y);var V=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(R=e.changedTouches[0].clientY,N=B)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(z=e.changedTouches[0].clientY,U(B=function(e,t,r){var n=(t-r)/H+e;return a.constrain(n,0,j)}(N,R,z),F,H))}));C.call(V)}function U(r,n,a){t._scrollY=e._fullLayout.legend._scrollY=r,c.setTranslate(C,0,-r),c.setRect(I,t._width,p.scrollBarMargin+r*a,p.scrollBarWidth,n),S.select("rect").attr("y",b+r)}e._context.edits.legendPosition&&(T.classed("cursor-move",!0),s.init({element:T.node(),gd:e,prepFn:function(){var e=c.getTranslate(T);m=e.x,y=e.y},moveFn:function(e,r){var n=m+e,a=y+r;c.setTranslate(T,n,a),l=s.align(n,0,x.l,x.l+x.w,t.xanchor),u=s.align(a,0,x.t+x.h,x.t,t.yanchor)},doneFn:function(){void 0!==l&&void 0!==u&&o.call("_guiRelayout",e,{"legend.x":l,"legend.y":u})},clickFn:function(t,n){var a=r.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return n.clientX>=e.left&&n.clientX<=e.right&&n.clientY>=e.top&&n.clientY<=e.bottom}));a.size()>0&&_(e,T,a,t,n)}}))}],e)}(e,t)}},{"../../constants/alignment":207,"../../lib":232,"../../lib/events":225,"../../lib/svg_text_utils":255,"../../plots/plots":316,"../../registry":318,"../color":102,"../dragelement":121,"../drawing":124,"./constants":153,"./get_legend_data":156,"./handle_click":157,"./helpers":158,"./style":160,"@plotly/d3":11}],156:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("./helpers");t.exports=function(e,t){var r,i,o=t._inHover,l=a.isGrouped(t),s=a.isReversed(t),c={},u=[],d=!1,f={},p=0,h=0;function m(e,r){if(""!==e&&a.isGrouped(t))-1===u.indexOf(e)?(u.push(e),d=!0,c[e]=[r]):c[e].push(r);else{var n="~~i"+p;u.push(n),c[n]=[r],p++}}for(r=0;r<e.length;r++){var g=e[r],v=g[0],y=v.trace,x=y.legendgroup;if(o||y.visible&&y.showlegend)if(n.traceIs(y,"pie-like"))for(f[x]||(f[x]={}),i=0;i<g.length;i++){var b=g[i].label;f[x][b]||(m(x,{label:b,color:g[i].color,i:g[i].i,trace:y,pts:g[i].pts}),f[x][b]=!0,h=Math.max(h,(b||"").length))}else m(x,v),h=Math.max(h,(y.name||"").length)}if(!u.length)return[];var _=!d||!l,w=[];for(r=0;r<u.length;r++){var T=c[u[r]];_?w.push(T[0]):w.push(T)}for(_&&(w=[w]),r=0;r<w.length;r++){var M=1/0;for(i=0;i<w[r].length;i++){var k=w[r][i].trace.legendrank;M>k&&(M=k)}w[r][0]._groupMinRank=M,w[r][0]._preGroupSort=r}var A=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(w.forEach((function(e,t){e[0]._preGroupSort=t})),w.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),r=0;r<w.length;r++){w[r].forEach((function(e,t){e._preSort=t})),w[r].sort(A);var L=w[r][0].trace,S=null;for(i=0;i<w[r].length;i++){var D=w[r][i].trace.legendgrouptitle;if(D&&D.text){S=D,o&&(D.font=t._groupTitleFont);break}}if(s&&w[r].reverse(),S){var C=!1;for(i=0;i<w[r].length;i++)if(n.traceIs(w[r][i].trace,"pie-like")){C=!0;break}w[r].unshift({i:-1,groupTitle:S,noClick:C,trace:{showlegend:L.showlegend,legendgroup:L.legendgroup,visible:"toggleitem"===t.groupclick||L.visible}})}for(i=0;i<w[r].length;i++)w[r][i]=[w[r][i]]}return t._lgroupsLength=w.length,t._maxNameLength=h,w}},{"../../registry":318,"./helpers":158}],157:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=!0;t.exports=function(e,t,r){var o=t._fullLayout;if(!t._dragged&&!t._editing){var l,s=o.legend.itemclick,c=o.legend.itemdoubleclick,u=o.legend.groupclick;if(1===r&&"toggle"===s&&"toggleothers"===c&&i&&t.data&&t._context.showTips?(n.notifier(n._(t,"Double-click on legend to isolate one trace"),"long"),i=!1):i=!1,1===r?l=s:2===r&&(l=c),l){var d="togglegroup"===u,f=o.hiddenlabels?o.hiddenlabels.slice():[],p=e.data()[0][0];if(!p.groupTitle||!p.noClick){var h,m,g,v,y,x=t._fullData,b=p.trace,_=b.legendgroup,w={},T=[],M=[],k=[];if(a.traceIs(b,"pie-like")){var A=p.label,L=f.indexOf(A);"toggle"===l?-1===L?f.push(A):f.splice(L,1):"toggleothers"===l&&(f=[],t.calcdata[0].forEach((function(e){A!==e.label&&f.push(e.label)})),t._fullLayout.hiddenlabels&&t._fullLayout.hiddenlabels.length===f.length&&-1===L&&(f=[])),a.call("_guiRelayout",t,"hiddenlabels",f)}else{var S,D=_&&_.length,C=[];if(D)for(h=0;h<x.length;h++)(S=x[h]).visible&&S.legendgroup===_&&C.push(h);if("toggle"===l){var O;switch(b.visible){case!0:O="legendonly";break;case!1:O=!1;break;case"legendonly":O=!0}if(D)if(d)for(h=0;h<x.length;h++)!1!==x[h].visible&&x[h].legendgroup===_&&H(x[h],O);else H(b,O);else H(b,O)}else if("toggleothers"===l){var P,I,R,z,N=!0;for(h=0;h<x.length;h++)if(P=x[h]===b,R=!0!==x[h].showlegend,!(P||R||(I=D&&x[h].legendgroup===_)||!0!==x[h].visible||a.traceIs(x[h],"notLegendIsolatable"))){N=!1;break}for(h=0;h<x.length;h++)if(!1!==x[h].visible&&!a.traceIs(x[h],"notLegendIsolatable"))switch(b.visible){case"legendonly":H(x[h],!0);break;case!0:z=!!N||"legendonly",P=x[h]===b,R=!0!==x[h].showlegend&&!x[h].legendgroup,I=P||D&&x[h].legendgroup===_,H(x[h],!(!I&&!R)||z)}}for(h=0;h<M.length;h++)if(g=M[h]){var F=g.constructUpdate(),E=Object.keys(F);for(m=0;m<E.length;m++)v=E[m],(w[v]=w[v]||[])[k[h]]=F[v]}for(y=Object.keys(w),h=0;h<y.length;h++)for(v=y[h],m=0;m<T.length;m++)w[v].hasOwnProperty(m)||(w[v][m]=void 0);a.call("_guiRestyle",t,w,T)}}}}function j(e,t,r){var n=T.indexOf(e),a=w[t];return a||(a=w[t]=[]),-1===T.indexOf(e)&&(T.push(e),n=T.length-1),a[n]=r,n}function H(e,t){if(!p.groupTitle||d){var r=e._fullInput;if(a.hasTransform(r,"groupby")){var i=M[r.index];if(!i){var o=a.getTransformIndices(r,"groupby"),l=o[o.length-1];i=n.keyedContainer(r,"transforms["+l+"].styles","target","value.visible"),M[r.index]=i}var s=i.get(e._group);void 0===s&&(s=!0),!1!==s&&i.set(e._group,t),k[r.index]=j(r.index,"visible",!1!==r.visible)}else{var c=!1!==r.visible&&t;j(r.index,"visible",c)}}}}},{"../../lib":232,"../../registry":318}],158:[function(e,t,r){"use strict";r.isGrouped=function(e){return-1!==(e.traceorder||"").indexOf("grouped")},r.isVertical=function(e){return"h"!==e.orientation},r.isReversed=function(e){return-1!==(e.traceorder||"").indexOf("reversed")}},{}],159:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),draw:e("./draw"),style:e("./style")}},{"./attributes":152,"./defaults":154,"./draw":155,"./style":160}],160:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../registry"),i=e("../../lib"),o=i.strTranslate,l=e("../drawing"),s=e("../color"),c=e("../colorscale/helpers").extractOpts,u=e("../../traces/scatter/subtypes"),d=e("../../traces/pie/style_one"),f=e("../../traces/pie/helpers").castOption,p=e("./constants");function h(e,t){return(t?"radial":"horizontal")+(e?"":"reversed")}function m(e){var t=e[0].trace,r=t.contours,n=u.hasLines(t),a=u.hasMarkers(t),i=t.visible&&t.fill&&"none"!==t.fill,o=!1,l=!1;if(r){var s=r.coloring;"lines"===s?o=!0:n="none"===s||"heatmap"===s||r.showlines,"constraint"===r.type?i="="!==r._operation:"fill"!==s&&"heatmap"!==s||(l=!0)}return{showMarker:a,showLine:n,showFill:i,showGradientLine:o,showGradientFill:l,anyLine:n||o,anyFill:i||l}}function g(e,t,r){return e&&i.isArrayOrTypedArray(e)?t:e>r?r:e}t.exports=function(e,t,r){var v=t._fullLayout;r||(r=v.legend);var y="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(e,t,r,n){var a;if(e+1)a=e;else{if(!(t&&t.width>0))return 0;a=t.width}return y?n:Math.min(a,r)};function T(e,i,o){var u=e[0].trace,d=u.marker||{},f=d.line||{},p=o?u.visible&&u.type===o:a.traceIs(u,"bar"),h=n.select(i).select("g.legendpoints").selectAll("path.legend"+o).data(p?[e]:[]);h.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),h.exit().remove(),h.each((function(e){var a=n.select(this),i=e[0],o=w(i.mlw,d.line,5,2);a.style("stroke-width",o+"px");var p=i.mcc;if(!r._inHover&&"mc"in i){var h=c(d),m=h.mid;void 0===m&&(m=(h.max+h.min)/2),p=l.tryColorscale(d,"")(m)}var v=p||i.mc||d.color,y=d.pattern,x=y&&l.getPatternAttr(y.shape,0,"");if(x){var b=l.getPatternAttr(y.bgcolor,0,null),_=l.getPatternAttr(y.fgcolor,0,null),T=y.fgopacity,M=g(y.size,8,10),k=g(y.solidity,.5,1),A="legend-"+u.uid;a.call(l.pattern,"legend",t,A,x,M,k,p,y.fillmode,b,_,T)}else a.call(s.fill,v);o&&s.stroke(a,i.mlc||f.color)}))}function M(e,t,r){var o=e[0],l=o.trace,s=r?l.visible&&l.type===r:a.traceIs(l,r),c=n.select(t).select("g.legendpoints").selectAll("path.legend"+r).data(s?[e]:[]);if(c.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),c.exit().remove(),c.size()){var u=(l.marker||{}).line,p=w(f(u.width,o.pts),u,5,2),h=i.minExtend(l,{marker:{line:{width:p}}});h.marker.line.color=u.color;var m=i.minExtend(o,{trace:h});d(c,m,h)}}e.each((function(e){var t=n.select(this),a=i.ensureSingle(t,"g","layers");a.style("opacity",e[0].trace.opacity);var l=r.valign,s=e[0].lineHeight,c=e[0].height;if("middle"!==l&&s&&c){var u={top:1,bottom:-1}[l]*(.5*(s-c+3));a.attr("transform",o(0,u))}else a.attr("transform",null);a.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var d=a.selectAll("g.legendsymbols").data([e]);d.enter().append("g").classed("legendsymbols",!0),d.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var r,a=e[0].trace,o=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,o){var u,d=n.select(this),f=c(a),p=f.colorscale,m=f.reversescale;if(p){if(!r){var g=p.length;u=0===o?p[m?g-1:0][1]:1===o?p[m?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var v=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(v)?v[o]||v[0]:v}d.attr("d",e[0]),u?d.call(s.fill,u):d.call((function(e){if(e.size()){var n="legendfill-"+a.uid;l.gradient(e,t,n,h(m,"radial"===r),p,"fill")}}))}))})).each((function(e){var t=e[0].trace,r="waterfall"===t.type;if(e[0]._distinct&&r){var a=e[0].trace[e[0].dir].marker;return e[0].mc=a.color,e[0].mlw=a.line.width,e[0].mlc=a.line.color,T(e,this,"waterfall")}var i=[];t.visible&&r&&(i=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(i);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(e){var r=n.select(this),a=t[e[0]].marker,i=w(void 0,a.line,5,2);r.attr("d",e[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)}))})).each((function(e){T(e,this,"funnel")})).each((function(e){T(e,this)})).each((function(e){var r=e[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&a.traceIs(r,"box-violin")?[e]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var e=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=w(void 0,r.line,5,2);e.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(e,r.line.color)}else{var c=i.minExtend(r,{marker:{size:y?12:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(l.pointStyle,c,t)}}))})).each((function(e){M(e,this,"funnelarea")})).each((function(e){M(e,this,"pie")})).each((function(e){var r,a,o=m(e),s=o.showFill,d=o.showLine,f=o.showGradientLine,p=o.showGradientFill,g=o.anyFill,v=o.anyLine,y=e[0],b=y.trace,_=c(b),T=_.colorscale,M=_.reversescale,k=u.hasMarkers(b)||!g?"M5,0":v?"M5,-2":"M5,-3",A=n.select(this),L=A.select(".legendfill").selectAll("path").data(s||p?[e]:[]);if(L.enter().append("path").classed("js-fill",!0),L.exit().remove(),L.attr("d",k+"h"+x+"v6h-"+x+"z").call(s?l.fillGroupStyle:function(e){if(e.size()){var r="legendfill-"+b.uid;l.gradient(e,t,r,h(M),T,"fill")}}),d||f){var S=w(void 0,b.line,10,5);a=i.minExtend(b,{line:{width:S}}),r=[i.minExtend(y,{trace:a})]}var D=A.select(".legendlines").selectAll("path").data(d||f?[r]:[]);D.enter().append("path").classed("js-line",!0),D.exit().remove(),D.attr("d",k+(f?"l"+x+",0.0001":"h"+x)).call(d?l.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;l.lineGroupStyle(e),l.gradient(e,t,r,h(M),T,"stroke")}})})).each((function(e){var r,a,o=m(e),s=o.anyFill,c=o.anyLine,d=o.showLine,f=o.showMarker,p=e[0],h=p.trace,g=!f&&!c&&!s&&u.hasText(h);function v(e,t,r,n){var a=i.nestedProperty(h,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(y&&o&&void 0!==n&&(o=n),r){if(o<r[0])return r[0];if(o>r[1])return r[1]}return o}function x(e){return p._distinct&&p.index&&e[p.index]?e[p.index]:e[0]}if(f||g||d){var b={},w={};if(f){b.mc=v("marker.color",x),b.mx=v("marker.symbol",x),b.mo=v("marker.opacity",i.mean,[.2,1]),b.mlc=v("marker.line.color",x),b.mlw=v("marker.line.width",i.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=v("marker.size",i.mean,[2,16],12);b.ms=T,w.marker.size=T}d&&(w.line={width:v("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=v("textposition",x),b.ts=10,b.tc=v("textfont.color",x),b.tf=v("textfont.family",x)),r=[i.minExtend(p,b)],(a=i.minExtend(h,w)).selectedpoints=null,a.texttemplate=null}var M=n.select(this).select("g.legendpoints"),k=M.selectAll("path.scatterpts").data(f?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),k.exit().remove(),k.call(l.pointStyle,a,t),f&&(r[0].mrc=3);var A=M.selectAll("g.pointtext").data(g?r:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),A.exit().remove(),A.selectAll("text").call(l.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);r.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",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)}))})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("fill","none").call(l.dashLine,i.line.dash,o),o&&s.stroke(a,i.line.color)}))}))}},{"../../lib":232,"../../registry":318,"../../traces/pie/helpers":350,"../../traces/pie/style_one":356,"../../traces/scatter/subtypes":383,"../color":102,"../colorscale/helpers":113,"../drawing":124,"./constants":153,"@plotly/d3":11}],161:[function(e,t,r){"use strict";e("./constants");t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},{"./constants":163}],162:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../plots/plots"),i=e("../../plots/cartesian/axis_ids"),o=e("../../fonts/ploticon"),l=e("../shapes/draw").eraseActiveShape,s=e("../../lib"),c=s._,u=t.exports={};function d(e,t){var r,a,o=t.currentTarget,l=o.getAttribute("data-attr"),s=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},d=i.list(e,null,!0),f=c._cartesianSpikesEnabled;if("zoom"===l){var p,h="in"===s?.5:2,m=(1+h)/2,g=(1-h)/2;for(a=0;a<d.length;a++)if(!(r=d[a]).fixedrange)if(p=r._name,"auto"===s)u[p+".autorange"]=!0;else if("reset"===s){if(void 0===r._rangeInitial)u[p+".autorange"]=!0;else{var v=r._rangeInitial.slice();u[p+".range[0]"]=v[0],u[p+".range[1]"]=v[1]}void 0!==r._showSpikeInitial&&(u[p+".showspikes"]=r._showSpikeInitial,"on"!==f||r._showSpikeInitial||(f="off"))}else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],x=[m*y[0]+g*y[1],m*y[1]+g*y[0]];u[p+".range[0]"]=r.l2r(x[0]),u[p+".range[1]"]=r.l2r(x[1])}}else"hovermode"!==l||"x"!==s&&"y"!==s||(s=c._isHoriz?"y":"x",o.setAttribute("data-val",s)),u[l]=s;c._cartesianSpikesEnabled=f,n.call("_guiRelayout",e,u)}function f(e,t){for(var r=t.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,o=e._fullLayout._subplots.gl3d||[],l={},s=a.split("."),c=0;c<o.length;c++)l[o[c]+"."+s[1]]=i;var u="pan"===i?i:"zoom";l.dragmode=u,n.call("_guiRelayout",e,l)}function p(e,t){for(var r=t.currentTarget.getAttribute("data-attr"),a="resetLastSave"===r,i="resetDefault"===r,o=e._fullLayout,l=o._subplots.gl3d||[],s={},c=0;c<l.length;c++){var u,d=l[c],f=d+".camera",p=d+".aspectratio",h=d+".aspectmode",m=o[d]._scene;a?(s[f+".up"]=m.viewInitial.up,s[f+".eye"]=m.viewInitial.eye,s[f+".center"]=m.viewInitial.center,u=!0):i&&(s[f+".up"]=null,s[f+".eye"]=null,s[f+".center"]=null,u=!0),u&&(s[p+".x"]=m.viewInitial.aspectratio.x,s[p+".y"]=m.viewInitial.aspectratio.y,s[p+".z"]=m.viewInitial.aspectratio.z,s[h]=m.viewInitial.aspectmode)}n.call("_guiRelayout",e,s)}function h(e,t){var r=t.currentTarget,n=r._previousVal,a=e._fullLayout,i=a._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],l={},s={};if(n)s=n,r._previousVal=null;else{for(var c=0;c<i.length;c++){var u=i[c],d=a[u],f=u+".hovermode";l[f]=d.hovermode,s[f]=!1;for(var p=0;p<3;p++){var h=o[p],m=u+"."+h+".showspikes";s[m]=!1,l[m]=d[h].showspikes}}r._previousVal=l}return s}function m(e,t){for(var r=t.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,o=e._fullLayout,l=o._subplots.geo||[],s=0;s<l.length;s++){var c=l[s],u=o[c];if("zoom"===a){var d=u.projection.scale,f="in"===i?2*d:.5*d;n.call("_guiRelayout",e,c+".projection.scale",f)}}"reset"===a&&x(e,"geo")}function g(e){var t=e._fullLayout;return!t.hovermode&&(t._has("cartesian")?t._isHoriz?"y":"x":"closest")}function v(e){var t=g(e);n.call("_guiRelayout",e,"hovermode",t)}function y(e,t){for(var r=t.currentTarget.getAttribute("data-val"),a=e._fullLayout,i=a._subplots.mapbox||[],o={},l=0;l<i.length;l++){var s=i[l],c=a[s].zoom,u="in"===r?1.05*c:c/1.05;o[s+".zoom"]=u}n.call("_guiRelayout",e,o)}function x(e,t){for(var r=e._fullLayout,a=r._subplots[t]||[],i={},o=0;o<a.length;o++)for(var l=a[o],s=r[l]._subplot.viewInitial,c=Object.keys(s),u=0;u<c.length;u++){var d=c[u];i[l+"."+d]=s[d]}n.call("_guiRelayout",e,i)}u.toImage={name:"toImage",title:function(e){var t=(e._context.toImageButtonOptions||{}).format||"png";return c(e,"png"===t?"Download plot as a png":"Download plot")},icon:o.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};s.notifier(c(e,"Taking snapshot - this may take a few seconds"),"long"),"svg"!==r.format&&s.isIE()&&(s.notifier(c(e,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach((function(e){e in t&&(r[e]=t[e])})),n.call("downloadImage",e,r).then((function(t){s.notifier(c(e,"Snapshot succeeded")+" - "+t,"long")})).catch((function(){s.notifier(c(e,"Sorry, there was a problem downloading your snapshot!"),"long")}))}},u.sendDataToCloud={name:"sendDataToCloud",title:function(e){return c(e,"Edit in Chart Studio")},icon:o.disk,click:function(e){a.sendDataToCloud(e)}},u.editInChartStudio={name:"editInChartStudio",title:function(e){return c(e,"Edit in Chart Studio")},icon:o.pencil,click:function(e){a.sendDataToCloud(e)}},u.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return c(e,"Zoom")},attr:"dragmode",val:"zoom",icon:o.zoombox,click:d},u.pan2d={name:"pan2d",_cat:"pan",title:function(e){return c(e,"Pan")},attr:"dragmode",val:"pan",icon:o.pan,click:d},u.select2d={name:"select2d",_cat:"select",title:function(e){return c(e,"Box Select")},attr:"dragmode",val:"select",icon:o.selectbox,click:d},u.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return c(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:o.lasso,click:d},u.drawclosedpath={name:"drawclosedpath",title:function(e){return c(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:o.drawclosedpath,click:d},u.drawopenpath={name:"drawopenpath",title:function(e){return c(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:o.drawopenpath,click:d},u.drawline={name:"drawline",title:function(e){return c(e,"Draw line")},attr:"dragmode",val:"drawline",icon:o.drawline,click:d},u.drawrect={name:"drawrect",title:function(e){return c(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:o.drawrect,click:d},u.drawcircle={name:"drawcircle",title:function(e){return c(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:o.drawcircle,click:d},u.eraseshape={name:"eraseshape",title:function(e){return c(e,"Erase active shape")},icon:o.eraseshape,click:l},u.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return c(e,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:d},u.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:d},u.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return c(e,"Autoscale")},attr:"zoom",val:"auto",icon:o.autoscale,click:d},u.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return c(e,"Reset axes")},attr:"zoom",val:"reset",icon:o.home,click:d},u.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return c(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:d},u.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return c(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:o.tooltip_compare,gravity:"ne",click:d},u.zoom3d={name:"zoom3d",_cat:"zoom",title:function(e){return c(e,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:o.zoombox,click:f},u.pan3d={name:"pan3d",_cat:"pan",title:function(e){return c(e,"Pan")},attr:"scene.dragmode",val:"pan",icon:o.pan,click:f},u.orbitRotation={name:"orbitRotation",title:function(e){return c(e,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:o["3d_rotate"],click:f},u.tableRotation={name:"tableRotation",title:function(e){return c(e,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:o["z-axis"],click:f},u.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(e){return c(e,"Reset camera to default")},attr:"resetDefault",icon:o.home,click:p},u.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(e){return c(e,"Reset camera to last save")},attr:"resetLastSave",icon:o.movie,click:p},u.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(e,t){var r=h(e,t);n.call("_guiRelayout",e,r)}},u.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(e){return c(e,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:m},u.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:m},u.resetGeo={name:"resetGeo",_cat:"reset",title:function(e){return c(e,"Reset")},attr:"reset",val:null,icon:o.autoscale,click:m},u.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:v},u.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:v},u.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:v},u.resetViewSankey={name:"resetSankeyGroup",title:function(e){return c(e,"Reset view")},icon:o.home,click:function(e){for(var t={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<e._fullData.length;r++){var a=e._fullData[r]._viewInitial;t["node.groups"].push(a.node.groups.slice()),t["node.x"].push(a.node.x.slice()),t["node.y"].push(a.node.y.slice())}n.call("restyle",e,t)}},u.toggleHover={name:"toggleHover",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(e,t){var r=h(e,t);r.hovermode=g(e),n.call("_guiRelayout",e,r)}},u.resetViews={name:"resetViews",title:function(e){return c(e,"Reset views")},icon:o.home,click:function(e,t){var r=t.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),d(e,t),r.setAttribute("data-attr","resetLastSave"),p(e,t),x(e,"geo"),x(e,"mapbox")}},u.toggleSpikelines={name:"toggleSpikelines",title:function(e){return c(e,"Toggle Spike Lines")},icon:o.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(e){var t=e._fullLayout,r=t._cartesianSpikesEnabled;t._cartesianSpikesEnabled="on"===r?"off":"on",n.call("_guiRelayout",e,function(e){for(var t="on"===e._fullLayout._cartesianSpikesEnabled,r=i.list(e,null,!0),n={},a=0;a<r.length;a++){var o=r[a];n[o._name+".showspikes"]=!!t||o._showSpikeInitial}return n}(e))}},u.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(e){return c(e,"Reset view")},attr:"reset",icon:o.home,click:function(e){x(e,"mapbox")}},u.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(e){return c(e,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:y},u.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:y}},{"../../fonts/ploticon":215,"../../lib":232,"../../plots/cartesian/axis_ids":283,"../../plots/plots":316,"../../registry":318,"../shapes/draw":186}],163:[function(e,t,r){"use strict";var n=e("./buttons"),a=Object.keys(n),i=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],o=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(i),l=[];a.forEach((function(e){!function(e){if(-1===o.indexOf(e._cat||e.name)){var t=e.name,r=(e._cat||e.name).toLowerCase();-1===l.indexOf(t)&&l.push(t),-1===l.indexOf(r)&&l.push(r)}}(n[e])})),l.sort(),t.exports={DRAW_MODES:i,backButtons:o,foreButtons:l}},{"./buttons":162}],164:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../color"),i=e("../../plot_api/plot_template"),o=e("./attributes");t.exports=function(e,t){var r=e.modebar||{},l=i.newContainer(t,"modebar");function s(e,t){return n.coerce(r,l,o,e,t)}s("orientation"),s("bgcolor",a.addOpacity(t.paper_bgcolor,.5));var c=a.contrast(a.rgb(t.modebar.bgcolor));s("color",a.addOpacity(c,.3)),s("activecolor",a.addOpacity(c,.7)),s("uirevision",t.uirevision),s("add"),s("remove")}},{"../../lib":232,"../../plot_api/plot_template":268,"../color":102,"./attributes":161}],165:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),manage:e("./manage")}},{"./attributes":161,"./defaults":164,"./manage":166}],166:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axis_ids"),a=e("../../traces/scatter/subtypes"),i=e("../../registry"),o=e("../fx/helpers").isUnifiedHover,l=e("./modebar"),s=e("./buttons"),c=e("./constants").DRAW_MODES;t.exports=function(e){var t=e._fullLayout,r=e._context,u=t._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var d,f=r.modeBarButtons;d=Array.isArray(f)&&f.length?function(e){for(var t=0;t<e.length;t++)for(var r=e[t],n=0;n<r.length;n++){var a=r[n];if("string"==typeof a){if(void 0===s[a])throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));e[t][n]=s[a]}}return e}(f):!r.displayModeBar&&r.watermark?[]:function(e){var t=e._fullLayout,r=e._fullData,l=e._context;function u(e,t){if("string"==typeof t){if(t.toLowerCase()===e.toLowerCase())return!0}else{var r=t.name,n=t._cat||t.name;if(r===e||n===e.toLowerCase())return!0}return!1}var d=t.modebar.add;"string"==typeof d&&(d=[d]);var f=t.modebar.remove;"string"==typeof f&&(f=[f]);var p=l.modeBarButtonsToAdd.concat(d.filter((function(e){for(var t=0;t<l.modeBarButtonsToRemove.length;t++)if(u(e,l.modeBarButtonsToRemove[t]))return!1;return!0}))),h=l.modeBarButtonsToRemove.concat(f.filter((function(e){for(var t=0;t<l.modeBarButtonsToAdd.length;t++)if(u(e,l.modeBarButtonsToAdd[t]))return!1;return!0}))),m=t._has("cartesian"),g=t._has("gl3d"),v=t._has("geo"),y=t._has("pie"),x=t._has("funnelarea"),b=t._has("gl2d"),_=t._has("ternary"),w=t._has("mapbox"),T=t._has("polar"),M=t._has("smith"),k=t._has("sankey"),A=function(e){for(var t=n.list({_fullLayout:e},null,!0),r=0;r<t.length;r++)if(!t[r].fixedrange)return!1;return!0}(t),L=o(t.hovermode),S=[];function D(e){if(e.length){for(var t=[],r=0;r<e.length;r++){for(var n=e[r],a=s[n],i=a.name.toLowerCase(),o=(a._cat||a.name).toLowerCase(),l=!1,c=0;c<h.length;c++){var u=h[c].toLowerCase();if(u===i||u===o){l=!0;break}}l||t.push(s[n])}S.push(t)}}var C=["toImage"];l.showEditInChartStudio?C.push("editInChartStudio"):l.showSendToCloud&&C.push("sendDataToCloud");D(C);var O=[],P=[],I=[],R=[];(m||b||y||x||_)+v+g+w+T+M>1?(P=["toggleHover"],I=["resetViews"]):v?(O=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],I=["resetGeo"]):g?(P=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(O=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],I=["resetViewMapbox"]):b?P=["hoverClosestGl2d"]:y?P=["hoverClosestPie"]:k?(P=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):P=["toggleHover"];m&&(P=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]);(function(e){for(var t=0;t<e.length;t++)if(!i.traceIs(e[t],"noHover"))return!1;return!0}(r)||L)&&(P=[]);!m&&!b||A||(O=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==I[0]&&(I=["resetScale2d"]));g?R=["zoom3d","pan3d","orbitRotation","tableRotation"]:(m||b)&&!A||_?R=["zoom2d","pan2d"]:w||v?R=["pan2d"]:T&&(R=["zoom2d"]);(function(e){for(var t=!1,r=0;r<e.length&&!t;r++){var n=e[r];n._module&&n._module.selectPoints&&(i.traceIs(n,"scatter-like")?(a.hasMarkers(n)||a.hasText(n))&&(t=!0):i.traceIs(n,"box-violin")&&"all"!==n.boxpoints&&"all"!==n.points||(t=!0))}return t})(r)&&R.push("select2d","lasso2d");var z=[],N=function(e){-1===z.indexOf(e)&&-1!==P.indexOf(e)&&z.push(e)};if(Array.isArray(p)){for(var F=[],E=0;E<p.length;E++){var j=p[E];"string"==typeof j?(j=j.toLowerCase(),-1!==c.indexOf(j)?(t._has("mapbox")||t._has("cartesian"))&&R.push(j):"togglespikelines"===j?N("toggleSpikelines"):"togglehover"===j?N("toggleHover"):"hovercompare"===j?N("hoverCompareCartesian"):"hoverclosest"===j?(N("hoverClosestCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestGl2d"),N("hoverClosestPie")):"v1hovermode"===j&&(N("toggleHover"),N("hoverClosestCartesian"),N("hoverCompareCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestGl2d"),N("hoverClosestPie"))):F.push(j)}p=F}return D(R),D(O.concat(I)),D(z),function(e,t){if(t.length)if(Array.isArray(t[0]))for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t);return e}(S,p)}(e),u?u.update(e,d):t._modeBar=l(e,d)}else u&&(u.destroy(),delete t._modeBar)}},{"../../plots/cartesian/axis_ids":283,"../../registry":318,"../../traces/scatter/subtypes":383,"../fx/helpers":138,"./buttons":162,"./constants":163,"./modebar":167}],167:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=e("../../fonts/ploticon"),l=new DOMParser;function s(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var c=s.prototype;c.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this._uid=a,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",t=t.reverse());var o=n.modebar,l="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";i.deleteRelatedStyleRule(a),i.addRelatedStyleRule(a,l+"#"+a+" .modebar-group","background-color: "+o.bgcolor),i.addRelatedStyleRule(a,"#"+a+" .modebar-btn .icon path","fill: "+o.color),i.addRelatedStyleRule(a,"#"+a+" .modebar-btn:hover .icon path","fill: "+o.activecolor),i.addRelatedStyleRule(a,"#"+a+" .modebar-btn.active .icon path","fill: "+o.activecolor);var s=!this.hasButtons(t),c=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||c||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var d=this.getLogo();r.watermark&&(d.className=d.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(d,this.element.childNodes[0]):this.element.appendChild(d),this.hasLogo=!0}this.updateActiveButton()},c.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(e){var r=t.createGroup();e.forEach((function(e){var n=e.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");t.buttonsNames.push(n);var a=t.createButton(e);t.buttonElements.push(a),r.appendChild(a)})),t.element.appendChild(r)}))},c.createGroup=function(){var e=document.createElement("div");return e.className="modebar-group",e},c.createButton=function(e){var t=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var a=e.title;void 0===a?a=e.name:"function"==typeof a&&(a=a(this.graphInfo)),(a||0===a)&&r.setAttribute("data-title",a),void 0!==e.attr&&r.setAttribute("data-attr",e.attr);var i=e.val;if(void 0!==i&&("function"==typeof i&&(i=i(this.graphInfo)),r.setAttribute("data-val",i)),"function"!=typeof e.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&n.select(r).classed("active",!0);var l=e.icon;return"function"==typeof l?r.appendChild(l()):r.appendChild(this.createIcon(l||o.question)),r.setAttribute("data-gravity",e.gravity||"n"),r},c.createIcon=function(e){var t,r=a(e.height)?Number(e.height):e.ascent-e.descent,n="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,e.width,r].join(" ")),t.setAttribute("class","icon");var i=document.createElementNS(n,"path");i.setAttribute("d",e.path),e.transform?i.setAttribute("transform",e.transform):void 0!==e.ascent&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(i)}e.svg&&(t=l.parseFromString(e.svg,"application/xml").childNodes[0]);return t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},c.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach((function(e){var a=e.getAttribute("data-val")||!0,o=e.getAttribute("data-attr"),l="true"===e.getAttribute("data-toggle"),s=n.select(e);if(l)o===r&&s.classed("active",!s.classed("active"));else{var c=null===o?o:i.nestedProperty(t,o).get();s.classed("active",c===a)}}))},c.hasButtons=function(e){var t=this.buttons;if(!t)return!1;if(e.length!==t.length)return!1;for(var r=0;r<e.length;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;n<e[r].length;n++)if(e[r][n].name!==t[r][n].name)return!1}return!0},c.getLogo=function(){var e=this.createGroup(),t=document.createElement("a");return t.href="https://plotly.com/",t.target="_blank",t.setAttribute("data-title",i._(this.graphInfo,"Produced with Plotly")),t.className="modebar-btn plotlyjsicon modebar-btn--logo",t.appendChild(this.createIcon(o.newplotlylogo)),e.appendChild(t),e},c.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},c.destroy=function(){i.removeElement(this.container.querySelector(".modebar")),i.deleteRelatedStyleRule(this._uid)},t.exports=function(e,t){var r=e._fullLayout,a=new s({graphInfo:e,container:r._modebardiv.node(),buttons:t});return r._privateplot&&n.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}},{"../../fonts/ploticon":215,"../../lib":232,"@plotly/d3":11,"fast-isnumeric":17}],168:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../color/attributes"),i=(0,e("../../plot_api/plot_template").templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});t.exports={visible:{valType:"boolean",editType:"plot"},buttons:i,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:n({editType:"plot"}),bgcolor:{valType:"color",dflt:a.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:a.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},{"../../plot_api/plot_template":268,"../../plots/font_attributes":310,"../color/attributes":101}],169:[function(e,t,r){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],170:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../color"),i=e("../../plot_api/plot_template"),o=e("../../plots/array_container_defaults"),l=e("./attributes"),s=e("./constants");function c(e,t,r,a){var i=a.calendar;function o(r,a){return n.coerce(e,t,l.buttons,r,a)}if(o("visible")){var s=o("step");"all"!==s&&(!i||"gregorian"===i||"month"!==s&&"year"!==s?o("stepmode"):t.stepmode="backward",o("count")),o("label")}}t.exports=function(e,t,r,u,d){var f=e.rangeselector||{},p=i.newContainer(t,"rangeselector");function h(e,t){return n.coerce(f,p,l,e,t)}if(h("visible",o(f,p,{name:"buttons",handleItemDefaults:c,calendar:d}).length>0)){var m=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),a=0,i=0;i<n.length;i++){var o=t[n[i]].domain;o&&(a=Math.max(o[1],a))}return[e.domain[0],a+s.yPad]}(t,r,u);h("x",m[0]),h("y",m[1]),n.noneOrAll(e,t,["x","y"]),h("xanchor"),h("yanchor"),n.coerceFont(h,"font",r.font);var g=h("bgcolor");h("activecolor",a.contrast(g,s.lightAmount,s.darkAmount)),h("bordercolor"),h("borderwidth")}}},{"../../lib":232,"../../plot_api/plot_template":268,"../../plots/array_container_defaults":274,"../color":102,"./attributes":168,"./constants":169}],171:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../registry"),i=e("../../plots/plots"),o=e("../color"),l=e("../drawing"),s=e("../../lib"),c=s.strTranslate,u=e("../../lib/svg_text_utils"),d=e("../../plots/cartesian/axis_ids"),f=e("../../constants/alignment"),p=f.LINE_SPACING,h=f.FROM_TL,m=f.FROM_BR,g=e("./constants"),v=e("./get_update_object");function y(e){return e._id}function x(e,t,r){var n=s.ensureSingle(e,"rect","selector-rect",(function(e){e.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(o.stroke,t.bordercolor).call(o.fill,function(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}(t,r)).style("stroke-width",t.borderwidth+"px")}function b(e,t,r,n){s.ensureSingle(e,"text","selector-text",(function(e){e.attr("text-anchor","middle")})).call(l.font,t.font).text(function(e,t){if(e.label)return t?s.templateString(e.label,t):e.label;return"all"===e.step?"all":e.count+e.step.charAt(0)}(r,n._fullLayout._meta)).call((function(e){u.convertToTspans(e,n)}))}t.exports=function(e){var t=e._fullLayout._infolayer.selectAll(".rangeselector").data(function(e){for(var t=d.list(e,"x",!0),r=[],n=0;n<t.length;n++){var a=t[n];a.rangeselector&&a.rangeselector.visible&&r.push(a)}return r}(e),y);t.enter().append("g").classed("rangeselector",!0),t.exit().remove(),t.style({cursor:"pointer","pointer-events":"all"}),t.each((function(t){var r=n.select(this),o=t,d=o.rangeselector,f=r.selectAll("g.button").data(s.filterVisible(d.buttons));f.enter().append("g").classed("button",!0),f.exit().remove(),f.each((function(t){var r=n.select(this),i=v(o,t);t._isActive=function(e,t,r){if("all"===t.step)return!0===e.autorange;var n=Object.keys(r);return e.range[0]===r[n[0]]&&e.range[1]===r[n[1]]}(o,t,i),r.call(x,d,t),r.call(b,d,t,e),r.on("click",(function(){e._dragged||a.call("_guiRelayout",e,i)})),r.on("mouseover",(function(){t._isHovered=!0,r.call(x,d,t)})),r.on("mouseout",(function(){t._isHovered=!1,r.call(x,d,t)}))})),function(e,t,r,a,o){var d=0,f=0,v=r.borderwidth;t.each((function(){var e=n.select(this).select(".selector-text"),t=r.font.size*p,a=Math.max(t*u.lineCount(e),16)+3;f=Math.max(f,a)})),t.each((function(){var e=n.select(this),t=e.select(".selector-rect"),a=e.select(".selector-text"),i=a.node()&&l.bBox(a.node()).width,o=r.font.size*p,s=u.lineCount(a),h=Math.max(i+10,g.minButtonWidth);e.attr("transform",c(v+d,v)),t.attr({x:0,y:0,width:h,height:f}),u.positionText(a,h/2,f/2-(s-1)*o/2+3),d+=h+5}));var y=e._fullLayout._size,x=y.l+y.w*r.x,b=y.t+y.h*(1-r.y),_="left";s.isRightAnchor(r)&&(x-=d,_="right");s.isCenterAnchor(r)&&(x-=d/2,_="center");var w="top";s.isBottomAnchor(r)&&(b-=f,w="bottom");s.isMiddleAnchor(r)&&(b-=f/2,w="middle");d=Math.ceil(d),f=Math.ceil(f),x=Math.round(x),b=Math.round(b),i.autoMargin(e,a+"-range-selector",{x:r.x,y:r.y,l:d*h[_],r:d*m[_],b:f*m[w],t:f*h[w]}),o.attr("transform",c(x,b))}(e,f,d,o._name,r)}))}},{"../../constants/alignment":207,"../../lib":232,"../../lib/svg_text_utils":255,"../../plots/cartesian/axis_ids":283,"../../plots/plots":316,"../../registry":318,"../color":102,"../drawing":124,"./constants":169,"./get_update_object":172,"@plotly/d3":11}],172:[function(e,t,r){"use strict";var n=e("d3-time"),a=e("../../lib").titleCase;t.exports=function(e,t){var r=e._name,i={};if("all"===t.step)i[r+".autorange"]=!0;else{var o=function(e,t){var r,i=e.range,o=new Date(e.r2l(i[1])),l=t.step,s=n["utc"+a(l)],c=t.count;switch(t.stepmode){case"backward":r=e.l2r(+s.offset(o,-c));break;case"todate":var u=s.offset(o,-c);r=e.l2r(+s.ceil(u))}var d=i[1];return[r,d]}(e,t);i[r+".range[0]"]=o[0],i[r+".range[1]"]=o[1]}return i}},{"../../lib":232,"d3-time":16}],173:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),draw:e("./draw")}},{"./attributes":168,"./defaults":170,"./draw":171}],174:[function(e,t,r){"use strict";var n=e("../color/attributes");t.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot"},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},{"../color/attributes":101}],175:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axis_ids").list,a=e("../../plots/cartesian/autorange").getAutoRange,i=e("./constants");t.exports=function(e){for(var t=n(e,"x",!0),r=0;r<t.length;r++){var o=t[r],l=o[i.name];l&&l.visible&&l.autorange&&(l._input.autorange=!0,l._input.range=l.range=a(e,o))}}},{"../../plots/cartesian/autorange":278,"../../plots/cartesian/axis_ids":283,"./constants":176}],176:[function(e,t,r){"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}},{}],177:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plot_api/plot_template"),i=e("../../plots/cartesian/axis_ids"),o=e("./attributes"),l=e("./oppaxis_attributes");t.exports=function(e,t,r){var s=e[r],c=t[r];if(s.rangeslider||t._requestRangeslider[c._id]){n.isPlainObject(s.rangeslider)||(s.rangeslider={});var u,d,f=s.rangeslider,p=a.newContainer(c,"rangeslider");if(_("visible")){_("bgcolor",t.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),_("autorange",!c.isValidRange(f.range)),_("range");var h=t._subplots;if(h)for(var m=h.cartesian.filter((function(e){return e.substr(0,e.indexOf("y"))===i.name2id(r)})).map((function(e){return e.substr(e.indexOf("y"),e.length)})),g=n.simpleMap(m,i.id2name),v=0;v<g.length;v++){var y=g[v];u=f[y]||{},d=a.newContainer(p,y,"yaxis");var x,b=t[y];u.range&&b.isValidRange(u.range)&&(x="fixed"),"match"!==w("rangemode",x)&&w("range",b.range.slice())}p._input=f}}function _(e,t){return n.coerce(f,p,o,e,t)}function w(e,t){return n.coerce(u,d,l,e,t)}}},{"../../lib":232,"../../plot_api/plot_template":268,"../../plots/cartesian/axis_ids":283,"./attributes":174,"./oppaxis_attributes":181}],178:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../registry"),i=e("../../plots/plots"),o=e("../../lib"),l=o.strTranslate,s=e("../drawing"),c=e("../color"),u=e("../titles"),d=e("../../plots/cartesian"),f=e("../../plots/cartesian/axis_ids"),p=e("../dragelement"),h=e("../../lib/setcursor"),m=e("./constants");function g(e,t,r,n){var a=o.ensureSingle(e,"rect",m.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),i=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,c=-n._offsetShift,u=s.crispRound(t,n.borderwidth);a.attr({width:n._width+i,height:n._height+i,transform:l(c,c),fill:n.bgcolor,stroke:n.bordercolor,"stroke-width":u})}function v(e,t,r,n){var a=t._fullLayout;o.ensureSingleById(a._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function y(e,t,r,a){var l,c=t.calcdata,u=e.selectAll("g."+m.rangePlotClassName).data(r._subplotsWith,o.identity);u.enter().append("g").attr("class",(function(e){return m.rangePlotClassName+" "+e})).call(s.setClipUrl,a._clipId,t),u.order(),u.exit().remove(),u.each((function(e,o){var s=n.select(this),u=0===o,p=f.getFromId(t,e,"y"),h=p._name,m=a[h],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:a.range.slice(),calendar:r.calendar},width:a._width,height:a._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[h]={type:p.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():p.range.slice(),calendar:p.calendar},p.rangebreaks&&(g.layout[h].rangebreaks=p.rangebreaks),i.supplyDefaults(g);var v=g._fullLayout.xaxis,y=g._fullLayout[h];v.clearCalc(),v.setScale(),y.clearCalc(),y.setScale();var x={id:e,plotgroup:s,xaxis:v,yaxis:y,isRangePlot:!0};u?l=x:(x.mainplot="xy",x.mainplotinfo=l),d.rangePlot(t,x,function(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n],i=a[0].trace;i.xaxis+i.yaxis===t&&r.push(a)}return r}(c,e))}))}function x(e,t,r,n,a){(o.ensureSingle(e,"rect",m.maskMinClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(c.fill,m.maskColor),o.ensureSingle(e,"rect",m.maskMaxClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(c.fill,m.maskColor),"match"!==a.rangemode)&&(o.ensureSingle(e,"rect",m.maskMinOppAxisClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).call(c.fill,m.maskOppAxisColor),o.ensureSingle(e,"rect",m.maskMaxOppAxisClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).style("border-top",m.maskOppBorder).call(c.fill,m.maskOppAxisColor))}function b(e,t,r,n){t._context.staticPlot||o.ensureSingle(e,"rect",m.slideBoxClassName,(function(e){e.attr({y:0,cursor:m.slideBoxCursor,"shape-rendering":"crispEdges"})})).attr({height:n._height,fill:m.slideBoxFill})}function _(e,t,r,n){var a=o.ensureSingle(e,"g",m.grabberMinClassName),i=o.ensureSingle(e,"g",m.grabberMaxClassName),l={x:0,width:m.handleWidth,rx:m.handleRadius,fill:c.background,stroke:c.defaultLine,"stroke-width":m.handleStrokeWidth,"shape-rendering":"crispEdges"},s={y:Math.round(n._height/4),height:Math.round(n._height/2)};o.ensureSingle(a,"rect",m.handleMinClassName,(function(e){e.attr(l)})).attr(s),o.ensureSingle(i,"rect",m.handleMaxClassName,(function(e){e.attr(l)})).attr(s);var u={width:m.grabAreaWidth,x:0,y:0,fill:m.grabAreaFill,cursor:t._context.staticPlot?void 0:m.grabAreaCursor};o.ensureSingle(a,"rect",m.grabAreaMinClassName,(function(e){e.attr(u)})).attr("height",n._height),o.ensureSingle(i,"rect",m.grabAreaMaxClassName,(function(e){e.attr(u)})).attr("height",n._height)}t.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,i=0;i<r.length;i++){var s=r[i][m.name];s._clipId=s._id+"-"+t._uid}var c=t._infolayer.selectAll("g."+m.containerClassName).data(r,(function(e){return e._name}));c.exit().each((function(e){var r=e[m.name];t._topdefs.select("#"+r._clipId).remove()})).remove(),0!==r.length&&(c.enter().append("g").classed(m.containerClassName,!0).attr("pointer-events","all"),c.each((function(r){var i=n.select(this),s=r[m.name],c=t[f.id2name(r.anchor)],d=s[f.id2name(r.anchor)];if(s.range){var w,T=o.simpleMap(s.range,r.r2l),M=o.simpleMap(r.range,r.r2l);w=M[0]<M[1]?[Math.min(T[0],M[0]),Math.max(T[1],M[1])]:[Math.max(T[0],M[0]),Math.min(T[1],M[1])],s.range=s._input.range=o.simpleMap(w,r.l2r)}r.cleanRange("rangeslider.range");var k=t._size,A=r.domain;s._width=k.w*(A[1]-A[0]);var L=Math.round(k.l+k.w*A[0]),S=Math.round(k.t+k.h*(1-r._counterDomainMin)+("bottom"===r.side?r._depth:0)+s._offsetShift+m.extraPad);i.attr("transform",l(L,S)),s._rl=o.simpleMap(s.range,r.r2l);var D=s._rl[0],C=s._rl[1],O=C-D;if(s.p2d=function(e){return e/s._width*O+D},s.d2p=function(e){return(e-D)/O*s._width},r.rangebreaks){var P=r.locateBreaks(D,C);if(P.length){var I,R,z=0;for(I=0;I<P.length;I++)z+=(R=P[I]).max-R.min;var N=s._width/(C-D-z),F=[-N*D];for(I=0;I<P.length;I++)R=P[I],F.push(F[F.length-1]-N*(R.max-R.min));for(s.d2p=function(e){for(var t=F[0],r=0;r<P.length;r++){var n=P[r];if(e>=n.max)t=F[r+1];else if(e<n.min)break}return t+N*e},I=0;I<P.length;I++)(R=P[I]).pmin=s.d2p(R.min),R.pmax=s.d2p(R.max);s.p2d=function(e){for(var t=F[0],r=0;r<P.length;r++){var n=P[r];if(e>=n.pmax)t=F[r+1];else if(e<n.pmin)break}return(e-t)/N}}}if("match"!==d.rangemode){var E=c.r2l(d.range[0]),j=c.r2l(d.range[1])-E;s.d2pOppAxis=function(e){return(e-E)/j*s._height}}i.call(g,e,r,s).call(v,e,r,s).call(y,e,r,s).call(x,e,r,s,d).call(b,e,r,s).call(_,e,r,s),function(e,t,r,i){if(t._context.staticPlot)return;var l=e.select("rect."+m.slideBoxClassName).node(),s=e.select("rect."+m.grabAreaMinClassName).node(),c=e.select("rect."+m.grabAreaMaxClassName).node();function u(){var u=n.event,d=u.target,f=u.clientX||u.touches[0].clientX,m=f-e.node().getBoundingClientRect().left,g=i.d2p(r._rl[0]),v=i.d2p(r._rl[1]),y=p.coverSlip();function x(e){var u,p,x,b=+(e.clientX||e.touches[0].clientX)-f;switch(d){case l:x="ew-resize",u=g+b,p=v+b;break;case s:x="col-resize",u=g+b,p=v;break;case c:x="col-resize",u=g,p=v+b;break;default:x="ew-resize",u=m,p=m+b}if(p<u){var _=p;p=u,u=_}i._pixelMin=u,i._pixelMax=p,h(n.select(y),x),function(e,t,r,n){function i(e){return r.l2r(o.constrain(e,n._rl[0],n._rl[1]))}var l=i(n.p2d(n._pixelMin)),s=i(n.p2d(n._pixelMax));window.requestAnimationFrame((function(){a.call("_guiRelayout",t,r._name+".range",[l,s])}))}(0,t,r,i)}function b(){y.removeEventListener("mousemove",x),y.removeEventListener("mouseup",b),this.removeEventListener("touchmove",x),this.removeEventListener("touchend",b),o.removeElement(y)}this.addEventListener("touchmove",x),this.addEventListener("touchend",b),y.addEventListener("mousemove",x),y.addEventListener("mouseup",b)}e.on("mousedown",u),e.on("touchstart",u)}(i,e,r,s),function(e,t,r,n,a,i){var s=m.handleWidth/2;function c(e){return o.constrain(e,0,n._width)}function u(e){return o.constrain(e,0,n._height)}function d(e){return o.constrain(e,-s,n._width+s)}var f=c(n.d2p(r._rl[0])),p=c(n.d2p(r._rl[1]));if(e.select("rect."+m.slideBoxClassName).attr("x",f).attr("width",p-f),e.select("rect."+m.maskMinClassName).attr("width",f),e.select("rect."+m.maskMaxClassName).attr("x",p).attr("width",n._width-p),"match"!==i.rangemode){var h=n._height-u(n.d2pOppAxis(a._rl[1])),g=n._height-u(n.d2pOppAxis(a._rl[0]));e.select("rect."+m.maskMinOppAxisClassName).attr("x",f).attr("height",h).attr("width",p-f),e.select("rect."+m.maskMaxOppAxisClassName).attr("x",f).attr("y",g).attr("height",n._height-g).attr("width",p-f),e.select("rect."+m.slideBoxClassName).attr("y",h).attr("height",g-h)}var v=Math.round(d(f-s))-.5,y=Math.round(d(p-s))+.5;e.select("g."+m.grabberMinClassName).attr("transform",l(v,.5)),e.select("g."+m.grabberMaxClassName).attr("transform",l(y,.5))}(i,0,r,s,c,d),"bottom"===r.side&&u.draw(e,r._id+"title",{propContainer:r,propName:r._name+".title",placeholder:t._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:S+s._height+s._offsetShift+10+1.5*r.title.font.size,"text-anchor":"middle"}})})))}},{"../../lib":232,"../../lib/setcursor":252,"../../plots/cartesian":293,"../../plots/cartesian/axis_ids":283,"../../plots/plots":316,"../../registry":318,"../color":102,"../dragelement":121,"../drawing":124,"../titles":200,"./constants":176,"@plotly/d3":11}],179:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axis_ids"),a=e("../../lib/svg_text_utils"),i=e("./constants"),o=e("../../constants/alignment").LINE_SPACING,l=i.name;function s(e){var t=e&&e[l];return t&&t.visible}r.isVisible=s,r.makeData=function(e){var t=n.list({_fullLayout:e},"x",!0),r=e.margin,a=[];if(!e._has("gl2d"))for(var i=0;i<t.length;i++){var o=t[i];if(s(o)){a.push(o);var c=o[l];c._id=l+o._id,c._height=(e.height-r.b-r.t)*c.thickness,c._offsetShift=Math.floor(c.borderwidth/2)}}e._rangeSliderData=a},r.autoMarginOpts=function(e,t){var r=e._fullLayout,n=t[l],s=t._id.charAt(0),c=0,u=0;"bottom"===t.side&&(c=t._depth,t.title.text!==r._dfltTitle[s]&&(u=1.5*t.title.font.size+10+n._offsetShift,u+=(t.title.text.match(a.BR_TAG_ALL)||[]).length*t.title.font.size*o));return{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:n._height+c+Math.max(r.margin.b,u),pad:i.extraPad+2*n._offsetShift}}},{"../../constants/alignment":207,"../../lib/svg_text_utils":255,"../../plots/cartesian/axis_ids":283,"./constants":176}],180:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("./oppaxis_attributes"),o=e("./helpers");t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},a,{yaxis:i})}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),calcAutorange:e("./calc_autorange"),draw:e("./draw"),isVisible:o.isVisible,makeData:o.makeData,autoMarginOpts:o.autoMarginOpts}},{"../../lib":232,"./attributes":174,"./calc_autorange":175,"./defaults":177,"./draw":178,"./helpers":179,"./oppaxis_attributes":181}],181:[function(e,t,r){"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},{}],182:[function(e,t,r){"use strict";var n=e("../annotations/attributes"),a=e("../../traces/scatter/attributes").line,i=e("../drawing/attributes").dash,o=e("../../lib/extend").extendFlat,l=e("../../plot_api/plot_template").templatedArray;e("../../constants/axis_placeable_objects");t.exports=l("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:o({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:o({},n.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:o({},a.color,{editType:"arraydraw"}),width:o({},a.width,{editType:"calc+arraydraw"}),dash:o({},i,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},editType:"arraydraw"})},{"../../constants/axis_placeable_objects":208,"../../lib/extend":226,"../../plot_api/plot_template":268,"../../traces/scatter/attributes":358,"../annotations/attributes":85,"../drawing/attributes":123}],183:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("./constants"),o=e("./helpers");function l(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function s(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,r,a,l,s){var c=e/2,u=s;if("pixel"===t){var d=l?o.extractPathCoords(l,s?i.paramIsY:i.paramIsX):[r,a],f=n.aggNums(Math.max,null,d),p=n.aggNums(Math.min,null,d),h=p<0?Math.abs(p)+c:c,m=f>0?f+c:c;return{ppad:c,ppadplus:u?h:m,ppadminus:u?m:h}}return{ppad:c}}function u(e,t,r,n,a){var l="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[l(t),l(r)];if(n){var s,c,u,d,f=1/0,p=-1/0,h=n.match(i.segmentRE);for("date"===e.type&&(l=o.decodeDate(l)),s=0;s<h.length;s++)void 0!==(c=a[h[s].charAt(0)].drawn)&&(!(u=h[s].substr(1).match(i.paramRE))||u.length<c||((d=l(u[c]))<f&&(f=d),d>p&&(p=d)));return p>=f?[f,p]:void 0}}t.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var o=0;o<r.length;o++){var c,d,f=r[o];f._extremes={};var p=a.getRefType(f.xref),h=a.getRefType(f.yref);if("paper"!==f.xref&&"domain"!==p){var m="pixel"===f.xsizemode?f.xanchor:f.x0,g="pixel"===f.xsizemode?f.xanchor:f.x1;(d=u(c=a.getFromId(e,f.xref),m,g,f.path,i.paramIsX))&&(f._extremes[c._id]=a.findExtremes(c,d,l(f)))}if("paper"!==f.yref&&"domain"!==h){var v="pixel"===f.ysizemode?f.yanchor:f.y0,y="pixel"===f.ysizemode?f.yanchor:f.y1;(d=u(c=a.getFromId(e,f.yref),v,y,f.path,i.paramIsY))&&(f._extremes[c._id]=a.findExtremes(c,d,s(f)))}}}},{"../../lib":232,"../../plots/cartesian/axes":279,"./constants":184,"./helpers":193}],184:[function(e,t,r){"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}}},{}],185:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../../plots/array_container_defaults"),o=e("./attributes"),l=e("./helpers");function s(e,t,r){function i(r,a){return n.coerce(e,t,o,r,a)}if(i("visible")){var s=i("path"),c=i("type",s?"path":"rect");"path"!==t.type&&delete t.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule"),i("line.width")&&(i("line.color"),i("line.dash"));for(var u=i("xsizemode"),d=i("ysizemode"),f=["x","y"],p=0;p<2;p++){var h,m,g,v=f[p],y=v+"anchor",x="x"===v?u:d,b={_fullLayout:r},_=a.coerceRef(e,t,b,v,void 0,"paper");if("range"===a.getRefType(_)?((h=a.getFromId(b,_))._shapeIndices.push(t._index),g=l.rangeToShapePosition(h),m=l.shapePositionToRange(h)):m=g=n.identity,"path"!==c){var w=v+"0",T=v+"1",M=e[w],k=e[T];e[w]=m(e[w],!0),e[T]=m(e[T],!0),"pixel"===x?(i(w,0),i(T,10)):(a.coercePosition(t,b,i,_,w,.25),a.coercePosition(t,b,i,_,T,.75)),t[w]=g(t[w]),t[T]=g(t[T]),e[w]=M,e[T]=k}if("pixel"===x){var A=e[y];e[y]=m(e[y],!0),a.coercePosition(t,b,i,_,y,.25),t[y]=g(t[y]),e[y]=A}}"path"===c?i("path"):n.noneOrAll(e,t,["x0","x1","y0","y1"])}}t.exports=function(e,t){i(e,t,{name:"shapes",handleItemDefaults:s})}},{"../../lib":232,"../../plots/array_container_defaults":274,"../../plots/cartesian/axes":279,"./attributes":182,"./helpers":193}],186:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("./draw_newshape/helpers").readPaths,l=e("./draw_newshape/display_outlines"),s=e("../../plots/cartesian/handle_outline").clearOutlineControllers,c=e("../color"),u=e("../drawing"),d=e("../../plot_api/plot_template").arrayEditor,f=e("../dragelement"),p=e("../../lib/setcursor"),h=e("./constants"),m=e("./helpers");function g(e){var t=e._fullLayout;for(var r in t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._plots){var n=t._plots[r].shapelayer;n&&n.selectAll("path").remove()}for(var a=0;a<t.shapes.length;a++)t.shapes[a].visible&&x(e,a)}function v(e){return!!e._fullLayout._drawing}function y(e){return!e._context.edits.shapePosition}function x(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+t+'"]').remove();var r=m.makeOptionsAndPlotinfo(e,t),s=r.options,x=r.plotinfo;if(s._input&&!1!==s.visible)if("below"!==s.layer)M(e._fullLayout._shapeUpperLayer);else if("paper"===s.xref||"paper"===s.yref)M(e._fullLayout._shapeLowerLayer);else{if(x._hadPlotinfo)M((x.mainplotinfo||x).shapelayer);else M(e._fullLayout._shapeLowerLayer)}function M(r){var M=_(e,s),k={"data-index":t,"fill-rule":s.fillrule,d:M},A=s.opacity,L=s.fillcolor,S=s.line.width?s.line.color:"rgba(0,0,0,0)",D=s.line.width,C=s.line.dash;D||!0!==s.editable||(D=5,C="solid");var O="Z"!==M[M.length-1],P=y(e)&&s.editable&&e._fullLayout._activeShapeIndex===t;P&&(L=O?"rgba(0,0,0,0)":e._fullLayout.activeshape.fillcolor,A=e._fullLayout.activeshape.opacity);var I,R=r.append("path").attr(k).style("opacity",A).call(c.stroke,S).call(c.fill,L).call(u.dashLine,C,D);if(b(R,e,s),(P||e._context.edits.shapePosition)&&(I=d(e.layout,"shapes",s)),P){R.style({cursor:"move"});var z={element:R.node(),plotinfo:x,gd:e,editHelpers:I,isActiveShape:!0},N=o(M,e);l(N,R,z)}else e._context.edits.shapePosition?function(e,t,r,o,l,s){var c,d,g,y,x,T,M,k,A,L,S,D,C,O,P,I,R="pixel"===r.xsizemode,z="pixel"===r.ysizemode,N="line"===r.type,F="path"===r.type,E=s.modifyItem,j=i.getFromId(e,r.xref),H=i.getRefType(r.xref),B=i.getFromId(e,r.yref),Y=i.getRefType(r.yref),V=m.getDataToPixel(e,j,!1,H),U=m.getDataToPixel(e,B,!0,Y),q=m.getPixelToData(e,j,!1,H),G=m.getPixelToData(e,B,!0,Y),Z=N?function(){var e=Math.max(r.line.width,10),n=l.append("g").attr("data-index",o);n.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":e,"stroke-opacity":"0"});var a={"fill-opacity":"0"},i=Math.max(e/2,10);return n.append("circle").attr({"data-line-point":"start-point",cx:R?V(r.xanchor)+r.x0:V(r.x0),cy:z?U(r.yanchor)-r.y0:U(r.y0),r:i}).style(a).classed("cursor-grab",!0),n.append("circle").attr({"data-line-point":"end-point",cx:R?V(r.xanchor)+r.x1:V(r.x1),cy:z?U(r.yanchor)-r.y1:U(r.y1),r:i}).style(a).classed("cursor-grab",!0),n}():t,W={element:Z.node(),gd:e,prepFn:function(n){if(v(e))return;R&&(x=V(r.xanchor));z&&(T=U(r.yanchor));"path"===r.type?P=r.path:(c=R?r.x0:V(r.x0),d=z?r.y0:U(r.y0),g=R?r.x1:V(r.x1),y=z?r.y1:U(r.y1));c<g?(A=c,C="x0",L=g,O="x1"):(A=g,C="x1",L=c,O="x0");!z&&d<y||z&&d>y?(M=d,S="y0",k=y,D="y1"):(M=y,S="y1",k=d,D="y0");X(n),K(l,r),function(e,t,r){var n=t.xref,a=t.yref,o=i.getFromId(r,n),l=i.getFromId(r,a),s="";"paper"===n||o.autorange||(s+=n);"paper"===a||l.autorange||(s+=a);u.setClipUrl(e,s?"clip"+r._fullLayout._uid+s:null,r)}(t,r,e),W.moveFn="move"===I?J:Q,W.altKey=n.altKey},doneFn:function(){if(v(e))return;p(t),$(l),b(t,e,r),n.call("_guiRelayout",e,s.getUpdateObj())},clickFn:function(){if(v(e))return;$(l)}};function X(r){if(v(e))I=null;else if(N)I="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=W.element.getBoundingClientRect(),a=n.right-n.left,i=n.bottom-n.top,o=r.clientX-n.left,l=r.clientY-n.top,s=!F&&a>10&&i>10&&!r.shiftKey?f.getCursor(o/a,1-l/i):"move";p(t,s),I=s.split("-")[0]}}function J(n,a){if("path"===r.type){var i=function(e){return e},o=i,s=i;R?E("xanchor",r.xanchor=q(x+n)):(o=function(e){return q(V(e)+n)},j&&"date"===j.type&&(o=m.encodeDate(o))),z?E("yanchor",r.yanchor=G(T+a)):(s=function(e){return G(U(e)+a)},B&&"date"===B.type&&(s=m.encodeDate(s))),E("path",r.path=w(P,o,s))}else R?E("xanchor",r.xanchor=q(x+n)):(E("x0",r.x0=q(c+n)),E("x1",r.x1=q(g+n))),z?E("yanchor",r.yanchor=G(T+a)):(E("y0",r.y0=G(d+a)),E("y1",r.y1=G(y+a)));t.attr("d",_(e,r)),K(l,r)}function Q(n,a){if(F){var i=function(e){return e},o=i,s=i;R?E("xanchor",r.xanchor=q(x+n)):(o=function(e){return q(V(e)+n)},j&&"date"===j.type&&(o=m.encodeDate(o))),z?E("yanchor",r.yanchor=G(T+a)):(s=function(e){return G(U(e)+a)},B&&"date"===B.type&&(s=m.encodeDate(s))),E("path",r.path=w(P,o,s))}else if(N){if("resize-over-start-point"===I){var u=c+n,f=z?d-a:d+a;E("x0",r.x0=R?u:q(u)),E("y0",r.y0=z?f:G(f))}else if("resize-over-end-point"===I){var p=g+n,h=z?y-a:y+a;E("x1",r.x1=R?p:q(p)),E("y1",r.y1=z?h:G(h))}}else{var v=function(e){return-1!==I.indexOf(e)},b=v("n"),H=v("s"),Y=v("w"),Z=v("e"),W=b?M+a:M,X=H?k+a:k,J=Y?A+n:A,Q=Z?L+n:L;z&&(b&&(W=M-a),H&&(X=k-a)),(!z&&X-W>10||z&&W-X>10)&&(E(S,r[S]=z?W:G(W)),E(D,r[D]=z?X:G(X))),Q-J>10&&(E(C,r[C]=R?J:q(J)),E(O,r[O]=R?Q:q(Q)))}t.attr("d",_(e,r)),K(l,r)}function K(e,t){(R||z)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=V(R?t.xanchor:a.midRange(r?[t.x0,t.x1]:m.extractPathCoords(t.path,h.paramIsX))),o=U(z?t.yanchor:a.midRange(r?[t.y0,t.y1]:m.extractPathCoords(t.path,h.paramIsY)));if(i=m.roundPositionForSharpStrokeRendering(i,1),o=m.roundPositionForSharpStrokeRendering(o,1),R&&z){var l="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(R){var s="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",s)}else{var c="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function $(e){e.selectAll(".visual-cue").remove()}f.init(W),Z.node().onmousemove=X}(e,R,s,t,r,I):!0===s.editable&&R.style("pointer-events",O||c.opacity(L)*A<=.5?"stroke":"all");R.node().addEventListener("click",(function(){return function(e,t){if(!y(e))return;var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void T(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=T,g(e)}}(e,R)}))}}function b(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");u.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function _(e,t){var r,n,o,l,s,c,u,d,f=t.type,p=i.getRefType(t.xref),g=i.getRefType(t.yref),v=i.getFromId(e,t.xref),y=i.getFromId(e,t.yref),x=e._fullLayout._size;if(v?"domain"===p?n=function(e){return v._offset+v._length*e}:(r=m.shapePositionToRange(v),n=function(e){return v._offset+v.r2p(r(e,!0))}):n=function(e){return x.l+x.w*e},y?"domain"===g?l=function(e){return y._offset+y._length*(1-e)}:(o=m.shapePositionToRange(y),l=function(e){return y._offset+y.r2p(o(e,!0))}):l=function(e){return x.t+x.h*(1-e)},"path"===f)return v&&"date"===v.type&&(n=m.decodeDate(n)),y&&"date"===y.type&&(l=m.decodeDate(l)),function(e,t,r){var n=e.path,i=e.xsizemode,o=e.ysizemode,l=e.xanchor,s=e.yanchor;return n.replace(h.segmentRE,(function(e){var n=0,c=e.charAt(0),u=h.paramIsX[c],d=h.paramIsY[c],f=h.numParams[c],p=e.substr(1).replace(h.paramRE,(function(e){return u[n]?e="pixel"===i?t(l)+Number(e):t(e):d[n]&&(e="pixel"===o?r(s)-Number(e):r(e)),++n>f&&(e="X"),e}));return n>f&&(p=p.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),c+p}))}(t,n,l);if("pixel"===t.xsizemode){var b=n(t.xanchor);s=b+t.x0,c=b+t.x1}else s=n(t.x0),c=n(t.x1);if("pixel"===t.ysizemode){var _=l(t.yanchor);u=_-t.y0,d=_-t.y1}else u=l(t.y0),d=l(t.y1);if("line"===f)return"M"+s+","+u+"L"+c+","+d;if("rect"===f)return"M"+s+","+u+"H"+c+"V"+d+"H"+s+"Z";var w=(s+c)/2,T=(u+d)/2,M=Math.abs(w-s),k=Math.abs(T-u),A="A"+M+","+k,L=w+M+","+T;return"M"+L+A+" 0 1,1 "+(w+","+(T-k))+A+" 0 0,1 "+L+"Z"}function w(e,t,r){return e.replace(h.segmentRE,(function(e){var n=0,a=e.charAt(0),i=h.paramIsX[a],o=h.paramIsY[a],l=h.numParams[a];return a+e.substr(1).replace(h.paramRE,(function(e){return n>=l||(i[n]?e=t(e):o[n]&&(e=r(e)),n++),e}))}))}function T(e){y(e)&&(e._fullLayout._activeShapeIndex>=0&&(s(e),delete e._fullLayout._activeShapeIndex,g(e)))}t.exports={draw:g,drawOne:x,eraseActiveShape:function(e){if(!y(e))return;s(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t<r.length){for(var a=[],i=0;i<r.length;i++)i!==t&&a.push(r[i]);delete e._fullLayout._activeShapeIndex,n.call("_guiRelayout",e,{shapes:a})}}}},{"../../lib":232,"../../lib/setcursor":252,"../../plot_api/plot_template":268,"../../plots/cartesian/axes":279,"../../plots/cartesian/handle_outline":290,"../../registry":318,"../color":102,"../dragelement":121,"../drawing":124,"./constants":184,"./draw_newshape/display_outlines":190,"./draw_newshape/helpers":191,"./helpers":193}],187:[function(e,t,r){"use strict";var n=e("../../drawing/attributes").dash,a=e("../../../lib/extend").extendFlat;t.exports={newshape:{line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:0,dflt:4,editType:"none"},dash:a({},n,{dflt:"solid",editType:"none"}),editType:"none"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"none"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"none"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",editType:"none"},editType:"none"},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},{"../../../lib/extend":226,"../../drawing/attributes":123}],188:[function(e,t,r){"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},{}],189:[function(e,t,r){"use strict";var n=e("../../color");t.exports=function(e,t,r){if(r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var a=(e||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(a)),r("newshape.line.dash")}r("activeshape.fillcolor"),r("activeshape.opacity")}},{"../../color":102}],190:[function(e,t,r){"use strict";var n=e("../../dragelement"),a=e("../../dragelement/helpers").drawMode,i=e("../../../registry"),o=e("./constants"),l=o.i000,s=o.i090,c=o.i180,u=o.i270,d=e("../../../plots/cartesian/handle_outline").clearOutlineControllers,f=e("./helpers"),p=f.pointsShapeRectangle,h=f.pointsShapeEllipse,m=f.writePaths,g=e("./newshapes");t.exports=function e(t,r,o,f){f||(f=0);var v=o.gd;function y(){e(t,r,o,f++),h(t[0])&&x({redrawing:!0})}function x(e){o.isActiveShape=!1;var t=g(r,o);Object.keys(t).length&&i.call((e||{}).redrawing?"relayout":"_guiRelayout",v,t)}var b,_,w,T,M,k=o.isActiveShape,A=v._fullLayout._zoomlayer,L=o.dragmode;(a(L)?v._fullLayout._drawing=!0:v._fullLayout._activeShapeIndex>=0&&d(v),r.attr("d",m(t)),k&&!f)&&(M=function(e,t){for(var r=0;r<t.length;r++){var n=t[r];e[r]=[];for(var a=0;a<n.length;a++){e[r][a]=[];for(var i=0;i<n[a].length;i++)e[r][a][i]=n[a][i]}}return e}([],t),function(e){b=[];for(var r=0;r<t.length;r++){var a=t[r],i=!p(a)&&h(a);b[r]=[];for(var o=0;o<a.length;o++)if("Z"!==a[o][0]&&(!i||o===l||o===s||o===c||o===u)){var d=a[o][1],f=a[o][2],m=e.append("circle").classed("cursor-grab",!0).attr("data-i",r).attr("data-j",o).attr("cx",d).attr("cy",f).attr("r",4).style({"mix-blend-mode":"luminosity",fill:"black",stroke:"white","stroke-width":1});b[r][o]={element:m.node(),gd:v,prepFn:S,doneFn:C,clickFn:O},n.init(b[r][o])}}}(A.append("g").attr("class","outline-controllers")),function(){if(_=[],!t.length)return;_[0]={element:r[0][0],gd:v,prepFn:I,doneFn:R},n.init(_[0])}());function S(e){w=+e.srcElement.getAttribute("data-i"),T=+e.srcElement.getAttribute("data-j"),b[w][T].moveFn=D}function D(e,r){if(t.length){var n=M[w][T][1],a=M[w][T][2],i=t[w],o=i.length;if(p(i)){for(var l=0;l<o;l++)if(l!==T){var s=i[l];s[1]===i[T][1]&&(s[1]=n+e),s[2]===i[T][2]&&(s[2]=a+r)}if(i[T][1]=n+e,i[T][2]=a+r,!p(i))for(var c=0;c<o;c++)for(var u=0;u<i[c].length;u++)i[c][u]=M[w][c][u]}else i[T][1]=n+e,i[T][2]=a+r;y()}}function C(){x()}function O(e,r){if(2===e){w=+r.srcElement.getAttribute("data-i"),T=+r.srcElement.getAttribute("data-j");var n=t[w];p(n)||h(n)||function(){if(t.length&&t[w]&&t[w].length){for(var e=[],r=0;r<t[w].length;r++)r!==T&&e.push(t[w][r]);e.length>1&&(2!==e.length||"Z"!==e[1][0])&&(0===T&&(e[0][0]="M"),t[w]=e,y(),x())}}()}}function P(e,r){!function(e,r){if(t.length)for(var n=0;n<t.length;n++)for(var a=0;a<t[n].length;a++)for(var i=0;i+2<t[n][a].length;i+=2)t[n][a][i+1]=M[n][a][i+1]+e,t[n][a][i+2]=M[n][a][i+2]+r}(e,r),y()}function I(e){(w=+e.srcElement.getAttribute("data-i"))||(w=0),_[w].moveFn=P}function R(){x()}}},{"../../../plots/cartesian/handle_outline":290,"../../../registry":318,"../../dragelement":121,"../../dragelement/helpers":120,"./constants":188,"./helpers":191,"./newshapes":192}],191:[function(e,t,r){"use strict";var n=e("parse-svg-path"),a=e("./constants"),i=a.CIRCLE_SIDES,o=a.SQRT2,l=e("../../../plots/cartesian/helpers"),s=l.p2r,c=l.r2p,u=[0,3,4,5,6,1,2],d=[0,3,4,1,2];function f(e,t){return Math.abs(e-t)<=1e-6}function p(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}r.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n<t;n++)for(var a=e[n].length,i=0;i<a;i++){var o=e[n][i][0];if("Z"===o)r+="Z";else for(var l=e[n][i].length,s=0;s<l;s++){var c=s;"Q"===o||"S"===o?c=d[s]:"C"===o&&(c=u[s]),r+=e[n][i][c],s>0&&s<l-1&&(r+=",")}}return r},r.readPaths=function(e,t,r,a){var o,l,u,d=n(e),f=[],p=-1,h=0,m=0,g=function(){l=h,u=m};g();for(var v=0;v<d.length;v++){var y,x,b,_,w=[],T=d[v][0],M=T;switch(T){case"M":p++,f[p]=[],h=+d[v][1],m=+d[v][2],w.push([M,h,m]),g();break;case"Q":case"S":y=+d[v][1],b=+d[v][2],h=+d[v][3],m=+d[v][4],w.push([M,h,m,y,b]);break;case"C":y=+d[v][1],b=+d[v][2],x=+d[v][3],_=+d[v][4],h=+d[v][5],m=+d[v][6],w.push([M,h,m,y,b,x,_]);break;case"T":case"L":h=+d[v][1],m=+d[v][2],w.push([M,h,m]);break;case"H":M="L",h=+d[v][1],w.push([M,h,m]);break;case"V":M="L",m=+d[v][1],w.push([M,h,m]);break;case"A":M="L";var k=+d[v][1],A=+d[v][2];+d[v][4]||(k=-k,A=-A);var L=h-k,S=m;for(o=1;o<=i/2;o++){var D=2*Math.PI*o/i;w.push([M,L+k*Math.cos(D),S+A*Math.sin(D)])}break;case"Z":h===l&&m===u||(h=l,m=u,w.push([M,h,m]))}for(var C=(r||{}).domain,O=t._fullLayout._size,P=r&&"pixel"===r.xsizemode,I=r&&"pixel"===r.ysizemode,R=!1===a,z=0;z<w.length;z++){for(o=0;o+2<7;o+=2){var N=w[z][o+1],F=w[z][o+2];void 0!==N&&void 0!==F&&(h=N,m=F,r&&(r.xaxis&&r.xaxis.p2r?(R&&(N-=r.xaxis._offset),N=P?c(r.xaxis,r.xanchor)+N:s(r.xaxis,N)):(R&&(N-=O.l),C?N=C.x[0]+N/O.w:N/=O.w),r.yaxis&&r.yaxis.p2r?(R&&(F-=r.yaxis._offset),F=I?c(r.yaxis,r.yanchor)-F:s(r.yaxis,F)):(R&&(F-=O.t),F=C?C.y[1]-F/O.h:1-F/O.h)),w[z][o+1]=N,w[z][o+2]=F)}f[p].push(w[z].slice())}}return f},r.pointsShapeRectangle=function(e){if(5!==e.length)return!1;for(var t=1;t<3;t++){if(!f(e[0][t]-e[1][t],e[3][t]-e[2][t]))return!1;if(!f(e[0][t]-e[3][t],e[1][t]-e[2][t]))return!1}return!(!f(e[0][1],e[1][1])&&!f(e[0][1],e[3][1]))&&!!(p(e[0],e[1])*p(e[0],e[3]))},r.pointsShapeEllipse=function(e){var t=e.length;if(t!==i+1)return!1;t=i;for(var r=0;r<t;r++){var n=(2*t-r)%t,a=(t/2+n)%t,o=(t/2+r)%t;if(!f(p(e[r],e[o]),p(e[n],e[a])))return!1}return!0},r.handleEllipse=function(e,t,n){if(!e)return[t,n];var a=r.ellipseOver({x0:t[0],y0:t[1],x1:n[0],y1:n[1]}),l=(a.x1+a.x0)/2,s=(a.y1+a.y0)/2,c=(a.x1-a.x0)/2,u=(a.y1-a.y0)/2;c||(c=u/=o),u||(u=c/=o);for(var d=[],f=0;f<i;f++){var p=2*f*Math.PI/i;d.push([l+c*Math.cos(p),s+u*Math.sin(p)])}return d},r.ellipseOver=function(e){var t=e.x0,r=e.y0,n=e.x1,a=e.y1,i=n-t,l=a-r,s=((t-=i)+n)/2,c=((r-=l)+a)/2;return{x0:s-(i*=o),y0:c-(l*=o),x1:s+i,y1:c+l}}},{"../../../plots/cartesian/helpers":291,"./constants":188,"parse-svg-path":56}],192:[function(e,t,r){"use strict";var n=e("../../dragelement/helpers"),a=n.drawMode,i=n.openMode,o=e("./constants"),l=o.i000,s=o.i090,c=o.i180,u=o.i270,d=o.cos45,f=o.sin45,p=e("../../../plots/cartesian/helpers"),h=p.p2r,m=p.r2p,g=e("../../../plots/cartesian/handle_outline").clearSelect,v=e("./helpers"),y=v.readPaths,x=v.writePaths,b=v.ellipseOver;t.exports=function(e,t){if(e.length){var r=e[0][0];if(r){var n=r.getAttribute("d"),o=t.gd,p=o._fullLayout.newshape,v=t.plotinfo,_=v.xaxis,w=v.yaxis,T=!!v.domain||!v.xaxis,M=!!v.domain||!v.yaxis,k=t.isActiveShape,A=t.dragmode,L=(o.layout||{}).shapes||[];if(!a(A)&&void 0!==k){var S=o._fullLayout._activeShapeIndex;if(S<L.length)switch(o._fullLayout.shapes[S].type){case"rect":A="drawrect";break;case"circle":A="drawcircle";break;case"line":A="drawline";break;case"path":var D=L[S].path||"";A="Z"===D[D.length-1]?"drawclosedpath":"drawopenpath"}}var C,O=i(A),P=y(n,o,v,k),I={editable:!0,xref:T?"paper":_._id,yref:M?"paper":w._id,layer:p.layer,opacity:p.opacity,line:{color:p.line.color,width:p.line.width,dash:p.line.dash}};if(O||(I.fillcolor=p.fillcolor,I.fillrule=p.fillrule),1===P.length&&(C=P[0]),C&&"drawrect"===A)I.type="rect",I.x0=C[0][1],I.y0=C[0][2],I.x1=C[2][1],I.y1=C[2][2];else if(C&&"drawline"===A)I.type="line",I.x0=C[0][1],I.y0=C[0][2],I.x1=C[1][1],I.y1=C[1][2];else if(C&&"drawcircle"===A){I.type="circle";var R=C[l][1],z=C[s][1],N=C[c][1],F=C[u][1],E=C[l][2],j=C[s][2],H=C[c][2],B=C[u][2],Y=v.xaxis&&("date"===v.xaxis.type||"log"===v.xaxis.type),V=v.yaxis&&("date"===v.yaxis.type||"log"===v.yaxis.type);Y&&(R=m(v.xaxis,R),z=m(v.xaxis,z),N=m(v.xaxis,N),F=m(v.xaxis,F)),V&&(E=m(v.yaxis,E),j=m(v.yaxis,j),H=m(v.yaxis,H),B=m(v.yaxis,B));var U=(z+F)/2,q=(E+H)/2,G=b({x0:U,y0:q,x1:U+(F-z+N-R)/2*d,y1:q+(B-j+H-E)/2*f});Y&&(G.x0=h(v.xaxis,G.x0),G.x1=h(v.xaxis,G.x1)),V&&(G.y0=h(v.yaxis,G.y0),G.y1=h(v.yaxis,G.y1)),I.x0=G.x0,I.y0=G.y0,I.x1=G.x1,I.y1=G.y1}else I.type="path",_&&w&&function(e,t,r){var n="date"===t.type,a="date"===r.type;if(!n&&!a)return e;for(var i=0;i<e.length;i++)for(var o=0;o<e[i].length;o++)for(var l=0;l+2<e[i][o].length;l+=2)n&&(e[i][o][l+1]=e[i][o][l+1].replace(" ","_")),a&&(e[i][o][l+2]=e[i][o][l+2].replace(" ","_"))}(P,_,w),I.path=x(P),C=null;g(o);for(var Z=t.editHelpers,W=(Z||{}).modifyItem,X=[],J=0;J<L.length;J++){var Q=o._fullLayout.shapes[J];if(X[J]=Q._input,void 0!==k&&J===o._fullLayout._activeShapeIndex){var K=I;switch(Q.type){case"line":case"rect":case"circle":W("x0",K.x0),W("x1",K.x1),W("y0",K.y0),W("y1",K.y1);break;case"path":W("path",K.path)}}}return void 0===k?(X.push(I),X):Z?Z.getUpdateObj():{}}}}},{"../../../plots/cartesian/handle_outline":290,"../../../plots/cartesian/helpers":291,"../../dragelement/helpers":120,"./constants":188,"./helpers":191}],193:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../lib");r.rangeToShapePosition=function(e){return"log"===e.type?e.r2d:function(e){return e}},r.shapePositionToRange=function(e){return"log"===e.type?e.d2r:function(e){return e}},r.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},r.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},r.extractPathCoords=function(e,t){var r=[];return e.match(n.segmentRE).forEach((function(e){var i=t[e.charAt(0)].drawn;if(void 0!==i){var o=e.substr(1).match(n.paramRE);!o||o.length<i||r.push(a.cleanNumber(o[i]))}})),r},r.getDataToPixel=function(e,t,n,a){var i,o=e._fullLayout._size;if(t)if("domain"===a)i=function(e){return t._length*(n?1-e:e)+t._offset};else{var l=r.shapePositionToRange(t);i=function(e){return t._offset+t.r2p(l(e,!0))},"date"===t.type&&(i=r.decodeDate(i))}else i=n?function(e){return o.t+o.h*(1-e)}:function(e){return o.l+o.w*e};return i},r.getPixelToData=function(e,t,n,a){var i,o=e._fullLayout._size;if(t)if("domain"===a)i=function(e){var r=(e-t._offset)/t._length;return n?1-r:r};else{var l=r.rangeToShapePosition(t);i=function(e){return l(t.p2r(e-t._offset))}}else i=n?function(e){return 1-(e-o.t)/o.h}:function(e){return(e-o.l)/o.w};return i},r.roundPositionForSharpStrokeRendering=function(e,t){var r=1===Math.round(t%2),n=Math.round(e);return r?n+.5:n},r.makeOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return!!n?n._hadPlotinfo=!0:(n={},r.xref&&"paper"!==r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}}},{"../../lib":232,"./constants":184}],194:[function(e,t,r){"use strict";var n=e("./draw");t.exports={moduleType:"component",name:"shapes",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),supplyDrawNewShapeDefaults:e("./draw_newshape/defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("shapes"),calcAutorange:e("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"../../plots/cartesian/include_components":292,"./attributes":182,"./calc_autorange":183,"./defaults":185,"./draw":186,"./draw_newshape/defaults":189}],195:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../../plots/pad_attributes"),i=e("../../lib/extend").extendDeepAll,o=e("../../plot_api/edit_types").overrideAll,l=e("../../plots/animation_attributes"),s=e("../../plot_api/plot_template").templatedArray,c=e("./constants"),u=s("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});t.exports=o(s("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(a({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:l.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:n({})},font:n({}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor},bgcolor:{valType:"color",dflt:c.railBgColor},bordercolor:{valType:"color",dflt:c.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c.tickLength},tickcolor:{valType:"color",dflt:c.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength}}),"arraydraw","from-root")},{"../../lib/extend":226,"../../plot_api/edit_types":261,"../../plot_api/plot_template":268,"../../plots/animation_attributes":273,"../../plots/font_attributes":310,"../../plots/pad_attributes":315,"./constants":196}],196:[function(e,t,r){"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}},{}],197:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/array_container_defaults"),i=e("./attributes"),o=e("./constants").name,l=i.steps;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}for(var l=a(e,t,{name:"steps",handleItemDefaults:c}),s=0,u=0;u<l.length;u++)l[u].visible&&s++;if(s<2?t.visible=!1:o("visible")){t._stepCount=s;var d=t._visibleSteps=n.filterVisible(l);(l[o("active")]||{}).visible||(t.active=d[0]._index),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("len"),o("lenmode"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("currentvalue.visible")&&(o("currentvalue.xanchor"),o("currentvalue.prefix"),o("currentvalue.suffix"),o("currentvalue.offset"),n.coerceFont(o,"currentvalue.font",t.font)),o("transition.duration"),o("transition.easing"),o("bgcolor"),o("activebgcolor"),o("bordercolor"),o("borderwidth"),o("ticklen"),o("tickwidth"),o("tickcolor"),o("minorticklen")}}function c(e,t){function r(r,a){return n.coerce(e,t,l,r,a)}if("skip"===e.method||Array.isArray(e.args)?r("visible"):t.visible=!1){r("method"),r("args");var a=r("label","step-"+t._index);r("value",a),r("execute")}}t.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:s})}},{"../../lib":232,"../../plots/array_container_defaults":274,"./attributes":195,"./constants":196}],198:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../plots/plots"),i=e("../color"),o=e("../drawing"),l=e("../../lib"),s=l.strTranslate,c=e("../../lib/svg_text_utils"),u=e("../../plot_api/plot_template").arrayEditor,d=e("./constants"),f=e("../../constants/alignment"),p=f.LINE_SPACING,h=f.FROM_TL,m=f.FROM_BR;function g(e){return d.autoMarginIdRoot+e._index}function v(e){return e._index}function y(e,t){var r=o.tester.selectAll("g."+d.labelGroupClass).data(t._visibleSteps);r.enter().append("g").classed(d.labelGroupClass,!0);var i=0,s=0;r.each((function(e){var r=_(n.select(this),{step:e},t).node();if(r){var a=o.bBox(r);s=Math.max(s,a.height),i=Math.max(i,a.width)}})),r.remove();var u=t._dims={};u.inputAreaWidth=Math.max(d.railWidth,d.gripHeight);var f=e._fullLayout._size;u.lx=f.l+f.w*t.x,u.ly=f.t+f.h*(1-t.y),"fraction"===t.lenmode?u.outerLength=Math.round(f.w*t.len):u.outerLength=t.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-t.pad.l-t.pad.r);var p=(u.inputAreaLength-2*d.stepInset)/(t._stepCount-1),v=i+d.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(v/p)),u.labelHeight=s,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,t.currentvalue.visible){var y=o.tester.append("g");r.each((function(e){var r=x(y,t,e.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},a=c.lineCount(r);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(n.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(n.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,a)})),u.currentValueTotalHeight=u.currentValueHeight+t.currentvalue.offset,y.remove()}u.height=u.currentValueTotalHeight+d.tickOffset+t.ticklen+d.labelOffset+u.labelHeight+t.pad.t+t.pad.b;var b="left";l.isRightAnchor(t)&&(u.lx-=u.outerLength,b="right"),l.isCenterAnchor(t)&&(u.lx-=u.outerLength/2,b="center");var w="top";l.isBottomAnchor(t)&&(u.ly-=u.height,w="bottom"),l.isMiddleAnchor(t)&&(u.ly-=u.height/2,w="middle"),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var T={y:t.y,b:u.height*m[w],t:u.height*h[w]};"fraction"===t.lenmode?(T.l=0,T.xl=t.x-t.len*h[b],T.r=0,T.xr=t.x+t.len*m[b]):(T.x=t.x,T.l=u.outerLength*h[b],T.r=u.outerLength*m[b]),a.autoMargin(e,g(t),T)}function x(e,t,r){if(t.currentvalue.visible){var n,a,i=t._dims;switch(t.currentvalue.xanchor){case"right":n=i.inputAreaLength-d.currentValueInset-i.currentValueMaxWidth,a="left";break;case"center":n=.5*i.inputAreaLength,a="middle";break;default:n=d.currentValueInset,a="left"}var s=l.ensureSingle(e,"text",d.labelClass,(function(e){e.attr({"text-anchor":a,"data-notex":1})})),u=t.currentvalue.prefix?t.currentvalue.prefix:"";if("string"==typeof r)u+=r;else{var f=t.steps[t.active].label,h=t._gd._fullLayout._meta;h&&(f=l.templateString(f,h)),u+=f}t.currentvalue.suffix&&(u+=t.currentvalue.suffix),s.call(o.font,t.currentvalue.font).text(u).call(c.convertToTspans,t._gd);var m=c.lineCount(s),g=(i.currentValueMaxLines+1-m)*t.currentvalue.font.size*p;return c.positionText(s,n,g),s}}function b(e,t,r){l.ensureSingle(e,"rect",d.gripRectClass,(function(n){n.call(k,t,e,r).style("pointer-events","all")})).attr({width:d.gripWidth,height:d.gripHeight,rx:d.gripRadius,ry:d.gripRadius}).call(i.stroke,r.bordercolor).call(i.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function _(e,t,r){var n=l.ensureSingle(e,"text",d.labelClass,(function(e){e.attr({"text-anchor":"middle","data-notex":1})})),a=t.step.label,i=r._gd._fullLayout._meta;return i&&(a=l.templateString(a,i)),n.call(o.font,r.font).text(a).call(c.convertToTspans,r._gd),n}function w(e,t){var r=l.ensureSingle(e,"g",d.labelsClass),a=t._dims,i=r.selectAll("g."+d.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(d.labelGroupClass,!0),i.exit().remove(),i.each((function(e){var r=n.select(this);r.call(_,e,t),o.setTranslate(r,S(t,e.fraction),d.tickOffset+t.ticklen+t.font.size*p+d.labelOffset+a.currentValueTotalHeight)}))}function T(e,t,r,n,a){var i=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[i]._index;o!==r.active&&M(e,t,r,o,!0,a)}function M(e,t,r,n,i,o){var l=r.active;r.active=n,u(e.layout,d.name,r).applyUpdate("active",n);var s=r.steps[r.active];t.call(L,r,o),t.call(x,r),e.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:l}),s&&s.method&&i&&(t._nextMethod?(t._nextMethod.step=s,t._nextMethod.doCallback=i,t._nextMethod.doTransition=o):(t._nextMethod={step:s,doCallback:i,doTransition:o},t._nextMethodRaf=window.requestAnimationFrame((function(){var r=t._nextMethod.step;r.method&&(r.execute&&a.executeAPICommand(e,r.method,r.args),t._nextMethod=null,t._nextMethodRaf=null)}))))}function k(e,t,r){var a=r.node(),o=n.select(t);function l(){return r.data()[0]}function s(){var e=l();t.emit("plotly_sliderstart",{slider:e});var s=r.select("."+d.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),s.call(i.fill,e.activebgcolor);var c=D(e,n.mouse(a)[0]);function u(){var e=l(),i=D(e,n.mouse(a)[0]);T(t,r,e,i,!1)}function f(){var e=l();e._dragging=!1,s.call(i.fill,e.bgcolor),o.on("mouseup",null),o.on("mousemove",null),o.on("touchend",null),o.on("touchmove",null),t.emit("plotly_sliderend",{slider:e,step:e.steps[e.active]})}T(t,r,e,c,!0),e._dragging=!0,o.on("mousemove",u),o.on("touchmove",u),o.on("mouseup",f),o.on("touchend",f)}e.on("mousedown",s),e.on("touchstart",s)}function A(e,t){var r=e.selectAll("rect."+d.tickRectClass).data(t._visibleSteps),a=t._dims;r.enter().append("rect").classed(d.tickRectClass,!0),r.exit().remove(),r.attr({width:t.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(e,r){var l=r%a.labelStride==0,s=n.select(this);s.attr({height:l?t.ticklen:t.minorticklen}).call(i.fill,t.tickcolor),o.setTranslate(s,S(t,r/(t._stepCount-1))-.5*t.tickwidth,(l?d.tickOffset:d.minorTickOffset)+a.currentValueTotalHeight)}))}function L(e,t,r){for(var n=e.select("rect."+d.gripRectClass),a=0,i=0;i<t._stepCount;i++)if(t._visibleSteps[i]._index===t.active){a=i;break}var o=S(t,a/(t._stepCount-1));if(!t._invokingCommand){var l=n;r&&t.transition.duration>0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*d.gripWidth,t._dims.currentValueTotalHeight))}}function S(e,t){var r=e._dims;return r.inputAreaStart+d.stepInset+(r.inputAreaLength-2*d.stepInset)*Math.min(1,Math.max(0,t))}function D(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-d.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*d.stepInset-2*r.inputAreaStart)))}function C(e,t,r){var n=r._dims,a=l.ensureSingle(e,"rect",d.railTouchRectClass,(function(n){n.call(k,t,e,r).style("pointer-events","all")}));a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,d.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function O(e,t){var r=t._dims,n=r.inputAreaLength-2*d.railInset,a=l.ensureSingle(e,"rect",d.railRectClass);a.attr({width:n,height:d.railWidth,rx:d.railRadius,ry:d.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,d.railInset,.5*(r.inputAreaWidth-d.railWidth)+r.currentValueTotalHeight)}t.exports=function(e){var t=e._fullLayout,r=function(e,t){for(var r=e[d.name],n=[],a=0;a<r.length;a++){var i=r[a];i.visible&&(i._gd=t,n.push(i))}return n}(t,e),i=t._infolayer.selectAll("g."+d.containerClassName).data(r.length>0?[0]:[]);function l(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),a.autoMargin(e,g(t))}if(i.enter().append("g").classed(d.containerClassName,!0).style("cursor","ew-resize"),i.exit().each((function(){n.select(this).selectAll("g."+d.groupClassName).each(l)})).remove(),0!==r.length){var s=i.selectAll("g."+d.groupClassName).data(r,v);s.enter().append("g").classed(d.groupClassName,!0),s.exit().each(l).remove();for(var c=0;c<r.length;c++){var u=r[c];y(e,u)}s.each((function(t){var r=n.select(this);!function(e){var t=e._dims;t.labelSteps=[];for(var r=e._stepCount,n=0;n<r;n+=t.labelStride)t.labelSteps.push({fraction:n/(r-1),step:e._visibleSteps[n]})}(t),a.manageCommandObserver(e,t,t._visibleSteps,(function(t){var n=r.data()[0];n.active!==t.index&&(n._dragging||M(e,r,n,t.index,!1,!0))})),function(e,t,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index);t.call(x,r).call(O,r).call(w,r).call(A,r).call(C,e,r).call(b,e,r);var n=r._dims;o.setTranslate(t,n.lx+r.pad.l,n.ly+r.pad.t),t.call(L,r,!1),t.call(x,r)}(e,n.select(this),t)}))}}},{"../../constants/alignment":207,"../../lib":232,"../../lib/svg_text_utils":255,"../../plot_api/plot_template":268,"../../plots/plots":316,"../color":102,"../drawing":124,"./constants":196,"@plotly/d3":11}],199:[function(e,t,r){"use strict";var n=e("./constants");t.exports={moduleType:"component",name:n.name,layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),draw:e("./draw")}},{"./attributes":195,"./constants":196,"./defaults":197,"./draw":198}],200:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("../../plots/plots"),o=e("../../registry"),l=e("../../lib"),s=l.strTranslate,c=e("../drawing"),u=e("../color"),d=e("../../lib/svg_text_utils"),f=e("../../constants/interactions"),p=e("../../constants/alignment").OPPOSITE_SIDE,h=/ [XY][0-9]* /;t.exports={draw:function(e,t,r){var m,g=r.propContainer,v=r.propName,y=r.placeholder,x=r.traceIndex,b=r.avoid||{},_=r.attributes,w=r.transform,T=r.containerGroup,M=e._fullLayout,k=1,A=!1,L=g.title,S=(L&&L.text?L.text:"").trim(),D=L&&L.font?L.font:{},C=D.family,O=D.size,P=D.color;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":v.indexOf(!0)&&(m="colorbarTitleText");var I=e._context.edits[m];""===S?k=0:S.replace(h," % ")===y.replace(h," % ")&&(k=.2,A=!0,I||(S="")),r._meta?S=l.templateString(S,r._meta):M._meta&&(S=l.templateString(S,M._meta));var R=S||I;T||(T=l.ensureSingle(M._infolayer,"g","g-"+t));var z=T.selectAll("text").data(R?[0]:[]);if(z.enter().append("text"),z.text(S).attr("class",t),z.exit().remove(),!R)return T;function N(e){l.syncOrAsync([F,E],e)}function F(t){var r;return w?(r="",w.rotate&&(r+="rotate("+[w.rotate,_.x,_.y]+")"),w.offset&&(r+=s(0,w.offset))):r=null,t.attr("transform",r),t.style({"font-family":C,"font-size":n.round(O,2)+"px",fill:u.rgb(P),opacity:k*u.opacity(P),"font-weight":i.fontWeight}).attr(_).call(d.convertToTspans,e),i.previousPromises(e)}function E(e){var t=n.select(e.node().parentNode);if(b&&b.selection&&b.side&&S){t.attr("transform",null);var r=p[b.side],i="left"===b.side||"top"===b.side?-1:1,o=a(b.pad)?b.pad:2,u=c.bBox(t.node()),d={left:0,top:0,right:M.width,bottom:M.height},f=b.maxShift||i*(d[b.side]-u[b.side]),h=0;if(f<0)h=f;else{var m=b.offsetLeft||0,g=b.offsetTop||0;u.left-=m,u.right-=m,u.top-=g,u.bottom-=g,b.selection.each((function(){var e=c.bBox(this);l.bBoxIntersect(u,e,o)&&(h=Math.max(h,i*(e[b.side]-u[r])+o))})),h=Math.min(f,h)}if(h>0||f<0){var v={left:[-h,0],right:[h,0],top:[0,-h],bottom:[0,h]}[b.side];t.attr("transform",s(v[0],v[1]))}}}return z.call(N),I&&(S?z.on(".opacity",null):(k=0,A=!0,z.text(y).on("mouseover.opacity",(function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)}))),z.call(d.makeEditable,{gd:e}).on("edit",(function(t){void 0!==x?o.call("_guiRestyle",e,v,t,x):o.call("_guiRelayout",e,v,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(N)})).on("input",(function(e){this.text(e||" ").call(d.positionText,_.x,_.y)}))),z.classed("js-placeholder",A),T}}},{"../../constants/alignment":207,"../../constants/interactions":211,"../../lib":232,"../../lib/svg_text_utils":255,"../../plots/plots":316,"../../registry":318,"../color":102,"../drawing":124,"@plotly/d3":11,"fast-isnumeric":17}],201:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../color/attributes"),i=e("../../lib/extend").extendFlat,o=e("../../plot_api/edit_types").overrideAll,l=e("../../plots/pad_attributes"),s=e("../../plot_api/plot_template").templatedArray,c=s("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});t.exports=o(s("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(l({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":226,"../../plot_api/edit_types":261,"../../plot_api/plot_template":268,"../../plots/font_attributes":310,"../../plots/pad_attributes":315,"../color/attributes":101}],202:[function(e,t,r){"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:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},{}],203:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/array_container_defaults"),i=e("./attributes"),o=e("./constants").name,l=i.buttons;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}o("visible",a(e,t,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(e,t){function r(r,a){return n.coerce(e,t,l,r,a)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:s})}},{"../../lib":232,"../../plots/array_container_defaults":274,"./attributes":201,"./constants":202}],204:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../plots/plots"),i=e("../color"),o=e("../drawing"),l=e("../../lib"),s=e("../../lib/svg_text_utils"),c=e("../../plot_api/plot_template").arrayEditor,u=e("../../constants/alignment").LINE_SPACING,d=e("./constants"),f=e("./scrollbox");function p(e){return e._index}function h(e,t){return+e.attr(d.menuIndexAttrName)===t._index}function m(e,t,r,n,a,i,o,l){t.active=o,c(e.layout,d.name,t).applyUpdate("active",o),"buttons"===t.type?v(e,n,null,null,t):"dropdown"===t.type&&(a.attr(d.menuIndexAttrName,"-1"),g(e,n,a,i,t),l||v(e,n,a,i,t))}function g(e,t,r,n,a){var i=l.ensureSingle(t,"g",d.headerClassName,(function(e){e.style("pointer-events","all")})),s=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},p={width:s.headerWidth,height:s.headerHeight};i.call(y,a,u,e).call(A,a,f,p),l.ensureSingle(t,"text",d.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(o.font,a.font).text(d.arrowSymbol[a.direction])})).attr({x:s.headerWidth-d.arrowOffsetX+a.pad.l,y:s.headerHeight/2+d.textOffsetY+a.pad.t}),i.on("click",(function(){r.call(L,String(h(r,a)?-1:a._index)),v(e,t,r,n,a)})),i.on("mouseover",(function(){i.call(w)})),i.on("mouseout",(function(){i.call(T,a)})),o.setTranslate(t,s.lx,s.ly)}function v(e,t,r,i,o){r||(r=t).attr("pointer-events","all");var s=function(e){return-1==+e.attr(d.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?d.dropdownButtonClassName:d.buttonClassName,u=r.selectAll("g."+c).data(l.filterVisible(s)),f=u.enter().append("g").classed(c,!0),p=u.exit();"dropdown"===o.type?(f.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var h=0,g=0,v=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=v.headerHeight+d.gapButtonHeader:h=v.headerWidth+d.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-d.gapButtonHeader+d.gapButton-v.openHeight),"dropdown"===o.type&&"left"===o.direction&&(h=-d.gapButtonHeader+d.gapButton-v.openWidth);var b={x:v.lx+h+o.pad.l,y:v.ly+g+o.pad.t,yPad:d.gapButton,xPad:d.gapButton,index:0},M={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(l,s){var c=n.select(this);c.call(y,o,l,e).call(A,o,b),c.on("click",(function(){n.event.defaultPrevented||(l.execute&&(l.args2&&o.active===s?(m(e,o,0,t,r,i,-1),a.executeAPICommand(e,l.method,l.args2)):(m(e,o,0,t,r,i,s),a.executeAPICommand(e,l.method,l.args))),e.emit("plotly_buttonclicked",{menu:o,button:l,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(M.w=Math.max(v.openWidth,v.headerWidth),M.h=b.y-M.t):(M.w=b.x-M.l,M.h=Math.max(v.openHeight,v.headerHeight)),M.direction=o.direction,i&&(u.size()?function(e,t,r,n,a,i){var o,l,s,c=a.direction,u="up"===c||"down"===c,f=a._dims,p=a.active;if(u)for(l=0,s=0;s<p;s++)l+=f.heights[s]+d.gapButton;else for(o=0,s=0;s<p;s++)o+=f.widths[s]+d.gapButton;n.enable(i,o,l),n.hbar&&n.hbar.attr("opacity","0").transition().attr("opacity","1");n.vbar&&n.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,i,o,M):function(e){var t=!!e.hbar,r=!!e.vbar;t&&e.hbar.transition().attr("opacity","0").each("end",(function(){t=!1,r||e.disable()}));r&&e.vbar.transition().attr("opacity","0").each("end",(function(){r=!1,t||e.disable()}))}(i))}function y(e,t,r,n){e.call(x,t).call(b,t,r,n)}function x(e,t){l.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,r,n){var a=l.ensureSingle(e,"text",d.itemTextClassName,(function(e){e.attr({"text-anchor":"start","data-notex":1})})),i=r.label,c=n._fullLayout._meta;c&&(i=l.templateString(i,c)),a.call(o.font,t.font).text(i).call(s.convertToTspans,n)}function _(e,t){var r=t.active;e.each((function(e,a){var o=n.select(this);a===r&&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 T(e,t){e.select("rect."+d.itemRectClassName).call(i.fill,t.bgcolor)}function M(e,t){var r=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(l.filterVisible(t.buttons));i.enter().append("g").classed(d.dropdownButtonClassName,!0);var c=-1!==["up","down"].indexOf(t.direction);i.each((function(a,i){var l=n.select(this);l.call(y,t,a,e);var f=l.select("."+d.itemTextClassName),p=f.node()&&o.bBox(f.node()).width,h=Math.max(p+d.textPadX,d.minWidth),m=t.font.size*u,g=s.lineCount(f),v=Math.max(m*g,d.minHeight)+d.textOffsetY;v=Math.ceil(v),h=Math.ceil(h),r.widths[i]=h,r.heights[i]=v,r.height1=Math.max(r.height1,v),r.width1=Math.max(r.width1,h),c?(r.totalWidth=Math.max(r.totalWidth,h),r.openWidth=r.totalWidth,r.totalHeight+=v+d.gapButton,r.openHeight+=v+d.gapButton):(r.totalWidth+=h+d.gapButton,r.openWidth+=h+d.gapButton,r.totalHeight=Math.max(r.totalHeight,v),r.openHeight=r.totalHeight)})),c?r.totalHeight-=d.gapButton:r.totalWidth-=d.gapButton,r.headerWidth=r.width1+d.arrowPadX,r.headerHeight=r.height1,"dropdown"===t.type&&(c?(r.width1+=d.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=d.arrowPadX),i.remove();var f=r.totalWidth+t.pad.l+t.pad.r,p=r.totalHeight+t.pad.t+t.pad.b,h=e._fullLayout._size;r.lx=h.l+h.w*t.x,r.ly=h.t+h.h*(1-t.y);var m="left";l.isRightAnchor(t)&&(r.lx-=f,m="right"),l.isCenterAnchor(t)&&(r.lx-=f/2,m="center");var g="top";l.isBottomAnchor(t)&&(r.ly-=p,g="bottom"),l.isMiddleAnchor(t)&&(r.ly-=p/2,g="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),a.autoMargin(e,k(t),{x:t.x,y:t.y,l:f*({right:1,center:.5}[m]||0),r:f*({left:1,center:.5}[m]||0),b:p*({top:1,middle:.5}[g]||0),t:p*({bottom:1,middle:.5}[g]||0)})}function k(e){return d.autoMarginIdRoot+e._index}function A(e,t,r,n){n=n||{};var a=e.select("."+d.itemRectClassName),i=e.select("."+d.itemTextClassName),l=t.borderwidth,c=r.index,f=t._dims;o.setTranslate(e,l+r.x,l+r.y);var p=-1!==["up","down"].indexOf(t.direction),h=n.height||(p?f.heights[c]:f.height1);a.attr({x:0,y:0,width:n.width||(p?f.width1:f.widths[c]),height:h});var m=t.font.size*u,g=(s.lineCount(i)-1)*m/2;s.positionText(i,d.textOffsetX,h/2-g+d.textOffsetY),p?r.y+=f.heights[c]+r.yPad:r.x+=f.widths[c]+r.xPad,r.index++}function L(e,t){e.attr(d.menuIndexAttrName,t||"-1").selectAll("g."+d.dropdownButtonClassName).remove()}t.exports=function(e){var t=e._fullLayout,r=l.filterVisible(t[d.name]);function i(t){a.autoMargin(e,k(t))}var o=t._menulayer.selectAll("g."+d.containerClassName).data(r.length>0?[0]:[]);if(o.enter().append("g").classed(d.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+d.headerGroupClassName).each(i)})).remove(),0!==r.length){var s=o.selectAll("g."+d.headerGroupClassName).data(r,p);s.enter().append("g").classed(d.headerGroupClassName,!0);for(var c=l.ensureSingle(o,"g",d.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),u=0;u<r.length;u++){var y=r[u];M(e,y)}var x="updatemenus"+t._uid,b=new f(e,c,x);s.enter().size()&&(c.node().parentNode.appendChild(c.node()),c.call(L)),s.exit().each((function(e){c.call(L),i(e)})).remove(),s.each((function(t){var r=n.select(this),i="dropdown"===t.type?c:null;a.manageCommandObserver(e,t,t.buttons,(function(n){m(e,t,t.buttons[n.index],r,i,b,n.index,!0)})),"dropdown"===t.type?(g(e,r,c,b,t),h(c,t)&&v(e,r,c,b,t)):v(e,r,null,null,t)}))}}},{"../../constants/alignment":207,"../../lib":232,"../../lib/svg_text_utils":255,"../../plot_api/plot_template":268,"../../plots/plots":316,"../color":102,"../drawing":124,"./constants":202,"./scrollbox":206,"@plotly/d3":11}],205:[function(e,t,r){arguments[4][199][0].apply(r,arguments)},{"./attributes":201,"./constants":202,"./defaults":203,"./draw":204,dup:199}],206:[function(e,t,r){"use strict";t.exports=l;var n=e("@plotly/d3"),a=e("../color"),i=e("../drawing"),o=e("../../lib");function l(e,t,r){this.gd=e,this.container=t,this.id=r,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})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(e,t,r){var o=this.gd._fullLayout,s=o.width,c=o.height;this.position=e;var u,d,f,p,h=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,y=this.position.direction,x="down"===y,b="left"===y,_="up"===y,w=m,T=v;x||b||"right"===y||_||(this.position.direction="down",x=!0),x||_?(d=(u=h)+w,x?(f=g,T=(p=Math.min(f+T,c))-f):T=(p=g+T)-(f=Math.max(p-T,0))):(p=(f=g)+T,b?w=(d=h+w)-(u=Math.max(d-w,0)):(u=h,w=(d=Math.min(u+w,s))-u)),this._box={l:u,t:f,w:w,h:T};var M=m>w,k=l.barLength+2*l.barPad,A=l.barWidth+2*l.barPad,L=h,S=g+v;S+A>c&&(S=c-A);var D=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,l.barColor),M?(this.hbar=D.attr({rx:l.barRadius,ry:l.barRadius,x:L,y:S,width:k,height:A}),this._hbarXMin=L+k/2,this._hbarTranslateMax=w-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>T,O=l.barWidth+2*l.barPad,P=l.barLength+2*l.barPad,I=h+m,R=g;I+O>s&&(I=s-O);var z=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,l.barColor),C?(this.vbar=z.attr({rx:l.barRadius,ry:l.barRadius,x:I,y:R,width:O,height:P}),this._vbarYMin=R+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var N=this.id,F=u-.5,E=C?d+O+.5:d+.5,j=f-.5,H=M?p+A+.5:p+.5,B=o._topdefs.selectAll("#"+N).data(M||C?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",N).append("rect"),M||C?(this._clipRect=B.select("rect").attr({x:Math.floor(F),y:Math.floor(j),width:Math.ceil(E)-Math.floor(F),height:Math.ceil(H)-Math.floor(j)}),this.container.call(i.setClipUrl,N,this.gd),this.bg.attr({x:h,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||C){var Y=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(V),C&&this.vbar.on(".drag",null).call(V)}this.setTranslate(t,r)},l.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)},l.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},l.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},l.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,a=r+this._hbarTranslateMax;e=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=t+this._vbarYMin,l=i+this._vbarTranslateMax;t=(o.constrain(n.event.y,i,l)-i)/(l-i)*(this.position.h-this._box.h)}this.setTranslate(e,t)},l.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=o.constrain(e||0,0,r),t=o.constrain(t||0,0,n),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/r;this.hbar.call(i.setTranslate,e+a*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;this.vbar.call(i.setTranslate,e,t+l*this._vbarTranslateMax)}}},{"../../lib":232,"../color":102,"../drawing":124,"@plotly/d3":11}],207:[function(e,t,r){"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,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},{}],208:[function(e,t,r){"use strict";t.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}},{}],209:[function(e,t,r){"use strict";t.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},{}],210:[function(e,t,r){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],211:[function(e,t,r){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],212:[function(e,t,r){"use strict";t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},{}],213:[function(e,t,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],214:[function(e,t,r){"use strict";r.version=e("./version").version,e("native-promise-only"),e("../build/plotcss");for(var n=e("./registry"),a=r.register=n.register,i=e("./plot_api"),o=Object.keys(i),l=0;l<o.length;l++){var s=o[l];"_"!==s.charAt(0)&&(r[s]=i[s]),a({moduleType:"apiMethod",name:s,fn:i[s]})}a(e("./traces/scatter")),a([e("./components/legend"),e("./components/fx"),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"),e("./components/colorscale"),e("./components/colorbar"),e("./components/modebar")]),a([e("./locale-en"),e("./locale-en-us")]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(a(window.PlotlyLocales),delete window.PlotlyLocales),r.Icons=e("./fonts/ploticon");var c=e("./components/fx"),u=e("./plots/plots");r.Plots={resize:u.resize,graphJson:u.graphJson,sendDataToCloud:u.sendDataToCloud},r.Fx={hover:c.hover,unhover:c.unhover,loneHover:c.loneHover,loneUnhover:c.loneUnhover},r.Snapshot=e("./snapshot"),r.PlotSchema=e("./plot_api/plot_schema")},{"../build/plotcss":1,"./components/annotations":93,"./components/annotations3d":98,"./components/colorbar":108,"./components/colorscale":114,"./components/errorbars":130,"./components/fx":142,"./components/grid":146,"./components/images":151,"./components/legend":159,"./components/modebar":165,"./components/rangeselector":173,"./components/rangeslider":180,"./components/shapes":194,"./components/sliders":199,"./components/updatemenus":205,"./fonts/ploticon":215,"./locale-en":259,"./locale-en-us":258,"./plot_api":263,"./plot_api/plot_schema":267,"./plots/plots":316,"./registry":318,"./snapshot":323,"./traces/scatter":370,"./version":391,"native-promise-only":54}],215:[function(e,t,r){"use strict";t.exports={undo:{width:857.1,height:1e3,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",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,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",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height: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",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height: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",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height: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",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height: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",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height: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",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,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",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,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",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height: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",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height: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",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height: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",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height: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",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,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",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,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",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,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",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height: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",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height: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",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'><defs><style>.cls-1 {fill: #3f4f75;} .cls-2 {fill: #80cfbe;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id='symbol'><rect class='cls-1' width='132' height='132' rx='6' ry='6'/><circle class='cls-2' cx='78' cy='54' r='6'/><circle class='cls-2' cx='102' cy='30' r='6'/><circle class='cls-2' cx='78' cy='30' r='6'/><circle class='cls-2' cx='54' cy='30' r='6'/><circle class='cls-2' cx='30' cy='30' r='6'/><circle class='cls-2' cx='30' cy='54' r='6'/><path class='cls-3' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/><path class='cls-3' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/><path class='cls-3' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/><path class='cls-3' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/></g></svg>"}}},{}],216:[function(e,t,r){"use strict";r.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},r.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},r.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},r.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},r.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},r.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},{}],217:[function(e,t,r){"use strict";var n=e("./mod"),a=n.mod,i=n.modHalf,o=Math.PI,l=2*o;function s(e){return Math.abs(e[1]-e[0])>l-1e-14}function c(e,t){return i(t-e,l)}function u(e,t){if(s(t))return!0;var r,n;t[0]<t[1]?(r=t[0],n=t[1]):(r=t[1],n=t[0]),(r=a(r,l))>(n=a(n,l))&&(n+=l);var i=a(e,l),o=i+l;return i>=r&&i<=n||o>=r&&o<=n}function d(e,t,r,n,a,i,c){a=a||0,i=i||0;var u,d,f,p,h,m=s([r,n]);function g(e,t){return[e*Math.cos(t)+a,i-e*Math.sin(t)]}m?(u=0,d=o,f=l):r<n?(u=r,f=n):(u=n,f=r),e<t?(p=e,h=t):(p=t,h=e);var v,y=Math.abs(f-u)<=o?0:1;function x(e,t,r){return"A"+[e,e]+" "+[0,y,r]+" "+g(e,t)}return m?v=null===p?"M"+g(h,u)+x(h,d,0)+x(h,f,0)+"Z":"M"+g(p,u)+x(p,d,0)+x(p,f,0)+"ZM"+g(h,u)+x(h,d,1)+x(h,f,1)+"Z":null===p?(v="M"+g(h,u)+x(h,f,0),c&&(v+="L0,0Z")):v="M"+g(p,u)+"L"+g(h,u)+x(h,f,0)+"L"+g(p,f)+x(p,u,1)+"Z",v}t.exports={deg2rad:function(e){return e/180*o},rad2deg:function(e){return e/o*180},angleDelta:c,angleDist:function(e,t){return Math.abs(c(e,t))},isFullCircle:s,isAngleInsideSector:u,isPtInsideSector:function(e,t,r,n){return!!u(t,n)&&(r[0]<r[1]?(a=r[0],i=r[1]):(a=r[1],i=r[0]),e>=a&&e<=i);var a,i},pathArc:function(e,t,r,n,a){return d(null,e,t,r,n,a,0)},pathSector:function(e,t,r,n,a){return d(null,e,t,r,n,a,1)},pathAnnulus:function(e,t,r,n,a,i){return d(e,t,r,n,a,i,1)}}},{"./mod":239}],218:[function(e,t,r){"use strict";var n=Array.isArray,a=ArrayBuffer,i=DataView;function o(e){return a.isView(e)&&!(e instanceof i)}function l(e){return n(e)||o(e)}function s(e,t,r){if(l(e)){if(l(e[0])){for(var n=r,a=0;a<e.length;a++)n=t(n,e[a].length);return n}return e.length}return 0}r.isTypedArray=o,r.isArrayOrTypedArray=l,r.isArray1D=function(e){return!l(e[0])},r.ensureArray=function(e,t){return n(e)||(e=[]),e.length=t,e},r.concat=function(){var e,t,r,a,i,o,l,s,c=[],u=!0,d=0;for(r=0;r<arguments.length;r++)(o=(a=arguments[r]).length)&&(t?c.push(a):(t=a,i=o),n(a)?e=!1:(u=!1,d?e!==a.constructor&&(e=!1):e=a.constructor),d+=o);if(!d)return[];if(!c.length)return t;if(u)return t.concat.apply(t,c);if(e){for((l=new e(d)).set(t),r=0;r<c.length;r++)a=c[r],l.set(a,i),i+=a.length;return l}for(l=new Array(d),s=0;s<t.length;s++)l[s]=t[s];for(r=0;r<c.length;r++){for(a=c[r],s=0;s<a.length;s++)l[i+s]=a[s];i+=s}return l},r.maxRowLength=function(e){return s(e,Math.max,0)},r.minRowLength=function(e){return s(e,Math.min,1/0)}},{}],219:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../constants/numerical").BADNUM,i=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(e){return"string"==typeof e&&(e=e.replace(i,"")),n(e)?Number(e):a}},{"../constants/numerical":212,"fast-isnumeric":17}],220:[function(e,t,r){"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})}))}},{}],221:[function(e,t,r){"use strict";t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},{}],222:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("tinycolor2"),i=e("../plots/attributes"),o=e("../components/colorscale/scales"),l=e("../components/color"),s=e("../constants/interactions").DESELECTDIM,c=e("./nested_property"),u=e("./regex").counter,d=e("./mod").modHalf,f=e("./array").isArrayOrTypedArray;function p(e,t){var n=r.valObjectMeta[t.valType];if(t.arrayOk&&f(e))return!0;if(n.validateFunction)return n.validateFunction(e,t);var a={},i=a,o={set:function(e){i=e}};return n.coerceFunction(e,o,a,t),i!==a}r.valObjectMeta={data_array:{coerceFunction:function(e,t,r){f(e)?t.set(e):void 0!==r&&t.set(r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),-1===n.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;n<r.length;n++){var a=String(r[n]);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===r[n])return!0}return!1}},boolean:{coerceFunction:function(e,t,r){!0===e||!1===e?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,a){!n(e)||void 0!==a.min&&e<a.min||void 0!==a.max&&e>a.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,a){e%1||!n(e)||void 0!==a.min&&e<a.min||void 0!==a.max&&e>a.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var a="number"==typeof e;!0!==n.strict&&a?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){a(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return a(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(o.get(e,r))}},angle:{coerceFunction:function(e,t,r){"auto"===e?t.set("auto"):n(e)?t.set(d(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||u(r);"string"==typeof e&&a.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!u(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if("string"==typeof e)if(-1===(n.extras||[]).indexOf(e)){for(var a=e.split("+"),i=0;i<a.length;){var o=a[i];-1===n.flags.indexOf(o)||a.indexOf(o)<i?a.splice(i,1):i++}a.length?t.set(a.join("+")):t.set(r)}else t.set(e);else t.set(r)}},any:{coerceFunction:function(e,t,r){void 0===e?t.set(r):t.set(e)}},info_array:{coerceFunction:function(e,t,n,a){function i(e,t,n){var a,i={set:function(e){a=e}};return void 0===n&&(n=t.dflt),r.valObjectMeta[t.valType].coerceFunction(e,i,n,t),a}var o=2===a.dimensions||"1-2"===a.dimensions&&Array.isArray(e)&&Array.isArray(e[0]);if(Array.isArray(e)){var l,s,c,u,d,f,p=a.items,h=[],m=Array.isArray(p),g=m&&o&&Array.isArray(p[0]),v=o&&m&&!g,y=m&&!v?p.length:e.length;if(n=Array.isArray(n)?n:[],o)for(l=0;l<y;l++)for(h[l]=[],c=Array.isArray(e[l])?e[l]:[],d=v?p.length:m?p[l].length:c.length,s=0;s<d;s++)u=v?p[s]:m?p[l][s]:p,void 0!==(f=i(c[s],u,(n[l]||[])[s]))&&(h[l][s]=f);else for(l=0;l<y;l++)void 0!==(f=i(e[l],m?p[l]:p,n[l]))&&(h[l]=f);t.set(h)}else t.set(n)},validateFunction:function(e,t){if(!Array.isArray(e))return!1;var r=t.items,n=Array.isArray(r),a=2===t.dimensions;if(!t.freeLength&&e.length!==r.length)return!1;for(var i=0;i<e.length;i++)if(a){if(!Array.isArray(e[i])||!t.freeLength&&e[i].length!==r[i].length)return!1;for(var o=0;o<e[i].length;o++)if(!p(e[i][o],n?r[i][o]:r))return!1}else if(!p(e[i],n?r[i]:r))return!1;return!0}}},r.coerce=function(e,t,n,a,i){var o=c(n,a).get(),l=c(e,a),s=c(t,a),u=l.get(),d=t._template;if(void 0===u&&d&&(u=c(d,a).get(),d=0),void 0===i&&(i=o.dflt),o.arrayOk&&f(u))return s.set(u),u;var h=r.valObjectMeta[o.valType].coerceFunction;h(u,s,i,o);var m=s.get();return d&&m===i&&!p(u,o)&&(h(u=c(d,a).get(),s,i,o),m=s.get()),m},r.coerce2=function(e,t,n,a,i){var o=c(e,a),l=r.coerce(e,t,n,a,i),s=o.get();return null!=s&&l},r.coerceFont=function(e,t,r){var n={};return r=r||{},n.family=e(t+".family",r.family),n.size=e(t+".size",r.size),n.color=e(t+".color",r.color),n},r.coercePattern=function(e,t,r,n){if(e(t+".shape")){e(t+".solidity"),e(t+".size");var a="overlay"===e(t+".fillmode");if(!n){var i=e(t+".bgcolor",a?r:void 0);e(t+".fgcolor",a?l.contrast(i):r)}e(t+".fgopacity",a?.5:1)}},r.coerceHoverinfo=function(e,t,n){var a,o=t._module.attributes,l=o.hoverinfo?o:i,s=l.hoverinfo;if(1===n._dataLength){var c="all"===s.dflt?s.flags.slice():s.dflt.split("+");c.splice(c.indexOf("name"),1),a=c.join("+")}return r.coerce(e,t,l,"hoverinfo",a)},r.coerceSelectionMarkerOpacity=function(e,t){if(e.marker){var r,n,a=e.marker.opacity;if(void 0!==a)f(a)||e.selected||e.unselected||(r=a,n=s*a),t("selected.marker.opacity",r),t("unselected.marker.opacity",n)}},r.validate=p},{"../components/color":102,"../components/colorscale/scales":117,"../constants/interactions":211,"../plots/attributes":275,"./array":218,"./mod":239,"./nested_property":240,"./regex":248,"fast-isnumeric":17,tinycolor2:67}],223:[function(e,t,r){"use strict";var n,a,i=e("d3-time-format").timeFormat,o=e("fast-isnumeric"),l=e("./loggers"),s=e("./mod").mod,c=e("../constants/numerical"),u=c.BADNUM,d=c.ONEDAY,f=c.ONEHOUR,p=c.ONEMIN,h=c.ONESEC,m=c.EPOCHJD,g=e("../registry"),v=e("d3-time-format").utcFormat,y=/^\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&&g.componentsRegistry.calendars&&"string"==typeof e&&"gregorian"!==e}function w(e,t){return String(e+Math.pow(10,t)).substr(1)}r.dateTick0=function(e,t){var n=function(e,t){return _(e)?t?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:g.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}(e,!!t);if(t<2)return n;var a=r.dateTime2ms(n,e);return a+=d*(t-1),r.ms2DateTime(a,0,e)},r.dfltRange=function(e){return _(e)?g.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]},r.isJSDate=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime},r.dateTime2ms=function(e,t){if(r.isJSDate(e)){var i=e.getTimezoneOffset()*p,o=(e.getUTCMinutes()-e.getMinutes())*p+(e.getUTCSeconds()-e.getSeconds())*h+(e.getUTCMilliseconds()-e.getMilliseconds());if(o){var l=3*p;i=i-l/2+s(o-i+l/2,l)}return(e=Number(e)-i)>=n&&e<=a?e:u}if("string"!=typeof e&&"number"!=typeof e)return u;e=String(e);var c=_(t),v=e.charAt(0);!c||"G"!==v&&"g"!==v||(e=e.substr(1),t="");var w=c&&"chinese"===t.substr(0,7),T=e.match(w?x:y);if(!T)return u;var M=T[1],k=T[3]||"1",A=Number(T[5]||1),L=Number(T[7]||0),S=Number(T[9]||0),D=Number(T[11]||0);if(c){if(2===M.length)return u;var C;M=Number(M);try{var O=g.getComponentMethod("calendars","getCal")(t);if(w){var P="i"===k.charAt(k.length-1);k=parseInt(k,10),C=O.newDate(M,O.toMonthIndex(M,k,P),A)}else C=O.newDate(M,Number(k),A)}catch(e){return u}return C?(C.toJD()-m)*d+L*f+S*p+D*h:u}M=2===M.length?(Number(M)+2e3-b)%100+b:Number(M),k-=1;var I=new Date(Date.UTC(2e3,k,A,L,S));return I.setUTCFullYear(M),I.getUTCMonth()!==k||I.getUTCDate()!==A?u:I.getTime()+D*h},n=r.MIN_MS=r.dateTime2ms("-9999"),a=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(e,t){return r.dateTime2ms(e,t)!==u};var T=90*d,M=3*f,k=5*p;function A(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+w(t,2)+":"+w(r,2),(n||a)&&(e+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;e+="."+w(a,i)}return e}r.ms2DateTime=function(e,t,r){if("number"!=typeof e||!(e>=n&&e<=a))return u;t||(t=0);var i,o,l,c,y,x,b=Math.floor(10*s(e+.05,1)),w=Math.round(e-b/10);if(_(r)){var L=Math.floor(w/d)+m,S=Math.floor(s(e,d));try{i=g.getComponentMethod("calendars","getCal")(r).fromJD(L).formatDate("yyyy-mm-dd")}catch(e){i=v("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<T?Math.floor(S/f):0,l=t<T?Math.floor(S%f/p):0,c=t<M?Math.floor(S%p/h):0,y=t<k?S%h*10+b:0}else x=new Date(w),i=v("%Y-%m-%d")(x),o=t<T?x.getUTCHours():0,l=t<T?x.getUTCMinutes():0,c=t<M?x.getUTCSeconds():0,y=t<k?10*x.getUTCMilliseconds()+b:0;return A(i,o,l,c,y)},r.ms2DateTimeLocal=function(e){if(!(e>=n+d&&e<=a-d))return u;var t=Math.floor(10*s(e+.05,1)),r=new Date(Math.round(e-t/10));return A(i("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},r.cleanDate=function(e,t,n){if(e===u)return t;if(r.isJSDate(e)||"number"==typeof e&&isFinite(e)){if(_(n))return l.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(!(e=r.ms2DateTimeLocal(+e))&&void 0!==t)return t}else if(!r.isDateTime(e,n))return l.error("unrecognized date",e),t;return e};var L=/%\d?f/g,S=/%h/g,D={1:"1",2:"1",3:"2",4:"2"};function C(e,t,r,n){e=e.replace(L,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(t+.05));if(e=e.replace(S,(function(){return D[r("%q")(a)]})),_(n))try{e=g.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(e){return"Invalid"}return r(e)(a)}var O=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(e,t,r,n,a,i){if(a=_(a)&&a,!t)if("y"===r)t=i.year;else if("m"===r)t=i.month;else{if("d"!==r)return function(e,t){var r=s(e+.05,d),n=w(Math.floor(r/f),2)+":"+w(s(Math.floor(r/p),60),2);if("M"!==t){o(t)||(t=0);var a=(100+Math.min(s(e/h,60),O[t])).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+"\n"+C(i.dayMonthYear,e,n,a);t=i.dayMonth+"\n"+i.year}return C(t,e,n,a)};var P=3*d;r.incrementMonth=function(e,t,r){r=_(r)&&r;var n=s(e,d);if(e=Math.round(e-n),r)try{var a=Math.round(e/d)+m,i=g.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-m)*d+n}catch(t){l.error("invalid ms "+e+" in calendar "+r)}var c=new Date(e+P);return c.setUTCMonth(c.getUTCMonth()+t)+n-P},r.findExactDates=function(e,t){for(var r,n,a=0,i=0,l=0,s=0,c=_(t)&&g.getComponentMethod("calendars","getCal")(t),u=0;u<e.length;u++)if(n=e[u],o(n)){if(!(n%d))if(c)try{1===(r=c.fromJD(n/d+m)).day()?1===r.month()?a++:i++:l++}catch(e){}else 1===(r=new Date(n)).getUTCDate()?0===r.getUTCMonth()?a++:i++:l++}else s++;l+=i+=a;var f=e.length-s;return{exactYears:a/f,exactMonths:i/f,exactDays:l/f}}},{"../constants/numerical":212,"../registry":318,"./loggers":236,"./mod":239,"d3-time-format":14,"fast-isnumeric":17}],224:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("./loggers"),i=e("./matrix"),o=e("gl-mat4");function l(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function s(e,t,r){var n="plotly.js-style-"+e,i=document.getElementById(n);i||((i=document.createElement("style")).setAttribute("id",n),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var o=i.sheet;o.insertRule?o.insertRule(t+"{"+r+"}",0):o.addRule?o.addRule(t,r,0):a.warn("addStyleRule failed")}function c(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(e){return+e}))}function u(e){for(var t=[];d(e);)t.push(e),e=e.parentNode;return t}function d(e){return e&&(e instanceof Element||e instanceof HTMLElement)}t.exports={getGraphDiv: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)throw new Error("DOM element provided is null or undefined");return e},isPlotDiv:function(e){var t=n.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")},removeElement:l,addStyleRule:function(e,t){s("global",e,t)},addRelatedStyleRule:s,deleteRelatedStyleRule:function(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&l(r)},getFullTransformMatrix:function(e){var t=u(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach((function(e){var t=c(e);if(t){var n=i.convertCssMatrix(t);r=o.multiply(r,r,n)}})),r},getElementTransformMatrix:c,getElementAndAncestors:u,equalDomRects:function(e,t){return e&&t&&e.x===t.x&&e.y===t.y&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}}},{"./loggers":236,"./matrix":238,"@plotly/d3":11,"gl-mat4":33}],225:[function(e,t,r){"use strict";var n=e("events").EventEmitter,a={init:function(e){if(e._ev instanceof n)return e;var t=new n,r=new n;return e._ev=t,e._internalEv=r,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=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,a){"undefined"!=typeof jQuery&&jQuery(e).trigger(n,a),t.emit(n,a),r.emit(n,a)},e},triggerHandler:function(e,t,r){var n,a;"undefined"!=typeof jQuery&&(n=jQuery(e).triggerHandler(t,r));var i=e._ev;if(!i)return n;var o,l=i._events[t];if(!l)return n;function s(e){return e.listener?(i.removeListener(t,e.listener),e.fired?void 0:(e.fired=!0,e.listener.apply(i,[r]))):e.apply(i,[r])}for(l=Array.isArray(l)?l:[l],o=0;o<l.length-1;o++)s(l[o]);return a=s(l[o]),void 0!==n?n: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:12}],226:[function(e,t,r){"use strict";var n=e("./is_plain_object.js"),a=Array.isArray;function i(e,t,r,o){var l,s,c,u,d,f,p=e[0],h=e.length;if(2===h&&a(p)&&a(e[1])&&0===p.length){if(function(e,t){var r,n;for(r=0;r<e.length;r++){if(null!==(n=e[r])&&"object"==typeof n)return!1;void 0!==n&&(t[r]=n)}return!0}(e[1],p))return p;p.splice(0,p.length)}for(var m=1;m<h;m++)for(s in l=e[m])c=p[s],u=l[s],o&&a(u)?p[s]=u:t&&u&&(n(u)||(d=a(u)))?(d?(d=!1,f=c&&a(c)?c:[]):f=c&&n(c)?c:{},p[s]=i([f,u],t,r,o)):(void 0!==u||r)&&(p[s]=u);return p}r.extendFlat=function(){return i(arguments,!1,!1,!1)},r.extendDeep=function(){return i(arguments,!0,!1,!1)},r.extendDeepAll=function(){return i(arguments,!0,!0,!1)},r.extendDeepNoArrays=function(){return i(arguments,!0,!1,!0)}},{"./is_plain_object.js":233}],227:[function(e,t,r){"use strict";t.exports=function(e){for(var t={},r=[],n=0,a=0;a<e.length;a++){var i=e[a];1!==t[i]&&(t[i]=1,r[n++]=i)}return r}},{}],228:[function(e,t,r){"use strict";function n(e){return!0===e.visible}function a(e){var t=e[0].trace;return!0===t.visible&&0!==t._length}t.exports=function(e){for(var t,r=(t=e,Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace?a:n),i=[],o=0;o<e.length;o++){var l=e[o];r(l)&&i.push(l)}return i}},{}],229:[function(e,t,r){"use strict";var n,a,i,o=e("./mod").mod;function l(e,t,r,n,a,i,o,l){var s=r-e,c=a-e,u=o-a,d=n-t,f=i-t,p=l-i,h=s*p-u*d;if(0===h)return null;var m=(c*p-u*f)/h,g=(c*d-s*f)/h;return g<0||g>1||m<0||m>1?null:{x:e+s*m,y:t+d*m}}function s(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,l=a-t;return o*o+l*l}var s=n*t-a*e;return s*s/r}r.segmentsIntersect=l,r.segmentDistance=function(e,t,r,n,a,i,o,c){if(l(e,t,r,n,a,i,o,c))return 0;var u=r-e,d=n-t,f=o-a,p=c-i,h=u*u+d*d,m=f*f+p*p,g=Math.min(s(u,d,h,a-e,i-t),s(u,d,h,o-e,c-t),s(f,p,m,e-a,t-i),s(f,p,m,r-a,n-i));return Math.sqrt(g)},r.getTextLocation=function(e,t,r,l){if(e===a&&l===i||(n={},a=e,i=l),n[r])return n[r];var s=e.getPointAtLength(o(r-l/2,t)),c=e.getPointAtLength(o(r+l/2,t)),u=Math.atan((c.y-s.y)/(c.x-s.x)),d=e.getPointAtLength(o(r,t)),f={x:(4*d.x+s.x+c.x)/6,y:(4*d.y+s.y+c.y)/6,theta:u};return n[r]=f,f},r.clearLocationCache=function(){a=null},r.getVisibleSegment=function(e,t,r){var n,a,i=t.left,o=t.right,l=t.top,s=t.bottom,c=0,u=e.getTotalLength(),d=u;function f(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(a=r);var c=r.x<i?i-r.x:r.x>o?r.x-o:0,d=r.y<l?l-r.y:r.y>s?r.y-s:0;return Math.sqrt(c*c+d*d)}for(var p=f(c);p;){if((c+=p+r)>d)return;p=f(c)}for(p=f(d);p;){if(c>(d-=p+r))return;p=f(d)}return{min:c,max:d,len:d-c,total:u,isClosed:0===c&&d===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},r.findPointOnPath=function(e,t,r,n){for(var a,i,o,l=(n=n||{}).pathLength||e.getTotalLength(),s=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(l)[r]?-1:1,d=0,f=0,p=l;d<c;){if(a=(f+p)/2,o=(i=e.getPointAtLength(a))[r]-t,Math.abs(o)<s)return i;u*o>0?p=a:f=a,d++}return i}},{"./mod":239}],230:[function(e,t,r){"use strict";t.exports=function(e){return e}},{}],231:[function(e,t,r){"use strict";t.exports=function(e,t){if(!t)return e;var r=1/Math.abs(t),n=r>1?(r*e+r*t)/r:e+t,a=String(n).length;if(a>16){var i=String(t).length;if(a>=String(e).length+i){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},{}],232:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("d3-time-format").utcFormat,i=e("d3-format").format,o=e("fast-isnumeric"),l=e("../constants/numerical"),s=l.FP_SAFE,c=-s,u=l.BADNUM,d=t.exports={};d.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var f={};d.warnBadFormat=function(e){var t=String(e);f[t]||(f[t]=1,d.warn('encountered bad format: "'+t+'"'))},d.noFormat=function(e){return String(e)},d.numberFormat=function(e){var t;try{t=i(d.adjustFormat(e))}catch(t){return d.warnBadFormat(e),d.noFormat}return t},d.nestedProperty=e("./nested_property"),d.keyedContainer=e("./keyed_container"),d.relativeAttr=e("./relative_attr"),d.isPlainObject=e("./is_plain_object"),d.toLogRange=e("./to_log_range"),d.relinkPrivateKeys=e("./relink_private");var p=e("./array");d.isTypedArray=p.isTypedArray,d.isArrayOrTypedArray=p.isArrayOrTypedArray,d.isArray1D=p.isArray1D,d.ensureArray=p.ensureArray,d.concat=p.concat,d.maxRowLength=p.maxRowLength,d.minRowLength=p.minRowLength;var h=e("./mod");d.mod=h.mod,d.modHalf=h.modHalf;var m=e("./coerce");d.valObjectMeta=m.valObjectMeta,d.coerce=m.coerce,d.coerce2=m.coerce2,d.coerceFont=m.coerceFont,d.coercePattern=m.coercePattern,d.coerceHoverinfo=m.coerceHoverinfo,d.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,d.validate=m.validate;var g=e("./dates");d.dateTime2ms=g.dateTime2ms,d.isDateTime=g.isDateTime,d.ms2DateTime=g.ms2DateTime,d.ms2DateTimeLocal=g.ms2DateTimeLocal,d.cleanDate=g.cleanDate,d.isJSDate=g.isJSDate,d.formatDate=g.formatDate,d.incrementMonth=g.incrementMonth,d.dateTick0=g.dateTick0,d.dfltRange=g.dfltRange,d.findExactDates=g.findExactDates,d.MIN_MS=g.MIN_MS,d.MAX_MS=g.MAX_MS;var v=e("./search");d.findBin=v.findBin,d.sorterAsc=v.sorterAsc,d.sorterDes=v.sorterDes,d.distinctVals=v.distinctVals,d.roundUp=v.roundUp,d.sort=v.sort,d.findIndexOfMin=v.findIndexOfMin,d.sortObjectKeys=e("./sort_object_keys");var y=e("./stats");d.aggNums=y.aggNums,d.len=y.len,d.mean=y.mean,d.median=y.median,d.midRange=y.midRange,d.variance=y.variance,d.stdev=y.stdev,d.interp=y.interp;var x=e("./matrix");d.init2dArray=x.init2dArray,d.transposeRagged=x.transposeRagged,d.dot=x.dot,d.translationMatrix=x.translationMatrix,d.rotationMatrix=x.rotationMatrix,d.rotationXYMatrix=x.rotationXYMatrix,d.apply3DTransform=x.apply3DTransform,d.apply2DTransform=x.apply2DTransform,d.apply2DTransform2=x.apply2DTransform2,d.convertCssMatrix=x.convertCssMatrix,d.inverseTransformMatrix=x.inverseTransformMatrix;var b=e("./angles");d.deg2rad=b.deg2rad,d.rad2deg=b.rad2deg,d.angleDelta=b.angleDelta,d.angleDist=b.angleDist,d.isFullCircle=b.isFullCircle,d.isAngleInsideSector=b.isAngleInsideSector,d.isPtInsideSector=b.isPtInsideSector,d.pathArc=b.pathArc,d.pathSector=b.pathSector,d.pathAnnulus=b.pathAnnulus;var _=e("./anchor_utils");d.isLeftAnchor=_.isLeftAnchor,d.isCenterAnchor=_.isCenterAnchor,d.isRightAnchor=_.isRightAnchor,d.isTopAnchor=_.isTopAnchor,d.isMiddleAnchor=_.isMiddleAnchor,d.isBottomAnchor=_.isBottomAnchor;var w=e("./geometry2d");d.segmentsIntersect=w.segmentsIntersect,d.segmentDistance=w.segmentDistance,d.getTextLocation=w.getTextLocation,d.clearLocationCache=w.clearLocationCache,d.getVisibleSegment=w.getVisibleSegment,d.findPointOnPath=w.findPointOnPath;var T=e("./extend");d.extendFlat=T.extendFlat,d.extendDeep=T.extendDeep,d.extendDeepAll=T.extendDeepAll,d.extendDeepNoArrays=T.extendDeepNoArrays;var M=e("./loggers");d.log=M.log,d.warn=M.warn,d.error=M.error;var k=e("./regex");d.counterRegex=k.counter;var A=e("./throttle");d.throttle=A.throttle,d.throttleDone=A.done,d.clearThrottle=A.clear;var L=e("./dom");function S(e){var t={};for(var r in e)for(var n=e[r],a=0;a<n.length;a++)t[n[a]]=+r;return t}d.getGraphDiv=L.getGraphDiv,d.isPlotDiv=L.isPlotDiv,d.removeElement=L.removeElement,d.addStyleRule=L.addStyleRule,d.addRelatedStyleRule=L.addRelatedStyleRule,d.deleteRelatedStyleRule=L.deleteRelatedStyleRule,d.getFullTransformMatrix=L.getFullTransformMatrix,d.getElementTransformMatrix=L.getElementTransformMatrix,d.getElementAndAncestors=L.getElementAndAncestors,d.equalDomRects=L.equalDomRects,d.clearResponsive=e("./clear_responsive"),d.preserveDrawingBuffer=e("./preserve_drawing_buffer"),d.makeTraceGroups=e("./make_trace_groups"),d._=e("./localize"),d.notifier=e("./notifier"),d.filterUnique=e("./filter_unique"),d.filterVisible=e("./filter_visible"),d.pushUnique=e("./push_unique"),d.increment=e("./increment"),d.cleanNumber=e("./clean_number"),d.ensureNumber=function(e){return o(e)?(e=Number(e))>s||e<c?u:e:u},d.isIndex=function(e,t){return!(void 0!==t&&e>=t)&&(o(e)&&e>=0&&e%1==0)},d.noop=e("./noop"),d.identity=e("./identity"),d.repeat=function(e,t){for(var r=new Array(t),n=0;n<t;n++)r[n]=e;return r},d.swapAttrs=function(e,t,r,n){r||(r="x"),n||(n="y");for(var a=0;a<t.length;a++){var i=t[a],o=d.nestedProperty(e,i.replace("?",r)),l=d.nestedProperty(e,i.replace("?",n)),s=o.get();o.set(l.get()),l.set(s)}},d.raiseToTop=function(e){e.parentNode.appendChild(e)},d.cancelTransition=function(e){return e.transition().duration(0)},d.constrain=function(e,t,r){return t>r?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},d.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},d.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),l=0;l<i;l++)o[l]=t(e[l],r,n,a);return o},d.randstr=function e(t,r,n,a){if(n||(n=16),void 0===r&&(r=24),r<=0)return"0";var i,o,l=Math.log(Math.pow(2,r))/Math.log(n),s="";for(i=2;l===1/0;i*=2)l=Math.log(Math.pow(2,r/i))/Math.log(n)*i;var c=l-Math.floor(l);for(i=0;i<Math.floor(l);i++)s=Math.floor(Math.random()*n).toString(n)+s;c&&(o=Math.pow(n,c),s=Math.floor(Math.random()*o).toString(n)+s);var u=parseInt(s,n);return t&&t[s]||u!==1/0&&u>=Math.pow(2,r)?a>10?(d.warn("randstr failed uniqueness"),s):e(t,r,n,(a||0)+1):s},d.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},d.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,a,i,o=e.length,l=2*o,s=2*t-1,c=new Array(s),u=new Array(o);for(r=0;r<s;r++)c[r]=(1-Math.cos(Math.PI*(r+1)/t))/(2*t);for(r=0;r<o;r++){for(i=0,n=0;n<s;n++)(a=r+n+1-t)<-o?a-=l*Math.round(a/l):a>=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=o&&(a=l-1-a),i+=e[a]*c[n];u[r]=i}return u},d.syncOrAsync=function(e,t,r){var n;function a(){return d.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(a);return r&&r(t)},d.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},d.noneOrAll=function(e,t,r){if(e){var n,a=!1,i=!0;for(n=0;n<r.length;n++)null!=e[r[n]]?a=!0:i=!1;if(a&&!i)for(n=0;n<r.length;n++)e[r[n]]=t[r[n]]}},d.mergeArray=function(e,t,r,n){var a="function"==typeof n;if(d.isArrayOrTypedArray(e))for(var i=Math.min(e.length,t.length),o=0;o<i;o++){var l=e[o];t[o][r]=a?n(l):l}},d.mergeArrayCastPositive=function(e,t,r){return d.mergeArray(e,t,r,(function(e){var t=+e;return isFinite(t)&&t>0?t:0}))},d.fillArray=function(e,t,r,n){if(n=n||d.identity,d.isArrayOrTypedArray(e))for(var a=0;a<t.length;a++)t[a][r]=n(e[a])},d.castOption=function(e,t,r,n){n=n||d.identity;var a=d.nestedProperty(e,r).get();return d.isArrayOrTypedArray(a)?Array.isArray(t)&&d.isArrayOrTypedArray(a[t[0]])?n(a[t[0]][t[1]]):n(a[t]):a},d.extractOption=function(e,t,r,n){if(r in e)return e[r];var a=d.nestedProperty(t,n).get();return Array.isArray(a)?void 0:a},d.tagSelected=function(e,t,r){var n,a,i=t.selectedpoints,o=t._indexToPoints;o&&(n=S(o));for(var l=0;l<i.length;l++){var s=i[l];if(d.isIndex(s)||d.isArrayOrTypedArray(s)&&d.isIndex(s[0])&&d.isIndex(s[1])){var c=n?n[s]:s,u=r?r[c]:c;void 0!==(a=u)&&a<e.length&&(e[u].selected=1)}}},d.selIndices2selPoints=function(e){var t=e.selectedpoints,r=e._indexToPoints;if(r){for(var n=S(r),a=[],i=0;i<t.length;i++){var o=t[i];if(d.isIndex(o)){var l=n[o];d.isIndex(l)&&a.push(l)}}return a}return t},d.getTargetArray=function(e,t){var r=t.target;if("string"==typeof r&&r){var n=d.nestedProperty(e,r).get();return!!Array.isArray(n)&&n}return!!Array.isArray(r)&&r},d.minExtend=function(e,t){var r={};"object"!=typeof t&&(t={});var n,a,i,o=Object.keys(e);for(n=0;n<o.length;n++)i=e[a=o[n]],"_"!==a.charAt(0)&&"function"!=typeof i&&("module"===a?r[a]=i:Array.isArray(i)?r[a]="colorscale"===a?i.slice():i.slice(0,3):d.isTypedArray(i)?r[a]=i.subarray(0,3):r[a]=i&&"object"==typeof i?d.minExtend(e[a],t[a]):i);for(o=Object.keys(t),n=0;n<o.length;n++)"object"==typeof(i=t[a=o[n]])&&a in r&&"object"==typeof r[a]||(r[a]=i);return r},d.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},d.containsAny=function(e,t){for(var r=0;r<t.length;r++)if(-1!==e.indexOf(t[r]))return!0;return!1},d.isIE=function(){return void 0!==window.navigator.msSaveBlob};var D=/Version\/[\d\.]+.*Safari/;d.isSafari=function(){return D.test(window.navigator.userAgent)};var C=/iPad|iPhone|iPod/;d.isIOS=function(){return C.test(window.navigator.userAgent)};var O=/Firefox\/(\d+)\.\d+/;d.getFirefoxVersion=function(){var e=O.exec(window.navigator.userAgent);if(e&&2===e.length){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},d.isD3Selection=function(e){return e instanceof n.selection},d.ensureSingle=function(e,t,r,n){var a=e.select(t+(r?"."+r:""));if(a.size())return a;var i=e.append(t);return r&&i.classed(r,!0),n&&i.call(n),i},d.ensureSingleById=function(e,t,r,n){var a=e.select(t+"#"+r);if(a.size())return a;var i=e.append(t).attr("id",r);return n&&i.call(n),i},d.objectFromPath=function(e,t){for(var r,n=e.split("."),a=r={},i=0;i<n.length;i++){var o=n[i],l=null,s=n[i].match(/(.*)\[([0-9]+)\]/);s?(o=s[1],l=s[2],r=r[o]=[],i===n.length-1?r[l]=t:r[l]={},r=r[l]):(i===n.length-1?r[o]=t:r[o]={},r=r[o])}return a};var P=/^([^\[\.]+)\.(.+)?/,I=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;d.expandObjectPaths=function(e){var t,r,n,a,i,o,l;if("object"==typeof e&&!Array.isArray(e))for(r in e)e.hasOwnProperty(r)&&((t=r.match(P))?(a=e[r],n=t[1],delete e[r],e[n]=d.extendDeepNoArrays(e[n]||{},d.objectFromPath(r,d.expandObjectPaths(a))[n])):(t=r.match(I))?(a=e[r],n=t[1],i=parseInt(t[2]),delete e[r],e[n]=e[n]||[],"."===t[3]?(l=t[4],o=e[n][i]=e[n][i]||{},d.extendDeepNoArrays(o,d.objectFromPath(l,d.expandObjectPaths(a)))):e[n][i]=d.expandObjectPaths(a)):e[r]=d.expandObjectPaths(e[r]));return e},d.numSeparate=function(e,t,r){if(r||(r=!1),"string"!=typeof t||0===t.length)throw new Error("Separator string required for formatting!");"number"==typeof e&&(e=String(e));var n=/(\d+)(\d{3})/,a=t.charAt(0),i=t.charAt(1),o=e.split("."),l=o[0],s=o.length>1?a+o[1]:"";if(i&&(o.length>1||l.length>4||r))for(;n.test(l);)l=l.replace(n,"$1"+i+"$2");return l+s},d.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var R=/^\w*$/;d.templateString=function(e,t){var r={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,n){var a;return R.test(n)?a=t[n]:(r[n]=r[n]||d.nestedProperty(t,n).get,a=r[n]()),d.isValidTextValue(a)?a:""}))};var z={max:10,count:0,name:"hovertemplate"};d.hovertemplateString=function(){return E.apply(z,arguments)};var N={max:10,count:0,name:"texttemplate"};d.texttemplateString=function(){return E.apply(N,arguments)};var F=/^[:|\|]/;function E(e,t,r){var n=this,i=arguments;t||(t={});var o={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,l,s){var c,u,f,p="_xother"===l||"_yother"===l,h="_xother_"===l||"_yother_"===l,m="xother_"===l||"yother_"===l,g="xother"===l||"yother"===l||p||m||h,v=l;if((p||h)&&(v=v.substring(1)),(m||h)&&(v=v.substring(0,v.length-1)),g){if(void 0===(c=t[v]))return""}else for(f=3;f<i.length;f++)if(u=i[f]){if(u.hasOwnProperty(v)){c=u[v];break}if(R.test(v)||(c=d.nestedProperty(u,v).get(),(c=o[v]||d.nestedProperty(u,v).get())&&(o[v]=c)),void 0!==c)break}if(void 0===c&&n)return n.count<n.max&&(d.warn("Variable '"+v+"' in "+n.name+" could not be found!"),c=e),n.count===n.max&&d.warn("Too many "+n.name+" warnings - additional warnings will be suppressed"),n.count++,e;if(s){var y;if(":"===s[0]&&(c=(y=r?r.numberFormat:d.numberFormat)(s.replace(F,""))(c)),"|"===s[0]){y=r?r.timeFormat:a;var x=d.dateTime2ms(c);c=d.formatDate(x,s.replace(F,""),!1,y)}}else{var b=v+"Label";t.hasOwnProperty(b)&&(c=t[b])}return g&&(c="("+c+")",(p||h)&&(c=" "+c),(m||h)&&(c+=" ")),c}))}d.subplotSort=function(e,t){for(var r=Math.min(e.length,t.length)+1,n=0,a=0,i=0;i<r;i++){var o=e.charCodeAt(i)||0,l=t.charCodeAt(i)||0,s=o>=48&&o<=57,c=l>=48&&l<=57;if(s&&(n=10*n+o-48),c&&(a=10*a+l-48),!s||!c){if(n!==a)return n-a;if(o!==l)return o-l}}return a-n};var j=2e9;d.seedPseudoRandom=function(){j=2e9},d.pseudoRandom=function(){var e=j;return j=(69069*j+1)%4294967296,Math.abs(j-e)<429496729?d.pseudoRandom():j/4294967296},d.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},a=d.extractOption(e,t,"htx","hovertext");if(d.isValidTextValue(a))return n(a);var i=d.extractOption(e,t,"tx","text");return d.isValidTextValue(i)?n(i):void 0},d.isValidTextValue=function(e){return e||0===e},d.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n<t;n++)-1!==r.indexOf(".")&&(r=(r=r.replace("0%","%")).replace(".%","%"));return r},d.isHidden=function(e){var t=window.getComputedStyle(e).display;return!t||"none"===t},d.strTranslate=function(e,t){return e||t?"translate("+e+","+t+")":""},d.strRotate=function(e){return e?"rotate("+e+")":""},d.strScale=function(e){return 1!==e?"scale("+e+")":""},d.getTextTransform=function(e){var t=e.noCenter,r=e.textX,n=e.textY,a=e.targetX,i=e.targetY,o=e.anchorX||0,l=e.anchorY||0,s=e.rotate,c=e.scale;return c?c>1&&(c=1):c=0,d.strTranslate(a-c*(r+o),i-c*(n+l))+d.strScale(c)+(s?"rotate("+s+(t?"":" "+r+" "+n)+")":"")},d.ensureUniformFontSize=function(e,t){var r=d.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},d.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},d.bigFont=function(e){return Math.round(1.2*e)};var H=d.getFirefoxVersion(),B=null!==H&&H<86;d.getPositionFromD3Event=function(){return B?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{"../constants/numerical":212,"./anchor_utils":216,"./angles":217,"./array":218,"./clean_number":219,"./clear_responsive":221,"./coerce":222,"./dates":223,"./dom":224,"./extend":226,"./filter_unique":227,"./filter_visible":228,"./geometry2d":229,"./identity":230,"./increment":231,"./is_plain_object":233,"./keyed_container":234,"./localize":235,"./loggers":236,"./make_trace_groups":237,"./matrix":238,"./mod":239,"./nested_property":240,"./noop":241,"./notifier":242,"./preserve_drawing_buffer":245,"./push_unique":246,"./regex":248,"./relative_attr":249,"./relink_private":250,"./search":251,"./sort_object_keys":253,"./stats":254,"./throttle":256,"./to_log_range":257,"@plotly/d3":11,"d3-format":13,"d3-time-format":14,"fast-isnumeric":17}],233:[function(e,t,r){"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).hasOwnProperty("hasOwnProperty")}},{}],234:[function(e,t,r){"use strict";var n=e("./nested_property"),a=/^\w*$/;t.exports=function(e,t,r,i){var o,l,s;r=r||"name",i=i||"value";var c={};t&&t.length?(s=n(e,t),l=s.get()):l=e,t=t||"";var u={};if(l)for(o=0;o<l.length;o++)u[l[o][r]]=o;var d=a.test(i),f={set:function(e,t){var a=null===t?4:0;if(!l){if(!s||4===a)return;l=[],s.set(l)}var o=u[e];if(void 0===o){if(4===a)return;a|=3,o=l.length,u[e]=o}else t!==(d?l[o][i]:n(l[o],i).get())&&(a|=2);var p=l[o]=l[o]||{};return p[r]=e,d?p[i]=t:n(p,i).set(t),null!==t&&(a&=-5),c[o]=c[o]|a,f},get:function(e){if(l){var t=u[e];return void 0===t?void 0:d?l[t][i]:n(l[t],i).get()}},rename:function(e,t){var n=u[e];return void 0===n||(c[n]=1|c[n],u[t]=n,delete u[e],l[n][r]=t),f},remove:function(e){var t=u[e];if(void 0===t)return f;var a=l[t];if(Object.keys(a).length>2)return c[t]=2|c[t],f.set(e,null);if(d){for(o=t;o<l.length;o++)c[o]=3|c[o];for(o=t;o<l.length;o++)u[l[o][r]]--;l.splice(t,1),delete u[e]}else n(a,i).set(null),c[t]=6|c[t];return f},constructUpdate:function(){for(var e,a,o={},s=Object.keys(c),u=0;u<s.length;u++)a=s[u],e=t+"["+a+"]",l[a]?(1&c[a]&&(o[e+"."+r]=l[a][r]),2&c[a]&&(o[e+"."+i]=d?4&c[a]?null:l[a][i]:4&c[a]?null:n(l[a],i).get())):o[e]=null;return o}};return f}},{"./nested_property":240}],235:[function(e,t,r){"use strict";var n=e("../registry");t.exports=function(e,t){for(var r=e._context.locale,a=0;a<2;a++){for(var i=e._context.locales,o=0;o<2;o++){var l=(i[r]||{}).dictionary;if(l){var s=l[t];if(s)return s}i=n.localeRegistry}var c=r.split("-")[0];if(c===r)break;r=c}return t}},{"../registry":318}],236:[function(e,t,r){"use strict";var n=e("../plot_api/plot_config").dfltConfig,a=e("./notifier"),i=t.exports={};i.log=function(){var e;if(n.logging>1){var t=["LOG:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(n.notifyOnLogging>1){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);a(r.join("<br>"),"long")}},i.warn=function(){var e;if(n.logging>0){var t=["WARN:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(n.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);a(r.join("<br>"),"stick")}},i.error=function(){var e;if(n.logging>0){var t=["ERROR:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.error.apply(console,t)}if(n.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);a(r.join("<br>"),"stick")}}},{"../plot_api/plot_config":266,"./notifier":242}],237:[function(e,t,r){"use strict";var n=e("@plotly/d3");t.exports=function(e,t,r){var a=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",r),a.order();var i=e.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(e){e[0][i]=n.select(this)})),a}},{"@plotly/d3":11}],238:[function(e,t,r){"use strict";var n=e("gl-mat4");r.init2dArray=function(e,t){for(var r=new Array(e),n=0;n<e;n++)r[n]=new Array(t);return r},r.transposeRagged=function(e){var t,r,n=0,a=e.length;for(t=0;t<a;t++)n=Math.max(n,e[t].length);var i=new Array(n);for(t=0;t<n;t++)for(i[t]=new Array(a),r=0;r<a;r++)i[t][r]=e[r][t];return i},r.dot=function(e,t){if(!e.length||!t.length||e.length!==t.length)return null;var n,a,i=e.length;if(e[0].length)for(n=new Array(i),a=0;a<i;a++)n[a]=r.dot(e[a],t);else if(t[0].length){var o=r.transposeRagged(t);for(n=new Array(o.length),a=0;a<o.length;a++)n[a]=r.dot(e,o[a])}else for(n=0,a=0;a<i;a++)n+=e[a]*t[a];return n},r.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]},r.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]]},r.rotationXYMatrix=function(e,t,n){return r.dot(r.dot(r.translationMatrix(t,n),r.rotationMatrix(e)),r.translationMatrix(-t,-n))},r.apply3DTransform=function(e){return function(){var t=arguments,n=1===arguments.length?t[0]:[t[0],t[1],t[2]||0];return r.dot(e,[n[0],n[1],n[2],1]).slice(0,3)}},r.apply2DTransform=function(e){return function(){var t=arguments;3===t.length&&(t=t[0]);var n=1===arguments.length?t[0]:[t[0],t[1]];return r.dot(e,[n[0],n[1],1]).slice(0,2)}},r.apply2DTransform2=function(e){var t=r.apply2DTransform(e);return function(e){return t(e.slice(0,2)).concat(t(e.slice(2,4)))}},r.convertCssMatrix=function(e){if(e){var t=e.length;if(16===t)return e;if(6===t)return[e[0],e[1],0,0,e[2],e[3],0,0,0,0,1,0,e[4],e[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},r.inverseTransformMatrix=function(e){var t=[];return n.invert(t,e),[[t[0],t[1],t[2],t[3]],[t[4],t[5],t[6],t[7]],[t[8],t[9],t[10],t[11]],[t[12],t[13],t[14],t[15]]]}},{"gl-mat4":33}],239:[function(e,t,r){"use strict";t.exports={mod:function(e,t){var r=e%t;return r<0?r+t:r},modHalf:function(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}}},{}],240:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./array").isArrayOrTypedArray;function i(e,t){return function(){var r,n,o,l,s,c=e;for(l=0;l<t.length-1;l++){if(-1===(r=t[l])){for(n=!0,o=[],s=0;s<c.length;s++)o[s]=i(c[s],t.slice(l+1))(),o[s]!==o[0]&&(n=!1);return n?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[t[l]]))return o}}t.exports=function(e,t){if(n(t))t=String(t);else if("string"!=typeof t||"[-1]"===t.substr(t.length-4))throw"bad property string";for(var r,a,o,l=0,c=t.split(".");l<c.length;){if(r=String(c[l]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(r[1])c[l]=r[1];else{if(0!==l)throw"bad property string";c.splice(0,1)}for(a=r[2].substr(1,r[2].length-2).split("]["),o=0;o<a.length;o++)l++,c.splice(l,0,Number(a[o]))}l++}return"object"!=typeof e?function(e,t,r){return{set:function(){throw"bad container"},get:function(){},astr:t,parts:r,obj:e}}(e,t,c):{set:s(e,c,t),get:i(e,c),astr:t,parts:c,obj:e}};var o=/(^|\.)args\[/;function l(e,t){return void 0===e||null===e&&!t.match(o)}function s(e,t,r){return function(n){var i,o,s=e,f="",p=[[e,f]],h=l(n,r);for(o=0;o<t.length-1;o++){if("number"==typeof(i=t[o])&&!a(s))throw"array index but container is not an array";if(-1===i){if(h=!u(s,t.slice(o+1),n,r))break;return}if(!d(s,i,t[o+1],h))break;if("object"!=typeof(s=s[i])||null===s)throw"container is not an object";f=c(f,i),p.push([s,f])}if(h){if(o===t.length-1&&(delete s[t[o]],Array.isArray(s)&&+t[o]==s.length-1))for(;s.length&&void 0===s[s.length-1];)s.pop()}else s[t[o]]=n}}function c(e,t){var r=t;return n(t)?r="["+t+"]":e&&(r="."+t),e+r}function u(e,t,r,n){var i,o=a(r),c=!0,u=r,f=n.replace("-1",0),p=!o&&l(r,f),h=t[0];for(i=0;i<e.length;i++)f=n.replace("-1",i),o&&(p=l(u=r[i%r.length],f)),p&&(c=!1),d(e,i,h,p)&&s(e[i],t,n.replace("-1",i))(u);return c}function d(e,t,r,n){if(void 0===e[t]){if(n)return!1;e[t]="number"==typeof r?[]:{}}return!0}},{"./array":218,"fast-isnumeric":17}],241:[function(e,t,r){"use strict";t.exports=function(){}},{}],242:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=[];t.exports=function(e,t){if(-1===i.indexOf(e)){i.push(e);var r=1e3;a(t)?r=t:"long"===t&&(r=3e3);var o=n.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 a=n.select(this);a.append("button").classed("notifier-close",!0).html("×").on("click",(function(){a.transition().call(l)}));for(var i=a.append("p"),o=e.split(/<br\s*\/?>/g),s=0;s<o.length;s++)s&&i.append("br"),i.append("span").text(o[s]);"stick"===t?a.transition().duration(350).style("opacity",1):a.transition().duration(700).style("opacity",1).transition().delay(r).call(l)}))}function l(e){e.duration(700).style("opacity",0).each("end",(function(e){var t=i.indexOf(e);-1!==t&&i.splice(t,1),n.select(this).remove()}))}}},{"@plotly/d3":11,"fast-isnumeric":17}],243:[function(e,t,r){"use strict";var n=e("./setcursor"),a="data-savedcursor";t.exports=function(e,t){var r=e.attr(a);if(t){if(!r){for(var i=(e.attr("class")||"").split(" "),o=0;o<i.length;o++){var l=i[o];0===l.indexOf("cursor-")&&e.attr(a,l.substr(7)).classed(l,!1)}e.attr(a)||e.attr(a,"!!")}n(e,t)}else r&&(e.attr(a,null),"!!"===r?n(e):n(e,r))}},{"./setcursor":252}],244:[function(e,t,r){"use strict";var n=e("./matrix").dot,a=e("../constants/numerical").BADNUM,i=t.exports={};i.tester=function(e){var t,r=e.slice(),n=r[0][0],i=n,o=r[0][1],l=o;for(r.push(r[0]),t=1;t<r.length;t++)n=Math.min(n,r[t][0]),i=Math.max(i,r[t][0]),o=Math.min(o,r[t][1]),l=Math.max(l,r[t][1]);var s,c=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(c=!0,s=function(e){return e[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(c=!0,s=function(e){return e[1]===r[0][1]}));var u=!0,d=r[0];for(t=1;t<r.length;t++)if(d[0]!==r[t][0]||d[1]!==r[t][1]){u=!1;break}return{xmin:n,xmax:i,ymin:o,ymax:l,pts:r,contains:c?function(e,t){var r=e[0],c=e[1];return!(r===a||r<n||r>i||c===a||c<o||c>l)&&(!t||!s(e))}:function(e,t){var s=e[0],c=e[1];if(s===a||s<n||s>i||c===a||c<o||c>l)return!1;var u,d,f,p,h,m=r.length,g=r[0][0],v=r[0][1],y=0;for(u=1;u<m;u++)if(d=g,f=v,g=r[u][0],v=r[u][1],!(s<(p=Math.min(d,g))||s>Math.max(d,g)||c>Math.max(f,v)))if(c<Math.min(f,v))s!==p&&y++;else{if(c===(h=g===d?c:f+(s-d)*(v-f)/(g-d)))return 1!==u||!t;c<=h&&s!==p&&y++}return y%2==1},isRect:c,degenerate:u}},i.isSegmentBent=function(e,t,r,a){var i,o,l,s=e[t],c=[e[r][0]-s[0],e[r][1]-s[1]],u=n(c,c),d=Math.sqrt(u),f=[-c[1]/d,c[0]/d];for(i=t+1;i<r;i++)if(o=[e[i][0]-s[0],e[i][1]-s[1]],(l=n(o,c))<0||l>u||Math.abs(n(o,f))>a)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var l=r.length,s=n;r.splice(a+1);for(var c=s+1;c<e.length;c++)(c===e.length-1||i.isSegmentBent(e,s,c+1,t))&&(r.push(e[c]),r.length<l-2&&(n=c,a=r.length-1),s=c)}e.length>1&&o(e.pop());return{addPt:o,raw:e,filtered:r}}},{"../constants/numerical":212,"./matrix":238}],245:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("is-mobile");t.exports=function(e){var t;if("string"!=typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;"undefined"!=typeof navigator&&(e=navigator.userAgent);e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]);return e}()))return!0;var r=a({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var i=t.split(" "),o=1;o<i.length;o++){if(-1!==i[o].indexOf("Safari"))for(var l=o-1;l>-1;l--){var s=i[l];if("Version/"===s.substr(0,8)){var c=s.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{"fast-isnumeric":17,"is-mobile":51}],246:[function(e,t,r){"use strict";t.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),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}},{}],247:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plot_api/plot_config").dfltConfig;var i={add:function(e,t,r,n,i){var o,l;e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},l=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(l,e.undoQueue.queue.length-l,o),e.undoQueue.index+=1):o=e.undoQueue.queue[l-1],e.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(t),o.undo.args.unshift(r),o.redo.calls.push(n),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,r;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,r=0;r<t.undo.calls.length;r++)i.plotDo(e,t.undo.calls[r],t.undo.args[r]);e.undoQueue.inSequence=!1,e.autoplay=!1}},redo:function(e){var t,r;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,r=0;r<t.redo.calls.length;r++)i.plotDo(e,t.redo.calls[r],t.redo.args[r]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}}};i.plotDo=function(e,t,r){e.autoplay=!0,r=function(e,t){for(var r,a=[],i=0;i<t.length;i++)r=t[i],a[i]=r===e?r:"object"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return a}(e,r),t.apply(null,r)},t.exports=i},{"../lib":232,"../plot_api/plot_config":266}],248:[function(e,t,r){"use strict";r.counter=function(e,t,r,n){var a=(t||"")+(r?"":"$"),i=!1===n?"":"^";return"xy"===e?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+a):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+a)}},{}],249:[function(e,t,r){"use strict";var n=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,a=/^[^\.\[\]]+$/;t.exports=function(e,t){for(;t;){var r=e.match(n);if(r)e=r[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}},{}],250:[function(e,t,r){"use strict";var n=e("./array").isArrayOrTypedArray,a=e("./is_plain_object");t.exports=function e(t,r){for(var i in r){var o=r[i],l=t[i];if(l!==o)if("_"===i.charAt(0)||"function"==typeof o){if(i in t)continue;t[i]=o}else if(n(o)&&n(l)&&a(o[0])){if("customdata"===i||"ids"===i)continue;for(var s=Math.min(o.length,l.length),c=0;c<s;c++)l[c]!==o[c]&&a(o[c])&&a(l[c])&&e(l[c],o[c])}else a(o)&&a(l)&&(e(l,o),Object.keys(l).length||delete t[i])}}},{"./array":218,"./is_plain_object":233}],251:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./loggers"),i=e("./identity"),o=e("../constants/numerical").BADNUM;function l(e,t){return e<t}function s(e,t){return e<=t}function c(e,t){return e>t}function u(e,t){return e>=t}r.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-1e-9)-1:Math.floor((e-t.start)/t.size+1e-9);var i,o,d=0,f=t.length,p=0,h=f>1?(t[f-1]-t[0])/(f-1):1;for(o=h>=0?r?l:s:r?u:c,e+=1e-9*h*(r?-1:1)*(h>=0?1:-1);d<f&&p++<100;)o(t[i=Math.floor((d+f)/2)],e)?d=i+1:f=i;return p>90&&a.log("Long binary search..."),d-1},r.sorterAsc=function(e,t){return e-t},r.sorterDes=function(e,t){return t-e},r.distinctVals=function(e){var t,n=e.slice();for(n.sort(r.sorterAsc),t=n.length-1;t>-1&&n[t]===o;t--);for(var a,i=n[t]-n[0]||1,l=i/(t||1)/1e4,s=[],c=0;c<=t;c++){var u=n[c],d=u-a;void 0===a?(s.push(u),a=u):d>l&&(i=Math.min(i,d),s.push(u),a=u)}return{vals:s,minDiff:i}},r.roundUp=function(e,t,r){for(var n,a=0,i=t.length-1,o=0,l=r?0:1,s=r?1:0,c=r?Math.ceil:Math.floor;a<i&&o++<100;)t[n=c((a+i)/2)]<=e?a=n+l:i=n-s;return t[a]},r.sort=function(e,t){for(var r=0,n=0,a=1;a<e.length;a++){var i=t(e[a],e[a-1]);if(i<0?r=1:i>0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},r.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;a<e.length;a++){var o=t(e[a]);o<n&&(n=o,r=a)}return r}},{"../constants/numerical":212,"./identity":230,"./loggers":236,"fast-isnumeric":17}],252:[function(e,t,r){"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)}},{}],253:[function(e,t,r){"use strict";t.exports=function(e){return Object.keys(e).sort()}},{}],254:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./array").isArrayOrTypedArray;r.aggNums=function(e,t,i,o){var l,s;if((!o||o>i.length)&&(o=i.length),n(t)||(t=!1),a(i[0])){for(s=new Array(o),l=0;l<o;l++)s[l]=r.aggNums(e,t,i[l]);i=s}for(l=0;l<o;l++)n(t)?n(i[l])&&(t=e(+t,+i[l])):t=i[l];return t},r.len=function(e){return r.aggNums((function(e){return e+1}),0,e)},r.mean=function(e,t){return t||(t=r.len(e)),r.aggNums((function(e,t){return e+t}),0,e)/t},r.midRange=function(e){if(void 0!==e&&0!==e.length)return(r.aggNums(Math.max,null,e)+r.aggNums(Math.min,null,e))/2},r.variance=function(e,t,a){return t||(t=r.len(e)),n(a)||(a=r.mean(e,t)),r.aggNums((function(e,t){return e+Math.pow(t-a,2)}),0,e)/t},r.stdev=function(e,t,n){return Math.sqrt(r.variance(e,t,n))},r.median=function(e){var t=e.slice().sort();return r.interp(t,.5)},r.interp=function(e,t){if(!n(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 r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},{"./array":218,"fast-isnumeric":17}],255:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../lib"),i=a.strTranslate,o=e("../constants/xmlns_namespaces"),l=e("../constants/alignment").LINE_SPACING,s=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(e,t,h){var k=e.text(),A=!e.attr("data-notex")&&"undefined"!=typeof MathJax&&k.match(s),D=n.select(e.node().parentNode);if(!D.empty()){var C=e.attr("class")?e.attr("class").split(" ")[0]:"text";return C+="-math",D.selectAll("svg."+C).remove(),D.selectAll("g."+C+"-group").remove(),e.style("display",null).attr({"data-unformatted":k,"data-math":"N"}),A?(t&&t._promises||[]).push(new Promise((function(t){e.style("display","none");var r=parseInt(e.node().style.fontSize,10),o={fontSize:r};!function(e,t,r){var i,o,l,s;MathJax.Hub.Queue((function(){return o=a.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]},displayAlign:"left"})}),(function(){if("SVG"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),(function(){var r="math-output-"+a.randstr({},64);return s=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute"}).style({"font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt ")),MathJax.Hub.Typeset(s.node())}),(function(){var t=n.select("body").select("#MathJax_SVG_glyphs");if(s.select(".MathJax_SVG").empty()||!s.select("svg").node())a.log("There was an error in the tex syntax.",e),r();else{var o=s.select("svg").node().getBoundingClientRect();r(s.select(".MathJax_SVG"),t,o)}if(s.remove(),"SVG"!==i)return MathJax.Hub.setRenderer(i)}),(function(){return void 0!==l&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(o)}))}(A[2],o,(function(n,a,o){D.selectAll("svg."+C).remove(),D.selectAll("g."+C+"-group").remove();var l=n&&n.select("svg");if(!l||!l.node())return O(),void t();var s=D.append("g").classed(C+"-group",!0).attr({"pointer-events":"none","data-unformatted":k,"data-math":"Y"});s.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild);var c=o.width,u=o.height;l.attr({class:C,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var d=e.node().style.fill||"black",f=l.select("g");f.attr({fill:d,stroke:d});var p=f.node().getBoundingClientRect(),m=p.width,g=p.height;(m>c||g>u)&&(l.style("overflow","hidden"),m=(p=l.node().getBoundingClientRect()).width,g=p.height);var v=+e.attr("x"),y=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===C[0])s.attr({transform:"rotate("+[-90,v,y]+")"+i(-m/2,x-g/2)});else if("l"===C[0])y=x-g/2;else if("a"===C[0]&&0!==C.indexOf("atitle"))v=0,y=x;else{var b=e.attr("text-anchor");v-=m*("middle"===b?.5:"end"===b?1:0),y=y+x-g/2}l.attr({x:v,y:y}),h&&h.call(e,s),t(s)}))}))):O(),e}function O(){D.empty()||(C=e.attr("class")+"-math",D.select("svg."+C).remove()),e.text("").style("white-space","pre"),function(e,t){t=t.replace(m," ");var r,i=!1,s=[],c=-1;function u(){c++;var t=document.createElementNS(o.svg,"tspan");n.select(t).attr({class:"line",dy:c*l+"em"}),e.appendChild(t),r=t;var a=s;if(s=[{node:t}],a.length>1)for(var i=1;i<a.length;i++)h(a[i])}function h(e){var t,a=e.type,i={};if("a"===a){t="a";var l=e.target,c=e.href,u=e.popup;c&&(i={"xlink:xlink:show":"_blank"===l||"_"!==l.charAt(0)?"new":"replace",target:l,"xlink:xlink:href":c},u&&(i.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+u+'");return false;'))}else t="tspan";e.style&&(i.style=e.style);var d=document.createElementNS(o.svg,t);if("sup"===a||"sub"===a){k(r,"\u200b"),r.appendChild(d);var h=document.createElementNS(o.svg,"tspan");k(h,"\u200b"),n.select(h).attr("dy",p[a]),i.dy=f[a],r.appendChild(d),r.appendChild(h)}else r.appendChild(d);n.select(d).attr(i),r=e.node=d,s.push(e)}function k(e,t){e.appendChild(document.createTextNode(t))}function A(e){if(1!==s.length){var n=s.pop();e!==n.type&&a.log("Start tag <"+n.type+"> doesnt match end tag <"+e+">. Pretending it did match.",t),r=s[s.length-1].node}else a.log("Ignoring unexpected end tag </"+e+">.",t)}y.test(t)?u():(r=e,s=[{node:e}]);for(var D=t.split(g),C=0;C<D.length;C++){var O=D[C],P=O.match(v),I=P&&P[2].toLowerCase(),R=d[I];if("br"===I)u();else if(void 0===R)k(r,L(O));else if(P[1])A(I);else{var z=P[4],N={type:I},F=T(z,x);if(F?(F=F.replace(M,"$1 fill:"),R&&(F+=";"+R)):R&&(F=R),F&&(N.style=F),"a"===I){i=!0;var E=T(z,b);if(E){var j=S(E);j&&(N.href=j,N.target=T(z,_)||"_blank",N.popup=T(z,w))}}h(N)}}return i}(e.node(),k)&&e.style("pointer-events","all"),r.positionText(e),h&&h.call(e)}};var c=/(<|<|<)/g,u=/(>|>|>)/g;var d={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"},f={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},h=["http:","https:","mailto:","",void 0,":"],m=r.NEWLINES=/(\r\n?|\n)/g,g=/(<[^<>]*>)/,v=/<(\/?)([^ >]*)(\s+(.*))?>/i,y=/<br(\s+.*)?>/i;r.BR_TAG_ALL=/<br(\s+.*)?>/gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,b=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,w=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function T(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&L(n)}var M=/(^|;)\s*color:/;r.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],a="...".length,i=e.split(g),o=[],l="",s=0,c=0;c<i.length;c++){var u=i[c],d=u.match(v),f=d&&d[2].toLowerCase();if(f)-1!==n.indexOf(f)&&(o.push(u),l=f);else{var p=u.length;if(s+p<r)o.push(u),s+=p;else if(s<r){var h=r-s;l&&("br"!==l||h<=a||p<=a)&&o.pop(),r>a?o.push(u.substr(0,h-a)+"..."):o.push(u.substr(0,h));break}l=""}}return o.join("")};var k={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function L(e){return e.replace(A,(function(e,t){return("#"===t.charAt(0)?function(e){if(e>1114111)return;var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):k[t])||e}))}function S(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var a=r.protocol,i=n.protocol;return-1!==h.indexOf(a)&&-1!==h.indexOf(i)?t:""}function D(e,t,r){var n,i,o,l=r.horizontalAlign,s=r.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return i="bottom"===s?function(){return c.bottom-n.height}:"middle"===s?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===l?function(){return c.right-n.width}:"center"===l?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var e=o()-u.left,t=i()-u.top,l=r.gd||{};if(r.gd){l._fullLayout._calcInverseTransform(l);var s=a.apply3DTransform(l._fullLayout._invTransform)(e,t);e=s[0],t=s[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}r.convertEntities=L,r.sanitizeHTML=function(e){e=e.replace(m," ");for(var t=document.createElement("p"),r=t,a=[],i=e.split(g),o=0;o<i.length;o++){var l=i[o],s=l.match(v),c=s&&s[2].toLowerCase();if(c in d)if(s[1])a.length&&(r=a.pop());else{var u=s[4],f=T(u,x),p=f?{style:f}:{};if("a"===c){var h=T(u,b);if(h){var y=S(h);if(y){p.href=y;var w=T(u,_);w&&(p.target=w)}}}var M=document.createElement(c);r.appendChild(M),n.select(M).attr(p),r=M,a.push(M)}else r.appendChild(document.createTextNode(L(l)))}return t.innerHTML},r.lineCount=function(e){return e.selectAll("tspan.line").size()||1},r.positionText=function(e,t,r){return e.each((function(){var e=n.select(this);function a(t,r){return void 0===r?null===(r=e.attr(t))&&(e.attr(t,0),r=0):e.attr(t,r),r}var i=a("x",t),o=a("y",r);"text"===this.nodeName&&e.selectAll("tspan.line").attr({x:i,y:o})}))};r.makeTextShadow=function(e){var t="1px ",r="1px ",n="1px ";return t+r+n+e+", -"+t+"-"+r+n+e+", "+t+"-"+r+n+e+", -"+t+r+n+e},r.makeEditable=function(e,t){var r=t.gd,a=t.delegate,i=n.dispatch("edit","input","cancel"),o=a||e;if(e.style({"pointer-events":a?"none":"all"}),1!==e.size())throw new Error("boo");function l(){!function(){var a=n.select(r).select(".svg-container"),o=a.append("div"),l=e.node().style,c=parseFloat(l.fontSize||12),u=t.text;void 0===u&&(u=e.attr("data-unformatted"));o.classed("plugin-editable editable",!0).style({position:"absolute","font-family":l.fontFamily||"Arial","font-size":c,color:t.fill||l.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(D(e,a,t)).on("blur",(function(){r._editing=!1,e.text(this.textContent).style({opacity:1});var t,a=n.select(this).attr("class");(t=a?"."+a.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(e.node().parentNode).select(t).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),i.edit.call(e,o)})).on("focus",(function(){var e=this;r._editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===e)return!1;document.activeElement===o.node()&&o.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r._editing=!1,e.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),i.cancel.call(e,this.textContent)):(i.input.call(e,this.textContent),n.select(this).call(D(e,a,t)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(s)}(),e.style({opacity:0});var a,l=o.attr("class");(a=l?"."+l.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(e.node().parentNode).select(a).style({opacity:0})}function s(e){var t=e.node(),r=document.createRange();r.selectNodeContents(t);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),t.focus()}return t.immediate?l():o.on("click",l),n.rebind(e,i,"on")}},{"../constants/alignment":207,"../constants/xmlns_namespaces":213,"../lib":232,"@plotly/d3":11}],256:[function(e,t,r){"use strict";var n={};function a(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}r.throttle=function(e,t,r){var i=n[e],o=Date.now();if(!i){for(var l in n)n[l].ts<o-6e4&&delete n[l];i=n[e]={ts:0,timer:null}}function s(){r(),i.ts=Date.now(),i.onDone&&(i.onDone(),i.onDone=null)}a(i),o>i.ts+t?s():i.timer=setTimeout((function(){s(),i.timer=null}),t)},r.done=function(e){var t=n[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},r.clear=function(e){if(e)a(n[e]),delete n[e];else for(var t in n)r.clear(t)}},{}],257:[function(e,t,r){"use strict";var n=e("fast-isnumeric");t.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}},{"fast-isnumeric":17}],258:[function(e,t,r){"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"}}},{}],259:[function(e,t,r){"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"}}},{}],260:[function(e,t,r){"use strict";var n=e("../registry");t.exports=function(e){for(var t,r,a=n.layoutArrayContainers,i=n.layoutArrayRegexes,o=e.split("[")[0],l=0;l<i.length;l++)if((r=e.match(i[l]))&&0===r.index){t=r[0];break}if(t||(t=a[a.indexOf(o)]),!t)return!1;var s=e.substr(t.length);return s?!!(r=s.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:t,index:Number(r[1]),property:r[3]||""}:{array:t,index:"",property:""}}},{"../registry":318}],261:[function(e,t,r){"use strict";var n=e("../lib"),a=n.extendFlat,i=n.isPlainObject,o={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},l={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},s=o.flags.slice().concat(["fullReplot"]),c=l.flags.slice().concat("layoutReplot");function u(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!1;return t}function d(e,t,r){var n=a({},e);for(var o in n){var l=n[o];i(l)&&(n[o]=f(l,t,r,o))}return"from-root"===r&&(n.editType=t),n}function f(e,t,r,n){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,"_"===n.charAt(0)?"nested":"from-root")}t.exports={traces:o,layout:l,traceFlags:function(){return u(s)},layoutFlags:function(){return u(c)},update:function(e,t){var r=t.editType;if(r&&"none"!==r)for(var n=r.split("+"),a=0;a<n.length;a++)e[n[a]]=!0},overrideAll:d}},{"../lib":232}],262:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("gl-mat4/fromQuat"),i=e("../registry"),o=e("../lib"),l=e("../plots/plots"),s=e("../plots/cartesian/axis_ids"),c=e("../components/color"),u=s.cleanId,d=s.getFromTrace,f=i.traceIs;function p(e,t){var r=e[t],n=t.charAt(0);r&&"paper"!==r&&(e[t]=u(r,n,!0))}function h(e){function t(t,r){var n=e[t],a=e.title&&e.title[r];n&&!a&&(e.title||(e.title={}),e.title[r]=e[t],delete e[t])}e&&("string"!=typeof e.title&&"number"!=typeof e.title||(e.title={text:e.title}),t("titlefont","font"),t("titleposition","position"),t("titleside","side"),t("titleoffset","offset"))}function m(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 g(e,t,r,n){if(r&&!n)return e;if(n&&!r)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 v(e){var t="middle",r="center";return"string"==typeof e&&(-1!==e.indexOf("top")?t="top":-1!==e.indexOf("bottom")&&(t="bottom"),-1!==e.indexOf("left")?r="left":-1!==e.indexOf("right")&&(r="right")),t+" "+r}function y(e,t){return t in e&&"object"==typeof e[t]&&0===Object.keys(e[t]).length}r.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},r.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 i=(l.subplotsRegistry.cartesian||{}).attrRegex,s=(l.subplotsRegistry.polar||{}).attrRegex,d=(l.subplotsRegistry.ternary||{}).attrRegex,f=(l.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(e);for(t=0;t<m.length;t++){var g=m[t];if(i&&i.test(g)){var v=e[g];v.anchor&&"free"!==v.anchor&&(v.anchor=u(v.anchor)),v.overlaying&&(v.overlaying=u(v.overlaying)),v.type||(v.isdate?v.type="date":v.islog?v.type="log":!1===v.isdate&&!1===v.islog&&(v.type="linear")),"withzero"!==v.autorange&&"tozero"!==v.autorange||(v.autorange=!0,v.rangemode="tozero"),delete v.islog,delete v.isdate,delete v.categories,y(v,"domain")&&delete v.domain,void 0!==v.autotick&&(void 0===v.tickmode&&(v.tickmode=v.autotick?"auto":"linear"),delete v.autotick),h(v)}else if(s&&s.test(g)){h(e[g].radialaxis)}else if(d&&d.test(g)){var x=e[g];h(x.aaxis),h(x.baxis),h(x.caxis)}else if(f&&f.test(g)){var b=e[g],_=b.cameraposition;if(Array.isArray(_)&&4===_[0].length){var w=_[0],T=_[1],M=_[2],k=a([],w),A=[];for(n=0;n<3;++n)A[n]=T[n]+M*k[2+4*n];b.camera={eye:{x:A[0],y:A[1],z:A[2]},center:{x:T[0],y:T[1],z:T[2]},up:{x:0,y:0,z:1}},delete b.cameraposition}h(b.xaxis),h(b.yaxis),h(b.zaxis)}}var L=Array.isArray(e.annotations)?e.annotations.length:0;for(t=0;t<L;t++){var S=e.annotations[t];o.isPlainObject(S)&&(S.ref&&("paper"===S.ref?(S.xref="paper",S.yref="paper"):"data"===S.ref&&(S.xref="x",S.yref="y"),delete S.ref),p(S,"xref"),p(S,"yref"))}var D=Array.isArray(e.shapes)?e.shapes.length:0;for(t=0;t<D;t++){var C=e.shapes[t];o.isPlainObject(C)&&(p(C,"xref"),p(C,"yref"))}var O=Array.isArray(e.images)?e.images.length:0;for(t=0;t<O;t++){var P=e.images[t];o.isPlainObject(P)&&(p(P,"xref"),p(P,"yref"))}var I=e.legend;return I&&(I.x>3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),h(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),c.clean(e),e.template&&e.template.layout&&r.cleanLayout(e.template.layout),e},r.cleanData=function(e){for(var t=0;t<e.length;t++){var n,a=e[t];if("histogramy"===a.type&&"xbins"in a&&!("ybins"in a)&&(a.ybins=a.xbins,delete a.xbins),a.error_y&&"opacity"in a.error_y){var s=c.defaults,d=a.error_y.color||(f(a,"bar")?c.defaultLine:s[t%s.length]);a.error_y.color=c.addOpacity(c.rgb(d),c.opacity(d)*a.error_y.opacity),delete a.error_y.opacity}if("bardir"in a&&("h"!==a.bardir||!f(a,"bar")&&"histogram"!==a.type.substr(0,9)||(a.orientation="h",r.swapXYData(a)),delete a.bardir),"histogramy"===a.type&&r.swapXYData(a),"histogramx"!==a.type&&"histogramy"!==a.type||(a.type="histogram"),"scl"in a&&!("colorscale"in a)&&(a.colorscale=a.scl,delete a.scl),"reversescl"in a&&!("reversescale"in a)&&(a.reversescale=a.reversescl,delete a.reversescl),a.xaxis&&(a.xaxis=u(a.xaxis,"x")),a.yaxis&&(a.yaxis=u(a.yaxis,"y")),f(a,"gl3d")&&a.scene&&(a.scene=l.subplotsRegistry.gl3d.cleanId(a.scene)),!f(a,"pie-like")&&!f(a,"bar-like"))if(Array.isArray(a.textposition))for(n=0;n<a.textposition.length;n++)a.textposition[n]=v(a.textposition[n]);else a.textposition&&(a.textposition=v(a.textposition));var p=i.getModule(a);if(p&&p.colorbar){var x=p.colorbar.container,b=x?a[x]:a;b&&b.colorscale&&("YIGnBu"===b.colorscale&&(b.colorscale="YlGnBu"),"YIOrRd"===b.colorscale&&(b.colorscale="YlOrRd"))}if("surface"===a.type&&o.isPlainObject(a.contours)){var _=["x","y","z"];for(n=0;n<_.length;n++){var w=a.contours[_[n]];o.isPlainObject(w)&&(w.highlightColor&&(w.highlightcolor=w.highlightColor,delete w.highlightColor),w.highlightWidth&&(w.highlightwidth=w.highlightWidth,delete w.highlightWidth))}}if("candlestick"===a.type||"ohlc"===a.type){var T=!1!==(a.increasing||{}).showlegend,M=!1!==(a.decreasing||{}).showlegend,k=m(a.increasing),A=m(a.decreasing);if(!1!==k&&!1!==A){var L=g(k,A,T,M);L&&(a.name=L)}else!k&&!A||a.name||(a.name=k||A)}if(Array.isArray(a.transforms)){var S=a.transforms;for(n=0;n<S.length;n++){var D=S[n];if(o.isPlainObject(D))switch(D.type){case"filter":D.filtersrc&&(D.target=D.filtersrc,delete D.filtersrc),D.calendar&&(D.valuecalendar||(D.valuecalendar=D.calendar),delete D.calendar);break;case"groupby":if(D.styles=D.styles||D.style,D.styles&&!Array.isArray(D.styles)){var C=D.styles,O=Object.keys(C);D.styles=[];for(var P=0;P<O.length;P++)D.styles.push({target:O[P],value:C[O[P]]})}}}}y(a,"line")&&delete a.line,"marker"in a&&(y(a.marker,"line")&&delete a.marker.line,y(a,"marker")&&delete a.marker),c.clean(a),a.autobinx&&(delete a.autobinx,delete a.xbins),a.autobiny&&(delete a.autobiny,delete a.ybins),h(a),a.colorbar&&h(a.colorbar),a.marker&&a.marker.colorbar&&h(a.marker.colorbar),a.line&&a.line.colorbar&&h(a.line.colorbar),a.aaxis&&h(a.aaxis),a.baxis&&h(a.baxis)}},r.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 r=e.error_y,n="copy_ystyle"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);o.swapAttrs(e,["error_?.copy_ystyle"]),n&&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("+")}},r.coerceTraceIndices=function(e,t){if(n(t))return[t];if(!Array.isArray(t)||!t.length)return e.data.map((function(e,t){return t}));if(Array.isArray(t)){for(var r=[],a=0;a<t.length;a++)o.isIndex(t[a],e.data.length)?r.push(t[a]):o.warn("trace index (",t[a],") is not a number or is out of bounds");return r}return t},r.manageArrayContainers=function(e,t,r){var a=e.obj,i=e.parts,l=i.length,s=i[l-1],c=n(s);if(c&&null===t){var u=i.slice(0,l-1).join(".");o.nestedProperty(a,u).get().splice(s,1)}else c&&void 0===e.get()?(void 0===e.get()&&(r[e.astr]=null),e.set(t)):e.set(t)};var x=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function b(e){var t=e.search(x);if(t>0)return e.substr(0,t)}r.hasParent=function(e,t){for(var r=b(t);r;){if(r in e)return!0;r=b(r)}return!1};var _=["x","y","z"];r.clearAxisTypes=function(e,t,r){for(var n=0;n<t.length;n++)for(var a=e._fullData[n],i=0;i<3;i++){var l=d(e,a,_[i]);if(l&&"log"!==l.type){var s=l._name,c=l._id.substr(1);if("scene"===c.substr(0,5)){if(void 0!==r[c])continue;s=c+"."+s}var u=s+".type";void 0===r[s]&&void 0===r[u]&&o.nestedProperty(e.layout,u).set(null)}}}},{"../components/color":102,"../lib":232,"../plots/cartesian/axis_ids":283,"../plots/plots":316,"../registry":318,"fast-isnumeric":17,"gl-mat4/fromQuat":23}],263:[function(e,t,r){"use strict";var n=e("./plot_api");r._doPlot=n._doPlot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r._guiRestyle=n._guiRestyle,r._guiRelayout=n._guiRelayout,r._guiUpdate=n._guiUpdate,r._storeDirectGUIEdit=n._storeDirectGUIEdit,r.react=n.react,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.setPlotConfig=n.setPlotConfig,r.toImage=e("./to_image"),r.validate=e("./validate"),r.downloadImage=e("../snapshot/download");var a=e("./template_api");r.makeTemplate=a.makeTemplate,r.validateTemplate=a.validateTemplate},{"../snapshot/download":320,"./plot_api":265,"./template_api":270,"./to_image":271,"./validate":272}],264:[function(e,t,r){"use strict";var n=e("../lib/is_plain_object"),a=e("../lib/noop"),i=e("../lib/loggers"),o=e("../lib/search").sorterAsc,l=e("../registry");r.containerArrayMatch=e("./container_array_match");var s=r.isAddVal=function(e){return"add"===e||n(e)},c=r.isRemoveVal=function(e){return null===e||"remove"===e};r.applyContainerArrayChanges=function(e,t,r,n,u){var d=t.astr,f=l.getComponentMethod(d,"supplyLayoutDefaults"),p=l.getComponentMethod(d,"draw"),h=l.getComponentMethod(d,"drawOne"),m=n.replot||n.recalc||f===a||p===a,g=e.layout,v=e._fullLayout;if(r[""]){Object.keys(r).length>1&&i.warn("Full array edits are incompatible with other edits",d);var y=r[""][""];if(c(y))t.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",d,y),!0;t.set(y)}return!m&&(f(g,v),p(e),!0)}var x,b,_,w,T,M,k,A,L=Object.keys(r).map(Number).sort(o),S=t.get(),D=S||[],C=u(v,d).get(),O=[],P=-1,I=D.length;for(x=0;x<L.length;x++)if(w=r[_=L[x]],T=Object.keys(w),M=w[""],k=s(M),_<0||_>D.length-(k?0:1))i.warn("index out of range",d,_);else if(void 0!==M)T.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",d,_),c(M)?O.push(_):k?("add"===M&&(M={}),D.splice(_,0,M),C&&C.splice(_,0,{})):i.warn("Unrecognized full object edit value",d,_,M),-1===P&&(P=_);else for(b=0;b<T.length;b++)A=d+"["+_+"].",u(D[_],T[b],A).set(w[T[b]]);for(x=O.length-1;x>=0;x--)D.splice(O[x],1),C&&C.splice(O[x],1);if(D.length?S||t.set(D):t.set(null),m)return!1;if(f(g,v),h!==a){var R;if(-1===P)R=L;else{for(I=Math.max(D.length,I),R=[],x=0;x<L.length&&!((_=L[x])>=P);x++)R.push(_);for(x=P;x<I;x++)R.push(x)}for(x=0;x<R.length;x++)h(e,R[x])}else p(e);return!0}},{"../lib/is_plain_object":233,"../lib/loggers":236,"../lib/noop":241,"../lib/search":251,"../registry":318,"./container_array_match":260}],265:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("has-hover"),o=e("../lib"),l=o.nestedProperty,s=e("../lib/events"),c=e("../lib/queue"),u=e("../registry"),d=e("./plot_schema"),f=e("../plots/plots"),p=e("../plots/cartesian/axes"),h=e("../components/drawing"),m=e("../components/color"),g=e("../plots/cartesian/graph_interact").initInteractions,v=e("../constants/xmlns_namespaces"),y=e("../plots/cartesian/select").clearSelect,x=e("./plot_config").dfltConfig,b=e("./manage_arrays"),_=e("./helpers"),w=e("./subroutines"),T=e("./edit_types"),M=e("../plots/cartesian/constants").AX_NAME_PATTERN,k=0;function A(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function L(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){o.error(e)}}function S(e,t){L(e,m.combine(t,"white"))}function D(e,t){if(!e._context){e._context=o.extendDeep({},x);var r=n.select("base");e._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var a,l,s,c=e._context;if(t){for(l=Object.keys(t),a=0;a<l.length;a++)"editable"!==(s=l[a])&&"edits"!==s&&s in c&&("setBackground"===s&&"opaque"===t[s]?c[s]=S:c[s]=t[s]);t.plot3dPixelRatio&&!c.plotGlPixelRatio&&(c.plotGlPixelRatio=c.plot3dPixelRatio);var u=t.editable;if(void 0!==u)for(c.editable=u,l=Object.keys(c.edits),a=0;a<l.length;a++)c.edits[l[a]]=u;if(t.edits)for(l=Object.keys(t.edits),a=0;a<l.length;a++)(s=l[a])in c.edits&&(c.edits[s]=t.edits[s]);c._exportedPlot=t._exportedPlot}c.staticPlot&&(c.editable=!1,c.edits={},c.autosizable=!1,c.scrollZoom=!1,c.doubleClick=!1,c.showTips=!1,c.showLink=!1,c.displayModeBar=!1),"hover"!==c.displayModeBar||i||(c.displayModeBar=!0),"transparent"!==c.setBackground&&"function"==typeof c.setBackground||(c.setBackground=L),c._hasZeroHeight=c._hasZeroHeight||0===e.clientHeight,c._hasZeroWidth=c._hasZeroWidth||0===e.clientWidth;var d=c.scrollZoom,f=c._scrollZoom={};if(!0===d)f.cartesian=1,f.gl3d=1,f.geo=1,f.mapbox=1;else if("string"==typeof d){var p=d.split("+");for(a=0;a<p.length;a++)f[p[a]]=1}else!1!==d&&(f.gl3d=1,f.geo=1,f.mapbox=1)}function C(e,t){var r,n,a=t+1,i=[];for(r=0;r<e.length;r++)(n=e[r])<0?i.push(a+n):i.push(n);return i}function O(e,t,r){var n,a;for(n=0;n<t.length;n++){if((a=t[n])!==parseInt(a,10))throw new Error("all values in "+r+" must be integers");if(a>=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+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 "+r+" must be unique.")}}function P(e,t,r){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]),O(e,t,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&O(e,r,"newIndices"),void 0!==r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function I(e,t,r,n,i){!function(e,t,r,n){var a=o.isPlainObject(n);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===r)throw new Error("indices must be an integer or array of integers");for(var i in O(e,r,"indices"),t){if(!Array.isArray(t[i])||t[i].length!==r.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in n)||!Array.isArray(n[i])||n[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,r,n);for(var s=function(e,t,r,n){var i,s,c,u,d,f=o.isPlainObject(n),p=[];for(var h in Array.isArray(r)||(r=[r]),r=C(r,e.data.length-1),t)for(var m=0;m<r.length;m++){if(i=e.data[r[m]],s=(c=l(i,h)).get(),u=t[h][m],!o.isArrayOrTypedArray(u))throw new Error("attribute: "+h+" index: "+m+" must be an array");if(!o.isArrayOrTypedArray(s))throw new Error("cannot extend missing or non-array attribute: "+h);if(s.constructor!==u.constructor)throw new Error("cannot extend array with an array of a different type: "+h);d=f?n[h][m]:n,a(d)||(d=-1),p.push({prop:c,target:s,insert:u,maxp:Math.floor(d)})}return p}(e,t,r,n),c={},u={},d=0;d<s.length;d++){var f=s[d].prop,p=s[d].maxp,h=i(s[d].target,s[d].insert,p);f.set(h[0]),Array.isArray(c[f.astr])||(c[f.astr]=[]),c[f.astr].push(h[1]),Array.isArray(u[f.astr])||(u[f.astr]=[]),u[f.astr].push(s[d].target.length)}return{update:c,maxPoints:u}}function R(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}function z(e,t,n,a){e=o.getGraphDiv(e),_.clearPromiseQueue(e);var i={};if("string"==typeof t)i[t]=n;else{if(!o.isPlainObject(t))return o.warn("Restyle fail.",t,n,a),Promise.reject();i=o.extendFlat({},t),void 0===a&&(a=n)}Object.keys(i).length&&(e.changed=!0);var l=_.coerceTraceIndices(e,a),s=j(e,i,l),u=s.flags;u.calc&&(e.calcdata=void 0),u.clearAxisTypes&&_.clearAxisTypes(e,l,{});var d=[];u.fullReplot?d.push(r._doPlot):(d.push(f.previousPromises),f.supplyDefaults(e),u.markerSize&&(f.doCalcdata(e),V(d)),u.style&&d.push(w.doTraceStyle),u.colorbars&&d.push(w.doColorBars),d.push(A)),d.push(f.rehover,f.redrag),c.add(e,z,[e,s.undoit,s.traces],z,[e,s.redoit,s.traces]);var p=o.syncOrAsync(d,e);return p&&p.then||(p=Promise.resolve()),p.then((function(){return e.emit("plotly_restyle",s.eventData),e}))}function N(e){return void 0===e?null:e}function F(e,t){return t?function(t,r,n){var a=l(t,r),i=a.set;return a.set=function(t){E((n||"")+r,a.get(),t,e),i(t)},a}:l}function E(e,t,r,n){if(Array.isArray(t)||Array.isArray(r))for(var a=Array.isArray(t)?t:[],i=Array.isArray(r)?r:[],l=Math.max(a.length,i.length),s=0;s<l;s++)E(e+"["+s+"]",a[s],i[s],n);else if(o.isPlainObject(t)||o.isPlainObject(r)){var c=o.isPlainObject(t)?t:{},u=o.isPlainObject(r)?r:{},d=o.extendFlat({},c,u);for(var f in d)E(e+"."+f,c[f],u[f],n)}else void 0===n[e]&&(n[e]=N(t))}function j(e,t,r){var n,a=e._fullLayout,i=e._fullData,s=e.data,c=a._guiEditing,h=F(a._preGUI,c),m=o.extendDeepAll({},t);H(t);var g,v=T.traceFlags(),y={},x={};function b(){return r.map((function(){}))}function w(e){var t=p.id2name(e);-1===g.indexOf(t)&&g.push(t)}function M(e){return"LAYOUT"+e+".autorange"}function k(e){return"LAYOUT"+e+".range"}function A(e){for(var t=e;t<i.length;t++)if(i[t]._input===s[e])return i[t]}function L(n,i,o){if(Array.isArray(n))n.forEach((function(e){L(e,i,o)}));else if(!(n in t)&&!_.hasParent(t,n)){var l;if("LAYOUT"===n.substr(0,6))l=h(e.layout,n.replace("LAYOUT",""));else{var u=r[o];l=F(a._tracePreGUI[A(u)._fullInput.uid],c)(s[u],n)}n in x||(x[n]=b()),void 0===x[n][o]&&(x[n][o]=N(l.get())),void 0!==i&&l.set(i)}}function S(e){return function(t){return i[t][e]}}function D(e){return function(t,n){return!1===t?i[r[n]][e]:null}}for(var C in t){if(_.hasParent(t,C))throw new Error("cannot set "+C+" and a parent attribute simultaneously");var O,P,I,R,z,E,j=t[C];if("autobinx"!==C&&"autobiny"!==C||(C=C.charAt(C.length-1)+"bins",j=Array.isArray(j)?j.map(D(C)):!1===j?r.map(S(C)):null),y[C]=j,"LAYOUT"!==C.substr(0,6)){for(x[C]=b(),n=0;n<r.length;n++){if(O=s[r[n]],P=A(r[n]),R=(I=F(a._tracePreGUI[P._fullInput.uid],c)(O,C)).get(),void 0!==(z=Array.isArray(j)?j[n%j.length]:j)){var B=I.parts[I.parts.length-1],Y=C.substr(0,C.length-B.length-1),V=Y?Y+".":"",U=Y?l(P,Y).get():P;if((E=d.getTraceValObject(P,I.parts))&&E.impliedEdits&&null!==z)for(var q in E.impliedEdits)L(o.relativeAttr(C,q),E.impliedEdits[q],n);else if("thicknessmode"!==B&&"lenmode"!==B||R===z||"fraction"!==z&&"pixels"!==z||!U){if("type"===C&&("pie"===z!=("pie"===R)||"funnelarea"===z!=("funnelarea"===R))){var G="x",Z="y";"bar"!==z&&"bar"!==R||"h"!==O.orientation||(G="y",Z="x"),o.swapAttrs(O,["?","?src"],"labels",G),o.swapAttrs(O,["d?","?0"],"label",G),o.swapAttrs(O,["?","?src"],"values",Z),"pie"===R||"funnelarea"===R?(l(O,"marker.color").set(l(O,"marker.colors").get()),a._pielayer.selectAll("g.trace").remove()):u.traceIs(O,"cartesian")&&l(O,"marker.colors").set(l(O,"marker.color").get())}}else{var W=a._size,X=U.orient,J="top"===X||"bottom"===X;if("thicknessmode"===B){var Q=J?W.h:W.w;L(V+"thickness",U.thickness*("fraction"===z?1/Q:Q),n)}else{var K=J?W.w:W.h;L(V+"len",U.len*("fraction"===z?1/K:K),n)}}x[C][n]=N(R);if(-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(C)){if("orientation"===C){I.set(z);var $=O.x&&!O.y?"h":"v";if((I.get()||$)===P.orientation)continue}else"orientationaxes"===C&&(O.orientation={v:"h",h:"v"}[P.orientation]);_.swapXYData(O),v.calc=v.clearAxisTypes=!0}else-1!==f.dataArrayContainers.indexOf(I.parts[0])?(_.manageArrayContainers(I,z,x),v.calc=!0):(E?E.arrayOk&&!u.traceIs(P,"regl")&&(o.isArrayOrTypedArray(z)||o.isArrayOrTypedArray(R))?v.calc=!0:T.update(v,E):v.calc=!0,I.set(z))}}if(-1!==["swapxyaxes","orientationaxes"].indexOf(C)&&p.swap(e,r),"orientationaxes"===C){var ee=l(e.layout,"hovermode"),te=ee.get();"x"===te?ee.set("y"):"y"===te?ee.set("x"):"x unified"===te?ee.set("y unified"):"y unified"===te&&ee.set("x unified")}if(-1!==["orientation","type"].indexOf(C)){for(g=[],n=0;n<r.length;n++){var re=s[r[n]];u.traceIs(re,"cartesian")&&(w(re.xaxis||"x"),w(re.yaxis||"y"))}L(g.map(M),!0,0),L(g.map(k),[0,1],0)}}else I=h(e.layout,C.replace("LAYOUT","")),x[C]=[N(I.get())],I.set(Array.isArray(j)?j[0]:j),v.calc=!0}return(v.calc||v.plot)&&(v.fullReplot=!0),{flags:v,undoit:x,redoit:y,traces:r,eventData:o.extendDeepNoArrays([],[m,r])}}function H(e){var t,r,n,a=o.counterRegex("axis",".title",!1,!1),i=/colorbar\.title$/,l=Object.keys(e);for(t=0;t<l.length;t++)r=l[t],n=e[r],"title"!==r&&!a.test(r)&&!i.test(r)||"string"!=typeof n&&"number"!=typeof n?r.indexOf("titlefont")>-1?s(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?s(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?s(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&s(r,r.replace("titleoffset","title.offset")):s(r,r.replace("title","title.text"));function s(t,r){e[r]=e[t],delete e[t]}}function B(e,t,r){e=o.getGraphDiv(e),_.clearPromiseQueue(e);var n={};if("string"==typeof t)n[t]=r;else{if(!o.isPlainObject(t))return o.warn("Relayout fail.",t,r),Promise.reject();n=o.extendFlat({},t)}Object.keys(n).length&&(e.changed=!0);var a=Z(e,n),i=a.flags;i.calc&&(e.calcdata=void 0);var l=[f.previousPromises];i.layoutReplot?l.push(w.layoutReplot):Object.keys(n).length&&(Y(e,i,a)||f.supplyDefaults(e),i.legend&&l.push(w.doLegend),i.layoutstyle&&l.push(w.layoutStyles),i.axrange&&V(l,a.rangesAltered),i.ticks&&l.push(w.doTicksRelayout),i.modebar&&l.push(w.doModeBar),i.camera&&l.push(w.doCamera),i.colorbars&&l.push(w.doColorBars),l.push(A)),l.push(f.rehover,f.redrag),c.add(e,B,[e,a.undoit],B,[e,a.redoit]);var s=o.syncOrAsync(l,e);return s&&s.then||(s=Promise.resolve(e)),s.then((function(){return e.emit("plotly_relayout",a.eventData),e}))}function Y(e,t,r){var n=e._fullLayout;if(!t.axrange)return!1;for(var a in t)if("axrange"!==a&&t[a])return!1;for(var i in r.rangesAltered){var o=p.id2name(i),l=e.layout[o],s=n[o];if(s.autorange=l.autorange,l.range&&(s.range=l.range.slice()),s.cleanRange(),s._matchGroup)for(var c in s._matchGroup)if(c!==i){var u=n[p.id2name(c)];u.autorange=s.autorange,u.range=s.range.slice(),u._input.range=s.range.slice()}}return!0}function V(e,t){var r=t?function(e){var r=[],n=!0;for(var a in t){var i=p.getFromId(e,a);if(r.push(a),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var o in i._matchGroup)t[o]||r.push(o);i.automargin&&(n=!1)}return p.draw(e,r,{skipTitle:n})}:function(e){return p.draw(e,"redraw")};e.push(y,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var U=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,q=/^[xyz]axis[0-9]*\.autorange$/,G=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Z(e,t){var r,n,a,i=e.layout,s=e._fullLayout,c=s._guiEditing,f=F(s._preGUI,c),h=Object.keys(t),m=p.list(e),g=o.extendDeepAll({},t),v={};for(H(t),h=Object.keys(t),n=0;n<h.length;n++)if(0===h[n].indexOf("allaxes")){for(a=0;a<m.length;a++){var y=m[a]._id.substr(1),x=-1!==y.indexOf("scene")?y+".":"",w=h[n].replace("allaxes",x+m[a]._name);t[w]||(t[w]=t[h[n]])}delete t[h[n]]}var k=T.layoutFlags(),A={},L={};function S(e,r){if(Array.isArray(e))e.forEach((function(e){S(e,r)}));else if(!(e in t)&&!_.hasParent(t,e)){var n=f(i,e);e in L||(L[e]=N(n.get())),void 0!==r&&n.set(r)}}var D,C={};function O(e){var t=p.name2id(e.split(".")[0]);return C[t]=1,t}for(var P in t){if(_.hasParent(t,P))throw new Error("cannot set "+P+" and a parent attribute simultaneously");for(var I=f(i,P),R=t[P],z=I.parts.length-1;z>0&&"string"!=typeof I.parts[z];)z--;var E=I.parts[z],j=I.parts[z-1]+"."+E,B=I.parts.slice(0,z).join("."),Y=l(e.layout,B).get(),V=l(s,B).get(),Z=I.get();if(void 0!==R){A[P]=R,L[P]="reverse"===E?R:N(Z);var X=d.getLayoutValObject(s,I.parts);if(X&&X.impliedEdits&&null!==R)for(var J in X.impliedEdits)S(o.relativeAttr(P,J),X.impliedEdits[J]);if(-1!==["width","height"].indexOf(P))if(R){S("autosize",null);var Q="height"===P?"width":"height";S(Q,s[Q])}else s[P]=e._initialAutoSize[P];else if("autosize"===P)S("width",R?null:s.width),S("height",R?null:s.height);else if(j.match(U))O(j),l(s,B+"._inputRange").set(null);else if(j.match(q)){O(j),l(s,B+"._inputRange").set(null);var K=l(s,B).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else j.match(G)&&l(s,B+"._inputDomain").set(null);if("type"===E){D=Y;var $="linear"===V.type&&"log"===R,ee="log"===V.type&&"linear"===R;if($||ee){if(D&&D.range)if(V.autorange)$&&(D.range=D.range[1]>D.range[0]?[1,2]:[2,1]);else{var te=D.range[0],re=D.range[1];$?(te<=0&&re<=0&&S(B+".autorange",!0),te<=0?te=re/1e6:re<=0&&(re=te/1e6),S(B+".range[0]",Math.log(te)/Math.LN10),S(B+".range[1]",Math.log(re)/Math.LN10)):(S(B+".range[0]",Math.pow(10,te)),S(B+".range[1]",Math.pow(10,re)))}else S(B+".autorange",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete s[I.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,V,R,S),u.getComponentMethod("images","convertCoords")(e,V,R,S)}else S(B+".autorange",!0),S(B+".range",null);l(s,B+"._inputRange").set(null)}else if(E.match(M)){var ne=l(s,P).get(),ae=(R||{}).type;ae&&"-"!==ae||(ae="linear"),u.getComponentMethod("annotations","convertCoords")(e,ne,ae,S),u.getComponentMethod("images","convertCoords")(e,ne,ae,S)}var ie=b.containerArrayMatch(P);if(ie){r=ie.array,n=ie.index;var oe=ie.property,le=X||{editType:"calc"};""!==n&&""===oe&&(b.isAddVal(R)?L[P]=null:b.isRemoveVal(R)?L[P]=(l(i,r).get()||[])[n]:o.warn("unrecognized full object value",t)),T.update(k,le),v[r]||(v[r]={});var se=v[r][n];se||(se=v[r][n]={}),se[oe]=R,delete t[P]}else"reverse"===E?(Y.range?Y.range.reverse():(S(B+".autorange",!0),Y.range=[1,0]),V.autorange?k.calc=!0:k.plot=!0):(s._has("scatter-like")&&s._has("regl")&&"dragmode"===P&&("lasso"===R||"select"===R)&&"lasso"!==Z&&"select"!==Z||s._has("gl2d")?k.plot=!0:X?T.update(k,X):k.calc=!0,I.set(R))}}for(r in v){b.applyContainerArrayChanges(e,f(i,r),v[r],k,f)||(k.plot=!0)}for(var ce in C){var ue=(D=p.getFromId(e,ce))&&D._constraintGroup;if(ue)for(var de in k.calc=!0,ue)C[de]||(p.getFromId(e,de)._constraintShrinkable=!0)}return(W(e)||t.height||t.width)&&(k.plot=!0),(k.plot||k.calc)&&(k.layoutReplot=!0),{flags:k,rangesAltered:C,undoit:L,redoit:A,eventData:g}}function W(e){var t=e._fullLayout,r=t.width,n=t.height;return e.layout.autosize&&f.plotAutoSize(e,e.layout,t),t.width!==r||t.height!==n}function X(e,t,n,a){e=o.getGraphDiv(e),_.clearPromiseQueue(e),o.isPlainObject(t)||(t={}),o.isPlainObject(n)||(n={}),Object.keys(t).length&&(e.changed=!0),Object.keys(n).length&&(e.changed=!0);var i=_.coerceTraceIndices(e,a),l=j(e,o.extendFlat({},t),i),s=l.flags,u=Z(e,o.extendFlat({},n)),d=u.flags;(s.calc||d.calc)&&(e.calcdata=void 0),s.clearAxisTypes&&_.clearAxisTypes(e,i,n);var p=[];d.layoutReplot?p.push(w.layoutReplot):s.fullReplot?p.push(r._doPlot):(p.push(f.previousPromises),Y(e,d,u)||f.supplyDefaults(e),s.style&&p.push(w.doTraceStyle),(s.colorbars||d.colorbars)&&p.push(w.doColorBars),d.legend&&p.push(w.doLegend),d.layoutstyle&&p.push(w.layoutStyles),d.axrange&&V(p,u.rangesAltered),d.ticks&&p.push(w.doTicksRelayout),d.modebar&&p.push(w.doModeBar),d.camera&&p.push(w.doCamera),p.push(A)),p.push(f.rehover,f.redrag),c.add(e,X,[e,l.undoit,u.undoit,l.traces],X,[e,l.redoit,u.redoit,l.traces]);var h=o.syncOrAsync(p,e);return h&&h.then||(h=Promise.resolve(e)),h.then((function(){return e.emit("plotly_update",{data:l.eventData,layout:u.eventData}),e}))}function J(e){return function(t){t._fullLayout._guiEditing=!0;var r=e.apply(null,arguments);return t._fullLayout._guiEditing=!1,r}}var Q=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],K=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function $(e,t){for(var r=0;r<t.length;r++){var n=t[r],a=e.match(n.pattern);if(a){var i=a[1]||"";return{head:i,tail:e.substr(i.length+1),attr:n.attr}}}}function ee(e,t){var r=l(t,e).get();if(void 0!==r)return r;var n=e.split(".");for(n.pop();n.length>1;)if(n.pop(),void 0!==(r=l(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function te(e,t){for(var r=0;r<t.length;r++)if(t[r]._fullInput.uid===e)return r;return-1}function re(e,t,r){for(var n=0;n<t.length;n++)if(t[n].uid===e)return n;return!t[r]||t[r].uid?-1:r}function ne(e,t){var r=o.isPlainObject(e),n=Array.isArray(e);return r||n?(r&&o.isPlainObject(t)||n&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function ae(e,t,r,n){var a,i,s,c=n.getValObject,u=n.flags,d=n.immutable,f=n.inArray,p=n.arrayIndex;function h(){var e=a.editType;f&&-1!==e.indexOf("arraydraw")?o.pushUnique(u.arrays[f],p):(T.update(u,a),"none"!==e&&u.nChanges++,n.transition&&a.anim&&u.nChangesAnim++,(U.test(s)||q.test(s))&&(u.rangesAltered[r[0]]=1),G.test(s)&&l(t,"_inputDomain").set(null),"datarevision"===i&&(u.newDataRevision=1))}function m(e){return"data_array"===e.valType||e.arrayOk}for(i in e){if(u.calc&&!n.transition)return;var g=e[i],v=t[i],y=r.concat(i);if(s=y.join("."),"_"!==i.charAt(0)&&"function"!=typeof g&&g!==v){if(("tick0"===i||"dtick"===i)&&"geo"!==r[0]){var x=t.tickmode;if("auto"===x||"array"===x||!x)continue}if(("range"!==i||!t.autorange)&&("zmin"!==i&&"zmax"!==i||"contourcarpet"!==t.type)&&(a=c(y))&&(!a._compareAsJSON||JSON.stringify(g)!==JSON.stringify(v))){var b,_=a.valType,w=m(a),M=Array.isArray(g),k=Array.isArray(v);if(M&&k){var A="_input_"+i,L=e[A],S=t[A];if(Array.isArray(L)&&L===S)continue}if(void 0===v)w&&M?u.calc=!0:h();else if(a._isLinkedToArray){var D=[],C=!1;f||(u.arrays[i]=D);var O=Math.min(g.length,v.length),P=Math.max(g.length,v.length);if(O!==P){if("arraydraw"!==a.editType){h();continue}C=!0}for(b=0;b<O;b++)ae(g[b],v[b],y.concat(b),o.extendFlat({inArray:i,arrayIndex:b},n));if(C)for(b=O;b<P;b++)D.push(b)}else!_&&o.isPlainObject(g)?ae(g,v,y,n):w?M&&k?(d&&(u.calc=!0),(d||n.newDataRevision)&&h()):M!==k?u.calc=!0:h():M&&k&&g.length===v.length&&String(g)===String(v)||h()}}}for(i in t)if(!(i in e)&&"_"!==i.charAt(0)&&"function"!=typeof t[i]){if(m(a=c(r.concat(i)))&&Array.isArray(t[i]))return void(u.calc=!0);h()}}function ie(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!o.equalDomRects(r,t._lastBBox)){var n=t._invTransform=o.inverseTransformMatrix(o.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}r.animate=function(e,t,r){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://plotly.com/javascript/animations/");var n=e._transitionData;n._frameQueue||(n._frameQueue=[]);var a=(r=f.supplyAnimationDefaults(r)).transition,i=r.frame;function l(e){return Array.isArray(a)?e>=a.length?a[0]:a[e]:a}function s(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(i,u){function d(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,f.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:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var t=function(){n._animationRaf=window.requestAnimationFrame(t),Date.now()-n._lastFrameAt>n._timeToNext&&d()};t()}var h,m,g=0;function v(e){return Array.isArray(a)?g>=a.length?e.transitionOpts=a[g]:e.transitionOpts=a[0]:e.transitionOpts=a,g++,e}var y=[],x=null==t,b=Array.isArray(t);if(!x&&!b&&o.isPlainObject(t))y.push({type:"object",data:v(o.extendFlat({},t))});else if(x||-1!==["string","number"].indexOf(typeof t))for(h=0;h<n._frames.length;h++)(m=n._frames[h])&&(x||String(m.group)===String(t))&&y.push({type:"byname",name:String(m.name),data:v({name:m.name})});else if(b)for(h=0;h<t.length;h++){var w=t[h];-1!==["number","string"].indexOf(typeof w)?(w=String(w),y.push({type:"byname",name:w,data:v({name:w})})):o.isPlainObject(w)&&y.push({type:"object",data:v(o.extendFlat({},w))})}for(h=0;h<y.length;h++)if("byname"===(m=y[h]).type&&!n._frameHash[m.data.name])return o.warn('animate failure: frame not found: "'+m.data.name+'"'),void u();-1!==["next","immediate"].indexOf(r.mode)&&function(){if(0!==n._frameQueue.length){for(;n._frameQueue.length;){var t=n._frameQueue.pop();t.onInterrupt&&t.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}(),"reverse"===r.direction&&y.reverse();var T=e._fullLayout._currentFrame;if(T&&r.fromcurrent){var M=-1;for(h=0;h<y.length;h++)if("byname"===(m=y[h]).type&&m.name===T){M=h;break}if(M>0&&M<y.length-1){var k=[];for(h=0;h<y.length;h++)m=y[h],("byname"!==y[h].type||h>M)&&k.push(m);y=k}}y.length>0?function(t){if(0!==t.length){for(var a=0;a<t.length;a++){var o;o="byname"===t[a].type?f.computeFrame(e,t[a].name):t[a].data;var d=s(a),h=l(a);h.duration=Math.min(h.duration,d.duration);var m={frame:o,name:t[a].name,frameOpts:d,transitionOpts:h};a===t.length-1&&(m.onComplete=c(i,2),m.onInterrupt=u),n._frameQueue.push(m)}"immediate"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||p()}}(y):(e.emit("plotly_animated"),i())}))},r.addFrames=function(e,t,r){if(e=o.getGraphDiv(e),null==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://plotly.com/javascript/animations/");var n,a,i,l,s=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 d=s.length+2*t.length,p=[],h={};for(n=t.length-1;n>=0;n--)if(o.isPlainObject(t[n])){var m=t[n].name,g=(u[m]||h[m]||{}).name,v=t[n].name,y=u[g]||h[g];g&&v&&"number"==typeof v&&y&&k<5&&(k++,o.warn('addFrames: overwriting frame "'+(u[g]||h[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===k&&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.")),h[m]={name:m},p.push({frame:f.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:d+n})}p.sort((function(e,t){return e.index>t.index?-1:e.index<t.index?1:0}));var x=[],b=[],_=s.length;for(n=p.length-1;n>=0;n--){if("number"==typeof(a=p[n].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<s.length&&(s[i]||{}).name!==a.name;i++);x.push({type:"replace",index:i,value:a}),b.unshift({type:"replace",index:i,value:s[i]})}else l=Math.max(0,Math.min(p[n].index,_)),x.push({type:"insert",index:l,value:a}),b.unshift({type:"delete",index:l}),_++}var w=f.modifyFrames,T=f.modifyFrames,M=[e,b],A=[e,x];return c&&c.add(e,w,M,T,A),f.modifyFrames(e,x)},r.deleteFrames=function(e,t){if(e=o.getGraphDiv(e),!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);var r,n,a=e._transitionData._frames,i=[],l=[];if(!t)for(t=[],r=0;r<a.length;r++)t.push(r);for((t=t.slice()).sort(),r=t.length-1;r>=0;r--)n=t[r],i.push({type:"delete",index:n}),l.unshift({type:"insert",index:n,value:a[n]});var s=f.modifyFrames,u=f.modifyFrames,d=[e,l],p=[e,i];return c&&c.add(e,s,d,u,p),f.modifyFrames(e,i)},r.addTraces=function e(t,n,a){t=o.getGraphDiv(t);var i,l,s=[],u=r.deleteTraces,d=e,f=[t,s],p=[t,n];for(function(e,t,r){var n,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]),n=0;n<t.length;n++)if("object"!=typeof(a=t[n])||Array.isArray(a)||null===a)throw new Error("all values in traces array must be non-array objects");if(void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&r.length!==t.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(t,n,a),Array.isArray(n)||(n=[n]),n=n.map((function(e){return o.extendFlat({},e)})),_.cleanData(n),i=0;i<n.length;i++)t.data.push(n[i]);for(i=0;i<n.length;i++)s.push(-n.length+i);if(void 0===a)return l=r.redraw(t),c.add(t,u,f,d,p),l;Array.isArray(a)||(a=[a]);try{P(t,s,a)}catch(e){throw t.data.splice(t.data.length-n.length,n.length),e}return c.startSequence(t),c.add(t,u,f,d,p),l=r.moveTraces(t,s,a),c.stopSequence(t),l},r.deleteTraces=function e(t,n){t=o.getGraphDiv(t);var a,i,l=[],s=r.addTraces,u=e,d=[t,l,n],f=[t,n];if(void 0===n)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(n)||(n=[n]),O(t,n,"indices"),(n=C(n,t.data.length-1)).sort(o.sorterDes),a=0;a<n.length;a+=1)i=t.data.splice(n[a],1)[0],l.push(i);var p=r.redraw(t);return c.add(t,s,d,u,f),p},r.extendTraces=function e(t,n,a,i){function l(e,t,r){var n,a;if(o.isTypedArray(e))if(r<0){var i=new e.constructor(0),l=R(e,t);r<0?(n=l,a=i):(n=i,a=l)}else if(n=new e.constructor(r),a=new e.constructor(e.length+t.length-r),r===t.length)n.set(t),a.set(e);else if(r<t.length){var s=t.length-r;n.set(t.subarray(s)),a.set(e),a.set(t.subarray(0,s),e.length)}else{var c=r-t.length,u=e.length-c;n.set(e.subarray(u)),n.set(t,c),a.set(e.subarray(0,u))}else n=e.concat(t),a=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,a]}var s=I(t=o.getGraphDiv(t),n,a,i,l),u=r.redraw(t),d=[t,s.update,a,s.maxPoints];return c.add(t,r.prependTraces,d,e,arguments),u},r.moveTraces=function e(t,n,a){var i,l=[],s=[],u=e,d=e,f=[t=o.getGraphDiv(t),a,n],p=[t,n,a];if(P(t,n,a),n=Array.isArray(n)?n:[n],void 0===a)for(a=[],i=0;i<n.length;i++)a.push(-n.length+i);for(a=Array.isArray(a)?a:[a],n=C(n,t.data.length-1),a=C(a,t.data.length-1),i=0;i<t.data.length;i++)-1===n.indexOf(i)&&l.push(t.data[i]);for(i=0;i<n.length;i++)s.push({newIndex:a[i],trace:t.data[n[i]]});for(s.sort((function(e,t){return e.newIndex-t.newIndex})),i=0;i<s.length;i+=1)l.splice(s[i].newIndex,0,s[i].trace);t.data=l;var h=r.redraw(t);return c.add(t,u,f,d,p),h},r.prependTraces=function e(t,n,a,i){function l(e,t,r){var n,a;if(o.isTypedArray(e))if(r<=0){var i=new e.constructor(0),l=R(t,e);r<0?(n=l,a=i):(n=i,a=l)}else if(n=new e.constructor(r),a=new e.constructor(e.length+t.length-r),r===t.length)n.set(t),a.set(e);else if(r<t.length){var s=t.length-r;n.set(t.subarray(0,s)),a.set(t.subarray(s)),a.set(e,s)}else{var c=r-t.length;n.set(t),n.set(e.subarray(0,c),t.length),a.set(e.subarray(c))}else n=t.concat(e),a=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,a]}var s=I(t=o.getGraphDiv(t),n,a,i,l),u=r.redraw(t),d=[t,s.update,a,s.maxPoints];return c.add(t,r.extendTraces,d,e,arguments),u},r.newPlot=function(e,t,n,a){return e=o.getGraphDiv(e),f.cleanPlot([],{},e._fullData||[],e._fullLayout||{}),f.purge(e),r._doPlot(e,t,n,a)},r._doPlot=function(e,t,a,i){var l;if(e=o.getGraphDiv(e),s.init(e),o.isPlainObject(t)){var c=t;t=c.data,a=c.layout,i=c.config,l=c.frames}if(!1===s.triggerHandler(e,"plotly_beforeplot",[t,a,i]))return Promise.reject();t||a||o.isPlotDiv(e)||o.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e),D(e,i),a||(a={}),n.select(e).classed("js-plotly-plot",!0),h.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var d=0===(e.data||[]).length&&Array.isArray(t);Array.isArray(t)&&(_.cleanData(t),d?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),e.layout&&!d||(e.layout=_.cleanLayout(a)),f.supplyDefaults(e);var m=e._fullLayout,y=m._has("cartesian");m._replotting=!0,(d||m._shouldCreateBgLayer)&&(!function(e){var t=n.select(e),r=e._fullLayout;if(r._calcInverseTransform=ie,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var a={};n.selectAll("defs").each((function(){this.id&&(a[this.id.split("-")[1]]=1)})),r._uid=o.randstr(a)}r._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var l=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=l.append("g").classed("imagelayer",!0),r._shapeUpperLayer=l.append("g").classed("shapelayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}(e),m._shouldCreateBgLayer&&delete m._shouldCreateBgLayer),h.initGradients(e),h.initPatterns(e),d&&p.saveShowSpikeInitial(e);var x=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;x&&f.doCalcdata(e);for(var b=0;b<e.calcdata.length;b++)e.calcdata[b][0].trace=e._fullData[b];e._context.responsive?e._responsiveChartHandler||(e._responsiveChartHandler=function(){o.isHidden(e)||f.resize(e)},window.addEventListener("resize",e._responsiveChartHandler)):o.clearResponsive(e);var T=o.extendFlat({},m._size),M=0;function k(){if(f.clearAutoMarginIds(e),w.drawMarginPushers(e),p.allowAutoMargin(e),m._has("pie"))for(var t=e._fullData,r=0;r<t.length;r++){var n=t[r];"pie"===n.type&&n.automargin&&f.allowAutoMargin(e,"pie."+n.uid+".automargin")}return f.doAutoMargin(e),f.previousPromises(e)}function L(){e._transitioning||(w.doAutoRangeAndConstraints(e),d&&p.saveRangeInitial(e),u.getComponentMethod("rangeslider","calcAutorange")(e))}var S=[f.previousPromises,function(){if(l)return r.addFrames(e,l)},function t(){for(var r=m._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(e);!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,overflow:"visible","pointer-events":"none"}));var a=e._context.plotGlPixelRatio;if(m._glcanvas){m._glcanvas.attr("width",m.width*a).attr("height",m.height*a).style("width",m.width+"px").style("height",m.height+"px");var i=m._glcanvas.data()[0].regl;if(i&&(Math.floor(m.width*a)!==i._gl.drawingBufferWidth||Math.floor(m.height*a)!==i._gl.drawingBufferHeight)){var l="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!M)return o.log(l+" Clearing graph and plotting again."),f.cleanPlot([],{},e._fullData,m),f.supplyDefaults(e),m=e._fullLayout,f.doCalcdata(e),M++,t();o.error(l)}}return"h"===m.modebar.orientation?m._modebardiv.style("height",null).style("width","100%"):m._modebardiv.style("width",null).style("height",m.height+"px"),f.previousPromises(e)},k,function(){if(f.didMarginChange(T,m._size))return o.syncOrAsync([k,w.layoutStyles],e)}];y&&S.push((function(){if(x)return o.syncOrAsync([u.getComponentMethod("shapes","calcAutorange"),u.getComponentMethod("annotations","calcAutorange"),L],e);L()})),S.push(w.layoutStyles),y&&S.push((function(){return p.draw(e,d?"":"redraw")}),(function(e){e._fullLayout._insideTickLabelsAutorange&&B(e,e._fullLayout._insideTickLabelsAutorange).then((function(){e._fullLayout._insideTickLabelsAutorange=void 0}))})),S.push(w.drawData,w.finalDraw,g,f.addLinks,f.rehover,f.redrag,f.doAutoMargin,(function(e){e._fullLayout._insideTickLabelsAutorange&&d&&p.saveRangeInitial(e,!0)}),f.previousPromises);var C=o.syncOrAsync(S,e);return C&&C.then||(C=Promise.resolve()),C.then((function(){return A(e),e}))},r.purge=function(e){var t=(e=o.getGraphDiv(e))._fullLayout||{},r=e._fullData||[];return f.cleanPlot([],{},r,t),f.purge(e),s.purge(e),t._container&&t._container.remove(),delete e._context,e},r.react=function(e,t,n,a){var i,s;e=o.getGraphDiv(e),_.clearPromiseQueue(e);var c=e._fullData,p=e._fullLayout;if(o.isPlotDiv(e)&&c&&p){if(o.isPlainObject(t)){var h=t;t=h.data,n=h.layout,a=h.config,i=h.frames}var m=!1;if(a){var g=o.extendDeep({},e._context);e._context=void 0,D(e,a),m=function e(t,r){var n;for(n in t)if("_"!==n.charAt(0)){var a=t[n],i=r[n];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 l=0;l<a.length;l++)if(a[l]!==i[l]){if(!o.isPlainObject(a[l])||!o.isPlainObject(i[l]))return!0;if(e(a[l],i[l]))return!0}}}}(g,e._context)}e.data=t||[],_.cleanData(e.data),e.layout=n||{},_.cleanLayout(e.layout),function(e,t,r,n){var a,i,s,c,u,d,f,p,h,m,g=n._preGUI,v=[],y={},x={};for(a in g){if(u=$(a,Q)){if(h=u.head,m=u.tail,i=u.attr||h+".uirevision",(c=(s=l(n,i).get())&&ee(i,t))&&c===s){if(null===(d=g[a])&&(d=void 0),ne(p=(f=l(t,a)).get(),d)){void 0===p&&"autorange"===m&&v.push(h),f.set(N(l(n,a).get()));continue}if("autorange"===m||"range["===m.substr(0,6)){var b=g[h+".range[0]"],_=g[h+".range[1]"],w=g[h+".autorange"];if(w||null===w&&null===b&&null===_){if(!(h in y)){var T=l(t,h).get();y[h]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(y[h]){f.set(N(l(n,a).get()));continue}}}}}else o.warn("unrecognized GUI edit: "+a);delete g[a],u&&"range["===u.tail.substr(0,6)&&(x[u.head]=1)}for(var M=0;M<v.length;M++){var k=v[M];if(x[k]){var A=l(t,k).get();A&&delete A.autorange}}var L=n._tracePreGUI;for(var S in L){var D,C=L[S],O=null;for(a in C){if(!O){var P=te(S,r);if(P<0){delete L[S];break}var I=re(S,e,(D=r[P]._fullInput).index);if(I<0){delete L[S];break}O=e[I]}if(u=$(a,K)){if(u.attr?c=(s=l(n,u.attr).get())&&ee(u.attr,t):(s=D.uirevision,void 0===(c=O.uirevision)&&(c=t.uirevision)),c&&c===s&&(null===(d=C[a])&&(d=void 0),ne(p=(f=l(O,a)).get(),d))){f.set(N(l(D,a).get()));continue}}else o.warn("unrecognized GUI edit: "+a+" in trace uid "+S);delete C[a]}}}(e.data,e.layout,c,p),f.supplyDefaults(e,{skipUpdateCalc:!0});var v=e._fullData,y=e._fullLayout,x=void 0===y.datarevision,b=y.transition,M=function(e,t,r,n,a){var i=T.layoutFlags();function o(e){return d.getLayoutValObject(r,e)}i.arrays={},i.rangesAltered={},i.nChanges=0,i.nChangesAnim=0,ae(t,r,[],{getValObject:o,flags:i,immutable:n,transition:a,gd:e}),(i.plot||i.calc)&&(i.layoutReplot=!0);a&&i.nChanges&&i.nChangesAnim&&(i.anim=i.nChanges===i.nChangesAnim?"all":"some");return i}(e,p,y,x,b),k=M.newDataRevision,L=function(e,t,r,n,a,i){var o=t.length===r.length;if(!a&&!o)return{fullReplot:!0,calc:!0};var l,s,c=T.traceFlags();c.arrays={},c.nChanges=0,c.nChangesAnim=0;var u={getValObject:function(e){var t=d.getTraceValObject(s,e);return!s._module.animatable&&t.anim&&(t.anim=!1),t},flags:c,immutable:n,transition:a,newDataRevision:i,gd:e},p={};for(l=0;l<t.length;l++)if(r[l]){if(s=r[l]._fullInput,f.hasMakesDataTransform(s)&&(s=r[l]),p[s.uid])continue;p[s.uid]=1,ae(t[l]._fullInput,s,[],u)}(c.calc||c.plot)&&(c.fullReplot=!0);a&&c.nChanges&&c.nChangesAnim&&(c.anim=c.nChanges===c.nChangesAnim&&o?"all":"some");return c}(e,c,v,x,b,k);if(W(e)&&(M.layoutReplot=!0),L.calc||M.calc){e.calcdata=void 0;for(var S=Object.getOwnPropertyNames(y),C=0;C<S.length;C++){var O=S[C],P=O.substring(0,5);if("xaxis"===P||"yaxis"===P){var I=y[O]._emptyCategories;I&&I()}}}else f.supplyDefaultsUpdateCalc(e.calcdata,v);var R=[];if(i&&(e._transitionData={},f.createTransitionData(e),R.push((function(){return r.addFrames(e,i)}))),y.transition&&!m&&(L.anim||M.anim))M.ticks&&R.push(w.doTicksRelayout),f.doCalcdata(e),w.doAutoRangeAndConstraints(e),R.push((function(){return f.transitionFromReact(e,L,M,p)}));else if(L.fullReplot||M.layoutReplot||m)e._fullLayout._skipDefaults=!0,R.push(r._doPlot);else{for(var z in M.arrays){var F=M.arrays[z];if(F.length){var E=u.getComponentMethod(z,"drawOne");if(E!==o.noop)for(var j=0;j<F.length;j++)E(e,F[j]);else{var H=u.getComponentMethod(z,"draw");if(H===o.noop)throw new Error("cannot draw components: "+z);H(e)}}}R.push(f.previousPromises),L.style&&R.push(w.doTraceStyle),(L.colorbars||M.colorbars)&&R.push(w.doColorBars),M.legend&&R.push(w.doLegend),M.layoutstyle&&R.push(w.layoutStyles),M.axrange&&V(R),M.ticks&&R.push(w.doTicksRelayout),M.modebar&&R.push(w.doModeBar),M.camera&&R.push(w.doCamera),R.push(A)}R.push(f.rehover,f.redrag),(s=o.syncOrAsync(R,e))&&s.then||(s=Promise.resolve(e))}else s=r.newPlot(e,t,n,a);return s.then((function(){return e.emit("plotly_react",{data:t,layout:n}),e}))},r.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),_.cleanLayout(e.layout),e.calcdata=void 0,r._doPlot(e).then((function(){return e.emit("plotly_redraw"),e}))},r.relayout=B,r.restyle=z,r.setPlotConfig=function(e){return o.extendFlat(x,e)},r.update=X,r._guiRelayout=J(B),r._guiRestyle=J(z),r._guiUpdate=J(X),r._storeDirectGUIEdit=function(e,t,r){for(var n in r){E(n,l(e,n).get(),r[n],t)}}},{"../components/color":102,"../components/drawing":124,"../constants/xmlns_namespaces":213,"../lib":232,"../lib/events":225,"../lib/queue":247,"../plots/cartesian/axes":279,"../plots/cartesian/constants":286,"../plots/cartesian/graph_interact":289,"../plots/cartesian/select":300,"../plots/plots":316,"../registry":318,"./edit_types":261,"./helpers":262,"./manage_arrays":264,"./plot_config":266,"./plot_schema":267,"./subroutines":269,"@plotly/d3":11,"fast-isnumeric":17,"has-hover":48}],266:[function(e,t,r){"use strict";var n={staticPlot:{valType:"boolean",dflt:!1},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},a={};!function e(t,r){for(var n in t){var a=t[n];a.valType?r[n]=a.dflt:(r[n]||(r[n]={}),e(a,r[n]))}}(n,a),t.exports={configAttributes:n,dfltConfig:a}},{}],267:[function(e,t,r){"use strict";var n=e("../registry"),a=e("../lib"),i=e("../plots/attributes"),o=e("../plots/layout_attributes"),l=e("../plots/frame_attributes"),s=e("../plots/animation_attributes"),c=e("./plot_config").configAttributes,u=e("./edit_types"),d=a.extendDeepAll,f=a.isPlainObject,p=a.isArrayOrTypedArray,h=a.nestedProperty,m=a.valObjectMeta,g=["_isSubplotObj","_isLinkedToArray","_arrayAttrRegexps","_deprecated"];function v(e,t,r){if(!e)return!1;if(e._isLinkedToArray)if(y(t[r]))r++;else if(r<t.length)return!1;for(;r<t.length;r++){var n=e[t[r]];if(!f(n))break;if(e=n,r===t.length-1)break;if(e._isLinkedToArray){if(!y(t[++r]))return!1}else if("info_array"===e.valType){var a=t[++r];if(!y(a))return!1;var i=e.items;if(Array.isArray(i)){if(a>=i.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!y(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function y(e){return e===Math.round(e)&&e>=0}function x(){var e,t,r={};for(e in d(r,o),n.subplotsRegistry){if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a<t.attr.length;a++)w(r,t,t.attr[a]);else w(r,t,"subplot"===t.attr?t.name:t.attr)}for(e in n.componentsRegistry){var i=(t=n.componentsRegistry[e]).schema;if(i&&(i.subplots||i.layout)){var l=i.subplots;if(l&&l.xaxis&&!l.yaxis)for(var s in l.xaxis)delete r.yaxis[s]}else"colorscale"===t.name?d(r,t.layoutAttributes):t.layoutAttributes&&T(r,t.layoutAttributes,t.name)}return{layoutAttributes:_(r)}}function b(){var e={frames:d({},l)};return _(e),e.frames}function _(e){return function(e){r.crawl(e,(function(e,t,n){r.isValObject(e)?!0!==e.arrayOk&&"data_array"!==e.valType||(n[t+"src"]={valType:"string",editType:"none"}):f(e)&&(e.role="object")}))}(e),function(e){r.crawl(e,(function(e,t,r){if(e){var n=e._isLinkedToArray;n&&(delete e._isLinkedToArray,r[t]={items:{}},r[t].items[n]=e,r[t].role="object")}}))}(e),function(e){!function e(t){for(var r in t)if(f(t[r]))e(t[r]);else if(Array.isArray(t[r]))for(var n=0;n<t[r].length;n++)e(t[r][n]);else t[r]instanceof RegExp&&(t[r]=t[r].toString())}(e)}(e),e}function w(e,t,r){var n=h(e,r),a=d({},t.layoutAttributes);a._isSubplotObj=!0,n.set(a)}function T(e,t,r){var n=h(e,r);n.set(d(n.get()||{},t))}r.IS_SUBPLOT_OBJ="_isSubplotObj",r.IS_LINKED_TO_ARRAY="_isLinkedToArray",r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=g,r.get=function(){var e={};n.allTypes.forEach((function(t){e[t]=function(e){var t,a;t=n.modules[e]._module,a=t.basePlotModule;var o={type:null},l=d({},i),s=d({},t.attributes);r.crawl(s,(function(e,t,r,n,a){h(l,a).set(void 0),void 0===e&&h(s,a).set(void 0)})),d(o,l),n.traceIs(e,"noOpacity")&&delete o.opacity;n.traceIs(e,"showLegend")||(delete o.showlegend,delete o.legendgroup);n.traceIs(e,"noHover")&&(delete o.hoverinfo,delete o.hoverlabel);t.selectPoints||delete o.selectedpoints;d(o,s),a.attributes&&d(o,a.attributes);o.type=e;var c={meta:t.meta||{},categories:t.categories||{},animatable:Boolean(t.animatable),type:e,attributes:_(o)};if(t.layoutAttributes){var u={};d(u,t.layoutAttributes),c.layoutAttributes=_(u)}t.animatable||r.crawl(c,(function(e){r.isValObject(e)&&"anim"in e&&delete e.anim}));return c}(t)}));var t={};return Object.keys(n.transformsRegistry).forEach((function(e){t[e]=function(e){var t=n.transformsRegistry[e],r=d({},t.attributes);return Object.keys(n.componentsRegistry).forEach((function(t){var a=n.componentsRegistry[t];a.schema&&a.schema.transforms&&a.schema.transforms[e]&&Object.keys(a.schema.transforms[e]).forEach((function(t){T(r,a.schema.transforms[e][t],t)}))})),{attributes:_(r)}}(e)})),{defs:{valObjects:m,metaKeys:g.concat(["description","role","editType","impliedEdits"]),editType:{traces:u.traces,layout:u.layout},impliedEdits:{}},traces:e,layout:x(),transforms:t,frames:b(),animation:_(s),config:_(c)}},r.crawl=function(e,t,n,a){var i=n||0;a=a||"",Object.keys(e).forEach((function(n){var o=e[n];if(-1===g.indexOf(n)){var l=(a?a+".":"")+n;t(o,n,e,i,l),r.isValObject(o)||f(o)&&"impliedEdits"!==n&&r.crawl(o,t,i+1,l)}}))},r.isValObject=function(e){return e&&void 0!==e.valType},r.findArrayAttributes=function(e){var t,n,a=[],o=[],l=[];function s(e,r,i,s){o=o.slice(0,s).concat([r]),l=l.slice(0,s).concat([e&&e._isLinkedToArray]),e&&("data_array"===e.valType||!0===e.arrayOk)&&!("colorbar"===o[s-1]&&("ticktext"===r||"tickvals"===r))&&function e(t,r,i){var s=t[o[r]],c=i+o[r];if(r===o.length-1)p(s)&&a.push(n+c);else if(l[r]){if(Array.isArray(s))for(var u=0;u<s.length;u++)f(s[u])&&e(s[u],r+1,c+"["+u+"].")}else f(s)&&e(s,r+1,c+".")}(t,0,"")}t=e,n="",r.crawl(i,s),e._module&&e._module.attributes&&r.crawl(e._module.attributes,s);var c=e.transforms;if(c)for(var u=0;u<c.length;u++){var d=c[u],h=d._module;h&&(n="transforms["+u+"].",t=d,r.crawl(h.attributes,s))}return a},r.getTraceValObject=function(e,t){var r,a,o=t[0],l=1;if("transforms"===o){if(1===t.length)return i.transforms;var s=e.transforms;if(!Array.isArray(s)||!s.length)return!1;var c=t[1];if(!y(c)||c>=s.length)return!1;a=(r=(n.transformsRegistry[s[c].type]||{}).attributes)&&r[t[2]],l=3}else{var u=e._module;if(u||(u=(n.modules[e.type||i.type.dflt]||{})._module),!u)return!1;if(!(a=(r=u.attributes)&&r[o])){var d=u.basePlotModule;d&&d.attributes&&(a=d.attributes[o])}a||(a=i[o])}return v(a,t,l)},r.getLayoutValObject=function(e,t){return v(function(e,t){var r,a,i,l,s=e._basePlotModules;if(s){var c;for(r=0;r<s.length;r++){if((i=s[r]).attrRegex&&i.attrRegex.test(t)){if(i.layoutAttrOverrides)return i.layoutAttrOverrides;!c&&i.layoutAttributes&&(c=i.layoutAttributes)}var u=i.baseLayoutAttrOverrides;if(u&&t in u)return u[t]}if(c)return c}var d=e._modules;if(d)for(r=0;r<d.length;r++)if((l=d[r].layoutAttributes)&&t in l)return l[t];for(a in n.componentsRegistry){if("colorscale"===(i=n.componentsRegistry[a]).name&&0===t.indexOf("coloraxis"))return i.layoutAttributes[t];if(!i.schema&&t===i.name)return i.layoutAttributes}return t in o&&o[t]}(e,t[0]),t,1)}},{"../lib":232,"../plots/animation_attributes":273,"../plots/attributes":275,"../plots/frame_attributes":311,"../plots/layout_attributes":314,"../registry":318,"./edit_types":261,"./plot_config":266}],268:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plots/attributes"),i={name:{valType:"string",editType:"none"}};function o(e){return e&&"string"==typeof e}function l(e){var t=e.length-1;return"s"!==e.charAt(t)&&n.warn("bad argument to arrayDefaultKey: "+e),e.substr(0,e.length-1)+"defaults"}i.templateitemname={valType:"string",editType:"calc"},r.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=i.name,t.templateitemname=i.templateitemname,t},r.traceTemplater=function(e){var t,r,i={};for(t in e)r=e[t],Array.isArray(r)&&r.length&&(i[t]=0);return{newTrace:function(o){var l={type:t=n.coerce(o,{},a,"type"),_template:null};if(t in i){r=e[t];var s=i[t]%r.length;i[t]++,l._template=r[s]}return l}}},r.newContainer=function(e,t,r){var a=e._template,i=a&&(a[t]||r&&a[r]);return n.isPlainObject(i)||(i=null),e[t]={_template:i}},r.arrayTemplater=function(e,t,r){var n=e._template,a=n&&n[l(t)],i=n&&n[t];Array.isArray(i)&&i.length||(i=[]);var s={};return{newItem:function(e){var t={name:e.name,_input:e},n=t.templateitemname=e.templateitemname;if(!o(n))return t._template=a,t;for(var l=0;l<i.length;l++){var c=i[l];if(c.name===n)return s[n]=1,t._template=c,t}return t[r]=e[r]||!1,t._template=!1,t},defaultItems:function(){for(var e=[],t=0;t<i.length;t++){var r=i[t],n=r.name;if(o(n)&&!s[n]){var a={_template:r,name:n,_input:{_templateitemname:n}};a.templateitemname=r.templateitemname,e.push(a),s[n]=1}}return e}}},r.arrayDefaultKey=l,r.arrayEditor=function(e,t,r){var a=(n.nestedProperty(e,t).get()||[]).length,i=r._index,o=i>=a&&(r._input||{})._templateitemname;o&&(i=a);var l,s=t+"["+i+"]";function c(){l={},o&&(l[s]={},l[s].templateitemname=o)}function u(e,t){o?n.nestedProperty(l[s],e).set(t):l[s+"."+e]=t}function d(){var e=l;return c(),e}return c(),{modifyBase:function(e,t){l[e]=t},modifyItem:u,getUpdateObj:d,applyUpdate:function(t,r){t&&u(t,r);var a=d();for(var i in a)n.nestedProperty(e,i).set(a[i])}}}},{"../lib":232,"../plots/attributes":275}],269:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../registry"),i=e("../plots/plots"),o=e("../lib"),l=e("../lib/clear_gl_canvases"),s=e("../components/color"),c=e("../components/drawing"),u=e("../components/titles"),d=e("../components/modebar"),f=e("../plots/cartesian/axes"),p=e("../constants/alignment"),h=e("../plots/cartesian/constraints"),m=h.enforce,g=h.clean,v=e("../plots/cartesian/autorange").doAutoRange;function y(e,t,r){for(var n=0;n<r.length;n++){var a=r[n][0],i=r[n][1];if(!(a[0]>=e[1]||a[1]<=e[0])&&(i[0]<t[1]&&i[1]>t[0]))return!0}return!1}function x(e){var t,a,l,u,h,m,g=e._fullLayout,v=g._size,x=v.p,_=f.list(e,"",!0);if(g._paperdiv.style({width:e._context.responsive&&g.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":g.width+"px",height:e._context.responsive&&g.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(c.setSize,g.width,g.height),e._context.setBackground(e,g.paper_bgcolor),r.drawMainTitle(e),d.manage(e),!g._has("cartesian"))return i.previousPromises(e);function T(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-x-n:t._offset+t._length+x+n:v.t+v.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+x+n:t._offset-x-n:v.l+v.w*(e.position||0)+n%1}for(t=0;t<_.length;t++){var M=(u=_[t])._anchorAxis;u._linepositions={},u._lw=c.crispRound(e,u.linewidth,1),u._mainLinePosition=T(u,M,u.side),u._mainMirrorPosition=u.mirror&&M?T(u,M,p.OPPOSITE_SIDE[u.side]):null}var k=[],A=[],L=[],S=1===s.opacity(g.paper_bgcolor)&&1===s.opacity(g.plot_bgcolor)&&g.paper_bgcolor===g.plot_bgcolor;for(a in g._plots)if((l=g._plots[a]).mainplot)l.bg&&l.bg.remove(),l.bg=void 0;else{var D=l.xaxis.domain,C=l.yaxis.domain,O=l.plotgroup;if(y(D,C,L)){var P=O.node(),I=l.bg=o.ensureSingle(O,"rect","bg");P.insertBefore(I.node(),P.childNodes[0]),A.push(a)}else O.select("rect.bg").remove(),L.push([D,C]),S||(k.push(a),A.push(a))}var R,z,N,F,E,j,H,B,Y,V,U,q,G,Z=g._bgLayer.selectAll(".bg").data(k);for(Z.enter().append("rect").classed("bg",!0),Z.exit().remove(),Z.each((function(e){g._plots[e].bg=n.select(this)})),t=0;t<A.length;t++)l=g._plots[A[t]],h=l.xaxis,m=l.yaxis,l.bg&&void 0!==h._offset&&void 0!==m._offset&&l.bg.call(c.setRect,h._offset-x,m._offset-x,h._length+2*x,m._length+2*x).call(s.fill,g.plot_bgcolor).style("stroke-width",0);if(!g._hasOnlyLargeSploms)for(a in g._plots){l=g._plots[a],h=l.xaxis,m=l.yaxis;var W,X,J=l.clipId="clip"+g._uid+a+"plot",Q=o.ensureSingleById(g._clips,"clipPath",J,(function(e){e.classed("plotclip",!0).append("rect")}));l.clipRect=Q.select("rect").attr({width:h._length,height:m._length}),c.setTranslate(l.plot,h._offset,m._offset),l._hasClipOnAxisFalse?(W=null,X=J):(W=J,X=null),c.setClipUrl(l.plot,W,e),l.layerClipId=X}function K(e){return"M"+R+","+e+"H"+z}function $(e){return"M"+h._offset+","+e+"h"+h._length}function ee(e){return"M"+e+","+B+"V"+H}function te(e){return"M"+e+","+m._offset+"v"+m._length}function re(e,t,r){if(!e.showline||a!==e._mainSubplot)return"";if(!e._anchorAxis)return r(e._mainLinePosition);var n=t(e._mainLinePosition);return e.mirror&&(n+=t(e._mainMirrorPosition)),n}for(a in g._plots){l=g._plots[a],h=l.xaxis,m=l.yaxis;var ne="M0,0";b(h,a)&&(E=w(h,"left",m,_),R=h._offset-(E?x+E:0),j=w(h,"right",m,_),z=h._offset+h._length+(j?x+j:0),N=T(h,m,"bottom"),F=T(h,m,"top"),!(G=!h._anchorAxis||a!==h._mainSubplot)||"allticks"!==h.mirror&&"all"!==h.mirror||(h._linepositions[a]=[N,F]),ne=re(h,K,$),G&&h.showline&&("all"===h.mirror||"allticks"===h.mirror)&&(ne+=K(N)+K(F)),l.xlines.style("stroke-width",h._lw+"px").call(s.stroke,h.showline?h.linecolor:"rgba(0,0,0,0)")),l.xlines.attr("d",ne);var ae="M0,0";b(m,a)&&(U=w(m,"bottom",h,_),H=m._offset+m._length+(U?x:0),q=w(m,"top",h,_),B=m._offset-(q?x:0),Y=T(m,h,"left"),V=T(m,h,"right"),!(G=!m._anchorAxis||a!==m._mainSubplot)||"allticks"!==m.mirror&&"all"!==m.mirror||(m._linepositions[a]=[Y,V]),ae=re(m,ee,te),G&&m.showline&&("all"===m.mirror||"allticks"===m.mirror)&&(ae+=ee(Y)+ee(V)),l.ylines.style("stroke-width",m._lw+"px").call(s.stroke,m.showline?m.linecolor:"rgba(0,0,0,0)")),l.ylines.attr("d",ae)}return f.makeClipPaths(e),i.previousPromises(e)}function b(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||"all"===e.mirror||"allticks"===e.mirror)}function _(e,t,r){if(!r.showline||!r._lw)return!1;if("all"===r.mirror||"allticks"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var a=p.FROM_BL[t];return r.side===t?n.domain[a]===e.domain[a]:r.mirror&&n.domain[1-a]===e.domain[1-a]}function w(e,t,r,n){if(_(e,t,r))return r._lw;for(var a=0;a<n.length;a++){var i=n[a];if(i._mainAxis===r._mainAxis&&_(e,t,i))return i._lw}return 0}function T(e,t){var r=e.title,n=e._size,a=0;switch("start"===t?a=r.pad.l:"end"===t&&(a=-r.pad.r),r.xref){case"paper":return n.l+n.w*r.x+a;case"container":default:return e.width*r.x+a}}function M(e,t){var r=e.title,n=e._size,a=0;if("0em"!==t&&t?t===p.CAP_SHIFT+"em"&&(a=r.pad.t):a=-r.pad.b,"auto"===r.y)return n.t/2;switch(r.yref){case"paper":return n.t+n.h-n.h*r.y+a;case"container":default:return e.height-e.height*r.y+a}}r.layoutStyles=function(e){return o.syncOrAsync([i.doAutoMargin,x],e)},r.drawMainTitle=function(e){var t=e._fullLayout,r=function(e){var t=e.title,r="middle";o.isRightAnchor(t)?r="end":o.isLeftAnchor(t)&&(r="start");return r}(t),n=function(e){var t=e.title,r="0em";o.isTopAnchor(t)?r=p.CAP_SHIFT+"em":o.isMiddleAnchor(t)&&(r=p.MID_SHIFT+"em");return r}(t);u.draw(e,"gtitle",{propContainer:t,propName:"title.text",placeholder:t._dfltTitle.plot,attributes:{x:T(t,r),y:M(t,n),"text-anchor":r,dy:n}})},r.doTraceStyle=function(e){var t,n=e.calcdata,o=[];for(t=0;t<n.length;t++){var s=n[t],c=s[0]||{},u=c.trace||{},d=u._module||{},f=d.arraysToCalcdata;f&&f(s,u);var p=d.editStyle;p&&o.push({fn:p,cd0:c})}if(o.length){for(t=0;t<o.length;t++){var h=o[t];h.fn(e,h.cd0)}l(e),r.redrawReglTraces(e)}return i.style(e),a.getComponentMethod("legend","draw")(e),i.previousPromises(e)},r.doColorBars=function(e){return a.getComponentMethod("colorbar","draw")(e),i.previousPromises(e)},r.layoutReplot=function(e){var t=e.layout;return e.layout=void 0,a.call("_doPlot",e,"",t)},r.doLegend=function(e){return a.getComponentMethod("legend","draw")(e),i.previousPromises(e)},r.doTicksRelayout=function(e){return f.draw(e,"redraw"),e._fullLayout._hasOnlyLargeSploms&&(a.subplotsRegistry.splom.updateGrid(e),l(e),r.redrawReglTraces(e)),r.drawMainTitle(e),i.previousPromises(e)},r.doModeBar=function(e){var t=e._fullLayout;d.manage(e);for(var r=0;r<t._basePlotModules.length;r++){var n=t._basePlotModules[r].updateFx;n&&n(e)}return i.previousPromises(e)},r.doCamera=function(e){for(var t=e._fullLayout,r=t._subplots.gl3d,n=0;n<r.length;n++){var a=t[r[n]];a._scene.setViewport(a)}},r.drawData=function(e){var t=e._fullLayout;l(e);for(var n=t._basePlotModules,o=0;o<n.length;o++)n[o].plot(e);return r.redrawReglTraces(e),i.style(e),a.getComponentMethod("shapes","draw")(e),a.getComponentMethod("annotations","draw")(e),a.getComponentMethod("images","draw")(e),t._replotting=!1,i.previousPromises(e)},r.redrawReglTraces=function(e){var t=e._fullLayout;if(t._has("regl")){var r,n,a=e._fullData,i=[],l=[];for(t._hasOnlyLargeSploms&&t._splomGrid.draw(),r=0;r<a.length;r++){var s=a[r];!0===s.visible&&0!==s._length&&("splom"===s.type?t._splomScenes[s.uid].draw():"scattergl"===s.type?o.pushUnique(i,s.xaxis+s.yaxis):"scatterpolargl"===s.type&&o.pushUnique(l,s.subplot))}for(r=0;r<i.length;r++)(n=t._plots[i[r]])._scene&&n._scene.draw();for(r=0;r<l.length;r++)(n=t[l[r]]._subplot)._scene&&n._scene.draw()}},r.doAutoRangeAndConstraints=function(e){for(var t,r=f.list(e,"",!0),n={},a=0;a<r.length;a++)if(!n[(t=r[a])._id]){n[t._id]=1,g(e,t),v(e,t);var i=t._matchGroup;if(i)for(var o in i){var l=f.getFromId(e,o);v(e,l,t.range),n[o]=1}}m(e)},r.finalDraw=function(e){a.getComponentMethod("rangeslider","draw")(e),a.getComponentMethod("rangeselector","draw")(e)},r.drawMarginPushers=function(e){a.getComponentMethod("legend","draw")(e),a.getComponentMethod("rangeselector","draw")(e),a.getComponentMethod("sliders","draw")(e),a.getComponentMethod("updatemenus","draw")(e),a.getComponentMethod("colorbar","draw")(e)}},{"../components/color":102,"../components/drawing":124,"../components/modebar":165,"../components/titles":200,"../constants/alignment":207,"../lib":232,"../lib/clear_gl_canvases":220,"../plots/cartesian/autorange":278,"../plots/cartesian/axes":279,"../plots/cartesian/constraints":287,"../plots/plots":316,"../registry":318,"@plotly/d3":11}],270:[function(e,t,r){"use strict";var n=e("../lib"),a=n.isPlainObject,i=e("./plot_schema"),o=e("../plots/plots"),l=e("../plots/attributes"),s=e("./plot_template"),c=e("./plot_config").dfltConfig;function u(e,t){e=n.extendDeep({},e);var r,i,o=Object.keys(e).sort();function l(t,r,n){if(a(r)&&a(t))u(t,r);else if(Array.isArray(r)&&Array.isArray(t)){var o=s.arrayTemplater({_template:e},n);for(i=0;i<r.length;i++){var l=r[i],c=o.newItem(l)._template;c&&u(c,l)}var d=o.defaultItems();for(i=0;i<d.length;i++)r.push(d[i]._template);for(i=0;i<r.length;i++)delete r[i].templateitemname}}for(r=0;r<o.length;r++){var c=o[r],f=e[c];if(c in t?l(f,t[c],c):t[c]=f,d(c)===c)for(var p in t){var h=d(p);p===h||h!==c||p in e||l(f,t[p],c)}}}function d(e){return e.replace(/[0-9]+$/,"")}function f(e,t,r,i,o){var l=o&&r(o);for(var c in e){var u=e[c],p=m(e,c,i),h=m(e,c,o),g=r(h);if(!g){var v=d(c);v!==c&&(g=r(h=m(e,v,o)))}if((!l||l!==g)&&!(!g||g._noTemplating||"data_array"===g.valType||g.arrayOk&&Array.isArray(u)))if(!g.valType&&a(u))f(u,t,r,p,h);else if(g._isLinkedToArray&&Array.isArray(u))for(var y=!1,x=0,b={},_=0;_<u.length;_++){var w=u[_];if(a(w)){var T=w.name;if(T)b[T]||(f(w,t,r,m(u,x,p),m(u,x,h)),x++,b[T]=1);else if(!y){var M=m(e,s.arrayDefaultKey(c),i),k=m(u,x,p);f(w,t,r,k,m(u,x,h));var A=n.nestedProperty(t,k);n.nestedProperty(t,M).set(A.get()),A.set(null),y=!0}}}else{n.nestedProperty(t,p).set(u)}}}function p(e,t){return i.getLayoutValObject(e,n.nestedProperty({},t).parts)}function h(e,t){return i.getTraceValObject(e,n.nestedProperty({},t).parts)}function m(e,t,r){return r?Array.isArray(e)?r+"["+t+"]":r+"."+t:t}function g(e){for(var t=0;t<e.length;t++)if(a(e[t]))return!0}function v(e){var t;switch(e.code){case"data":t="The template has no key data.";break;case"layout":t="The template has no key layout.";break;case"missing":t=e.path?"There are no templates for item "+e.path+" with name "+e.templateitemname:"There are no templates for trace "+e.index+", of type "+e.traceType+".";break;case"unused":t=e.path?"The template item at "+e.path+" was not used in constructing the plot.":e.dataCount?"Some of the templates of type "+e.traceType+" were not used. The template has "+e.templateCount+" traces, the data only has "+e.dataCount+" of this type.":"The template has "+e.templateCount+" traces of type "+e.traceType+" but there are none in the data.";break;case"reused":t="Some of the templates of type "+e.traceType+" were used more than once. The template has "+e.templateCount+" traces, the data has "+e.dataCount+" of this type."}return e.msg=t,e}r.makeTemplate=function(e){e=n.isPlainObject(e)?e:n.getGraphDiv(e),e=n.extendDeep({_context:c},{data:e.data,layout:e.layout}),o.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var i={data:{},layout:{}};t.forEach((function(e){var t={};f(e,t,h.bind(null,e));var r=n.coerce(e,{},l,"type"),a=i.data[r];a||(a=i.data[r]=[]),a.push(t)})),f(r,i.layout,p.bind(null,r)),delete i.layout.template;var s=r.template;if(a(s)){var d,m,g,v,y,x,b=s.layout;a(b)&&u(b,i.layout);var _=s.data;if(a(_)){for(m in i.data)if(g=_[m],Array.isArray(g)){for(x=(y=i.data[m]).length,v=g.length,d=0;d<x;d++)u(g[d%v],y[d]);for(d=x;d<v;d++)y.push(n.extendDeep({},g[d]))}for(m in _)m in i.data||(i.data[m]=n.extendDeep([],_[m]))}}return i},r.validateTemplate=function(e,t){var r=n.extendDeep({},{_context:c,data:e.data,layout:e.layout}),i=r.layout||{};a(t)||(t=i.template||{});var l=t.layout,s=t.data,u=[];r.layout=i,r.layout.template=t,o.supplyDefaults(r);var f=r._fullLayout,p=r._fullData,h={};if(a(l)?(!function e(t,r){for(var n in t)if("_"!==n.charAt(0)&&a(t[n])){var i,o=d(n),l=[];for(i=0;i<r.length;i++)l.push(m(t,n,r[i])),o!==n&&l.push(m(t,o,r[i]));for(i=0;i<l.length;i++)h[l[i]]=1;e(t[n],l)}}(f,["layout"]),function e(t,r){for(var n in t)if(-1===n.indexOf("defaults")&&a(t[n])){var i=m(t,n,r);h[i]?e(t[n],i):u.push({code:"unused",path:i})}}(l,"layout")):u.push({code:"layout"}),a(s)){for(var y,x={},b=0;b<p.length;b++){var _=p[b];x[y=_.type]=(x[y]||0)+1,_._fullInput._template||u.push({code:"missing",index:_._fullInput.index,traceType:y})}for(y in s){var w=s[y].length,T=x[y]||0;w>T?u.push({code:"unused",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var i=t[n],o=m(t,n,r);a(i)?(Array.isArray(t)&&!1===i._template&&i.templateitemname&&u.push({code:"missing",path:o,templateitemname:i.templateitemname}),e(i,o)):Array.isArray(i)&&g(i)&&e(i,o)}}({data:p,layout:f},""),u.length)return u.map(v)}},{"../lib":232,"../plots/attributes":275,"../plots/plots":316,"./plot_config":266,"./plot_schema":267,"./plot_template":268}],271:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./plot_api"),i=e("../plots/plots"),o=e("../lib"),l=e("../snapshot/helpers"),s=e("../snapshot/tosvg"),c=e("../snapshot/svgtoimg"),u=e("../version").version,d={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){var r,f,p,h;function m(e){return!(e in t)||o.validate(t[e],d[e])}if(t=t||{},o.isPlainObject(e)?(r=e.data||[],f=e.layout||{},p=e.config||{},h={}):(e=o.getGraphDiv(e),r=o.extendDeep([],e.data),f=o.extendDeep({},e.layout),p=e._context,h=e._fullLayout||{}),!m("width")&&null!==t.width||!m("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+o.join2(d.format.values,", "," or ")+".");var g={};function v(e,r){return o.coerce(t,g,d,e,r)}var y=v("format"),x=v("width"),b=v("height"),_=v("scale"),w=v("setBackground"),T=v("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var k=o.extendFlat({},f);x?k.width=x:null===t.width&&n(h.width)&&(k.width=h.width),b?k.height=b:null===t.height&&n(h.height)&&(k.height=h.height);var A=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),L=l.getRedrawFunc(M);function S(){return new Promise((function(e){setTimeout(e,l.getDelay(M._fullLayout))}))}function D(){return new Promise((function(e,t){var r=s(M,y,_),n=M._fullLayout.width,d=M._fullLayout.height;function f(){a.purge(M),document.body.removeChild(M)}if("full-json"===y){var p=i.graphJson(M,!1,"keepdata","object",!0,!0);return p.version=u,p=JSON.stringify(p),f(),e(T?p:l.encodeJSON(p))}if(f(),"svg"===y)return e(T?r:l.encodeSVG(r));var h=document.createElement("canvas");h.id=o.randstr(),c({format:y,width:n,height:d,scale:_,canvas:h,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){a.newPlot(M,r,k,A).then(L).then(S).then(D).then((function(t){e(function(e){return T?e.replace(l.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},{"../lib":232,"../plots/plots":316,"../snapshot/helpers":322,"../snapshot/svgtoimg":324,"../snapshot/tosvg":326,"../version":391,"./plot_api":265,"fast-isnumeric":17}],272:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plots/plots"),i=e("./plot_schema"),o=e("./plot_config").dfltConfig,l=n.isPlainObject,s=Array.isArray,c=n.isArrayOrTypedArray;function u(e,t,r,a,i,o){o=o||[];for(var d=Object.keys(e),f=0;f<d.length;f++){var p=d[f];if("transforms"!==p){var v=o.slice();v.push(p);var y=e[p],x=t[p],b=g(r,p),_=(b||{}).valType,w="info_array"===_,T="colorscale"===_,M=(b||{}).items;if(m(r,p))if(l(y)&&l(x)&&"any"!==_)u(y,x,b,a,i,v);else if(w&&s(y)){y.length>x.length&&a.push(h("unused",i,v.concat(x.length)));var k,A,L,S,D,C=x.length,O=Array.isArray(M);if(O&&(C=Math.min(C,M.length)),2===b.dimensions)for(A=0;A<C;A++)if(s(y[A])){y[A].length>x[A].length&&a.push(h("unused",i,v.concat(A,x[A].length)));var P=x[A].length;for(k=0;k<(O?Math.min(P,M[A].length):P);k++)L=O?M[A][k]:M,S=y[A][k],D=x[A][k],n.validate(S,L)?D!==S&&D!==+S&&a.push(h("dynamic",i,v.concat(A,k),S,D)):a.push(h("value",i,v.concat(A,k),S))}else a.push(h("array",i,v.concat(A),y[A]));else for(A=0;A<C;A++)L=O?M[A]:M,S=y[A],D=x[A],n.validate(S,L)?D!==S&&D!==+S&&a.push(h("dynamic",i,v.concat(A),S,D)):a.push(h("value",i,v.concat(A),S))}else if(b.items&&!w&&s(y)){var I,R,z=M[Object.keys(M)[0]],N=[];for(I=0;I<x.length;I++){var F=x[I]._index||I;if((R=v.slice()).push(F),l(y[F])&&l(x[I])){N.push(F);var E=y[F],j=x[I];l(E)&&!1!==E.visible&&!1===j.visible?a.push(h("invisible",i,R)):u(E,j,z,a,i,R)}}for(I=0;I<y.length;I++)(R=v.slice()).push(I),l(y[I])?-1===N.indexOf(I)&&a.push(h("unused",i,R)):a.push(h("object",i,R,y[I]))}else!l(y)&&l(x)?a.push(h("object",i,v,y)):c(y)||!c(x)||w||T?p in t?n.validate(y,b)?"enumerated"===b.valType&&(b.coerceNumber&&y!==+x||y!==x)&&a.push(h("dynamic",i,v,y,x)):a.push(h("value",i,v,y)):a.push(h("unused",i,v,y)):a.push(h("array",i,v,y));else a.push(h("schema",i,v))}}return a}function d(e,t){for(var r=e.layout.layoutAttributes,a=0;a<t.length;a++){var i=t[a],o=e.traces[i.type],l=o.layoutAttributes;l&&(i.subplot?n.extendFlat(r[o.attributes.subplot.dflt],l):n.extendFlat(r,l))}return r}t.exports=function(e,t){void 0===e&&(e=[]),void 0===t&&(t={});var r,c,f=i.get(),p=[],m={_context:n.extendFlat({},o)};s(e)?(m.data=n.extendDeep([],e),r=e):(m.data=[],r=[],p.push(h("array","data"))),l(t)?(m.layout=n.extendDeep({},t),c=t):(m.layout={},c={},arguments.length>1&&p.push(h("object","layout"))),a.supplyDefaults(m);for(var g=m._fullData,v=r.length,y=0;y<v;y++){var x=r[y],b=["data",y];if(l(x)){var _=g[y],w=_.type,T=f.traces[w].attributes;T.type={valType:"enumerated",values:[w]},!1===_.visible&&!1!==x.visible&&p.push(h("invisible",b)),u(x,_,T,p,b);var M=x.transforms,k=_.transforms;if(M){s(M)||p.push(h("array",b,["transforms"])),b.push("transforms");for(var A=0;A<M.length;A++){var L=["transforms",A],S=M[A].type;if(l(M[A])){var D=f.transforms[S]?f.transforms[S].attributes:{};D.type={valType:"enumerated",values:Object.keys(f.transforms)},u(M[A],k[A],D,p,b,L)}else p.push(h("object",b,L))}}}else p.push(h("object",b))}var C=m._fullLayout,O=d(f,g);return u(c,C,O,p,"layout"),0===p.length?void 0:p};var f={object:function(e,t){return("layout"===e&&""===t?"The layout argument":"data"===e[0]&&""===t?"Trace "+e[1]+" in the data argument":p(e)+"key "+t)+" must be linked to an object container"},array:function(e,t){return("data"===e?"The data argument":p(e)+"key "+t)+" must be linked to an array container"},schema:function(e,t){return p(e)+"key "+t+" is not part of the schema"},unused:function(e,t,r){var n=l(r)?"container":"key";return p(e)+n+" "+t+" did not get coerced"},dynamic:function(e,t,r,n){return[p(e)+"key",t,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(e,t){return(t?p(e)+"item "+t:"Trace "+e[1])+" got defaulted to be not visible"},value:function(e,t,r){return[p(e)+"key "+t,"is set to an invalid value ("+r+")"].join(" ")}};function p(e){return s(e)?"In data trace "+e[1]+", ":"In "+e+", "}function h(e,t,r,a,i){var o,l;r=r||"",s(t)?(o=t[0],l=t[1]):(o=t,l=null);var c=function(e){if(!s(e))return String(e);for(var t="",r=0;r<e.length;r++){var n=e[r];"number"==typeof n?t=t.substr(0,t.length-1)+"["+n+"]":t+=n,r<e.length-1&&(t+=".")}return t}(r),u=f[e](t,c,a,i);return n.log(u),{code:e,container:o,trace:l,path:r,astr:c,msg:u}}function m(e,t){var r=y(t),n=r.keyMinusId,a=r.id;return!!(n in e&&e[n]._isSubplotObj&&a)||t in e}function g(e,t){return t in e?e[t]:e[y(t).keyMinusId]}var v=n.counterRegex("([a-z]+)");function y(e){var t=e.match(v);return{keyMinusId:t&&t[1],id:t&&t[2]}}},{"../lib":232,"../plots/plots":316,"./plot_config":266,"./plot_schema":267}],273:[function(e,t,r){"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},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"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},{}],274:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plot_api/plot_template");t.exports=function(e,t,r){var i,o,l=r.name,s=r.inclusionAttr||"visible",c=t[l],u=n.isArrayOrTypedArray(e[l])?e[l]:[],d=t[l]=[],f=a.arrayTemplater(t,l,s);for(i=0;i<u.length;i++){var p=u[i];n.isPlainObject(p)?o=f.newItem(p):(o=f.newItem({}))[s]=!1,o._index=i,!1!==o[s]&&r.handleItemDefaults(p,o,t,r),d.push(o)}var h=f.defaultItems();for(i=0;i<h.length;i++)(o=h[i])._index=d.length,r.handleItemDefaults({},o,t,r,{}),d.push(o);if(n.isArrayOrTypedArray(c)){var m=Math.min(c.length,d.length);for(i=0;i<m;i++)n.relinkPrivateKeys(d[i],c[i])}return d}},{"../lib":232,"../plot_api/plot_template":268}],275:[function(e,t,r){"use strict";var n=e("./font_attributes"),a=e("../components/fx/attributes");t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:n({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:a.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},{"../components/fx/attributes":133,"./font_attributes":310}],276:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=a.dateTime2ms,o=a.incrementMonth,l=e("../../constants/numerical").ONEAVGMONTH;t.exports=function(e,t,r,a){if("date"!==t.type)return{vals:a};var s=e[r+"periodalignment"];if(!s)return{vals:a};var c,u=e[r+"period"];if(n(u)){if((u=+u)<=0)return{vals:a}}else if("string"==typeof u&&"M"===u.charAt(0)){var d=+u.substring(1);if(!(d>0&&Math.round(d)===d))return{vals:a};c=d}for(var f=t.calendar,p="start"===s,h="end"===s,m=e[r+"period0"],g=i(m,f)||0,v=[],y=[],x=[],b=a.length,_=0;_<b;_++){var w,T,M,k=a[_];if(c){for(w=Math.round((k-g)/(c*l)),M=o(g,c*w,f);M>k;)M=o(M,-c,f);for(;M<=k;)M=o(M,c,f);T=o(M,-c,f)}else{for(M=g+(w=Math.round((k-g)/u))*u;M>k;)M-=u;for(;M<=k;)M+=u;T=M-u}v[_]=p?T:h?M:(T+M)/2,y[_]=T,x[_]=M}return{vals:v,starts:y,ends:x}}},{"../../constants/numerical":212,"../../lib":232,"fast-isnumeric":17}],277:[function(e,t,r){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],278:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=e("../../constants/numerical").FP_SAFE,l=e("../../registry"),s=e("../../components/drawing"),c=e("./axis_ids"),u=c.getFromId,d=c.isLinked;function f(e,t){var r,n,a=[],o=e._fullLayout,l=h(o,t,0),s=h(o,t,1),c=m(e,t),u=c.min,d=c.max;if(0===u.length||0===d.length)return i.simpleMap(t.range,t.r2l);var f=u[0].val,g=d[0].val;for(r=1;r<u.length&&f===g;r++)f=Math.min(f,u[r].val);for(r=1;r<d.length&&f===g;r++)g=Math.max(g,d[r].val);var v=!1;if(t.range){var y=i.simpleMap(t.range,t.r2l);v=y[1]<y[0]}"reversed"===t.autorange&&(v=!0,t.autorange=!0);var x,b,_,w,T,M,k=t.rangemode,A="tozero"===k,L="nonnegative"===k,S=t._length,D=S/10,C=0;for(r=0;r<u.length;r++)for(x=u[r],n=0;n<d.length;n++)(M=(b=d[n]).val-x.val-p(t,x.val,b.val))>0&&((T=S-l(x)-s(b))>D?M/T>C&&(_=x,w=b,C=M/T):M/S>C&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},C=M/S));if(f===g){var O=f-1,P=f+1;if(A)if(0===f)a=[0,1];else{var I=(f>0?d:u).reduce((function(e,t){return Math.max(e,s(t))}),0),R=f/(1-Math.min(.5,I/S));a=f>0?[0,R]:[R,0]}else a=L?[Math.max(0,O),Math.max(1,P)]:[O,P]}else A?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):L&&(_.val-C*l(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-_.val-p(t,x.val,b.val))/(S-l(_)-s(w)),a=[_.val-C*l(_),w.val+C*s(w)];return v&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function p(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i<a.length;i++){var o=a[i];n+=o.max-o.min}return n}function h(e,t,r){var a=.05*t._length,o=t._anchorAxis||{};if(-1!==(t.ticklabelposition||"").indexOf("inside")||-1!==(o.ticklabelposition||"").indexOf("inside")){var l="reversed"===t.autorange;if(!l){var c=i.simpleMap(t.range,t.r2l);l=c[1]<c[0]}l&&(r=!r)}var u=0;return d(e,t._id)||(u=function(e,t,r){var a=0,o="x"===t._id.charAt(0);for(var l in e._plots){var c=e._plots[l];if(t._id===c.xaxis._id||t._id===c.yaxis._id){var u=(o?c.yaxis:c.xaxis)||{};if(-1!==(u.ticklabelposition||"").indexOf("inside")&&(!r&&("left"===u.side||"bottom"===u.side)||r&&("top"===u.side||"right"===u.side))){if(u._vals){var d=i.deg2rad(u._tickAngles[u._id+"tick"]||0),f=Math.abs(Math.cos(d)),p=Math.abs(Math.sin(d));if(!u._vals[0].bb){var h=u._id+"tick";u._selections[h].each((function(e){var t=n.select(this);t.select(".text-math-group").empty()&&(e.bb=s.bBox(t.node()))}))}for(var m=0;m<u._vals.length;m++){var g=u._vals[m].bb;if(g){var v=6+g.width,y=6+g.height;a=Math.max(a,o?Math.max(v*f,y*p):Math.max(y*f,v*p))}}}"inside"===u.ticks&&"inside"===u.ticklabelposition&&(a+=u.ticklen||0)}}}return a}(e,t,r)),a=Math.max(u,a),"domain"===t.constrain&&t._inputDomain&&(a*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(e){return e.nopad?0:e.pad+(e.extrapad?a:u)}}t.exports={getAutoRange:f,makePadFn:h,doAutoRange:function(e,t,r){if(t.setScale(),t.autorange){t.range=r?r.slice():f(e,t),t._r=t.range.slice(),t._rl=i.simpleMap(t._r,t.r2l);var n=t._input,a={};a[t._attr+".range"]=t.range,a[t._attr+".autorange"]=t.autorange,l.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,a),n.range=t.range.slice(),n.autorange=t.autorange}var o=t._anchorAxis;if(o&&o.rangeslider){var s=o.rangeslider[t._name];s&&"auto"===s.rangemode&&(s.range=f(e,t)),o._input.rangeslider[t._name]=i.extendFlat({},s)}},findExtremes:function(e,t,r){r||(r={});e._m||e.setScale();var n,i,l,s,c,u,d,f,p,h=[],m=[],y=t.length,b=r.padded||!1,_=r.tozero&&("linear"===e.type||"-"===e.type),w="log"===e.type,T=!1,M=r.vpadLinearized||!1;function k(e){if(Array.isArray(e))return T=!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=k((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),L=k((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=k(r.vpadplus||r.vpad),D=k(r.vpadminus||r.vpad);if(!T){if(f=1/0,p=-1/0,w)for(n=0;n<y;n++)(i=t[n])<f&&i>0&&(f=i),i>p&&i<o&&(p=i);else for(n=0;n<y;n++)(i=t[n])<f&&i>-o&&(f=i),i>p&&i<o&&(p=i);t=[f,p],y=2}var C={tozero:_,extrapad:b};function O(r){l=t[r],a(l)&&(u=A(r),d=L(r),M?(s=e.c2l(l)-D(r),c=e.c2l(l)+S(r)):(f=l-D(r),p=l+S(r),w&&f<p/10&&(f=p/10),s=e.c2l(f),c=e.c2l(p)),_&&(s=Math.min(0,s),c=Math.max(0,c)),x(s)&&g(h,s,d,C),x(c)&&v(m,c,u,C))}var P=Math.min(6,y);for(n=0;n<P;n++)O(n);for(n=y-1;n>=P;n--)O(n);return{min:h,max:m,opts:r}},concatExtremes:m};function m(e,t,r){var n,a,i,o=t._id,l=e._fullData,s=e._fullLayout,c=[],d=[];function f(e,t){for(n=0;n<t.length;n++){var r=e[t[n]],l=(r._extremes||{})[o];if(!0===r.visible&&l){for(a=0;a<l.min.length;a++)i=l.min[a],g(c,i.val,i.pad,{extrapad:i.extrapad});for(a=0;a<l.max.length;a++)i=l.max[a],v(d,i.val,i.pad,{extrapad:i.extrapad})}}}if(f(l,t._traceIndices),f(s.annotations||[],t._annIndices||[]),f(s.shapes||[],t._shapeIndices||[]),t._matchGroup&&!r)for(var p in t._matchGroup)if(p!==t._id){var h=u(e,p),y=m(e,h,!0),x=t._length/h._length;for(a=0;a<y.min.length;a++)i=y.min[a],g(c,i.val,i.pad*x,{extrapad:i.extrapad});for(a=0;a<y.max.length;a++)i=y.max[a],v(d,i.val,i.pad*x,{extrapad:i.extrapad})}return{min:c,max:d}}function g(e,t,r,n){y(e,t,r,n,b)}function v(e,t,r,n){y(e,t,r,n,_)}function y(e,t,r,n,a){for(var i=n.tozero,o=n.extrapad,l=!0,s=0;s<e.length&&l;s++){var c=e[s];if(a(c.val,t)&&c.pad>=r&&(c.extrapad||!o)){l=!1;break}a(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(s,1),s--)}if(l){var u=i&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function x(e){return a(e)&&Math.abs(e)<o}function b(e,t){return e<=t}function _(e,t){return e>=t}},{"../../components/drawing":124,"../../constants/numerical":212,"../../lib":232,"../../registry":318,"./axis_ids":283,"@plotly/d3":11,"fast-isnumeric":17}],279:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("../../plots/plots"),o=e("../../registry"),l=e("../../lib"),s=l.strTranslate,c=e("../../lib/svg_text_utils"),u=e("../../components/titles"),d=e("../../components/color"),f=e("../../components/drawing"),p=e("./layout_attributes"),h=e("./clean_ticks"),m=e("../../constants/numerical"),g=m.ONEMAXYEAR,v=m.ONEAVGYEAR,y=m.ONEMINYEAR,x=m.ONEMAXQUARTER,b=m.ONEAVGQUARTER,_=m.ONEMINQUARTER,w=m.ONEMAXMONTH,T=m.ONEAVGMONTH,M=m.ONEMINMONTH,k=m.ONEWEEK,A=m.ONEDAY,L=A/2,S=m.ONEHOUR,D=m.ONEMIN,C=m.ONESEC,O=m.MINUS_SIGN,P=m.BADNUM,I={K:"zeroline"},R={K:"gridline",L:"path"},z={K:"tick",L:"path"},N={K:"tick",L:"text"},F=e("../../constants/alignment"),E=F.MID_SHIFT,j=F.CAP_SHIFT,H=F.LINE_SPACING,B=F.OPPOSITE_SIDE,Y=t.exports={};Y.setConvert=e("./set_convert");var V=e("./axis_autotype"),U=e("./axis_ids"),q=U.idSort,G=U.isLinked;Y.id2name=U.id2name,Y.name2id=U.name2id,Y.cleanId=U.cleanId,Y.list=U.list,Y.listIds=U.listIds,Y.getFromId=U.getFromId,Y.getFromTrace=U.getFromTrace;var Z=e("./autorange");Y.getAutoRange=Z.getAutoRange,Y.findExtremes=Z.findExtremes;function W(e){var t=1e-4*(e[1]-e[0]);return[e[0]-t,e[1]+t]}Y.coerceRef=function(e,t,r,n,a,i){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return a||(a=s[0]||("string"==typeof i?i:i[0])),i||(i=a),s=s.concat(s.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:s.concat(i?"string"==typeof i?[i]:i:[]),dflt:a},l.coerce(e,t,u,c)},Y.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},Y.coercePosition=function(e,t,r,n,a,i){var o,s;if("range"!==Y.getRefType(n))o=l.ensureNumber,s=r(a,i);else{var c=Y.getFromId(t,n);s=r(a,i=c.fraction2r(i)),o=c.cleanPos}e[a]=o(s)},Y.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?l.ensureNumber:Y.getFromId(t,r).cleanPos)(e)},Y.redrawComponents=function(e,t){t=t||Y.listIds(e);var r=e._fullLayout;function n(n,a,i,l){for(var s=o.getComponentMethod(n,a),c={},u=0;u<t.length;u++)for(var d=r[Y.id2name(t[u])][i],f=0;f<d.length;f++){var p=d[f];if(!c[p]&&(s(e,p),c[p]=1,l))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0)};var X=Y.getDataConversions=function(e,t,r,n){var a,i="x"===r||"y"===r||"z"===r?r:n;if(Array.isArray(i)){if(a={type:V(n,void 0,{autotypenumbers:e._fullLayout.autotypenumbers}),_categories:[]},Y.setConvert(a),"category"===a.type)for(var o=0;o<n.length;o++)a.d2c(n[o])}else a=Y.getFromTrace(e,t,i);return a?{d2c:a.d2c,c2d:a.c2d}:"ids"===i?{d2c:Q,c2d:Q}:{d2c:J,c2d:J}};function J(e){return+e}function Q(e){return String(e)}function K(e){return+e.substring(1)}Y.getDataToCoordFunc=function(e,t,r,n){return X(e,t,r,n).d2c},Y.counterLetter=function(e){var t=e.charAt(0);return"x"===t?"y":"y"===t?"x":void 0},Y.minDtick=function(e,t,r,n){-1===["log","category","multicategory"].indexOf(e.type)&&n?void 0===e._minDtick?(e._minDtick=t,e._forceTick0=r):e._minDtick&&((e._minDtick/t+1e-6)%1<2e-6&&((r-e._forceTick0)/t%1+1.000001)%1<2e-6?(e._minDtick=t,e._forceTick0=r):((t/e._minDtick+1e-6)%1>2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},Y.saveRangeInitial=function(e,t){for(var r=Y.list(e,"",!0),n=!1,a=0;a<r.length;a++){var i=r[a],o=void 0===i._rangeInitial,l=o||!(i.range[0]===i._rangeInitial[0]&&i.range[1]===i._rangeInitial[1]);(o&&!1===i.autorange||t&&l)&&(i._rangeInitial=i.range.slice(),n=!0)}return n},Y.saveShowSpikeInitial=function(e,t){for(var r=Y.list(e,"",!0),n=!1,a="on",i=0;i<r.length;i++){var o=r[i],l=void 0===o._showSpikeInitial,s=l||!(o.showspikes===o._showspikes);(l||t&&s)&&(o._showSpikeInitial=o.showspikes,n=!0),"on"!==a||o.showspikes||(a="off")}return e._fullLayout._cartesianSpikesEnabled=a,n},Y.autoBin=function(e,t,r,n,i,o){var s,c=l.aggNums(Math.min,null,e),u=l.aggNums(Math.max,null,e);if("category"===t.type||"multicategory"===t.type)return{start:c-.5,end:u+.5,size:Math.max(1,Math.round(o)||1),_dataSpan:u-c};if(i||(i=t.calendar),s="log"===t.type?{type:"linear",range:[c,u]}:{type:t.type,range:l.simpleMap([c,u],t.c2r,0,i),calendar:i},Y.setConvert(s),o=o&&h.dtick(o,s.type))s.dtick=o,s.tick0=h.tick0(void 0,s.type,i);else{var d;if(r)d=(u-c)/r;else{var f=l.distinctVals(e),p=Math.pow(10,Math.floor(Math.log(f.minDiff)/Math.LN10)),m=p*l.roundUp(f.minDiff/p,[.9,1.9,4.9,9.9],!0);d=Math.max(m,2*l.stdev(e)/Math.pow(e.length,n?.25:.4)),a(d)||(d=1)}Y.autoTicks(s,d)}var g,v=s.dtick,y=Y.tickIncrement(Y.tickFirst(s),v,"reverse",i);if("number"==typeof v)g=(y=function(e,t,r,n,i){var o=0,l=0,s=0,c=0;function u(t){return(1+100*(t-e)/r.dtick)%100<2}for(var d=0;d<t.length;d++)t[d]%1==0?s++:a(t[d])||c++,u(t[d])&&o++,u(t[d]+r.dtick/2)&&l++;var f=t.length-c;if(s===f&&"date"!==r.type)r.dtick<1?e=n-.5*r.dtick:(e-=.5)+r.dtick<n&&(e+=r.dtick);else if(l<.1*f&&(o>.3*f||u(n)||u(i))){var p=r.dtick/2;e+=e+p<n?p:-p}return e}(y,e,s,c,u))+(1+Math.floor((u-y)/v))*v;else for("M"===s.dtick.charAt(0)&&(y=function(e,t,r,n,a){var i=l.findExactDates(t,a);if(i.exactDays>.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?e=Y.tickIncrement(e,"M6","reverse")+1.5*A:i.exactMonths>.8?e=Y.tickIncrement(e,"M1","reverse")+15.5*A:e-=L;var s=Y.tickIncrement(e,r);if(s<=n)return s}return e}(y,e,v,c,i)),g=y,0;g<=u;)g=Y.tickIncrement(g,v,!1,i);return{start:t.c2r(y,0,i),end:t.c2r(g,0,i),size:v,_dataSpan:u-c}},Y.prepTicks=function(e,t){var r=l.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e._dtickInit=e.dtick,e._tick0Init=e.tick0,"auto"===e.tickmode||!e.dtick){var n,i=e.nticks;i||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?l.bigFont(e.tickfont.size||12):15,i=e._length/n):(n="y"===e._id.charAt(0)?40:80,i=l.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(i*=2)),"array"===e.tickmode&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,Y.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(a(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),i=Y.getTickFormat(e);if(i){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=S,o&&!n&&e.dtick<S&&(e.dtick=S)):/%p/.test(i)?(t=L,o&&!n&&e.dtick<L&&(e.dtick=L)):/%[Aadejuwx]/.test(i)?(t=A,o&&!n&&e.dtick<A&&(e.dtick=A)):/%[UVW]/.test(i)?(t=k,o&&!n&&e.dtick<k&&(e.dtick=k)):/%[Bbm]/.test(i)?(t=T,o&&(n?K(e.dtick)<1:e.dtick<M)&&(e.dtick="M1")):/%[q]/.test(i)?(t=b,o&&(n?K(e.dtick)<3:e.dtick<_)&&(e.dtick="M3")):/%[Yy]/.test(i)&&(t=v,o&&(n?K(e.dtick)<12:e.dtick<y)&&(e.dtick="M12")))}(n=r())&&e.tick0===e._dowTick0&&(e.tick0=e._rawTick0);e._definedDelta=t}(e),e.tick0||(e.tick0="date"===e.type?"2000-01-01":0),"date"===e.type&&e.dtick<.1&&(e.dtick=.1),le(e)},Y.calcTicks=function(e,t){Y.prepTicks(e,t);var r=l.simpleMap(e.range,e.r2l,void 0,void 0,t);if("array"===e.tickmode)return function(e){var t=e.tickvals,r=e.ticktext,n=new Array(t.length),a=W(l.simpleMap(e.range,e.r2l)),i=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]),s=0;Array.isArray(r)||(r=[]);var c="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(var u=0;u<t.length;u++){var d=c(t[u]);d>i&&d<o&&(void 0===r[u]?n[s]=Y.tickText(e,d):n[s]=se(e,d,String(r[u])),s++)}s<t.length&&n.splice(s,t.length-s);e.rangebreaks&&(n=n.filter((function(t){return e.maskBreaks(t.x)!==P})));return n}(e);var n=W(r),i=n[0],o=n[1],s=r[1]<r[0],c=Math.min(r[0],r[1]),u=Math.max(r[0],r[1]),d="log"===e.type&&!(a(e.dtick)||"L"===e.dtick.charAt(0)),f="period"===e.ticklabelmode;if(e._tmin=Y.tickFirst(e,t),e._tmin<i!==s)return[];"category"!==e.type&&"multicategory"!==e.type||(o=s?Math.max(-.5,o):Math.min(e._categories.length-.5,o));var p=e._tmin;e.rangebreaks&&e._tick0Init!==e.tick0&&(p=Ae(p,e),s||(p=Y.tickIncrement(p,e.dtick,!s,e.calendar))),f&&(p=Y.tickIncrement(p,e.dtick,!s,e.calendar));for(var h,m=Math.max(1e3,e._length||0),D=[],C=null;s?p>=o:p<=o;p=Y.tickIncrement(p,e.dtick,s,e.calendar)){if(e.rangebreaks&&!s){if(p<i)continue;if(e.maskBreaks(p)===P&&Ae(p,e)>=u)break}if(D.length>m||p===C)break;C=p;var O=!1;d&&p!==(0|p)&&(O=!0),D.push({minor:O,value:p})}if(f&&function(e,t,r){for(var n=0;n<e.length;n++){var a=e[n].value,i=n,o=n+1;n<e.length-1?(i=n,o=n+1):n>0?(i=n-1,o=n):(i=n,o=n);var l,s=e[i].value,c=e[o].value,u=Math.abs(c-s),d=r||u,f=0;d>=y?f=u>=y&&u<=g?u:v:r===b&&d>=_?f=u>=_&&u<=x?u:b:d>=M?f=u>=M&&u<=w?u:T:r===k&&d>=k?f=k:d>=A?f=A:r===L&&d>=L?f=L:r===S&&d>=S&&(f=S),f>=u&&(f=u,l=!0);var p=a+f;if(t.rangebreaks&&f>0){for(var h=0,m=0;m<84;m++){var D=(m+.5)/84;t.maskBreaks(a*(1-D)+D*p)!==P&&h++}(f*=h/84)||(e[n].drop=!0),l&&u>k&&(f=u)}(f>0||0===n)&&(e[n].periodX=a+f/2)}}(D,e,e._definedDelta),e.rangebreaks){var I="y"===e._id.charAt(0),R=1;"auto"===e.tickmode&&(R=e.tickfont?e.tickfont.size:12);var z=NaN;for(h=D.length-1;h>-1;h--)if(D[h].drop)D.splice(h,1);else{D[h].value=Ae(D[h].value,e);var N=e.c2p(D[h].value);(I?z>N-R:z<N+R)?D.splice(s?h+1:h,1):z=N}}ke(e)&&360===Math.abs(r[1]-r[0])&&D.pop(),e._tmax=(D[D.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var F,E,j=[];for(h=0;h<D.length;h++){var H=D[h].minor,B=D[h].value;F=Y.tickText(e,B,!1,H),void 0!==(E=D[h].periodX)&&(F.periodX=E,(E>u||E<c)&&(E>u&&(F.periodX=u),E<c&&(F.periodX=c),F.text=" ",e._prevDateHead="")),j.push(F)}return e._inCalcTicks=!1,j};var $=[2,5,10],ee=[1,2,3,6,12],te=[1,2,5,10,15,30],re=[1,2,3,7,14],ne=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],ae=[-.301,0,.301,.699,1],ie=[15,30,45,90,180];function oe(e,t,r){return t*l.roundUp(e/t,r)}function le(e){var t=e.dtick;if(e._tickexponent=0,a(t)||"string"==typeof t||(t=1),"category"!==e.type&&"multicategory"!==e.type||(e._tickround=null),"date"===e.type){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),i=n.length;if("M"===String(t).charAt(0))i>10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12==0?"y":"m";else if(t>=A&&i<=10||t>=15*A)e._tickround="d";else if(t>=D&&i<=16||t>=S)e._tickround="M";else if(t>=C&&i<=19||t>=D)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,o)-20,e._tickround<0&&(e._tickround=4)}}else if(a(t)||"L"===t.charAt(0)){var l=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 s=Math.max(Math.abs(l[0]),Math.abs(l[1])),c=Math.floor(Math.log(s)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(ue(e.exponentformat)&&!de(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function se(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}Y.autoTicks=function(e,t){var r;function n(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=l.dateTick0(e.calendar,0);var i=2*t;if(i>v)t/=v,r=n(10),e.dtick="M"+12*oe(t,r,$);else if(i>T)t/=T,e.dtick="M"+oe(t,1,ee);else if(i>A){e.dtick=oe(t,A,e._hasDayOfWeekBreaks?[1,2,7,14]:re);var o=Y.getTickFormat(e),s="period"===e.ticklabelmode;s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=l.dateTick0(e.calendar,2):e.tick0=l.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}else i>S?e.dtick=oe(t,S,ee):i>D?e.dtick=oe(t,D,te):i>C?e.dtick=oe(t,C,te):(r=n(10),e.dtick=oe(t,r,$))}else if("log"===e.type){e.tick0=0;var c=l.simpleMap(e.range,e.r2l);if(t>.7)e.dtick=Math.ceil(t);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/t);t=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,r=n(10),e.dtick="L"+oe(t,r,$)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):ke(e)?(e.tick0=0,r=1,e.dtick=oe(t,r,ie)):(e.tick0=0,r=n(10),e.dtick=oe(t,r,$));if(0===e.dtick&&(e.dtick=1),!a(e.dtick)&&"string"!=typeof e.dtick){var d=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(d)}},Y.tickIncrement=function(e,t,r,i){var o=r?-1:1;if(a(t))return l.increment(e,o*t);var s=t.charAt(0),c=o*Number(t.substr(1));if("M"===s)return l.incrementMonth(e,c,i);if("L"===s)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===s){var u="D2"===t?ae:ne,d=e+.01*o,f=l.roundUp(l.mod(d,1),u,r);return Math.floor(d)+Math.log(n.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},Y.tickFirst=function(e,t){var r=e.r2l||Number,i=l.simpleMap(e.range,r,void 0,void 0,t),o=i[1]<i[0],s=o?Math.floor:Math.ceil,c=W(i)[0],u=e.dtick,d=r(e.tick0);if(a(u)){var f=s((c-d)/u)*u+d;return"category"!==e.type&&"multicategory"!==e.type||(f=l.constrain(f,0,e._categories.length-1)),f}var p=u.charAt(0),h=Number(u.substr(1));if("M"===p){for(var m,g,v,y=0,x=d;y<10;){if(((m=Y.tickIncrement(x,u,o,e.calendar))-c)*(x-c)<=0)return o?Math.min(x,m):Math.max(x,m);g=(c-(x+m)/2)/(m-x),v=p+(Math.abs(Math.round(g))||1)*h,x=Y.tickIncrement(x,v,g<0?!o:o,e.calendar),y++}return l.error("tickFirst did not converge",e),x}if("L"===p)return Math.log(s((Math.pow(10,c)-d)/h)*h+d)/Math.LN10;if("D"===p){var b="D2"===u?ae:ne,_=l.roundUp(l.mod(c,1),b,o);return Math.floor(c)+Math.log(n.round(Math.pow(10,_),1))/Math.LN10}throw"unrecognized dtick "+String(u)},Y.tickText=function(e,t,r,n){var i,o=se(e,t),s="array"===e.tickmode,c=r||s,u=e.type,d="category"===u?e.d2l_noadd:e.d2l;if(s&&Array.isArray(e.ticktext)){var f=l.simpleMap(e.range,e.r2l),p=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(i=0;i<e.ticktext.length&&!(Math.abs(t-d(e.tickvals[i]))<p);i++);if(i<e.ticktext.length)return o.text=String(e.ticktext[i]),o}function h(n){if(void 0===n)return!0;if(r)return"none"===n;var a={first:e._tmin,last:e._tmax}[n];return"all"!==n&&t!==a}var m=r?"never":"none"!==e.exponentformat&&h(e.showexponent)?"hide":"";if("date"===u?function(e,t,r,n){var i=e._tickround,o=r&&e.hoverformat||Y.getTickFormat(e);n&&(i=a(i)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[i]);var s,c=l.formatDate(t.x,o,i,e._dateFormat,e.calendar,e._extraFormat),u=c.indexOf("\n");-1!==u&&(s=c.substr(u+1),c=c.substr(0,u));n&&("00:00:00"===c||"00:00"===c?(c=s,s=""):8===c.length&&(c=c.replace(/:00$/,"")));if(s)if(r)"d"===i?c+=", "+s:c=s+(c?", "+c:"");else if(e._inCalcTicks&&e._prevDateHead===s){var d=Le(e),f=e._trueSide||e.side;(!d&&"top"===f||d&&"bottom"===f)&&(c+="<br> ")}else e._prevDateHead=s,c+="<br>"+s;t.text=c}(e,o,r,c):"log"===u?function(e,t,r,n,i){var o=e.dtick,s=t.x,c=e.tickformat,u="string"==typeof o&&o.charAt(0);"never"===i&&(i="");n&&"L"!==u&&(o="L3",u="L");if(c||"L"===u)t.text=fe(Math.pow(10,s),e,i,n);else if(a(o)||"D"===u&&l.mod(s+.01,1)<.1){var d=Math.round(s),f=Math.abs(d),p=e.exponentformat;"power"===p||ue(p)&&de(d)?(t.text=0===d?1:1===d?"10":"10<sup>"+(d>1?"":O)+f+"</sup>",t.fontSize*=1.25):("e"===p||"E"===p)&&f>2?t.text="1"+p+(d>0?"+":O)+f:(t.text=fe(Math.pow(10,s),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,l.mod(s,1)))),t.fontSize*=.75}if("D1"===e.dtick){var h=String(t.text).charAt(0);"0"!==h&&"1"!==h||("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*(s<0?.5:.25)))}}(e,o,0,c,m):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r="");t.text=String(r)}(e,o):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}(e,o,r):ke(e)?function(e,t,r,n,a){if("radians"!==e.thetaunit||r)t.text=fe(t.x,e,a,n);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 r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,a=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)t.text=fe(l.deg2rad(t.x),e,a,n);else{var s=t.x<0;1===o[1]?1===o[0]?t.text="\u03c0":t.text=o[0]+"\u03c0":t.text=["<sup>",o[0],"</sup>","\u2044","<sub>",o[1],"</sub>","\u03c0"].join(""),s&&(t.text=O+t.text)}}}}(e,o,r,c,m):function(e,t,r,n,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide");t.text=fe(t.x,e,a,n)}(e,o,0,c,m),n||(e.tickprefix&&!h(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!h(e.showticksuffix)&&(o.text+=e.ticksuffix)),"boundaries"===e.tickson||e.showdividers){var g=function(t){var r=e.l2p(t);return r>=0&&r<=e._length?t:null};o.xbnd=[g(o.x-.5),g(o.x+e.dtick-.5)]}return o},Y.hoverLabelText=function(e,t,r){r&&(e=l.extendFlat({},e,{hoverformat:r}));var n=Array.isArray(t)?t[0]:t,a=Array.isArray(t)?t[1]:void 0;if(void 0!==a&&a!==n)return Y.hoverLabelText(e,n,r)+" - "+Y.hoverLabelText(e,a,r);var i="log"===e.type&&n<=0,o=Y.tickText(e,e.c2l(i?-n:n),"hover").text;return i?0===n?"0":O+o:o};var ce=["f","p","n","\u03bc","m","","k","M","G","T"];function ue(e){return"SI"===e||"B"===e}function de(e){return e>14||e<-15}function fe(e,t,r,n){var i=e<0,o=t._tickround,s=r||t.exponentformat||"B",c=t._tickexponent,u=Y.getTickFormat(t),d=t.separatethousands;if(n){var f={exponentformat:s,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:a(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};le(f),o=(Number(f._tickround)||0)+4,c=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,O);var p,h=Math.pow(10,-o)/2;if("none"===s&&(c=0),(e=Math.abs(e))<h)e="0",i=!1;else{if(e+=h,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 m=o;m<0;m++)e+="0"}else{var g=(e=String(e)).indexOf(".")+1;g&&(e=e.substr(0,g+o).replace(/\.?0+$/,""))}e=l.numSeparate(e,t._separators,d)}c&&"hide"!==s&&(ue(s)&&de(c)&&(s="power"),p=c<0?O+-c:"power"!==s?"+"+c:String(c),"e"===s||"E"===s?e+=s+p:"power"===s?e+="\xd710<sup>"+p+"</sup>":"B"===s&&9===c?e+="B":ue(s)&&(e+=ce[c/3+5]));return i?O+e:e}function pe(e,t){for(var r=[],n={},a=0;a<t.length;a++){var i=t[a];n[i.text2]?n[i.text2].push(i.x):n[i.text2]=[i.x]}for(var o in n)r.push(se(e,l.interp(n[o],.5),o));return r}function he(e){return void 0!==e.periodX?e.periodX:e.x}function me(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}function ge(e){var t=e.title.font.size,r=(e.title.text.match(c.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r?t*(j+r*H):t*j:r?t*(r+1)*H:t}function ve(e,t){var r=e.l2p(t);return r>1&&r<e._length-1}function ye(e){var t=n.select(e),r=t.select(".text-math-group");return r.empty()?t.select("text"):r}function xe(e){return e._id+".automargin"}function be(e){return xe(e)+".mirror"}function _e(e){return e._id+".rangeslider"}function we(e,t){for(var r=0;r<t.length;r++)-1===e.indexOf(t[r])&&e.push(t[r])}function Te(e,t,r){var n,a,i=[],o=[],s=e.layout;for(n=0;n<t.length;n++)i.push(Y.getFromId(e,t[n]));for(n=0;n<r.length;n++)o.push(Y.getFromId(e,r[n]));var c=Object.keys(p),u=["anchor","domain","overlaying","position","side","tickangle","editType"],d=["linear","log"];for(n=0;n<c.length;n++){var f=c[n],h=i[0][f],m=o[0][f],g=!0,v=!1,y=!1;if("_"!==f.charAt(0)&&"function"!=typeof h&&-1===u.indexOf(f)){for(a=1;a<i.length&&g;a++){var x=i[a][f];"type"===f&&-1!==d.indexOf(h)&&-1!==d.indexOf(x)&&h!==x?v=!0:x!==h&&(g=!1)}for(a=1;a<o.length&&g;a++){var b=o[a][f];"type"===f&&-1!==d.indexOf(m)&&-1!==d.indexOf(b)&&m!==b?y=!0:o[a][f]!==m&&(g=!1)}g&&(v&&(s[i[0]._name].type="linear"),y&&(s[o[0]._name].type="linear"),Me(s,f,i,o,e._fullLayout._dfltTitle))}}for(n=0;n<e._fullLayout.annotations.length;n++){var _=e._fullLayout.annotations[n];-1!==t.indexOf(_.xref)&&-1!==r.indexOf(_.yref)&&l.swapAttrs(s.annotations[n],["?"])}}function Me(e,t,r,n,a){var i,o=l.nestedProperty,s=o(e[r[0]._name],t).get(),c=o(e[n[0]._name],t).get();for("title"===t&&(s&&s.text===a.x&&(s.text=a.y),c&&c.text===a.y&&(c.text=a.x)),i=0;i<r.length;i++)o(e,r[i]._name+"."+t).set(c);for(i=0;i<n.length;i++)o(e,n[i]._name+"."+t).set(s)}function ke(e){return"angularaxis"===e._id}function Ae(e,t){for(var r=t._rangebreaks.length,n=0;n<r;n++){var a=t._rangebreaks[n];if(e>=a.min&&e<a.max)return a.max}return e}function Le(e){return-1!==(e.ticklabelposition||"").indexOf("inside")}function Se(e,t){Le(e._anchorAxis||{})&&e._hideCounterAxisInsideTickLabels&&e._hideCounterAxisInsideTickLabels(t)}Y.getTickFormat=function(e){var t,r,n,a,i,o,l,s;function c(e){return"string"!=typeof e?e:Number(e.replace("M",""))*T}function u(e,t){var r=["L","D"];if(typeof e==typeof t){if("number"==typeof e)return e-t;var n=r.indexOf(e.charAt(0)),a=r.indexOf(t.charAt(0));return n===a?Number(e.replace(/(L|D)/g,""))-Number(t.replace(/(L|D)/g,"")):n-a}return"number"==typeof e?1:-1}function d(e,t){var r=null===t[0],n=null===t[1],a=u(e,t[0])>=0,i=u(e,t[1])<=0;return(r||a)&&(n||i)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t<e.tickformatstops.length;t++)if((n=e.tickformatstops[t]).enabled&&(a=e.dtick,i=n.dtickrange,o=void 0,l=void 0,s=void 0,o=c||function(e){return e},l=i[0],s=i[1],(!l&&"number"!=typeof l||o(l)<=o(a))&&(!s&&"number"!=typeof s||o(s)>=o(a)))){r=n;break}break;case"log":for(t=0;t<e.tickformatstops.length;t++)if((n=e.tickformatstops[t]).enabled&&d(e.dtick,n.dtickrange)){r=n;break}}return r?r.value:e.tickformat},Y.getSubplots=function(e,t){var r=e._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),a=t?Y.findSubplotsWithAxis(n,t):n;return a.sort((function(e,t){var r=e.substr(1).split("y"),n=t.substr(1).split("y");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]})),a},Y.findSubplotsWithAxis=function(e,t){for(var r=new RegExp("x"===t._id.charAt(0)?"^"+t._id+"y":t._id+"$"),n=[],a=0;a<e.length;a++){var i=e[a];r.test(i)&&n.push(i)}return n},Y.makeClipPaths=function(e){var t=e._fullLayout;if(!t._hasOnlyLargeSploms){var r,a,i={_offset:0,_length:t.width,_id:""},o={_offset:0,_length:t.height,_id:""},l=Y.list(e,"x",!0),s=Y.list(e,"y",!0),c=[];for(r=0;r<l.length;r++)for(c.push({x:l[r],y:o}),a=0;a<s.length;a++)0===r&&c.push({x:i,y:s[a]}),c.push({x:l[r],y:s[a]});var u=t._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"+t._uid+e.x._id+e.y._id})).append("rect"),u.exit().remove(),u.each((function(e){n.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})}))}},Y.draw=function(e,t,r){var n=e._fullLayout;"redraw"===t&&n._paper.selectAll("g.subplot").each((function(e){var t=e[0],r=n._plots[t];if(r){var a=r.xaxis,i=r.yaxis;r.xaxislayer.selectAll("."+a._id+"tick").remove(),r.yaxislayer.selectAll("."+i._id+"tick").remove(),r.xaxislayer.selectAll("."+a._id+"tick2").remove(),r.yaxislayer.selectAll("."+i._id+"tick2").remove(),r.xaxislayer.selectAll("."+a._id+"divider").remove(),r.yaxislayer.selectAll("."+i._id+"divider").remove(),r.gridlayer&&r.gridlayer.selectAll("path").remove(),r.zerolinelayer&&r.zerolinelayer.selectAll("path").remove(),n._infolayer.select(".g-"+a._id+"title").remove(),n._infolayer.select(".g-"+i._id+"title").remove()}}));var a=t&&"redraw"!==t?t:Y.listIds(e);return l.syncOrAsync(a.map((function(t){return function(){if(t){var n=Y.getFromId(e,t),a=Y.drawOne(e,n,r);return n._r=n.range.slice(),n._rl=l.simpleMap(n._r,n.r2l),a}}})))},Y.drawOne=function(e,t,r){var n,a,s;r=r||{},t.setScale();var c=e._fullLayout,p=t._id,h=p.charAt(0),m=Y.counterLetter(p),g=c._plots[t._mainSubplot];if(g){var v=g[h+"axislayer"],y=t._mainLinePosition,x=t._mainMirrorPosition,b=t._vals=Y.calcTicks(t),_=[t.mirror,y,x].join("_");for(n=0;n<b.length;n++)b[n].axInfo=_;t._selections={},t._tickAngles&&(t._prevTickAngles=t._tickAngles),t._tickAngles={},t._depth=null;var w={};if(t.visible){var T,M,k=Y.makeTransTickFn(t),A=Y.makeTransTickLabelFn(t),L="inside"===t.ticks,S="outside"===t.ticks;if("boundaries"===t.tickson){var D=function(e,t){var r,n=[],a=function(e,t){var r=e.xbnd[t];null!==r&&n.push(l.extendFlat({},e,{x:r}))};if(t.length){for(r=0;r<t.length;r++)a(t[r],0);a(t[r-1],1)}return n}(0,b);M=Y.clipEnds(t,D),T=L?M:D}else M=Y.clipEnds(t,b),T=L&&"period"!==t.ticklabelmode?M:b;var C=t._gridVals=M,O=function(e,t){var r,n,a=[],i=t.length&&t[t.length-1].x<t[0].x,o=function(e,t){var r=e.xbnd[t];null!==r&&a.push(l.extendFlat({},e,{x:r}))};if(e.showdividers&&t.length){for(r=0;r<t.length;r++){var s=t[r];s.text2!==n&&o(s,i?1:0),n=s.text2}o(t[r-1],i?0:1)}return a}(t,b);if(!c._hasOnlyLargeSploms){var P=t._subplotsWith,I={};for(n=0;n<P.length;n++){a=P[n];var R=(s=c._plots[a])[m+"axis"],z=R._mainAxis._id;if(!I[z]){I[z]=1;var N="x"===h?"M0,"+R._offset+"v"+R._length:"M"+R._offset+",0h"+R._length;Y.drawGrid(e,t,{vals:C,counterAxis:R,layer:s.gridlayer.select("."+p),path:N,transFn:k}),Y.drawZeroLine(e,t,{counterAxis:R,layer:s.zerolinelayer,path:N,transFn:k})}}}var F=Y.getTickSigns(t),E=[];if(t.ticks){var j,V,U,q=Y.makeTickPath(t,y,F[2]);if(t._anchorAxis&&t.mirror&&!0!==t.mirror?(j=Y.makeTickPath(t,x,F[3]),V=q+j):(j="",V=q),t.showdividers&&S&&"boundaries"===t.tickson){var G={};for(n=0;n<O.length;n++)G[O[n].x]=1;U=function(e){return G[e.x]?j:V}}else U=V;Y.drawTicks(e,t,{vals:T,layer:v,path:U,transFn:k}),"allticks"===t.mirror&&(E=Object.keys(t._linepositions||{}))}for(n=0;n<E.length;n++){a=E[n],s=c._plots[a];var Z=t._linepositions[a]||[],W=Y.makeTickPath(t,Z[0],F[0])+Y.makeTickPath(t,Z[1],F[1]);Y.drawTicks(e,t,{vals:T,layer:s[h+"axislayer"],path:W,transFn:k})}var X=[];if(X.push((function(){return Y.drawLabels(e,t,{vals:b,layer:v,plotinfo:s,transFn:A,labelFns:Y.makeLabelFns(t,y)})})),"multicategory"===t.type){var J={x:2,y:10}[h];X.push((function(){var r={x:"height",y:"width"}[h],n=K()[r]+J+(t._tickAngles[p+"tick"]?t.tickfont.size*H:0);return Y.drawLabels(e,t,{vals:pe(t,b),layer:v,cls:p+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:k,labelFns:Y.makeLabelFns(t,y+n*F[4])})})),X.push((function(){return t._depth=F[4]*(K("tick2")[t.side]-y),function(e,t,r){var n=t._id+"divider",a=r.vals,i=r.layer.selectAll("path."+n).data(a,me);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(d.stroke,t.dividercolor).style("stroke-width",f.crispRound(e,t.dividerwidth,1)+"px"),i.attr("transform",r.transFn).attr("d",r.path)}(e,t,{vals:O,layer:v,path:Y.makeTickPath(t,y,F[4],t._depth),transFn:k})}))}else t.title.hasOwnProperty("standoff")&&X.push((function(){t._depth=F[4]*(K()[t.side]-y)}));var Q=o.getComponentMethod("rangeslider","isVisible")(t);return X.push((function(){var r,n,a,l,s=t.side.charAt(0),u=B[t.side].charAt(0),d=Y.getPxPosition(e,t),f=S?t.ticklen:0;if((t.automargin||Q)&&("multicategory"===t.type?r=K("tick2"):(r=K(),"x"===h&&"b"===s&&(t._depth=Math.max(r.width>0?r.bottom-d:0,f)))),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if("x"===h){if("b"===s?n[s]=t._depth:(n[s]=t._depth=Math.max(r.width>0?d-r.top:0,f),p.reverse()),r.width>0){var g=r.right-(t._offset+t._length);g>0&&(n.xr=1,n.r=g);var v=t._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if("l"===s?n[s]=t._depth=Math.max(r.height>0?d-r.left:0,f):(n[s]=t._depth=Math.max(r.height>0?r.right-d:0,f),p.reverse()),r.height>0){var y=r.bottom-(t._offset+t._length);y>0&&(n.yb=0,n.b=y);var x=t._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[m]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==c._dfltTitle[h]&&(n[s]+=ge(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[u]=t.linewidth,t.mirror&&!0!==t.mirror&&(a[u]+=f),!0===t.mirror||"ticks"===t.mirror?a[m]=t._anchorAxis.domain[p[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(a[m]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}Q&&(l=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),i.autoMargin(e,xe(t),n),i.autoMargin(e,be(t),a),i.autoMargin(e,_e(t),l)})),r.skipTitle||Q&&"bottom"===t.side||X.push((function(){return function(e,t){var r,n=e._fullLayout,a=t._id,i=a.charAt(0),o=t.title.font.size;if(t.title.hasOwnProperty("standoff"))r=t._depth+t.title.standoff+ge(t);else{var l=Le(t);if("multicategory"===t.type)r=t._depth;else{var s=1.5*o;l&&(s=.5*o,"outside"===t.ticks&&(s+=t.ticklen)),r=10+s+(t.linewidth?t.linewidth-1:0)}l||(r+="x"===i?"top"===t.side?o*(t.showticklabels?1:0):o*(t.showticklabels?1.5:.5):"right"===t.side?o*(t.showticklabels?1:.5):o*(t.showticklabels?.5:0))}var c,d,p,h,m=Y.getPxPosition(e,t);"x"===i?(d=t._offset+t._length/2,p="top"===t.side?m-r:m+r):(p=t._offset+t._length/2,d="right"===t.side?m+r:m-r,c={rotate:"-90",offset:0});if("multicategory"!==t.type){var g=t._selections[t._id+"tick"];if(h={selection:g,side:t.side},g&&g.node()&&g.node().parentNode){var v=f.getTranslate(g.node().parentNode);h.offsetLeft=v.x,h.offsetTop=v.y}t.title.hasOwnProperty("standoff")&&(h.pad=0)}return u.draw(e,a+"title",{propContainer:t,propName:t._name+".title.text",placeholder:n._dfltTitle[i],avoid:h,transform:c,attributes:{x:d,y:p,"text-anchor":"middle"}})}(e,t)})),l.syncOrAsync(X)}}function K(e){var r=p+(e||"tick");return w[r]||(w[r]=function(e,t){var r,n,a,i;e._selections[t].size()?(r=1/0,n=-1/0,a=1/0,i=-1/0,e._selections[t].each((function(){var e=ye(this),t=f.bBox(e.node().parentNode);r=Math.min(r,t.top),n=Math.max(n,t.bottom),a=Math.min(a,t.left),i=Math.max(i,t.right)}))):(r=0,n=0,a=0,i=0);return{top:r,bottom:n,left:a,right:i,height:n-r,width:i-a}}(t,r)),w[r]}},Y.getTickSigns=function(e){var t=e._id.charAt(0),r={x:"top",y:"right"}[t],n=e.side===r?1:-1,a=[-1,1,n,-n];return"inside"!==e.ticks==("x"===t)&&(a=a.map((function(e){return-e}))),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a},Y.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},Y.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),a=r("left"),i=r("right"),o=r("bottom"),l=r("inside"),s=o||a||n||i;if(!s&&!l)return[0,0];var c=e.side,u=s?(e.tickwidth||0)/2:0,d=3,f=e.tickfont?e.tickfont.size:12;(o||n)&&(u+=f*j,d+=(e.linewidth||0)/2);(a||i)&&(u+=(e.linewidth||0)/2,d+=3);l&&"top"===c&&(d-=f*(1-j));(a||n)&&(u=-u);"bottom"!==c&&"right"!==c||(d=-d);return[s?u:0,l?d:0]}(e),r=t[0],n=t[1];return"x"===e._id.charAt(0)?function(t){return s(r+e._offset+e.l2p(he(t)),n)}:function(t){return s(n,r+e._offset+e.l2p(he(t)))}},Y.makeTickPath=function(e,t,r,n){n=void 0!==n?n:e.ticklen;var a=e._id.charAt(0),i=(e.linewidth||1)/2;return"x"===a?"M0,"+(t+i*r)+"v"+n*r:"M"+(t+i*r)+",0h"+n*r},Y.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(e){return-1!==n.indexOf(e)},o=i("top"),s=i("left"),c=i("right"),u=i("bottom")||s||o||c,d=i("inside"),f="inside"===n&&"inside"===e.ticks||!d&&"outside"===e.ticks&&"boundaries"!==e.tickson,p=0,h=0,m=f?e.ticklen:0;if(d?m*=-1:u&&(m=0),f&&(p+=m,r)){var g=l.deg2rad(r);p=m*Math.cos(g)+1,h=m*Math.sin(g)}e.showticklabels&&(f||e.showline)&&(p+=.2*e.tickfont.size);var v,y,x,b,_,w={labelStandoff:p+=(e.linewidth||1)/2*(d?-1:1),labelShift:h},T=0,M=e.side,k=e._id.charAt(0),A=e.tickangle;if("x"===k)b=(_=!d&&"bottom"===M||d&&"top"===M)?1:-1,d&&(b*=-1),v=h*b,y=t+p*b,x=_?1:-.2,90===Math.abs(A)&&(d?x+=E:x=-90===A&&"bottom"===M?j:90===A&&"top"===M?E:.5,T=E/2*(A/90)),w.xFn=function(e){return e.dx+v+T*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*x},w.anchorFn=function(e,t){if(u){if(s)return"end";if(c)return"start"}return a(t)&&0!==t&&180!==t?t*b<0!==d?"end":"start":"middle"},w.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==d?-n:0};else if("y"===k){if(b=(_=!d&&"left"===M||d&&"right"===M)?1:-1,d&&(b*=-1),v=p,y=h*b,x=0,d||90!==Math.abs(A)||(x=-90===A&&"left"===M||90===A&&"right"===M?j:.5),d){var L=a(A)?+A:0;if(0!==L){var S=l.deg2rad(L);T=Math.abs(Math.sin(S))*j*b,x=0}}w.xFn=function(e){return e.dx+t-(v+e.fontSize*x)*b+T*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*E},w.anchorFn=function(e,t){return a(t)&&90===Math.abs(t)?"middle":_?"end":"start"},w.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},Y.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",a=r.vals;"period"===t.ticklabelmode&&(a=a.slice()).shift();var i=r.layer.selectAll("path."+n).data(t.ticks?a:[],me);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(d.stroke,t.tickcolor).style("stroke-width",f.crispRound(e,t.tickwidth,1)+"px").attr("d",r.path).style("display",null),Se(t,[z]),i.attr("transform",r.transFn)},Y.drawGrid=function(e,t,r){r=r||{};var n=t._id+"grid",a=r.vals,i=r.counterAxis;if(!1===t.showgrid)a=[];else if(i&&Y.shouldShowZeroLine(e,t,i))for(var o="array"===t.tickmode,l=0;l<a.length;l++){var s=a[l].x;if(o?!s:Math.abs(s)<t.dtick/100){if(a=a.slice(0,l).concat(a.slice(l+1)),!o)break;l--}}var c=r.layer.selectAll("path."+n).data(a,me);c.exit().remove(),c.enter().append("path").classed(n,1).classed("crisp",!1!==r.crisp),t._gw=f.crispRound(e,t.gridwidth,1),c.attr("transform",r.transFn).attr("d",r.path).call(d.stroke,t.gridcolor||"#ddd").style("stroke-width",t._gw+"px").style("display",null),Se(t,[R]),"function"==typeof r.path&&c.attr("d",r.path)},Y.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=Y.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return q(e.id,t.id)}))})),i.attr("transform",r.transFn).attr("d",r.path).call(d.stroke,t.zerolinecolor||d.defaultLine).style("stroke-width",f.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Se(t,[I])},Y.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,o=t._id,u=o.charAt(0),d=r.cls||o+"tick",p=r.vals,h=r.labelFns,m=r.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[d],v=r.layer.selectAll("g."+d).data(t.showticklabels?p:[],me),y=[];function x(e,i){e.each((function(e){var o=n.select(this),l=o.select(".text-math-group"),u=h.anchorFn(e,i),d=r.transFn.call(o.node(),e)+(a(i)&&0!=+i?" rotate("+i+","+h.xFn(e)+","+(h.yFn(e)-e.fontSize/2)+")":""),p=c.lineCount(o),m=H*e.fontSize,g=h.heightFn(e,a(i)?+i:0,(p-1)*m);if(g&&(d+=s(0,g)),l.empty()){var v=o.select("text");v.attr({transform:d,"text-anchor":u}),v.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var y=f.bBox(l.node()).width*{end:-.5,start:.5}[u];l.attr("transform",d+s(y,0))}}))}v.enter().append("g").classed(d,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),a=e._promises.length;r.call(c.positionText,h.xFn(t),h.yFn(t)).call(f.font,t.font,t.fontSize,t.fontColor).text(t.text).call(c.convertToTspans,e),e._promises[a]?y.push(e._promises.pop().then((function(){x(r,m)}))):x(r,m)})),Se(t,[N]),v.exit().remove(),r.repositionOnUpdate&&v.each((function(e){n.select(this).select("text").call(c.positionText,h.xFn(e),h.yFn(e))})),t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&"allow"!==r){var a=-1!==r.indexOf("hide"),o="x"===t._id.charAt(0),s=0,c=o?e._fullLayout.width:e._fullLayout.height;if(-1!==r.indexOf("domain")){var u=l.simpleMap(t.range,t.r2l);s=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var d=Math.min(s,c),p=Math.max(s,c),h=t.side,m=1/0,g=-1/0;for(var y in v.each((function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var i=f.bBox(r.node()),l=0;o?(i.right>p||i.left<d)&&(l=1):(i.bottom>p||i.top+(t.tickangle?0:e.fontSize/4)<d)&&(l=1);var s=r.select("text");l?a&&s.style("opacity",0):(s.style("opacity",1),m="bottom"===h||"right"===h?Math.min(m,o?i.top:i.left):-1/0,g="top"===h||"left"===h?Math.max(g,o?i.bottom:i.right):1/0)}})),i._plots){var x=i._plots[y];if(t._id===x.xaxis._id||t._id===x.yaxis._id){var b=o?x.yaxis:x.xaxis;b&&(b["_visibleLabelMin_"+t._id]=m,b["_visibleLabelMax_"+t._id]=g)}}}},t._hideCounterAxisInsideTickLabels=function(e){var r="x"===t._id.charAt(0),a=[];for(var o in i._plots){var l=i._plots[o];t._id!==l.xaxis._id&&t._id!==l.yaxis._id||a.push(r?l.yaxis:l.xaxis)}a.forEach((function(r,a){r&&Le(r)&&(e||[I,R,z,N]).forEach((function(e){var o="tick"===e.K&&"text"===e.L&&"period"===t.ticklabelmode,l=i._plots[t._mainSubplot];(e.K===I.K?l.zerolinelayer.selectAll("."+t._id+"zl"):e.K===R.K?l.gridlayer.selectAll("."+t._id):l[t._id.charAt(0)+"axislayer"]).each((function(){var i=n.select(this);e.L&&(i=i.selectAll(e.L)),i.each((function(i){var l=t.l2p(o?he(i):i.x)+t._offset,s=n.select(this);l<t["_visibleLabelMax_"+r._id]&&l>t["_visibleLabelMin_"+r._id]?s.style("display","none"):"tick"!==e.K||a||s.style("display",null)}))}))}))}))},x(v,g+1?g:m);var b=null;t._selections&&(t._selections[d]=v);var _=[function(){return y.length&&Promise.all(y)}];t.automargin&&i._redrawFromAutoMarginCount&&90===g?(b=90,_.push((function(){x(v,g)}))):_.push((function(){if(x(v,m),p.length&&"x"===u&&!a(m)&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=0;var e,n=0,i=[];if(v.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),a=ye(this),o=f.bBox(a.node());i.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),"boundaries"!==t.tickson&&!t.showdividers||r.secondary){var o=p.length,s=Math.abs((p[o-1].x-p[0].x)*t._m)/(o-1),c=t.ticklabelposition||"",d=function(e){return-1!==c.indexOf(e)},h=d("top"),g=d("left"),y=d("right"),_=d("bottom")||g||h||y?(t.tickwidth||0)+6:0,w=s<2.5*n||"multicategory"===t.type||"realaxis"===t._name;for(e=0;e<i.length-1;e++)if(l.bBoxIntersect(i[e],i[e+1],_)){b=w?90:30;break}}else{var T=2;for(t.ticks&&(T+=t.tickwidth/2),e=0;e<i.length;e++){var M=p[e].xbnd,k=i[e];if(null!==M[0]&&k.left-t.l2p(M[0])<T||null!==M[1]&&t.l2p(M[1])-k.right<T){b=90;break}}}b&&x(v,b)}})),t._tickAngles&&_.push((function(){t._tickAngles[d]=null===b?a(m)?m:0:b}));var w=t._anchorAxis;w&&w.autorange&&Le(t)&&!G(i,t._id)&&(i._insideTickLabelsAutorange||(i._insideTickLabelsAutorange={}),i._insideTickLabelsAutorange[w._name+".autorange"]=w.autorange,_.push((function(){v.each((function(e,r){var n=ye(this);n.select(".text-math-group").empty()&&(t._vals[r].bb=f.bBox(n.node()))}))})));var T=l.syncOrAsync(_);return T&&T.then&&e._promises.push(T),T},Y.getPxPosition=function(e,t){var r,n=e._fullLayout._size,a=t._id.charAt(0),i=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===a?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===a&&(r={_offset:n.l+(t.position||0)*n.w,_length:0}),"top"===i||"left"===i?r._offset:"bottom"===i||"right"===i?r._offset+r._length:void 0},Y.shouldShowZeroLine=function(e,t,r){var n=l.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===P)&&(ve(t,0)||!function(e,t,r,n){var a=r._mainAxis;if(!a)return;var i=e._fullLayout,o=t._id.charAt(0),l=Y.counterLetter(t._id),s=t._offset+(Math.abs(n[0])<Math.abs(n[1])==("x"===o)?0:t._length);function c(e){if(!e.showline||!e.linewidth)return!1;var r=Math.max((e.linewidth+t.zerolinewidth)/2,1);function n(e){return"number"==typeof e&&Math.abs(e-s)<r}if(n(e._mainLinePosition)||n(e._mainMirrorPosition))return!0;var a=e._linepositions||{};for(var i in a)if(n(a[i][0])||n(a[i][1]))return!0}var u=i._plots[r._mainSubplot];if(!(u.mainplotinfo||u).overlays.length)return c(r);for(var d=Y.list(e,l),f=0;f<d.length;f++){var p=d[f];if(p._mainAxis===a&&c(p))return!0}}(e,t,r,n)||function(e,t){for(var r=e._fullData,n=t._mainSubplot,a=t._id.charAt(0),i=0;i<r.length;i++){var l=r[i];if(!0===l.visible&&l.xaxis+l.yaxis===n){if(o.traceIs(l,"bar-like")&&l.orientation==={x:"h",y:"v"}[a])return!0;if(l.fill&&l.fill.charAt(l.fill.length-1)===a)return!0}}return!1}(e,t))},Y.clipEnds=function(e,t){return t.filter((function(t){return ve(e,t.x)}))},Y.allowAutoMargin=function(e){for(var t=Y.list(e,"",!0),r=0;r<t.length;r++){var n=t[r];n.automargin&&(i.allowAutoMargin(e,xe(n)),n.mirror&&i.allowAutoMargin(e,be(n))),o.getComponentMethod("rangeslider","isVisible")(n)&&i.allowAutoMargin(e,_e(n))}},Y.swap=function(e,t){for(var r=function(e,t){var r,n,a=[];for(r=0;r<t.length;r++){var i=[],o=e._fullData[t[r]].xaxis,l=e._fullData[t[r]].yaxis;if(o&&l){for(n=0;n<a.length;n++)-1===a[n].x.indexOf(o)&&-1===a[n].y.indexOf(l)||i.push(n);if(i.length){var s,c=a[i[0]];if(i.length>1)for(n=1;n<i.length;n++)s=a[i[n]],we(c.x,s.x),we(c.y,s.y);we(c.x,[o]),we(c.y,[l])}else a.push({x:[o],y:[l]})}}return a}(e,t),n=0;n<r.length;n++)Te(e,r[n].x,r[n].y)}},{"../../components/color":102,"../../components/drawing":124,"../../components/titles":200,"../../constants/alignment":207,"../../constants/numerical":212,"../../lib":232,"../../lib/svg_text_utils":255,"../../plots/plots":316,"../../registry":318,"./autorange":278,"./axis_autotype":280,"./axis_ids":283,"./clean_ticks":285,"./layout_attributes":294,"./set_convert":301,"@plotly/d3":11,"fast-isnumeric":17}],280:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").BADNUM,o=a.isArrayOrTypedArray,l=a.isDateTime,s=a.cleanNumber,c=Math.round;function u(e,t){return t?n(e):"number"==typeof e}function d(e){return Math.max(1,(e-1)/1e3)}t.exports=function(e,t,r){var a=e,f=r.noMultiCategory;if(o(a)&&!a.length)return"-";if(!f&&function(e){return o(e[0])&&o(e[1])}(a))return"multicategory";if(f&&Array.isArray(a[0])){for(var p=[],h=0;h<a.length;h++)if(o(a[h]))for(var m=0;m<a[h].length;m++)p.push(a[h][m]);a=p}if(function(e,t){for(var r=e.length,a=d(r),i=0,o=0,s={},u=0;u<r;u+=a){var f=c(u),p=e[f],h=String(p);s[h]||(s[h]=1,l(p,t)&&i++,n(p)&&o++)}return i>2*o}(a,t))return"date";var g="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=d(r),a=0,o=0,l={},u=0;u<r;u+=n){var f=c(u),p=e[f],h=String(p);if(!l[h]){l[h]=1;var m=typeof p;"boolean"===m?o++:(t?s(p)!==i:"number"===m)?a++:"string"===m&&o++}}return o>2*a}(a,g)?"category":function(e,t){for(var r=e.length,n=0;n<r;n++)if(u(e[n],t))return!0;return!1}(a,g)?"linear":"-"}},{"../../constants/numerical":212,"../../lib":232,"fast-isnumeric":17}],281:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../registry"),i=e("../../lib"),o=e("../array_container_defaults"),l=e("./layout_attributes"),s=e("./tick_value_defaults"),c=e("./tick_mark_defaults"),u=e("./tick_label_defaults"),d=e("./prefix_suffix_defaults"),f=e("./category_order_defaults"),p=e("./line_grid_defaults"),h=e("./set_convert"),m=e("./constants").WEEKDAY_PATTERN,g=e("./constants").HOUR_PATTERN;function v(e,t,r){function a(r,n){return i.coerce(e,t,l.rangebreaks,r,n)}if(a("enabled")){var o=a("bounds");if(o&&o.length>=2){var s,c,u="";if(2===o.length)for(s=0;s<2;s++)if(c=x(o[s])){u=m;break}var d=a("pattern",u);if(d===m)for(s=0;s<2;s++)(c=x(o[s]))&&(t.bounds[s]=o[s]=c-1);if(d)for(s=0;s<2;s++)switch(c=o[s],d){case m:if(!n(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[s]=o[s]=c;break;case g:if(!n(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[s]=o[s]=c}if(!1===r.autorange){var f=r.range;if(f[0]<f[1]){if(o[0]<f[0]&&o[1]>f[1])return void(t.enabled=!1)}else if(o[0]>f[0]&&o[1]<f[1])return void(t.enabled=!1)}}else{var p=a("values");if(!p||!p.length)return void(t.enabled=!1);a("dvalue")}}}t.exports=function(e,t,r,n,g){var y,x=n.letter,b=n.font||{},_=n.splomStash||{},w=r("visible",!n.visibleDflt),T=t._template||{},M=t.type||T.type||"-";"date"===M&&(a.getComponentMethod("calendars","handleDefaults")(e,t,"calendar",n.calendar),n.noTicklabelmode||(y=r("ticklabelmode")));var k="";n.noTicklabelposition&&"multicategory"!==M||(k=i.coerce(e,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===y?["outside","inside"]:"x"===x?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||r("ticklabeloverflow",-1!==k.indexOf("inside")?"hide past domain":"category"===M||"multicategory"===M?"allow":"hide past div"),h(t,g);var A=!t.isValidRange(e.range);A&&n.reverseDflt&&(A="reversed"),!r("autorange",A)||"linear"!==M&&"-"!==M||r("rangemode"),r("range"),t.cleanRange(),f(e,t,r,n),"category"===M||n.noHover||r("hoverformat");var L=r("color"),S=L!==l.color.dflt?L:b.color,D=_.label||g._dfltTitle[x];if(d(e,t,r,M,n),!w)return t;r("title.text",D),i.coerceFont(r,"title.font",{family:b.family,size:i.bigFont(b.size),color:S}),s(e,t,r,M),u(e,t,r,M,n),c(e,t,r,n),p(e,t,r,{dfltColor:L,bgColor:n.bgColor,showGrid:n.showGrid,attributes:l}),(t.showline||t.ticks)&&r("mirror"),n.automargin&&r("automargin");var C,O="multicategory"===M;n.noTickson||"category"!==M&&!O||!t.ticks&&!t.showgrid||(O&&(C="boundaries"),"boundaries"===r("tickson",C)&&delete t.ticklabelposition);O&&(r("showdividers")&&(r("dividercolor"),r("dividerwidth")));if("date"===M)if(o(e,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:v}),t.rangebreaks.length){for(var P=0;P<t.rangebreaks.length;P++)if(t.rangebreaks[P].pattern===m){t._hasDayOfWeekBreaks=!0;break}if(h(t,g),g._has("scattergl")||g._has("splom"))for(var I=0;I<n.data.length;I++){var R=n.data[I];"scattergl"!==R.type&&"splom"!==R.type||(R.visible=!1,i.warn(R.type+" traces do not work on axes with rangebreaks. Setting trace "+R.index+" to `visible: false`."))}}else delete t.rangebreaks;return t};var y={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function x(e){if("string"==typeof e)return y[e.substr(0,3).toLowerCase()]}},{"../../lib":232,"../../registry":318,"../array_container_defaults":274,"./category_order_defaults":284,"./constants":286,"./layout_attributes":294,"./line_grid_defaults":296,"./prefix_suffix_defaults":298,"./set_convert":301,"./tick_label_defaults":303,"./tick_mark_defaults":304,"./tick_value_defaults":305,"fast-isnumeric":17}],282:[function(e,t,r){"use strict";var n=e("../../constants/docs"),a=n.FORMAT_LINK,i=n.DATE_FORMAT_LINK;function o(e,t){return["Sets the "+e+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+a+"."].join(" ")}function l(e,t){return o(e,t)+[" And for dates see: "+i+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{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(" ")}t.exports={axisHoverFormat:function(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?o:l)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:o,descriptionWithDates:l}},{"../../constants/docs":209}],283:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("./constants");function i(e,t){if(t&&t.length)for(var r=0;r<t.length;r++)if(t[r][e])return!0;return!1}r.id2name=function(e){if("string"==typeof e&&e.match(a.AX_ID_PATTERN)){var t=e.split(" ")[0].substr(1);return"1"===t&&(t=""),e.charAt(0)+"axis"+t}},r.name2id=function(e){if(e.match(a.AX_NAME_PATTERN)){var t=e.substr(5);return"1"===t&&(t=""),e.charAt(0)+t}},r.cleanId=function(e,t,r){var n=/( domain)$/.test(e);if("string"==typeof e&&e.match(a.AX_ID_PATTERN)&&(!t||e.charAt(0)===t)&&(!n||r)){var i=e.split(" ")[0].substr(1).replace(/^0+/,"");return"1"===i&&(i=""),e.charAt(0)+i+(n&&r?" domain":"")}},r.list=function(e,t,n){var a=e._fullLayout;if(!a)return[];var i,o=r.listIds(e,t),l=new Array(o.length);for(i=0;i<o.length;i++){var s=o[i];l[i]=a[s.charAt(0)+"axis"+s.substr(1)]}if(!n){var c=a._subplots.gl3d||[];for(i=0;i<c.length;i++){var u=a[c[i]];t?l.push(u[t+"axis"]):l.push(u.xaxis,u.yaxis,u.zaxis)}}return l},r.listIds=function(e,t){var r=e._fullLayout;if(!r)return[];var n=r._subplots;return t?n[t+"axis"]:n.xaxis.concat(n.yaxis)},r.getFromId=function(e,t,n){var a=e._fullLayout;return t=void 0===t||"string"!=typeof t?t:t.replace(" domain",""),"x"===n?t=t.replace(/y[0-9]*/,""):"y"===n&&(t=t.replace(/x[0-9]*/,"")),a[r.id2name(t)]},r.getFromTrace=function(e,t,a){var i=e._fullLayout,o=null;if(n.traceIs(t,"gl3d")){var l=t.scene;"scene"===l.substr(0,5)&&(o=i[l][a+"axis"])}else o=r.getFromId(e,t[a+"axis"]||a);return o},r.idSort=function(e,t){var r=e.charAt(0),n=t.charAt(0);return r!==n?r>n?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},r.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},r.isLinked=function(e,t){return i(t,e._axisMatchGroups)||i(t,e._axisConstraintGroups)}},{"../../registry":318,"./constants":286}],284:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){if("category"===t.type){var a,i=e.categoryarray,o=Array.isArray(i)&&i.length>0;o&&(a="array");var l,s=r("categoryorder",a);"array"===s&&(l=r("categoryarray")),o||"array"!==s||(s=t.categoryorder="trace"),"trace"===s?t._initialCategories=[]:"array"===s?t._initialCategories=l.slice():(l=function(e,t){var r,n,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;n<t.data.length;n++){var l=t.data[n];l[i+"axis"]===e._id&&r.push(l)}for(n=0;n<r.length;n++){var s=r[n][i];for(a=0;a<s.length;a++){var c=s[a];null!=c&&(o[c]=1)}}return Object.keys(o)}(t,n).sort(),"category ascending"===s?t._initialCategories=l:"category descending"===s&&(t._initialCategories=l.reverse()))}}},{}],285:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical"),o=i.ONEDAY,l=i.ONEWEEK;r.dtick=function(e,t){var r="log"===t,a="date"===t,i="category"===t,l=a?o:1;if(!e)return l;if(n(e))return(e=Number(e))<=0?l:i?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if("string"!=typeof e||!a&&!r)return l;var s=e.charAt(0),c=e.substr(1);return(c=n(c)?Number(c):0)<=0||!(a&&"M"===s&&c===Math.round(c)||r&&"L"===s||r&&"D"===s&&(1===c||2===c))?l:e},r.tick0=function(e,t,r,i){return"date"===t?a.cleanDate(e,a.dateTick0(r,i%l==0?1:0)):"D1"!==i&&"D2"!==i?n(e)?Number(e):0:void 0}},{"../../constants/numerical":212,"../../lib":232,"fast-isnumeric":17}],286:[function(e,t,r){"use strict";var n=e("../../lib/regex").counter;t.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:"-select",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},{"../../lib/regex":248}],287:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./autorange"),i=e("./axis_ids").id2name,o=e("./layout_attributes"),l=e("./scale_zoom"),s=e("./set_convert"),c=e("../../constants/numerical").ALMOST_EQUAL,u=e("../../constants/alignment").FROM_BL;function d(e,t,r){var a=r.axIds,l=r.layoutOut,s=r.hasImage,c=l._axisConstraintGroups,u=l._axisMatchGroups,d=t._id,m=d.charAt(0),g=((l._splomAxes||{})[m]||{})[d]||{},v=t._id,y="x"===v.charAt(0);function x(r,a){return n.coerce(e,t,o,r,a)}t._matchGroup=null,t._constraintGroup=null,x("constrain",s?"domain":"range"),n.coerce(e,t,{constraintoward:{valType:"enumerated",values:y?["left","center","right"]:["bottom","middle","top"],dflt:y?"center":"middle"}},"constraintoward");var b,_,w=t.type,T=[];for(b=0;b<a.length;b++){if((_=a[b])!==v)l[i(_)].type===w&&T.push(_)}var M=p(c,v);if(M){var k=[];for(b=0;b<T.length;b++)M[_=T[b]]||k.push(_);T=k}var A,L,S=T.length;S&&(e.matches||g.matches)&&(A=n.coerce(e,t,{matches:{valType:"enumerated",values:T,dflt:-1!==T.indexOf(g.matches)?g.matches:void 0}},"matches"));var D=s&&!y?t.anchor:void 0;if(S&&!A&&(e.scaleanchor||D)&&(L=n.coerce(e,t,{scaleanchor:{valType:"enumerated",values:T}},"scaleanchor",D)),A){t._matchGroup=h(u,v,A,1);var C=l[i(A)],O=f(l,t)/f(l,C);y!==("x"===A.charAt(0))&&(O=(y?"x":"y")+O),h(c,v,A,O)}else e.matches&&-1!==a.indexOf(e.matches)&&n.warn("ignored "+t._name+'.matches: "'+e.matches+'" to avoid an infinite loop');if(L){var P=x("scaleratio");P||(P=t.scaleratio=1),h(c,v,L,P)}else e.scaleanchor&&-1!==a.indexOf(e.scaleanchor)&&n.warn("ignored "+t._name+'.scaleanchor: "'+e.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function f(e,t){var r=t.domain;return r||(r=e[i(t.overlaying)].domain),r[1]-r[0]}function p(e,t){for(var r=0;r<e.length;r++)if(e[r][t])return e[r];return null}function h(e,t,r,n){var a,i,o,l,s,c=p(e,t);null===c?((c={})[t]=1,s=e.length,e.push(c)):s=e.indexOf(c);var u=Object.keys(c);for(a=0;a<e.length;a++)if(o=e[a],a!==s&&o[r]){var d=o[r];for(i=0;i<u.length;i++)o[l=u[i]]=m(d,m(n,c[l]));return void e.splice(s,1)}if(1!==n)for(i=0;i<u.length;i++){var f=u[i];c[f]=m(n,c[f])}c[r]=1}function m(e,t){var r,n,a="",i="";"string"==typeof e&&(r=(a=e.match(/^[xy]*/)[0]).length,e=+e.substr(r)),"string"==typeof t&&(n=(i=t.match(/^[xy]*/)[0]).length,t=+t.substr(n));var o=e*t;return r||n?r&&n&&a.charAt(0)!==i.charAt(0)?r===n?o:(r>n?a.substr(n):i.substr(r))+o:a+i+e*t:o}function g(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;o<i.length;o++){var l=i[o],s=e[l];if("string"==typeof s){var c=s.match(/^[xy]*/)[0],u=c.length;s=+s.substr(u);for(var d="y"===c.charAt(0)?n:1/n,f=0;f<u;f++)s*=d}a[l]=s}return a}function v(e,t){var r=e._inputDomain,n=u[e.constraintoward],a=r[0]+(r[1]-r[0])*n;e.domain=e._input.domain=[a+(r[0]-a)/t,a+(r[1]-a)/t],e.setScale()}r.handleDefaults=function(e,t,r){var a,o,l,c,u,f,p,h,m=r.axIds,g=r.axHasImage,v=t._axisConstraintGroups=[],y=t._axisMatchGroups=[];for(a=0;a<m.length;a++)d(u=e[c=i(m[a])],f=t[c],{axIds:m,layoutOut:t,hasImage:g[c]});function x(e,r){for(a=0;a<e.length;a++)for(l in o=e[a])t[i(l)][r]=o}for(x(y,"_matchGroup"),a=0;a<v.length;a++)for(l in o=v[a])if((f=t[i(l)]).fixedrange){for(var b in o){var _=i(b);!1===(e[_]||{}).fixedrange&&n.warn("fixedrange was specified as false for axis "+_+" but was overridden because another axis in its constraint group has fixedrange true"),t[_].fixedrange=!0}break}for(a=0;a<v.length;){for(l in o=v[a]){(f=t[i(l)])._matchGroup&&Object.keys(f._matchGroup).length===Object.keys(o).length&&(v.splice(a,1),a--);break}a++}x(v,"_constraintGroup");var w=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],T=!1,M=!1;function k(){h=f[p],"rangebreaks"===p&&(M=f._hasDayOfWeekBreaks)}for(a=0;a<y.length;a++){o=y[a];for(var A=0;A<w.length;A++){var L;for(l in p=w[A],h=null,o)if(u=e[c=i(l)],f=t[c],p in f){if(!f.matches&&(L=f,p in u)){k();break}null===h&&p in u&&k()}if("range"===p&&h&&(T=!0),"autorange"===p&&null===h&&T&&(h=!1),null===h&&p in L&&(h=L[p]),null!==h)for(l in o)(f=t[i(l)])[p]="range"===p?h.slice():h,"rangebreaks"===p&&(f._hasDayOfWeekBreaks=M,s(f,t))}}},r.enforce=function(e){var t,r,n,o,s,u,d,f,p=e._fullLayout,h=p._axisConstraintGroups||[];for(t=0;t<h.length;t++){n=g(h[t],p);var m=Object.keys(n),y=1/0,x=0,b=1/0,_={},w={},T=!1;for(r=0;r<m.length;r++)w[o=m[r]]=s=p[i(o)],s._inputDomain?s.domain=s._inputDomain.slice():s._inputDomain=s.domain.slice(),s._inputRange||(s._inputRange=s.range.slice()),s.setScale(),_[o]=u=Math.abs(s._m)/n[o],y=Math.min(y,u),"domain"!==s.constrain&&s._constraintShrinkable||(b=Math.min(b,u)),delete s._constraintShrinkable,x=Math.max(x,u),"domain"===s.constrain&&(T=!0);if(!(y>c*x)||T)for(r=0;r<m.length;r++)if(u=_[o=m[r]],d=(s=w[o]).constrain,u!==b||"domain"===d)if(f=u/b,"range"===d)l(s,f);else{var M=s._inputDomain,k=(s.domain[1]-s.domain[0])/(M[1]-M[0]),A=(s.r2l(s.range[1])-s.r2l(s.range[0]))/(s.r2l(s._inputRange[1])-s.r2l(s._inputRange[0]));if((f/=k)*A<1){s.domain=s._input.domain=M.slice(),l(s,f);continue}if(A<1&&(s.range=s._input.range=s._inputRange.slice(),f*=A),s.autorange){var L=s.r2l(s.range[0]),S=s.r2l(s.range[1]),D=(L+S)/2,C=D,O=D,P=Math.abs(S-D),I=D-P*f*1.0001,R=D+P*f*1.0001,z=a.makePadFn(p,s,0),N=a.makePadFn(p,s,1);v(s,f);var F,E,j=Math.abs(s._m),H=a.concatExtremes(e,s),B=H.min,Y=H.max;for(E=0;E<B.length;E++)(F=B[E].val-z(B[E])/j)>I&&F<C&&(C=F);for(E=0;E<Y.length;E++)(F=Y[E].val+N(Y[E])/j)<R&&F>O&&(O=F);f/=(O-C)/(2*P),C=s.l2r(C),O=s.l2r(O),s.range=s._input.range=L<S?[C,O]:[O,C]}v(s,f)}}},r.getAxisGroup=function(e,t){for(var r=e._axisMatchGroups,n=0;n<r.length;n++){if(r[n][t])return"g"+n}return t},r.clean=function(e,t){if(t._inputDomain){for(var r=!1,n=t._id,a=e._fullLayout._axisConstraintGroups,i=0;i<a.length;i++)if(a[i][n]){r=!0;break}r&&"domain"===t.constrain||(t._input.domain=t.domain=t._inputDomain,delete t._inputDomain)}}},{"../../constants/alignment":207,"../../constants/numerical":212,"../../lib":232,"./autorange":278,"./axis_ids":283,"./layout_attributes":294,"./scale_zoom":299,"./set_convert":301}],288:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib"),i=a.numberFormat,o=e("tinycolor2"),l=e("has-passive-events"),s=e("../../registry"),c=a.strTranslate,u=e("../../lib/svg_text_utils"),d=e("../../components/color"),f=e("../../components/drawing"),p=e("../../components/fx"),h=e("./axes"),m=e("../../lib/setcursor"),g=e("../../components/dragelement"),v=e("../../components/dragelement/helpers"),y=v.selectingOrDrawing,x=v.freeMode,b=e("../../constants/alignment").FROM_TL,_=e("../../lib/clear_gl_canvases"),w=e("../../plot_api/subroutines").redrawReglTraces,T=e("../plots"),M=e("./axis_ids").getFromId,k=e("./select").prepSelect,A=e("./select").clearSelect,L=e("./select").selectOnClick,S=e("./scale_zoom"),D=e("./constants"),C=D.MINDRAG,O=D.MINZOOM,P=!0;function I(e,t,r,n){var i=a.ensureSingle(e.draglayer,t,r,(function(t){t.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)}));return i.call(m,n),i.node()}function R(e,t,r,a,i,o,l){var s=I(e,"rect",t,r);return n.select(s).call(f.setRect,a,i,o,l),s}function z(e,t){for(var r=0;r<e.length;r++)if(!e[r].fixedrange)return t;return""}function N(e,t,r,n,a){for(var i=0;i<e.length;i++){var o=e[i];if(!o.fixedrange)if(o.rangebreaks){var l="y"===o._id.charAt(0),s=l?1-t:t,c=l?1-r:r;n[o._name+".range[0]"]=o.l2r(o.p2l(s*o._length)),n[o._name+".range[1]"]=o.l2r(o.p2l(c*o._length))}else{var u=o._rl[0],d=o._rl[1]-u;n[o._name+".range[0]"]=o.l2r(u+d*t),n[o._name+".range[1]"]=o.l2r(u+d*r)}}if(a&&a.length){var f=(t+(1-r))/2;N(a,f,1-f,n,[])}}function F(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(!n.fixedrange)if(n.rangebreaks){var a=n._length,i=(n.p2l(0+t)-n.p2l(0)+(n.p2l(a+t)-n.p2l(a)))/2;n.range=[n.l2r(n._rl[0]-i),n.l2r(n._rl[1]-i)]}else n.range=[n.l2r(n._rl[0]-t/n._m),n.l2r(n._rl[1]-t/n._m)]}}function E(e){return 1-(e>=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function j(e,t,r,n,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",c(r,n)).attr("d",a+"Z")}function H(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(t,r)).attr("d","M0,0Z")}function B(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Y(e,t,a,i)}function Y(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function V(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function U(e){P&&e.data&&e._context.showTips&&(a.notifier(a._(e,"Double-click to zoom back out"),"long"),P=!1)}function q(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,O)/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 G(e,t,r,n,i){for(var o,l,s,c,u=!1,d={},f={},p=(i||{}).xaHash,h=(i||{}).yaHash,m=0;m<t.length;m++){var g=t[m];for(o in r)if(g[o]){for(s in g)i&&(p[s]||h[s])||("x"===s.charAt(0)?r:n)[s]||(d[s]=o);for(l in n)i&&(p[l]||h[l])||!g[l]||(u=!0)}for(l in n)if(g[l])for(c in g)i&&(p[c]||h[c])||("x"===c.charAt(0)?r:n)[c]||(f[c]=l)}u&&(a.extendFlat(d,f),f={});var v={},y=[];for(s in d){var x=M(e,s);y.push(x),v[x._id]=x}var b={},_=[];for(c in f){var w=M(e,c);_.push(w),b[w._id]=w}return{xaHash:v,yaHash:b,xaxes:y,yaxes:_,xLinks:d,yLinks:f,isSubplotConstrained:u}}function Z(e,t){if(l){var r=void 0!==e.onwheel?"wheel":"mousewheel";e._onwheel&&e.removeEventListener(r,e._onwheel),e._onwheel=t,e.addEventListener(r,t,{passive:!1})}else void 0!==e.onwheel?e.onwheel=t:void 0!==e.onmousewheel?e.onmousewheel=t:e.isAddedWheelEvent||(e.isAddedWheelEvent=!0,e.addEventListener("wheel",t,{passive:!1}))}function W(e){var t=[];for(var r in e)t.push(e[r]);return t}t.exports={makeDragBox:function(e,t,r,l,c,d,m,v){var P,I,Y,X,J,Q,K,$,ee,te,re,ne,ae,ie,oe,le,se,ce,ue,de,fe,pe,he,me=e._fullLayout._zoomlayer,ge=m+v==="nsew",ve=1===(m+v).length;function ye(){if(P=t.xaxis,I=t.yaxis,ee=P._length,te=I._length,K=P._offset,$=I._offset,(Y={})[P._id]=P,(X={})[I._id]=I,m&&v)for(var r=t.overlays,n=0;n<r.length;n++){var a=r[n].xaxis;Y[a._id]=a;var i=r[n].yaxis;X[i._id]=i}J=W(Y),Q=W(X),ae=z(J,v),ie=z(Q,m),oe=!ie&&!ae,ne=G(e,e._fullLayout._axisMatchGroups,Y,X);var o=(re=G(e,e._fullLayout._axisConstraintGroups,Y,X,ne)).isSubplotConstrained||ne.isSubplotConstrained;le=v||o,se=m||o;var l=e._fullLayout;ce=l._has("scattergl"),ue=l._has("splom"),de=l._has("svg")}ye();var xe=function(e,t,r){if(!e)return"pointer";if("nsew"===e)return r?"":"pan"===t?"move":"crosshair";return e.toLowerCase()+"-resize"}(ie+ae,e._fullLayout.dragmode,ge),be=R(t,m+v+"drag",xe,r,l,c,d);if(oe&&!ge)return be.onmousedown=null,be.style.pointerEvents="none",be;var _e,we,Te,Me,ke,Ae,Le,Se,De,Ce,Oe={element:be,gd:e,plotinfo:t};function Pe(){Oe.plotinfo.selection=!1,A(e)}function Ie(e,r){var a=Oe.gd;if(a._fullLayout._activeShapeIndex>=0)a._fullLayout._deactivateShape(a);else{var o=a._fullLayout.clickmode;if(V(a),2!==e||ve||Ue(),ge)o.indexOf("select")>-1&&L(r,a,J,Q,t.id,Oe),o.indexOf("event")>-1&&p.click(a,r,t.id);else if(1===e&&ve){var l=m?I:P,c="s"===m||"w"===v?0:1,d=l._name+".range["+c+"]",f=function(e,t){var r,n=e.range[t],a=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,i("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,i("."+String(r)+"g")(n))}(l,c),h="left",g="middle";if(l.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===l.side&&(h="right")):"e"===v&&(h="right"),a._context.showAxisRangeEntryBoxes&&n.select(be).call(u.makeEditable,{gd:a,immediate:!0,background:a._fullLayout.paper_bgcolor,text:String(f),fill:l.tickfont?l.tickfont.color:"#444",horizontalAlign:h,verticalAlign:g}).on("edit",(function(e){var t=l.d2r(e);void 0!==t&&s.call("_guiRelayout",a,d,t)}))}}}function Re(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,pe*t+_e)),a=Math.max(0,Math.min(te,he*r+we)),i=Math.abs(n-_e),o=Math.abs(a-we);function l(){Le="",Te.r=Te.l,Te.t=Te.b,De.attr("d","M0,0Z")}if(Te.l=Math.min(_e,n),Te.r=Math.max(_e,n),Te.t=Math.min(we,a),Te.b=Math.max(we,a),re.isSubplotConstrained)i>O||o>O?(Le="xy",i/ee>o/te?(o=i*te/ee,we>a?Te.t=we-o:Te.b=we+o):(i=o*ee/te,_e>n?Te.l=_e-i:Te.r=_e+i),De.attr("d",q(Te))):l();else if(ne.isSubplotConstrained)if(i>O||o>O){Le="xy";var s=Math.min(Te.l/ee,(te-Te.b)/te),c=Math.max(Te.r/ee,(te-Te.t)/te);Te.l=s*ee,Te.r=c*ee,Te.b=(1-s)*te,Te.t=(1-c)*te,De.attr("d",q(Te))}else l();else!ie||o<Math.min(Math.max(.6*i,C),O)?i<C||!ae?l():(Te.t=0,Te.b=te,Le="x",De.attr("d",function(e,t){return"M"+(e.l-.5)+","+(t-O-.5)+"h-3v"+(2*O+1)+"h3ZM"+(e.r+.5)+","+(t-O-.5)+"h3v"+(2*O+1)+"h-3Z"}(Te,we))):!ae||i<Math.min(.6*o,O)?(Te.l=0,Te.r=ee,Le="y",De.attr("d",function(e,t){return"M"+(t-O-.5)+","+(e.t-.5)+"v-3h"+(2*O+1)+"v3ZM"+(t-O-.5)+","+(e.b+.5)+"v3h"+(2*O+1)+"v-3Z"}(Te,_e))):(Le="xy",De.attr("d",q(Te)));Te.w=Te.r-Te.l,Te.h=Te.b-Te.t,Le&&(Ce=!0),e._dragged=Ce,B(Se,De,Te,ke,Ae,Me),ze(),e.emit("plotly_relayouting",fe),Ae=!0}function ze(){fe={},"xy"!==Le&&"x"!==Le||(N(J,Te.l/ee,Te.r/ee,fe,re.xaxes),Ye("x",fe)),"xy"!==Le&&"y"!==Le||(N(Q,(te-Te.b)/te,(te-Te.t)/te,fe,re.yaxes),Ye("y",fe))}function Ne(){ze(),V(e),qe(),U(e)}Oe.prepFn=function(t,r,n){var i=Oe.dragmode,l=e._fullLayout.dragmode;l!==i&&(Oe.dragmode=l),ye(),pe=e._fullLayout._invScaleX,he=e._fullLayout._invScaleY,oe||(ge?t.shiftKey?"pan"===l?l="zoom":y(l)||(l="pan"):t.ctrlKey&&(l="pan"):l="pan"),x(l)?Oe.minDrag=1:Oe.minDrag=void 0,y(l)?(Oe.xaxes=J,Oe.yaxes=Q,k(t,r,n,Oe,l)):(Oe.clickFn=Ie,y(i)&&Pe(),oe||("zoom"===l?(Oe.moveFn=Re,Oe.doneFn=Ne,Oe.minDrag=1,function(t,r,n){var i=be.getBoundingClientRect();_e=r-i.left,we=n-i.top,e._fullLayout._calcInverseTransform(e);var l=a.apply3DTransform(e._fullLayout._invTransform)(_e,we);_e=l[0],we=l[1],Te={l:_e,r:_e,w:0,t:we,b:we,h:0},Me=e._hmpixcount?e._hmlumcount/e._hmpixcount:o(e._fullLayout.plot_bgcolor).getLuminance(),Ae=!1,Le="xy",Ce=!1,Se=j(me,Me,K,$,ke="M0,0H"+ee+"V"+te+"H0V0"),De=H(me,K,$)}(0,r,n)):"pan"===l&&(Oe.moveFn=Be,Oe.doneFn=qe))),e._fullLayout._redrag=function(){var t=e._dragdata;if(t&&t.element===be){var r=e._fullLayout.dragmode;y(r)||(ye(),Ge([0,0,ee,te]),Oe.moveFn(t.dx,t.dy))}}},g.init(Oe);var Fe=[0,0,ee,te],Ee=null,je=D.REDRAWDELAY,He=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function Be(t,r){if(t*=pe,r*=he,!e._transitioningWithDuration){if(e._fullLayout._replotting=!0,"ew"===ae||"ns"===ie){var n=ae?-t:0,a=ie?-r:0;if(ne.isSubplotConstrained){if(ae&&ie){var i=(t/ee-r/te)/2;n=-(t=i*ee),a=-(r=-i*te)}ie?n=-a*ee/te:a=-n*te/ee}return ae&&(F(J,t),Ye("x")),ie&&(F(Q,r),Ye("y")),Ge([n,a,ee,te]),Ve(),void e.emit("plotly_relayouting",fe)}var o,l,s="w"===ae==("n"===ie)?1:-1;if(ae&&ie&&(re.isSubplotConstrained||ne.isSubplotConstrained)){var c=(t/ee+s*r/te)/2;t=c*ee,r=s*c*te}if("w"===ae?t=p(J,0,t):"e"===ae?t=p(J,1,-t):ae||(t=0),"n"===ie?r=p(Q,1,r):"s"===ie?r=p(Q,0,-r):ie||(r=0),o="w"===ae?t:0,l="n"===ie?r:0,re.isSubplotConstrained&&!ne.isSubplotConstrained||ne.isSubplotConstrained&&ae&&ie&&s>0){var u;if(ne.isSubplotConstrained||!ae&&1===ie.length){for(u=0;u<J.length;u++)J[u].range=J[u]._r.slice(),S(J[u],1-r/te);o=(t=r*ee/te)/2}if(ne.isSubplotConstrained||!ie&&1===ae.length){for(u=0;u<Q.length;u++)Q[u].range=Q[u]._r.slice(),S(Q[u],1-t/ee);l=(r=t*te/ee)/2}}ne.isSubplotConstrained&&ie||Ye("x"),ne.isSubplotConstrained&&ae||Ye("y");var d=ee-t,f=te-r;!ne.isSubplotConstrained||ae&&ie||(ae?(l=o?0:t*te/ee,f=d*te/ee):(o=l?0:r*ee/te,d=f*ee/te)),Ge([o,l,d,f]),Ve(),e.emit("plotly_relayouting",fe)}function p(e,t,r){for(var n,a,i=1-t,o=0;o<e.length;o++){var l=e[o];if(!l.fixedrange){n=l,a=l._rl[i]+(l._rl[t]-l._rl[i])/E(r/l._length);var s=l.l2r(a);!1!==s&&void 0!==s&&(l.range[t]=s)}}return n._length*(n._rl[t]-a)/(n._rl[t]-n._rl[i])}}function Ye(e,t){for(var r=ne.isSubplotConstrained?{x:Q,y:J}[e]:ne[e+"axes"],n=ne.isSubplotConstrained?{x:J,y:Q}[e]:[],a=0;a<r.length;a++){var i=r[a],o=i._id,l=ne.xLinks[o]||ne.yLinks[o],s=n[0]||Y[l]||X[l];s&&(t?(t[i._name+".range[0]"]=t[s._name+".range[0]"],t[i._name+".range[1]"]=t[s._name+".range[1]"]):i.range=s.range.slice())}}function Ve(){var t,r=[];function n(e){for(t=0;t<e.length;t++)e[t].fixedrange||r.push(e[t]._id)}for(le&&(n(J),n(re.xaxes),n(ne.xaxes)),se&&(n(Q),n(re.yaxes),n(ne.yaxes)),fe={},t=0;t<r.length;t++){var a=r[t],i=M(e,a);h.drawOne(e,i,{skipTitle:!0}),fe[i._name+".range[0]"]=i.range[0],fe[i._name+".range[1]"]=i.range[1]}h.redrawComponents(e,r)}function Ue(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];ae&&(r=r.concat(J)),ie&&(r=r.concat(Q)),ne.xaxes&&(r=r.concat(ne.xaxes)),ne.yaxes&&(r=r.concat(ne.yaxes));var n,a,i,o={};if("reset+autosize"===t)for(t="autosize",a=0;a<r.length;a++)if((n=r[a])._rangeInitial&&(n.range[0]!==n._rangeInitial[0]||n.range[1]!==n._rangeInitial[1])||!n._rangeInitial&&!n.autorange){t="reset";break}if("autosize"===t)for(a=0;a<r.length;a++)(n=r[a]).fixedrange||(o[n._name+".autorange"]=!0);else if("reset"===t)for((ae||re.isSubplotConstrained)&&(r=r.concat(re.xaxes)),ie&&!re.isSubplotConstrained&&(r=r.concat(re.yaxes)),re.isSubplotConstrained&&(ae?ie||(r=r.concat(Q)):r=r.concat(J)),a=0;a<r.length;a++)(n=r[a]).fixedrange||(n._rangeInitial?(i=n._rangeInitial,o[n._name+".range[0]"]=i[0],o[n._name+".range[1]"]=i[1]):o[n._name+".autorange"]=!0);e.emit("plotly_doubleclick",null),s.call("_guiRelayout",e,o)}}function qe(){Ge([0,0,ee,te]),a.syncOrAsync([T.previousPromises,function(){e._fullLayout._replotting=!1,s.call("_guiRelayout",e,fe)}],e)}function Ge(t){var r,n,i,o,l=e._fullLayout,c=l._plots,u=l._subplots.cartesian;if(ue&&s.subplotsRegistry.splom.drag(e),ce)for(r=0;r<u.length;r++)if(i=(n=c[u[r]]).xaxis,o=n.yaxis,n._scene){var d=a.simpleMap(i.range,i.r2l),p=a.simpleMap(o.range,o.r2l);n._scene.update({range:[d[0],p[0],d[1],p[1]]})}if((ue||ce)&&(_(e),w(e)),de){var h=t[2]/P._length,g=t[3]/I._length;for(r=0;r<u.length;r++){i=(n=c[u[r]]).xaxis,o=n.yaxis;var y,x,b,T,M=(le||ne.isSubplotConstrained)&&!i.fixedrange&&Y[i._id],k=(se||ne.isSubplotConstrained)&&!o.fixedrange&&X[o._id];if(M?(y=h,b=v||ne.isSubplotConstrained?t[0]:Xe(i,y)):ne.xaHash[i._id]?(y=h,b=t[0]*i._length/P._length):ne.yaHash[i._id]?(y=g,b="ns"===ie?-t[1]*i._length/I._length:Xe(i,y,{n:"top",s:"bottom"}[ie])):b=We(i,y=Ze(i,h,g)),k?(x=g,T=m||ne.isSubplotConstrained?t[1]:Xe(o,x)):ne.yaHash[o._id]?(x=g,T=t[1]*o._length/I._length):ne.xaHash[o._id]?(x=h,T="ew"===ae?-t[0]*o._length/P._length:Xe(o,x,{e:"right",w:"left"}[ae])):T=We(o,x=Ze(o,h,g)),y||x){y||(y=1),x||(x=1);var A=i._offset-b/y,L=o._offset-T/x;n.clipRect.call(f.setTranslate,b,T).call(f.setScale,y,x),n.plot.call(f.setTranslate,A,L).call(f.setScale,1/y,1/x),y===n.xScaleFactor&&x===n.yScaleFactor||(f.setPointGroupScale(n.zoomScalePts,y,x),f.setTextPointsScale(n.zoomScaleTxt,y,x)),f.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),n.xScaleFactor=y,n.yScaleFactor=x}}}}function Ze(e,t,r){return e.fixedrange?0:le&&re.xaHash[e._id]?t:se&&(re.isSubplotConstrained?re.xaHash:re.yaHash)[e._id]?r:0}function We(e,t){return t?(e.range=e._r.slice(),S(e,t),Xe(e,t)):0}function Xe(e,t,r){return e._length*(1-t)*b[r||e.constraintoward||"middle"]}return m.length*v.length!=1&&Z(be,(function(t){if(e._context._scrollZoom.cartesian||e._fullLayout._enablescrollzoom){if(Pe(),e._transitioningWithDuration)return t.preventDefault(),void t.stopPropagation();ye(),clearTimeout(Ee);var r=-t.deltaY;if(isFinite(r)||(r=t.wheelDelta/10),isFinite(r)){var n,i=Math.exp(-Math.min(Math.max(r,-20),20)/200),o=He.draglayer.select(".nsewdrag").node().getBoundingClientRect(),l=(t.clientX-o.left)/o.width,s=(o.bottom-t.clientY)/o.height;if(le){for(v||(l=.5),n=0;n<J.length;n++)c(J[n],l,i);Ye("x"),Fe[2]*=i,Fe[0]+=Fe[2]*l*(1/i-1)}if(se){for(m||(s=.5),n=0;n<Q.length;n++)c(Q[n],s,i);Ye("y"),Fe[3]*=i,Fe[1]+=Fe[3]*(1-s)*(1/i-1)}Ge(Fe),Ve(),e.emit("plotly_relayouting",fe),Ee=setTimeout((function(){e._fullLayout&&(Fe=[0,0,ee,te],qe())}),je),t.preventDefault()}else a.log("Did not find wheel motion attributes: ",t)}function c(e,t,r){if(!e.fixedrange){var n=a.simpleMap(e.range,e.r2l),i=n[0]+(n[1]-n[0])*t;e.range=n.map((function(t){return e.l2r(i+(t-i)*r)}))}}})),be},makeDragger:I,makeRectDragger:R,makeZoombox:j,makeCorners:H,updateZoombox:B,xyCorners:q,transitionZoombox:Y,removeZoombox:V,showDoubleClickNotifier:U,attachWheelEventHandler:Z}},{"../../components/color":102,"../../components/dragelement":121,"../../components/dragelement/helpers":120,"../../components/drawing":124,"../../components/fx":142,"../../constants/alignment":207,"../../lib":232,"../../lib/clear_gl_canvases":220,"../../lib/setcursor":252,"../../lib/svg_text_utils":255,"../../plot_api/subroutines":269,"../../registry":318,"../plots":316,"./axes":279,"./axis_ids":283,"./constants":286,"./scale_zoom":299,"./select":300,"@plotly/d3":11,"has-passive-events":49,tinycolor2:67}],289:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../components/fx"),i=e("../../components/dragelement"),o=e("../../lib/setcursor"),l=e("./dragbox").makeDragBox,s=e("./constants").DRAGGERSIZE;r.initInteractions=function(e){var t=e._fullLayout;if(e._context.staticPlot)n.select(e).selectAll(".drag").remove();else if(t._has("cartesian")||t._has("splom")){Object.keys(t._plots||{}).sort((function(e,r){if((t._plots[e].mainplot&&!0)===(t._plots[r].mainplot&&!0)){var n=e.split("y"),a=r.split("y");return n[0]===a[0]?Number(n[1]||1)-Number(a[1]||1):Number(n[0]||1)-Number(a[0]||1)}return t._plots[e].mainplot?1:-1})).forEach((function(r){var n=t._plots[r],o=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=l(e,n,o._offset,c._offset,o._length,c._length,"ns","ew");u.onmousemove=function(t){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===r&&e._fullLayout._plots[r]&&a.hover(e,t,r)},a.hover(e,t,r),e._fullLayout._lasthover=u,e._fullLayout._hoversubplot=r},u.onmouseout=function(t){e._dragging||(e._fullLayout._hoversubplot=null,i.unhover(e,t))},e._context.showAxisDragHandles&&(l(e,n,o._offset-s,c._offset-s,s,s,"n","w"),l(e,n,o._offset+o._length,c._offset-s,s,s,"n","e"),l(e,n,o._offset-s,c._offset+c._length,s,s,"s","w"),l(e,n,o._offset+o._length,c._offset+c._length,s,s,"s","e"))}if(e._context.showAxisDragHandles){if(r===o._mainSubplot){var d=o._mainLinePosition;"top"===o.side&&(d-=s),l(e,n,o._offset+.1*o._length,d,.8*o._length,s,"","ew"),l(e,n,o._offset,d,.1*o._length,s,"","w"),l(e,n,o._offset+.9*o._length,d,.1*o._length,s,"","e")}if(r===c._mainSubplot){var f=c._mainLinePosition;"right"!==c.side&&(f-=s),l(e,n,f,c._offset+.1*c._length,s,.8*c._length,"ns",""),l(e,n,f,c._offset+.9*c._length,s,.1*c._length,"s",""),l(e,n,f,c._offset,s,.1*c._length,"n","")}}}));var o=t._hoverlayer.node();o.onmousemove=function(r){r.target=e._fullLayout._lasthover,a.hover(e,r,t._hoversubplot)},o.onclick=function(t){t.target=e._fullLayout._lasthover,a.click(e,t)},o.onmousedown=function(t){e._fullLayout._lasthover.onmousedown(t)},r.updateFx(e)}},r.updateFx=function(e){var t=e._fullLayout,r="pan"===t.dragmode?"move":"crosshair";o(t._draggers,r)}},{"../../components/dragelement":121,"../../components/fx":142,"../../lib/setcursor":252,"./constants":286,"./dragbox":288,"@plotly/d3":11}],290:[function(e,t,r){"use strict";t.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearSelect:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._drawing=!1}}},{}],291:[function(e,t,r){"use strict";var n=e("../../lib").strTranslate;function a(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}t.exports={p2r:a,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t="y"===e._id.charAt(0)?1:0;return function(r){return a(e,r[t])}},getTransform:function(e){return n(e.xaxis._offset,e.yaxis._offset)}}},{"../../lib":232}],292:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("./axis_ids");t.exports=function(e){return function(t,r){var o=t[e];if(Array.isArray(o))for(var l=n.subplotsRegistry.cartesian,s=l.idRegex,c=r._subplots,u=c.xaxis,d=c.yaxis,f=c.cartesian,p=r._has("cartesian")||r._has("gl2d"),h=0;h<o.length;h++){var m=o[h];if(a.isPlainObject(m)){var g=i.cleanId(m.xref,"x",!1),v=i.cleanId(m.yref,"y",!1),y=s.x.test(g),x=s.y.test(v);if(y||x){p||a.pushUnique(r._basePlotModules,l);var b=!1;y&&-1===u.indexOf(g)&&(u.push(g),b=!0),x&&-1===d.indexOf(v)&&(d.push(v),b=!0),b&&y&&x&&f.push(g+v)}}}}}},{"../../lib":232,"../../registry":318,"./axis_ids":283}],293:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../registry"),i=e("../../lib"),o=e("../plots"),l=e("../../components/drawing"),s=e("../get_data").getModuleCalcData,c=e("./axis_ids"),u=e("./constants"),d=e("../../constants/xmlns_namespaces"),f=i.ensureSingle;function p(e,t,r){return i.ensureSingle(e,t,r,(function(e){e.datum(r)}))}function h(e,t,r,i,o){for(var c,d,f,p=u.traceLayerClasses,h=e._fullLayout,m=h._modules,g=[],v=[],y=0;y<m.length;y++){var x=(c=m[y]).name,b=a.modules[x].categories;if(b.svg){var _=c.layerName||x+"layer",w=c.plot;f=(d=s(r,w))[0],r=d[1],f.length&&g.push({i:p.indexOf(_),className:_,plotMethod:w,cdModule:f}),b.zoomScale&&v.push("."+_)}}g.sort((function(e,t){return e.i-t.i}));var T=t.plot.selectAll("g.mlayer").data(g,(function(e){return e.className}));if(T.enter().append("g").attr("class",(function(e){return e.className})).classed("mlayer",!0).classed("rangeplot",t.isRangePlot),T.exit().remove(),T.order(),T.each((function(r){var a=n.select(this),s=r.className;r.plotMethod(e,t,r.cdModule,a,i,o),-1===u.clipOnAxisFalseQuery.indexOf("."+s)&&l.setClipUrl(a,t.layerClipId,e)})),h._has("scattergl")&&(c=a.getModule("scattergl"),f=s(r,c)[0],c.plot(e,t,f)),!e._context.staticPlot&&(t._hasClipOnAxisFalse&&(t.clipOnAxisFalseTraces=t.plot.selectAll(u.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),v.length)){var M=t.plot.selectAll(v.join(",")).selectAll(".trace");t.zoomScalePts=M.selectAll("path.point"),t.zoomScaleTxt=M.selectAll(".textpoint")}}function m(e,t){var r=t.plotgroup,n=t.id,a=u.layerValue2layerClass[t.xaxis.layer],i=u.layerValue2layerClass[t.yaxis.layer],o=e._fullLayout._hasOnlyLargeSploms;if(t.mainplot){var l=t.mainplotinfo,s=l.plotgroup,d=n+"-x",h=n+"-y";t.gridlayer=l.gridlayer,t.zerolinelayer=l.zerolinelayer,f(l.overlinesBelow,"path",d),f(l.overlinesBelow,"path",h),f(l.overaxesBelow,"g",d),f(l.overaxesBelow,"g",h),t.plot=f(l.overplot,"g",n),f(l.overlinesAbove,"path",d),f(l.overlinesAbove,"path",h),f(l.overaxesAbove,"g",d),f(l.overaxesAbove,"g",h),t.xlines=s.select(".overlines-"+a).select("."+d),t.ylines=s.select(".overlines-"+i).select("."+h),t.xaxislayer=s.select(".overaxes-"+a).select("."+d),t.yaxislayer=s.select(".overaxes-"+i).select("."+h)}else if(o)t.xlines=f(r,"path","xlines-above"),t.ylines=f(r,"path","ylines-above"),t.xaxislayer=f(r,"g","xaxislayer-above"),t.yaxislayer=f(r,"g","yaxislayer-above");else{var m=f(r,"g","layer-subplot");t.shapelayer=f(m,"g","shapelayer"),t.imagelayer=f(m,"g","imagelayer"),t.gridlayer=f(r,"g","gridlayer"),t.zerolinelayer=f(r,"g","zerolinelayer"),f(r,"path","xlines-below"),f(r,"path","ylines-below"),t.overlinesBelow=f(r,"g","overlines-below"),f(r,"g","xaxislayer-below"),f(r,"g","yaxislayer-below"),t.overaxesBelow=f(r,"g","overaxes-below"),t.plot=f(r,"g","plot"),t.overplot=f(r,"g","overplot"),t.xlines=f(r,"path","xlines-above"),t.ylines=f(r,"path","ylines-above"),t.overlinesAbove=f(r,"g","overlines-above"),f(r,"g","xaxislayer-above"),f(r,"g","yaxislayer-above"),t.overaxesAbove=f(r,"g","overaxes-above"),t.xlines=r.select(".xlines-"+a),t.ylines=r.select(".ylines-"+i),t.xaxislayer=r.select(".xaxislayer-"+a),t.yaxislayer=r.select(".yaxislayer-"+i)}o||(p(t.gridlayer,"g",t.xaxis._id),p(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map((function(e){return e[0]})).sort(c.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0)}function g(e,t){if(e){var r={};for(var a in e.each((function(e){var a=e[0];n.select(this).remove(),v(a,t),r[a]=!0})),t._plots)for(var i=t._plots[a].overlays||[],o=0;o<i.length;o++){var l=i[o];r[l.id]&&l.plot.selectAll(".trace").remove()}}}function v(e,t){t._draggers.selectAll("g."+e).remove(),t._defs.select("#clip"+t._uid+e+"plot").remove()}r.name="cartesian",r.attr=["xaxis","yaxis"],r.idRoot=["x","y"],r.idRegex=u.idRegex,r.attrRegex=u.attrRegex,r.attributes=e("./attributes"),r.layoutAttributes=e("./layout_attributes"),r.supplyLayoutDefaults=e("./layout_defaults"),r.transitionAxes=e("./transition_axes"),r.finalizeSubplots=function(e,t){var r,n,a,o=t._subplots,l=o.xaxis,s=o.yaxis,d=o.cartesian,f=d.concat(o.gl2d||[]),p={},h={};for(r=0;r<f.length;r++){var m=f[r].split("y");p[m[0]]=1,h["y"+m[1]]=1}for(r=0;r<l.length;r++)p[n=l[r]]||(a=(e[c.id2name(n)]||{}).anchor,u.idRegex.y.test(a)||(a="y"),d.push(n+a),f.push(n+a),h[a]||(h[a]=1,i.pushUnique(s,a)));for(r=0;r<s.length;r++)h[a=s[r]]||(n=(e[c.id2name(a)]||{}).anchor,u.idRegex.x.test(n)||(n="x"),d.push(n+a),f.push(n+a),p[n]||(p[n]=1,i.pushUnique(l,n)));if(!f.length){for(var g in n="",a="",e){if(u.attrRegex.test(g))"x"===g.charAt(0)?(!n||+g.substr(5)<+n.substr(5))&&(n=g):(!a||+g.substr(5)<+a.substr(5))&&(a=g)}n=n?c.name2id(n):"x",a=a?c.name2id(a):"y",l.push(n),s.push(a),d.push(n+a)}},r.plot=function(e,t,r,n){var a,i=e._fullLayout,o=i._subplots.cartesian,l=e.calcdata;if(!Array.isArray(t))for(t=[],a=0;a<l.length;a++)t.push(a);for(a=0;a<o.length;a++){for(var s,c=o[a],u=i._plots[c],d=[],f=0;f<l.length;f++){var p=l[f],m=p[0].trace;m.xaxis+m.yaxis===c&&((-1!==t.indexOf(m.index)||m.carpet)&&(s&&s[0].trace.xaxis+s[0].trace.yaxis===c&&-1!==["tonextx","tonexty","tonext"].indexOf(m.fill)&&-1===d.indexOf(s)&&d.push(s),d.push(p)),s=p)}h(e,u,d,r,n)}},r.clean=function(e,t,r,n){var a,i,o,l=n._plots||{},s=t._plots||{},u=n._subplots||{};if(n._hasOnlyLargeSploms&&!t._hasOnlyLargeSploms)for(o in l)(a=l[o]).plotgroup&&a.plotgroup.remove();var d=n._has&&n._has("gl"),f=t._has&&t._has("gl");if(d&&!f)for(o in l)(a=l[o])._scene&&a._scene.destroy();if(u.xaxis&&u.yaxis){var p=c.listIds({_fullLayout:n});for(i=0;i<p.length;i++){var h=p[i];t[c.id2name(h)]||n._infolayer.selectAll(".g-"+h+"title").remove()}}var m=n._has&&n._has("cartesian"),y=t._has&&t._has("cartesian");if(m&&!y)g(n._cartesianlayer.selectAll(".subplot"),n),n._defs.selectAll(".axesclip").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(u.cartesian)for(i=0;i<u.cartesian.length;i++){var x=u.cartesian[i];if(!s[x]){var b="."+x+",."+x+"-x,."+x+"-y";n._cartesianlayer.selectAll(b).remove(),v(x,n)}}},r.drawFramework=function(e){var t=e._fullLayout,r=function(e){var t,r,n,a,i,o,l=e._fullLayout,s=l._subplots.cartesian,c=s.length,u=[],d=[];for(t=0;t<c;t++){n=s[t],a=l._plots[n],i=a.xaxis,o=a.yaxis;var f=i._mainAxis,p=o._mainAxis,h=f._id+p._id,m=l._plots[h];a.overlays=[],h!==n&&m?(a.mainplot=h,a.mainplotinfo=m,d.push(n)):(a.mainplot=void 0,a.mainplotinfo=void 0,u.push(n))}for(t=0;t<d.length;t++)n=d[t],(a=l._plots[n]).mainplotinfo.overlays.push(a);var g=u.concat(d),v=new Array(c);for(t=0;t<c;t++){n=g[t],a=l._plots[n],i=a.xaxis,o=a.yaxis;var y=[n,i.layer,o.layer,i.overlaying||"",o.overlaying||""];for(r=0;r<a.overlays.length;r++)y.push(a.overlays[r].id);v[t]=y}return v}(e),a=t._cartesianlayer.selectAll(".subplot").data(r,String);a.enter().append("g").attr("class",(function(e){return"subplot "+e[0]})),a.order(),a.exit().call(g,t),a.each((function(r){var a=r[0],i=t._plots[a];i.plotgroup=n.select(this),m(e,i),i.draglayer=f(t._draggers,"g",a)}))},r.rangePlot=function(e,t,r){m(e,t),h(e,t,r),o.style(e)},r.toSVG=function(e){var t=e._fullLayout._glimages,r=n.select(e).selectAll(".svg-container");r.filter((function(e,t){return t===r.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.style.width,height:this.style.height})}))},r.updateFx=e("./graph_interact").updateFx},{"../../components/drawing":124,"../../constants/xmlns_namespaces":213,"../../lib":232,"../../registry":318,"../get_data":312,"../plots":316,"./attributes":277,"./axis_ids":283,"./constants":286,"./graph_interact":289,"./layout_attributes":294,"./layout_defaults":295,"./transition_axes":306,"@plotly/d3":11}],294:[function(e,t,r){"use strict";var n=e("../font_attributes"),a=e("../../components/color/attributes"),i=e("../../components/drawing/attributes").dash,o=e("../../lib/extend").extendFlat,l=e("../../plot_api/plot_template").templatedArray,s=e("../../plots/cartesian/axis_format_attributes").descriptionWithDates,c=e("../../constants/numerical").ONEDAY,u=e("./constants"),d=u.HOUR_PATTERN,f=u.WEEKDAY_PATTERN;t.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:a.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:n({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},scaleanchor:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"calc"},rangebreaks:l("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[f,d,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:c},editType:"calc"}),tickmode:{valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},nticks:{valType:"integer",min:0,dflt:0,editType:"ticks"},tick0:{valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},dtick:{valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},tickvals:{valType:"data_array",editType:"ticks"},ticktext:{valType:"data_array",editType:"ticks"},ticks:{valType:"enumerated",values:["outside","inside",""],editType:"ticks"},tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:{valType:"number",min:0,dflt:5,editType:"ticks"},tickwidth:{valType:"number",min:0,dflt:1,editType:"ticks"},tickcolor:{valType:"color",dflt:a.defaultLine,editType:"ticks"},showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},automargin:{valType:"boolean",dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:o({},i,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:n({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:s("tick label")},tickformatstops:l("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:s("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:a.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:{valType:"boolean",editType:"ticks"},gridcolor:{valType:"color",dflt:a.lightLine,editType:"ticks"},gridwidth:{valType:"number",min:0,dflt:1,editType:"ticks"},zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:a.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:a.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks"},title:{valType:"string",editType:"ticks"},titlefont:n({editType:"ticks"})}}},{"../../components/color/attributes":101,"../../components/drawing/attributes":123,"../../constants/numerical":212,"../../lib/extend":226,"../../plot_api/plot_template":268,"../../plots/cartesian/axis_format_attributes":282,"../font_attributes":310,"./constants":286}],295:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../../components/fx/helpers").isUnifiedHover,o=e("../../components/fx/hovermode_defaults"),l=e("../../plot_api/plot_template"),s=e("../layout_attributes"),c=e("./layout_attributes"),u=e("./type_defaults"),d=e("./axis_defaults"),f=e("./constraints"),p=e("./position_defaults"),h=e("./axis_ids"),m=h.id2name,g=h.name2id,v=e("./constants").AX_ID_PATTERN,y=e("../../registry"),x=y.traceIs,b=y.getComponentMethod;function _(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}t.exports=function(e,t,r){var y,w,T=t.autotypenumbers,M={},k={},A={},L={},S={},D={},C={},O={},P={},I={};for(y=0;y<r.length;y++){var R=r[y];if(x(R,"cartesian")||x(R,"gl2d")){var z,N;if(R.xaxis)z=m(R.xaxis),_(M,z,R);else if(R.xaxes)for(w=0;w<R.xaxes.length;w++)_(M,m(R.xaxes[w]),R);if(R.yaxis)N=m(R.yaxis),_(M,N,R);else if(R.yaxes)for(w=0;w<R.yaxes.length;w++)_(M,m(R.yaxes[w]),R);if("funnel"===R.type?"h"===R.orientation?(z&&(k[z]=!0),N&&(C[N]=!0)):N&&(A[N]=!0):"image"===R.type?(N&&(O[N]=!0),z&&(O[z]=!0)):(N&&(S[N]=!0,D[N]=!0),x(R,"carpet")&&("carpet"!==R.type||R._cheater)||z&&(L[z]=!0)),"carpet"===R.type&&R._cheater&&z&&(k[z]=!0),x(R,"2dMap")&&(P[z]=!0,P[N]=!0),x(R,"oriented"))I["h"===R.orientation?N:z]=!0}}var F=t._subplots,E=F.xaxis,j=F.yaxis,H=n.simpleMap(E,m),B=n.simpleMap(j,m),Y=H.concat(B),V=a.background;E.length&&j.length&&(V=n.coerce(e,t,s,"plot_bgcolor"));var U,q,G,Z,W,X=a.combine(V,t.paper_bgcolor);function J(){var e=M[U]||[];W._traceIndices=e.map((function(e){return e._expandedIndex})),W._annIndices=[],W._shapeIndices=[],W._imgIndices=[],W._subplotsWith=[],W._counterAxes=[],W._name=W._attr=U,W._id=q}function Q(e,t){return n.coerce(Z,W,c,e,t)}function K(e,t){return n.coerce2(Z,W,c,e,t)}function $(e){return"x"===e?j:E}function ee(t,r){for(var n="x"===t?H:B,a=[],i=0;i<n.length;i++){var o=n[i];o===r||(e[o]||{}).overlaying||a.push(g(o))}return a}var te={x:$("x"),y:$("y")},re=te.x.concat(te.y),ne={},ae=[];function ie(){var e=Z.matches;v.test(e)&&-1===re.indexOf(e)&&(ne[e]=Z.type,ae=Object.keys(ne))}var oe=o(e,t),le=i(oe);for(y=0;y<Y.length;y++){U=Y[y],q=g(U),G=U.charAt(0),n.isPlainObject(e[U])||(e[U]={}),Z=e[U],W=l.newContainer(t,U,G+"axis"),J();var se="x"===G&&!L[U]&&k[U]||"y"===G&&!S[U]&&A[U],ce="y"===G&&(!D[U]&&C[U]||O[U]),ue={letter:G,font:t.font,outerTicks:P[U],showGrid:!I[U],data:M[U]||[],bgColor:X,calendar:t.calendar,automargin:!0,visibleDflt:se,reverseDflt:ce,autotypenumbersDflt:T,splomStash:((t._splomAxes||{})[G]||{})[q]};Q("uirevision",t.uirevision),u(Z,W,Q,ue),d(Z,W,Q,ue,t);var de=le&&G===oe.charAt(0),fe=K("spikecolor",le?W.color:void 0),pe=K("spikethickness",le?1.5:void 0),he=K("spikedash",le?"dot":void 0),me=K("spikemode",le?"across":void 0),ge=K("spikesnap");Q("showspikes",!!(de||fe||pe||he||me||ge))||(delete W.spikecolor,delete W.spikethickness,delete W.spikedash,delete W.spikemode,delete W.spikesnap),p(Z,W,Q,{letter:G,counterAxes:te[G],overlayableAxes:ee(G,U),grid:t.grid}),Q("title.standoff"),ie(),W._input=Z}for(y=0;y<ae.length;){q=ae[y++],G=(U=m(q)).charAt(0),n.isPlainObject(e[U])||(e[U]={}),Z=e[U],W=l.newContainer(t,U,G+"axis"),J();var ve={letter:G,font:t.font,outerTicks:P[U],showGrid:!I[U],data:[],bgColor:X,calendar:t.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((t._splomAxes||{})[G]||{})[q]};Q("uirevision",t.uirevision),W.type=ne[q]||"linear",d(Z,W,Q,ve,t),p(Z,W,Q,{letter:G,counterAxes:te[G],overlayableAxes:ee(G,U),grid:t.grid}),Q("fixedrange"),ie(),W._input=Z}var ye=b("rangeslider","handleDefaults"),xe=b("rangeselector","handleDefaults");for(y=0;y<H.length;y++)U=H[y],Z=e[U],W=t[U],ye(e,t,U),"date"===W.type&&xe(Z,W,t,B,W.calendar),Q("fixedrange");for(y=0;y<B.length;y++){U=B[y],Z=e[U],W=t[U];var be=t[m(W.anchor)];Q("fixedrange",b("rangeslider","isVisible")(be))}f.handleDefaults(e,t,{axIds:re.concat(ae).sort(h.idSort),axHasImage:O})}},{"../../components/color":102,"../../components/fx/helpers":138,"../../components/fx/hovermode_defaults":141,"../../lib":232,"../../plot_api/plot_template":268,"../../registry":318,"../layout_attributes":314,"./axis_defaults":281,"./axis_ids":283,"./constants":286,"./constraints":287,"./layout_attributes":294,"./position_defaults":297,"./type_defaults":307}],296:[function(e,t,r){"use strict";var n=e("tinycolor2").mix,a=e("../../components/color/attributes").lightFraction,i=e("../../lib");t.exports=function(e,t,r,o){var l=(o=o||{}).dfltColor;function s(r,n){return i.coerce2(e,t,o.attributes,r,n)}var c=s("linecolor",l),u=s("linewidth");r("showline",o.showLine||!!c||!!u)||(delete t.linecolor,delete t.linewidth);var d=s("gridcolor",n(l,o.bgColor,o.blend||a).toRgbString()),f=s("gridwidth");if(r("showgrid",o.showGrid||!!d||!!f)||(delete t.gridcolor,delete t.gridwidth),!o.noZeroLine){var p=s("zerolinecolor",l),h=s("zerolinewidth");r("zeroline",o.showGrid||!!p||!!h)||(delete t.zerolinecolor,delete t.zerolinewidth)}}},{"../../components/color/attributes":101,"../../lib":232,tinycolor2:67}],297:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib");t.exports=function(e,t,r,i){var o,l,s,c,u=i.counterAxes||[],d=i.overlayableAxes||[],f=i.letter,p=i.grid;p&&(l=p._domains[f][p._axisMap[t._id]],o=p._anchors[t._id],l&&(s=p[f+"side"].split(" ")[0],c=p.domain[f]["right"===s||"top"===s?1:0])),l=l||[0,1],o=o||(n(e.position)?"free":u[0]||"free"),s=s||("x"===f?"bottom":"left"),c=c||0,"free"===a.coerce(e,t,{anchor:{valType:"enumerated",values:["free"].concat(u),dflt:o}},"anchor")&&r("position",c),a.coerce(e,t,{side:{valType:"enumerated",values:"x"===f?["bottom","top"]:["left","right"],dflt:s}},"side");var h=!1;if(d.length&&(h=a.coerce(e,t,{overlaying:{valType:"enumerated",values:[!1].concat(d),dflt:!1}},"overlaying")),!h){var m=r("domain",l);m[0]>m[1]-1/4096&&(t.domain=l),a.noneOrAll(e.domain,t.domain,l)}return r("layer"),t}},{"../../lib":232,"fast-isnumeric":17}],298:[function(e,t,r){"use strict";var n=e("./show_dflt");t.exports=function(e,t,r,a,i){i||(i={});var o=i.tickSuffixDflt,l=n(e);r("tickprefix")&&r("showtickprefix",l),r("ticksuffix",o)&&r("showticksuffix",l)}},{"./show_dflt":302}],299:[function(e,t,r){"use strict";var n=e("../../constants/alignment").FROM_BL;t.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*r;e.range=e._input.range=[e.l2r(i+(a[0]-i)*t),e.l2r(i+(a[1]-i)*t)],e.setScale()}},{"../../constants/alignment":207}],300:[function(e,t,r){"use strict";var n=e("polybooljs"),a=e("../../registry"),i=e("../../components/drawing").dashStyle,o=e("../../components/color"),l=e("../../components/fx"),s=e("../../components/fx/helpers").makeEventData,c=e("../../components/dragelement/helpers"),u=c.freeMode,d=c.rectMode,f=c.drawMode,p=c.openMode,h=c.selectMode,m=e("../../components/shapes/draw_newshape/display_outlines"),g=e("../../components/shapes/draw_newshape/helpers").handleEllipse,v=e("../../components/shapes/draw_newshape/newshapes"),y=e("../../lib"),x=e("../../lib/polygon"),b=e("../../lib/throttle"),_=e("./axis_ids").getFromId,w=e("../../lib/clear_gl_canvases"),T=e("../../plot_api/subroutines").redrawReglTraces,M=e("./constants"),k=M.MINSELECT,A=x.filter,L=x.tester,S=e("./handle_outline").clearSelect,D=e("./helpers"),C=D.p2r,O=D.axValue,P=D.getTransform;function I(e,t,r,n,a,i,o){var l,s,c,u,d,f,h,g,v,y=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(y)){F(e,t,i);var _=function(e,t){var r,n,a=e[0],i=-1,o=[];for(n=0;n<t.length;n++)if(r=t[n],a.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===a.hoverOnBox)break;void 0!==a.pointNumber?i=a.pointNumber:void 0!==a.binNumber&&(i=a.binNumber,o=a.pointNumbers);break}return{pointNumber:i,pointNumbers:o,searchInfo:r}}(y,l=j(t,r,n,a));if(_.pointNumbers.length>0?function(e,t){var r,n,a,i=[];for(a=0;a<e.length;a++)(r=e[a]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&i.push(r);if(1===i.length&&i[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(a=0;a<t.pointNumbers.length;a++)if(n.selectedpoints.indexOf(t.pointNumbers[a])<0)return!1;return!0}return!1}(l,_):function(e){var t,r,n,a=0;for(n=0;n<e.length;n++)if(t=e[n],(r=t.cd[0].trace).selectedpoints){if(r.selectedpoints.length>1)return!1;if((a+=r.selectedpoints.length)>1)return!1}return 1===a}(l)&&(f=H(_))){for(o&&o.remove(),v=0;v<l.length;v++)(s=l[v])._module.selectPoints(s,!1);B(t,l),E(i),x&&t.emit("plotly_deselect",null)}else{for(h=e.shiftKey&&(void 0!==f?f:H(_)),c=function(e,t,r){return{pointNumber:e,searchInfo:t,subtract:r}}(_.pointNumber,_.searchInfo,h),u=N(i.selectionDefs.concat([c])),v=0;v<l.length;v++)if(d=Y(l[v]._module.selectPoints(l[v],u),l[v]),b.length)for(var w=0;w<d.length;w++)b.push(d[w]);else b=d;if(B(t,l,g={points:b}),c&&i&&i.selectionDefs.push(c),o){var T=i.mergedPolygons,M=p(i.dragmode);m(V(T,M),o,i)}x&&t.emit("plotly_selected",g)}}}function R(e){return"pointNumber"in e&&"searchInfo"in e}function z(e){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(t,r,n,a){var i=e.searchInfo.cd[0].trace._expandedIndex;return a.cd[0].trace._expandedIndex===i&&n===e.pointNumber},isRect:!1,degenerate:!1,subtract:e.subtract}}function N(e){for(var t=[],r=R(e[0])?0:e[0][0][0],n=r,a=R(e[0])?0:e[0][0][1],i=a,o=0;o<e.length;o++)if(R(e[o]))t.push(z(e[o]));else{var l=x.tester(e[o]);l.subtract=e[o].subtract,t.push(l),r=Math.min(r,l.xmin),n=Math.max(n,l.xmax),a=Math.min(a,l.ymin),i=Math.max(i,l.ymax)}return{xmin:r,xmax:n,ymin:a,ymax:i,pts:[],contains:function(e,r,n,a){for(var i=!1,o=0;o<t.length;o++)t[o].contains(e,r,n,a)&&(i=!1===t[o].subtract);return i},isRect:!1,degenerate:!1}}function F(e,t,r){t._fullLayout._drawing=!1;var n=t._fullLayout,a=r.plotinfo,i=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===a.id,l=(e.shiftKey||e.altKey)&&!(f(i)&&p(i));o&&l&&a.selection&&a.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=a.selection.selectionDefs,r.mergedPolygons=a.selection.mergedPolygons):l&&a.selection||E(r),o||(S(t),n._lastSelectedSubplot=a.id)}function E(e){var t=e.dragmode,r=e.plotinfo,n=e.gd;if(n._fullLayout._activeShapeIndex>=0&&n._fullLayout._deactivateShape(n),f(t)){var i=n._fullLayout._zoomlayer.selectAll(".select-outline-"+r.id);if(i&&n._fullLayout._drawing){var o=v(i,e);o&&a.call("_guiRelayout",n,{shapes:o}),n._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=e.selectionDefs=[],r.selection.mergedPolygons=e.mergedPolygons=[]}function j(e,t,r,n){var a,i,o,l=[],s=t.map((function(e){return e._id})),c=r.map((function(e){return e._id}));for(o=0;o<e.calcdata.length;o++)if(!0===(i=(a=e.calcdata[o])[0].trace).visible&&i._module&&i._module.selectPoints)if(!n||i.subplot!==n&&i.geo!==n)if("splom"===i.type&&i._xaxes[s[0]]&&i._yaxes[c[0]]){var u=f(i._module,a,t[0],r[0]);u.scene=e._fullLayout._splomScenes[i.uid],l.push(u)}else if("sankey"===i.type){var d=f(i._module,a,t[0],r[0]);l.push(d)}else{if(-1===s.indexOf(i.xaxis))continue;if(-1===c.indexOf(i.yaxis))continue;l.push(f(i._module,a,_(e,i.xaxis),_(e,i.yaxis)))}else l.push(f(i._module,a,t[0],r[0]));return l;function f(e,t,r,n){return{_module:e,cd:t,xaxis:r,yaxis:n}}}function H(e){var t=e.searchInfo.cd[0].trace,r=e.pointNumber,n=e.pointNumbers,a=n.length>0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(a)>-1}function B(e,t,r){var n,i,o,l;for(n=0;n<t.length;n++){var s=t[n].cd[0].trace._fullInput,c=e._fullLayout._tracePreGUI[s.uid]||{};void 0===c.selectedpoints&&(c.selectedpoints=s._input.selectedpoints||null)}if(r){var u=r.points||[];for(n=0;n<t.length;n++)(l=t[n].cd[0].trace)._input.selectedpoints=l._fullInput.selectedpoints=[],l._fullInput!==l&&(l.selectedpoints=[]);for(n=0;n<u.length;n++){var d=u[n],f=d.data,p=d.fullData;d.pointIndices?([].push.apply(f.selectedpoints,d.pointIndices),l._fullInput!==l&&[].push.apply(p.selectedpoints,d.pointIndices)):(f.selectedpoints.push(d.pointIndex),l._fullInput!==l&&p.selectedpoints.push(d.pointIndex))}}else for(n=0;n<t.length;n++)delete(l=t[n].cd[0].trace).selectedpoints,delete l._input.selectedpoints,l._fullInput!==l&&delete l._fullInput.selectedpoints;var h=!1;for(n=0;n<t.length;n++){l=(o=(i=t[n]).cd)[0].trace,a.traceIs(l,"regl")&&(h=!0);var m=i._module,g=m.styleOnSelect||m.style;g&&(g(e,o,o[0].node3),o[0].nodeRangePlot3&&g(e,o,o[0].nodeRangePlot3))}h&&(w(e),T(e))}function Y(e,t){if(Array.isArray(e))for(var r=t.cd,n=t.cd[0].trace,a=0;a<e.length;a++)e[a]=s(e[a],n,r);return e}function V(e,t){for(var r=[],n=0;n<e.length;n++){r[n]=[];for(var a=0;a<e[n].length;a++){r[n][a]=[],r[n][a][0]=a?"L":"M";for(var i=0;i<e[n][a].length;i++)r[n][a].push(e[n][a][i])}t||r[n].push(["Z",r[n][0][1],r[n][0][2]])}return r}t.exports={prepSelect:function(e,t,r,a,s){var c=u(s),v=d(s),x=p(s),_=f(s),w=h(s),T="drawcircle"===s,S="drawline"===s||T,D=a.gd,R=D._fullLayout,z=R._zoomlayer,H=a.element.getBoundingClientRect(),U=a.plotinfo,q=P(U),G=t-H.left,Z=r-H.top;R._calcInverseTransform(D);var W=y.apply3DTransform(R._invTransform)(G,Z);G=W[0],Z=W[1];var X,J,Q,K,$,ee,te,re=R._invScaleX,ne=R._invScaleY,ae=G,ie=Z,oe="M"+G+","+Z,le=a.xaxes[0]._length,se=a.yaxes[0]._length,ce=a.xaxes.concat(a.yaxes),ue=e.altKey&&!(f(s)&&x);F(e,D,a),c&&(X=A([[G,Z]],M.BENDPX));var de=z.selectAll("path.select-outline-"+U.id).data(_?[0]:[1,2]),fe=R.newshape;de.enter().append("path").attr("class",(function(e){return"select-outline select-outline-"+e+" select-outline-"+U.id})).style(_?{opacity:fe.opacity/2,fill:x?void 0:fe.fillcolor,stroke:fe.line.color,"stroke-dasharray":i(fe.line.dash,fe.line.width),"stroke-width":fe.line.width+"px"}:{}).attr("fill-rule",fe.fillrule).classed("cursor-move",!!_).attr("transform",q).attr("d",oe+"Z");var pe,he=z.append("path").attr("class","zoombox-corners").style({fill:o.background,stroke:o.defaultLine,"stroke-width":1}).attr("transform",q).attr("d","M0,0Z"),me=R._uid+M.SELECTID,ge=[],ve=j(D,a.xaxes,a.yaxes,a.subplot);function ye(e,t){return e-t}pe=U.fillRangeItems?U.fillRangeItems:v?function(e,t){var r=e.range={};for($=0;$<ce.length;$++){var n=ce[$],a=n._id.charAt(0);r[n._id]=[C(n,t[a+"min"]),C(n,t[a+"max"])].sort(ye)}}:function(e,t,r){var n=e.lassoPoints={};for($=0;$<ce.length;$++){var a=ce[$];n[a._id]=r.filtered.map(O(a))}},a.moveFn=function(e,t){ae=Math.max(0,Math.min(le,re*e+G)),ie=Math.max(0,Math.min(se,ne*t+Z));var r=Math.abs(ae-G),i=Math.abs(ie-Z);if(v){var o,l,s;if(w){var u=R.selectdirection;switch(o="any"===u?i<Math.min(.6*r,k)?"h":r<Math.min(.6*i,k)?"v":"d":u){case"h":l=T?se/2:0,s=se;break;case"v":l=T?le/2:0,s=le}}if(_)switch(R.newshape.drawdirection){case"vertical":o="h",l=T?se/2:0,s=se;break;case"horizontal":o="v",l=T?le/2:0,s=le;break;case"ortho":r<i?(o="h",l=Z,s=ie):(o="v",l=G,s=ae);break;default:o="d"}"h"===o?((K=S?g(T,[ae,l],[ae,s]):[[G,l],[G,s],[ae,s],[ae,l]]).xmin=S?ae:Math.min(G,ae),K.xmax=S?ae:Math.max(G,ae),K.ymin=Math.min(l,s),K.ymax=Math.max(l,s),he.attr("d","M"+K.xmin+","+(Z-k)+"h-4v"+2*k+"h4ZM"+(K.xmax-1)+","+(Z-k)+"h4v"+2*k+"h-4Z")):"v"===o?((K=S?g(T,[l,ie],[s,ie]):[[l,Z],[l,ie],[s,ie],[s,Z]]).xmin=Math.min(l,s),K.xmax=Math.max(l,s),K.ymin=S?ie:Math.min(Z,ie),K.ymax=S?ie:Math.max(Z,ie),he.attr("d","M"+(G-k)+","+K.ymin+"v-4h"+2*k+"v4ZM"+(G-k)+","+(K.ymax-1)+"v4h"+2*k+"v-4Z")):"d"===o&&((K=S?g(T,[G,Z],[ae,ie]):[[G,Z],[G,ie],[ae,ie],[ae,Z]]).xmin=Math.min(G,ae),K.xmax=Math.max(G,ae),K.ymin=Math.min(Z,ie),K.ymax=Math.max(Z,ie),he.attr("d","M0,0Z"))}else c&&(X.addPt([ae,ie]),K=X.filtered);a.selectionDefs&&a.selectionDefs.length?(Q=function(e,t,r){if(r)return n.difference({regions:e,inverted:!1},{regions:[t],inverted:!1}).regions;return n.union({regions:e,inverted:!1},{regions:[t],inverted:!1}).regions}(a.mergedPolygons,K,ue),K.subtract=ue,J=N(a.selectionDefs.concat([K]))):(Q=[K],J=L(K)),m(V(Q,x),de,a),w&&b.throttle(me,M.SELECTDELAY,(function(){var e;ge=[];var t,r=[];for($=0;$<ve.length;$++)if(t=(ee=ve[$])._module.selectPoints(ee,J),r.push(t),e=Y(t,ee),ge.length)for(var n=0;n<e.length;n++)ge.push(e[n]);else ge=e;B(D,ve,te={points:ge}),pe(te,K,X),a.gd.emit("plotly_selecting",te)}))},a.clickFn=function(e,t){if(he.remove(),D._fullLayout._activeShapeIndex>=0)D._fullLayout._deactivateShape(D);else if(!_){var r=R.clickmode;b.done(me).then((function(){if(b.clear(me),2===e){for(de.remove(),$=0;$<ve.length;$++)(ee=ve[$])._module.selectPoints(ee,!1);B(D,ve),E(a),D.emit("plotly_deselect",null)}else r.indexOf("select")>-1&&I(t,D,a.xaxes,a.yaxes,a.subplot,a,de),"event"===r&&D.emit("plotly_selected",void 0);l.click(D,t)})).catch(y.error)}},a.doneFn=function(){he.remove(),b.done(me).then((function(){b.clear(me),a.gd.emit("plotly_selected",te),K&&a.selectionDefs&&(K.subtract=ue,a.selectionDefs.push(K),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,Q)),a.doneFnCompleted&&a.doneFnCompleted(ge)})).catch(y.error),_&&E(a)}},clearSelect:S,clearSelectionsCache:E,selectOnClick:I}},{"../../components/color":102,"../../components/dragelement/helpers":120,"../../components/drawing":124,"../../components/fx":142,"../../components/fx/helpers":138,"../../components/shapes/draw_newshape/display_outlines":190,"../../components/shapes/draw_newshape/helpers":191,"../../components/shapes/draw_newshape/newshapes":192,"../../lib":232,"../../lib/clear_gl_canvases":220,"../../lib/polygon":244,"../../lib/throttle":256,"../../plot_api/subroutines":269,"../../registry":318,"./axis_ids":283,"./constants":286,"./handle_outline":290,"./helpers":291,polybooljs:57}],301:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("d3-time-format").utcFormat,i=e("../../lib"),o=i.numberFormat,l=e("fast-isnumeric"),s=i.cleanNumber,c=i.ms2DateTime,u=i.dateTime2ms,d=i.ensureNumber,f=i.isArrayOrTypedArray,p=e("../../constants/numerical"),h=p.FP_SAFE,m=p.BADNUM,g=p.LOG_CLIP,v=p.ONEWEEK,y=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=e("./axis_ids"),T=e("./constants"),M=T.HOUR_PATTERN,k=T.WEEKDAY_PATTERN;function A(e){return Math.pow(10,e)}function L(e){return null!=e}t.exports=function(e,t){t=t||{};var r=e._id||"x",p=r.charAt(0);function S(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],a=e.range[1];return.5*(n+a-2*g*Math.abs(n-a))}return m}function D(t,r,n,a){if((a||{}).msUTC&&l(t))return+t;var o=u(t,n||e.calendar);if(o===m){if(!l(t))return m;t=+t;var s=Math.floor(10*i.mod(t+.05,1)),c=Math.round(t-s/10);o=u(new Date(c))+s/10}return o}function C(t,r,n){return c(t,r,n||e.calendar)}function O(t){return e._categories[Math.round(t)]}function P(t){if(L(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return m}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function R(e){var t=I(e);return void 0!==t?t:l(e)?+e:void 0}function z(e){return l(e)?+e:I(e)}function N(e,t,r){return n.round(r+t*e,2)}function F(e,t,r){return(e-r)/t}var E=function(t){return l(t)?N(t,e._m,e._b):m},j=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var H="y"===p;E=function(t){if(!l(t))return m;var r=e._rangebreaks.length;if(!r)return N(t,e._m,e._b);var n=H;e.range[0]>e.range[1]&&(n=!n);for(var a=n?-1:1,i=a*t,o=0,s=0;s<r;s++){var c=a*e._rangebreaks[s].min,u=a*e._rangebreaks[s].max;if(i<c)break;if(!(i>u)){o=i<(c+u)/2?s:s+1;break}o=s+1}var d=e._B[o]||0;return isFinite(d)?N(t,e._m2,d):0},j=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,a=0;a<r&&!(t<e._rangebreaks[a].pmin);a++)t>e._rangebreaks[a].pmax&&(n=a+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?S:d,e.l2c="log"===e.type?A:d,e.l2p=E,e.p2l=j,e.c2p="log"===e.type?function(e,t){return E(S(e,t))}:E,e.p2c="log"===e.type?function(e){return A(j(e))}:j,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=d,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=j,e.cleanPos=d):"log"===e.type?(e.d2r=e.d2l=function(e,t){return S(s(e),t)},e.r2d=e.r2c=function(e){return A(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=d,e.c2r=S,e.l2d=A,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return A(j(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=j,e.cleanPos=d):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=D,e.c2d=e.c2r=e.l2d=e.l2r=C,e.d2p=e.r2p=function(t,r,n){return e.l2p(D(t,0,n))},e.p2d=e.p2r=function(e,t,r){return C(j(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,m,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var r=z(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=d,e.r2l=z,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:d(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var r=R(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=I,e.l2r=e.c2r=d,e.r2l=R,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:d(e)},e.setupMultiCategory=function(n){var a,o,l=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length)for(var c in s)if(c!==r){var u=t[w.id2name(c)];l=l.concat(u._traceIndices)}var d=[[0,{}],[0,{}]],h=[];for(a=0;a<l.length;a++){var m=n[l[a]];if(p in m){var g=m[p],v=m._length||i.minRowLength(g);if(f(g[0])&&f(g[1]))for(o=0;o<v;o++){var y=g[0][o],x=g[1][o];L(y)&&L(x)&&(h.push([y,x]),y in d[0][1]||(d[0][1][y]=d[0][0]++),x in d[1][1]||(d[1][1][x]=d[1][0]++))}}}for(h.sort((function(e,t){var r=d[0][1],n=r[e[0]]-r[t[0]];if(n)return n;var a=d[1][1];return a[e[1]]-a[t[1]]})),a=0;a<h.length;a++)P(h[a])}),e.fraction2r=function(t){var r=e.r2l(e.range[0]),n=e.r2l(e.range[1]);return e.l2r(r+t*(n-r))},e.r2fraction=function(t){var r=e.r2l(e.range[0]),n=e.r2l(e.range[1]);return(e.r2l(t)-r)/(n-r)},e.cleanRange=function(t,r){r||(r={}),t||(t="range");var n,a,o=i.nestedProperty(e,t).get();if(a=(a="date"===e.type?i.dfltRange(e.calendar):"y"===p?T.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||T.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(a[0]=0),o&&2===o.length)for("date"!==e.type||e.autorange||(o[0]=i.cleanDate(o[0],m,e.calendar),o[1]=i.cleanDate(o[1],m,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!i.isDateTime(o[n],e.calendar)){e[t]=a;break}if(e.r2l(o[0])===e.r2l(o[1])){var s=i.constrain(e.r2l(o[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);o[0]=e.l2r(s-1e3),o[1]=e.l2r(s+1e3);break}}else{if(!l(o[n])){if(!l(o[1-n])){e[t]=a;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-h?o[n]=-h:o[n]>h&&(o[n]=h),o[0]===o[1]){var c=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=c,o[1]+=c}}else i.nestedProperty(e,t).set(a)},e.setScale=function(r){var n=t._size;if(e.overlaying){var a=w.getFromId({_fullLayout:t},e.overlaying);e.domain=a.domain}var i=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(i);var l,s,c=e.r2l(e[i][0],o),u=e.r2l(e[i][1],o),d="y"===p;if((d?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks)&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(l=0;l<e._rangebreaks.length;l++)s=e._rangebreaks[l],e._lBreaks+=Math.abs(s.max-s.min);var f=d;c>u&&(f=!f),f&&e._rangebreaks.reverse();var h=f?-1:1;for(e._m2=h*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(d?u:c)),l=0;l<e._rangebreaks.length;l++)s=e._rangebreaks[l],e._B.push(e._B[e._B.length-1]-h*e._m2*(s.max-s.min));for(l=0;l<e._rangebreaks.length;l++)(s=e._rangebreaks[l]).pmin=E(s.min),s.pmax=E(s.max)}if(!isFinite(e._m)||!isFinite(e._b)||e._length<0)throw t._replotting=!1,new Error("Something went wrong with axis scaling")},e.maskBreaks=function(t){var r,n,a,o,l,c=e.rangebreaks||[];c._cachedPatterns||(c._cachedPatterns=c.map((function(t){return t.enabled&&t.bounds?i.simpleMap(t.bounds,t.pattern?s:e.d2c):null}))),c._cachedValues||(c._cachedValues=c.map((function(t){return t.enabled&&t.values?i.simpleMap(t.values,e.d2c).sort(i.sorterAsc):null})));for(var u=0;u<c.length;u++){var d=c[u];if(d.enabled)if(d.bounds){var f=d.pattern;switch(n=(r=c._cachedPatterns[u])[0],a=r[1],f){case k:o=(l=new Date(t)).getUTCDay(),n>a&&(a+=7,o<n&&(o+=7));break;case M:o=(l=new Date(t)).getUTCHours()+(l.getUTCMinutes()/60+l.getUTCSeconds()/3600+l.getUTCMilliseconds()/36e5),n>a&&(a+=24,o<n&&(o+=24));break;case"":o=t}if(o>=n&&o<a)return m}else for(var p=c._cachedValues[u],h=0;h<p.length;h++)if(a=(n=p[h])+d.dvalue,t>=n&&t<a)return m}return t},e.locateBreaks=function(t,r){var n,a,o,l,c=[];if(!e.rangebreaks)return c;var u=e.rangebreaks.slice().sort((function(e,t){return e.pattern===k&&t.pattern===M?-1:t.pattern===k&&e.pattern===M?1:0})),d=function(e,n){if((e=i.constrain(e,t,r))!==(n=i.constrain(n,t,r))){for(var a=!0,o=0;o<c.length;o++){var l=c[o];e<l.max&&n>=l.min&&(e<l.min&&(l.min=e),n>l.max&&(l.max=n),a=!1)}a&&c.push({min:e,max:n})}};for(n=0;n<u.length;n++){var f=u[n];if(f.enabled)if(f.bounds){var p=t,h=r;f.pattern&&(p=Math.floor(p)),o=(a=i.simpleMap(f.bounds,f.pattern?s:e.r2l))[0],l=a[1];var m,g,w=new Date(p);switch(f.pattern){case k:g=v,m=(l-o+(l<o?7:0))*y,p+=o*y-(w.getUTCDay()*y+w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;case M:g=y,m=(l-o+(l<o?24:0))*x,p+=o*x-(w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;default:p=Math.min(a[0],a[1]),m=g=(h=Math.max(a[0],a[1]))-p}for(var T=p;T<h;T+=g)d(T,T+m)}else for(var A=i.simpleMap(f.values,e.d2c),L=0;L<A.length;L++)d(o=A[L],l=o+f.dvalue)}return c.sort((function(e,t){return e.min-t.min})),c},e.makeCalcdata=function(t,r,n){var a,o,l,s,c=e.type,u="date"===c&&t[r+"calendar"];if(r in t){if(a=t[r],s=t._length||i.minRowLength(a),i.isTypedArray(a)&&("linear"===c||"log"===c)){if(s===a.length)return a;if(a.subarray)return a.subarray(0,s)}if("multicategory"===c)return function(e,t){for(var r=new Array(t),n=0;n<t;n++){var a=(e[0]||[])[n],i=(e[1]||[])[n];r[n]=I([a,i])}return r}(a,s);for(o=new Array(s),l=0;l<s;l++)o[l]=e.d2c(a[l],0,u,n)}else{var d=r+"0"in t?e.d2c(t[r+"0"],0,u):0,f=t["d"+r]?Number(t["d"+r]):1;for(a=t[{x:"y",y:"x"}[r]],s=t._length||a.length,o=new Array(s),l=0;l<s;l++)o[l]=d+l*f}if(e.rangebreaks)for(l=0;l<s;l++)o[l]=e.maskBreaks(o[l]);return o},e.isValidRange=function(t){return Array.isArray(t)&&2===t.length&&l(e.r2l(t[0]))&&l(e.r2l(t[1]))},e.isPtWithinRange=function(t,r){var n=e.c2l(t[p],null,r),a=e.r2l(e.range[0]),i=e.r2l(e.range[1]);return a<i?a<=n&&n<=i:i<=n&&n<=a},e._emptyCategories=function(){e._categories=[],e._categoriesMap={}},e.clearCalc=function(){var r=e._matchGroup;if(r){var n=null,a=null;for(var i in r){var o=t[w.id2name(i)];if(o._categories){n=o._categories,a=o._categoriesMap;break}}n&&a?(e._categories=n,e._categoriesMap=a):e._emptyCategories()}else e._emptyCategories();if(e._initialCategories)for(var l=0;l<e._initialCategories.length;l++)P(e._initialCategories[l])},e.sortByInitialCategories=function(){var n=[];if(e._emptyCategories(),e._initialCategories)for(var a=0;a<e._initialCategories.length;a++)P(e._initialCategories[a]);n=n.concat(e._traceIndices);var i=e._matchGroup;for(var o in i)if(r!==o){var l=t[w.id2name(o)];l._categories=e._categories,l._categoriesMap=e._categoriesMap,n=n.concat(l._traceIndices)}return n};var B=t._d3locale;"date"===e.type&&(e._dateFormat=B?B.timeFormat:a,e._extraFormat=t._extraFormat),e._separators=t.separators,e._numFormat=B?B.numberFormat:o,delete e._minDtick,delete e._forceTick0}},{"../../constants/numerical":212,"../../lib":232,"./axis_ids":283,"./constants":286,"@plotly/d3":11,"d3-time-format":14,"fast-isnumeric":17}],302:[function(e,t,r){"use strict";t.exports=function(e){var t=["showexponent","showtickprefix","showticksuffix"].filter((function(t){return void 0!==e[t]}));if(t.every((function(r){return e[r]===e[t[0]]}))||1===t.length)return e[t[0]]}},{}],303:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color").contrast,i=e("./layout_attributes"),o=e("./show_dflt"),l=e("../array_container_defaults");function s(e,t){function r(r,a){return n.coerce(e,t,i.tickformatstops,r,a)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(e,t,r,c,u){u||(u={});var d=o(e);if(r("showticklabels")){var f=u.font||{},p=t.color,h=-1!==(t.ticklabelposition||"").indexOf("inside")?a(u.bgColor):p&&p!==i.color.dflt?p:f.color;if(n.coerceFont(r,"tickfont",{family:f.family,size:f.size,color:h}),u.noAng||r("tickangle"),"category"!==c){var m=r("tickformat");l(e,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:s}),t.tickformatstops.length||delete t.tickformatstops,u.noExp||m||"date"===c||(r("showexponent",d),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},{"../../components/color":102,"../../lib":232,"../array_container_defaults":274,"./layout_attributes":294,"./show_dflt":302}],304:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r,i){var o=n.coerce2(e,t,a,"ticklen"),l=n.coerce2(e,t,a,"tickwidth"),s=n.coerce2(e,t,a,"tickcolor",t.color);r("ticks",i.outerTicks||o||l||s?"outside":"")||(delete t.ticklen,delete t.tickwidth,delete t.tickcolor)}},{"../../lib":232,"./layout_attributes":294}],305:[function(e,t,r){"use strict";var n=e("./clean_ticks"),a=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,r,i){function o(r){var n=e[r];return void 0!==n?n:(t._template||{})[r]}var l=o("tick0"),s=o("dtick"),c=o("tickvals"),u=r("tickmode",a(c)?"array":s?"linear":"auto");if("auto"===u)r("nticks");else if("linear"===u){var d=t.dtick=n.dtick(s,i);t.tick0=n.tick0(l,i,t.calendar,d)}else if("multicategory"!==i){void 0===r("tickvals")?t.tickmode="auto":r("ticktext")}}},{"../../lib":232,"./clean_ticks":285}],306:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../registry"),i=e("../../lib"),o=e("../../components/drawing"),l=e("./axes");t.exports=function(e,t,r,s){var c=e._fullLayout;if(0!==t.length){var u,d,f,p;s&&(u=s());var h=n.ease(r.easing);return e._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(p),p=null,function(){for(var r={},n=0;n<t.length;n++){var i=t[n],o=i.plotinfo.xaxis,l=i.plotinfo.yaxis;i.xr0&&(r[o._name+".range"]=i.xr0.slice()),i.yr0&&(r[l._name+".range"]=i.yr0.slice())}return a.call("relayout",e,r).then((function(){for(var e=0;e<t.length;e++)m(t[e].plotinfo)}))}()})),d=Date.now(),p=window.requestAnimationFrame((function n(){f=Date.now();for(var i=Math.min(1,(f-d)/r.duration),o=h(i),l=0;l<t.length;l++)g(t[l],o);f-d>r.duration?(!function(){for(var r={},n=0;n<t.length;n++){var i=t[n],o=i.plotinfo.xaxis,l=i.plotinfo.yaxis;i.xr1&&(r[o._name+".range"]=i.xr1.slice()),i.yr1&&(r[l._name+".range"]=i.yr1.slice())}u&&u(),a.call("relayout",e,r).then((function(){for(var e=0;e<t.length;e++)m(t[e].plotinfo)}))}(),p=window.cancelAnimationFrame(n)):p=window.requestAnimationFrame(n)})),Promise.resolve()}function m(e){var t=e.xaxis,r=e.yaxis;c._defs.select("#"+e.clipId+"> rect").call(o.setTranslate,0,0).call(o.setScale,1,1),e.plot.call(o.setTranslate,t._offset,r._offset).call(o.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,a=n.xaxis,s=n.yaxis,c=a._length,u=s._length,d=!!t.xr1,f=!!t.yr1,p=[];if(d){var h=i.simpleMap(t.xr0,a.r2l),m=i.simpleMap(t.xr1,a.r2l),g=h[1]-h[0],v=m[1]-m[0];p[0]=(h[0]*(1-r)+r*m[0]-h[0])/(h[1]-h[0])*c,p[2]=c*(1-r+r*v/g),a.range[0]=a.l2r(h[0]*(1-r)+r*m[0]),a.range[1]=a.l2r(h[1]*(1-r)+r*m[1])}else p[0]=0,p[2]=c;if(f){var y=i.simpleMap(t.yr0,s.r2l),x=i.simpleMap(t.yr1,s.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,p[3]=u*(1-r+r*_/b),s.range[0]=a.l2r(y[0]*(1-r)+r*x[0]),s.range[1]=s.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;l.drawOne(e,a,{skipTitle:!0}),l.drawOne(e,s,{skipTitle:!0}),l.redrawComponents(e,[a._id,s._id]);var w=d?c/p[2]:1,T=f?u/p[3]:1,M=d?p[0]:0,k=f?p[1]:0,A=d?p[0]/p[2]*c:0,L=f?p[1]/p[3]*u:0,S=a._offset-A,D=s._offset-L;n.clipRect.call(o.setTranslate,M,k).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,S,D).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}l.redrawComponents(e)}},{"../../components/drawing":124,"../../lib":232,"../../registry":318,"./axes":279,"@plotly/d3":11}],307:[function(e,t,r){"use strict";var n=e("../../registry").traceIs,a=e("./axis_autotype");function i(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=i(e),a=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return a&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}t.exports=function(e,t,r,l){r("autotypenumbers",l.autotypenumbersDflt),"-"===r("type",(l.splomStash||{}).type)&&(!function(e,t){if("-"!==e.type)return;var r,l=e._id,s=l.charAt(0);-1!==l.indexOf("scene")&&(l=s);var c=function(e,t,r){for(var n=0;n<e.length;n++){var a=e[n];if("splom"===a.type&&a._length>0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(t,l,s);if(!c)return;if("histogram"===c.type&&s==={v:"y",h:"x"}[c.orientation||"v"])return void(e.type="linear");var u=s+"calendar",d=c[u],f={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};"box"===c.type&&c._hasPreCompStats&&s==={h:"x",v:"y"}[c.orientation||"v"]&&(f.noMultiCategory=!0);if(f.autotypenumbers=e.autotypenumbers,o(c,s)){var p=i(c),h=[];for(r=0;r<t.length;r++){var m=t[r];n(m,"box-violin")&&(m[s+"axis"]||s)===l&&(void 0!==m[p]?h.push(m[p][0]):void 0!==m.name?h.push(m.name):h.push("text"),m[u]!==d&&(d=void 0))}e.type=a(h,d,f)}else if("splom"===c.type){var g=c.dimensions[c._axesDim[l]];g.visible&&(e.type=a(g.values,d,f))}else e.type=a(c[s]||[c[s+"0"]],d,f)}(t,l.data),"-"===t.type?t.type="linear":e.type=t.type)}},{"../../registry":318,"./axis_autotype":280}],308:[function(e,t,r){"use strict";var n=e("../registry"),a=e("../lib");function i(e,t,r){var n,i,o,l=!1;if("data"===t.type)n=e._fullData[null!==t.traces?t.traces[0]:0];else{if("layout"!==t.type)return!1;n=e._fullLayout}return i=a.nestedProperty(n,t.prop).get(),(o=r[t.type]=r[t.type]||{}).hasOwnProperty(t.prop)&&o[t.prop]!==i&&(l=!0),o[t.prop]=i,{changed:l,value:i}}function o(e,t){var r=[],n=t[0],i={};if("string"==typeof n)i[n]=t[1];else{if(!a.isPlainObject(n))return r;i=n}return s(i,(function(e,t,n){r.push({type:"layout",prop:e,value:n})}),"",0),r}function l(e,t){var r,n,i,o,l=[];if(n=t[0],i=t[1],r=t[2],o={},"string"==typeof n)o[n]=i;else{if(!a.isPlainObject(n))return l;o=n,void 0===r&&(r=i)}return void 0===r&&(r=null),s(o,(function(t,n,a){var i,o;if(Array.isArray(a)){o=a.slice();var s=Math.min(o.length,e.data.length);r&&(s=Math.min(s,r.length)),i=[];for(var c=0;c<s;c++)i[c]=r?r[c]:c}else o=a,i=r?r.slice():null;if(null===i)Array.isArray(o)&&(o=o[0]);else if(Array.isArray(i)){if(!Array.isArray(o)){var u=o;o=[];for(var d=0;d<i.length;d++)o[d]=u}o.length=Math.min(i.length,o.length)}l.push({type:"data",prop:t,traces:i,value:o})}),"",0),l}function s(e,t,r,n){Object.keys(e).forEach((function(i){var o=e[i];if("_"!==i[0]){var l=r+(n>0?".":"")+i;a.isPlainObject(o)?s(o,t,l,n+1):t(l,i,o)}}))}r.manageCommandObserver=function(e,t,n,o){var l={},s=!0;t&&t._commandObserver&&(l=t._commandObserver),l.cache||(l.cache={}),l.lookupTable={};var c=r.hasSimpleAPICommandBindings(e,n,l.lookupTable);if(t&&t._commandObserver){if(c)return l;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,l}if(c){i(e,c,l.cache),l.check=function(){if(s){var t=i(e,c,l.cache);return t.changed&&o&&void 0!==l.lookupTable[t.value]&&(l.disable(),Promise.resolve(o({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:l.lookupTable[t.value]})).then(l.enable,l.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],l.check);l.remove=function(){for(var t=0;t<u.length;t++)e._removeInternalListener(u[t],l.check)}}else a.log("Unable to automatically bind plot updates to API command"),l.lookupTable={},l.remove=function(){};return l.disable=function(){s=!1},l.enable=function(){s=!0},t&&(t._commandObserver=l),l},r.hasSimpleAPICommandBindings=function(e,t,n){var a,i,o=t.length;for(a=0;a<o;a++){var l,s=t[a],c=s.method,u=s.args;if(Array.isArray(u)||(u=[]),!c)return!1;var d=r.computeAPICommandBindings(e,c,u);if(1!==d.length)return!1;if(i){if((l=d[0]).type!==i.type)return!1;if(l.prop!==i.prop)return!1;if(Array.isArray(i.traces)){if(!Array.isArray(l.traces))return!1;l.traces.sort();for(var f=0;f<i.traces.length;f++)if(i.traces[f]!==l.traces[f])return!1}else if(l.prop!==i.prop)return!1}else i=d[0],Array.isArray(i.traces)&&i.traces.sort();var p=(l=d[0]).value;if(Array.isArray(p)){if(1!==p.length)return!1;p=p[0]}n&&(n[p]=a)}return i},r.executeAPICommand=function(e,t,r){if("skip"===t)return Promise.resolve();var i=n.apiMethodRegistry[t],o=[e];Array.isArray(r)||(r=[]);for(var l=0;l<r.length;l++)o.push(r[l]);return i.apply(null,o).catch((function(e){return a.warn("API call to Plotly."+t+" rejected.",e),Promise.reject(e)}))},r.computeAPICommandBindings=function(e,t,r){var n;switch(Array.isArray(r)||(r=[]),t){case"restyle":n=l(e,r);break;case"relayout":n=o(e,r);break;case"update":n=l(e,[r[0],r[2]]).concat(o(e,[r[1]]));break;case"animate":n=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,r);break;default:n=[]}return n}},{"../lib":232,"../registry":318}],309:[function(e,t,r){"use strict";var n=e("../lib/extend").extendFlat;r.attributes=function(e,t){t=t||{};var r={valType:"info_array",editType:(e=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,e.trace,t.description&&t.description,{x:n({},r,{}),y:n({},r,{}),editType:e.editType});return e.noGridCell||(a.row={valType:"integer",min:0,dflt:0,editType:e.editType},a.column={valType:"integer",min:0,dflt:0,editType:e.editType}),a},r.defaults=function(e,t,r,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=t.grid;if(o){var l=r("domain.column");void 0!==l&&(l<o.columns?a=o._domains.x[l]:delete e.domain.column);var s=r("domain.row");void 0!==s&&(s<o.rows?i=o._domains.y[s]:delete e.domain.row)}var c=r("domain.x",a),u=r("domain.y",i);c[0]<c[1]||(e.domain.x=a.slice()),u[0]<u[1]||(e.domain.y=i.slice())}},{"../lib/extend":226}],310:[function(e,t,r){"use strict";t.exports=function(e){var t=e.editType,r=e.colorEditType;void 0===r&&(r=t);var n={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:r},editType:t};return e.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},{}],311:[function(e,t,r){"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},{}],312:[function(e,t,r){"use strict";var n=e("../registry"),a=e("./cartesian/constants").SUBPLOT_PATTERN;r.getSubplotCalcData=function(e,t,r){var a=n.subplotsRegistry[t];if(!a)return[];for(var i=a.attr,o=[],l=0;l<e.length;l++){var s=e[l];s[0].trace[i]===r&&o.push(s)}return o},r.getModuleCalcData=function(e,t){var r,a=[],i=[];if(!(r="string"==typeof t?n.getModule(t).plot:"function"==typeof t?t:t.plot))return[a,e];for(var o=0;o<e.length;o++){var l=e[o],s=l[0].trace;!0===s.visible&&0!==s._length&&(s._module.plot===r?a.push(l):i.push(l))}return[a,i]},r.getSubplotData=function(e,t,r){if(!n.subplotsRegistry[t])return[];var i,o,l,s=n.subplotsRegistry[t].attr,c=[];if("gl2d"===t){var u=r.match(a);o="x"+u[1],l="y"+u[2]}for(var d=0;d<e.length;d++)i=e[d],"gl2d"===t&&n.traceIs(i,"gl2d")?i[s[0]]===o&&i[s[1]]===l&&c.push(i):i[s]===r&&c.push(i);return c}},{"../registry":318,"./cartesian/constants":286}],313:[function(e,t,r){"use strict";function n(e,t){var r,n,a=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)a[n]+=e[4*r+n]*t[r];return a}t.exports=function(e,t){return n(e.projection,n(e.view,n(e.model,[t[0],t[1],t[2],1])))}},{}],314:[function(e,t,r){"use strict";var n=e("./font_attributes"),a=e("./animation_attributes"),i=e("../components/color/attributes"),o=e("../components/shapes/draw_newshape/attributes"),l=e("./pad_attributes"),s=e("../lib/extend").extendFlat,c=n({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=i.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:n({editType:"layoutstyle"}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:s(l({editType:"layoutstyle"}),{}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:i.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:i.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:i.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:o.newshape,activeshape:o.activeshape,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:s({},a.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:n({editType:"layoutstyle"})}}},{"../components/color/attributes":101,"../components/shapes/draw_newshape/attributes":187,"../lib/extend":226,"./animation_attributes":273,"./font_attributes":310,"./pad_attributes":315}],315:[function(e,t,r){"use strict";t.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}},{}],316:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("d3-time-format").timeFormatLocale,i=e("d3-format").formatLocale,o=e("fast-isnumeric"),l=e("../registry"),s=e("../plot_api/plot_schema"),c=e("../plot_api/plot_template"),u=e("../lib"),d=e("../components/color"),f=e("../constants/numerical").BADNUM,p=e("./cartesian/axis_ids"),h=e("./cartesian/handle_outline").clearSelect,m=e("./animation_attributes"),g=e("./frame_attributes"),v=e("../plots/get_data").getModuleCalcData,y=u.relinkPrivateKeys,x=u._,b=t.exports={};u.extendFlat(b,l),b.attributes=e("./attributes"),b.attributes.type.values=b.allTypes,b.fontAttrs=e("./font_attributes"),b.layoutAttributes=e("./layout_attributes"),b.fontWeight="normal";var _=b.transformsRegistry,w=e("./command");b.executeAPICommand=w.executeAPICommand,b.computeAPICommandBindings=w.computeAPICommandBindings,b.manageCommandObserver=w.manageCommandObserver,b.hasSimpleAPICommandBindings=w.hasSimpleAPICommandBindings,b.redrawText=function(e){return e=u.getGraphDiv(e),new Promise((function(t){setTimeout((function(){e._fullLayout&&(l.getComponentMethod("annotations","draw")(e),l.getComponentMethod("legend","draw")(e),l.getComponentMethod("colorbar","draw")(e),t(b.previousPromises(e)))}),300)}))},b.resize=function(e){var t;e=u.getGraphDiv(e);var r=new Promise((function(r,n){e&&!u.isHidden(e)||n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=r,e._redrawTimer=setTimeout((function(){if(!e.layout||e.layout.width&&e.layout.height||u.isHidden(e))r(e);else{delete e.layout.width,delete e.layout.height;var t=e.changed;e.autoplay=!0,l.call("relayout",e,{autosize:!0}).then((function(){e.changed=t,e._resolveResize===r&&(delete e._resolveResize,r(e))}))}}),100)}));return t&&t(r),r},b.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then((function(){e._promises=[]}))},b.addLinks=function(e){if(e._context.showLink||e._context.showSources){var t=e._fullLayout,r=u.ensureSingle(t._paper,"text","js-plot-link-container",(function(e){e.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:d.defaultLine,"pointer-events":"all"}).each((function(){var e=n.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=r.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),r.attr(i);var o=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),s=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=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)r.on("click",(function(){b.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(e,o),l.text(o.text()&&s.text()?" - ":"")}},b.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=b.graphJson(e,!1,"keepdata"),a.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var T=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],M=["year","month","dayMonth","dayMonthYear"];function k(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,a={};function i(e){for(var r=!0,i=0;i<t.length;i++){var o=t[i];a[o]||(e[o]?a[o]=e[o]:r=!1)}r&&(n=!0)}for(var o=0;o<2;o++){for(var s=e._context.locales,c=0;c<2;c++){var u=(s[r]||{}).format;if(u&&(i(u),n))break;s=l.localeRegistry}var d=r.split("-")[0];if(n||d===r)break;r=d}return n||i(l.localeRegistry.en.format),a}function A(e,t){var r={_fullLayout:t},n="x"===e._id.charAt(0),a=e._mainAxis._anchorAxis,i="",o="",l="";if(a&&(l=a._mainAxis._id,i=n?e._id+l:l+e._id),!i||!t._plots[i]){i="";for(var s=e._counterAxes,c=0;c<s.length;c++){var u=s[c],d=n?e._id+u:u+e._id;o||(o=d);var f=p.getFromId(r,u);if(l&&f.overlaying===l){i=d;break}}}return i||o}function L(e){var t=e.transforms;if(Array.isArray(t)&&t.length)for(var r=0;r<t.length;r++){var n=t[r],a=n._module||_[n.type];if(a&&a.makesData)return!0}return!1}function S(e,t,r,n){for(var a=e.transforms,i=[e],o=0;o<a.length;o++){var l=a[o],s=_[l.type];s&&s.transform&&(i=s.transform(i,{transform:l,fullTrace:e,fullData:t,layout:r,fullLayout:n,transformIndex:o}))}return i}function D(e){return"string"==typeof e&&"px"===e.substr(e.length-2)&&parseFloat(e)}function C(e){var t=e.margin;if(!e._size){var r=e._size={l:Math.round(t.l),r:Math.round(t.r),t:Math.round(t.t),b:Math.round(t.b),p:Math.round(t.pad)};r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b}e._pushmargin||(e._pushmargin={}),e._pushmarginIds||(e._pushmarginIds={})}b.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults)delete n._skipDefaults;else{var o,s=e._fullLayout={},c=e.layout||{},d=e._fullData||[],f=e._fullData=[],p=e.data||[],m=e.calcdata||[],g=e._context||{};e._transitionData||b.createTransitionData(e),s._dfltTitle={plot:x(e,"Click to enter Plot title"),x:x(e,"Click to enter X axis title"),y:x(e,"Click to enter Y axis title"),colorbar:x(e,"Click to enter Colorscale title"),annotation:x(e,"new text")},s._traceWord=x(e,"trace");var v=k(e,T);if(s._mapboxAccessToken=g.mapboxAccessToken,n._initialAutoSizeIsDone){var _=n.width,w=n.height;b.supplyLayoutGlobalDefaults(c,s,v),c.width||(s.width=_),c.height||(s.height=w),b.sanitizeMargins(s)}else{b.supplyLayoutGlobalDefaults(c,s,v);var A=!c.width||!c.height,L=s.autosize,S=g.autosizable;A&&(L||S)?b.plotAutoSize(e,c,s):A&&b.sanitizeMargins(s),!L&&A&&(c.width=s.width,c.height=s.height)}s._d3locale=function(e,t){return e.decimal=t.charAt(0),e.thousands=t.charAt(1),{numberFormat:function(t){try{t=i(e).format(u.adjustFormat(t))}catch(e){return u.warnBadFormat(t),u.noFormat}return t},timeFormat:a(e).utcFormat}}(v,s.separators),s._extraFormat=k(e,M),s._initialAutoSizeIsDone=!0,s._dataLength=p.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var D=s._subplots=function(){var e,t,r=l.collectableSubplotTypes,n={};if(!r){r=[];var a=l.subplotsRegistry;for(var i in a){var o=a[i].attr;if(o&&(r.push(i),Array.isArray(o)))for(t=0;t<o.length;t++)u.pushUnique(r,o[t])}}for(e=0;e<r.length;e++)n[r[e]]=[];return n}(),O=s._splomAxes={x:{},y:{}},P=s._splomSubplots={};s._splomGridDflt={},s._scatterStackOpts={},s._firstScatter={},s._alignmentOpts={},s._colorAxes={},s._requestRangeslider={},s._traceUids=function(e,t){var r,n,a=t.length,i=[];for(r=0;r<e.length;r++){var o=e[r]._fullInput;o!==n&&i.push(o),n=o}var l=i.length,s=new Array(a),c={};function d(e,t){s[t]=e,c[e]=1}function f(e,t){if(e&&"string"==typeof e&&!c[e])return d(e,t),!0}for(r=0;r<a;r++){var p=t[r].uid;"number"==typeof p&&(p=String(p)),f(p,r)||(r<l&&f(i[r].uid,r)||d(u.randstr(c),r))}return s}(d,p),s._globalTransforms=(e._context||{}).globalTransforms,b.supplyDataDefaults(p,f,c,s);var I=Object.keys(O.x),R=Object.keys(O.y);if(I.length>1&&R.length>1){for(l.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o<I.length;o++)u.pushUnique(D.xaxis,I[o]);for(o=0;o<R.length;o++)u.pushUnique(D.yaxis,R[o]);for(var z in P)u.pushUnique(D.cartesian,z)}if(s._has=b._hasPlotType.bind(s),d.length===f.length)for(o=0;o<f.length;o++)y(f[o],d[o]);b.supplyLayoutModuleDefaults(c,s,f,e._transitionData);var N=s._visibleModules,F=[];for(o=0;o<N.length;o++){var E=N[o].crossTraceDefaults;E&&u.pushUnique(F,E)}for(o=0;o<F.length;o++)F[o](f,s);s._hasOnlyLargeSploms=1===s._basePlotModules.length&&"splom"===s._basePlotModules[0].name&&I.length>15&&R.length>15&&0===s.shapes.length&&0===s.images.length,b.linkSubplots(f,s,d,n),b.cleanPlot(f,s,d,n);var j=!(!n._has||!n._has("gl2d")),H=!(!s._has||!s._has("gl2d")),B=!(!n._has||!n._has("cartesian"))||j,Y=!(!s._has||!s._has("cartesian"))||H;B&&!Y?n._bgLayer.remove():Y&&!B&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&h({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var a=0;a<e.length;a++){var i=e[a];i.meta?n[i.index]=i._meta={meta:i.meta}:t.meta&&(i._meta={meta:t.meta}),t.meta&&(i._meta.layout={meta:t.meta})}n.length&&(r||(r=t._meta={}),r.data=n)}(f,s),y(s,n),l.getComponentMethod("colorscale","crossTraceDefaults")(f,s),s._preGUI||(s._preGUI={}),s._tracePreGUI||(s._tracePreGUI={});var V,U=s._tracePreGUI,q={};for(V in U)q[V]="old";for(o=0;o<f.length;o++)q[V=f[o]._fullInput.uid]||(U[V]={}),q[V]="new";for(V in q)"old"===q[V]&&delete U[V];C(s),l.getComponentMethod("rangeslider","makeData")(s),r||m.length!==f.length||b.supplyDefaultsUpdateCalc(m,f)}},b.supplyDefaultsUpdateCalc=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],a=(e[r]||[])[0];if(a&&a.trace){var i=a.trace;if(i._hasCalcTransform){var o,l,s,c=i._arrayAttrs;for(o=0;o<c.length;o++)l=c[o],s=u.nestedProperty(i,l).get().slice(),u.nestedProperty(n,l).set(s)}a.trace=n}}},b.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=[])},b._hasPlotType=function(e){var t,r=this._basePlotModules||[];for(t=0;t<r.length;t++)if(r[t].name===e)return!0;var n=this._modules||[];for(t=0;t<n.length;t++){var a=n[t].name;if(a===e)return!0;var i=l.modules[a];if(i&&i.categories[e])return!0}return!1},b.cleanPlot=function(e,t,r,n){var a,i,o=n._basePlotModules||[];for(a=0;a<o.length;a++){var l=o[a];l.clean&&l.clean(e,t,r,n)}var s=n._has&&n._has("gl"),c=t._has&&t._has("gl");s&&!c&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(".gl-canvas").remove(),n._glcontainer.selectAll(".no-webgl").remove(),n._glcanvas=null);var u=!!n._infolayer;e:for(a=0;a<r.length;a++){var d=r[a].uid;for(i=0;i<e.length;i++){if(d===e[i].uid)continue e}u&&n._infolayer.select(".cb"+d).remove()}},b.linkSubplots=function(e,t,r,n){var a,i,o=n._plots||{},s=t._plots={},c=t._subplots,d={_fullData:e,_fullLayout:t},f=c.cartesian.concat(c.gl2d||[]);for(a=0;a<f.length;a++){var h,m=f[a],g=o[m],v=p.getFromId(d,m,"x"),y=p.getFromId(d,m,"y");for(g?h=s[m]=g:(h=s[m]={}).id=m,v._counterAxes.push(y._id),y._counterAxes.push(v._id),v._subplotsWith.push(m),y._subplotsWith.push(m),h.xaxis=v,h.yaxis=y,h._hasClipOnAxisFalse=!1,i=0;i<e.length;i++){var x=e[i];if(x.xaxis===h.xaxis._id&&x.yaxis===h.yaxis._id&&!1===x.cliponaxis){h._hasClipOnAxisFalse=!0;break}}}var b,_=p.list(d,null,!0);for(a=0;a<_.length;a++){var w=null;(b=_[a]).overlaying&&(w=p.getFromId(d,b.overlaying))&&w.overlaying&&(b.overlaying=!1,w=null),b._mainAxis=w||b,w&&(b.domain=w.domain.slice()),b._anchorAxis="free"===b.anchor?null:p.getFromId(d,b.anchor)}for(a=0;a<_.length;a++)if((b=_[a])._counterAxes.sort(p.idSort),b._subplotsWith.sort(u.subplotSort),b._mainSubplot=A(b,t),b._counterAxes.length&&(b.spikemode&&-1!==b.spikemode.indexOf("across")||b.automargin&&b.mirror&&"free"!==b.anchor||l.getComponentMethod("rangeslider","isVisible")(b))){var T=1,M=0;for(i=0;i<b._counterAxes.length;i++){var k=p.getFromId(d,b._counterAxes[i]);T=Math.min(T,k.domain[0]),M=Math.max(M,k.domain[1])}T<M&&(b._counterDomainMin=T,b._counterDomainMax=M)}},b.clearExpandedTraceDefaultColors=function(e){var t,r,n;for(r=[],(t=e._module._colorAttrs)||(e._module._colorAttrs=t=[],s.crawl(e._module.attributes,(function(e,n,a,i){r[i]=n,r.length=i+1,"color"===e.valType&&void 0===e.dflt&&t.push(r.join("."))}))),n=0;n<t.length;n++){u.nestedProperty(e,"_input."+t[n]).get()||u.nestedProperty(e,t[n]).set(null)}},b.supplyDataDefaults=function(e,t,r,n){var a,i,o,s=n._modules,d=n._visibleModules,f=n._basePlotModules,p=0,h=0;function m(e){t.push(e);var r=e._module;r&&(u.pushUnique(s,r),!0===e.visible&&u.pushUnique(d,r),u.pushUnique(f,e._module.basePlotModule),p++,!1!==e._input.visible&&h++)}n._transformModules=[];var g={},v=[],x=(r.template||{}).data||{},_=c.traceTemplater(x);for(a=0;a<e.length;a++){if(o=e[a],(i=_.newTrace(o)).uid=n._traceUids[a],b.supplyTraceDefaults(o,i,h,n,a),i.index=a,i._input=o,i._expandedIndex=p,i.transforms&&i.transforms.length)for(var w=!1!==o.visible&&!1===i.visible,T=S(i,t,r,n),M=0;M<T.length;M++){var k=T[M],A={_template:i._template,type:i.type,uid:i.uid+M};w&&!1===k.visible&&delete k.visible,b.supplyTraceDefaults(k,A,p,n,a),y(A,k),A.index=a,A._input=o,A._fullInput=i,A._expandedIndex=p,A._expandedInput=k,m(A)}else i._fullInput=i,i._expandedInput=i,m(i);l.traceIs(i,"carpetAxis")&&(g[i.carpet]=i),l.traceIs(i,"carpetDependent")&&v.push(a)}for(a=0;a<v.length;a++)if((i=t[v[a]]).visible){var L=g[i.carpet];i._carpet=L,L&&L.visible?(i.xaxis=L.xaxis,i.yaxis=L.yaxis):i.visible=!1}},b.supplyAnimationDefaults=function(e){var t;e=e||{};var r={};function n(t,n){return u.coerce(e||{},r,m,t,n)}if(n("mode"),n("direction"),n("fromcurrent"),Array.isArray(e.frame))for(r.frame=[],t=0;t<e.frame.length;t++)r.frame[t]=b.supplyAnimationFrameDefaults(e.frame[t]||{});else r.frame=b.supplyAnimationFrameDefaults(e.frame||{});if(Array.isArray(e.transition))for(r.transition=[],t=0;t<e.transition.length;t++)r.transition[t]=b.supplyAnimationTransitionDefaults(e.transition[t]||{});else r.transition=b.supplyAnimationTransitionDefaults(e.transition||{});return r},b.supplyAnimationFrameDefaults=function(e){var t={};function r(r,n){return u.coerce(e||{},t,m.frame,r,n)}return r("duration"),r("redraw"),t},b.supplyAnimationTransitionDefaults=function(e){var t={};function r(r,n){return u.coerce(e||{},t,m.transition,r,n)}return r("duration"),r("easing"),t},b.supplyFrameDefaults=function(e){var t={};function r(r,n){return u.coerce(e,t,g,r,n)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),t},b.supplyTraceDefaults=function(e,t,r,n,a){var i,o=n.colorway||d.defaults,s=o[r%o.length];function c(r,n){return u.coerce(e,t,b.attributes,r,n)}var f=c("visible");c("type"),c("name",n._traceWord+" "+a),c("uirevision",n.uirevision);var p=b.getModule(t);if(t._module=p,p){var h=p.basePlotModule,m=h.attr,g=h.attributes;if(m&&g){var v=n._subplots,y="";if(f||"gl2d"!==h.name){if(Array.isArray(m))for(i=0;i<m.length;i++){var x=m[i],_=u.coerce(e,t,g,x);v[x]&&u.pushUnique(v[x],_),y+=_}else y=u.coerce(e,t,g,m);v[h.name]&&u.pushUnique(v[h.name],y)}}}if(f){if(c("customdata"),c("ids"),c("meta"),l.traceIs(t,"showLegend"))u.coerce(e,t,p.attributes.showlegend?p.attributes:b.attributes,"showlegend"),c("legendgroup"),c("legendgrouptitle.text")&&u.coerceFont(c,"legendgrouptitle.font",u.extendFlat({},n.font,{size:Math.round(1.1*n.font.size)})),c("legendrank"),t._dfltShowLegend=!0;else t._dfltShowLegend=!1;p&&p.supplyDefaults(e,t,s,n),l.traceIs(t,"noOpacity")||c("opacity"),l.traceIs(t,"notLegendIsolatable")&&(t.visible=!!t.visible),l.traceIs(t,"noHover")||(t.hovertemplate||u.coerceHoverinfo(e,t,n),"parcats"!==t.type&&l.getComponentMethod("fx","supplyDefaults")(e,t,s,n)),p&&p.selectPoints&&c("selectedpoints"),b.supplyTransformDefaults(e,t,n)}return t},b.hasMakesDataTransform=L,b.supplyTransformDefaults=function(e,t,r){if(t._length||L(e)){var n=r._globalTransforms||[],a=r._transformModules||[];if(Array.isArray(e.transforms)||0!==n.length)for(var i=e.transforms||[],o=n.concat(i),l=t.transforms=[],s=0;s<o.length;s++){var c,d=o[s],f=d.type,p=_[f],h=!(d._module&&d._module===p),m=p&&"function"==typeof p.transform;p||u.warn("Unrecognized transform type "+f+"."),p&&p.supplyDefaults&&(h||m)?((c=p.supplyDefaults(d,t,r,e)).type=f,c._module=p,u.pushUnique(a,p)):c=u.extendFlat({},d),l.push(c)}}},b.supplyLayoutGlobalDefaults=function(e,t,r){function n(r,n){return u.coerce(e,t,b.layoutAttributes,r,n)}var a=e.template;u.isPlainObject(a)&&(t.template=a,t._template=a.layout,t._dataTemplate=a.data),n("autotypenumbers");var i=u.coerceFont(n,"font");n("title.text",t._dfltTitle.plot),u.coerceFont(n,"title.font",{family:i.family,size:Math.round(1.4*i.size),color:i.color}),n("title.xref"),n("title.yref"),n("title.x"),n("title.y"),n("title.xanchor"),n("title.yanchor"),n("title.pad.t"),n("title.pad.r"),n("title.pad.b"),n("title.pad.l"),n("uniformtext.mode")&&n("uniformtext.minsize"),n("autosize",!(e.width&&e.height)),n("width"),n("height"),n("margin.l"),n("margin.r"),n("margin.t"),n("margin.b"),n("margin.pad"),n("margin.autoexpand"),e.width&&e.height&&b.sanitizeMargins(t),l.getComponentMethod("grid","sizeDefaults")(e,t),n("paper_bgcolor"),n("separators",r.decimal+r.thousands),n("hidesources"),n("colorway"),n("datarevision");var o=n("uirevision");n("editrevision",o),n("selectionrevision",o),l.getComponentMethod("modebar","supplyLayoutDefaults")(e,t),l.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(e,t,n),n("meta"),u.isPlainObject(e.transition)&&(n("transition.duration"),n("transition.easing"),n("transition.ordering")),l.getComponentMethod("calendars","handleDefaults")(e,t,"calendar"),l.getComponentMethod("fx","supplyLayoutGlobalDefaults")(e,t,n)},b.plotAutoSize=function(e,t,r){var n,a,i=e._context||{},l=i.frameMargins,s=u.isPlotDiv(e);if(s&&e.emit("plotly_autosize"),i.fillFrame)n=window.innerWidth,a=window.innerHeight,document.body.style.overflow="hidden";else{var c=s?window.getComputedStyle(e):{};if(n=D(c.width)||D(c.maxWidth)||r.width,a=D(c.height)||D(c.maxHeight)||r.height,o(l)&&l>0){var d=1-2*l;n=Math.round(d*n),a=Math.round(d*a)}}var f=b.layoutAttributes.width.min,p=b.layoutAttributes.height.min;n<f&&(n=f),a<p&&(a=p);var h=!t.width&&Math.abs(r.width-n)>1,m=!t.height&&Math.abs(r.height-a)>1;(m||h)&&(h&&(r.width=n),m&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:n,height:a}),b.sanitizeMargins(r)},b.supplyLayoutModuleDefaults=function(e,t,r,n){var a,i,o,s=l.componentsRegistry,c=t._basePlotModules,d=l.subplotsRegistry.cartesian;for(a in s)(o=s[a]).includeBasePlot&&o.includeBasePlot(e,t);for(var f in c.length||c.push(d),t._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(e,t),d.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(u.subplotSort);for(i=0;i<c.length;i++)(o=c[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(e,t,r);var p=t._modules;for(i=0;i<p.length;i++)(o=p[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(e,t,r);var h=t._transformModules;for(i=0;i<h.length;i++)(o=h[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(e,t,r,n);for(a in s)(o=s[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(e,t,r)},b.purge=function(e){var t=e._fullLayout||{};void 0!==t._glcontainer&&(t._glcontainer.selectAll(".gl-canvas").remove(),t._glcontainer.remove(),t._glcanvas=null),t._modeBar&&t._modeBar.destroy(),e._transitionData&&(e._transitionData._interruptCallbacks&&(e._transitionData._interruptCallbacks.length=0),e._transitionData._animationRaf&&window.cancelAnimationFrame(e._transitionData._animationRaf)),u.clearThrottle(),u.clearResponsive(e),delete e.data,delete e.layout,delete e._fullData,delete e._fullLayout,delete e.calcdata,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._hmlumcount,delete e._hmpixcount,delete e._transitionData,delete e._transitioning,delete e._initialAutoSize,delete e._transitioningWithDuration,delete e._dragging,delete e._dragged,delete e._dragdata,delete e._hoverdata,delete e._snapshotInProgress,delete e._editing,delete e._mouseDownTime,delete e._legendMouseDownTime,e.removeAllListeners&&e.removeAllListeners()},b.style=function(e){var t,r=e._fullLayout._visibleModules,n=[];for(t=0;t<r.length;t++){var a=r[t];a.style&&u.pushUnique(n,a.style)}for(t=0;t<n.length;t++)n[t](e)},b.sanitizeMargins=function(e){if(e&&e.margin){var t,r=e.width,n=e.height,a=e.margin,i=r-(a.l+a.r),o=n-(a.t+a.b);i<0&&(t=(r-1)/(a.l+a.r),a.l=Math.floor(t*a.l),a.r=Math.floor(t*a.r)),o<0&&(t=(n-1)/(a.t+a.b),a.t=Math.floor(t*a.t),a.b=Math.floor(t*a.b))}},b.clearAutoMarginIds=function(e){e._fullLayout._pushmarginIds={}},b.allowAutoMargin=function(e,t){e._fullLayout._pushmarginIds[t]=1};b.autoMargin=function(e,t,r){var n=e._fullLayout,a=n.width,i=n.height,o=n.margin,l=u.constrain(a-o.l-o.r,2,64),s=u.constrain(i-o.t-o.b,2,64),c=Math.max(0,a-l),d=Math.max(0,i-s),f=n._pushmargin,p=n._pushmarginIds;if(!1!==o.autoexpand){if(r){var h=r.pad;if(void 0===h&&(h=Math.min(12,o.l,o.r,o.t,o.b)),c){var m=(r.l+r.r)/c;m>1&&(r.l/=m,r.r/=m)}if(d){var g=(r.t+r.b)/d;g>1&&(r.t/=g,r.b/=g)}var v=void 0!==r.xl?r.xl:r.x,y=void 0!==r.xr?r.xr:r.x,x=void 0!==r.yt?r.yt:r.y,_=void 0!==r.yb?r.yb:r.y;f[t]={l:{val:v,size:r.l+h},r:{val:y,size:r.r+h},b:{val:_,size:r.b+h},t:{val:x,size:r.t+h}},p[t]=1}else delete f[t],delete p[t];if(!n._replotting)return b.doAutoMargin(e)}},b.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),C(t);var a=t._size,i=t.margin,s=u.extendFlat({},a),c=i.l,d=i.r,f=i.t,h=i.b,m=t._pushmargin,g=t._pushmarginIds;if(!1!==t.margin.autoexpand){for(var v in m)g[v]||delete m[v];for(var y in m.base={l:{val:0,size:c},r:{val:1,size:d},t:{val:1,size:f},b:{val:0,size:h}},m){var x=m[y].l||{},_=m[y].b||{},w=x.val,T=x.size,M=_.val,k=_.size;for(var A in m){if(o(T)&&m[A].r){var L=m[A].r.val,S=m[A].r.size;if(L>w){var D=(T*L+(S-r)*w)/(L-w),O=(S*(1-w)+(T-r)*(1-L))/(L-w);D+O>c+d&&(c=D,d=O)}}if(o(k)&&m[A].t){var P=m[A].t.val,I=m[A].t.size;if(P>M){var R=(k*P+(I-n)*M)/(P-M),z=(I*(1-M)+(k-n)*(1-P))/(P-M);R+z>h+f&&(h=R,f=z)}}}}}var N=u.constrain(r-i.l-i.r,2,64),F=u.constrain(n-i.t-i.b,2,64),E=Math.max(0,r-N),j=Math.max(0,n-F);if(E){var H=(c+d)/E;H>1&&(c/=H,d/=H)}if(j){var B=(h+f)/j;B>1&&(h/=B,f/=B)}if(a.l=Math.round(c),a.r=Math.round(d),a.t=Math.round(f),a.b=Math.round(h),a.p=Math.round(i.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&b.didMarginChange(s,a)){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Y=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount<Y)return l.call("_doPlot",e);t._size=s,u.warn("Too many auto-margin redraws.")}!function(e){var t=p.list(e,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach((function(e){for(var r=0;r<t.length;r++){var n=t[r][e];n&&n()}}))}(e)};var O=["l","r","t","b","p","w","h"];function P(e,t,r){var n=!1;var a=[b.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)},r.prepareFn,b.rehover,function(){return e.emit("plotly_transitioning",[]),new Promise((function(a){e._transitioning=!0,t.duration>0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return l.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var i=0,o=0;function s(){return i++,function(){o++,n||o!==i||function(t){if(!e._transitionData)return;(function(e){if(e)for(;e.length;)e.shift()})(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)}(a)}}r.runFn(s),setTimeout(s())}))}],i=u.syncOrAsync(a,e);return i&&i.then||(i=Promise.resolve()),i.then((function(){return e}))}b.didMarginChange=function(e,t){for(var r=0;r<O.length;r++){var n=O[r],a=e[n],i=t[n];if(!o(a)||Math.abs(i-a)>1)return!0}return!1},b.graphJson=function(e,t,r,n,a,i){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&b.supplyDefaults(e);var o=a?e._fullData:e.data,l=a?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function c(e,t){if("function"==typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var n,a={};return Object.keys(e).sort().forEach((function(i){if(-1===["_","["].indexOf(i.charAt(0)))if("function"!=typeof e[i]){if("keepdata"===r){if("src"===i.substr(i.length-3))return}else if("keepstream"===r){if("string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0)return;a[i]=c(e[i],t)}else t&&(a[i]="_function")})),a}return Array.isArray(e)?e.map((function(e){return c(e,t)})):u.isTypedArray(e)?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var d={data:(o||[]).map((function(e){var r=c(e);return t&&delete r.fit,r}))};if(!t&&(d.layout=c(l),a)){var f=l._size;d.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return s&&(d.frames=c(s)),i&&(d.config=c(e._context,!0)),"object"===n?d:JSON.stringify(d)},b.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r<t.length;r++)switch((n=t[r]).type){case"replace":a=n.value;var l=(i[n.index]||{}).name,s=a.name;i[n.index]=o[s]=a,s!==l&&(delete o[l],o[s]=a);break;case"insert":o[(a=n.value).name]=a,i.splice(n.index,0,a);break;case"delete":delete o[(a=i[n.index]).name],i.splice(n.index,1)}return Promise.resolve()},b.computeFrame=function(e,t){var r,n,a,i,o=e._transitionData._frameHash;if(!t)throw new Error("computeFrame must be given a string frame name");var l=o[t.toString()];if(!l)return!1;for(var s=[l],c=[l.name];l.baseframe&&(l=o[l.baseframe.toString()])&&-1===c.indexOf(l.name);)s.push(l),c.push(l.name);for(var u={};l=s.pop();)if(l.layout&&(u.layout=b.extendLayout(u.layout,l.layout)),l.data){if(u.data||(u.data=[]),!(n=l.traces))for(n=[],r=0;r<l.data.length;r++)n[r]=r;for(u.traces||(u.traces=[]),r=0;r<l.data.length;r++)null!=(a=n[r])&&(-1===(i=u.traces.indexOf(a))&&(i=u.data.length,u.traces[i]=a),u.data[i]=b.extendTrace(u.data[i],l.data[r]))}return u},b.recomputeFrameHash=function(e){for(var t=e._transitionData._frameHash={},r=e._transitionData._frames,n=0;n<r.length;n++){var a=r[n];a&&a.name&&(t[a.name]=a)}},b.extendObjectWithContainers=function(e,t,r){var n,a,i,o,l,s,c,d=u.extendDeepNoArrays({},t||{}),f=u.expandObjectPaths(d),p={};if(r&&r.length)for(i=0;i<r.length;i++)void 0===(a=(n=u.nestedProperty(f,r[i])).get())?u.nestedProperty(p,r[i]).set(null):(n.set(null),u.nestedProperty(p,r[i]).set(a));if(e=u.extendDeepNoArrays(e||{},f),r&&r.length)for(i=0;i<r.length;i++)if(s=u.nestedProperty(p,r[i]).get()){for(c=(l=u.nestedProperty(e,r[i])).get(),Array.isArray(c)||(c=[],l.set(c)),o=0;o<s.length;o++){var h=s[o];c[o]=null===h?null:b.extendObjectWithContainers(c[o],h)}l.set(c)}return e},b.dataArrayContainers=["transforms","dimensions"],b.layoutArrayContainers=l.layoutArrayContainers,b.extendTrace=function(e,t){return b.extendObjectWithContainers(e,t,b.dataArrayContainers)},b.extendLayout=function(e,t){return b.extendObjectWithContainers(e,t,b.layoutArrayContainers)},b.transition=function(e,t,r,n,a,i){var o={redraw:a.redraw},l={},s=[];return o.prepareFn=function(){for(var a=Array.isArray(t)?t.length:0,i=n.slice(0,a),o=0;o<i.length;o++){var c=i[o],d=e._fullData[c]._module;if(d){if(d.animatable){var f=d.basePlotModule.name;l[f]||(l[f]=[]),l[f].push(c)}e.data[i[o]]=b.extendTrace(e.data[i[o]],t[o])}}var p=u.expandObjectPaths(u.extendDeepNoArrays({},r)),h=/^[xy]axis[0-9]*$/;for(var m in p)h.test(m)&&delete p[m].range;b.extendLayout(e.layout,p),delete e.calcdata,b.supplyDefaults(e),b.doCalcdata(e);var g=u.expandObjectPaths(r);if(g){var v=e._fullLayout._plots;for(var y in v){var x=v[y],_=x.xaxis,w=x.yaxis,T=_.range.slice(),M=w.range.slice(),k=null,A=null,L=null,S=null;Array.isArray(g[_._name+".range"])?k=g[_._name+".range"].slice():Array.isArray((g[_._name]||{}).range)&&(k=g[_._name].range.slice()),Array.isArray(g[w._name+".range"])?A=g[w._name+".range"].slice():Array.isArray((g[w._name]||{}).range)&&(A=g[w._name].range.slice()),T&&k&&(_.r2l(T[0])!==_.r2l(k[0])||_.r2l(T[1])!==_.r2l(k[1]))&&(L={xr0:T,xr1:k}),M&&A&&(w.r2l(M[0])!==w.r2l(A[0])||w.r2l(M[1])!==w.r2l(A[1]))&&(S={yr0:M,yr1:A}),(L||S)&&s.push(u.extendFlat({plotinfo:x},L,S))}}return Promise.resolve()},o.runFn=function(t){var n,a,o=e._fullLayout._basePlotModules,c=s.length;if(r)for(a=0;a<o.length;a++)o[a].transitionAxes&&o[a].transitionAxes(e,s,i,t);for(var d in c?((n=u.extendFlat({},i)).duration=0,delete l.cartesian):n=i,l){var f=l[d];e._fullData[f[0]]._module.basePlotModule.plot(e,f,n,t)}},P(e,i,o)},b.transitionFromReact=function(e,t,r,n){var a=e._fullLayout,i=a.transition,o={},l=[];return o.prepareFn=function(){var e=a._plots;for(var i in o.redraw=!1,"some"===t.anim&&(o.redraw=!0),"some"===r.anim&&(o.redraw=!0),e){var s=e[i],c=s.xaxis,d=s.yaxis,f=n[c._name].range.slice(),p=n[d._name].range.slice(),h=c.range.slice(),m=d.range.slice();c.setScale(),d.setScale();var g=null,v=null;c.r2l(f[0])===c.r2l(h[0])&&c.r2l(f[1])===c.r2l(h[1])||(g={xr0:f,xr1:h}),d.r2l(p[0])===d.r2l(m[0])&&d.r2l(p[1])===d.r2l(m[1])||(v={yr0:p,yr1:m}),(g||v)&&l.push(u.extendFlat({plotinfo:s},g,v))}return Promise.resolve()},o.runFn=function(r){for(var n,a,o,s=e._fullData,c=e._fullLayout._basePlotModules,d=[],f=0;f<s.length;f++)d.push(f);function p(){if(e._fullLayout)for(var t=0;t<c.length;t++)c[t].transitionAxes&&c[t].transitionAxes(e,l,n,r)}function h(){if(e._fullLayout)for(var t=0;t<c.length;t++)c[t].plot(e,o,a,r)}l.length&&t.anim?"traces first"===i.ordering?(n=u.extendFlat({},i,{duration:0}),o=d,a=i,setTimeout(p,i.duration),h()):(n=i,o=null,a=u.extendFlat({},i,{duration:0}),setTimeout(h,n.duration),p()):l.length?(n=i,p()):t.anim&&(o=d,a=i,h())},P(e,i,o)},b.doCalcdata=function(e,t){var r,n,a,i,o=p.list(e),c=e._fullData,d=e._fullLayout,h=new Array(c.length),m=(e.calcdata||[]).slice();for(e.calcdata=h,d._numBoxes=0,d._numViolins=0,d._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,d._piecolormap={},d._sunburstcolormap={},d._treemapcolormap={},d._iciclecolormap={},d._funnelareacolormap={},a=0;a<c.length;a++)Array.isArray(t)&&-1===t.indexOf(a)&&(h[a]=m[a]);for(a=0;a<c.length;a++)(r=c[a])._arrayAttrs=s.findArrayAttributes(r),r._extremes={};var g=d._subplots.polar||[];for(a=0;a<g.length;a++)o.push(d[g[a]].radialaxis,d[g[a]].angularaxis);for(var v in d._colorAxes){var y=d[v];!1!==y.cauto&&(delete y.cmin,delete y.cmax)}var x=!1;function b(t){if(r=c[t],n=r._module,!0===r.visible&&r.transforms){if(n&&n.calc){var a=n.calc(e,r);a[0]&&a[0].t&&a[0].t._scene&&delete a[0].t._scene.dirty}for(i=0;i<r.transforms.length;i++){var o=r.transforms[i];(n=_[o.type])&&n.calcTransform&&(r._hasCalcTransform=!0,x=!0,n.calcTransform(e,r,o))}}}function w(t,a){if(r=c[t],!!(n=r._module).isContainer===a){var o=[];if(!0===r.visible&&0!==r._length){delete r._indexToPoints;var l=r.transforms||[];for(i=l.length-1;i>=0;i--)if(l[i].enabled){r._indexToPoints=l[i]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}Array.isArray(o)&&o[0]||(o=[{x:f,y:f}]),o[0].t||(o[0].t={}),o[0].trace=r,h[t]=o}}for(R(o,c,d),a=0;a<c.length;a++)w(a,!0);for(a=0;a<c.length;a++)b(a);for(x&&R(o,c,d),a=0;a<c.length;a++)w(a,!0);for(a=0;a<c.length;a++)w(a,!1);z(e);var T=function(e,t){var r,n,a,i,o,s=[];function c(e,r,n){var a=r._id.charAt(0);if("histogram2dcontour"===e){var i=r._counterAxes[0],o=p.getFromId(t,i),l="x"===a||"x"===i&&"category"===o.type,s="y"===a||"y"===i&&"category"===o.type;return function(e,t){return 0===e||0===t||l&&e===n[t].length-1||s&&t===n.length-1?-1:("y"===a?t:e)-1}}return function(e,t){return"y"===a?t:e}}var d={min:function(e){return u.aggNums(Math.min,null,e)},max:function(e){return u.aggNums(Math.max,null,e)},sum:function(e){return u.aggNums((function(e,t){return e+t}),null,e)},total:function(e){return u.aggNums((function(e,t){return e+t}),null,e)},mean:function(e){return u.mean(e)},median:function(e){return u.median(e)}};for(r=0;r<e.length;r++){var f=e[r];if("category"===f.type){var h=f.categoryorder.match(I);if(h){var m=h[1],g=h[2],v=f._id.charAt(0),y="x"===v,x=[];for(n=0;n<f._categories.length;n++)x.push([f._categories[n],[]]);for(n=0;n<f._traceIndices.length;n++){var b=f._traceIndices[n],_=t._fullData[b];if(!0===_.visible){var w=_.type;l.traceIs(_,"histogram")&&(delete _._xautoBinFinished,delete _._yautoBinFinished);var T="splom"===w,M="scattergl"===w,k=t.calcdata[b];for(a=0;a<k.length;a++){var A,L,S=k[a];if(T){var D=_._axesDim[f._id];if(!y){var C=_._diag[D][0];C&&(f=t._fullLayout[p.id2name(C)])}var O=S.trace.dimensions[D].values;for(i=0;i<O.length;i++)for(A=f._categoriesMap[O[i]],o=0;o<S.trace.dimensions.length;o++)if(o!==D){var P=S.trace.dimensions[o];x[A][1].push(P.values[i])}}else if(M){for(i=0;i<S.t.x.length;i++)y?(A=S.t.x[i],L=S.t.y[i]):(A=S.t.y[i],L=S.t.x[i]),x[A][1].push(L);S.t&&S.t._scene&&delete S.t._scene.dirty}else if(S.hasOwnProperty("z")){L=S.z;var R=c(_.type,f,L);for(i=0;i<L.length;i++)for(o=0;o<L[i].length;o++)(A=R(o,i))+1&&x[A][1].push(L[i][o])}else for(void 0===(A=S.p)&&(A=S[v]),void 0===(L=S.s)&&(L=S.v),void 0===L&&(L=y?S.y:S.x),Array.isArray(L)||(L=void 0===L?[]:[L]),i=0;i<L.length;i++)x[A][1].push(L[i])}}}f._categoriesValue=x;var z=[];for(n=0;n<x.length;n++)z.push([x[n][0],d[m](x[n][1])]);z.sort((function(e,t){return e[1]-t[1]})),f._categoriesAggregatedValue=z,f._initialCategories=z.map((function(e){return e[0]})),"descending"===g&&f._initialCategories.reverse(),s=s.concat(f.sortByInitialCategories())}}}return s}(o,e);if(T.length){for(d._numBoxes=0,d._numViolins=0,a=0;a<T.length;a++)w(T[a],!0);for(a=0;a<T.length;a++)w(T[a],!1);z(e)}l.getComponentMethod("fx","calc")(e),l.getComponentMethod("errorbars","calc")(e)};var I=/(total|sum|min|max|mean|median) (ascending|descending)/;function R(e,t,r){var n={};function a(e){e.clearCalc(),"multicategory"===e.type&&e.setupMultiCategory(t),n[e._id]=1}u.simpleMap(e,a);for(var i=r._axisMatchGroups||[],o=0;o<i.length;o++)for(var l in i[o])n[l]||a(r[p.id2name(l)])}function z(e){var t,r,n,a=e._fullLayout,i=a._visibleModules,o={};for(r=0;r<i.length;r++){var l=i[r],s=l.crossTraceCalc;if(s){var c=l.basePlotModule.name;o[c]?u.pushUnique(o[c],s):o[c]=[s]}}for(n in o){var d=o[n],f=a._subplots[n];if(Array.isArray(f))for(t=0;t<f.length;t++){var p=f[t],h="cartesian"===n?a._plots[p]:a[p];for(r=0;r<d.length;r++)d[r](e,h,p)}else for(r=0;r<d.length;r++)d[r](e)}}b.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()},b.redrag=function(e){e._fullLayout._redrag&&e._fullLayout._redrag()},b.generalUpdatePerTraceModule=function(e,t,r,n){var a,i=t.traceHash,o={};for(a=0;a<r.length;a++){var l=r[a],s=l[0].trace;s.visible&&(o[s.type]=o[s.type]||[],o[s.type].push(l))}for(var c in i)if(!o[c]){var d=i[c][0];d[0].trace.visible=!1,o[c]=[d]}for(var f in o){var p=o[f];p[0][0].trace._module.plot(e,t,u.filterVisible(p),n)}t.traceHash=o},b.plotBasePlot=function(e,t,r,n,a){var i=l.getModule(e),o=v(t.calcdata,i)[0];i.plot(t,o,n,a)},b.cleanBasePlot=function(e,t,r,n,a){var i=a._has&&a._has(e),o=r._has&&r._has(e);i&&!o&&a["_"+e+"layer"].selectAll("g.trace").remove()}},{"../components/color":102,"../constants/numerical":212,"../lib":232,"../plot_api/plot_schema":267,"../plot_api/plot_template":268,"../plots/get_data":312,"../registry":318,"./animation_attributes":273,"./attributes":275,"./cartesian/axis_ids":283,"./cartesian/handle_outline":290,"./command":308,"./font_attributes":310,"./frame_attributes":311,"./layout_attributes":314,"@plotly/d3":11,"d3-format":13,"d3-time-format":14,"fast-isnumeric":17}],317:[function(e,t,r){"use strict";var n=e("../constants/docs");n.FORMAT_LINK,n.DATE_FORMAT_LINK;function a(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],a=0;a<r.length;a++)n[a]="`"+r[a]+"`";t+="Finally, the template string has access to ",t=1===r.length?"variable "+n[0]:"variables "+n.slice(0,-1).join(", ")+" and "+n.slice(-1)+"."}return t}r.hovertemplateAttrs=function(e,t){e=e||{};a(t=t||{});var r={valType:"string",dflt:"",editType:e.editType||"none"};return!1!==e.arrayOk&&(r.arrayOk=!0),r},r.texttemplateAttrs=function(e,t){e=e||{};a(t=t||{});var r={valType:"string",dflt:"",editType:e.editType||"calc"};return!1!==e.arrayOk&&(r.arrayOk=!0),r}},{"../constants/docs":209}],318:[function(e,t,r){"use strict";var n=e("./lib/loggers"),a=e("./lib/noop"),i=e("./lib/push_unique"),o=e("./lib/is_plain_object"),l=e("./lib/dom").addStyleRule,s=e("./lib/extend"),c=e("./plots/attributes"),u=e("./plots/layout_attributes"),d=s.extendFlat,f=s.extendDeepAll;function p(e){var t=e.name,a=e.categories,i=e.meta;if(r.modules[t])n.log("Type "+t+" already registered");else{r.subplotsRegistry[e.basePlotModule.name]||function(e){var t=e.name;if(r.subplotsRegistry[t])return void n.log("Plot type "+t+" already registered.");for(var a in v(e),r.subplotsRegistry[t]=e,r.componentsRegistry)b(a,e.name)}(e.basePlotModule);for(var o={},s=0;s<a.length;s++)o[a[s]]=!0,r.allCategories[a[s]]=!0;for(var c in r.modules[t]={_module:e,categories:o},i&&Object.keys(i).length&&(r.modules[t].meta=i),r.allTypes.push(t),r.componentsRegistry)y(c,t);e.layoutAttributes&&d(r.traceLayoutAttributes,e.layoutAttributes);var u=e.basePlotModule,f=u.name;if("mapbox"===f){var p=u.constants.styleRules;for(var h in p)l(".js-plotly-plot .plotly .mapboxgl-"+h,p[h])}"geo"!==f&&"mapbox"!==f||void 0===typeof window||void 0!==window.PlotlyGeoAssets||(window.PlotlyGeoAssets={topojson:{}})}}function h(e){if("string"!=typeof e.name)throw new Error("Component module *name* must be a string.");var t=e.name;for(var n in r.componentsRegistry[t]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&i(r.layoutArrayContainers,t),v(e)),r.modules)y(t,n);for(var a in r.subplotsRegistry)b(t,a);for(var o in r.transformsRegistry)x(t,o);e.schema&&e.schema.layout&&f(u,e.schema.layout)}function m(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 l in a&&i&&n.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)||n.log(t+" registered without an *attributes* object."),"function"!=typeof e.supplyDefaults&&n.log(t+" registered without a *supplyDefaults* method."),r.transformsRegistry[e.name]=e,r.componentsRegistry)x(l,e.name)}function g(e){var t=e.name,n=t.split("-")[0],a=e.dictionary,i=e.format,o=a&&Object.keys(a).length,l=i&&Object.keys(i).length,s=r.localeRegistry,c=s[t];if(c||(s[t]=c={}),n!==t){var u=s[n];u||(s[n]=u={}),o&&u.dictionary===c.dictionary&&(u.dictionary=a),l&&u.format===c.format&&(u.format=i)}o&&(c.dictionary=a),l&&(c.format=i)}function v(e){if(e.layoutAttributes){var t=e.layoutAttributes._arrayAttrRegexps;if(t)for(var n=0;n<t.length;n++)i(r.layoutArrayRegexes,t[n])}}function y(e,t){var n=r.componentsRegistry[e].schema;if(n&&n.traces){var a=n.traces[t];a&&f(r.modules[t]._module.attributes,a)}}function x(e,t){var n=r.componentsRegistry[e].schema;if(n&&n.transforms){var a=n.transforms[t];a&&f(r.transformsRegistry[t].attributes,a)}}function b(e,t){var n=r.componentsRegistry[e].schema;if(n&&n.subplots){var a=r.subplotsRegistry[t],i=a.layoutAttributes,o="subplot"===a.attr?a.name:a.attr;Array.isArray(o)&&(o=o[0]);var l=n.subplots[o];i&&l&&f(i,l)}}function _(e){return"object"==typeof e&&(e=e.type),e}r.modules={},r.allCategories={},r.allTypes=[],r.subplotsRegistry={},r.transformsRegistry={},r.componentsRegistry={},r.layoutArrayContainers=[],r.layoutArrayRegexes=[],r.traceLayoutAttributes={},r.localeRegistry={},r.apiMethodRegistry={},r.collectableSubplotTypes=null,r.register=function(e){if(r.collectableSubplotTypes=null,!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 n=e[t];if(!n)throw new Error("Invalid module was attempted to be registered!");switch(n.moduleType){case"trace":p(n);break;case"transform":m(n);break;case"component":h(n);break;case"locale":g(n);break;case"apiMethod":var a=n.name;r.apiMethodRegistry[a]=n.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},r.getModule=function(e){var t=r.modules[_(e)];return!!t&&t._module},r.traceIs=function(e,t){if("various"===(e=_(e)))return!1;var a=r.modules[e];return a||(e&&n.log("Unrecognized trace type "+e+"."),a=r.modules[c.type.dflt]),!!a.categories[t]},r.getTransformIndices=function(e,t){for(var r=[],n=e.transforms||[],a=0;a<n.length;a++)n[a].type===t&&r.push(a);return r},r.hasTransform=function(e,t){for(var r=e.transforms||[],n=0;n<r.length;n++)if(r[n].type===t)return!0;return!1},r.getComponentMethod=function(e,t){var n=r.componentsRegistry[e];return n&&n[t]||a},r.call=function(){var e=arguments[0],t=[].slice.call(arguments,1);return r.apiMethodRegistry[e].apply(null,t)}},{"./lib/dom":224,"./lib/extend":226,"./lib/is_plain_object":233,"./lib/loggers":236,"./lib/noop":241,"./lib/push_unique":246,"./plots/attributes":275,"./plots/layout_attributes":314}],319:[function(e,t,r){"use strict";var n=e("../registry"),a=e("../lib"),i=a.extendFlat,o=a.extendDeep;function l(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},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 r,a,s=e.data,c=e.layout,u=o([],s),d=o({},c,l(t.tileClass)),f=e._context||{};if(t.width&&(d.width=t.width),t.height&&(d.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){d.annotations=[];var p=Object.keys(d);for(r=0;r<p.length;r++)a=p[r],["xaxis","yaxis","zaxis"].indexOf(a.slice(0,5))>-1&&(d[p[r]].title={text:""});for(r=0;r<u.length;r++){var h=u[r];h.showscale=!1,h.marker&&(h.marker.showscale=!1),n.traceIs(h,"pie-like")&&(h.textposition="none")}}if(Array.isArray(t.annotations))for(r=0;r<t.annotations.length;r++)d.annotations.push(t.annotations[r]);var m=Object.keys(d).filter((function(e){return e.match(/^scene\d*$/)}));if(m.length){var g={};for("thumbnail"===t.tileClass&&(g={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<m.length;r++){var v=d[m[r]];v.xaxis||(v.xaxis={}),v.yaxis||(v.yaxis={}),v.zaxis||(v.zaxis={}),i(v.xaxis,g),i(v.yaxis,g),i(v.zaxis,g),v._scene=null}}var y=document.createElement("div");t.tileClass&&(y.className=t.tileClass);var x={gd:y,td:y,layout:d,data:u,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:f.mapboxAccessToken}};return"transparent"!==t.setBackground&&(x.config.setBackground=t.setBackground||"opaque"),x.gd.defaultLayout=l(t.tileClass),x}},{"../lib":232,"../registry":318}],320:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plot_api/to_image"),i=e("./filesaver"),o=e("./helpers");t.exports=function(e,t){var r;return n.isPlainObject(e)||(r=n.getGraphDiv(e)),(t=t||{}).format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise((function(l,s){r&&r._snapshotInProgress&&s(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==t.format&&s(new Error(o.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var c=a(e,t),u=t.filename||e.fn||"newplot";u+="."+t.format.replace("-","."),c.then((function(e){return r&&(r._snapshotInProgress=!1),i(e,u,t.format)})).then((function(e){l(e)})).catch((function(e){r&&(r._snapshotInProgress=!1),s(e)}))}))}},{"../lib":232,"../plot_api/to_image":271,"./filesaver":321,"./helpers":322}],321:[function(e,t,r){"use strict";var n=e("../lib"),a=e("./helpers");t.exports=function(e,t,r){var i=document.createElement("a"),o="download"in i;return new Promise((function(l,s){var c,u;if(n.isIE())return c=a.createBlob(e,"svg"),window.navigator.msSaveBlob(c,t),c=null,l(t);if(o)return c=a.createBlob(e,r),u=a.createObjectURL(c),i.href=u,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),a.revokeObjectURL(u),c=null,l(t);if(n.isSafari()){var d="svg"===r?",":";base64,";return a.octetStream(d+encodeURIComponent(e)),l(t)}s(new Error("download error"))}))}},{"../lib":232,"./helpers":322}],322:[function(e,t,r){"use strict";var n=e("../registry");r.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("gl2d")||e._has("mapbox"))?500:0},r.getRedrawFunc=function(e){return function(){n.getComponentMethod("colorbar","draw")(e)}},r.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},r.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var a=window.URL||window.webkitURL;r.createObjectURL=function(e){return a.createObjectURL(e)},r.revokeObjectURL=function(e){return a.revokeObjectURL(e)},r.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),a=0;a<t;a++)n[a]=e.charCodeAt(a);return r}(window.atob(e));return new window.Blob([r],{type:"image/"+t})},r.octetStream=function(e){document.location.href="data:application/octet-stream"+e},r.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,r.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},{"../registry":318}],323:[function(e,t,r){"use strict";var n=e("./helpers"),a={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:e("./cloneplot"),toSVG:e("./tosvg"),svgToImg:e("./svgtoimg"),toImage:e("./toimage"),downloadImage:e("./download")};t.exports=a},{"./cloneplot":319,"./download":320,"./helpers":322,"./svgtoimg":324,"./toimage":325,"./tosvg":326}],324:[function(e,t,r){"use strict";var n=e("../lib"),a=e("events").EventEmitter,i=e("./helpers");t.exports=function(e){var t=e.emitter||new a,r=new Promise((function(a,o){var l=window.Image,s=e.svg,c=e.format||"png";if(n.isIE()&&"svg"!==c){var u=new Error(i.MSG_IE_BAD_FORMAT);return o(u),e.promise?r:t.emit("error",u)}var d,f,p=e.canvas,h=e.scale||1,m=e.width||300,g=e.height||150,v=h*m,y=h*g,x=p.getContext("2d"),b=new l;"svg"===c||n.isSafari()?f=i.encodeSVG(s):(d=i.createBlob(s,"svg"),f=i.createObjectURL(d)),p.width=v,p.height=y,b.onload=function(){var r;switch(d=null,i.revokeObjectURL(f),"svg"!==c&&x.drawImage(b,0,0,v,y),c){case"jpeg":r=p.toDataURL("image/jpeg");break;case"png":r=p.toDataURL("image/png");break;case"webp":r=p.toDataURL("image/webp");break;case"svg":r=f;break;default:var n="Image format is not jpeg, png, svg or webp.";if(o(new Error(n)),!e.promise)return t.emit("error",n)}a(r),e.promise||t.emit("success",r)},b.onerror=function(r){if(d=null,i.revokeObjectURL(f),o(r),!e.promise)return t.emit("error",r)},b.src=f}));return e.promise?r:t}},{"../lib":232,"./helpers":322,events:12}],325:[function(e,t,r){"use strict";var n=e("events").EventEmitter,a=e("../registry"),i=e("../lib"),o=e("./helpers"),l=e("./cloneplot"),s=e("./tosvg"),c=e("./svgtoimg");t.exports=function(e,t){var r=new n,u=l(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("_doPlot",d,u.data,u.layout,u.config).then(f).then((function(){var e=o.getDelay(d._fullLayout);setTimeout((function(){var e=s(d),n=document.createElement("canvas");n.id=i.randstr(),(r=c({format:t.format,width:d._fullLayout.width,height:d._fullLayout.height,canvas:n,emitter:r,svg:e})).clean=function(){d&&document.body.removeChild(d)}}),e)})).catch((function(e){r.emit("error",e)})),r}},{"../lib":232,"../registry":318,"./cloneplot":319,"./helpers":322,"./svgtoimg":324,"./tosvg":326,events:12}],326:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../lib"),i=e("../components/drawing"),o=e("../components/color"),l=e("../constants/xmlns_namespaces"),s=/"/g,c=new RegExp('("TOBESTRIPPED)|(TOBESTRIPPED")',"g");t.exports=function(e,t,r){var u,d,f=e._fullLayout,p=f._paper,h=f._toppaper,m=f.width,g=f.height;p.insert("rect",":first-child").call(i.setRect,0,0,m,g).call(o.fill,f.paper_bgcolor);var v=f._basePlotModules||[];for(u=0;u<v.length;u++){var y=v[u];y.toSVG&&y.toSVG(e)}if(h){var x=h.node().childNodes,b=Array.prototype.slice.call(x);for(u=0;u<b.length;u++){var _=b[u];_.childNodes.length&&p.node().appendChild(_)}}f._draggers&&f._draggers.remove(),p.node().style.background="",p.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each((function(){var e=n.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(s,"TOBESTRIPPED"))}else e.remove()}));var w=[];if(f._gradientUrlQueryParts)for(d in f._gradientUrlQueryParts)w.push(d);if(f._patternUrlQueryParts)for(d in f._patternUrlQueryParts)w.push(d);w.length&&p.selectAll(w.join(",")).each((function(){var e=n.select(this),t=this.style.fill;t&&-1!==t.indexOf("url(")&&e.style("fill",t.replace(s,"TOBESTRIPPED"));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&e.style("stroke",r.replace(s,"TOBESTRIPPED"))})),"pdf"!==t&&"eps"!==t||p.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),p.node().setAttributeNS(l.xmlns,"xmlns",l.svg),p.node().setAttributeNS(l.xmlns,"xmlns:xlink",l.xlink),"svg"===t&&r&&(p.attr("width",r*m),p.attr("height",r*g),p.attr("viewBox","0 0 "+m+" "+g));var T=(new window.XMLSerializer).serializeToString(p.node());return T=function(e){var t=n.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,(function(e){return"<"===e?"<":"&rt;"===e?">":-1!==e.indexOf("<")||-1!==e.indexOf(">")?"":t.html(e).text()}));return t.remove(),r}(T),T=(T=T.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),a.isIE()&&(T=(T=(T=T.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),T}},{"../components/color":102,"../components/drawing":124,"../constants/xmlns_namespaces":213,"../lib":232,"@plotly/d3":11}],327:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){for(var r=0;r<e.length;r++)e[r].i=r;n.mergeArray(t.text,e,"tx"),n.mergeArray(t.hovertext,e,"htx");var a=t.marker;if(a){n.mergeArray(a.opacity,e,"mo",!0),n.mergeArray(a.color,e,"mc");var i=a.line;i&&(n.mergeArray(i.color,e,"mlc"),n.mergeArrayCastPositive(i.width,e,"mlw"))}}},{"../../lib":232}],328:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../plots/template_attributes").texttemplateAttrs,l=e("../../components/colorscale/attributes"),s=e("../../plots/font_attributes"),c=e("./constants"),u=e("../../components/drawing/attributes").pattern,d=e("../../lib/extend").extendFlat,f=s({editType:"calc",arrayOk:!0,colorEditType:"style"}),p=d({},n.marker.line.width,{dflt:0}),h=d({width:p,editType:"calc"},l("marker.line")),m=d({line:h,editType:"calc"},l("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:u});t.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),text:n.text,texttemplate:o({editType:"plot"},{keys:c.eventDataKeys}),hovertext:n.hovertext,hovertemplate:i({},{keys:c.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:d({},f,{}),insidetextfont:d({},f,{}),outsidetextfont:d({},f,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:d({},n.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:m,offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:"style"},textfont:n.selected.textfont,editType:"style"},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:"style"},textfont:n.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"]}}}},{"../../components/colorscale/attributes":109,"../../components/drawing/attributes":123,"../../lib/extend":226,"../../plots/cartesian/axis_format_attributes":282,"../../plots/font_attributes":310,"../../plots/template_attributes":317,"../scatter/attributes":358,"./constants":330}],329:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../plots/cartesian/align_period"),i=e("../../components/colorscale/helpers").hasColorscale,o=e("../../components/colorscale/calc"),l=e("./arrays_to_calcdata"),s=e("../scatter/calc_selection");t.exports=function(e,t){var r,c,u,d,f,p,h=n.getFromId(e,t.xaxis||"x"),m=n.getFromId(e,t.yaxis||"y"),g={msUTC:!(!t.base&&0!==t.base)};"h"===t.orientation?(r=h.makeCalcdata(t,"x",g),u=m.makeCalcdata(t,"y"),d=a(t,m,"y",u),f=!!t.yperiodalignment,p="y"):(r=m.makeCalcdata(t,"y",g),u=h.makeCalcdata(t,"x"),d=a(t,h,"x",u),f=!!t.xperiodalignment,p="x"),c=d.vals;for(var v=Math.min(c.length,r.length),y=new Array(v),x=0;x<v;x++)y[x]={p:c[x],s:r[x]},f&&(y[x].orig_p=u[x],y[x][p+"End"]=d.ends[x],y[x][p+"Start"]=d.starts[x]),t.ids&&(y[x].id=String(t.ids[x]));return i(t,"marker")&&o(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),i(t,"marker.line")&&o(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),l(y,t),s(y,t),y}},{"../../components/colorscale/calc":110,"../../components/colorscale/helpers":113,"../../plots/cartesian/align_period":276,"../../plots/cartesian/axes":279,"../scatter/calc_selection":360,"./arrays_to_calcdata":327}],330:[function(e,t,r){"use strict";t.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},{}],331:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib").isArrayOrTypedArray,i=e("../../constants/numerical").BADNUM,o=e("../../registry"),l=e("../../plots/cartesian/axes"),s=e("../../plots/cartesian/constraints").getAxisGroup,c=e("./sieve.js");function u(e,t,r,o,u){if(o.length){var b,_,w,T;switch(function(e,t){var r,i;for(r=0;r<t.length;r++){var o,l=t[r],s=l[0].trace,c="funnel"===s.type?s._base:s.base,u="h"===s.orientation?s.xcalendar:s.ycalendar,d="category"===e.type||"multicategory"===e.type?function(){return null}:e.d2c;if(a(c)){for(i=0;i<Math.min(c.length,l.length);i++)o=d(c[i],0,u),n(o)?(l[i].b=+o,l[i].hasB=1):l[i].b=0;for(;i<l.length;i++)l[i].b=0}else{o=d(c,0,u);var f=n(o);for(o=f?o:0,i=0;i<l.length;i++)l[i].b=o,f&&(l[i].hasB=1)}}}(r,o),u.mode){case"overlay":d(t,r,o,u);break;case"group":for(b=[],_=[],w=0;w<o.length;w++)void 0===(T=o[w])[0].trace.offset?_.push(T):b.push(T);_.length&&function(e,t,r,n,a){var o=new c(n,{posAxis:t,sepNegVal:!1,overlapNoMerge:!a.norm});(function(e,t,r,n){for(var a=e._fullLayout,i=r.positions,o=r.distinctPositions,l=r.minDiff,c=r.traces,u=c.length,d=i.length!==o.length,f=l*(1-n.gap),g=s(a,t._id)+c[0][0].trace.orientation,v=a._alignmentOpts[g]||{},y=0;y<u;y++){var x,b,_=c[y],w=_[0].trace,T=v[w.alignmentgroup]||{},M=Object.keys(T.offsetGroups||{}).length,k=(x=M?f/M:d?f/u:f)*(1-(n.groupgap||0));b=M?((2*w._offsetIndex+1-M)*x-k)/2:d?((2*y+1-u)*x-k)/2:-k/2;var A=_[0].t;A.barwidth=k,A.poffset=b,A.bargroupwidth=f,A.bardelta=l}r.binWidth=c[0][0].t.barwidth/100,p(r),h(t,r),m(t,r,d)})(e,t,o,a),function(e,t){for(var r=e.traces,n=0;n<r.length;n++){var a=r[n];if(void 0===a[0].trace.base)for(var o=new c([a],{posAxis:t,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<a.length;l++){var s=a[l];if(s.p!==i){var u=o.put(s.p,s.b+s.s);u&&(s.b=u)}}}}(o,t),a.norm?(v(o),y(r,o,a)):g(r,o)}(e,t,r,_,u),b.length&&d(t,r,b,u);break;case"stack":case"relative":for(b=[],_=[],w=0;w<o.length;w++)void 0===(T=o[w])[0].trace.base?_.push(T):b.push(T);_.length&&function(e,t,r,n,a){var o=new c(n,{posAxis:t,sepNegVal:"relative"===a.mode,overlapNoMerge:!(a.norm||"stack"===a.mode||"relative"===a.mode)});f(t,o,a),function(e,t,r){var n,a,o,s,c,u,d=x(e),f=t.traces;for(s=0;s<f.length;s++)if(n=f[s],"funnel"===(a=n[0].trace).type)for(c=0;c<n.length;c++)(u=n[c]).s!==i&&t.put(u.p,-.5*u.s);for(s=0;s<f.length;s++){n=f[s],a=n[0].trace,o="funnel"===a.type;var p=[];for(c=0;c<n.length;c++)if((u=n[c]).s!==i){var h;h=o?u.s:u.s+u.b;var m=t.put(u.p,h),g=m+h;u.b=m,u[d]=g,r.norm||(p.push(g),u.hasB&&p.push(m))}r.norm||(a._extremes[e._id]=l.findExtremes(e,p,{tozero:!0,padded:!0}))}}(r,o,a);for(var s=0;s<n.length;s++)for(var u=n[s],d=0;d<u.length;d++){var p=u[d];if(p.s!==i)p.b+p.s===o.get(p.p,p.s)&&(p._outmost=!0)}a.norm&&y(r,o,a)}(0,t,r,_,u),b.length&&d(t,r,b,u)}!function(e,t){var r,a,i,o=x(t),l={},s=1/0,c=-1/0;for(r=0;r<e.length;r++)for(i=e[r],a=0;a<i.length;a++){var u=i[a].p;n(u)&&(s=Math.min(s,u),c=Math.max(c,u))}var d=1e4/(c-s),f=l.round=function(e){return String(Math.round(d*(e-s)))};for(r=0;r<e.length;r++){(i=e[r])[0].t.extents=l;var p=i[0].t.poffset,h=Array.isArray(p);for(a=0;a<i.length;a++){var m=i[a],g=m[o]-m.w/2;if(n(g)){var v=m[o]+m.w/2,y=f(m.p);l[y]?l[y]=[Math.min(g,l[y][0]),Math.max(v,l[y][1])]:l[y]=[g,v]}m.p0=m.p+(h?p[a]:p),m.p1=m.p0+m.w,m.s0=m.b,m.s1=m.s0+m.s}}}(o,t)}}function d(e,t,r,n){for(var a=0;a<r.length;a++){var i=r[a],o=new c([i],{posAxis:e,sepNegVal:!1,overlapNoMerge:!n.norm});f(e,o,n),n.norm?(v(o),y(t,o,n)):g(t,o)}}function f(e,t,r){for(var n=t.minDiff,a=t.traces,i=n*(1-r.gap),o=i*(1-(r.groupgap||0)),l=-o/2,s=0;s<a.length;s++){var c=a[s][0].t;c.barwidth=o,c.poffset=l,c.bargroupwidth=i,c.bardelta=n}t.binWidth=a[0][0].t.barwidth/100,p(t),h(e,t),m(e,t)}function p(e){var t,r,i=e.traces;for(t=0;t<i.length;t++){var o,l=i[t],s=l[0],c=s.trace,u=s.t,d=c._offset||c.offset,f=u.poffset;if(a(d)){for(o=Array.prototype.slice.call(d,0,l.length),r=0;r<o.length;r++)n(o[r])||(o[r]=f);for(r=o.length;r<l.length;r++)o.push(f);u.poffset=o}else void 0!==d&&(u.poffset=d);var p=c._width||c.width,h=u.barwidth;if(a(p)){var m=Array.prototype.slice.call(p,0,l.length);for(r=0;r<m.length;r++)n(m[r])||(m[r]=h);for(r=m.length;r<l.length;r++)m.push(h);if(u.barwidth=m,void 0===d){for(o=[],r=0;r<l.length;r++)o.push(f+(h-m[r])/2);u.poffset=o}}else void 0!==p&&(u.barwidth=p,void 0===d&&(u.poffset=f+(h-p)/2))}}function h(e,t){for(var r=t.traces,n=x(e),a=0;a<r.length;a++)for(var i=r[a],o=i[0].t,l=o.poffset,s=Array.isArray(l),c=o.barwidth,u=Array.isArray(c),d=0;d<i.length;d++){var f=i[d],p=f.w=u?c[d]:c;f[n]=f.p+(s?l[d]:l)+p/2}}function m(e,t,r){var n=t.traces,a=t.minDiff/2;l.minDtick(e,t.minDiff,t.distinctPositions[0],r);for(var i=0;i<n.length;i++){var o,s,c,u,d=n[i],f=d[0],p=f.trace,h=[];for(u=0;u<d.length;u++)s=(o=d[u]).p-a,c=o.p+a,h.push(s,c);if(p.width||p.offset){var m=f.t,g=m.poffset,v=m.barwidth,y=Array.isArray(g),x=Array.isArray(v);for(u=0;u<d.length;u++){o=d[u];var b=y?g[u]:g,_=x?v[u]:v;c=(s=o.p+b)+_,h.push(s,c)}}p._extremes[e._id]=l.findExtremes(e,h,{padded:!1})}}function g(e,t){for(var r=t.traces,n=x(e),a=0;a<r.length;a++){for(var i=r[a],o=i[0].trace,s=[],c=!1,u=0;u<i.length;u++){var d=i[u],f=d.b,p=f+d.s;d[n]=p,s.push(p),d.hasB&&s.push(f),d.hasB&&d.b||(c=!0)}o._extremes[e._id]=l.findExtremes(e,s,{tozero:c,padded:!0})}}function v(e){for(var t=e.traces,r=0;r<t.length;r++)for(var n=t[r],a=0;a<n.length;a++){var o=n[a];o.s!==i&&e.put(o.p,o.b+o.s)}}function y(e,t,r){var a=t.traces,o=x(e),s="fraction"===r.norm?1:100,c=s/1e9,u=e.l2c(e.c2l(0)),d="stack"===r.mode?s:u;function f(t){return n(e.c2l(t))&&(t<u-c||t>d+c||!n(u))}for(var p=0;p<a.length;p++){for(var h=a[p],m=h[0].trace,g=[],v=!1,y=!1,b=0;b<h.length;b++){var _=h[b];if(_.s!==i){var w=Math.abs(s/t.get(_.p,_.s));_.b*=w,_.s*=w;var T=_.b,M=T+_.s;_[o]=M,g.push(M),y=y||f(M),_.hasB&&(g.push(T),y=y||f(T)),_.hasB&&_.b||(v=!0)}}m._extremes[e._id]=l.findExtremes(e,g,{tozero:v,padded:y})}}function x(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,l=e.calcdata,s=[],c=[],d=0;d<i.length;d++){var f=i[d];if(!0===f.visible&&o.traceIs(f,"bar")&&f.xaxis===r._id&&f.yaxis===n._id&&("h"===f.orientation?s.push(l[d]):c.push(l[d]),f._computePh))for(var p=e.calcdata[d],h=0;h<p.length;h++)"function"==typeof p[h].ph0&&(p[h].ph0=p[h].ph0()),"function"==typeof p[h].ph1&&(p[h].ph1=p[h].ph1())}var m={xCat:"category"===r.type||"multicategory"===r.type,yCat:"category"===n.type||"multicategory"===n.type,mode:a.barmode,norm:a.barnorm,gap:a.bargap,groupgap:a.bargroupgap};u(e,r,n,c,m),u(e,n,r,s,m)},setGroupPositions:u}},{"../../constants/numerical":212,"../../lib":232,"../../plots/cartesian/axes":279,"../../plots/cartesian/constraints":287,"../../registry":318,"./sieve.js":341,"fast-isnumeric":17}],332:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../../registry"),o=e("../scatter/xy_defaults"),l=e("../scatter/period_defaults"),s=e("./style_defaults"),c=e("../../plots/cartesian/constraints").getAxisGroup,u=e("./attributes"),d=n.coerceFont;function f(e,t,r,n){var a=t.orientation,i=t[{v:"x",h:"y"}[a]+"axis"],o=c(r,i)+a,l=r._alignmentOpts||{},s=n("alignmentgroup"),u=l[o];u||(u=l[o]={});var d=u[s];d?d.traces.push(t):d=u[s]={traces:[t],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var f=n("offsetgroup"),p=d.offsetGroups,h=p[f];f&&(h||(h=p[f]={offsetIndex:Object.keys(p).length}),t._offsetIndex=h.offsetIndex)}function p(e,t,r,a,i,o){var l=!(!1===(o=o||{}).moduleHasSelected),s=!(!1===o.moduleHasUnselected),c=!(!1===o.moduleHasConstrain),u=!(!1===o.moduleHasCliponaxis),f=!(!1===o.moduleHasTextangle),p=!(!1===o.moduleHasInsideanchor),h=!!o.hasPathbar,m=Array.isArray(i)||"auto"===i,g=m||"inside"===i,v=m||"outside"===i;if(g||v){var y=d(a,"textfont",r.font),x=n.extendFlat({},y),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,d(a,"insidetextfont",x),h){var _=n.extendFlat({},y);b&&delete _.color,d(a,"pathbar.textfont",_)}v&&d(a,"outsidetextfont",y),l&&a("selected.textfont.color"),s&&a("unselected.textfont.color"),c&&a("constraintext"),u&&a("cliponaxis"),f&&a("textangle"),a("texttemplate")}g&&p&&a("insidetextanchor")}t.exports={supplyDefaults:function(e,t,r,c){function d(r,a){return n.coerce(e,t,u,r,a)}if(o(e,t,c,d)){l(e,t,c,d),d("xhoverformat"),d("yhoverformat"),d("orientation",t.x&&!t.y?"h":"v"),d("base"),d("offset"),d("width"),d("text"),d("hovertext"),d("hovertemplate");var f=d("textposition");p(e,t,c,d,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s(e,t,d,r,c);var h=(t.marker.line||{}).color,m=i.getComponentMethod("errorbars","supplyDefaults");m(e,t,h||a.defaultLine,{axis:"y"}),m(e,t,h||a.defaultLine,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,d)}else t.visible=!1},crossTraceDefaults:function(e,t){var r;function a(e){return n.coerce(r._input,r,u,e)}if("group"===t.barmode)for(var i=0;i<e.length;i++)"bar"===(r=e[i]).type&&(r._input,f(0,r,t,a))},handleGroupingDefaults:f,handleText:p}},{"../../components/color":102,"../../lib":232,"../../plots/cartesian/constraints":287,"../../registry":318,"../scatter/period_defaults":378,"../scatter/xy_defaults":385,"./attributes":328,"./style_defaults":343}],333:[function(e,t,r){"use strict";t.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},{}],334:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("tinycolor2"),i=e("../../lib").isArrayOrTypedArray;r.coerceString=function(e,t,r){if("string"==typeof t){if(t||!e.noBlank)return t}else if(("number"==typeof t||!0===t)&&!e.strict)return String(t);return void 0!==r?r:e.dflt},r.coerceNumber=function(e,t,r){if(n(t)){t=+t;var a=e.min,i=e.max;if(!(void 0!==a&&t<a||void 0!==i&&t>i))return t}return void 0!==r?r:e.dflt},r.coerceColor=function(e,t,r){return a(t).isValid()?t:void 0!==r?r:e.dflt},r.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},r.getValue=function(e,t){var r;return Array.isArray(e)?t<e.length&&(r=e[t]):r=e,r},r.getLineWidth=function(e,t){return 0<t.mlw?t.mlw:i(e.marker.line.width)?0:e.marker.line.width}},{"../../lib":232,"fast-isnumeric":17,tinycolor2:67}],335:[function(e,t,r){"use strict";var n=e("../../components/fx"),a=e("../../registry"),i=e("../../components/color"),o=e("../../lib").fillText,l=e("./helpers").getLineWidth,s=e("../../plots/cartesian/axes").hoverLabelText,c=e("../../constants/numerical").BADNUM;function u(e,t,r,a,i){var l,u,d,f,p,h,m,g=e.cd,v=g[0].trace,y=g[0].t,x="closest"===a,b="waterfall"===v.type,_=e.maxHoverDistance,w=e.maxSpikeDistance;"h"===v.orientation?(l=r,u=t,d="y",f="x",p=R,h=P):(l=t,u=r,d="x",f="y",h=R,p=P);var T=v[d+"period"],M=x||T;function k(e){return L(e,-1)}function A(e){return L(e,1)}function L(e,t){var r=e.w;return e[d]+t*r/2}function S(e){return e[d+"End"]-e[d+"Start"]}var D=x?k:T?function(e){return e.p-S(e)/2}:function(e){return Math.min(k(e),e.p-y.bardelta/2)},C=x?A:T?function(e){return e.p+S(e)/2}:function(e){return Math.max(A(e),e.p+y.bardelta/2)};function O(e,t,r){return i.finiteRange&&(r=0),n.inbox(e-l,t-l,r+Math.min(1,Math.abs(t-e)/m)-1)}function P(e){return O(D(e),C(e),_)}function I(e){var t=e[f];if(b){var r=Math.abs(e.rawS)||0;u>0?t+=r:u<0&&(t-=r)}return t}function R(e){var t=u,r=e.b,a=I(e);return n.inbox(r-t,a-t,_+(a-t)/(a-r)-1)}var z=e[d+"a"],N=e[f+"a"];m=Math.abs(z.r2c(z.range[1])-z.r2c(z.range[0]));var F=n.getDistanceFunction(a,p,h,(function(e){return(p(e)+h(e))/2}));if(n.getClosest(g,F,e),!1!==e.index&&g[e.index].p!==c){M||(D=function(e){return Math.min(k(e),e.p-y.bargroupwidth/2)},C=function(e){return Math.max(A(e),e.p+y.bargroupwidth/2)});var E=g[e.index],j=v.base?E.b+E.s:E.s;e[f+"0"]=e[f+"1"]=N.c2p(E[f],!0),e[f+"LabelVal"]=j;var H=y.extents[y.extents.round(E.p)];e[d+"0"]=z.c2p(x?D(E):H[0],!0),e[d+"1"]=z.c2p(x?C(E):H[1],!0);var B=void 0!==E.orig_p;return e[d+"LabelVal"]=B?E.orig_p:E.p,e.labelLabel=s(z,e[d+"LabelVal"],v[d+"hoverformat"]),e.valueLabel=s(N,e[f+"LabelVal"],v[f+"hoverformat"]),e.baseLabel=s(N,E.b,v[f+"hoverformat"]),e.spikeDistance=(function(e){var t=u,r=e.b,a=I(e);return n.inbox(r-t,a-t,w+(a-t)/(a-r)-1)}(E)+function(e){return O(k(e),A(e),w)}(E))/2,e[d+"Spike"]=z.c2p(E.p,!0),o(E,v,e),e.hovertemplate=v.hovertemplate,e}}function d(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=l(e,t);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}t.exports={hoverPoints:function(e,t,r,n,i){var o=u(e,t,r,n,i);if(o){var l=o.cd,s=l[0].trace,c=l[o.index];return o.color=d(s,c),a.getComponentMethod("errorbars","hoverInfo")(c,s,o),[o]}},hoverOnBars:u,getTraceColor:d}},{"../../components/color":102,"../../components/fx":142,"../../constants/numerical":212,"../../lib":232,"../../plots/cartesian/axes":279,"../../registry":318,"./helpers":334}],336:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc").crossTraceCalc,colorbar:e("../scatter/marker_colorbar"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"bar",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":293,"../scatter/marker_colorbar":376,"./arrays_to_calcdata":327,"./attributes":328,"./calc":329,"./cross_trace_calc":331,"./defaults":332,"./event_data":333,"./hover":335,"./layout_attributes":337,"./layout_defaults":338,"./plot":339,"./select":340,"./style":342}],337:[function(e,t,r){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],338:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../plots/cartesian/axes"),i=e("../../lib"),o=e("./layout_attributes");t.exports=function(e,t,r){function l(r,n){return i.coerce(e,t,o,r,n)}for(var s=!1,c=!1,u=!1,d={},f=l("barmode"),p=0;p<r.length;p++){var h=r[p];if(n.traceIs(h,"bar")&&h.visible){if(s=!0,"group"===f){var m=h.xaxis+h.yaxis;d[m]&&(u=!0),d[m]=!0}if(h.visible&&"histogram"===h.type)"category"!==a.getFromId({_fullLayout:t},h["v"===h.orientation?"xaxis":"yaxis"]).type&&(c=!0)}}s?("overlay"!==f&&l("barnorm"),l("bargap",c&&!u?0:.2),l("bargroupgap")):delete t.barmode}},{"../../lib":232,"../../plots/cartesian/axes":279,"../../registry":318,"./layout_attributes":337}],339:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=e("../../lib/svg_text_utils"),l=e("../../components/color"),s=e("../../components/drawing"),c=e("../../registry"),u=e("../../plots/cartesian/axes").tickText,d=e("./uniform_text"),f=d.recordMinTextSize,p=d.clearMinTextSize,h=e("./style"),m=e("./helpers"),g=e("./constants"),v=e("./attributes"),y=v.text,x=v.textposition,b=e("../../components/fx/helpers").appendArrayPointValue,_=g.TEXTPAD;function w(e){return e.id}function T(e){if(e.ids)return w}function M(e,t){return e<t?1:-1}function k(e,t,r,n){var a;return!t.uniformtext.mode&&A(r)?(n&&(a=n()),e.transition().duration(r.duration).ease(r.easing).each("end",(function(){a&&a()})).each("interrupt",(function(){a&&a()}))):e}function A(e){return e&&e.duration>0}function L(e){return"auto"===e?0:e}function S(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function D(e,t,r,n,a,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,c=i.anchor||"end",u="end"===c,d="start"===c,f=((i.leftToRight||0)+1)/2,p=1-f,h=a.width,m=a.height,g=Math.abs(t-e),v=Math.abs(n-r),y=g>2*_&&v>2*_?_:0;g-=2*y,v-=2*y;var x=L(s);"auto"!==s||h<=g&&m<=v||!(h>g||m>v)||(h>v||m>g)&&h<m==g<v||(x+=90);var b=S(a,x),w=1;l&&(w=Math.min(1,g/b.x,v/b.y));var T=a.left*p+a.right*f,k=(a.top+a.bottom)/2,A=(e+_)*p+(t-_)*f,D=(r+n)/2,C=0,O=0;if(d||u){var P=(o?b.x:b.y)/2,I=o?M(e,t):M(r,n);o?d?(A=e+I*y,C=-I*P):(A=t-I*y,C=I*P):d?(D=r+I*y,O=-I*P):(D=n-I*y,O=I*P)}return{textX:T,textY:k,targetX:A,targetY:D,anchorX:C,anchorY:O,scale:w,rotate:x}}t.exports={plot:function(e,t,r,d,g,v){var w=t.xaxis,C=t.yaxis,O=e._fullLayout;g||(g={mode:O.barmode,norm:O.barmode,gap:O.bargap,groupgap:O.bargroupgap},p("bar",O));var P=i.makeTraceGroups(d,r,"trace bars").each((function(r){var c=n.select(this),d=r[0].trace,p="waterfall"===d.type,P="funnel"===d.type,I="bar"===d.type||P,R=0;p&&d.connector.visible&&"between"===d.connector.mode&&(R=d.connector.line.width/2);var z="h"===d.orientation,N=A(g),F=i.ensureSingle(c,"g","points"),E=T(d),j=F.selectAll("g.point").data(i.identity,E);j.enter().append("g").classed("point",!0),j.exit().remove(),j.each((function(c,p){var T,A,P=n.select(this),F=function(e,t,r,n){var a=[],i=[],o=n?t:r,l=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=l.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=l.c2p(e.p1,!0),n?[a,i]:[i,a]}(c,w,C,z),E=F[0][0],j=F[0][1],H=F[1][0],B=F[1][1],Y=0==(z?j-E:B-H);if(Y&&I&&m.getLineWidth(d,c)&&(Y=!1),Y||(Y=!(a(E)&&a(j)&&a(H)&&a(B))),c.isBlank=Y,Y&&(z?j=E:B=H),R&&!Y&&(z?(E-=M(E,j)*R,j+=M(E,j)*R):(H-=M(H,B)*R,B+=M(H,B)*R)),"waterfall"===d.type){if(!Y){var V=d[c.dir].marker;T=V.line.width,A=V.color}}else T=m.getLineWidth(d,c),A=c.mc||d.marker.color;function U(e){var t=n.round(T/2%1,2);return 0===g.gap&&0===g.groupgap?n.round(Math.round(e)-t,2):e}if(!e._context.staticPlot){var q=l.opacity(A)<1||T>.01?U:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?U(e):e>t?Math.ceil(e):Math.floor(e)};E=q(E,j,z),j=q(j,E,z),H=q(H,B,!z),B=q(B,H,!z)}var G=k(i.ensureSingle(P,"path"),O,g,v);if(G.style("vector-effect","non-scaling-stroke").attr("d",isNaN((j-E)*(B-H))||Y&&e._context.staticPlot?"M0,0Z":"M"+E+","+H+"V"+B+"H"+j+"V"+H+"Z").call(s.setClipUrl,t.layerClipId,e),!O.uniformtext.mode&&N){var Z=s.makePointStyleFns(d);s.singlePointStyle(c,G,d,Z,e)}!function(e,t,r,n,a,l,c,d,p,g,v){var w,T=t.xaxis,A=t.yaxis,C=e._fullLayout;function O(t,r,n){return i.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+w,"text-anchor":"middle","data-notex":1}).call(s.font,n).call(o.convertToTspans,e)}var P=n[0].trace,I="h"===P.orientation,R=function(e,t,r,n,a){var o,l=t[0].trace;o=l.texttemplate?function(e,t,r,n,a){var o=t[0].trace,l=i.castOption(o,r,"texttemplate");if(!l)return"";var s,c,d,f,p="waterfall"===o.type,h="funnel"===o.type;"h"===o.orientation?(s="y",c=a,d="x",f=n):(s="x",c=n,d="y",f=a);function m(e){return u(f,f.c2l(e),!0).text}var g=t[r],v={};v.label=g.p,v.labelLabel=v[s+"Label"]=(y=g.p,u(c,c.c2l(y),!0).text);var y;var x=i.castOption(o,g.i,"text");(0===x||x)&&(v.text=x);v.value=g.s,v.valueLabel=v[d+"Label"]=m(g.s);var _={};b(_,o,g.i),p&&(v.delta=+g.rawS||g.s,v.deltaLabel=m(v.delta),v.final=g.v,v.finalLabel=m(v.final),v.initial=v.final-v.delta,v.initialLabel=m(v.initial));h&&(v.value=g.s,v.valueLabel=m(v.value),v.percentInitial=g.begR,v.percentInitialLabel=i.formatPercent(g.begR),v.percentPrevious=g.difR,v.percentPreviousLabel=i.formatPercent(g.difR),v.percentTotal=g.sumR,v.percenTotalLabel=i.formatPercent(g.sumR));var w=i.castOption(o,g.i,"customdata");w&&(v.customdata=w);return i.texttemplateString(l,v,e._d3locale,_,v,o._meta||{})}(e,t,r,n,a):l.textinfo?function(e,t,r,n){var a=e[0].trace,o="h"===a.orientation,l="waterfall"===a.type,s="funnel"===a.type;function c(e){return u(o?r:n,+e,!0).text}var d,f=a.textinfo,p=e[t],h=f.split("+"),m=[],g=function(e){return-1!==h.indexOf(e)};g("label")&&m.push((v=e[t].p,u(o?n:r,v,!0).text));var v;g("text")&&(0===(d=i.castOption(a,p.i,"text"))||d)&&m.push(d);if(l){var y=+p.rawS||p.s,x=p.v,b=x-y;g("initial")&&m.push(c(b)),g("delta")&&m.push(c(y)),g("final")&&m.push(c(x))}if(s){g("value")&&m.push(c(p.s));var _=0;g("percent initial")&&_++,g("percent previous")&&_++,g("percent total")&&_++;var w=_>1;g("percent initial")&&(d=i.formatPercent(p.begR),w&&(d+=" of initial"),m.push(d)),g("percent previous")&&(d=i.formatPercent(p.difR),w&&(d+=" of previous"),m.push(d)),g("percent total")&&(d=i.formatPercent(p.sumR),w&&(d+=" of total"),m.push(d))}return m.join("<br>")}(t,r,n,a):m.getValue(l.text,r);return m.coerceString(y,o)}(C,n,a,T,A);w=function(e,t){var r=m.getValue(e.textposition,t);return m.coerceEnumerated(x,r)}(P,a);var z="stack"===g.mode||"relative"===g.mode,N=n[a],F=!z||N._outmost;if(!R||"none"===w||(N.isBlank||l===c||d===p)&&("auto"===w||"inside"===w))return void r.select("text").remove();var E=C.font,j=h.getBarColor(n[a],P),H=h.getInsideTextFont(P,a,E,j),B=h.getOutsideTextFont(P,a,E),Y=r.datum();I?"log"===T.type&&Y.s0<=0&&(l=T.range[0]<T.range[1]?0:T._length):"log"===A.type&&Y.s0<=0&&(d=A.range[0]<A.range[1]?A._length:0);var V,U,q,G,Z,W=Math.abs(c-l)-2*_,X=Math.abs(p-d)-2*_;"outside"===w&&(F||N.hasB||(w="inside"));if("auto"===w)if(F){w="inside",Z=i.ensureUniformFontSize(e,H),V=O(r,R,Z),U=s.bBox(V.node()),q=U.width,G=U.height;var J=q<=W&&G<=X,Q=q<=X&&G<=W,K=I?W>=q*(X/G):X>=G*(W/q);q>0&&G>0&&(J||Q||K)?w="inside":(w="outside",V.remove(),V=null)}else w="inside";if(!V){Z=i.ensureUniformFontSize(e,"outside"===w?B:H);var $=(V=O(r,R,Z)).attr("transform");if(V.attr("transform",""),U=s.bBox(V.node()),q=U.width,G=U.height,V.attr("transform",$),q<=0||G<=0)return void V.remove()}var ee,te,re=P.textangle;"outside"===w?(te="both"===P.constraintext||"outside"===P.constraintext,ee=function(e,t,r,n,a,i){var o,l=!!i.isHorizontal,s=!!i.constrained,c=i.angle||0,u=a.width,d=a.height,f=Math.abs(t-e),p=Math.abs(n-r);o=l?p>2*_?_:0:f>2*_?_:0;var h=1;s&&(h=l?Math.min(1,p/d):Math.min(1,f/u));var m=L(c),g=S(a,m),v=(l?g.x:g.y)/2,y=(a.left+a.right)/2,x=(a.top+a.bottom)/2,b=(e+t)/2,w=(r+n)/2,T=0,k=0,A=l?M(t,e):M(r,n);l?(b=t-A*o,T=A*v):(w=n+A*o,k=-A*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:k,scale:h,rotate:m}}(l,c,d,p,U,{isHorizontal:I,constrained:te,angle:re})):(te="both"===P.constraintext||"inside"===P.constraintext,ee=D(l,c,d,p,U,{isHorizontal:I,constrained:te,angle:re,anchor:P.insidetextanchor}));ee.fontSize=Z.size,f("histogram"===P.type?"bar":P.type,ee,C),N.transform=ee,k(V,C,g,v).attr("transform",i.getTextTransform(ee))}(e,t,P,r,p,E,j,H,B,g,v),t.layerClipId&&s.hideOutsideRangePoint(c,P.select("text"),w,C,d.xcalendar,d.ycalendar)}));var H=!1===d.cliponaxis;s.setClipUrl(c,H?null:t.layerClipId,e)}));c.getComponentMethod("errorbars","plot")(e,P,t,g)},toMoveInsideBar:D}},{"../../components/color":102,"../../components/drawing":124,"../../components/fx/helpers":138,"../../lib":232,"../../lib/svg_text_utils":255,"../../plots/cartesian/axes":279,"../../registry":318,"./attributes":328,"./constants":330,"./helpers":334,"./style":342,"./uniform_text":344,"@plotly/d3":11,"fast-isnumeric":17}],340:[function(e,t,r){"use strict";function n(e,t,r,n,a){var i=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),l=r.c2p(n?e.p0:e.s0,!0),s=r.c2p(n?e.p1:e.s1,!0);return a?[(i+o)/2,(l+s)/2]:n?[o,(l+s)/2]:[(i+o)/2,s]}t.exports=function(e,t){var r,a=e.cd,i=e.xaxis,o=e.yaxis,l=a[0].trace,s="funnel"===l.type,c="h"===l.orientation,u=[];if(!1===t)for(r=0;r<a.length;r++)a[r].selected=0;else for(r=0;r<a.length;r++){var d=a[r],f="ct"in d?d.ct:n(d,i,o,c,s);t.contains(f,!1,r,e)?(u.push({pointNumber:r,x:i.c2d(d.x),y:o.c2d(d.y)}),d.selected=1):d.selected=0}return u}},{}],341:[function(e,t,r){"use strict";t.exports=i;var n=e("../../lib").distinctVals,a=e("../../constants/numerical").BADNUM;function i(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=[],o=0;o<e.length;o++){for(var l=e[o],s=0;s<l.length;s++){var c=l[s];c.p!==a&&i.push(c.p)}l[0]&&l[0].width1&&(r=Math.min(l[0].width1,r))}this.positions=i;var u=n(i);this.distinctPositions=u.vals,1===u.vals.length&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(u.minDiff,r);var d=(t.posAxis||{}).type;"category"!==d&&"multicategory"!==d||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}i.prototype.put=function(e,t){var r=this.getLabel(e,t),n=this.bins[r]||0;return this.bins[r]=n+t,n},i.prototype.get=function(e,t){var r=this.getLabel(e,t);return this.bins[r]||0},i.prototype.getLabel=function(e,t){return(t<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?e:Math.round(e/this.binWidth))}},{"../../constants/numerical":212,"../../lib":232}],342:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../components/color"),i=e("../../components/drawing"),o=e("../../lib"),l=e("../../registry"),s=e("./uniform_text").resizeText,c=e("./attributes"),u=c.textfont,d=c.insidetextfont,f=c.outsidetextfont,p=e("./helpers");function h(e,t,r){i.pointStyle(e.selectAll("path"),t,r),m(e,t,r)}function m(e,t,r){e.selectAll("text").each((function(e){var a=n.select(this),l=o.ensureUniformFontSize(r,g(a,e,t,r));i.font(a,l)}))}function g(e,t,r,n){var a=n._fullLayout.font,i=r.textfont;if(e.classed("bartext-inside")){var o=_(t,r);i=y(r,t.i,a,o)}else e.classed("bartext-outside")&&(i=x(r,t.i,a));return i}function v(e,t,r){return b(u,e.textfont,t,r)}function y(e,t,r,n){var i=v(e,t,r);return(void 0===e._input.textfont||void 0===e._input.textfont.color||Array.isArray(e.textfont.color)&&void 0===e.textfont.color[t])&&(i={color:a.contrast(n),family:i.family,size:i.size}),b(d,e.insidetextfont,t,i)}function x(e,t,r){var n=v(e,t,r);return b(f,e.outsidetextfont,t,n)}function b(e,t,r,n){t=t||{};var a=p.getValue(t.family,r),i=p.getValue(t.size,r),o=p.getValue(t.color,r);return{family:p.coerceString(e.family,a,n.family),size:p.coerceNumber(e.size,i,n.size),color:p.coerceColor(e.color,o,n.color)}}function _(e,t){return"waterfall"===t.type?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}t.exports={style:function(e){var t=n.select(e).selectAll("g.barlayer").selectAll("g.trace");s(e,t,"bar");var r=t.size(),a=e._fullLayout;t.style("opacity",(function(e){return e[0].trace.opacity})).each((function(e){("stack"===a.barmode&&r>1||0===a.bargap&&0===a.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){h(n.select(this),t[0].trace,e)})),l.getComponentMethod("errorbars","style")(t)},styleTextPoints:m,styleOnSelect:function(e,t,r){var a=t[0].trace;a.selectedpoints?function(e,t,r){i.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var a,l=n.select(this);if(e.selected){a=o.ensureUniformFontSize(r,g(l,e,t,r));var s=t.selected.textfont&&t.selected.textfont.color;s&&(a.color=s),i.font(l,a)}else i.selectedTextStyle(l,t)}))}(e.selectAll("text"),t,r)}(r,a,e):(h(r,a,e),l.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:s}},{"../../components/color":102,"../../components/drawing":124,"../../lib":232,"../../registry":318,"./attributes":328,"./helpers":334,"./uniform_text":344,"@plotly/d3":11}],343:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults"),o=e("../../lib").coercePattern;t.exports=function(e,t,r,l,s){var c=r("marker.color",l),u=a(e,"marker");u&&i(e,t,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(e,"marker.line")&&i(e,t,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",c,u),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":102,"../../components/colorscale/defaults":112,"../../components/colorscale/helpers":113,"../../lib":232}],344:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib");function i(e){return"_"+e+"Text_minsize"}t.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=i(e),a=r.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=o<a,r[n]=r[n]||1/0,t.hide||(r[n]=Math.min(r[n],Math.max(o,a)))}},clearMinTextSize:function(e,t){t[i(e)]=void 0},resizeText:function(e,t,r){var i=e._fullLayout,o=i["_"+r+"Text_minsize"];if(o){var l,s="hide"===i.uniformtext.mode;switch(r){case"funnelarea":case"pie":case"sunburst":l="g.slice";break;case"treemap":case"icicle":l="g.slice, g.pathbar";break;default:l="g.points > g.point"}t.selectAll(l).each((function(e){var t=e.transform;t&&(t.scale=s&&t.hide?0:o/t.fontSize,n.select(this).select("text").attr("transform",a.getTextTransform(t)))}))}}}},{"../../lib":232,"@plotly/d3":11}],345:[function(e,t,r){"use strict";var n=e("../../plots/attributes"),a=e("../../plots/domain").attributes,i=e("../../plots/font_attributes"),o=e("../../components/color/attributes"),l=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,c=e("../../lib/extend").extendFlat,u=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:c({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},u,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},u,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:a({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"number",min:-360,max:360,dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:c({},u,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":101,"../../lib/extend":226,"../../plots/attributes":275,"../../plots/domain":309,"../../plots/font_attributes":310,"../../plots/template_attributes":317}],346:[function(e,t,r){"use strict";var n=e("../../plots/plots");r.name="pie",r.plot=function(e,t,a,i){n.plotBasePlot(r.name,e,t,a,i)},r.clean=function(e,t,a,i){n.cleanBasePlot(r.name,e,t,a,i)}},{"../../plots/plots":316}],347:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("tinycolor2"),i=e("../../components/color"),o={};function l(e){return function(t,r){return!!t&&(!!(t=a(t)).isValid()&&(t=i.addOpacity(t,t.getAlpha()),e[r]||(e[r]=t),t))}}function s(e,t){var r,n=JSON.stringify(e),i=t[n];if(!i){for(i=e.slice(),r=0;r<e.length;r++)i.push(a(e[r]).lighten(20).toHexString());for(r=0;r<e.length;r++)i.push(a(e[r]).darken(20).toHexString());t[n]=i}return i}t.exports={calc:function(e,t){var r,a,i=[],o=e._fullLayout,s=o.hiddenlabels||[],c=t.labels,u=t.marker.colors||[],d=t.values,f=t._length,p=t._hasValues&&f;if(t.dlabel)for(c=new Array(f),r=0;r<f;r++)c[r]=String(t.label0+r*t.dlabel);var h={},m=l(o["_"+t.type+"colormap"]),g=0,v=!1;for(r=0;r<f;r++){var y,x,b;if(p){if(y=d[r],!n(y))continue;if((y=+y)<0)continue}else y=1;void 0!==(x=c[r])&&""!==x||(x=r);var _=h[x=String(x)];void 0===_?(h[x]=i.length,(b=-1!==s.indexOf(x))||(g+=y),i.push({v:y,label:x,color:m(u[r],x),i:r,pts:[r],hidden:b})):(v=!0,(a=i[_]).v+=y,a.pts.push(r),a.hidden||(g+=y),!1===a.color&&u[r]&&(a.color=m(u[r],x)))}return("funnelarea"===t.type?v:t.sort)&&i.sort((function(e,t){return t.v-e.v})),i[0]&&(i[0].vTotal=g),i},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,i=n[r+"colorway"],l=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(i=s(i,o));for(var c=0,u=0;u<a.length;u++){var d=a[u];if(d[0].trace.type===r)for(var f=0;f<d.length;f++){var p=d[f];!1===p.color&&(l[p.label]?p.color=l[p.label]:(l[p.label]=p.color=i[c%i.length],c++))}}},makePullColorFn:l,generateExtendedColors:s}},{"../../components/color":102,"fast-isnumeric":17,tinycolor2:67}],348:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("./attributes"),o=e("../../plots/domain").defaults,l=e("../bar/defaults").handleText;function s(e,t){var r=Array.isArray(e),i=a.isArrayOrTypedArray(t),o=Math.min(r?e.length:1/0,i?t.length:1/0);if(isFinite(o)||(o=0),o&&i){for(var l,s=0;s<o;s++){var c=t[s];if(n(c)&&c>0){l=!0;break}}l||(o=0)}return{hasLabels:r,hasValues:i,len:o}}t.exports={handleLabelsAndValues:s,supplyDefaults:function(e,t,r,n){function c(r,n){return a.coerce(e,t,i,r,n)}var u=s(c("labels"),c("values")),d=u.len;if(t._hasLabels=u.hasLabels,t._hasValues=u.hasValues,!t._hasLabels&&t._hasValues&&(c("label0"),c("dlabel")),d){t._length=d,c("marker.line.width")&&c("marker.line.color"),c("marker.colors"),c("scalegroup");var f,p=c("text"),h=c("texttemplate");if(h||(f=c("textinfo",Array.isArray(p)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),h||f&&"none"!==f){var m=c("textposition");l(e,t,n,c,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(m)||"auto"===m||"outside"===m)&&c("automargin"),("inside"===m||"auto"===m||Array.isArray(m))&&c("insidetextorientation")}o(t,n,c);var g=c("hole");if(c("title.text")){var v=c("title.position",g?"middle center":"top center");g||"middle center"!==v||(t.title.position="top center"),a.coerceFont(c,"title.font",n.font)}c("sort"),c("direction"),c("rotation"),c("pull")}else t.visible=!1}}},{"../../lib":232,"../../plots/domain":309,"../bar/defaults":332,"./attributes":345,"fast-isnumeric":17}],349:[function(e,t,r){"use strict";var n=e("../../components/fx/helpers").appendArrayMultiPointValues;t.exports=function(e,t){var r={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return 1===e.pts.length&&(r.pointNumber=r.i=e.pts[0]),n(r,t,e.pts),"funnelarea"===t.type&&(delete r.v,delete r.i),r}},{"../../components/fx/helpers":138}],350:[function(e,t,r){"use strict";var n=e("../../lib");function a(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}r.formatPiePercent=function(e,t){var r=a((100*e).toPrecision(3));return n.numSeparate(r,t)+"%"},r.formatPieValue=function(e,t){var r=a(e.toPrecision(10));return n.numSeparate(r,t)},r.getFirstFilled=function(e,t){if(Array.isArray(e))for(var r=0;r<t.length;r++){var n=e[t[r]];if(n||0===n||""===n)return n}},r.castOption=function(e,t){return Array.isArray(e)?r.getFirstFilled(e,t):e||void 0},r.getRotationAngle=function(e){return("auto"===e?0:e)*Math.PI/180}},{"../../lib":232}],351:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,supplyLayoutDefaults:e("./layout_defaults"),layoutAttributes:e("./layout_attributes"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot").plot,style:e("./style"),styleOne:e("./style_one"),moduleType:"trace",name:"pie",basePlotModule:e("./base_plot"),categories:["pie-like","pie","showLegend"],meta:{}}},{"./attributes":345,"./base_plot":346,"./calc":347,"./defaults":348,"./layout_attributes":352,"./layout_defaults":353,"./plot":354,"./style":355,"./style_one":356}],352:[function(e,t,r){"use strict";t.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],353:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("hiddenlabels"),r("piecolorway",t.colorway),r("extendpiecolors")}},{"../../lib":232,"./layout_attributes":352}],354:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../plots/plots"),i=e("../../components/fx"),o=e("../../components/color"),l=e("../../components/drawing"),s=e("../../lib"),c=s.strScale,u=s.strTranslate,d=e("../../lib/svg_text_utils"),f=e("../bar/uniform_text"),p=f.recordMinTextSize,h=f.clearMinTextSize,m=e("../bar/constants").TEXTPAD,g=e("./helpers"),v=e("./event_data"),y=e("../../lib").isValidTextValue;function x(e,t,r){var a=r[0],o=a.cx,l=a.cy,c=a.trace,u="funnelarea"===c.type;"_hasHoverLabel"in c||(c._hasHoverLabel=!1),"_hasHoverEvent"in c||(c._hasHoverEvent=!1),e.on("mouseover",(function(e){var r=t._fullLayout,d=t._fullData[c.index];if(!t._dragging&&!1!==r.hovermode){var f=d.hoverinfo;if(Array.isArray(f)&&(f=i.castHoverinfo({hoverinfo:[g.castOption(f,e.pts)],_module:c._module},r,0)),"all"===f&&(f="label+text+value+percent+name"),d.hovertemplate||"none"!==f&&"skip"!==f&&f){var p=e.rInscribed||0,h=o+e.pxmid[0]*(1-p),m=l+e.pxmid[1]*(1-p),y=r.separators,x=[];if(f&&-1!==f.indexOf("label")&&x.push(e.label),e.text=g.castOption(d.hovertext||d.text,e.pts),f&&-1!==f.indexOf("text")){var b=e.text;s.isValidTextValue(b)&&x.push(b)}e.value=e.v,e.valueLabel=g.formatPieValue(e.v,y),f&&-1!==f.indexOf("value")&&x.push(e.valueLabel),e.percent=e.v/a.vTotal,e.percentLabel=g.formatPiePercent(e.percent,y),f&&-1!==f.indexOf("percent")&&x.push(e.percentLabel);var _=d.hoverlabel,w=_.font,T=[];i.loneHover({trace:c,x0:h-p*a.r,x1:h+p*a.r,y:m,_x0:u?o+e.TL[0]:h-p*a.r,_x1:u?o+e.TR[0]:h+p*a.r,_y0:u?l+e.TL[1]:m-p*a.r,_y1:u?l+e.BL[1]:m+p*a.r,text:x.join("<br>"),name:d.hovertemplate||-1!==f.indexOf("name")?d.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:g.castOption(_.bgcolor,e.pts)||e.color,borderColor:g.castOption(_.bordercolor,e.pts),fontFamily:g.castOption(w.family,e.pts),fontSize:g.castOption(w.size,e.pts),fontColor:g.castOption(w.color,e.pts),nameLength:g.castOption(_.namelength,e.pts),textAlign:g.castOption(_.align,e.pts),hovertemplate:g.castOption(d.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[v(e,d)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t,inOut_bbox:T}),e.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[v(e,d)],event:n.event})}})),e.on("mouseout",(function(e){var r=t._fullLayout,a=t._fullData[c.index],o=n.select(this).datum();c._hasHoverEvent&&(e.originalEvent=n.event,t.emit("plotly_unhover",{points:[v(o,a)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(i.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),e.on("click",(function(e){var r=t._fullLayout,a=t._fullData[c.index];t._dragging||!1===r.hovermode||(t._hoverdata=[v(e,a)],i.click(t,n.event))}))}function b(e,t,r){var n=g.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=g.castOption(e._input.textfont.color,t.pts));var a=g.castOption(e.insidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,i=g.castOption(e.insidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size;return{color:n||o.contrast(t.color),family:a,size:i}}function _(e,t){for(var r,n,a=0;a<e.length;a++)if((n=(r=e[a][0]).trace).title.text){var i=n.title.text;n._meta&&(i=s.templateString(i,n._meta));var o=l.tester.append("text").attr("data-notex",1).text(i).call(l.font,n.title.font).call(d.convertToTspans,t),c=l.bBox(o.node(),!0);r.titleBox={width:c.width,height:c.height},o.remove()}}function w(e,t,r){var n=r.r||t.rpx1,a=t.rInscribed;if(t.startangle===t.stopangle)return{rCenter:1-a,scale:0,rotate:0,textPosAngle:0};var i,o=t.ring,l=1===o&&Math.abs(t.startangle-t.stopangle)===2*Math.PI,s=t.halfangle,c=t.midangle,u=r.trace.insidetextorientation,d="horizontal"===u,f="tangential"===u,p="radial"===u,h="auto"===u,m=[];if(!h){var g,v=function(r,a){if(function(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r<t&&t<n}(t,r)){var l=Math.abs(r-t.startangle),s=Math.abs(r-t.stopangle),c=l<s?l:s;(i="tan"===a?M(e,n,o,c,0):T(e,n,o,c,Math.PI/2)).textPosAngle=r,m.push(i)}};if(d||f){for(g=4;g>=-4;g-=2)v(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)v(Math.PI*(g+1),"tan")}if(d||p){for(g=4;g>=-4;g-=2)v(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)v(Math.PI*(g+.5),"rad")}}if(l||h||d){var y=Math.sqrt(e.width*e.width+e.height*e.height);if((i={scale:a*n*2/y,rCenter:1-a,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,i.scale>=1)return i;m.push(i)}(h||p)&&((i=T(e,n,o,s,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(i)),(h||f)&&((i=M(e,n,o,s,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(i));for(var x=0,b=0,_=0;_<m.length;_++){var w=m[_].scale;if(b<w&&(b=w,x=_),!h&&b>=1)break}return m[x]}function T(e,t,r,n,a){t=Math.max(0,t-2*m);var i=e.width/e.height,o=L(i,n,t,r);return{scale:2*o/e.height,rCenter:k(i,o/t),rotate:A(a)}}function M(e,t,r,n,a){t=Math.max(0,t-2*m);var i=e.height/e.width,o=L(i,n,t,r);return{scale:2*o/e.width,rCenter:k(i,o/t),rotate:A(a+Math.PI/2)}}function k(e,t){return Math.cos(t)-e*t}function A(e){return(180/Math.PI*e+720)%180-90}function L(e,t,r,n){var a=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(a*a+.5)+a),n/(Math.sqrt(e*e+n/2)+e))}function S(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function D(e,t){var r=t.pxmid[0],n=t.pxmid[1],a=e.width/2,i=e.height/2;return r<0&&(a*=-1),n<0&&(i*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(i)*(a>0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function C(e,t){var r,n,a,i=e.trace,o={x:e.cx,y:e.cy},l={tx:0,ty:0};l.ty+=i.title.font.size,a=P(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*e.r,l.ty-=e.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*e.r);var s,c,u=(s=e.r,c=e.trace.aspectratio,s/(void 0===c?1:c)),d=t.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(d+=u,o.x-=(1+a)*u,l.tx+=e.titleBox.width/2):-1!==i.title.position.indexOf("center")?d*=2:-1!==i.title.position.indexOf("right")&&(d+=u,o.x+=(1+a)*u,l.tx-=e.titleBox.width/2),r=d/e.titleBox.width,n=O(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:l.tx,ty:l.ty}}function O(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function P(e){var t,r=e.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,t=0;t<e.pull.length;t++)e.pull[t]>r&&(r=e.pull[t]);return r}function I(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n][0],i=a.trace,o=i.domain,l=t.w*(o.x[1]-o.x[0]),s=t.h*(o.y[1]-o.y[0]);i.title.text&&"middle center"!==i.title.position&&(s-=O(a,t));var c=l/2,u=s/2;"funnelarea"!==i.type||i.scalegroup||(u/=i.aspectratio),a.r=Math.min(c,u)/(1+P(i)),a.cx=t.l+t.w*(i.domain.x[1]+i.domain.x[0])/2,a.cy=t.t+t.h*(1-i.domain.y[0])-s/2,i.title.text&&-1!==i.title.position.indexOf("bottom")&&(a.cy-=O(a,t)),i.scalegroup&&-1===r.indexOf(i.scalegroup)&&r.push(i.scalegroup)}!function(e,t){for(var r,n,a,i=0;i<t.length;i++){var o=1/0,l=t[i];for(n=0;n<e.length;n++)if(r=e[n][0],(a=r.trace).scalegroup===l){var s;if("pie"===a.type)s=r.r*r.r;else if("funnelarea"===a.type){var c,u;a.aspectratio>1?(c=r.r,u=c/a.aspectratio):(u=r.r,c=u*a.aspectratio),c*=(1+a.baseratio)/2,s=c*u}o=Math.min(o,s/r.vTotal)}for(n=0;n<e.length;n++)if(r=e[n][0],(a=r.trace).scalegroup===l){var d=o*r.vTotal;"funnelarea"===a.type&&(d/=(1+a.baseratio)/2,d/=a.aspectratio),r.r=Math.sqrt(d)}}}(e,r)}function R(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function z(e,t,r){var n=e._fullLayout,a=r.trace,i=a.texttemplate,o=a.textinfo;if(!i&&o&&"none"!==o){var l,c=o.split("+"),u=function(e){return-1!==c.indexOf(e)},d=u("label"),f=u("text"),p=u("value"),h=u("percent"),m=n.separators;if(l=d?[t.label]:[],f){var v=g.getFirstFilled(a.text,t.pts);y(v)&&l.push(v)}p&&l.push(g.formatPieValue(t.v,m)),h&&l.push(g.formatPiePercent(t.v/r.vTotal,m)),t.text=l.join("<br>")}if(i){var x=s.castOption(a,t.i,"texttemplate");if(x){var b=function(e){return{label:e.label,value:e.v,valueLabel:g.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:g.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:s.castOption(a,e.i,"customdata")}}(t),_=g.getFirstFilled(a.text,t.pts);(y(_)||""===_)&&(b.text=_),t.text=s.texttemplateString(x,b,e._fullLayout._d3locale,b,a._meta||{})}else t.text=""}}function N(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),a=Math.sin(r),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*n-o*a,e.textY=i*a+o*n,e.noCenter=!0}t.exports={plot:function(e,t){var r=e._fullLayout,i=r._size;h("pie",r),_(t,e),I(t,i);var f=s.makeTraceGroups(r._pielayer,t,"trace").each((function(t){var f=n.select(this),h=t[0],m=h.trace;!function(e){var t,r,n,a=e[0],i=a.r,o=a.trace,l=g.getRotationAngle(o.rotation),s=2*Math.PI/a.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;t<e.length&&e[t].hidden;t++);if(t===e.length)return;l+=s*e[t].v,s*=-1,c="px1",u="px0"}for(n=R(i,l),t=0;t<e.length;t++)(r=e[t]).hidden||(r[c]=n,r.startangle=l,l+=s*r.v/2,r.pxmid=R(i,l),r.midangle=l,l+=s*r.v/2,n=R(i,l),r.stopangle=l,r[u]=n,r.largeArc=r.v>a.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-o.hole,r.rInscribed=S(r,a))}(t),f.attr("stroke-linejoin","round"),f.each((function(){var v=n.select(this).selectAll("g.slice").data(t);v.enter().append("g").classed("slice",!0),v.exit().remove();var y=[[[],[]],[[],[]]],_=!1;v.each((function(a,i){if(a.hidden)n.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=m.index,y[a.pxmid[1]<0?0:1][a.pxmid[0]<0?0:1].push(a);var o=h.cx,c=h.cy,u=n.select(this),f=u.selectAll("path.surface").data([a]);if(f.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),u.call(x,e,t),m.pull){var v=+g.castOption(m.pull,a.pts)||0;v>0&&(o+=v*a.pxmid[0],c+=v*a.pxmid[1])}a.cxFinal=o,a.cyFinal=c;var T=m.hole;if(a.v===h.vTotal){var M="M"+(o+a.px0[0])+","+(c+a.px0[1])+C(a.px0,a.pxmid,!0,1)+C(a.pxmid,a.px0,!0,1)+"Z";T?f.attr("d","M"+(o+T*a.px0[0])+","+(c+T*a.px0[1])+C(a.px0,a.pxmid,!1,T)+C(a.pxmid,a.px0,!1,T)+"Z"+M):f.attr("d",M)}else{var k=C(a.px0,a.px1,!0,1);if(T){var A=1-T;f.attr("d","M"+(o+T*a.px1[0])+","+(c+T*a.px1[1])+C(a.px1,a.px0,!1,T)+"l"+A*a.px0[0]+","+A*a.px0[1]+k+"Z")}else f.attr("d","M"+o+","+c+"l"+a.px0[0]+","+a.px0[1]+k+"Z")}z(e,a,h);var L=g.castOption(m.textposition,a.pts),S=u.selectAll("g.slicetext").data(a.text&&"none"!==L?[0]:[]);S.enter().append("g").classed("slicetext",!0),S.exit().remove(),S.each((function(){var u=s.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),f=s.ensureUniformFontSize(e,"outside"===L?function(e,t,r){var n=g.castOption(e.outsidetextfont.color,t.pts)||g.castOption(e.textfont.color,t.pts)||r.color,a=g.castOption(e.outsidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,i=g.castOption(e.outsidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size;return{color:n,family:a,size:i}}(m,a,r.font):b(m,a,r.font));u.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,f).call(d.convertToTspans,e);var v,y=l.bBox(u.node());if("outside"===L)v=D(y,a);else if(v=w(y,a,h),"auto"===L&&v.scale<1){var x=s.ensureUniformFontSize(e,m.outsidetextfont);u.call(l.font,x),v=D(y=l.bBox(u.node()),a)}var T=v.textPosAngle,M=void 0===T?a.pxmid:R(h.r,T);if(v.targetX=o+M[0]*v.rCenter+(v.x||0),v.targetY=c+M[1]*v.rCenter+(v.y||0),N(v,y),v.outside){var k=v.targetY;a.yLabelMin=k-y.height/2,a.yLabelMid=k,a.yLabelMax=k+y.height/2,a.labelExtraX=0,a.labelExtraY=0,_=!0}v.fontSize=f.size,p(m.type,v,r),t[i].transform=v,u.attr("transform",s.getTextTransform(v))}))}function C(e,t,r,n){var i=n*(t[0]-e[0]),o=n*(t[1]-e[1]);return"a"+n*h.r+","+n*h.r+" 0 "+a.largeArc+(r?" 1 ":" 0 ")+i+","+o}}));var T=n.select(this).selectAll("g.titletext").data(m.title.text?[0]:[]);if(T.enter().append("g").classed("titletext",!0),T.exit().remove(),T.each((function(){var t,r=s.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),a=m.title.text;m._meta&&(a=s.templateString(a,m._meta)),r.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,m.title.font).call(d.convertToTspans,e),t="middle center"===m.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(h):C(h,i),r.attr("transform",u(t.x,t.y)+c(Math.min(1,t.scale))+u(t.tx,t.ty))})),_&&function(e,t){var r,n,a,i,o,l,s,c,u,d,f,p,h;function m(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}function y(e,r){r||(r={});var a,c,u,f,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),h=n?e.yLabelMin:e.yLabelMax,m=n?e.yLabelMax:e.yLabelMin,v=e.cyFinal+o(e.px0[1],e.px1[1]),y=p-h;if(y*s>0&&(e.labelExtraY=y),Array.isArray(t.pull))for(c=0;c<d.length;c++)(u=d[c])===e||(g.castOption(t.pull,e.pts)||0)>=(g.castOption(t.pull,u.pts)||0)||((e.pxmid[1]-u.pxmid[1])*s>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-h-e.labelExtraY)*s>0&&(e.labelExtraY+=y):(m+e.labelExtraY-v)*s>0&&(a=3*l*Math.abs(c-d.indexOf(e)),(f=u.cxFinal+i(u.px0[0],u.px1[0])+a-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=f)))}for(n=0;n<2;n++)for(a=n?m:v,o=n?Math.max:Math.min,s=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,l=r?1:-1,(c=e[n][r]).sort(a),u=e[1-n][r],d=u.concat(c),p=[],f=0;f<c.length;f++)void 0!==c[f].yLabelMid&&p.push(c[f]);for(h=!1,f=0;n&&f<u.length;f++)if(void 0!==u[f].yLabelMid){h=u[f];break}for(f=0;f<p.length;f++){var x=f&&p[f-1];h&&!f&&(x=h),y(p[f],x)}}}(y,m),function(e,t){e.each((function(e){var r=n.select(this);if(e.labelExtraX||e.labelExtraY){var a=r.select("g.slicetext text");e.transform.targetX+=e.labelExtraX,e.transform.targetY+=e.labelExtraY,a.attr("transform",s.getTextTransform(e.transform));var i=e.cxFinal+e.pxmid[0],l="M"+i+","+(e.cyFinal+e.pxmid[1]),c=(e.yLabelMax-e.yLabelMin)*(e.pxmid[0]<0?-1:1)/4;if(e.labelExtraX){var u=e.labelExtraX*e.pxmid[1]/e.pxmid[0],d=e.yLabelMid+e.labelExtraY-(e.cyFinal+e.pxmid[1]);Math.abs(u)>Math.abs(d)?l+="l"+d*e.pxmid[0]/e.pxmid[1]+","+d+"H"+(i+e.labelExtraX+c):l+="l"+e.labelExtraX+","+u+"v"+(d-u)+"h"+c}else l+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;s.ensureSingle(r,"path","textline").call(o.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:l,fill:"none"})}else r.select("path.textline").remove()}))}(v,m),_&&m.automargin){var M=l.bBox(f.node()),k=m.domain,A=i.w*(k.x[1]-k.x[0]),L=i.h*(k.y[1]-k.y[0]),S=(.5*A-h.r)/i.w,O=(.5*L-h.r)/i.h;a.autoMargin(e,"pie."+m.uid+".automargin",{xl:k.x[0]-S,xr:k.x[1]+S,yb:k.y[0]-O,yt:k.y[1]+O,l:Math.max(h.cx-h.r-M.left,0),r:Math.max(M.right-(h.cx+h.r),0),b:Math.max(M.bottom-(h.cy+h.r),0),t:Math.max(h.cy-h.r-M.top,0),pad:5})}}))}));setTimeout((function(){f.selectAll("tspan").each((function(){var e=n.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:z,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:C,prerenderTitles:_,layoutAreas:I,attachFxHandlers:x,computeTransform:N}},{"../../components/color":102,"../../components/drawing":124,"../../components/fx":142,"../../lib":232,"../../lib/svg_text_utils":255,"../../plots/plots":316,"../bar/constants":330,"../bar/uniform_text":344,"./event_data":349,"./helpers":350,"@plotly/d3":11}],355:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("./style_one"),i=e("../bar/uniform_text").resizeText;t.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");i(e,t,"pie"),t.each((function(e){var t=e[0].trace,r=n.select(this);r.style({opacity:t.opacity}),r.selectAll("path.surface").each((function(e){n.select(this).call(a,e,t)}))}))}},{"../bar/uniform_text":344,"./style_one":356,"@plotly/d3":11}],356:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("./helpers").castOption;t.exports=function(e,t,r){var i=r.marker.line,o=a(i.color,t.pts)||n.defaultLine,l=a(i.width,t.pts)||0;e.style("stroke-width",l).call(n.fill,t.color).call(n.stroke,o)}},{"../../components/color":102,"./helpers":350}],357:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){for(var r=0;r<e.length;r++)e[r].i=r;n.mergeArray(t.text,e,"tx"),n.mergeArray(t.texttemplate,e,"txt"),n.mergeArray(t.hovertext,e,"htx"),n.mergeArray(t.customdata,e,"data"),n.mergeArray(t.textposition,e,"tp"),t.textfont&&(n.mergeArrayCastPositive(t.textfont.size,e,"ts"),n.mergeArray(t.textfont.color,e,"tc"),n.mergeArray(t.textfont.family,e,"tf"));var a=t.marker;if(a){n.mergeArrayCastPositive(a.size,e,"ms"),n.mergeArrayCastPositive(a.opacity,e,"mo"),n.mergeArray(a.symbol,e,"mx"),n.mergeArray(a.color,e,"mc");var i=a.line;a.line&&(n.mergeArray(i.color,e,"mlc"),n.mergeArrayCastPositive(i.width,e,"mlw"));var o=a.gradient;o&&"none"!==o.type&&(n.mergeArray(o.type,e,"mgt"),n.mergeArray(o.color,e,"mgc"))}}},{"../../lib":232}],358:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,a=e("../../plots/template_attributes").texttemplateAttrs,i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../components/colorscale/attributes"),l=e("../../plots/font_attributes"),s=e("../../components/drawing/attributes").dash,c=e("../../components/drawing"),u=e("./constants"),d=e("../../lib/extend").extendFlat;t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:{valType:"any",dflt:0,editType:"calc"},yperiod:{valType:"any",dflt:0,editType:"calc"},xperiod0:{valType:"any",editType:"calc"},yperiod0:{valType:"any",editType:"calc"},xperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},yperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},xhoverformat:n("x"),yhoverformat:n("y"),stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:a({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:i({},{keys:u.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:d({},s,{editType:"style"}),simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:{valType:"color",editType:"style",anim:!0},marker:d({symbol:{valType:"enumerated",values:c.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:d({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},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,editType:"calc"},textfont:l({editType:"calc",colorEditType:"style",arrayOk:!0})}},{"../../components/colorscale/attributes":109,"../../components/drawing":124,"../../components/drawing/attributes":123,"../../lib/extend":226,"../../plots/cartesian/axis_format_attributes":282,"../../plots/font_attributes":310,"../../plots/template_attributes":317,"./constants":362}],359:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../plots/cartesian/align_period"),l=e("../../constants/numerical").BADNUM,s=e("./subtypes"),c=e("./colorscale_calc"),u=e("./arrays_to_calcdata"),d=e("./calc_selection");function f(e,t,r,n,a,o,l){var c=t._length,u=e._fullLayout,d=r._id,f=n._id,p=u._firstScatter[m(t)]===t.uid,h=(g(t,u,r,n)||{}).orientation,v=t.fill;r._minDtick=0,n._minDtick=0;var y={padded:!0},x={padded:!0};l&&(y.ppad=x.ppad=l);var b=c<2||a[0]!==a[c-1]||o[0]!==o[c-1];b&&("tozerox"===v||"tonextx"===v&&(p||"h"===h))?y.tozero=!0:(t.error_y||{}).visible||"tonexty"!==v&&"tozeroy"!==v&&(s.hasMarkers(t)||s.hasText(t))||(y.padded=!1,y.ppad=0),b&&("tozeroy"===v||"tonexty"===v&&(p||"v"===h))?x.tozero=!0:"tonextx"!==v&&"tozerox"!==v||(x.padded=!1),d&&(t._extremes[d]=i.findExtremes(r,a,y)),f&&(t._extremes[f]=i.findExtremes(n,o,x))}function p(e,t){if(s.hasMarkers(e)){var r,n=e.marker,o=1.6*(e.marker.sizeref||1);if(r="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.isArrayOrTypedArray(n.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]=r(c[d]);return u}return r(n.size)}}function h(e,t){var r=m(t),n=e._firstScatter;n[r]||(n[r]=t.uid)}function m(e){var t=e.stackgroup;return e.xaxis+e.yaxis+e.type+(t?"-"+t:"")}function g(e,t,r,n){var a=e.stackgroup;if(a){var i=t._scatterStackOpts[r._id+n._id][a],o="v"===i.orientation?n:r;return"linear"===o.type||"log"===o.type?i:void 0}}t.exports={calc:function(e,t){var r,s,m,v,y,x,b=e._fullLayout,_=i.getFromId(e,t.xaxis||"x"),w=i.getFromId(e,t.yaxis||"y"),T=_.makeCalcdata(t,"x"),M=w.makeCalcdata(t,"y"),k=o(t,_,"x",T),A=o(t,w,"y",M),L=k.vals,S=A.vals,D=t._length,C=new Array(D),O=t.ids,P=g(t,b,_,w),I=!1;h(b,t);var R,z="x",N="y";P?(a.pushUnique(P.traceIndices,t._expandedIndex),(r="v"===P.orientation)?(N="s",R="x"):(z="s",R="y"),y="interpolate"===P.stackgaps):f(e,t,_,w,L,S,p(t,D));var F=!!t.xperiodalignment,E=!!t.yperiodalignment;for(s=0;s<D;s++){var j=C[s]={},H=n(L[s]),B=n(S[s]);H&&B?(j[z]=L[s],j[N]=S[s],F&&(j.orig_x=T[s],j.xEnd=k.ends[s],j.xStart=k.starts[s]),E&&(j.orig_y=M[s],j.yEnd=A.ends[s],j.yStart=A.starts[s])):P&&(r?H:B)?(j[R]=r?L[s]:S[s],j.gap=!0,y?(j.s=l,I=!0):j.s=0):j[z]=j[N]=l,O&&(j.id=String(O[s]))}if(u(C,t),c(e,t),d(C,t),P){for(s=0;s<C.length;)C[s][R]===l?C.splice(s,1):s++;if(a.sort(C,(function(e,t){return e[R]-t[R]||e.i-t.i})),I){for(s=0;s<C.length-1&&C[s].gap;)s++;for((x=C[s].s)||(x=C[s].s=0),m=0;m<s;m++)C[m].s=x;for(v=C.length-1;v>s&&C[v].gap;)v--;for(x=C[v].s,m=C.length-1;m>v;m--)C[m].s=x;for(;s<v;)if(C[++s].gap){for(m=s+1;C[m].gap;)m++;for(var Y=C[s-1][R],V=C[s-1].s,U=(C[m].s-V)/(C[m][R]-Y);s<m;)C[s].s=V+(C[s][R]-Y)*U,s++}}}return C},calcMarkerSize:p,calcAxisExpansion:f,setFirstScatter:h,getStackOpts:g}},{"../../constants/numerical":212,"../../lib":232,"../../plots/cartesian/align_period":276,"../../plots/cartesian/axes":279,"./arrays_to_calcdata":357,"./calc_selection":360,"./colorscale_calc":361,"./subtypes":383,"fast-isnumeric":17}],360:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(e,t)}},{"../../lib":232}],361:[function(e,t,r){"use strict";var n=e("../../components/colorscale/helpers").hasColorscale,a=e("../../components/colorscale/calc"),i=e("./subtypes");t.exports=function(e,t){i.hasLines(t)&&n(t,"line")&&a(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),i.hasMarkers(t)&&(n(t,"marker")&&a(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),n(t,"marker.line")&&a(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},{"../../components/colorscale/calc":110,"../../components/colorscale/helpers":113,"./subtypes":383}],362:[function(e,t,r){"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},{}],363:[function(e,t,r){"use strict";var n=e("./calc");function a(e,t,r,n,a,i,o){a[n]=!0;var l={i:null,gap:!0,s:0};if(l[o]=r,e.splice(t,0,l),t&&r===e[t-1][o]){var s=e[t-1];l.s=s.s,l.i=s.i,l.gap=s.gap}else i&&(l.s=function(e,t,r,n){var a=e[t-1],i=e[t+1];return i?a?a.s+(i.s-a.s)*(r-a[n])/(i[n]-a[n]):i.s:a.s}(e,t,r,o));t||(e[0].t=e[1].t,e[0].trace=e[1].trace,delete e[1].t,delete e[1].trace)}t.exports=function(e,t){var r=t.xaxis,i=t.yaxis,o=r._id+i._id,l=e._fullLayout._scatterStackOpts[o];if(l){var s,c,u,d,f,p,h,m,g,v,y,x,b,_,w,T=e.calcdata;for(var M in l){var k=(v=l[M]).traceIndices;if(k.length){for(y="interpolate"===v.stackgaps,x=v.groupnorm,"v"===v.orientation?(b="x",_="y"):(b="y",_="x"),w=new Array(k.length),s=0;s<w.length;s++)w[s]=!1;p=T[k[0]];var A=new Array(p.length);for(s=0;s<p.length;s++)A[s]=p[s][b];for(s=1;s<k.length;s++){for(f=T[k[s]],c=u=0;c<f.length;c++){for(h=f[c][b];h>A[u]&&u<A.length;u++)a(f,c,A[u],s,w,y,b),c++;if(h!==A[u]){for(d=0;d<s;d++)a(T[k[d]],u,h,d,w,y,b);A.splice(u,0,h)}u++}for(;u<A.length;u++)a(f,c,A[u],s,w,y,b),c++}var L=A.length;for(c=0;c<p.length;c++){for(m=p[c][_]=p[c].s,s=1;s<k.length;s++)(f=T[k[s]])[0].trace._rawLength=f[0].trace._length,f[0].trace._length=L,m+=f[c].s,f[c][_]=m;if(x)for(g=("fraction"===x?m:m/100)||1,s=0;s<k.length;s++){var S=T[k[s]][c];S[_]/=g,S.sNorm=S.s/g}}for(s=0;s<k.length;s++){var D=(f=T[k[s]])[0].trace,C=n.calcMarkerSize(D,D._rawLength),O=Array.isArray(C);if(C&&w[s]||O){var P=C;for(C=new Array(L),c=0;c<L;c++)C[c]=f[c].gap?0:O?P[f[c].i]:P}var I=new Array(L),R=new Array(L);for(c=0;c<L;c++)I[c]=f[c].x,R[c]=f[c].y;n.calcAxisExpansion(e,D,r,i,I,R,C),f[0].t.orientation=v.orientation}}}}}},{"./calc":359}],364:[function(e,t,r){"use strict";t.exports=function(e){for(var t=0;t<e.length;t++){var r=e[t];if("scatter"===r.type){var n=r.fill;if("none"!==n&&"toself"!==n&&(r.opacity=void 0,"tonexty"===n||"tonextx"===n))for(var a=t-1;a>=0;a--){var i=e[a];if("scatter"===i.type&&i.xaxis===r.xaxis&&i.yaxis===r.yaxis){i.opacity=void 0;break}}}}}},{}],365:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("./attributes"),o=e("./constants"),l=e("./subtypes"),s=e("./xy_defaults"),c=e("./period_defaults"),u=e("./stack_defaults"),d=e("./marker_defaults"),f=e("./line_defaults"),p=e("./line_shape_defaults"),h=e("./text_defaults"),m=e("./fillcolor_defaults");t.exports=function(e,t,r,g){function v(r,a){return n.coerce(e,t,i,r,a)}var y=s(e,t,g,v);if(y||(t.visible=!1),t.visible){c(e,t,g,v),v("xhoverformat"),v("yhoverformat");var x=u(e,t,g,v),b=!x&&y<o.PTS_LINESONLY?"lines+markers":"lines";v("text"),v("hovertext"),v("mode",b),l.hasLines(t)&&(f(e,t,r,g,v),p(e,t,v),v("connectgaps"),v("line.simplify")),l.hasMarkers(t)&&d(e,t,r,g,v,{gradient:!0}),l.hasText(t)&&(v("texttemplate"),h(e,t,g,v));var _=[];(l.hasMarkers(t)||l.hasText(t))&&(v("cliponaxis"),v("marker.maxdisplayed"),_.push("points")),v("fill",x?x.fillDflt:"none"),"none"!==t.fill&&(m(e,t,r,v),l.hasLines(t)||p(e,t,v));var w=(t.line||{}).color,T=(t.marker||{}).color;"tonext"!==t.fill&&"toself"!==t.fill||_.push("fills"),v("hoveron",_.join("+")||"points"),"fills"!==t.hoveron&&v("hovertemplate");var M=a.getComponentMethod("errorbars","supplyDefaults");M(e,t,w||T||r,{axis:"y"}),M(e,t,w||T||r,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,v)}}},{"../../lib":232,"../../registry":318,"./attributes":358,"./constants":362,"./fillcolor_defaults":366,"./line_defaults":371,"./line_shape_defaults":373,"./marker_defaults":377,"./period_defaults":378,"./stack_defaults":381,"./subtypes":383,"./text_defaults":384,"./xy_defaults":385}],366:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,r,i){var o=!1;if(t.marker){var l=t.marker.color,s=(t.marker.line||{}).color;l&&!a(l)?o=l:s&&!a(s)&&(o=s)}i("fillcolor",n.addOpacity((t.line||{}).color||o||r,.5))}},{"../../components/color":102,"../../lib":232}],367:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes");t.exports=function(e,t,r){var a={},i={_fullLayout:r},o=n.getFromTrace(i,t,"x"),l=n.getFromTrace(i,t,"y");return a.xLabel=n.tickText(o,o.c2l(e.x),!0).text,a.yLabel=n.tickText(l,l.c2l(e.y),!0).text,a}},{"../../plots/cartesian/axes":279}],368:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("./subtypes");t.exports=function(e,t){var r,i;if("lines"===e.mode)return(r=e.line.color)&&n.opacity(r)?r:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var o=t.mcc||(e.marker||{}).color,l=t.mlcc||((e.marker||{}).line||{}).color;return(i=o&&n.opacity(o)?o:l&&n.opacity(l)&&(t.mlw||((e.marker||{}).line||{}).width)?l:"")?n.opacity(i)<.3?n.addOpacity(i,.3):i:(r=(e.line||{}).color)&&n.opacity(r)&&a.hasLines(e)&&e.line.width?r:e.fillcolor}},{"../../components/color":102,"./subtypes":383}],369:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/fx"),i=e("../../registry"),o=e("./get_trace_color"),l=e("../../components/color"),s=n.fillText;t.exports=function(e,t,r,c){var u=e.cd,d=u[0].trace,f=e.xa,p=e.ya,h=f.c2p(t),m=p.c2p(r),g=[h,m],v=d.hoveron||"",y=-1!==d.mode.indexOf("markers")?3:.5,x=!!d.xperiodalignment,b=!!d.yperiodalignment;if(-1!==v.indexOf("points")){var _=function(e){var t=Math.max(y,e.mrc||0),r=f.c2p(e.x)-h,n=p.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+n*n)-t,1-y/t)},w=a.getDistanceFunction(c,(function(e){if(x){var t=f.c2p(e.xStart),r=f.c2p(e.xEnd);return h>=Math.min(t,r)&&h<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(f.c2p(e.x)-h);return i<n?a*i/n:i-n+a}),(function(e){if(b){var t=p.c2p(e.yStart),r=p.c2p(e.yEnd);return m>=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(p.c2p(e.y)-m);return i<n?a*i/n:i-n+a}),_);if(a.getClosest(u,w,e),!1!==e.index){var T=u[e.index],M=f.c2p(T.x,!0),k=p.c2p(T.y,!0),A=T.mrc||1;e.index=T.i;var L=u[0].t.orientation,S=L&&(T.sNorm||T.s),D="h"===L?S:void 0!==T.orig_x?T.orig_x:T.x,C="v"===L?S:void 0!==T.orig_y?T.orig_y:T.y;return n.extendFlat(e,{color:o(d,T),x0:M-A,x1:M+A,xLabelVal:D,y0:k-A,y1:k+A,yLabelVal:C,spikeDistance:_(T),hovertemplate:d.hovertemplate}),s(T,d,e),i.getComponentMethod("errorbars","hoverInfo")(T,d,e),[e]}}if(-1!==v.indexOf("fills")&&d._polygons){var O,P,I,R,z,N,F,E,j,H=d._polygons,B=[],Y=!1,V=1/0,U=-1/0,q=1/0,G=-1/0;for(O=0;O<H.length;O++)(I=H[O]).contains(g)&&(Y=!Y,B.push(I),q=Math.min(q,I.ymin),G=Math.max(G,I.ymax));if(Y){var Z=((q=Math.max(q,0))+(G=Math.min(G,p._length)))/2;for(O=0;O<B.length;O++)for(R=B[O].pts,P=1;P<R.length;P++)(E=R[P-1][1])>Z!=(j=R[P][1])>=Z&&(N=R[P-1][0],F=R[P][0],j-E&&(z=N+(F-N)*(Z-E)/(j-E),V=Math.min(V,z),U=Math.max(U,z)));V=Math.max(V,0),U=Math.min(U,f._length);var W=l.defaultLine;return l.opacity(d.fillcolor)?W=d.fillcolor:l.opacity((d.line||{}).color)&&(W=d.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:V,x1:U,y0:Z,y1:Z,color:W,hovertemplate:!1}),delete e.index,d.text&&!Array.isArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}}},{"../../components/color":102,"../../components/fx":142,"../../lib":232,"../../registry":318,"./get_trace_color":368}],370:[function(e,t,r){"use strict";var n=e("./subtypes");t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./cross_trace_calc"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot"),colorbar:e("./marker_colorbar"),formatLabels:e("./format_labels"),style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":293,"./arrays_to_calcdata":357,"./attributes":358,"./calc":359,"./cross_trace_calc":363,"./cross_trace_defaults":364,"./defaults":365,"./format_labels":367,"./hover":369,"./marker_colorbar":376,"./plot":379,"./select":380,"./style":382,"./subtypes":383}],371:[function(e,t,r){"use strict";var n=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults");t.exports=function(e,t,r,o,l,s){var c=(e.marker||{}).color;(l("line.color",r),a(e,"line"))?i(e,t,o,l,{prefix:"line.",cLetter:"c"}):l("line.color",!n(c)&&c||r);l("line.width"),(s||{}).noDash||l("line.dash")}},{"../../components/colorscale/defaults":112,"../../components/colorscale/helpers":113,"../../lib":232}],372:[function(e,t,r){"use strict";var n=e("../../constants/numerical"),a=n.BADNUM,i=n.LOG_CLIP,o=i+.5,l=i-.5,s=e("../../lib"),c=s.segmentsIntersect,u=s.constrain,d=e("./constants");t.exports=function(e,t){var r,n,i,f,p,h,m,g,v,y,x,b,_,w,T,M,k,A,L=t.xaxis,S=t.yaxis,D="log"===L.type,C="log"===S.type,O=L._length,P=S._length,I=t.connectGaps,R=t.baseTolerance,z=t.shape,N="linear"===z,F=t.fill&&"none"!==t.fill,E=[],j=d.minTolerance,H=e.length,B=new Array(H),Y=0;function V(r){var n=e[r];if(!n)return!1;var i=t.linearized?L.l2p(n.x):L.c2p(n.x),s=t.linearized?S.l2p(n.y):S.c2p(n.y);if(i===a){if(D&&(i=L.c2p(n.x,!0)),i===a)return!1;C&&s===a&&(i*=Math.abs(L._m*P*(L._m>0?o:l)/(S._m*O*(S._m>0?o:l)))),i*=1e3}if(s===a){if(C&&(s=S.c2p(n.y,!0)),s===a)return!1;s*=1e3}return[i,s]}function U(e,t,r,n){var a=r-e,i=n-t,o=.5-e,l=.5-t,s=a*a+i*i,c=a*o+i*l;if(c>0&&c<s){var u=o*i-l*a;if(u*u<s)return!0}}function q(e,t){var r=e[0]/O,n=e[1]/P,a=Math.max(0,-r,r-1,-n,n-1);return a&&void 0!==k&&U(r,n,k,A)&&(a=0),a&&t&&U(r,n,t[0]/O,t[1]/P)&&(a=0),(1+d.toleranceGrowth*a)*R}function G(e,t){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)}var Z,W,X,J,Q,K,$,ee=d.maxScreensAway,te=-O*ee,re=O*(1+ee),ne=-P*ee,ae=P*(1+ee),ie=[[te,ne,re,ne],[re,ne,re,ae],[re,ae,te,ae],[te,ae,te,ne]];function oe(e){if(e[0]<te||e[0]>re||e[1]<ne||e[1]>ae)return[u(e[0],te,re),u(e[1],ne,ae)]}function le(e,t){return e[0]===t[0]&&(e[0]===te||e[0]===re)||(e[1]===t[1]&&(e[1]===ne||e[1]===ae)||void 0)}function se(e,t,r){return function(n,a){var i=oe(n),o=oe(a),l=[];if(i&&o&&le(i,o))return l;i&&l.push(i),o&&l.push(o);var c=2*s.constrain((n[e]+a[e])/2,t,r)-((i||n)[e]+(o||a)[e]);c&&((i&&o?c>0==i[e]>o[e]?i:o:i||o)[e]+=c);return l}}function ce(e){var t=e[0],r=e[1],n=t===B[Y-1][0],a=r===B[Y-1][1];if(!n||!a)if(Y>1){var i=t===B[Y-2][0],o=r===B[Y-2][1];n&&(t===te||t===re)&&i?o?Y--:B[Y-1]=e:a&&(r===ne||r===ae)&&o?i?Y--:B[Y-1]=e:B[Y++]=e}else B[Y++]=e}function ue(e){B[Y-1][0]!==e[0]&&B[Y-1][1]!==e[1]&&ce([X,J]),ce(e),Q=null,X=J=0}function de(e){if(k=e[0]/O,A=e[1]/P,Z=e[0]<te?te:e[0]>re?re:0,W=e[1]<ne?ne:e[1]>ae?ae:0,Z||W){if(Y)if(Q){var t=$(Q,e);t.length>1&&(ue(t[0]),B[Y++]=t[1])}else K=$(B[Y-1],e)[0],B[Y++]=K;else B[Y++]=[Z||e[0],W||e[1]];var r=B[Y-1];Z&&W&&(r[0]!==Z||r[1]!==W)?(Q&&(X!==Z&&J!==W?ce(X&&J?(n=Q,i=(a=e)[0]-n[0],o=(a[1]-n[1])/i,(n[1]*a[0]-a[1]*n[0])/i>0?[o>0?te:re,ae]:[o>0?re:te,ne]):[X||Z,J||W]):X&&J&&ce([X,J])),ce([Z,W])):X-Z&&J-W&&ce([Z||X,W||J]),Q=e,X=Z,J=W}else Q&&ue($(Q,e)[0]),B[Y++]=e;var n,a,i,o}for("linear"===z||"spline"===z?$=function(e,t){for(var r=[],n=0,a=0;a<4;a++){var i=ie[a],o=c(e[0],e[1],t[0],t[1],i[0],i[1],i[2],i[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&G(o,e)<G(r[0],e)?r.unshift(o):r.push(o),n++)}return r}:"hv"===z||"vh"===z?$=function(e,t){var r=[],n=oe(e),a=oe(t);return n&&a&&le(n,a)||(n&&r.push(n),a&&r.push(a)),r}:"hvh"===z?$=se(0,te,re):"vhv"===z&&($=se(1,ne,ae)),r=0;r<H;r++)if(n=V(r)){for(Y=0,Q=null,de(n),r++;r<H;r++){if(!(f=V(r))){if(I)continue;break}if(N&&t.simplify){var fe=V(r+1);if(y=G(f,n),F&&(0===Y||Y===H-1)||!(y<q(f,fe)*j)){for(g=[(f[0]-n[0])/y,(f[1]-n[1])/y],p=n,x=y,b=w=T=0,m=!1,i=f,r++;r<e.length;r++){if(h=fe,fe=V(r+1),!h){if(I)continue;break}if(M=(v=[h[0]-n[0],h[1]-n[1]])[0]*g[1]-v[1]*g[0],w=Math.min(w,M),(T=Math.max(T,M))-w>q(h,fe))break;i=h,(_=v[0]*g[0]+v[1]*g[1])>x?(x=_,f=h,m=!1):_<b&&(b=_,p=h,m=!0)}if(m?(de(f),i!==p&&de(p)):(p!==n&&de(p),i!==f&&de(f)),de(i),r>=e.length||!h)break;de(h),n=h}}else de(f)}Q&&ce([X||Q[0],J||Q[1]]),E.push(B.slice(0,Y))}return E}},{"../../constants/numerical":212,"../../lib":232,"./constants":362}],373:[function(e,t,r){"use strict";t.exports=function(e,t,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],374:[function(e,t,r){"use strict";var n={tonextx:1,tonexty:1,tonext:1};t.exports=function(e,t,r){var a,i,o,l,s,c={},u=!1,d=-1,f=0,p=-1;for(i=0;i<r.length;i++)(o=(a=r[i][0].trace).stackgroup||"")?o in c?s=c[o]:(s=c[o]=f,f++):a.fill in n&&p>=0?s=p:(s=p=f,f++),s<d&&(u=!0),a._groupIndex=d=s;var h=r.slice();u&&h.sort((function(e,t){var r=e[0].trace,n=t[0].trace;return r._groupIndex-n._groupIndex||r.index-n.index}));var m={};for(i=0;i<h.length;i++)o=(a=h[i][0].trace).stackgroup||"",!0===a.visible?(a._nexttrace=null,a.fill in n&&(l=m[o],a._prevtrace=l||null,l&&(l._nexttrace=a)),a._ownfill=a.fill&&("tozero"===a.fill.substr(0,6)||"toself"===a.fill||"to"===a.fill.substr(0,2)&&!a._prevtrace),m[o]=a):a._prevtrace=a._nexttrace=a._ownfill=null;return h}},{}],375:[function(e,t,r){"use strict";var n=e("fast-isnumeric");t.exports=function(e,t){t||(t=2);var r=e.marker,a=r.sizeref||1,i=r.sizemin||0,o="area"===r.sizemode?function(e){return Math.sqrt(e/a)}:function(e){return e/a};return function(e){var r=o(e/t);return n(r)&&r>0?Math.max(r,i):0}}},{"fast-isnumeric":17}],376:[function(e,t,r){"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},{}],377:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults"),o=e("./subtypes");t.exports=function(e,t,r,l,s,c){var u=o.isBubble(e),d=(e.line||{}).color;(c=c||{},d&&(r=d),s("marker.symbol"),s("marker.opacity",u?.7:1),s("marker.size"),s("marker.color",r),a(e,"marker")&&i(e,t,l,s,{prefix:"marker.",cLetter:"c"}),c.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),c.noLine||(s("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:u?n.background:n.defaultLine),a(e,"marker.line")&&i(e,t,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",u?1:0)),u&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),c.gradient)&&("none"!==s("marker.gradient.type")&&s("marker.gradient.color"))}},{"../../components/color":102,"../../components/colorscale/defaults":112,"../../components/colorscale/helpers":113,"./subtypes":383}],378:[function(e,t,r){"use strict";var n=e("../../lib").dateTick0,a=e("../../constants/numerical").ONEWEEK;function i(e,t){return n(t,e%a==0?1:0)}t.exports=function(e,t,r,n,a){if(a||(a={x:!0,y:!0}),a.x){var o=n("xperiod");o&&(n("xperiod0",i(o,t.xcalendar)),n("xperiodalignment"))}if(a.y){var l=n("yperiod");l&&(n("yperiod0",i(l,t.ycalendar)),n("yperiodalignment"))}}},{"../../constants/numerical":212,"../../lib":232}],379:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../registry"),i=e("../../lib"),o=i.ensureSingle,l=i.identity,s=e("../../components/drawing"),c=e("./subtypes"),u=e("./line_points"),d=e("./link_traces"),f=e("../../lib/polygon").tester;function p(e,t,r,d,p,h,m){var g;!function(e,t,r,a,o){var l=r.xaxis,s=r.yaxis,u=n.extent(i.simpleMap(l.range,l.r2c)),d=n.extent(i.simpleMap(s.range,s.r2c)),f=a[0].trace;if(!c.hasMarkers(f))return;var p=f.marker.maxdisplayed;if(0===p)return;var h=a.filter((function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=d[0]&&e.y<=d[1]})),m=Math.ceil(h.length/p),g=0;o.forEach((function(e,r){var n=e[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<t&&g++}));var v=Math.round(g*m/3+Math.floor(g/3)*m/7.1);a.forEach((function(e){delete e.vis})),h.forEach((function(e,t){0===Math.round((t+v)%m)&&(e.vis=!0)}))}(0,t,r,d,p);var v=!!m&&m.duration>0;function y(e){return v?e.transition():e}var x=r.xaxis,b=r.yaxis,_=d[0].trace,w=_.line,T=n.select(h),M=o(T,"g","errorbars"),k=o(T,"g","lines"),A=o(T,"g","points"),L=o(T,"g","text");if(a.getComponentMethod("errorbars","plot")(e,M,r,m),!0===_.visible){var S,D;y(T).style("opacity",_.opacity);var C=_.fill.charAt(_.fill.length-1);"x"!==C&&"y"!==C&&(C=""),d[0][r.isRangePlot?"nodeRangePlot3":"node3"]=T;var O,P,I="",R=[],z=_._prevtrace;z&&(I=z._prevRevpath||"",D=z._nextFill,R=z._polygons);var N,F,E,j,H,B,Y,V="",U="",q=[],G=i.noop;if(S=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(D&&D.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(N=s.steps(w.shape),F=s.steps(w.shape.split("").reverse().join(""))):N=F="spline"===w.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),w.smoothing):s.smoothopen(e,w.smoothing)}:function(e){return"M"+e.join("L")},E=function(e){return F(e.reverse())},q=u(d,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:_.fill}),Y=_._polygons=new Array(q.length),g=0;g<q.length;g++)_._polygons[g]=f(q[g]);q.length&&(j=q[0][0],B=(H=q[q.length-1])[H.length-1]),G=function(e){return function(t){if(O=N(t),P=E(t),V?C?(V+="L"+O.substr(1),U=P+"L"+U.substr(1)):(V+="Z"+O,U=P+"Z"+U):(V=O,U=P),c.hasLines(_)&&t.length>1){var r=n.select(this);if(r.datum(d),e)y(r.style("opacity",0).attr("d",O).call(s.lineGroupStyle)).style("opacity",1);else{var a=y(r);a.attr("d",O),s.singleLineStyle(d,a)}}}}}var Z=k.selectAll(".js-line").data(q);y(Z.exit()).style("opacity",0).remove(),Z.each(G(!1)),Z.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(s.lineGroupStyle).each(G(!0)),s.setClipUrl(Z,r.layerClipId,e),q.length?(S?(S.datum(d),j&&B&&(C?("y"===C?j[1]=B[1]=b.c2p(0,!0):"x"===C&&(j[0]=B[0]=x.c2p(0,!0)),y(S).attr("d","M"+B+"L"+j+"L"+V.substr(1)).call(s.singleFillStyle)):y(S).attr("d",V+"Z").call(s.singleFillStyle))):D&&("tonext"===_.fill.substr(0,6)&&V&&I?("tonext"===_.fill?y(D).attr("d",V+"Z"+I+"Z").call(s.singleFillStyle):y(D).attr("d",V+"L"+I.substr(1)+"Z").call(s.singleFillStyle),_._polygons=_._polygons.concat(R)):(X(D),_._polygons=null)),_._prevRevpath=U,_._prevPolygons=Y):(S?X(S):D&&X(D),_._polygons=_._prevRevpath=_._prevPolygons=null),A.datum(d),L.datum(d),function(t,a,i){var o,u=i[0].trace,d=c.hasMarkers(u),f=c.hasText(u),p=ee(u),h=te,m=te;if(d||f){var g=l,_=u.stackgroup,w=_&&"infer zero"===e._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?g=w?Q:J:_&&!w&&(g=K),d&&(h=g),f&&(m=g)}var T,M=(o=t.selectAll("path.point").data(h,p)).enter().append("path").classed("point",!0);v&&M.call(s.pointStyle,u,e).call(s.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),d&&(T=s.makePointStyleFns(u)),o.each((function(t){var a=n.select(this),i=y(a);s.translatePoint(t,i,x,b)?(s.singlePointStyle(t,i,u,T,e),r.layerClipId&&s.hideOutsideRangePoint(t,i,x,b,u.xcalendar,u.ycalendar),u.customdata&&a.classed("plotly-customdata",null!==t.data&&void 0!==t.data)):i.remove()})),v?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=a.selectAll("g").data(m,p)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(e){var t=n.select(this),a=y(t.select("text"));s.translatePoint(e,a,x,b)?r.layerClipId&&s.hideOutsideRangePoint(e,t,x,b,u.xcalendar,u.ycalendar):t.remove()})),o.selectAll("text").call(s.textPointStyle,u,e).each((function(e){var t=x.c2p(e.x),r=b.c2p(e.y);n.select(this).selectAll("tspan.line").each((function(){y(n.select(this)).attr({x:t,y:r})}))})),o.exit().remove()}(A,L,d);var W=!1===_.cliponaxis?null:r.layerClipId;s.setClipUrl(A,W,e),s.setClipUrl(L,W,e)}function X(e){y(e).attr("d","M0,0Z")}function J(e){return e.filter((function(e){return!e.gap&&e.vis}))}function Q(e){return e.filter((function(e){return e.vis}))}function K(e){return e.filter((function(e){return!e.gap}))}function $(e){return e.id}function ee(e){if(e.ids)return $}function te(){return!1}}t.exports=function(e,t,r,a,i,c){var u,f,h=!i,m=!!i&&i.duration>0,g=d(e,t,r);((u=a.selectAll("g.trace").data(g,(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),u.order(),function(e,t,r){t.each((function(t){var a=o(n.select(this),"g","fills");s.setClipUrl(a,r.layerClipId,e);var i=t[0].trace,c=[];i._ownfill&&c.push("_ownFill"),i._nexttrace&&c.push("_nextFill");var u=a.selectAll("g").data(c,l);u.enter().append("g"),u.exit().each((function(e){i[e]=null})).remove(),u.order().each((function(e){i[e]=o(n.select(this),"path","js-fill")}))}))}(e,u,t),m)?(c&&(f=c()),n.transition().duration(i.duration).ease(i.easing).each("end",(function(){f&&f()})).each("interrupt",(function(){f&&f()})).each((function(){a.selectAll("g.trace").each((function(r,n){p(e,n,t,r,g,this,i)}))}))):u.each((function(r,n){p(e,n,t,r,g,this,i)}));h&&u.exit().remove(),a.selectAll("path:not([d])").remove()}},{"../../components/drawing":124,"../../lib":232,"../../lib/polygon":244,"../../registry":318,"./line_points":372,"./link_traces":374,"./subtypes":383,"@plotly/d3":11}],380:[function(e,t,r){"use strict";var n=e("./subtypes");t.exports=function(e,t){var r,a,i,o,l=e.cd,s=e.xaxis,c=e.yaxis,u=[],d=l[0].trace;if(!n.hasMarkers(d)&&!n.hasText(d))return[];if(!1===t)for(r=0;r<l.length;r++)l[r].selected=0;else for(r=0;r<l.length;r++)a=l[r],i=s.c2p(a.x),o=c.c2p(a.y),null!==a.i&&t.contains([i,o],!1,r,e)?(u.push({pointNumber:a.i,x:s.c2d(a.x),y:c.c2d(a.y)}),a.selected=1):a.selected=0;return u}},{"./subtypes":383}],381:[function(e,t,r){"use strict";var n=["orientation","groupnorm","stackgaps"];t.exports=function(e,t,r,a){var i=r._scatterStackOpts,o=a("stackgroup");if(o){var l=t.xaxis+t.yaxis,s=i[l];s||(s=i[l]={});var c=s[o],u=!1;c?c.traces.push(t):(c=s[o]={traceIndices:[],traces:[t]},u=!0);for(var d={orientation:t.x&&!t.y?"h":"v"},f=0;f<n.length;f++){var p=n[f],h=p+"Found";if(!c[h]){var m=void 0!==e[p],g="orientation"===p;if((m||u)&&(c[p]=a(p,d[p]),g&&(c.fillDflt="h"===c[p]?"tonextx":"tonexty"),m&&(c[h]=!0,!u&&(delete c.traces[0][p],g))))for(var v=0;v<c.traces.length-1;v++){var y=c.traces[v];y._input.fill!==y.fill&&(y.fill=c.fillDflt)}}}return c}}},{}],382:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../components/drawing"),i=e("../../registry");function o(e,t,r){a.pointStyle(e.selectAll("path.point"),t,r)}function l(e,t,r){a.textPointStyle(e.selectAll("text"),t,r)}t.exports={style:function(e){var t=n.select(e).selectAll("g.trace.scatter");t.style("opacity",(function(e){return e[0].trace.opacity})),t.selectAll("g.points").each((function(t){o(n.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.text").each((function(t){l(n.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.trace path.js-line").call(a.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(a.fillGroupStyle),i.getComponentMethod("errorbars","style")(t)},stylePoints:o,styleText:l,styleOnSelect:function(e,t,r){var n=t[0].trace;n.selectedpoints?(a.selectedPointStyle(r.selectAll("path.point"),n),a.selectedTextStyle(r.selectAll("text"),n)):(o(r,n,e),l(r,n,e))}}},{"../../components/drawing":124,"../../registry":318,"@plotly/d3":11}],383:[function(e,t,r){"use strict";var n=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 n.isPlainObject(e.marker)&&n.isArrayOrTypedArray(e.marker.size)}}},{"../../lib":232}],384:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t,r,a,i){i=i||{},a("textposition"),n.coerceFont(a,"textfont",r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}},{"../../lib":232}],385:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry");t.exports=function(e,t,r,i){var o,l=i("x"),s=i("y");if(a.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],r),l){var c=n.minRowLength(l);s?o=Math.min(c,n.minRowLength(s)):(o=c,i("y0"),i("dy"))}else{if(!s)return 0;o=n.minRowLength(s),i("x0"),i("dx")}return t._length=o,o}},{"../../lib":232,"../../registry":318}],386:[function(e,t,r){"use strict";var n=e("../plots/cartesian/axes"),a=e("../lib"),i=e("../plot_api/plot_schema"),o=e("./helpers").pointsAccessorFunction,l=e("../constants/numerical").BADNUM;r.moduleType="transform",r.name="aggregate";var s=r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},c=s.aggregations;function u(e,t,r,i){if(i.enabled){for(var o=i.target,s=a.nestedProperty(t,o),c=s.get(),u=function(e,t){var r=e.func,n=t.d2c,i=t.c2d;switch(r){case"count":return d;case"first":return f;case"last":return p;case"sum":return function(e,t){for(var r=0,a=0;a<t.length;a++){var o=n(e[t[a]]);o!==l&&(r+=o)}return i(r)};case"avg":return function(e,t){for(var r=0,a=0,o=0;o<t.length;o++){var s=n(e[t[o]]);s!==l&&(r+=s,a++)}return a?i(r/a):l};case"min":return function(e,t){for(var r=1/0,a=0;a<t.length;a++){var o=n(e[t[a]]);o!==l&&(r=Math.min(r,o))}return r===1/0?l:i(r)};case"max":return function(e,t){for(var r=-1/0,a=0;a<t.length;a++){var o=n(e[t[a]]);o!==l&&(r=Math.max(r,o))}return r===-1/0?l:i(r)};case"range":return function(e,t){for(var r=1/0,a=-1/0,o=0;o<t.length;o++){var s=n(e[t[o]]);s!==l&&(r=Math.min(r,s),a=Math.max(a,s))}return a===-1/0||r===1/0?l:i(a-r)};case"change":return function(e,t){var r=n(e[t[0]]),a=n(e[t[t.length-1]]);return r===l||a===l?l:i(a-r)};case"median":return function(e,t){for(var r=[],o=0;o<t.length;o++){var s=n(e[t[o]]);s!==l&&r.push(s)}if(!r.length)return l;r.sort(a.sorterAsc);var c=(r.length-1)/2;return i((r[Math.floor(c)]+r[Math.ceil(c)])/2)};case"mode":return function(e,t){for(var r={},a=0,o=l,s=0;s<t.length;s++){var c=n(e[t[s]]);if(c!==l){var u=r[c]=(r[c]||0)+1;u>a&&(a=u,o=c)}}return a?i(o):l};case"rms":return function(e,t){for(var r=0,a=0,o=0;o<t.length;o++){var s=n(e[t[o]]);s!==l&&(r+=s*s,a++)}return a?i(Math.sqrt(r/a)):l};case"stddev":return function(t,r){var a,i=0,o=0,s=1,c=l;for(a=0;a<r.length&&c===l;a++)c=n(t[r[a]]);if(c===l)return l;for(;a<r.length;a++){var u=n(t[r[a]]);if(u!==l){var d=u-c;i+=d,o+=d*d,s++}}var f="sample"===e.funcmode?s-1:s;return f?Math.sqrt((o-i*i/s)/f):0}}}(i,n.getDataConversions(e,t,o,c)),h=new Array(r.length),m=0;m<r.length;m++)h[m]=u(c,r[m]);s.set(h),"count"===i.func&&a.pushUnique(t._arrayAttrs,o)}}function d(e,t){return t.length}function f(e,t){return e[t[0]]}function p(e,t){return e[t[t.length-1]]}r.supplyDefaults=function(e,t){var r,n={};function o(t,r){return a.coerce(e,n,s,t,r)}if(!o("enabled"))return n;var l=i.findArrayAttributes(t),u={};for(r=0;r<l.length;r++)u[l[r]]=1;var d=o("groups");if(!Array.isArray(d)){if(!u[d])return n.enabled=!1,n;u[d]=0}var f,p=e.aggregations||[],h=n.aggregations=new Array(p.length);function m(e,t){return a.coerce(p[r],f,c,e,t)}for(r=0;r<p.length;r++){f={_index:r};var g=m("target"),v=m("func");m("enabled")&&g&&(u[g]||"count"===v&&void 0===u[g])?("stddev"===v&&m("funcmode"),u[g]=0,h[r]=f):h[r]={enabled:!1,_index:r}}for(r=0;r<l.length;r++)u[l[r]]&&h.push({target:l[r],func:c.func.dflt,enabled:!0,_index:-1});return n},r.calcTransform=function(e,t,r){if(r.enabled){var n=r.groups,i=a.getTargetArray(t,{target:n});if(i){var l,s,c,d,f={},p={},h=[],m=o(t.transforms,r),g=i.length;for(t._length&&(g=Math.min(g,t._length)),l=0;l<g;l++)void 0===(c=f[s=i[l]])?(f[s]=h.length,d=[l],h.push(d),p[f[s]]=m(l)):(h[c].push(l),p[f[s]]=(p[f[s]]||[]).concat(m(l)));r._indexToPoints=p;var v=r.aggregations;for(l=0;l<v.length;l++)u(e,t,h,v[l]);"string"==typeof n&&u(e,t,h,{target:n,func:"first",enabled:!0}),t._length=h.length}}}},{"../constants/numerical":212,"../lib":232,"../plot_api/plot_schema":267,"../plots/cartesian/axes":279,"./helpers":389}],387:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../registry"),i=e("../plots/cartesian/axes"),o=e("./helpers").pointsAccessorFunction,l=e("../constants/filter_ops"),s=l.COMPARISON_OPS,c=l.INTERVAL_OPS,u=l.SET_OPS;r.moduleType="transform",r.name="filter",r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},operation:{valType:"enumerated",values:[].concat(s).concat(c).concat(u),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},r.supplyDefaults=function(e){var t={};function i(a,i){return n.coerce(e,t,r.attributes,a,i)}if(i("enabled")){var o=i("target");if(n.isArrayOrTypedArray(o)&&0===o.length)return t.enabled=!1,t;i("preservegaps"),i("operation"),i("value");var l=a.getComponentMethod("calendars","handleDefaults");l(e,t,"valuecalendar",null),l(e,t,"targetcalendar",null)}return t},r.calcTransform=function(e,t,r){if(r.enabled){var a=n.getTargetArray(t,r);if(a){var l=r.target,d=a.length;t._length&&(d=Math.min(d,t._length));var f=r.targetcalendar,p=t._arrayAttrs,h=r.preservegaps;if("string"==typeof l){var m=n.nestedProperty(t,l+"calendar").get();m&&(f=m)}var g,v,y=function(e,t,r){var n=e.operation,a=e.value,i=Array.isArray(a);function o(e){return-1!==e.indexOf(n)}var l,d=function(r){return t(r,0,e.valuecalendar)},f=function(e){return t(e,0,r)};o(s)?l=d(i?a[0]:a):o(c)?l=i?[d(a[0]),d(a[1])]:[d(a),d(a)]:o(u)&&(l=i?a.map(d):[d(a)]);switch(n){case"=":return function(e){return f(e)===l};case"!=":return function(e){return f(e)!==l};case"<":return function(e){return f(e)<l};case"<=":return function(e){return f(e)<=l};case">":return function(e){return f(e)>l};case">=":return function(e){return f(e)>=l};case"[]":return function(e){var t=f(e);return t>=l[0]&&t<=l[1]};case"()":return function(e){var t=f(e);return t>l[0]&&t<l[1]};case"[)":return function(e){var t=f(e);return t>=l[0]&&t<l[1]};case"(]":return function(e){var t=f(e);return t>l[0]&&t<=l[1]};case"][":return function(e){var t=f(e);return t<=l[0]||t>=l[1]};case")(":return function(e){var t=f(e);return t<l[0]||t>l[1]};case"](":return function(e){var t=f(e);return t<=l[0]||t>l[1]};case")[":return function(e){var t=f(e);return t<l[0]||t>=l[1]};case"{}":return function(e){return-1!==l.indexOf(f(e))};case"}{":return function(e){return-1===l.indexOf(f(e))}}}(r,i.getDataToCoordFunc(e,t,l,a),f),x={},b={},_=0;h?(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set(new Array(d))},v=function(e,t){var r=x[e.astr][t];e.get()[t]=r}):(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set([])},v=function(e,t){var r=x[e.astr][t];e.get().push(r)}),M(g);for(var w=o(t.transforms,r),T=0;T<d;T++){y(a[T])?(M(v,T),b[_++]=w(T)):h&&_++}r._indexToPoints=b,t._length=_}}function M(e,r){for(var a=0;a<p.length;a++){e(n.nestedProperty(t,p[a]),r)}}}},{"../constants/filter_ops":210,"../lib":232,"../plots/cartesian/axes":279,"../registry":318,"./helpers":389}],388:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plot_api/plot_schema"),i=e("../plots/plots"),o=e("./helpers").pointsAccessorFunction;function l(e,t){var r,l,s,c,u,d,f,p,h,m,g=t.transform,v=t.transformIndex,y=e.transforms[v].groups,x=o(e.transforms,g);if(!n.isArrayOrTypedArray(y)||0===y.length)return[e];var b=n.filterUnique(y),_=new Array(b.length),w=y.length,T=a.findArrayAttributes(e),M=g.styles||[],k={};for(r=0;r<M.length;r++)k[M[r].target]=M[r].value;g.styles&&(m=n.keyedContainer(g,"styles","target","value.name"));var A={},L={};for(r=0;r<b.length;r++){A[d=b[r]]=r,L[d]=0,(f=_[r]=n.extendDeepNoArrays({},e))._group=d,f.transforms[v]._indexToPoints={};var S=null;for(m&&(S=m.get(d)),f.name=S||""===S?S:n.templateString(g.nameformat,{trace:e.name,group:d}),p=f.transforms,f.transforms=[],l=0;l<p.length;l++)f.transforms[l]=n.extendDeepNoArrays({},p[l]);for(l=0;l<T.length;l++)n.nestedProperty(f,T[l]).set([])}for(s=0;s<T.length;s++){for(c=T[s],l=0,h=[];l<b.length;l++)h[l]=n.nestedProperty(_[l],c).get();for(u=n.nestedProperty(e,c).get(),l=0;l<w;l++)h[A[y[l]]].push(u[l])}for(l=0;l<w;l++){(f=_[A[y[l]]]).transforms[v]._indexToPoints[L[y[l]]]=x(l),L[y[l]]++}for(r=0;r<b.length;r++)d=b[r],f=_[r],i.clearExpandedTraceDefaultColors(f),f=n.extendDeepNoArrays(f,k[d]||{});return _}r.moduleType="transform",r.name="groupby",r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},r.supplyDefaults=function(e,t,a){var i,o={};function l(t,a){return n.coerce(e,o,r.attributes,t,a)}if(!l("enabled"))return o;l("groups"),l("nameformat",a._dataLength>1?"%{group} (%{trace})":"%{group}");var s=e.styles,c=o.styles=[];if(s)for(i=0;i<s.length;i++){var u=c[i]={};n.coerce(s[i],c[i],r.attributes.styles,"target");var d=n.coerce(s[i],c[i],r.attributes.styles,"value");n.isPlainObject(d)?u.value=n.extendDeep({},d):d&&delete u.value}return o},r.transform=function(e,t){var r,n,a,i=[];for(n=0;n<e.length;n++)for(r=l(e[n],t),a=0;a<r.length;a++)i.push(r[a]);return i}},{"../lib":232,"../plot_api/plot_schema":267,"../plots/plots":316,"./helpers":389}],389:[function(e,t,r){"use strict";r.pointsAccessorFunction=function(e,t){for(var r,n,a=0;a<e.length&&(r=e[a])!==t;a++)r._indexToPoints&&!1!==r.enabled&&(n=r._indexToPoints);return n?function(e){return n[e]}:function(e){return[e]}}},{}],390:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plots/cartesian/axes"),i=e("./helpers").pointsAccessorFunction,o=e("../constants/numerical").BADNUM;r.moduleType="transform",r.name="sort",r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc"},editType:"calc"},r.supplyDefaults=function(e){var t={};function a(a,i){return n.coerce(e,t,r.attributes,a,i)}return a("enabled")&&(a("target"),a("order")),t},r.calcTransform=function(e,t,r){if(r.enabled){var l=n.getTargetArray(t,r);if(l){var s=r.target,c=l.length;t._length&&(c=Math.min(c,t._length));var u,d,f=t._arrayAttrs,p=function(e,t,r,n){var a,i=new Array(n),l=new Array(n);for(a=0;a<n;a++)i[a]={v:t[a],i:a};for(i.sort(function(e,t){switch(e.order){case"ascending":return function(e,r){var n=t(e.v),a=t(r.v);return n===o?1:a===o?-1:n-a};case"descending":return function(e,r){var n=t(e.v),a=t(r.v);return n===o?1:a===o?-1:a-n}}}(e,r)),a=0;a<n;a++)l[a]=i[a].i;return l}(r,l,a.getDataToCoordFunc(e,t,s,l),c),h=i(t.transforms,r),m={};for(u=0;u<f.length;u++){var g=n.nestedProperty(t,f[u]),v=g.get(),y=new Array(c);for(d=0;d<c;d++)y[d]=v[p[d]];g.set(y)}for(d=0;d<c;d++)m[d]=h(p[d]);r._indexToPoints=m,t._length=c}}}},{"../constants/numerical":212,"../lib":232,"../plots/cartesian/axes":279,"./helpers":389}],391:[function(e,t,r){"use strict";r.version="2.7.0"},{}]},{},[8])(8)}));