mybuddy/static/babybuddy/js/graph.js

1 line
1.2 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!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(){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:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",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":299}],2:[function(e,t,r){"use strict";t.exports=e("../src/transforms/aggregate")},{"../src/transforms/aggregate":556}],3:[function(e,t,r){"use strict";t.exports=e("../src/traces/bar")},{"../src/traces/bar":405}],4:[function(e,t,r){"use strict";t.exports=e("../src/traces/box")},{"../src/traces/box":420}],5:[function(e,t,r){"use strict";t.exports=e("../src/components/calendars")},{"../src/components/calendars":156}],6:[function(e,t,r){"use strict";t.exports=e("../src/traces/contour")},{"../src/traces/contour":440}],7:[function(e,t,r){"use strict";t.exports=e("../src/core")},{"../src/core":281}],8:[function(e,t,r){"use strict";t.exports=e("../src/transforms/filter")},{"../src/transforms/filter":557}],9:[function(e,t,r){"use strict";t.exports=e("../src/transforms/groupby")},{"../src/transforms/groupby":558}],10:[function(e,t,r){"use strict";t.exports=e("../src/traces/heatmap")},{"../src/traces/heatmap":456}],11:[function(e,t,r){"use strict";t.exports=e("../src/traces/histogram")},{"../src/traces/histogram":475}],12:[function(e,t,r){"use strict";t.exports=e("../src/traces/histogram2d")},{"../src/traces/histogram2d":481}],13:[function(e,t,r){"use strict";t.exports=e("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":485}],14:[function(e,t,r){"use strict";t.exports=e("../src/traces/image")},{"../src/traces/image":493}],15:[function(e,t,r){"use strict";var n=e("./core");n.register([e("./bar"),e("./box"),e("./heatmap"),e("./histogram"),e("./histogram2d"),e("./histogram2dcontour"),e("./contour"),e("./scatterternary"),e("./violin"),e("./image"),e("./pie"),e("./aggregate"),e("./filter"),e("./groupby"),e("./sort"),e("./calendars")]),t.exports=n},{"./aggregate":2,"./bar":3,"./box":4,"./calendars":5,"./contour":6,"./core":7,"./filter":8,"./groupby":9,"./heatmap":10,"./histogram":11,"./histogram2d":12,"./histogram2dcontour":13,"./image":14,"./pie":16,"./scatterternary":17,"./sort":18,"./violin":19}],16:[function(e,t,r){"use strict";t.exports=e("../src/traces/pie")},{"../src/traces/pie":502}],17:[function(e,t,r){"use strict";t.exports=e("../src/traces/scatterternary")},{"../src/traces/scatterternary":543}],18:[function(e,t,r){"use strict";t.exports=e("../src/transforms/sort")},{"../src/transforms/sort":560}],19:[function(e,t,r){"use strict";t.exports=e("../src/traces/violin")},{"../src/traces/violin":551}],20:[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,f=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){f.call(this,e,t+"",r)}}function d(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=d,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(d),.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 y=m(d);function g(e){return e.length}e.bisectLeft=y.left,e.bisect=e.bisectRight=y.right,e.bisector=function(e){return m(1===e.length?function(t,r){return d(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,g),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 v=Math.abs;function x(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function b(){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=function(e){var t=1;for(;e*t%1;)t*=10;return t}(v(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 b;if(e instanceof b)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};var _="__proto__",w="\0";function k(e){return(e+="")===_||e[0]===w?w+e:e}function T(e){return(e+="")[0]===w?e.slice(1):e}function M(e){return k(e)in this._}function A(e){return(e=k(e))in this._&&delete this._[e]}function S(){var e=[];for(var t in this._)e.push(T(t));return e}function L(){var e=0;for(var t in this._)++e;return e}function C(){for(var e in this._)return!1;return!0}function D(){this._=Object.create(null)}function O(e){return e}function P(e,t,r){return function(){var n=r.apply(t,arguments);return n===t?e:n}}function E(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,n=R.length;r<n;++r){var a=R[r]+t;if(a in e)return a}}x(b,{has:M,get:function(e){return this._[k(e)]},set:function(e,t){return this._[k(e)]=t},remove:A,keys:S,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:T(t),value:this._[t]});return e},size:L,empty:C,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,f,d=-1,p=i.length,h=a[l++],m=new b;++d<p;)(f=m.get(s=h(c=i[d])))?f.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},x(D,{has:M,add:function(e){return this._[k(e+="")]=!0,e},remove:A,values:S,size:L,empty:C,forEach:function(e){for(var t in this._)e.call(this,T(t))}}),e.behavior={},e.rebind=function(e,t){for(var r,n=1,a=arguments.length;++n<a;)e[r=arguments[n]]=P(e,t,t[r]);return e};var R=["webkit","ms","moz","Moz","o","O"];function z(){}function I(){}function N(e){var t=[],r=new b;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 j(){for(var t,r=e.event;t=r.sourceEvent;)r=t;return r}function B(t){for(var r=new I,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 I,t=-1,r=arguments.length;++t<r;)e[arguments[t]]=N(e);return e},I.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,q={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function U(e){return q(e,G),e}var Y=function(e,t){return t.querySelector(e)},V=function(e,t){return t.querySelectorAll(e)},Z=function(e,t){var r=e.matches||e[E(e,"matchesSelector")];return(Z=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(Y=function(e,t){return Sizzle(e,t)[0]||null},V=Sizzle,Z=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var G=e.selection.prototype=[];function W(e){return"function"==typeof e?e:function(){return Y(e,this)}}function J(e){return"function"==typeof e?e:function(){return V(e,this)}}G.select=function(e){var t,r,n,a,i=[];e=W(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 U(i)},G.selectAll=function(e){var t,r,a=[];e=J(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 U(a)};var X="http://www.w3.org/1999/xhtml",K={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 $(e){return e.trim().replace(/\s+/g," ")}function ee(t){return new RegExp("(?:^|\\s+)"+e.requote(t)+"(?:\\s+|$)","g")}function te(e){return(e+"").trim().split(/^|\s+/)}function re(e,t){var r=(e=te(e).map(ne)).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 ne(e){var t=ee(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",$(a+" "+e))):r.setAttribute("class",$(a.replace(t," ")))}}function ae(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 ie(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 oe(t){return"function"==typeof t?t:(t=e.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,r=this.namespaceURI;return r===X&&e.documentElement.namespaceURI===X?e.createElement(t):e.createElementNS(r,t)}}function le(){var e=this.parentNode;e&&e.removeChild(this)}function se(e){return{__data__:e}}function ce(e){return function(){return Z(this,e)}}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 fe(e){return q(e,de),e}e.ns={prefix:K,qualify:function(e){var t=e.indexOf(":"),r=e;return t>=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),K.hasOwnProperty(r)?{space:K[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=te(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(!ee(e[a]).test(t))return!1;return!0}for(t in e)this.each(re(t,e[t]));return this}return this.each(re(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(ae(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(ae(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(ie(t,e[t]));return this}return this.each(ie(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=oe(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},G.insert=function(e,t){return e=oe(e),t=W(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})},G.remove=function(){return this.each(le)},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,f=Math.min(o,u),d=new Array(u),p=new Array(u),h=new Array(o);if(t){var m,y=new b,g=new Array(o);for(n=-1;++n<o;)(a=e[n])&&(y.has(m=t.call(a,a.__data__,n))?h[n]=a:y.set(m,a),g[n]=m);for(n=-1;++n<u;)(a=y.get(m=t.call(r,i=r[n],n)))?!0!==a&&(d[n]=a,a.__data__=i):p[n]=se(i),y.set(m,!0);for(n=-1;++n<o;)n in g&&!0!==y.get(g[n])&&(h[n]=e[n])}else{for(n=-1;++n<f;)a=e[n],i=r[n],a?(a.__data__=i,d[n]=a):p[n]=se(i);for(;n<u;++n)p[n]=se(r[n]);for(;n<o;++n)h[n]=e[n]}p.update=d,p.parentNode=d.parentNode=h.parentNode=e.parentNode,l.push(p),s.push(d),c.push(h)}var l=fe([]),s=U([]),c=U([]);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=ce(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 U(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=function(e){arguments.length||(e=d);return function(t,r){return t&&r?e(t.__data__,r.__data__):!t-!r}}.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 de=[];function pe(t,r,a){var i="__on"+t,o=t.indexOf("."),l=me;o>0&&(t=t.slice(0,o));var s=he.get(t);function c(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}return s&&(t=s,l=ye),o?r?function(){var e=l(r,n(arguments));c.call(this),this.addEventListener(t,this[i]=e,e.$=a),e._=r}:c:r?z: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=fe,e.selection.enter.prototype=de,de.append=G.append,de.empty=G.empty,de.node=G.node,de.call=G.call,de.size=G.size,de.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 U(o)},de.insert=function(e,t){var r,n,a;return arguments.length<2&&(r=this,t=function(e,t,i){var o,l=r[i].update,s=l.length;for(i!=a&&(a=i,n=0),t>=n&&(n=t+1);!(o=l[n])&&++n<s;);return o}),G.insert.call(this,e,t)},e.select=function(e){var t;return"string"==typeof e?(t=[Y(e,a)]).parentNode=a.documentElement:(t=[e]).parentNode=i(e),U([t])},e.selectAll=function(e){var t;return"string"==typeof e?(t=n(V(e,a))).parentNode=a.documentElement:(t=n(e)).parentNode=null,U([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(pe(r,e[r],t));return this}if(n<2)return(n=this.node()["__on"+e])&&n._;r=!1}return this.each(pe(e,t,r))};var he=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});function me(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 ye(e,t){var r=me(e,t);return function(e){var t=e.relatedTarget;t&&(t===this||8&t.compareDocumentPosition(this))||r.call(this,e)}}a&&he.forEach(function(e){"on"+e in a&&he.remove(e)});var ge,ve=0;function xe(t){var r=".dragsuppress-"+ ++ve,n="click"+r,a=e.select(o(t)).on("touchmove"+r,F).on("dragstart"+r,F).on("selectstart"+r,F);if(null==ge&&(ge=!("onselectstart"in t)&&E(t.style,"userSelect")),ge){var l=i(t).style,s=l[ge];l[ge]="none"}return function(e){if(a.on(r,null),ge&&(l[ge]=s),e){var t=function(){a.on(n,null)};a.on(n,function(){F(),t()},!0),setTimeout(t,0)}}}e.mouse=function(e){return _e(e,j())};var be=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function _e(t,r){r.changedTouches&&(r=r.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var a=n.createSVGPoint();if(be<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();be=!(l.f||l.e),n.remove()}}return be?(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 we(){return e.event.changedTouches[0].identifier}e.touch=function(e,t,r){if(arguments.length<3&&(r=t,t=j().changedTouches),t)for(var n,a=0,i=t.length;a<i;++a)if((n=t[a]).identifier===r)return _e(e,n)},e.behavior.drag=function(){var t=B(i,"drag","dragstart","dragend"),r=null,n=l(z,e.mouse,o,"mousemove","mouseup"),a=l(we,e.touch,O,"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=e.event.target.correspondingElement||e.event.target,u=this.parentNode,f=t.of(this,arguments),d=0,p=n(),h=".drag"+(null==p?"":"-"+p),m=e.select(i(c)).on(o+h,function(){var e,t,r=a(u,p);if(!r)return;e=r[0]-g[0],t=r[1]-g[1],d|=e|t,g=r,f({type:"drag",x:r[0]+s[0],y:r[1]+s[1],dx:e,dy:t})}).on(l+h,function(){if(!a(u,p))return;m.on(o+h,null).on(l+h,null),y(d),f({type:"dragend"})}),y=xe(c),g=a(u,p);s=r?[(s=r.apply(this,arguments)).x-g[0],s.y-g[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=j().touches),t?n(t).map(function(t){var r=_e(e,t);return r.identifier=t.identifier,r}):[]};var ke=1e-6,Te=ke*ke,Me=Math.PI,Ae=2*Me,Se=Ae-ke,Le=Me/2,Ce=Me/180,De=180/Me;function Oe(e){return e>1?Le:e<-1?-Le:Math.asin(e)}function Pe(e){return((e=Math.exp(e))+1/e)/2}var Ee=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,f=s-i,d=u*u+f*f;if(d<Te)n=Math.log(c/o)/Ee,r=function(e){return[a+e*u,i+e*f,o*Math.exp(Ee*e*n)]};else{var p=Math.sqrt(d),h=(c*c-o*o+4*d)/(2*o*2*p),m=(c*c-o*o-4*d)/(2*c*2*p),y=Math.log(Math.sqrt(h*h+1)-h),g=Math.log(Math.sqrt(m*m+1)-m);n=(g-y)/Ee,r=function(e){var t,r=e*n,l=Pe(y),s=o/(2*p)*(l*(t=Ee*r+y,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(y));return[a+s*u,i+s*f,o*l/Pe(Ee*r+y)]}}return r.duration=1e3*n,r},e.behavior.zoom=function(){var t,r,n,i,l,s,c,u,f,d={x:0,y:0,k:1},p=[960,500],h=Ie,m=250,y=0,g="mousedown.zoom",v="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=B(w,"zoomstart","zoom","zoomend");function w(e){e.on(g,O).on(ze+".zoom",E).on("dblclick.zoom",R).on(b,P)}function k(e){return[(e[0]-d.x)/d.k,(e[1]-d.y)/d.k]}function T(e){d.k=Math.max(h[0],Math.min(h[1],e))}function M(e,t){t=function(e){return[e[0]*d.k+d.x,e[1]*d.k+d.y]}(t),d.x+=e[0]-t[0],d.y+=e[1]-t[1]}function A(t,n,a,i){t.__chart__={x:d.x,y:d.y,k:d.k},T(Math.pow(2,i)),M(r=n,a),t=e.select(t),m>0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){c&&c.domain(s.range().map(function(e){return(e-d.x)/d.k}).map(s.invert)),f&&f.domain(u.range().map(function(e){return(e-d.y)/d.k}).map(u.invert))}function L(e){y++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function D(e){--y||(e({type:"zoomend"}),r=null)}function O(){var t=this,r=_.of(t,arguments),n=0,a=e.select(o(t)).on(v,function(){n=1,M(e.mouse(t),i),C(r)}).on(x,function(){a.on(v,null).on(x,null),l(n),D(r)}),i=k(e.mouse(t)),l=xe(t);Ea.call(t),L(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=[],f=e.select(r),p=xe(r);function h(){var n=e.touches(r);return t=d.k,n.forEach(function(e){e.identifier in a&&(a[e.identifier]=k(e))}),n}function m(){var t=e.event.target;e.select(t).on(s,y).on(c,v),u.push(t);for(var n=e.event.changedTouches,o=0,f=n.length;o<f;++o)a[n[o].identifier]=null;var p=h(),m=Date.now();if(1===p.length){if(m-l<500){var g=p[0];A(r,g,a[g.identifier],Math.floor(Math.log(d.k)/Math.LN2)+1),F()}l=m}else if(p.length>1){g=p[0];var x=p[1],b=g[0]-x[0],_=g[1]-x[1];i=b*b+_*_}}function y(){var o,s,c,u,f=e.touches(r);Ea.call(r);for(var d=0,p=f.length;d<p;++d,u=null)if(c=f[d],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],T(m*t)}l=null,M(o,s),C(n)}function v(){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),f.on(g,O).on(b,P),p(),D(n)}m(),L(n),f.on(g,null).on(b,m)}function E(){var a=_.of(this,arguments);i?clearTimeout(i):(Ea.call(this),t=k(r=n||e.mouse(this)),L(a)),i=setTimeout(function(){i=null,D(a)},50),F(),T(Math.pow(2,.002*Re())*d.k),M(r,t),C(a)}function R(){var t=e.mouse(this),r=Math.log(d.k)/Math.LN2;A(this,t,k(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=d;Ia?e.select(this).transition().each("start.zoom",function(){d=this.__chart__||{x:0,y:0,k:1},L(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-d.x)/d.k,(l-d.y)/d.k,a/d.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__=d={x:o-r[0]*n,y:l-r[1]*n,k:n},C(t)}}).each("interrupt.zoom",function(){D(t)}).each("end.zoom",function(){D(t)}):(this.__chart__=d,L(t),C(t),D(t))})},w.translate=function(e){return arguments.length?(d={x:+e[0],y:+e[1],k:d.k},S(),w):[d.x,d.y]},w.scale=function(e){return arguments.length?(d={x:d.x,y:d.y,k:null},T(+e),S(),w):d.k},w.scaleExtent=function(e){return arguments.length?(h=null==e?Ie:[+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(),d={x:0,y:0,k:1},w):c},w.y=function(e){return arguments.length?(f=e,u=e.copy(),d={x:0,y:0,k:1},w):f},e.rebind(w,_,"on")};var Re,ze,Ie=[0,1/0];function Ne(){}function Fe(e,t,r){return this instanceof Fe?(this.h=+e,this.s=+t,void(this.l=+r)):arguments.length<2?e instanceof Fe?new Fe(e.h,e.s,e.l):ot(""+e,lt,Fe):new Fe(e,t,r)}e.color=Ne,Ne.prototype.toString=function(){return this.rgb()+""},e.hsl=Fe;var je=Fe.prototype=new Ne;function Be(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)?0: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 tt(i(e+120),i(e),i(e-120))}function He(t,r,n){return this instanceof He?(this.h=+t,this.c=+r,void(this.l=+n)):arguments.length<2?t instanceof He?new He(t.h,t.c,t.l):Ke(t instanceof Ye?t.l:(t=st((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new He(t,r,n)}je.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Fe(this.h,this.s,this.l/e)},je.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Fe(this.h,this.s,e*this.l)},je.rgb=function(){return Be(this.h,this.s,this.l)},e.hcl=He;var qe=He.prototype=new Ne;function Ue(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Ye(r,Math.cos(e*=Ce)*t,Math.sin(e)*t)}function Ye(e,t,r){return this instanceof Ye?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Ye?new Ye(e.l,e.a,e.b):e instanceof He?Ue(e.h,e.c,e.l):st((e=tt(e)).r,e.g,e.b):new Ye(e,t,r)}qe.brighter=function(e){return new He(this.h,this.c,Math.min(100,this.l+Ve*(arguments.length?e:1)))},qe.darker=function(e){return new He(this.h,this.c,Math.max(0,this.l-Ve*(arguments.length?e:1)))},qe.rgb=function(){return Ue(this.h,this.c,this.l).rgb()},e.lab=Ye;var Ve=18,Ze=.95047,Ge=1,We=1.08883,Je=Ye.prototype=new Ne;function Xe(e,t,r){var n=(e+16)/116,a=n+t/500,i=n-r/200;return new tt(et(3.2404542*(a=Qe(a)*Ze)-1.5371385*(n=Qe(n)*Ge)-.4985314*(i=Qe(i)*We)),et(-.969266*a+1.8760108*n+.041556*i),et(.0556434*a-.2040259*n+1.0572252*i))}function Ke(e,t,r){return e>0?new He(Math.atan2(r,t)*De,Math.sqrt(t*t+r*r),e):new He(NaN,NaN,e)}function Qe(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function $e(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function et(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function tt(e,t,r){return this instanceof tt?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof tt?new tt(e.r,e.g,e.b):ot(""+e,tt,Be):new tt(e,t,r)}function rt(e){return new tt(e>>16,e>>8&255,255&e)}function nt(e){return rt(e)+""}Je.brighter=function(e){return new Ye(Math.min(100,this.l+Ve*(arguments.length?e:1)),this.a,this.b)},Je.darker=function(e){return new Ye(Math.max(0,this.l-Ve*(arguments.length?e:1)),this.a,this.b)},Je.rgb=function(){return Xe(this.l,this.a,this.b)},e.rgb=tt;var at=tt.prototype=new Ne;function it(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ot(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(ut(a[0]),ut(a[1]),ut(a[2]))}return(i=ft.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 lt(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 Fe(n,a,s)}function st(e,t,r){var n=$e((.4124564*(e=ct(e))+.3575761*(t=ct(t))+.1804375*(r=ct(r)))/Ze),a=$e((.2126729*e+.7151522*t+.072175*r)/Ge);return Ye(116*a-16,500*(n-a),200*(a-$e((.0193339*e+.119192*t+.9503041*r)/We)))}function ct(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ut(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}at.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 tt(Math.min(255,t/e),Math.min(255,r/e),Math.min(255,n/e))):new tt(a,a,a)},at.darker=function(e){return new tt((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},at.hsl=function(){return lt(this.r,this.g,this.b)},at.toString=function(){return"#"+it(this.r)+it(this.g)+it(this.b)};var ft=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 dt(e){return"function"==typeof e?e:function(){return e}}function pt(e){return function(t,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),ht(t,r,e,n)}}function ht(t,r,a,i){var o={},l=e.dispatch("beforesend","progress","load","error"),s={},c=new XMLHttpRequest,u=null;function f(){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=f:c.onreadystatechange=function(){c.readyState>3&&f()},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))}ft.forEach(function(e,t){ft.set(e,rt(t))}),e.functor=dt,e.xhr=pt(O),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=ht(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 f(){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=f())!==o;){for(var d=[];r!==i&&r!==o;)d.push(r),r=f();t&&null==(d=t(d,u++))||l.push(d)}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 mt,yt,gt,vt,xt=this[E(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function bt(e,t,r){var n=arguments.length;n<2&&(t=0),n<3&&(r=Date.now());var a={c:e,t:r+t,n:null};return yt?yt.n=a:mt=a,yt=a,gt||(vt=clearTimeout(vt),gt=1,xt(_t)),a}function _t(){var e=wt(),t=kt()-e;t>24?(isFinite(t)&&(clearTimeout(vt),vt=setTimeout(_t,t)),gt=0):(gt=1,xt(_t))}function wt(){for(var e=Date.now(),t=mt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function kt(){for(var e,t=mt,r=1/0;t;)t.c?(t.t<r&&(r=t.t),t=(e=t).n):t=e?e.n=t.n:mt=t.n;return yt=e,r}function Tt(e){return e[0]}function Mt(e){return e[1]}function At(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 St(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){bt.apply(this,arguments)},e.timer.flush=function(){wt(),kt()},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=Tt,r=Mt;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,a=dt(t),i=dt(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(St),n=0;n<o;n++)s.push([l[n][0],-l[n][1]]);var c=At(l),u=At(s),f=u[0]===c[0],d=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=+f;n<u.length-d;++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 q(e,Lt),e};var Lt=e.geom.polygon.prototype=[];function Ct(e,t,r){return(r[0]-t[0])*(e[1]-t[1])<(r[1]-t[1])*(e[0]-t[0])}function Dt(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,f=n[1]-c,d=(l*(s-c)-f*(a-i))/(f*o-l*u);return[a+d*o,s+d*u]}function Ot(e){var t=e[0],r=e[e.length-1];return!(t[0]-r[0]||t[1]-r[1])}Lt.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},Lt.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]},Lt.clip=function(e){for(var t,r,n,a,i,o,l=Ot(e),s=-1,c=this.length-Ot(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;)Ct(o=t[r],u,a)?(Ct(i,u,a)||e.push(Dt(i,o,u,a)),e.push(o)):Ct(i,u,a)&&e.push(Dt(i,o,u,a)),i=o;l&&e.push(e[0]),u=a}return e};var Pt,Et,Rt,zt,It,Nt=[],Ft=[];function jt(){nr(this),this.edge=this.site=this.circle=null}function Bt(e){var t=Nt.pop()||new jt;return t.site=e,t}function Ht(e){Xt(e),Rt.remove(e),Nt.push(e),nr(e)}function qt(e){var t=e.circle,r=t.x,n=t.cy,a={x:r,y:n},i=e.P,o=e.N,l=[e];Ht(e);for(var s=i;s.circle&&v(r-s.circle.x)<ke&&v(n-s.circle.cy)<ke;)i=s.P,l.unshift(s),Ht(s),s=i;l.unshift(s),Xt(s);for(var c=o;c.circle&&v(r-c.circle.x)<ke&&v(n-c.circle.cy)<ke;)o=c.N,l.push(c),Ht(c),c=o;l.push(c),Xt(c);var u,f=l.length;for(u=1;u<f;++u)c=l[u],s=l[u-1],er(c.edge,s.site,c.site,a);s=l[0],(c=l[f-1]).edge=$t(s.site,c.site,null,a),Jt(s),Jt(c)}function Ut(e){for(var t,r,n,a,i=e.x,o=e.y,l=Rt._;l;)if((n=Yt(l,o)-i)>ke)l=l.L;else{if(!((a=i-Vt(l,o))>ke)){n>-ke?(t=l.P,r=l):a>-ke?(t=l,r=l.N):t=r=l;break}if(!l.R){t=l;break}l=l.R}var s=Bt(e);if(Rt.insert(t,s),t||r){if(t===r)return Xt(t),r=Bt(t.site),Rt.insert(s,r),s.edge=r.edge=$t(t.site,s.site),Jt(t),void Jt(r);if(r){Xt(t),Xt(r);var c=t.site,u=c.x,f=c.y,d=e.x-u,p=e.y-f,h=r.site,m=h.x-u,y=h.y-f,g=2*(d*y-p*m),v=d*d+p*p,x=m*m+y*y,b={x:(y*v-p*x)/g+u,y:(d*x-m*v)/g+f};er(r.edge,c,h,b),s.edge=$t(c,e,null,b),r.edge=$t(e,h,null,b),Jt(t),Jt(r)}else s.edge=$t(t.site,s.site)}}function Yt(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,f=1/i-1/c,d=u/c;return f?(-d+Math.sqrt(d*d-2*f*(u*u/(-2*c)-s+c/2+a-i/2)))/f+n:(n+l)/2}function Vt(e,t){var r=e.N;if(r)return Yt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Zt(e){this.site=e,this.edges=[]}function Gt(e,t){return t.angle-e.angle}function Wt(){nr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Jt(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,f=2*(s*(y=i.y-l)-c*u);if(!(f>=-Te)){var d=s*s+c*c,p=u*u+y*y,h=(y*d-c*p)/f,m=(s*p-u*d)/f,y=m+l,g=Ft.pop()||new Wt;g.arc=e,g.site=a,g.x=h+o,g.y=y+Math.sqrt(h*h+m*m),g.cy=y,e.circle=g;for(var v=null,x=It._;x;)if(g.y<x.y||g.y===x.y&&g.x<=x.x){if(!x.L){v=x.P;break}x=x.L}else{if(!x.R){v=x;break}x=x.R}It.insert(v,g),v||(zt=g)}}}}function Xt(e){var t=e.circle;t&&(t.P||(zt=t.N),It.remove(t),Ft.push(t),nr(t),e.circle=null)}function Kt(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,f=e.r,d=u.x,p=u.y,h=f.x,m=f.y,y=(d+h)/2,g=(p+m)/2;if(m===p){if(y<o||y>=l)return;if(d>h){if(i){if(i.y>=c)return}else i={x:y,y:s};r={x:y,y:c}}else{if(i){if(i.y<s)return}else i={x:y,y:c};r={x:y,y:s}}}else if(a=g-(n=(d-h)/(m-p))*y,n<-1||n>1)if(d>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 Qt(e,t){this.l=e,this.r=t,this.a=this.b=null}function $t(e,t,r,n){var a=new Qt(e,t);return Pt.push(a),r&&er(a,e,t,r),n&&er(a,t,e,n),Et[e.i].edges.push(new tr(a,e,t)),Et[t.i].edges.push(new tr(a,t,e)),a}function er(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 tr(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 rr(){this._=null}function nr(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function ar(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 ir(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 or(e){for(;e.L;)e=e.L;return e}function lr(e,t){var r,n,a,i=e.sort(sr).pop();for(Pt=[],Et=new Array(e.length),Rt=new rr,It=new rr;;)if(a=zt,i&&(!a||i.y<a.y||i.y===a.y&&i.x<a.x))i.x===r&&i.y===n||(Et[i.i]=new Zt(i),Ut(i),r=i.x,n=i.y),i=e.pop();else{if(!a)break;qt(a.arc)}t&&(function(e){for(var t,r,n,a,i,o=Pt,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,f=1,d=l.x-s,p=l.y-c;if(t=r-s,d||!(t>0)){if(t/=d,d<0){if(t<u)return;t<f&&(f=t)}else if(d>0){if(t>f)return;t>u&&(u=t)}if(t=a-s,d||!(t<0)){if(t/=d,d<0){if(t>f)return;t>u&&(u=t)}else if(d>0){if(t<u)return;t<f&&(f=t)}if(t=n-c,p||!(t>0)){if(t/=p,p<0){if(t<u)return;t<f&&(f=t)}else if(p>0){if(t>f)return;t>u&&(u=t)}if(t=i-c,p||!(t<0)){if(t/=p,p<0){if(t>f)return;t>u&&(u=t)}else if(p>0){if(t<u)return;t<f&&(f=t)}return u>0&&(e.a={x:s+u*d,y:c+u*p}),f<1&&(e.b={x:s+f*d,y:c+f*p}),e}}}}}),s=o.length;s--;)(!Kt(t=o[s],e)||!l(t)||v(t.a.x-t.b.x)<ke&&v(t.a.y-t.b.y)<ke)&&(t.a=t.b=null,o.splice(s,1))}(t),function(e){for(var t,r,n,a,i,o,l,s,c,u,f=e[0][0],d=e[1][0],p=e[0][1],h=e[1][1],m=Et,y=m.length;y--;)if((i=m[y])&&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,(v(n-t)>ke||v(a-r)>ke)&&(l.splice(o,0,new tr((g=i.site,x=u,b=v(n-f)<ke&&h-a>ke?{x:f,y:v(t-f)<ke?r:h}:v(a-h)<ke&&d-n>ke?{x:v(r-h)<ke?t:d,y:h}:v(n-d)<ke&&a-p>ke?{x:d,y:v(t-d)<ke?r:p}:v(a-p)<ke&&n-f>ke?{x:v(r-p)<ke?t:f,y:p}:null,_=void 0,_=new Qt(g,null),_.a=x,_.b=b,Pt.push(_),_),i.site,null)),++s);var g,x,b,_}(t));var o={cells:Et,edges:Pt};return Rt=It=Pt=Et=null,o}function sr(e,t){return t.y-e.y||t.x-e.x}Zt.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(Gt),t.length},tr.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}},rr.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=or(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&&(ar(this,r),r=(e=r).U),r.C=!1,n.C=!0,ir(this,n)):(a=n.L)&&a.C?(r.C=a.C=!1,n.C=!0,e=n):(e===r.L&&(ir(this,r),r=(e=r).U),r.C=!1,n.C=!0,ar(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?or(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,ar(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,ir(this,t),t=a.R),t.C=a.C,a.C=t.R.C=!1,ar(this,a),e=this._;break}}else if((t=a.L).C&&(t.C=!1,a.C=!0,ir(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,ar(this,t),t=a.L),t.C=a.C,a.C=t.L.C=!1,ir(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=Tt,r=Mt,n=t,a=r,i=cr;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 lr(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)/ke)*ke,y:Math.round(a(e,t)/ke)*ke,i:t}})}return o.links=function(e){return lr(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 lr(l(e)).cells.forEach(function(r,n){for(var a,i,o,l,s=r.site,c=r.edges.sort(Gt),u=-1,f=c.length,d=c[f-1].edge,p=d.l===s?d.r:d.l;++u<f;)d,a=p,p=(d=c[u].edge).l===s?d.r:d.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=dt(t=e),o):t},o.y=function(e){return arguments.length?(a=dt(r=e),o):r},o.clipExtent=function(e){return arguments.length?(i=null==e?cr:e,o):i===cr?null:i},o.size=function(e){return arguments.length?o.clipExtent(e&&[[0,0],e]):i===cr?null:i&&i[1]},o};var cr=[[-1e6,-1e6],[1e6,1e6]];function ur(e){return e.x}function fr(e){return e.y}function dr(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"#"+it(Math.round(n+o*e))+it(Math.round(a+l*e))+it(Math.round(i+s*e))}}function pr(e,t){var r,n={},a={};for(r in e)r in t?n[r]=vr(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=yr.lastIndex=gr.lastIndex=0,o=-1,l=[],s=[];for(e+="",t+="";(r=yr.exec(e))&&(n=gr.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=gr.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=Tt,l=Mt;if(i=arguments.length)return o=ur,l=fr,3===i&&(a=r,n=t,r=t=0),s(e);function s(e){var s,c,u,f,d,p,h,m,y,g=dt(o),x=dt(l);if(null!=t)p=t,h=r,m=n,y=a;else if(m=y=-(p=h=1/0),c=[],u=[],d=e.length,i)for(f=0;f<d;++f)(s=e[f]).x<p&&(p=s.x),s.y<h&&(h=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),c.push(s.x),u.push(s.y);else for(f=0;f<d;++f){var b=+g(s=e[f],f),_=+x(s,f);b<p&&(p=b),_<h&&(h=_),b>m&&(m=b),_>y&&(y=_),c.push(b),u.push(_)}var w=m-p,k=y-h;function T(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(v(s-r)+v(c-n)<.01)M(e,t,r,n,a,i,o,l);else{var u=e.point;e.x=e.y=e.point=null,M(e,u,s,c,a,i,o,l),M(e,t,r,n,a,i,o,l)}else e.x=r,e.y=n,e.point=t}else M(e,t,r,n,a,i,o,l)}function M(e,t,r,n,a,i,o,l){var s=.5*(a+o),c=.5*(i+l),u=r>=s,f=n>=c,d=f<<1|u;e.leaf=!1,u?a=s:o=s,f?i=c:l=c,T(e=e.nodes[d]||(e.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,a,i,o,l)}w>k?y=h+w:m=p+k;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){T(A,e,+g(e,++f),+x(e,f),p,h,m,y)}};if(A.visit=function(e){!function e(t,r,n,a,i,o){if(!t(r,n,a,i,o)){var l=.5*(n+i),s=.5*(a+o),c=r.nodes;c[0]&&e(t,c[0],n,a,l,s),c[1]&&e(t,c[1],l,a,i,s),c[2]&&e(t,c[2],n,s,l,o),c[3]&&e(t,c[3],l,s,i,o)}}(e,A,p,h,m,y)},A.find=function(e){return function(e,t,r,n,a,i,o){var l,s=1/0;return function e(c,u,f,d,p){if(!(u>i||f>o||d<n||p<a)){if(h=c.point){var h,m=t-c.x,y=r-c.y,g=m*m+y*y;if(g<s){var v=Math.sqrt(s=g);n=t-v,a=r-v,i=t+v,o=r+v,l=h}}for(var x=c.nodes,b=.5*(u+d),_=.5*(f+p),w=(r>=_)<<1|t>=b,k=w+4;w<k;++w)if(c=x[3&w])switch(3&w){case 0:e(c,u,f,b,_);break;case 1:e(c,b,f,d,_);break;case 2:e(c,u,_,b,p);break;case 3:e(c,b,_,d,p)}}}(e,n,a,i,o),l}(A,e[0],e[1],p,h,m,y)},f=-1,null==t){for(;++f<d;)T(A,e[f],c[f],u[f],p,h,m,y);--f}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=dr,e.interpolateObject=pr,e.interpolateNumber=hr,e.interpolateString=mr;var yr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gr=new RegExp(yr.source,"g");function vr(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(vr(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=vr,e.interpolators=[function(e,t){var r=typeof t;return("string"===r?ft.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?dr:mr:t instanceof Ne?dr:Array.isArray(t)?xr:"object"===r&&isNaN(t)?pr:hr)(e,t)}],e.interpolateArray=xr;var br=function(){return O},_r=e.map({linear:br,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return Mr},cubic:function(){return Ar},sin:function(){return Lr},exp:function(){return Cr},circle:function(){return Dr},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 Or}}),wr=e.map({in:O,out:kr,"in-out":Tr,"out-in":function(e){return Tr(kr(e))}});function kr(e){return function(t){return 1-e(1-t)}}function Tr(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Mr(e){return e*e}function Ar(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 Lr(e){return 1-Math.cos(e*Le)}function Cr(e){return Math.pow(2,10*(e-1))}function Dr(e){return 1-Math.sqrt(1-e*e)}function Or(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 Pr(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Er(e){var t,r,n,a=[e.a,e.b],i=[e.c,e.d],o=zr(a),l=Rr(a,i),s=zr(((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]))*De,this.translate=[e.e,e.f],this.scale=[o,s],this.skew=s?Math.atan2(l,s)*De:0}function Rr(e,t){return e[0]*t[0]+e[1]*t[1]}function zr(e){var t=Math.sqrt(Rr(e,e));return t&&(e[0]/=t,e[1]/=t),t}e.ease=function(e){var t,n=e.indexOf("-"),a=n>=0?e.slice(0,n):e,i=n>=0?e.slice(n+1):"in";return a=_r.get(a)||br,i=wr.get(i)||O,t=i(a.apply(null,r.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},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 Ue(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 Be(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 Xe(n+o*e,a+l*e,i+s*e)+""}},e.interpolateRound=Pr,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 Er(t?t.matrix:Ir)})(t)},Er.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Ir={a:1,b:0,c:0,d:1,e:0,f:0};function Nr(e){return e.length?e.pop()+",":""}function Fr(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(Nr(r)+"rotate(",null,")")-2,x:hr(e,t)})):t&&r.push(Nr(r)+"rotate("+t+")")}(t.rotate,r.rotate,n,a),function(e,t,r,n){e!==t?n.push({i:r.push(Nr(r)+"skewX(",null,")")-2,x:hr(e,t)}):t&&r.push(Nr(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(Nr(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(Nr(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 jr(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 Hr(e){for(var t=e.source,r=e.target,n=function(e,t){if(e===t)return e;var r=qr(e),n=qr(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 qr(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 Yr(e){e.fixed&=-7}function Vr(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Zr(e){e.fixed&=-5}e.interpolateTransform=Fr,e.layout={},e.layout.bundle=function(){return function(e){for(var t=[],r=-1,n=e.length;++r<n;)t.push(Hr(e[r]));return t}},e.layout.chord=function(){var t,r,n,a,i,o,l,s={},c=0;function u(){var s,u,d,p,h,m={},y=[],g=e.range(a),v=[];for(t=[],r=[],s=0,p=-1;++p<a;){for(u=0,h=-1;++h<a;)u+=n[p][h];y.push(u),v.push(e.range(a)),s+=u}for(i&&g.sort(function(e,t){return i(y[e],y[t])}),o&&v.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(d=u,h=-1;++h<a;){var x=g[p],b=v[x][h],_=n[x][b],w=u,k=u+=_*s;m[x+"-"+b]={index:x,subindex:b,startAngle:w,endAngle:k,value:_}}r[x]={index:x,startAngle:d,endAngle:u,value:y[x]},u+=c}for(p=-1;++p<a;)for(h=p-1;++h<a;){var T=m[p+"-"+h],M=m[h+"-"+p];(T.value||M.value)&&t.push(T.value<M.value?{source:M,target:T}:{source:T,target:M})}l&&f()}function f(){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&&f(),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,f=Gr,d=Wr,p=-30,h=Jr,m=.1,y=.64,g=[],v=[];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/y<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,f,d,h,y,b,_,w,k=g.length,T=v.length;for(l=0;l<T;++l)d=(f=v[l]).source,(y=(_=(h=f.target).x-d.x)*_+(w=h.y-d.y)*w)&&(_*=y=n*i[l]*((y=Math.sqrt(y))-a[l])/y,w*=y,h.x-=_*(b=d.weight+h.weight?d.weight/(d.weight+h.weight):.5),h.y-=w*b,d.x+=_*(b=1-b),d.y+=w*b);if((b=n*m)&&(_=c[0]/2,w=c[1]/2,l=-1,b))for(;++l<k;)(f=g[l]).x+=(_-f.x)*b,f.y+=(w-f.y)*b;if(p)for(!function e(t,r,n){var a=0,i=0;t.charge=0;if(!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(g),n,o),l=-1;++l<k;)(f=g[l]).fixed||r.visit(x(f));for(l=-1;++l<k;)(f=g[l]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*u,f.y-=(f.py-(f.py=f.y))*u);s.tick({type:"tick",alpha:n})},l.nodes=function(e){return arguments.length?(g=e,l):g},l.links=function(e){return arguments.length?(v=e,l):v},l.size=function(e){return arguments.length?(c=e,l):c},l.linkDistance=function(e){return arguments.length?(f="function"==typeof e?e:+e,l):f},l.distance=l.linkDistance,l.linkStrength=function(e){return arguments.length?(d="function"==typeof e?e:+e,l):d},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?(y=e*e,l):Math.sqrt(y)},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=bt(l.tick)),l):n},l.start=function(){var e,t,r,n=g.length,s=v.length,u=c[0],h=c[1];for(e=0;e<n;++e)(r=g[e]).index=e,r.weight=0;for(e=0;e<s;++e)"number"==typeof(r=v[e]).source&&(r.source=g[r.source]),"number"==typeof r.target&&(r.target=g[r.target]),++r.source.weight,++r.target.weight;for(e=0;e<n;++e)r=g[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 f)for(e=0;e<s;++e)a[e]=+f.call(this,v[e],e);else for(e=0;e<s;++e)a[e]=f;if(i=[],"function"==typeof d)for(e=0;e<s;++e)i[e]=+d.call(this,v[e],e);else for(e=0;e<s;++e)i[e]=d;if(o=[],"function"==typeof p)for(e=0;e<n;++e)o[e]=+p.call(this,g[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=v[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(O).on("dragstart.force",Ur).on("drag.force",b).on("dragend.force",Yr)),!arguments.length)return r;this.on("mouseover.force",Vr).on("mouseout.force",Zr).call(r)},e.rebind(l,s,"on")};var Gr=20,Wr=1,Jr=1/0;function Xr(t,r){return e.rebind(t,r,"sort","children","value"),t.nodes=t,t.links=rn,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 Qr(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 $r(e){return e.children}function en(e){return e.value}function tn(e,t){return t.value-e.value}function rn(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=tn,t=$r,r=en;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 Qr(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)}),Qr(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},Xr(n,t)},e.layout.pie=function(){var t=Number,r=nn,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)}),f=+("function"==typeof n?n.apply(this,arguments):n),d=("function"==typeof a?a.apply(this,arguments):a)-f,p=Math.min(Math.abs(d)/c,+("function"==typeof i?i.apply(this,arguments):i)),h=p*(d<0?-1:1),m=e.sum(u),y=m?(d-c*h)/m:0,g=e.range(c),v=[];return null!=r&&g.sort(r===nn?function(e,t){return u[t]-u[e]}:function(e,t){return r(l[e],l[t])}),g.forEach(function(e){v[e]={data:l[e],value:s=u[e],startAngle:f,endAngle:f+=s*y+h,padAngle:p}}),v}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 nn={};function an(e){return e.x}function on(e){return e.y}function ln(e,t,r){e.y0=t,e.y=r}e.layout.stack=function(){var t=O,r=un,n=fn,a=ln,i=an,o=on;function l(s,c){if(!(p=s.length))return s;var u=s.map(function(e,r){return t.call(l,e,r)}),f=u.map(function(e){return e.map(function(e,t){return[i.call(l,e,t),o.call(l,e,t)]})}),d=r.call(l,f,c);u=e.permute(u,d),f=e.permute(f,d);var p,h,m,y,g=n.call(l,f,c),v=u[0].length;for(m=0;m<v;++m)for(a.call(l,u[0][m],y=g[m],f[0][m][1]),h=1;h<p;++h)a.call(l,u[h][m],y+=f[h-1][m][1],f[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:sn.get(e)||un,l):r},l.offset=function(e){return arguments.length?(n="function"==typeof e?e:cn.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 sn=e.map({"inside-out":function(t){var r,n,a=t.length,i=t.map(dn),o=t.map(pn),l=e.range(a).sort(function(e,t){return i[e]-i[t]}),s=0,c=0,u=[],f=[];for(r=0;r<a;++r)n=l[r],s<c?(s+=o[n],u.push(n)):(c+=o[n],f.push(n));return f.reverse().concat(u)},reverse:function(t){return e.range(t.length).reverse()},default:un}),cn=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,f=e[0],d=f.length,p=[];for(p[0]=s=c=0,r=1;r<d;++r){for(t=0,a=0;t<u;++t)a+=e[t][r][1];for(t=0,i=0,l=f[r][0]-f[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<d;++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 un(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 dn(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 pn(e){return e.reduce(hn,0)}function hn(e,t){return e+t[1]}function mn(e,t){return yn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function yn(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 gn(t){return[e.min(t),e.max(t)]}function vn(e,t){return e.value-t.value}function xn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function bn(e,t){e._pack_next=t,t._pack_prev=e}function _n(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 wn(e){if((t=e.children)&&(s=t.length)){var t,r,n,a,i,o,l,s,c=1/0,u=-1/0,f=1/0,d=-1/0;if(t.forEach(kn),(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(Mn(r,n,a=t[2]),x(a),xn(r,a),r._pack_prev=a,xn(a,n),n=r._pack_next,i=3;i<s;i++){Mn(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(_n(o,a)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!_n(l,a);l=l._pack_prev,m++);p?(h<m||h==m&&n.r<r.r?bn(r,n=o):bn(r=l,n),i--):(xn(r,a),n=a,x(a))}var y=(c+u)/2,g=(f+d)/2,v=0;for(i=0;i<s;i++)(a=t[i]).x-=y,a.y-=g,v=Math.max(v,a.r+Math.sqrt(a.x*a.x+a.y*a.y));e.r=v,t.forEach(Tn)}function x(e){c=Math.min(e.x-e.r,c),u=Math.max(e.x+e.r,u),f=Math.min(e.y-e.r,f),d=Math.max(e.y+e.r,d)}}function kn(e){e._pack_next=e._pack_prev=e}function Tn(e){delete e._pack_next,delete e._pack_prev}function Mn(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 An(e,t){return e.parent==t.parent?1:2}function Sn(e){var t=e.children;return t.length?t[0]:e.t}function Ln(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 Dn(e,t,r){return e.a.parent===t.parent?e.a:r}function On(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Pn(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 En(e){var t=e[0],r=e[e.length-1];return t<r?[t,r]:[r,t]}function Rn(e){return e.rangeExtent?e.rangeExtent():En(e.range())}function zn(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 In(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 Nn(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Fn}e.layout.histogram=function(){var t=!0,r=Number,n=gn,a=mn;function i(i,o){for(var l,s,c=[],u=i.map(r,this),f=n.call(this,u,o),d=a.call(this,f,u,o),p=(o=-1,u.length),h=d.length-1,m=t?1:1/p;++o<h;)(l=c[o]=[]).dx=d[o+1]-(l.x=d[o]),l.y=0;if(h>0)for(o=-1;++o<p;)(s=u[o])>=f[0]&&s<=f[1]&&((l=c[e.bisect(d,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=dt(e),i):n},i.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return yn(t,e)}:dt(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(vn),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,Qr(l,function(e){e.r=+u(e.value)}),Qr(l,wn),n){var f=n*(t?1:Math.max(2*l.r/s,2*l.r/c))/2;Qr(l,function(e){e.r+=f}),Qr(l,wn),Qr(l,function(e){e.r-=f})}return function e(t,r,n,a){var i=t.children;t.x=r+=a*t.x;t.y=n+=a*t.y;t.r*=a;if(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},Xr(i,r)},e.layout.tree=function(){var t=e.layout.hierarchy().sort(null).value(null),r=An,n=[1,1],a=null;function i(e,i){var c=t.call(this,e,i),u=c[0],f=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(Qr(f,o),f.parent.m=-f.z,Kr(f,l),a)Kr(u,s);else{var d=u,p=u,h=u;Kr(u,function(e){e.x<d.x&&(d=e),e.x>p.x&&(p=e),e.depth>h.depth&&(h=e)});var m=r(d,p)/2-d.x,y=n[0]/(p.x+r(p,d)/2+m),g=n[1]/(h.depth||1);Kr(u,function(e){e.x=(e.x+m)*y,e.y=e.depth*g})}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,f=l.m,d=s.m;l=Ln(l),i=Sn(i),l&&i;)s=Sn(s),(o=Ln(o)).a=e,(a=l.z+f-i.z-c+r(l._,i._))>0&&(Cn(Dn(l,e,n),e,a),c+=a,u+=a),f+=l.m,c+=i.m,d+=s.m,u+=o.m;l&&!Ln(o)&&(o.t=l,o.m+=f-u),i&&!Sn(s)&&(s.t=i,s.m+=c-d,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},Xr(i,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=An,n=[1,1],a=!1;function i(i,o){var l,s=t.call(this,i,o),c=s[0],u=0;Qr(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 f=function e(t){var r=t.children;return r&&r.length?e(r[0]):t}(c),d=function e(t){var r,n=t.children;return n&&(r=n.length)?e(n[r-1]):t}(c),p=f.x-r(f,d)/2,h=d.x+r(d,f)/2;return Qr(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},Xr(i,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),n=Math.round,a=[1,1],i=null,o=On,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 f(e){var t=e.children;if(t&&t.length){var r,n,a,i=o(e),l=[],c=t.slice(),d=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))<=d?(c.pop(),d=n):(l.area-=l.pop().area,h(l,m,i,!1),m=Math.min(i.dx,i.dy),l.length=l.area=0,d=1/0);l.length&&(h(l,m,i,!0),l.length=l.area=0),t.forEach(f)}}function d(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(d)}}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?d:f)(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){return Pn(t,e)}var r;return o=null==(i=e)?On:"function"==(r=typeof e)?function(t){var r=e.call(m,t,t.depth);return null==r?On(t):Pn(t,"number"==typeof r?[r,r,r,r]:r)}:"number"===r?(e=[e,e,e,e],t):t,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},Xr(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 Fn={floor:O,ceil:O};function jn(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 Hn(e,t){return In(e,Nn(qn(e,t)[2])),In(e,Nn(qn(e,t)[2])),e}function qn(e,t){null==t&&(t=10);var r=En(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,qn(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?jn:zn,l=a?Br:jr;return i=e(t,r,l,n),o=e(r,t,l,vr),s}function s(e){return i(e)}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(Pr)};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 Hn(t,e),l()};s.copy=function(){return e(t,r,n,a)};return l()}([0,1],[0,1],vr,!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))}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=In(a.map(i),n?Math:Yn);return t.domain(e),a=e.map(o),l};l.ticks=function(){var e=En(a),t=[],l=e[0],s=e[1],c=Math.floor(i(l)),u=Math.ceil(i(s)),f=r%1?2:r;if(isFinite(u-c)){if(n){for(;c<u;c++)for(var d=1;d<f;d++)t.push(o(c)*d);t.push(o(c))}else for(t.push(o(c));c++<u;)for(var d=f-1;d>0;d--)t.push(o(c)*d);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)};return Bn(l,t)}(e.scale.linear().domain([0,1]),10,!0,[1,10])};var Yn={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Vn(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=Vn(r),i=Vn(1/r);function o(e){return t(a(e))}o.invert=function(e){return i(t.invert(e))};o.domain=function(e){return arguments.length?(t.domain((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(Hn(n,e))};o.exponent=function(e){return arguments.length?(a=Vn(r=e),i=Vn(1/r),t.domain(n.map(a)),o):r};o.copy=function(){return e(t.copy(),r,n)};return 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})}l.domain=function(e){if(!arguments.length)return r;r=[],a=new b;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],f=e[1-c],d=(f-u)/(r.length-t+2*a);return i=s(u+d*a,d),c&&i.reverse(),o=d*(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],f=e[1-c],d=Math.floor((f-u)/(r.length-t+2*a));return i=s(u+Math.round((f-u-(r.length-t)*d)/2),d),c&&i.reverse(),o=Math.round(d*(1-t)),n={t:"rangeRoundBands",a:arguments},l};l.rangeBand=function(){return o};l.rangeExtent=function(){return En(n.a[0])};l.copy=function(){return t(r,n)};return 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(Gn)},e.scale.category20b=function(){return e.scale.ordinal().range(Wn)},e.scale.category20c=function(){return e.scale.ordinal().range(Jn)};var Zn=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(nt),Gn=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(nt),Wn=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(nt),Jn=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(nt);function Xn(){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)]}o.domain=function(e){return arguments.length?(r=e.map(p).filter(h).sort(d),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)};return 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}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)};return 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)]}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)};return a}([.5],[0,1])},e.scale.identity=function(){return function e(t){function r(e){return+e}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)};return r}([0,1])},e.svg={},e.svg.arc=function(){var e=Qn,t=$n,r=Xn,n=Kn,a=ea,i=ta,o=ra;function l(){var l=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+t.apply(this,arguments)),u=a.apply(this,arguments)-Le,f=i.apply(this,arguments)-Le,d=Math.abs(f-u),p=u>f?0:1;if(c<l&&(h=c,c=l,l=h),d>=Se)return s(c,p)+(l?s(l,1-p):"")+"Z";var h,m,y,g,v,x,b,_,w,k,T,M,A=0,S=0,L=[];if((g=(+o.apply(this,arguments)||0)/2)&&(y=n===Kn?Math.sqrt(l*l+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=Oe(y/c*Math.sin(g))),l&&(A=Oe(y/l*Math.sin(g)))),c){v=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(f-S),_=c*Math.sin(f-S);var C=Math.abs(f-u-2*S)<=Me?0:1;if(S&&na(v,x,b,_)===p^C){var D=(u+f)/2;v=c*Math.cos(D),x=c*Math.sin(D),b=_=null}}else v=x=0;if(l){w=l*Math.cos(f-A),k=l*Math.sin(f-A),T=l*Math.cos(u+A),M=l*Math.sin(u+A);var O=Math.abs(u-f+2*A)<=Me?0:1;if(A&&na(w,k,T,M)===1-p^O){var P=(u+f)/2;w=l*Math.cos(P),k=l*Math.sin(P),T=M=null}}else w=k=0;if(d>ke&&(h=Math.min(Math.abs(c-l)/2,+r.apply(this,arguments)))>.001){m=l<c^p?0:1;var E=h,R=h;if(d<Me){var z=null==T?[w,k]:null==b?[v,x]:Dt([v,x],[T,M],[b,_],[w,k]),I=v-z[0],N=x-z[1],F=b-z[0],j=_-z[1],B=1/Math.sin(Math.acos((I*F+N*j)/(Math.sqrt(I*I+N*N)*Math.sqrt(F*F+j*j)))/2),H=Math.sqrt(z[0]*z[0]+z[1]*z[1]);R=Math.min(h,(l-H)/(B-1)),E=Math.min(h,(c-H)/(B+1))}if(null!=b){var q=aa(null==T?[w,k]:[T,M],[v,x],c,E,p),U=aa([b,_],[w,k],c,E,p);h===E?L.push("M",q[0],"A",E,",",E," 0 0,",m," ",q[1],"A",c,",",c," 0 ",1-p^na(q[1][0],q[1][1],U[1][0],U[1][1]),",",p," ",U[1],"A",E,",",E," 0 0,",m," ",U[0]):L.push("M",q[0],"A",E,",",E," 0 1,",m," ",U[0])}else L.push("M",v,",",x);if(null!=T){var Y=aa([v,x],[T,M],l,-R,p),V=aa([w,k],null==b?[v,x]:[b,_],l,-R,p);h===R?L.push("L",V[0],"A",R,",",R," 0 0,",m," ",V[1],"A",l,",",l," 0 ",p^na(V[1][0],V[1][1],Y[1][0],Y[1][1]),",",1-p," ",Y[1],"A",R,",",R," 0 0,",m," ",Y[0]):L.push("L",V[0],"A",R,",",R," 0 0,",m," ",Y[0])}else L.push("L",w,",",k)}else L.push("M",v,",",x),null!=b&&L.push("A",c,",",c," 0 ",C,",",p," ",b,",",_),L.push("L",w,",",k),null!=T&&L.push("A",l,",",l," 0 ",O,",",1-p," ",T,",",M);return L.push("Z"),L.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=dt(t),l):e},l.outerRadius=function(e){return arguments.length?(t=dt(e),l):t},l.cornerRadius=function(e){return arguments.length?(r=dt(e),l):r},l.padRadius=function(e){return arguments.length?(n=e==Kn?Kn:dt(e),l):n},l.startAngle=function(e){return arguments.length?(a=dt(e),l):a},l.endAngle=function(e){return arguments.length?(i=dt(e),l):i},l.padAngle=function(e){return arguments.length?(o=dt(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-Le;return[Math.cos(n)*r,Math.sin(n)*r]},l};var Kn="auto";function Qn(e){return e.innerRadius}function $n(e){return e.outerRadius}function ea(e){return e.startAngle}function ta(e){return e.endAngle}function ra(e){return e&&e.padAngle}function na(e,t,r,n){return(e-r)*t-(t-n)*e>0?0:1}function aa(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,f=e[1]+c,d=t[0]+s,p=t[1]+c,h=(u+d)/2,m=(f+p)/2,y=d-u,g=p-f,v=y*y+g*g,x=r-n,b=u*p-d*f,_=(g<0?-1:1)*Math.sqrt(Math.max(0,x*x*v-b*b)),w=(b*g-y*_)/v,k=(-b*y-g*_)/v,T=(b*g+y*_)/v,M=(-b*y+g*_)/v,A=w-h,S=k-m,L=T-h,C=M-m;return A*A+S*S>L*L+C*C&&(w=T,k=M),[[w-s,k-c],[w*r/x,k*r/x]]}function ia(){return!0}function oa(e){var t=Tt,r=Mt,n=ia,a=sa,i=a.key,o=.7;function l(i){var l,s=[],c=[],u=-1,f=i.length,d=dt(t),p=dt(r);function h(){s.push("M",a(e(c),o))}for(;++u<f;)n.call(this,l=i[u],u)?c.push([+d.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=la.get(e)||sa).key,l):i},l.tension=function(e){return arguments.length?(o=e,l):o},l}e.svg.line=function(){return oa(O)};var la=e.map({linear:sa,"linear-closed":ca,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":ua,"step-after":fa,basis:ha,"basis-open":function(e){if(e.length<4)return sa(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(ma(va,i)+","+ma(va,o)),--n;for(;++n<a;)t=e[n],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),xa(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=[ma(va,o),",",ma(va,l)],--n;for(;++n<i;)r=e[n%a],o.shift(),o.push(r[0]),l.shift(),l.push(r[1]),xa(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 ha(e)},cardinal:function(e,t){return e.length<3?sa(e):e[0]+da(e,pa(e,t))},"cardinal-open":function(e,t){return e.length<4?sa(e):e[1]+da(e.slice(1,-1),pa(e,t))},"cardinal-closed":function(e,t){return e.length<3?ca(e):e[0]+da((e.push(e[0]),e),pa([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?sa(e):e[0]+da(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]=ba(a,i);for(;++t<r;)n[t]=(o+(o=ba(a=i,i=e[t+1])))/2;return n[t]=o,n}(e),l=-1,s=e.length-1;for(;++l<s;)t=ba(e[l],e[l+1]),v(t)<ke?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 sa(e){return e.length>1?e.join("L"):e+"Z"}function ca(e){return e.join("L")+"Z"}function ua(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 da(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return sa(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 pa(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 ha(e){if(e.length<3)return sa(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",ma(va,o),",",ma(va,l)];for(e.push(e[r-1]);++t<=r;)n=e[t],o.shift(),o.push(n[0]),l.shift(),l.push(n[1]),xa(s,o,l);return e.pop(),s.push("L",n),s.join("")}function ma(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}la.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var ya=[0,2/3,1/3,0],ga=[0,1/3,2/3,0],va=[0,1/6,2/3,1/6];function xa(e,t,r){e.push("C",ma(ya,t),",",ma(ya,r),",",ma(ga,t),",",ma(ga,r),",",ma(va,t),",",ma(va,r))}function ba(e,t){return(t[1]-e[1])/(t[0]-e[0])}function _a(e){for(var t,r,n,a=-1,i=e.length;++a<i;)r=(t=e[a])[0],n=t[1]-Le,t[0]=r*Math.cos(n),t[1]=r*Math.sin(n);return e}function wa(e){var t=Tt,r=Tt,n=0,a=Mt,i=ia,o=sa,l=o.key,s=o,c="L",u=.7;function f(l){var f,d,p,h=[],m=[],y=[],g=-1,v=l.length,x=dt(t),b=dt(n),_=t===r?function(){return d}:dt(r),w=n===a?function(){return p}:dt(a);function k(){h.push("M",o(e(y),u),c,s(e(m.reverse()),u),"Z")}for(;++g<v;)i.call(this,f=l[g],g)?(m.push([d=+x.call(this,f,g),p=+b.call(this,f,g)]),y.push([+_.call(this,f,g),+w.call(this,f,g)])):m.length&&(k(),m=[],y=[]);return m.length&&k(),h.length?h.join(""):null}return f.x=function(e){return arguments.length?(t=r=e,f):r},f.x0=function(e){return arguments.length?(t=e,f):t},f.x1=function(e){return arguments.length?(r=e,f):r},f.y=function(e){return arguments.length?(n=a=e,f):a},f.y0=function(e){return arguments.length?(n=e,f):n},f.y1=function(e){return arguments.length?(a=e,f):a},f.defined=function(e){return arguments.length?(i=e,f):i},f.interpolate=function(e){return arguments.length?(l="function"==typeof e?o=e:(o=la.get(e)||sa).key,s=o.reverse||o,c=o.closed?"M":"L",f):l},f.tension=function(e){return arguments.length?(u=e,f):u},f}function ka(e){return e.source}function Ta(e){return e.target}function Ma(e){return e.radius}function Aa(e){return[e.x,e.y]}function Sa(){return 64}function La(){return"circle"}function Ca(e){var t=Math.sqrt(e/Me);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=oa(_a);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},ua.reverse=fa,fa.reverse=ua,e.svg.area=function(){return wa(O)},e.svg.area.radial=function(){var e=wa(_a);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=ka,t=Ta,r=Ma,n=ea,a=ta;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)-Le,u=a.call(e,l,o)-Le;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>Me)+",1 "+t}function s(e,t,r,n){return"Q 0,0 "+n}return i.radius=function(e){return arguments.length?(r=dt(e),i):r},i.source=function(t){return arguments.length?(e=dt(t),i):e},i.target=function(e){return arguments.length?(t=dt(e),i):t},i.startAngle=function(e){return arguments.length?(n=dt(e),i):n},i.endAngle=function(e){return arguments.length?(a=dt(e),i):a},i},e.svg.diagonal=function(){var e=ka,t=Ta,r=Aa;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=dt(t),n):e},n.target=function(e){return arguments.length?(t=dt(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=Aa,n=t.projection;return t.projection=function(e){return arguments.length?n(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Le;return[r*Math.cos(n),r*Math.sin(n)]}}(r=e)):r},t},e.svg.symbol=function(){var e=La,t=Sa;function r(r,n){return(Da.get(e.call(this,r,n))||Ca)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=dt(t),r):e},r.size=function(e){return arguments.length?(t=dt(e),r):t},r};var Da=e.map({circle:Ca,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*Pa)),r=t*Pa;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/Oa),r=t*Oa/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Oa),r=t*Oa/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=Da.keys();var Oa=Math.sqrt(3),Pa=Math.tan(30*Ce);G.transition=function(e){for(var t,r,n=Ia||++ja,a=qa(e),i=[],o=Na||{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,f=c.length;++u<f;)(r=c[u])&&Ua(r,u,a,n,o),t.push(r)}return za(i,a,n)},G.interrupt=function(e){return this.each(null==e?Ea:Ra(qa(e)))};var Ea=Ra(qa());function Ra(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 za(e,t,r){return q(e,Fa),e.namespace=t,e.id=r,e}var Ia,Na,Fa=[],ja=0;function Ba(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 Ha(e){return null==e&&(e=""),function(){this.textContent=e}}function qa(e){return null==e?"__transition__":"__transition_"+e+"__"}function Ua(e,t,r,n,a){var i,o,l,s,c,u=e[r]||(e[r]={active:0,count:0}),f=u[n];function d(r){var a=u.active,d=u[a];for(var h in d&&(d.timer.c=null,d.timer.t=NaN,--u.count,delete u[a],d.event&&d.event.interrupt.call(e,e.__data__,d.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,bt(function(){return o.c&&p(r||1)&&(o.c=null,o.t=NaN),1},0,i),u.active=n,f.event&&f.event.start.call(e,e.__data__,t),c=[],f.tween.forEach(function(r,n){(n=n.call(e,e.__data__,t))&&c.push(n)}),s=f.ease,l=f.duration}function p(a){for(var i=a/l,o=s(i),d=c.length;d>0;)c[--d].call(e,o);if(i>=1)return f.event&&f.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}f||(i=a.time,o=bt(function(e){var t=f.delay;if(o.t=t+i,t<=e)return d(e-t);o.c=d},0,i),f=u[n]={tween:new b,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++u.count)}Fa.call=G.call,Fa.empty=G.empty,Fa.node=G.node,Fa.size=G.size,e.transition=function(t,r){return t&&t.transition?Ia?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=Fa,Fa.select=function(e){var t,r,n,a=this.id,i=this.namespace,o=[];e=W(e);for(var l=-1,s=this.length;++l<s;){o.push(t=[]);for(var c=this[l],u=-1,f=c.length;++u<f;)(n=c[u])&&(r=e.call(n,n.__data__,u,l))?("__data__"in n&&(r.__data__=n.__data__),Ua(r,u,i,a,n[i][a]),t.push(r)):t.push(null)}return za(o,i,a)},Fa.selectAll=function(e){var t,r,n,a,i,o=this.id,l=this.namespace,s=[];e=J(e);for(var c=-1,u=this.length;++c<u;)for(var f=this[c],d=-1,p=f.length;++d<p;)if(n=f[d]){i=n[l][o],r=e.call(n,n.__data__,d,c),s.push(t=[]);for(var h=-1,m=r.length;++h<m;)(a=r[h])&&Ua(a,h,l,o,i),t.push(a)}return za(s,l,o)},Fa.filter=function(e){var t,r,n=[];"function"!=typeof e&&(e=ce(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 za(n,this.namespace,this.id)},Fa.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)})},Fa.attr=function(t,r){if(arguments.length<2){for(r in t)this.attr(r,t[r]);return this}var n="transform"==t?Fr:vr,a=e.ns.qualify(t);function i(){this.removeAttribute(a)}function o(){this.removeAttributeNS(a.space,a.local)}return Ba(this,"attr."+t,r,a.local?function(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))})})}:function(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))})})})},Fa.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))}})},Fa.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)}return Ba(this,"style."+e,t,function(t){return null==t?a:(t+="",function(){var n,a=o(this).getComputedStyle(this,null).getPropertyValue(e);return a!==t&&(n=vr(a,t),function(t){this.style.setProperty(e,n(t),r)})})})},Fa.styleTween=function(e,t,r){return arguments.length<3&&(r=""),this.tween("style."+e,function(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)}})},Fa.text=function(e){return Ba(this,"text",e,Ha)},Fa.remove=function(){var e=this.namespace;return this.each("end.transition",function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Fa.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}))},Fa.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}))},Fa.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}))},Fa.each=function(t,r){var n=this.id,a=this.namespace;if(arguments.length<2){var i=Na,o=Ia;try{Ia=n,ue(this,function(e,r,i){Na=e[a][n],t.call(e,e.__data__,r,i)})}finally{Na=i,Ia=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},Fa.transition=function(){for(var e,t,r,n=this.id,a=++ja,i=this.namespace,o=[],l=0,s=this.length;l<s;l++){o.push(e=[]);for(var c,u=0,f=(c=this[l]).length;u<f;u++)(t=c[u])&&Ua(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 za(o,i,a)},e.svg.axis=function(){var t,r=e.scale.linear(),a=Ya,i=6,o=6,l=3,s=[10],c=null;function u(n){n.each(function(){var n,u=e.select(this),f=this.__chart__||r,d=this.__chart__=r.copy(),p=null==c?d.ticks?d.ticks.apply(d,s):d.domain():c,h=null==t?d.tickFormat?d.tickFormat.apply(d,s):O:t,m=u.selectAll(".tick").data(p,d),y=m.enter().insert("g",".domain").attr("class","tick").style("opacity",ke),g=e.transition(m.exit()).style("opacity",ke).remove(),v=e.transition(m.order()).style("opacity",1),x=Math.max(i,0)+l,b=Rn(d),_=u.selectAll(".domain").data([0]),w=(_.enter().append("path").attr("class","domain"),e.transition(_));y.append("line"),y.append("text");var k,T,M,A,S=y.select("line"),L=v.select("line"),C=m.select("text").text(h),D=y.select("text"),P=v.select("text"),E="top"===a||"left"===a?-1:1;if("bottom"===a||"top"===a?(n=Za,k="x",M="y",T="x2",A="y2",C.attr("dy",E<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+E*o+"V0H"+b[1]+"V"+E*o)):(n=Ga,k="y",M="x",T="y2",A="x2",C.attr("dy",".32em").style("text-anchor",E<0?"end":"start"),w.attr("d","M"+E*o+","+b[0]+"H0V"+b[1]+"H"+E*o)),S.attr(A,E*i),D.attr(M,E*x),L.attr(T,0).attr(A,E*i),P.attr(k,0).attr(M,E*x),d.rangeBand){var R=d,z=R.rangeBand()/2;f=d=function(e){return R(e)+z}}else f.rangeBand?f=d:g.call(n,d,f);y.call(n,f,d),v.call(n,d,d)})}return u.scale=function(e){return arguments.length?(r=e,u):r},u.orient=function(e){return arguments.length?(a=e in Va?e+"":Ya,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 Ya="bottom",Va={top:1,right:1,bottom:1,left:1};function Za(e,t,r){e.attr("transform",function(e){var n=t(e);return"translate("+(isFinite(n)?n:r(e))+",0)"})}function Ga(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=B(d,"brushstart","brush","brushend"),a=null,i=null,l=[0,0],s=[0,0],c=!0,u=!0,f=Ja[0];function d(t){t.each(function(){var t=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",y).on("touchstart.brush",y),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(f,O);n.exit().remove(),n.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Wa[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",d.empty()?"none":null);var o,l=e.transition(t),s=e.transition(r);a&&(o=Rn(a),s.attr("x",o[0]).attr("width",o[1]-o[0]),h(l)),i&&(o=Rn(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 y(){var f,y,g=this,v=e.select(e.event.target),x=n.of(g,arguments),b=e.select(g),_=v.datum(),w=!/^(n|s)$/.test(_)&&a,k=!/^(e|w)$/.test(_)&&i,T=v.classed("extent"),M=xe(g),A=e.mouse(g),S=e.select(o(g)).on("keydown.brush",function(){32==e.event.keyCode&&(T||(f=null,A[0]-=l[1],A[1]-=s[1],T=2),F())}).on("keyup.brush",function(){32==e.event.keyCode&&2==T&&(A[0]+=l[1],A[1]+=s[1],T=0,F())});if(e.event.changedTouches?S.on("touchmove.brush",D).on("touchend.brush",P):S.on("mousemove.brush",D).on("mouseup.brush",P),b.interrupt().selectAll("*").interrupt(),T)A[0]=l[0]-A[0],A[1]=s[0]-A[1];else if(_){var L=+/w$/.test(_),C=+/^n/.test(_);y=[l[1-L]-A[0],s[1-C]-A[1]],A[0]=l[L],A[1]=s[C]}else e.event.altKey&&(f=A.slice());function D(){var t=e.mouse(g),r=!1;y&&(t[0]+=y[0],t[1]+=y[1]),T||(e.event.altKey?(f||(f=[(l[0]+l[1])/2,(s[0]+s[1])/2]),A[0]=l[+(t[0]<f[0])],A[1]=s[+(t[1]<f[1])]):f=null),w&&O(t,a,0)&&(h(b),r=!0),k&&O(t,i,1)&&(m(b),r=!0),r&&(p(b),x({type:"brush",mode:T?"move":"resize"}))}function O(e,n,a){var i,o,d=Rn(n),p=d[0],h=d[1],m=A[a],y=a?s:l,g=y[1]-y[0];if(T&&(p-=m,h-=g+m),i=(a?u:c)?Math.max(p,Math.min(h,e[a])):e[a],T?o=(i+=m)+g:(f&&(m=Math.max(p,Math.min(h,2*f[a]-i))),m<i?(o=i,i=m):o=m),y[0]!=i||y[1]!=o)return a?r=null:t=null,y[0]=i,y[1]=o,!0}function P(){D(),b.style("pointer-events","all").selectAll(".resize").style("display",d.empty()?"none":null),e.select("body").style("cursor",null),S.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),M(),x({type:"brushend"})}b.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",v.style("cursor")),x({type:"brushstart"}),D()}return d.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,Ia?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"}))})},d.x=function(e){return arguments.length?(f=Ja[!(a=e)<<1|!i],d):a},d.y=function(e){return arguments.length?(f=Ja[!a<<1|!(i=e)],d):i},d.clamp=function(e){return arguments.length?(a&&i?(c=!!e[0],u=!!e[1]):a?c=!!e:i&&(u=!!e),d):a&&i?[c,u]:a?c:i?u:null},d.extent=function(e){var n,o,c,u,f;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&&(f=n,n=o,o=f),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&&(f=c,c=u,u=f),c==s[0]&&u==s[1]||(s=[c,u])),d):(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&&(f=n,n=o,o=f))),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&&(f=c,c=u,u=f))),a&&i?[[n,c],[o,u]]:a?[n,o]:i&&[c,u])},d.clear=function(){return d.empty()||(l=[0,0],s=[0,0],t=r=null),d},d.empty=function(){return!!a&&l[0]==l[1]||!!i&&s[0]==s[1]},e.rebind(d,n,"on")};var Wa={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ja=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];function Xa(e){return JSON.parse(e.responseText)}function Ka(e){var t=a.createRange();return t.selectNode(a.body),t.createContextualFragment(e.responseText)}e.text=pt(function(e){return e.responseText}),e.json=function(e,t){return ht(e,"application/json",Xa,t)},e.html=function(e,t){return ht(e,"text/html",Ka,t)},e.xml=pt(function(e){return e.responseXML}),"object"==typeof t&&t.exports?t.exports=e:this.d3=e}).apply(self)},{}],21:[function(e,t,r){(function(r){(function(){"use strict";var n=e("object-assign");function a(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a<i;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0}function i(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var o=e("util/"),l=Object.prototype.hasOwnProperty,s=Array.prototype.slice,c="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function f(e){return!i(e)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var d=t.exports=v,p=/\s*function\s+([^\(\s]*)\s*/;function h(e){if(o.isFunction(e)){if(c)return e.name;var t=e.toString().match(p);return t&&t[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function y(e){if(c||!o.isFunction(e))return o.inspect(e);var t=h(e);return"[Function"+(t?": "+t:"")+"]"}function g(e,t,r,n,a){throw new d.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:a})}function v(e,t){e||g(e,!0,t,"==",d.ok)}function x(e,t,r,n){if(e===t)return!0;if(i(e)&&i(t))return 0===a(e,t);if(o.isDate(e)&&o.isDate(t))return e.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(f(e)&&f(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===a(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;var l=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==l&&l===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(o.isPrimitive(e)||o.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var a=b(e),i=b(t);if(a&&!i||!a&&i)return!1;if(a)return e=s.call(e),t=s.call(t),x(e,t,r);var l,c,u=k(e),f=k(t);if(u.length!==f.length)return!1;for(u.sort(),f.sort(),c=u.length-1;c>=0;c--)if(u[c]!==f[c])return!1;for(c=u.length-1;c>=0;c--)if(l=u[c],!x(e[l],t[l],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function _(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,r,n){var a;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),a=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!a&&g(a,r,"Missing expected exception"+n);var i="string"==typeof n,l=!e&&a&&!r;if((!e&&o.isError(a)&&i&&_(a,r)||l)&&g(a,r,"Got unwanted exception"+n),e&&a&&r&&!_(a,r)||!e&&a)throw a}d.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=m(y((t=this).actual),128)+" "+t.operator+" "+m(y(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var a=n.stack,i=h(r),o=a.indexOf("\n"+i);if(o>=0){var l=a.indexOf("\n",o+1);a=a.substring(l+1)}this.stack=a}}},o.inherits(d.AssertionError,Error),d.fail=g,d.ok=v,d.equal=function(e,t,r){e!=t&&g(e,t,r,"==",d.equal)},d.notEqual=function(e,t,r){e==t&&g(e,t,r,"!=",d.notEqual)},d.deepEqual=function(e,t,r){x(e,t,!1)||g(e,t,r,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(e,t,r){x(e,t,!0)||g(e,t,r,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(e,t,r){x(e,t,!1)&&g(e,t,r,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function e(t,r,n){x(t,r,!0)&&g(t,r,n,"notDeepStrictEqual",e)},d.strictEqual=function(e,t,r){e!==t&&g(e,t,r,"===",d.strictEqual)},d.notStrictEqual=function(e,t,r){e===t&&g(e,t,r,"!==",d.notStrictEqual)},d.throws=function(e,t,r){w(!0,e,t,r)},d.doesNotThrow=function(e,t,r){w(!1,e,t,r)},d.ifError=function(e){if(e)throw e},d.strict=n(function e(t,r){t||g(t,!0,r,"==",e)},d,{equal:d.strictEqual,deepEqual:d.deepStrictEqual,notEqual:d.notStrictEqual,notDeepEqual:d.notDeepStrictEqual}),d.strict.strict=d.strict;var k=Object.keys||function(e){var t=[];for(var r in e)l.call(e,r)&&t.push(r);return t}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":73,"util/":24}],22:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],23:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],24:[function(e,t,r){(function(t,n){(function(){var a=/%[sdj%]/g;r.format=function(e){if(!g(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(l(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,o=String(e).replace(a,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<i;s=n[++r])m(s)||!b(s)?o+=" "+s:o+=" "+l(s);return o},r.deprecate=function(e,a){if(v(n.process))return function(){return r.deprecate(e,a).apply(this,arguments)};if(!0===t.noDeprecation)return e;var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(a);t.traceDeprecation?console.trace(a):console.error(a),i=!0}return e.apply(this,arguments)}};var i,o={};function l(e,t){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),h(t)?n.showHidden=t:t&&r._extend(n,t),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,e,n.depth)}function s(e,t){var r=l.styles[t];return r?"["+l.colors[r][0]+"m"+e+"["+l.colors[r][1]+"m":e}function c(e,t){return e}function u(e,t,n){if(e.customInspect&&t&&k(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var a=t.inspect(n,e);return g(a)||(a=u(e,a,n)),a}var i=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(g(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(h(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(e,t);if(i)return i;var o=Object.keys(t),l=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),w(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(t);if(0===o.length){if(k(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(x(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(_(t))return e.stylize(Date.prototype.toString.call(t),"date");if(w(t))return f(t)}var c,b="",T=!1,M=["{","}"];(p(t)&&(T=!0,M=["[","]"]),k(t))&&(b=" [Function"+(t.name?": "+t.name:"")+"]");return x(t)&&(b=" "+RegExp.prototype.toString.call(t)),_(t)&&(b=" "+Date.prototype.toUTCString.call(t)),w(t)&&(b=" "+f(t)),0!==o.length||T&&0!=t.length?n<0?x(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=T?function(e,t,r,n,a){for(var i=[],o=0,l=t.length;o<l;++o)S(t,String(o))?i.push(d(e,t,r,n,String(o),!0)):i.push("");return a.forEach(function(a){a.match(/^\d+$/)||i.push(d(e,t,r,n,a,!0))}),i}(e,t,n,l,o):o.map(function(r){return d(e,t,n,l,r,T)}),e.seen.pop(),function(e,t,r){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,b,M)):M[0]+b+M[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,a,i){var o,l,s;if((s=Object.getOwnPropertyDescriptor(t,a)||{value:t[a]}).get?l=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(l=e.stylize("[Setter]","special")),S(n,a)||(o="["+a+"]"),l||(e.seen.indexOf(s.value)<0?(l=m(r)?u(e,s.value,null):u(e,s.value,r-1)).indexOf("\n")>-1&&(l=i?l.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+l.split("\n").map(function(e){return" "+e}).join("\n")):l=e.stylize("[Circular]","special")),v(o)){if(i&&a.match(/^\d+$/))return l;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+l}function p(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function y(e){return"number"==typeof e}function g(e){return"string"==typeof e}function v(e){return void 0===e}function x(e){return b(e)&&"[object RegExp]"===T(e)}function b(e){return"object"==typeof e&&null!==e}function _(e){return b(e)&&"[object Date]"===T(e)}function w(e){return b(e)&&("[object Error]"===T(e)||e instanceof Error)}function k(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function M(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(v(i)&&(i=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var n=t.pid;o[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else o[e]=function(){};return o[e]},r.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=h,r.isNull=m,r.isNullOrUndefined=function(e){return null==e},r.isNumber=y,r.isString=g,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=v,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=k,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t;console.log("%s - %s",(e=new Date,t=[M(e.getHours()),M(e.getMinutes()),M(e.getSeconds())].join(":"),[e.getDate(),A[e.getMonth()],t].join(" ")),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!b(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":23,_process:99,inherits:22}],25:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=c(e),o=n[0],l=n[1],s=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,l)),u=0,f=l>0?o-4:o;for(r=0;r<f;r+=4)t=a[e.charCodeAt(r)]<<18|a[e.charCodeAt(r+1)]<<12|a[e.charCodeAt(r+2)]<<6|a[e.charCodeAt(r+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=255&t;2===l&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,s[u++]=255&t);1===l&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,s[u++]=t>>8&255,s[u++]=255&t);return s},r.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],o=0,l=r-a;o<l;o+=16383)i.push(u(e,o,o+16383>l?l:o+16383));1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],a=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,s=o.length;l<s;++l)n[l]=o[l],a[o.charCodeAt(l)]=l;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var a,i,o=[],l=t;l<r;l+=3)a=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(255&e[l+2]),o.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],26:[function(e,t,r){},{}],27:[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 f(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 d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=function(){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)}.bind(n);return a.listener=r,n.wrapFn=a,a}function p(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):m(a,a.length)}function h(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 m(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=m(s,c);for(r=0;r<c;++r)i(u[r],this,t)}return!0},l.prototype.addListener=function(e,t){return f(this,e,t,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(e,t){return f(this,e,t,!0)},l.prototype.once=function(e,t){return c(t),this.on(e,d(this,e,t)),this},l.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,d(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 p(this,e,!0)},l.prototype.rawListeners=function(e){return p(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},l.prototype.listenerCount=h,l.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],28:[function(e,t,r){(function(t){(function(){"use strict";var t=e("base64-js"),n=e("ieee754");r.Buffer=o,r.SlowBuffer=function(e){+e!=e&&(e=0);return o.alloc(+e)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function i(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=o.prototype,t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=i(r),a=n.write(e,t);a!==r&&(n=n.slice(0,a));return n}(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=o.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var a=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=i(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(void 0!==e.length)return"number"!=typeof e.length||B(e.length)?i(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return s(e),i(e<0?0:0|f(e))}function u(e){for(var t=e.length<0?0:0|f(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function d(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(e).length;default:if(a)return n?-1:I(e).length;t=(""+t).toLowerCase(),a=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function h(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),B(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,a){var i,o=1,l=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,l/=2,s/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var u=-1;for(i=r;i<l;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===s)return u*o}else-1!==u&&(i-=i-u),u=-1}else for(r+s>l&&(r=l-s),i=r;i>=0;i--){for(var f=!0,d=0;d<s;d++)if(c(e,i+d)!==c(t,d)){f=!1;break}if(f)return i}return-1}function y(e,t,r,n){r=Number(r)||0;var a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;var i=t.length;n>i/2&&(n=i/2);for(var o=0;o<n;++o){var l=parseInt(t.substr(2*o,2),16);if(B(l))return o;e[r+o]=l}return o}function g(e,t,r,n){return F(I(t,e.length-r),e,r,n)}function v(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function x(e,t,r,n){return v(e,t,r,n)}function b(e,t,r,n){return F(N(t),e,r,n)}function _(e,t,r,n){return F(function(e,t){for(var r,n,a,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function w(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a<r;){var i,o,l,s,c=e[a],u=null,f=c>239?4:c>223?3:c>191?2:1;if(a+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[a+1]))&&(s=(31&c)<<6|63&i)>127&&(u=s);break;case 3:i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&(s=(15&c)<<12|(63&i)<<6|63&o)>2047&&(s<55296||s>57343)&&(u=s);break;case 4:i=e[a+1],o=e[a+2],l=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&l)&&(s=(15&c)<<18|(63&i)<<12|(63&o)<<6|63&l)>65535&&s<1114112&&(u=s)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),a+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=T));return r}(n)}r.kMaxLength=a,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(e,t,r){return l(e,t,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(e,t,r){return function(e,t,r){return s(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},o.allocUnsafe=function(e){return c(e)},o.allocUnsafeSlow=function(e){return c(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(j(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),j(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a<i;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),a=0;for(r=0;r<e.length;++r){var i=e[r];if(j(i,Uint8Array)&&(i=o.from(i)),!o.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,a),a+=i.length}return n},o.byteLength=d,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return w(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},o.prototype.compare=function(e,t,r,n,a){if(j(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(n>>>=0),l=(r>>>=0)-(t>>>=0),s=Math.min(i,l),c=this.slice(n,a),u=e.slice(t,r),f=0;f<s;++f)if(c[f]!==u[f]){i=c[f],l=u[f];break}return i<l?-1:l<i?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return h(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return h(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return g(this,e,t,r);case"ascii":return v(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return b(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function M(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}function A(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}function S(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var a="",i=t;i<r;++i)a+=z(e[i]);return a}function L(e,t,r){for(var n=e.slice(t,r),a="",i=0;i<n.length;i+=2)a+=String.fromCharCode(n[i]+256*n[i+1]);return a}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,a,i){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function O(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,a,i){return t=+t,r>>>=0,i||O(e,0,r,4),n.write(e,t,r,a,23,4),r+4}function E(e,t,r,a,i){return t=+t,r>>>=0,i||O(e,0,r,8),n.write(e,t,r,a,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=o.prototype,n},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},o.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n>=(a*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},o.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),n.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),n.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),n.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),n.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||D(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i<r&&(a*=256);)this[t+i]=e/a&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||D(this,e,t,r,Math.pow(2,8*r)-1,0);var a=r-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);D(this,e,t,r,a-1,-a)}var i=0,o=1,l=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===l&&0!==this[t+i-1]&&(l=1),this[t+i]=(e/o>>0)-l&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);D(this,e,t,r,a-1,-a)}var i=r-1,o=1,l=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===l&&0!==this[t+i+1]&&(l=1),this[t+i]=(e/o>>0)-l&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return E(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return E(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var a=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var i=a-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return a},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var l=o.isBuffer(e)?e:o.from(e,n),s=l.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=l[i%s]}return this};var R=/[^+/0-9A-Za-z-_]/g;function z(e){return e<16?"0"+e.toString(16):e.toString(16)}function I(e,t){var r;t=t||1/0;for(var n=e.length,a=null,i=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function N(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var a=0;a<n&&!(a+r>=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function B(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":25,buffer:28,ieee754:66}],29:[function(e,t,r){var n;n=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,f=Array.prototype.map,d=["y","z","a","f","p","n","µ","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=f.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]})}}(f.call(e.numerals,String)),m=void 0===e.percent?"%":e.percent+"",y=void 0===e.minus?"-":e.minus+"",g=void 0===e.nan?"NaN":e.nan+"";function v(e){var t=(e=i(e)).fill,r=e.align,a=e.sign,c=e.symbol,f=e.zero,v=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"),(f||"0"===t&&"="===r)&&(f=!0,t="0",r="=");var k="$"===c?l:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T="$"===c?u:/[%p]/.test(w)?m:"",M=s[w],A=/[defgprs%]/.test(w);function S(e){var i,l,s,c=k,u=T;if("c"===w)u=M(e)+u,e="";else{var m=(e=+e)<0||1/e<0;if(e=isNaN(e)?g:M(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:y:"-"===a||"("===a?"":a)+c,u=("s"===w?d[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&&!f&&(e=o(e,1/0));var S=c.length+e.length+u.length,L=S<v?new Array(v-S+1).join(t):"";switch(x&&f&&(e=o(L+e,L.length?v-u.length:1/0),L=""),r){case"<":e=c+e+u+L;break;case"=":e=c+L+e+u;break;case"^":e=L.slice(0,S=L.length>>1)+c+e+u+L.slice(S);break;default:e=L+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)),S.toString=function(){return e+""},S}return{format:v,formatPrefix:function(e,t){var n=v(((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=d[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})}("object"==typeof r&&void 0!==t?r:(n="undefined"!=typeof globalThis?globalThis:n||self).d3=n.d3||{})},{}],30:[function(e,t,r){var n,a;n=this,a=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,f=e.shortDays,d=e.months,ve=e.shortMonths,xe=p(c),be=h(c),_e=p(u),we=h(u),ke=p(f),Te=h(f),Me=p(d),Ae=h(d),Se=p(ve),Le=h(ve),Ce={a:function(e){return f[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return ve[e.getMonth()]},B:function(e){return d[e.getMonth()]},c:null,d:z,e:z,f:B,H:I,I:N,j:F,L:j,m:H,M:q,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ye,s:ge,S:U,u:Y,U:V,V:Z,w:G,W:W,x:null,X:null,y:J,Y:X,Z:K,"%":me},De={a:function(e){return f[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return ve[e.getUTCMonth()]},B:function(e){return d[e.getUTCMonth()]},c:null,d:Q,e:Q,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:ye,s:ge,S:oe,u:le,U:se,V:ce,w:ue,W:fe,x:null,X:null,y:de,Y:pe,Z:he,"%":me},Oe={a:function(e,t,r){var n=ke.exec(t.slice(r));return n?(e.w=Te[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=Se.exec(t.slice(r));return n?(e.m=Le[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=Me.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:M,e:M,f:O,H:S,I:S,j:A,L:D,m:T,M:L,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:k,Q:E,s:R,S:C,u:y,U:g,V:v,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 Ee(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 Ce.x=Pe(o,Ce),Ce.X=Pe(s,Ce),Ce.c=Pe(i,Ce),De.x=Pe(o,De),De.X=Pe(s,De),De.c=Pe(i,De),{format:function(e){var t=Pe(e+="",Ce);return t.toString=function(){return e},t},parse:function(e){var t=Ee(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Pe(e+="",De);return t.toString=function(){return e},t},utcParse:function(e){var t=Ee(e+="",!0);return t.toString=function(){return e},t}}}var o,l={"-":"",_:" ",0:"0"},s=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(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 d(e){return e.replace(u,"\\$&")}function p(e){return new RegExp("^(?:"+e.map(d).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 y(e,t,r){var n=s.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function g(e,t,r){var n=s.exec(t.slice(r,r+2));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.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 k(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 T(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 M(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 S(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function L(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function C(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function D(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 E(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 f(e.getDate(),t,2)}function I(e,t){return f(e.getHours(),t,2)}function N(e,t){return f(e.getHours()%12||12,t,2)}function F(e,r){return f(1+t.timeDay.count(t.timeYear(e),e),r,3)}function j(e,t){return f(e.getMilliseconds(),t,3)}function B(e,t){return j(e,t)+"000"}function H(e,t){return f(e.getMonth()+1,t,2)}function q(e,t){return f(e.getMinutes(),t,2)}function U(e,t){return f(e.getSeconds(),t,2)}function Y(e){var t=e.getDay();return 0===t?7:t}function V(e,r){return f(t.timeSunday.count(t.timeYear(e)-1,e),r,2)}function Z(e,r){var n=e.getDay();return e=n>=4||0===n?t.timeThursday(e):t.timeThursday.ceil(e),f(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),r,2)}function G(e){return e.getDay()}function W(e,r){return f(t.timeMonday.count(t.timeYear(e)-1,e),r,2)}function J(e,t){return f(e.getFullYear()%100,t,2)}function X(e,t){return f(e.getFullYear()%1e4,t,4)}function K(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+f(t/60|0,"0",2)+f(t%60,"0",2)}function Q(e,t){return f(e.getUTCDate(),t,2)}function $(e,t){return f(e.getUTCHours(),t,2)}function ee(e,t){return f(e.getUTCHours()%12||12,t,2)}function te(e,r){return f(1+t.utcDay.count(t.utcYear(e),e),r,3)}function re(e,t){return f(e.getUTCMilliseconds(),t,3)}function ne(e,t){return re(e,t)+"000"}function ae(e,t){return f(e.getUTCMonth()+1,t,2)}function ie(e,t){return f(e.getUTCMinutes(),t,2)}function oe(e,t){return f(e.getUTCSeconds(),t,2)}function le(e){var t=e.getUTCDay();return 0===t?7:t}function se(e,r){return f(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),f(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),r,2)}function ue(e){return e.getUTCDay()}function fe(e,r){return f(t.utcMonday.count(t.utcYear(e)-1,e),r,2)}function de(e,t){return f(e.getUTCFullYear()%100,t,2)}function pe(e,t){return f(e.getUTCFullYear()%1e4,t,4)}function he(){return"+0000"}function me(){return"%"}function ye(e){return+e}function ge(e){return Math.floor(+e/1e3)}function ve(t){return o=i(t),e.timeFormat=o.format,e.timeParse=o.parse,e.utcFormat=o.utcFormat,e.utcParse=o.utcParse,o}ve({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"),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=ve,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof r&&void 0!==t?a(r,e("d3-time")):a((n=n||self).d3=n.d3||{},n.d3)},{"d3-time":31}],31:[function(e,t,r){var n;n=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=6e4,l=6048e5,s=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()}),c=s.range,u=n(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+t*o)},function(e,t){return(t-e)/o},function(e){return e.getMinutes()}),f=u.range,d=n(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-e.getMinutes()*o)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),p=d.range,h=n(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*o)/864e5},function(e){return e.getDate()-1}),m=h.range;function y(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-(t.getTimezoneOffset()-e.getTimezoneOffset())*o)/l})}var g=y(0),v=y(1),x=y(2),b=y(3),_=y(4),w=y(5),k=y(6),T=g.range,M=v.range,A=x.range,S=b.range,L=_.range,C=w.range,D=k.range,O=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()}),P=O.range,E=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()});E.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 R=E.range,z=n(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*o)},function(e,t){return(t-e)/o},function(e){return e.getUTCMinutes()}),I=z.range,N=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()}),F=N.range,j=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}),B=j.range;function H(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)/l})}var q=H(0),U=H(1),Y=H(2),V=H(3),Z=H(4),G=H(5),W=H(6),J=q.range,X=U.range,K=Y.range,Q=V.range,$=Z.range,ee=G.range,te=W.range,re=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()}),ne=re.range,ae=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()});ae.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 ie=ae.range;e.timeDay=h,e.timeDays=m,e.timeFriday=w,e.timeFridays=C,e.timeHour=d,e.timeHours=p,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=u,e.timeMinutes=f,e.timeMonday=v,e.timeMondays=M,e.timeMonth=O,e.timeMonths=P,e.timeSaturday=k,e.timeSaturdays=D,e.timeSecond=s,e.timeSeconds=c,e.timeSunday=g,e.timeSundays=T,e.timeThursday=_,e.timeThursdays=L,e.timeTuesday=x,e.timeTuesdays=A,e.timeWednesday=b,e.timeWednesdays=S,e.timeWeek=g,e.timeWeeks=T,e.timeYear=E,e.timeYears=R,e.utcDay=j,e.utcDays=B,e.utcFriday=G,e.utcFridays=ee,e.utcHour=N,e.utcHours=F,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=z,e.utcMinutes=I,e.utcMonday=U,e.utcMondays=X,e.utcMonth=re,e.utcMonths=ne,e.utcSaturday=W,e.utcSaturdays=te,e.utcSecond=s,e.utcSeconds=c,e.utcSunday=q,e.utcSundays=J,e.utcThursday=Z,e.utcThursdays=$,e.utcTuesday=Y,e.utcTuesdays=K,e.utcWednesday=V,e.utcWednesdays=Q,e.utcWeek=q,e.utcWeeks=J,e.utcYear=ae,e.utcYears=ie,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof r&&void 0!==t?r:(n=n||self).d3=n.d3||{})},{}],32:[function(e,t,r){arguments[4][31][0].apply(r,arguments)},{dup:31}],33:[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":70}],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],f=t[9],d=t[10],p=t[11],h=t[12],m=t[13],y=t[14],g=t[15];return e[0]=l*(d*g-p*y)-f*(s*g-c*y)+m*(s*p-c*d),e[1]=-(n*(d*g-p*y)-f*(a*g-i*y)+m*(a*p-i*d)),e[2]=n*(s*g-c*y)-l*(a*g-i*y)+m*(a*c-i*s),e[3]=-(n*(s*p-c*d)-l*(a*p-i*d)+f*(a*c-i*s)),e[4]=-(o*(d*g-p*y)-u*(s*g-c*y)+h*(s*p-c*d)),e[5]=r*(d*g-p*y)-u*(a*g-i*y)+h*(a*p-i*d),e[6]=-(r*(s*g-c*y)-o*(a*g-i*y)+h*(a*c-i*s)),e[7]=r*(s*p-c*d)-o*(a*p-i*d)+u*(a*c-i*s),e[8]=o*(f*g-p*m)-u*(l*g-c*m)+h*(l*p-c*f),e[9]=-(r*(f*g-p*m)-u*(n*g-i*m)+h*(n*p-i*f)),e[10]=r*(l*g-c*m)-o*(n*g-i*m)+h*(n*c-i*l),e[11]=-(r*(l*p-c*f)-o*(n*p-i*f)+u*(n*c-i*l)),e[12]=-(o*(f*y-d*m)-u*(l*y-s*m)+h*(l*d-s*f)),e[13]=r*(f*y-d*m)-u*(n*y-a*m)+h*(n*d-a*f),e[14]=-(r*(l*y-s*m)-o*(n*y-a*m)+h*(n*s-a*l)),e[15]=r*(l*d-s*f)-o*(n*d-a*f)+u*(n*s-a*l),e}},{}],35:[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}},{}],36:[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}},{}],37:[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}},{}],38:[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],f=e[10],d=e[11],p=e[12],h=e[13],m=e[14],y=e[15];return(t*o-r*i)*(f*y-d*m)-(t*l-n*i)*(u*y-d*h)+(t*s-a*i)*(u*m-f*h)+(r*l-n*o)*(c*y-d*p)-(r*s-a*o)*(c*m-f*p)+(n*s-a*l)*(c*h-u*p)}},{}],39:[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,f=n*l,d=a*o,p=a*l,h=a*s,m=i*o,y=i*l,g=i*s;return e[0]=1-f-h,e[1]=u+g,e[2]=d-y,e[3]=0,e[4]=u-g,e[5]=1-c-h,e[6]=p+m,e[7]=0,e[8]=d+y,e[9]=p-m,e[10]=1-c-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],40:[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}},{}],41:[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,f=n*s,d=n*c,p=a*s,h=a*c,m=i*c,y=o*l,g=o*s,v=o*c;return e[0]=1-(p+m),e[1]=f+v,e[2]=d-g,e[3]=0,e[4]=f-v,e[5]=1-(u+m),e[6]=h+y,e[7]=0,e[8]=d+g,e[9]=h-y,e[10]=1-(u+p),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},{}],42:[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}},{}],43:[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}},{}],44:[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}},{}],45:[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}},{}],46:[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}},{}],47:[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}},{}],48:[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}},{}],49:[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":34,"./clone":35,"./copy":36,"./create":37,"./determinant":38,"./fromQuat":39,"./fromRotation":40,"./fromRotationTranslation":41,"./fromScaling":42,"./fromTranslation":43,"./fromXRotation":44,"./fromYRotation":45,"./fromZRotation":46,"./frustum":47,"./identity":48,"./invert":50,"./lookAt":51,"./multiply":52,"./ortho":53,"./perspective":54,"./perspectiveFromFieldOfView":55,"./rotate":56,"./rotateX":57,"./rotateY":58,"./rotateZ":59,"./scale":60,"./str":61,"./translate":62,"./transpose":63}],50:[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],f=t[9],d=t[10],p=t[11],h=t[12],m=t[13],y=t[14],g=t[15],v=r*l-n*o,x=r*s-a*o,b=r*c-i*o,_=n*s-a*l,w=n*c-i*l,k=a*c-i*s,T=u*m-f*h,M=u*y-d*h,A=u*g-p*h,S=f*y-d*m,L=f*g-p*m,C=d*g-p*y,D=v*C-x*L+b*S+_*A-w*M+k*T;if(!D)return null;return D=1/D,e[0]=(l*C-s*L+c*S)*D,e[1]=(a*L-n*C-i*S)*D,e[2]=(m*k-y*w+g*_)*D,e[3]=(d*w-f*k-p*_)*D,e[4]=(s*A-o*C-c*M)*D,e[5]=(r*C-a*A+i*M)*D,e[6]=(y*b-h*k-g*x)*D,e[7]=(u*k-d*b+p*x)*D,e[8]=(o*L-l*A+c*T)*D,e[9]=(n*A-r*L-i*T)*D,e[10]=(h*w-m*b+g*v)*D,e[11]=(f*b-u*w-p*v)*D,e[12]=(l*M-o*S-s*T)*D,e[13]=(r*S-n*M+a*T)*D,e[14]=(m*x-h*_-y*v)*D,e[15]=(u*_-f*x+d*v)*D,e}},{}],51:[function(e,t,r){var n=e("./identity");t.exports=function(e,t,r,a){var i,o,l,s,c,u,f,d,p,h,m=t[0],y=t[1],g=t[2],v=a[0],x=a[1],b=a[2],_=r[0],w=r[1],k=r[2];if(Math.abs(m-_)<1e-6&&Math.abs(y-w)<1e-6&&Math.abs(g-k)<1e-6)return n(e);f=m-_,d=y-w,p=g-k,h=1/Math.sqrt(f*f+d*d+p*p),i=x*(p*=h)-b*(d*=h),o=b*(f*=h)-v*p,l=v*d-x*f,(h=Math.sqrt(i*i+o*o+l*l))?(i*=h=1/h,o*=h,l*=h):(i=0,o=0,l=0);s=d*l-p*o,c=p*i-f*l,u=f*o-d*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]=f,e[3]=0,e[4]=o,e[5]=c,e[6]=d,e[7]=0,e[8]=l,e[9]=u,e[10]=p,e[11]=0,e[12]=-(i*m+o*y+l*g),e[13]=-(s*m+c*y+u*g),e[14]=-(f*m+d*y+p*g),e[15]=1,e}},{"./identity":48}],52:[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],f=t[8],d=t[9],p=t[10],h=t[11],m=t[12],y=t[13],g=t[14],v=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*l+_*f+w*m,e[1]=x*a+b*s+_*d+w*y,e[2]=x*i+b*c+_*p+w*g,e[3]=x*o+b*u+_*h+w*v,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*l+_*f+w*m,e[5]=x*a+b*s+_*d+w*y,e[6]=x*i+b*c+_*p+w*g,e[7]=x*o+b*u+_*h+w*v,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*l+_*f+w*m,e[9]=x*a+b*s+_*d+w*y,e[10]=x*i+b*c+_*p+w*g,e[11]=x*o+b*u+_*h+w*v,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*l+_*f+w*m,e[13]=x*a+b*s+_*d+w*y,e[14]=x*i+b*c+_*p+w*g,e[15]=x*o+b*u+_*h+w*v,e}},{}],53:[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}},{}],54:[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}},{}],55:[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}},{}],56:[function(e,t,r){t.exports=function(e,t,r,n){var a,i,o,l,s,c,u,f,d,p,h,m,y,g,v,x,b,_,w,k,T,M,A,S,L=n[0],C=n[1],D=n[2],O=Math.sqrt(L*L+C*C+D*D);if(Math.abs(O)<1e-6)return null;L*=O=1/O,C*=O,D*=O,a=Math.sin(r),i=Math.cos(r),o=1-i,l=t[0],s=t[1],c=t[2],u=t[3],f=t[4],d=t[5],p=t[6],h=t[7],m=t[8],y=t[9],g=t[10],v=t[11],x=L*L*o+i,b=C*L*o+D*a,_=D*L*o-C*a,w=L*C*o-D*a,k=C*C*o+i,T=D*C*o+L*a,M=L*D*o+C*a,A=C*D*o-L*a,S=D*D*o+i,e[0]=l*x+f*b+m*_,e[1]=s*x+d*b+y*_,e[2]=c*x+p*b+g*_,e[3]=u*x+h*b+v*_,e[4]=l*w+f*k+m*T,e[5]=s*w+d*k+y*T,e[6]=c*w+p*k+g*T,e[7]=u*w+h*k+v*T,e[8]=l*M+f*A+m*S,e[9]=s*M+d*A+y*S,e[10]=c*M+p*A+g*S,e[11]=u*M+h*A+v*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e}},{}],57:[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],f=t[10],d=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+f*n,e[7]=s*a+d*n,e[8]=c*a-i*n,e[9]=u*a-o*n,e[10]=f*a-l*n,e[11]=d*a-s*n,e}},{}],58:[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],f=t[10],d=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-f*n,e[3]=s*a-d*n,e[8]=i*n+c*a,e[9]=o*n+u*a,e[10]=l*n+f*a,e[11]=s*n+d*a,e}},{}],59:[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],f=t[6],d=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+f*n,e[3]=s*a+d*n,e[4]=c*a-i*n,e[5]=u*a-o*n,e[6]=f*a-l*n,e[7]=d*a-s*n,e}},{}],60:[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}},{}],61:[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]+")"}},{}],62:[function(e,t,r){t.exports=function(e,t,r){var n,a,i,o,l,s,c,u,f,d,p,h,m=r[0],y=r[1],g=r[2];t===e?(e[12]=t[0]*m+t[4]*y+t[8]*g+t[12],e[13]=t[1]*m+t[5]*y+t[9]*g+t[13],e[14]=t[2]*m+t[6]*y+t[10]*g+t[14],e[15]=t[3]*m+t[7]*y+t[11]*g+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],f=t[8],d=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]=f,e[9]=d,e[10]=p,e[11]=h,e[12]=n*m+l*y+f*g+t[12],e[13]=a*m+s*y+d*g+t[13],e[14]=i*m+c*y+p*g+t[14],e[15]=o*m+u*y+h*g+t[15]);return e}},{}],63:[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}},{}],64:[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":68}],65:[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":68}],66:[function(e,t,r){r.read=function(e,t,r,n,a){var i,o,l=8*a-n-1,s=(1<<l)-1,c=s>>1,u=-7,f=r?a-1:0,d=r?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-u)-1,p>>=-u,u+=l;u>0;i=256*i+e[t+f],f+=d,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+e[t+f],f+=d,u-=8);if(0===i)i=1-c;else{if(i===s)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),i-=c}return(p?-1:1)*o*Math.pow(2,i-n)},r.write=function(e,t,r,n,a,i){var o,l,s,c=8*i-a-1,u=(1<<c)-1,f=u>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-o))<1&&(o--,s*=2),(t+=o+f>=1?d/s:d*Math.pow(2,1-f))*s>=2&&(o++,s/=2),o+f>=u?(l=0,o=u):o+f>=1?(l=(t*s-1)*Math.pow(2,a),o+=f):(l=t*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;e[r+p]=255&l,p+=h,l/=256,a-=8);for(o=o<<a|l,c+=a;c>0;e[r+p]=255&o,p+=h,o/=256,c-=8);e[r+p-h]|=128*m}},{}],67:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],68:[function(e,t,r){t.exports=!0},{}],69:[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}},{}],70:[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}},{}],71:[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}},{}],72:[function(e,t,r){(function(e,r){(function(){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=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 d(e){this.def=e,this.triggered=!1}function p(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function h(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 p(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){(function e(t){var r,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(r=l(t))?o(function(){var a=new d(n);try{r.call(t,function(){e.apply(a,arguments)},function(){u.apply(a,arguments)})}catch(e){u.call(a,e)}}):(n.msg=t,n.state=1,n.chain.length>0&&o(s,n))}catch(e){u.call(new d(n),e)}}}).call(t,e)},function(e){u.call(t,e)})}catch(e){u.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 m=e({},"constructor",h,!1);return h.prototype=m,e(m,"__NPO__",0,!1),e(h,"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(h,"reject",function(e){return new this(function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");r(e)})}),e(h,"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(h,"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)})}),h},(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:121}],73:[function(e,t,r){"use strict";var n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;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,o,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in r=Object(arguments[s]))a.call(r,c)&&(l[c]=r[c]);if(n){o=n(r);for(var u=0;u<o.length;u++)i.call(r,o[u])&&(l[o[u]]=r[o[u]])}}return l}},{}],74:[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},{}],75:[function(e,t,r){t.exports=function(e,t,r,n){var a=e[0],i=e[1],o=!1;void 0===r&&(r=0),void 0===n&&(n=t.length);for(var l=n-r,s=0,c=l-1;s<l;c=s++){var u=t[s+r][0],f=t[s+r][1],d=t[c+r][0],p=t[c+r][1];f>i!=p>i&&a<(d-u)*(i-f)/(p-f)+u&&(o=!o)}return o}},{}],76:[function(e,t,r){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,f=i();function d(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 f.epsilon(e)},segments:function(e){var t=o(!0,f,u);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:o(!1,f,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,f,u),inverted:e.inverted}},polygonFromGeoJSON:function(e){return c.toPolygon(n,e)},polygonToGeoJSON:function(e){return c.fromPolygon(n,f,e)},union:function(e,t){return d(e,t,n.selectUnion)},intersect:function(e,t){return d(e,t,n.selectIntersect)},difference:function(e,t){return d(e,t,n.selectDifference)},differenceRev:function(e,t){return d(e,t,n.selectDifferenceRev)},xor:function(e,t){return d(e,t,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},{"./lib/build-log":77,"./lib/epsilon":78,"./lib/geojson":79,"./lib/intersecter":80,"./lib/segment-chainer":82,"./lib/segment-selector":83}],77:[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")}}}},{}],78:[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],f=t[1]-n[1],d=(l*f-s*u)/c,p=(i*f-o*u)/c,h={alongA:0,alongB:0,pt:[t[0]+d*i,t[1]+d*o]};return h.alongA=d<=-e?-2:d<e?-1:d-1<=-e?0:d-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}},{}],79:[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 f(e){var t=[c(e.region,!1)];u.push(t);for(var r=0;r<e.children.length;r++)t.push(d(e.children[r]))}function d(e){for(var t=0;t<e.children.length;t++)f(e.children[t]);return c(e.region,!0)}for(l=0;l<i.children.length;l++)f(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},{}],80:[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)?1: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 f=t.linesIntersect(o,l,c,u);if(!1===f){if(!t.pointsCollinear(o,l,c))return!1;if(t.pointsSame(o,u)||t.pointsSame(l,c))return!1;var d=t.pointsSame(o,c),p=t.pointsSame(l,u);if(d&&p)return n;var h=!d&&t.pointBetween(o,c,u),m=!p&&t.pointBetween(l,c,u);if(d)return m?s(n,l):s(e,u),n;h&&(p||(m?s(n,l):s(e,u)),s(n,o))}else 0===f.alongA&&(-1===f.alongB?s(e,c):0===f.alongB?s(e,f.pt):1===f.alongB&&s(e,u)),0===f.alongB&&(-1===f.alongA?s(n,o):0===f.alongA?s(n,f.pt):1===f.alongA&&s(n,l));return!1}for(var f=[];!i.isEmpty();){var d=i.getHead();if(r&&r.vert(d.pt[0]),d.isStart){r&&r.segmentNew(d.seg,d.primary);var p=c(d),h=p.before?p.before.ev:null,m=p.after?p.after.ev:null;function y(){if(h){var e=u(d,h);if(e)return e}return!!m&&u(d,m)}r&&r.tempStatus(d.seg,!!h&&h.seg,!!m&&m.seg);var g,v,x=y();if(x)e?(v=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=d.seg.myFill,r&&r.segmentUpdate(x.seg),d.other.remove(),d.remove();if(i.getHead()!==d){r&&r.rewind(d.seg);continue}e?(v=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below,d.seg.myFill.below=m?m.seg.myFill.above:a,d.seg.myFill.above=v?!d.seg.myFill.below:d.seg.myFill.below):null===d.seg.otherFill&&(g=m?d.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:d.primary?o:a,d.seg.otherFill={above:g,below:g}),r&&r.status(d.seg,!!h&&h.seg,!!m&&m.seg),d.other.status=p.insert(n.node({ev:d}))}else{var b=d.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(),!d.primary){var _=d.seg.myFill;d.seg.myFill=d.seg.otherFill,d.seg.otherFill=_}f.push(d.seg)}i.getHead().remove()}return r&&r.done(),f}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":81}],81:[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}}},{}],82:[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 f=(y=n[u])[0],d=(y[1],y[y.length-1]);if(y[y.length-2],t.pointsSame(f,i)){if(T(u,!0,!0))break}else if(t.pointsSame(f,o)){if(T(u,!0,!1))break}else if(t.pointsSame(d,i)){if(T(u,!1,!0))break}else if(t.pointsSame(d,o)&&T(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,y=n[p],g=m?y[0]:y[y.length-1],v=m?y[1]:y[y.length-2],x=m?y[y.length-1]:y[0],b=m?y[y.length-2]:y[1];return t.pointsCollinear(v,g,h)&&(m?(r&&r.chainRemoveHead(l.index,h),y.shift()):(r&&r.chainRemoveTail(l.index,h),y.pop()),g=v),t.pointsSame(x,h)?(n.splice(p,1),t.pointsCollinear(b,x,g)&&(m?(r&&r.chainRemoveTail(l.index,g),y.pop()):(r&&r.chainRemoveHead(l.index,g),y.shift())),r&&r.chainClose(l.index),void a.push(y)):void(m?(r&&r.chainAddHead(l.index,h),y.unshift(h)):(r&&r.chainAddTail(l.index,h),y.push(h)))}var _=l.index,w=s.index;r&&r.chainConnect(_,w);var k=n[_].length<n[w].length;l.matches_head?s.matches_head?k?(M(_),A(_,w)):(M(w),A(w,_)):A(w,_):s.matches_head?A(_,w):k?(M(_),A(w,_)):(M(w),A(_,w))}function T(e,t,r){return c.index=e,c.matches_head=t,c.matches_pt1=r,c===l?(c=s,!1):(c=null,!0)}function M(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}},{}],83:[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},{}],84:[function(e,t,r){"use strict";var n=e("stream").Transform,a=e("stream-parser");function i(){n.call(this,{readableObjectMode:!0})}function o(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}i.prototype=Object.create(n.prototype),i.prototype.constructor=i,a(i.prototype),r.ParserStream=i,r.sliceEq=function(e,t,r){for(var n=t,a=0;a<r.length;)if(e[n++]!==r[a++])return!1;return!0},r.str2arr=function(e,t){var r=[],n=0;if(t&&"hex"===t)for(;n<e.length;)r.push(parseInt(e.slice(n,n+2),16)),n+=2;else for(;n<e.length;n++)r.push(255&e.charCodeAt(n));return r},r.readUInt16LE=function(e,t){return e[t]|e[t+1]<<8},r.readUInt16BE=function(e,t){return e[t+1]|e[t]<<8},r.readUInt32LE=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|16777216*e[t+3]},r.readUInt32BE=function(e,t){return e[t+3]|e[t+2]<<8|e[t+1]<<16|16777216*e[t]},o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,r.ProbeError=o},{stream:101,"stream-parser":117}],85:[function(e,t,r){"use strict";function n(e,t){var r=new Error(e);return r.code=t,r}function a(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function i(e,t,r){this.input=e.subarray(t,r),this.start=t;var a=String.fromCharCode.apply(null,this.input.subarray(0,4));if("II*\0"!==a&&"MM\0*"!==a)throw n("invalid TIFF signature","EBADDATA");this.big_endian="M"===a[0]}i.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}},i.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw n("unexpected EOF","EBADDATA");return this.big_endian?256*t[e]+t[e+1]:t[e]+256*t[e+1]},i.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw n("unexpected EOF","EBADDATA");return this.big_endian?16777216*t[e]+65536*t[e+1]+256*t[e+2]+t[e+3]:t[e]+256*t[e+1]+65536*t[e+2]+16777216*t[e+3]},i.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},i.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},i.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t];case 6:return(r=this.input[t])|33554430*(128&r);case 3:return r=this.read_uint16(t);case 8:return(r=this.read_uint16(t))|131070*(32768&r);case 4:return r=this.read_uint32(t);case 9:return 0|(r=this.read_uint32(t));case 5:case 10:case 11:case 12:case 7:default:return null}},i.prototype.scan_ifd=function(e,t,r){var i=this.read_uint16(t);t+=2;for(var o=0;o<i;o++){var l=this.read_uint16(t),s=this.read_uint16(t+2),c=this.read_uint32(t+4),u=this.exif_format_length(s),f=c*u,d=f<=4?t+8:this.read_uint32(t+8),p=!1;if(d+f>this.input.length)throw n("unexpected EOF","EBADDATA");for(var h=[],m=d,y=0;y<c;y++,m+=u){var g=this.exif_format_read(s,m);if(null===g){h=null;break}h.push(g)}if(Array.isArray(h)&&2===s&&(h=a(String.fromCharCode.apply(null,h)))&&"\0"===h[h.length-1]&&(h=h.slice(0,-1)),this.is_subifd_link(e,l)&&Array.isArray(h)&&Number.isInteger(h[0])&&h[0]>0&&(this.ifds_to_read.push({id:l,offset:h[0]}),p=!0),!1===r({is_big_endian:this.big_endian,ifd:e,tag:l,format:s,count:c,entry_offset:t+this.start,data_length:f,data_offset:d+this.start,value:h,is_subifd_link:p}))return void(this.aborted=!0);t+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},t.exports.ExifParser=i,t.exports.get_orientation=function(e){var t=0;try{return new i(e,0,e.length).each(function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1}),t}catch(e){return-1}}},{}],86:[function(e,t,r){"use strict";var n=e("./common").readUInt16BE,a=e("./common").readUInt32BE;function i(e,t){if(e.length<4+t)return null;var r=a(e,t);return e.length<r+t||r<8?null:{boxtype:String.fromCharCode.apply(null,e.slice(t+4,t+8)),data:e.slice(t+8,t+r),end:t+r}}function o(e,t){for(var r=0;;){var n=i(e,r);if(!n)break;switch(n.boxtype){case"ispe":t.sizes.push({width:a(n.data,4),height:a(n.data,8)});break;case"irot":t.transforms.push({type:"irot",value:3&n.data[0]});break;case"imir":t.transforms.push({type:"imir",value:1&n.data[0]})}r=n.end}}function l(e,t,r){for(var n=0,a=0;a<r;a++)n=256*n+(e[t+a]||0);return n}function s(e,t){for(var r=e[4]>>4&15,a=15&e[4],i=e[5]>>4&15,o=n(e,6),s=8,c=0;c<o;c++){var u=n(e,s),f=n(e,s+=2),d=l(e,s+=2,i),p=n(e,s+=i);if(s+=2,0===f&&1===p){var h=l(e,s,r),m=l(e,s+r,a);t.item_loc[u]={length:m,offset:h+d}}s+=p*(r+a)}}function c(e,t){for(var r=n(e,4),a=6,o=0;o<r;o++){var l=i(e,a);if(!l)break;if("infe"===l.boxtype){for(var s=n(l.data,4),c="",u=8;u<l.data.length&&l.data[u];u++)c+=String.fromCharCode(l.data[u]);t.item_inf[c]=s}a=l.end}}function u(e,t){for(var r=0;;){var n=i(e,r);if(!n)break;"ipco"===n.boxtype&&o(n.data,t),r=n.end}}t.exports.unbox=i,t.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(function(e,t){for(var r=4;;){var n=i(e,r);if(!n)break;"iprp"===n.boxtype&&u(n.data,t),"iloc"===n.boxtype&&s(n.data,t),"iinf"===n.boxtype&&c(n.data,t),r=n.end}}(e,t),t.sizes.length){var r,n,a,o=(r=t.sizes,n=r.reduce(function(e,t){return e.width>t.width||e.width===t.width&&e.height>t.height?e:t}),a=r.reduce(function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t}),n.width>a.height||n.width===a.height&&n.height>a.width?n:a),l=1;t.transforms.forEach(function(e){var t={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===e.type&&(l=0===e.value?r[l]:t[l=t[l=r[l]]]),"irot"===e.type)for(var n=0;n<e.value;n++)l=t[l]});var f=null;return t.item_inf.Exif&&(f=t.item_loc[t.item_inf.Exif]),{width:o.width,height:o.height,orientation:t.transforms.length?l:null,variants:t.sizes,exif_location:f}}},t.exports.getMimeType=function(e){var t=String.fromCharCode.apply(null,e.slice(0,4)),r={};r[t]=!0;for(var n=8;n<e.length;n+=4)r[String.fromCharCode.apply(null,e.slice(n,n+4))]=!0;if(r.mif1||r.msf1||r.miaf)return"avif"===t||"avis"===t||"avio"===t?{type:"avif",mime:"image/avif"}:"heic"===t||"heix"===t?{type:"heic",mime:"image/heic"}:"hevc"===t||"hevx"===t?{type:"heic",mime:"image/heic-sequence"}:r.avif||r.avis?{type:"avif",mime:"image/avif"}:r.heic||r.heix||r.hevc||r.hevx||r.heis?r.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}},{"./common":84}],87:[function(e,t,r){"use strict";var n=e("../common").str2arr,a=e("../common").sliceEq,i=e("../common").readUInt32BE,o=e("../miaf_utils"),l=e("../exif_utils"),s=n("ftyp");t.exports=function(e){if(a(e,4,s)){var t=o.unbox(e,0);if(t){var r=o.getMimeType(t.data);if(r){for(var n,c=t.end;;){var u=o.unbox(e,c);if(!u)break;if(c=u.end,"mdat"===u.boxtype)return;if("meta"===u.boxtype){n=u.data;break}}if(n){var f=o.readSizeFromMeta(n);if(f){var d={width:f.width,height:f.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(f.variants.length>1&&(d.variants=f.variants),f.orientation&&(d.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=e.length){var p=i(e,f.exif_location.offset),h=e.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),m=l.get_orientation(h);m>0&&(d.orientation=m)}return d}}}}}}},{"../common":84,"../exif_utils":85,"../miaf_utils":86}],88:[function(e,t,r){"use strict";var n=e("../common").str2arr,a=e("../common").sliceEq,i=e("../common").readUInt16LE,o=n("BM");t.exports=function(e){if(!(e.length<26)&&a(e,0,o))return{width:i(e,18),height:i(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},{"../common":84}],89:[function(e,t,r){"use strict";var n=e("../common").str2arr,a=e("../common").sliceEq,i=e("../common").readUInt16LE,o=n("GIF87a"),l=n("GIF89a");t.exports=function(e){if(!(e.length<10)&&(a(e,0,o)||a(e,0,l)))return{width:i(e,6),height:i(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},{"../common":84}],90:[function(e,t,r){"use strict";var n=e("../common").readUInt16LE;t.exports=function(e){var t=n(e,0),r=n(e,2),a=n(e,4);if(0===t&&1===r&&a){for(var i=[],o={width:0,height:0},l=0;l<a;l++){var s=e[6+16*l]||256,c=e[6+16*l+1]||256,u={width:s,height:c};i.push(u),(s>o.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},{"../common":84}],91:[function(e,t,r){"use strict";var n=e("../common").readUInt16BE,a=e("../common").str2arr,i=e("../common").sliceEq,o=e("../exif_utils"),l=a("Exif\0\0");t.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var r,a,s=e[t++];255===s;)s=e[t++];if(208<=s&&s<=217||1===s)r=0;else{if(!(192<=s&&s<=254))return;if(e.length-t<2)return;r=n(e,t)-2,t+=2}if(217===s||218===s)return;if(225===s&&r>=10&&i(e,t,l)&&(a=o.get_orientation(e.slice(t+6,t+r))),r>=5&&192<=s&&s<=207&&196!==s&&200!==s&&204!==s){if(e.length-t<r)return;var c={width:n(e,t+3),height:n(e,t+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return a>0&&(c.orientation=a),c}t+=r}}},{"../common":84,"../exif_utils":85}],92:[function(e,t,r){"use strict";var n=e("../common").str2arr,a=e("../common").sliceEq,i=e("../common").readUInt32BE,o=n("‰PNG\r\n\n"),l=n("IHDR");t.exports=function(e){if(!(e.length<24)&&a(e,0,o)&&a(e,12,l))return{width:i(e,16),height:i(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},{"../common":84}],93:[function(e,t,r){"use strict";var n=e("../common").str2arr,a=e("../common").sliceEq,i=e("../common").readUInt32BE,o=n("8BPS\0");t.exports=function(e){if(!(e.length<22)&&a(e,0,o))return{width:i(e,18),height:i(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},{"../common":84}],94:[function(e,t,r){"use strict";function n(e){return"number"==typeof e&&isFinite(e)&&e>0}var a=/<[-_.:a-zA-Z0-9][^>]*>/,i=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,o=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,l=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,s=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(e){return c.test(e)?e.match(c)[0]:"px"}t.exports=function(e){if(function(e){var t,r=0,n=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(r=3);r<n&&(32===(t=e[r])||9===t||13===t||10===t);)r++;return r!==n&&60===e[r]}(e)){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);var c=(t.match(a)||[""])[0];if(i.test(c)){var f=function(e){var t=e.match(o),r=e.match(l),n=e.match(s);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}(c),d=parseFloat(f.width),p=parseFloat(f.height);if(f.width&&f.height){if(!n(d)||!n(p))return;return{width:d,height:p,type:"svg",mime:"image/svg+xml",wUnits:u(f.width),hUnits:u(f.height)}}var h=(f.viewbox||"").split(" "),m={width:h[2],height:h[3]},y=parseFloat(m.width),g=parseFloat(m.height);if(n(y)&&n(g)&&u(m.width)===u(m.height)){var v=y/g;if(f.width){if(!n(d))return;return{width:d,height:d/v,type:"svg",mime:"image/svg+xml",wUnits:u(f.width),hUnits:u(f.width)}}if(f.height){if(!n(p))return;return{width:p*v,height:p,type:"svg",mime:"image/svg+xml",wUnits:u(f.height),hUnits:u(f.height)}}return{width:y,height:g,type:"svg",mime:"image/svg+xml",wUnits:u(m.width),hUnits:u(m.height)}}}}}},{}],95:[function(e,t,r){"use strict";var n=e("../common").str2arr,a=e("../common").sliceEq,i=e("../common").readUInt16LE,o=e("../common").readUInt16BE,l=e("../common").readUInt32LE,s=e("../common").readUInt32BE,c=n("II*\0"),u=n("MM\0*");function f(e,t,r){return r?o(e,t):i(e,t)}function d(e,t,r){return r?s(e,t):l(e,t)}function p(e,t,r){var n=f(e,t+2,r);return 1!==d(e,t+4,r)||3!==n&&4!==n?null:3===n?f(e,t+8,r):d(e,t+8,r)}t.exports=function(e){if(!(e.length<8)&&(a(e,0,c)||a(e,0,u))){var t=77===e[0],r=d(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=12*f(e,n+0,t);if(!(i<=0||(n+=2,e.length-n<i))){var o,l,s,h;for(o=0;o<i;o+=12)256===(h=f(e,n+o,t))?l=p(e,n+o,t):257===h&&(s=p(e,n+o,t));return l&&s?{width:l,height:s,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}:void 0}}}}}},{"../common":84}],96:[function(e,t,r){"use strict";var n=e("../common").str2arr,a=e("../common").sliceEq,i=e("../common").readUInt16LE,o=e("../common").readUInt32LE,l=e("../exif_utils"),s=n("RIFF"),c=n("WEBP");function u(e,t){if(157===e[t+3]&&1===e[t+4]&&42===e[t+5])return{width:16383&i(e,t+6),height:16383&i(e,t+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function f(e,t){if(47===e[t]){var r=o(e,t+1);return{width:1+(16383&r),height:1+(r>>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function d(e,t){return{width:1+(e[t+6]<<16|e[t+5]<<8|e[t+4]),height:1+(e[t+9]<<t|e[t+8]<<8|e[t+7]),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}t.exports=function(e){if(!(e.length<16)&&(a(e,0,s)||a(e,8,c))){var t=12,r=null,n=0,i=o(e,4)+8;if(!(i>e.length)){for(;t+8<i;)if(0!==e[t]){var p=String.fromCharCode.apply(null,e.slice(t,t+4)),h=o(e,t+4);"VP8 "===p&&h>=10?r=r||u(e,t+8):"VP8L"===p&&h>=9?r=r||f(e,t+8):"VP8X"===p&&h>=10?r=r||d(e,t+8):"EXIF"===p&&(n=l.get_orientation(e.slice(t+8,t+8+h)),t=1/0),t+=8+h}else t++;if(r)return n>0&&(r.orientation=n),r}}}},{"../common":84,"../exif_utils":85}],97:[function(e,t,r){"use strict";t.exports={avif:e("./parse_sync/avif"),bmp:e("./parse_sync/bmp"),gif:e("./parse_sync/gif"),ico:e("./parse_sync/ico"),jpeg:e("./parse_sync/jpeg"),png:e("./parse_sync/png"),psd:e("./parse_sync/psd"),svg:e("./parse_sync/svg"),tiff:e("./parse_sync/tiff"),webp:e("./parse_sync/webp")}},{"./parse_sync/avif":87,"./parse_sync/bmp":88,"./parse_sync/gif":89,"./parse_sync/ico":90,"./parse_sync/jpeg":91,"./parse_sync/png":92,"./parse_sync/psd":93,"./parse_sync/svg":94,"./parse_sync/tiff":95,"./parse_sync/webp":96}],98:[function(e,t,r){"use strict";var n=e("./lib/parsers_sync");t.exports=function(e){return function(e){for(var t=Object.keys(n),r=0;r<t.length;r++){var a=n[t[r]](e);if(a)return a}return null}(e)},t.exports.parsers=n},{"./lib/parsers_sync":97}],99:[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=[],f=!1,d=-1;function p(){f&&c&&(f=!1,c.length?u=c.concat(u):d=-1,u.length&&h())}function h(){if(!f){var e=s(p);f=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,f=!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 y(){}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||f||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=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],100:[function(e,t,r){var n=e("buffer"),a=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return a(e,t,r)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=o),o.prototype=Object.create(a.prototype),i(a,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=a(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:28}],101:[function(e,t,r){t.exports=a;var n=e("events").EventEmitter;function a(){n.call(this)}e("inherits")(a,n),a.Readable=e("readable-stream/lib/_stream_readable.js"),a.Writable=e("readable-stream/lib/_stream_writable.js"),a.Duplex=e("readable-stream/lib/_stream_duplex.js"),a.Transform=e("readable-stream/lib/_stream_transform.js"),a.PassThrough=e("readable-stream/lib/_stream_passthrough.js"),a.finished=e("readable-stream/lib/internal/streams/end-of-stream.js"),a.pipeline=e("readable-stream/lib/internal/streams/pipeline.js"),a.Stream=a,a.prototype.pipe=function(e,t){var r=this;function a(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",a),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",s));var o=!1;function l(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",a),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",s),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("error",c),e.on("error",c),r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}},{events:27,inherits:67,"readable-stream/lib/_stream_duplex.js":103,"readable-stream/lib/_stream_passthrough.js":104,"readable-stream/lib/_stream_readable.js":105,"readable-stream/lib/_stream_transform.js":106,"readable-stream/lib/_stream_writable.js":107,"readable-stream/lib/internal/streams/end-of-stream.js":111,"readable-stream/lib/internal/streams/pipeline.js":113}],102:[function(e,t,r){"use strict";var n={};function a(e,t,r){r||(r=Error);var a=function(e){var r,n;function a(r,n,a){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,a))||this}return n=e,(r=a).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,a}(r);a.prototype.name=r.name,a.prototype.code=e,n[e]=a}function i(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}a("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),a("ERR_INVALID_ARG_TYPE",function(e,t,r){var n,a,o,l;if("string"==typeof t&&(a="not ",t.substr(!o||o<0?0:+o,a.length)===a)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))l="The ".concat(e," ").concat(n," ").concat(i(t,"type"));else{var s=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(s," ").concat(n," ").concat(i(t,"type"))}return l+=". Received type ".concat(typeof r)},TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],103:[function(e,t,r){(function(r){(function(){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=c;var a=e("./_stream_readable"),i=e("./_stream_writable");e("inherits")(c,a);for(var o=n(i.prototype),l=0;l<o.length;l++){var s=o[l];c.prototype[s]||(c.prototype[s]=i.prototype[s])}function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),i.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||r.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":105,"./_stream_writable":107,_process:99,inherits:67}],104:[function(e,t,r){"use strict";t.exports=a;var n=e("./_stream_transform");function a(e){if(!(this instanceof a))return new a(e);n.call(this,e)}e("inherits")(a,n),a.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":106,inherits:67}],105:[function(e,t,r){(function(r,n){(function(){"use strict";var a;t.exports=M,M.ReadableState=T;e("events").EventEmitter;var i=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),l=e("buffer").Buffer,s=n.Uint8Array||function(){};var c,u=e("util");c=u&&u.debuglog?u.debuglog("stream"):function(){};var f,d,p,h=e("./internal/streams/buffer_list"),m=e("./internal/streams/destroy"),y=e("./internal/streams/state").getHighWaterMark,g=e("../errors").codes,v=g.ERR_INVALID_ARG_TYPE,x=g.ERR_STREAM_PUSH_AFTER_EOF,b=g.ERR_METHOD_NOT_IMPLEMENTED,_=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(M,o);var w=m.errorOrDestroy,k=["error","close","destroy","pause","resume"];function T(t,r,n){a=a||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r instanceof a),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",n),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function M(t){if(a=a||e("./_stream_duplex"),!(this instanceof M))return new M(t);var r=this instanceof a;this._readableState=new T(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function A(e,t,r,n,a){c("readableAddChunk",t);var i,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?D(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}(e,o);else if(a||(i=function(e,t){var r;n=t,l.isBuffer(n)||n instanceof s||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(o,t)),i)w(e,i);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),n)o.endEmitted?w(e,new _):S(e,o,t,!0);else if(o.ended)w(e,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?S(e,o,t,!1):P(e,o)):S(e,o,t,!1)}else n||(o.reading=!1,P(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function S(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&D(e)),P(e,t)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),M.prototype.destroy=m.destroy,M.prototype._undestroy=m.undestroy,M.prototype._destroy=function(e,t){t(e)},M.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=l.from(e,t),t=""),r=!0),A(this,e,t,!1,r)},M.prototype.unshift=function(e){return A(this,e,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(t){f||(f=e("string_decoder/").StringDecoder);var r=new f(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,a="";null!==n;)a+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==a&&this._readableState.buffer.push(a),this._readableState.length=a.length,this};var L=1073741824;function C(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=L?e=L:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function D(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(O,e))}function O(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function P(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(E,e,t))}function E(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function R(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function z(e){c("readable nexttick read 0"),e.read(0)}function I(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function j(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(B,t,e))}function B(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function H(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}M.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):D(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&j(this),null;var n,a=t.needReadable;return c("need readable",a),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",a=!0),t.ended||t.reading?c("reading or ended",a=!1):a&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=C(r,t))),null===(n=e>0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&j(this)),null!==n&&this.emit("data",n),n},M.prototype._read=function(e){w(this,new b("_read()"))},M.prototype.pipe=function(e,t){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,c("pipe count=%d opts=%j",a.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?s:y;function l(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",h),e.removeListener("finish",m),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",l),n.removeListener("end",s),n.removeListener("end",y),n.removeListener("data",d),f=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function s(){c("onend"),e.end()}a.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",l);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,N(e))}}(n);e.on("drain",u);var f=!1;function d(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==H(a.pipes,e))&&!f&&(c("false write response, pause",a.awaitDrain),a.awaitDrain++),n.pause())}function p(t){c("onerror",t),y(),e.removeListener("error",p),0===i(e,"error")&&w(e,t)}function h(){e.removeListener("finish",m),y()}function m(){c("onfinish"),e.removeListener("close",h),y()}function y(){c("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",h),e.once("finish",m),e.emit("pipe",n),a.flowing||(c("pipe resume"),n.resume()),e},M.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<a;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var o=H(t.pipes,e);return-1===o?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},M.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),a=this._readableState;return"data"===e?(a.readableListening=this.listenerCount("readable")>0,!1!==a.flowing&&this.resume()):"readable"===e&&(a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,c("on readable",a.length,a.reading),a.length?D(this):a.reading||r.nextTick(z,this))),n},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(R,this),n},M.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(R,this),t},M.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(I,e,t))}(this,e)),e.paused=!1,this},M.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var a in e.on("end",function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(a){(c("wrapped data"),r.decoder&&(a=r.decoder.write(a)),r.objectMode&&null==a)||(r.objectMode||a&&a.length)&&(t.push(a)||(n=!0,e.pause()))}),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var i=0;i<k.length;i++)e.on(k[i],this.emit.bind(this,k[i]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(M.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=e("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),M._fromList=F,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(M.from=function(t,r){return void 0===p&&(p=e("./internal/streams/from")),p(M,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":102,"./_stream_duplex":103,"./internal/streams/async_iterator":108,"./internal/streams/buffer_list":109,"./internal/streams/destroy":110,"./internal/streams/from":112,"./internal/streams/state":114,"./internal/streams/stream":115,_process:99,buffer:28,events:27,inherits:67,"string_decoder/":116,util:26}],106:[function(e,t,r){"use strict";t.exports=u;var n=e("../errors").codes,a=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=n.ERR_TRANSFORM_WITH_LENGTH_0,s=e("./_stream_duplex");function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);s.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush(function(t,r){d(e,t,r)})}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new l;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(u,s),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,r){r(new a("_transform()"))},u.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var a=this._readableState;(n.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){s.prototype._destroy.call(this,e,function(e){t(e)})}},{"../errors":102,"./_stream_duplex":103,inherits:67}],107:[function(e,t,r){(function(r,n){(function(){"use strict";function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var a=n.callback;t.pendingcb--,a(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;t.exports=M,M.WritableState=T;var o={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),s=e("buffer").Buffer,c=n.Uint8Array||function(){};var u,f=e("./internal/streams/destroy"),d=e("./internal/streams/state").getHighWaterMark,p=e("../errors").codes,h=p.ERR_INVALID_ARG_TYPE,m=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,g=p.ERR_STREAM_CANNOT_PIPE,v=p.ERR_STREAM_DESTROYED,x=p.ERR_STREAM_NULL_VALUES,b=p.ERR_STREAM_WRITE_AFTER_END,_=p.ERR_UNKNOWN_ENCODING,w=f.errorOrDestroy;function k(){}function T(t,n,o){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=n instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,a=n.sync,i=n.writecb;if("function"!=typeof i)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,a,i){--t.pendingcb,n?(r.nextTick(i,a),r.nextTick(O,e,t),e._writableState.errorEmitted=!0,w(e,a)):(i(a),e._writableState.errorEmitted=!0,w(e,a),O(e,t))}(e,n,a,t,i);else{var o=C(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||L(e,n),a?r.nextTick(S,e,n,o,i):S(e,n,o,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function M(t){var r=this instanceof(i=i||e("./_stream_duplex"));if(!r&&!u.call(M,this))return new M(t);this._writableState=new T(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function A(e,t,r,n,a,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):r?e._writev(a,t.onwrite):e._write(a,i,t.onwrite),t.sync=!1}function S(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function L(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var l=0,s=!0;r;)i[l]=r,r.isBuf||(s=!1),r=r.next,l+=1;i.allBuffers=s,A(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,f=r.callback;if(A(e,t,!1,t.objectMode?1:c.length,c,u,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function D(e,t){e._final(function(r){t.pendingcb--,r&&w(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)})}function O(e,t){var n=C(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(D,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var a=e._readableState;(!a||a.autoDestroy&&a.endEmitted)&&e.destroy()}return n}e("inherits")(M,l),T.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(T.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===M&&(e&&e._writableState instanceof T)}})):u=function(e){return e instanceof this},M.prototype.pipe=function(){w(this,new g)},M.prototype.write=function(e,t,n){var a,i=this._writableState,o=!1,l=!i.objectMode&&(a=e,s.isBuffer(a)||a instanceof c);return l&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"==typeof t&&(n=t,t=null),l?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=k),i.ending?function(e,t){var n=new b;w(e,n),r.nextTick(t,n)}(this,n):(l||function(e,t,n,a){var i;return null===n?i=new x:"string"==typeof n||t.objectMode||(i=new h("chunk",["string","Buffer"],n)),!i||(w(e,i),r.nextTick(a,i),!1)}(this,i,e,n))&&(i.pendingcb++,o=function(e,t,r,n,a,i){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=s.from(t,r));return t}(t,n,a);n!==o&&(r=!0,a="buffer",n=o)}var l=t.objectMode?1:n.length;t.length+=l;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:a,isBuf:r,callback:i,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else A(e,t,!1,l,n,a,i);return c}(this,i,l,e,t,n)),o},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||L(this,e))},M.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(e,t,r){r(new m("_write()"))},M.prototype._writev=null,M.prototype.end=function(e,t,n){var a=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,a,n),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),M.prototype.destroy=f.destroy,M.prototype._undestroy=f.undestroy,M.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":102,"./_stream_duplex":103,"./internal/streams/destroy":110,"./internal/streams/state":114,"./internal/streams/stream":115,_process:99,buffer:28,inherits:67,"util-deprecate":123}],108:[function(e,t,r){(function(r){(function(){"use strict";var n;function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=e("./end-of-stream"),o=Symbol("lastResolve"),l=Symbol("lastReject"),s=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function h(e){var t=e[o];if(null!==t){var r=e[d].read();null!==r&&(e[u]=null,e[o]=null,e[l]=null,t(p(r,!1)))}}var m=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((a(n={get stream(){return this[d]},next:function(){var e=this,t=this[s];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(t,n){r.nextTick(function(){e[s]?n(e[s]):t(p(void 0,!0))})});var n,a=this[u];if(a)n=new Promise(function(e,t){return function(r,n){e.then(function(){t[c]?r(p(void 0,!0)):t[f](r,n)},n)}}(a,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(p(i,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,function(){return this}),a(n,"return",function(){var e=this;return new Promise(function(t,r){e[d].destroy(null,function(e){e?r(e):t(p(void 0,!0))})})}),n),m);t.exports=function(e){var t,n=Object.create(y,(a(t={},d,{value:e,writable:!0}),a(t,o,{value:null,writable:!0}),a(t,l,{value:null,writable:!0}),a(t,s,{value:null,writable:!0}),a(t,c,{value:e._readableState.endEmitted,writable:!0}),a(t,f,{value:function(e,t){var r=n[d].read();r?(n[u]=null,n[o]=null,n[l]=null,e(p(r,!1))):(n[o]=e,n[l]=t)},writable:!0}),t));return n[u]=null,i(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[l];return null!==t&&(n[u]=null,n[o]=null,n[l]=null,t(e)),void(n[s]=e)}var r=n[o];null!==r&&(n[u]=null,n[o]=null,n[l]=null,r(p(void 0,!0))),n[c]=!0}),e.on("readable",function(e){r.nextTick(h,e)}.bind(null,n)),n}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":111,_process:99}],109:[function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=e("buffer").Buffer,l=e("util").inspect,s=l&&l.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,c;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,r,n,a=o.allocUnsafe(e>>>0),i=this.head,l=0;i;)t=i.data,r=a,n=l,o.prototype.copy.call(t,r,n),l+=i.data.length,i=i.next;return a}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var a=t.data,i=e>a.length?a.length:e;if(i===a.length?n+=a:n+=a.slice(0,e),0===(e-=i)){i===a.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var a=r.data,i=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,i),0===(e-=i)){i===a.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=a.slice(i));break}++n}return this.length-=n,t}},{key:s,value:function(e,t){return l(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t,{depth:0,customInspect:!1}))}}])&&i(t.prototype,r),c&&i(t,c),e}()},{buffer:28,util:26}],110:[function(e,t,r){(function(e){(function(){"use strict";function r(e,t){a(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}t.exports={destroy:function(t,i){var o=this,l=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return l||s?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(a,this,t)):e.nextTick(a,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!i&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):i?(e.nextTick(n,o),i(t)):e.nextTick(n,o)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:99}],111:[function(e,t,r){"use strict";var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function a(){}t.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];e.apply(this,n)}}}(i||a);var o=r.readable||!1!==r.readable&&t.readable,l=r.writable||!1!==r.writable&&t.writable,s=function(){t.writable||u()},c=t._writableState&&t._writableState.finished,u=function(){l=!1,c=!0,o||i.call(t)},f=t._readableState&&t._readableState.endEmitted,d=function(){o=!1,f=!0,l||i.call(t)},p=function(e){i.call(t,e)},h=function(){var e;return o&&!f?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):l&&!c?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},m=function(){t.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",u),t.on("abort",h),t.req?m():t.on("request",m)):l&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",d),t.on("finish",u),!1!==r.error&&t.on("error",p),t.on("close",h),function(){t.removeListener("complete",u),t.removeListener("abort",h),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",u),t.removeListener("end",d),t.removeListener("error",p),t.removeListener("close",h)}}},{"../../../errors":102}],112:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],113:[function(e,t,r){"use strict";var n;var a=e("../../../errors").codes,i=a.ERR_MISSING_ARGS,o=a.ERR_STREAM_DESTROYED;function l(e){if(e)throw e}function s(e){e()}function c(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];var u,f=function(e){return e.length?"function"!=typeof e[e.length-1]?l:e.pop():l}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new i("streams");var d=r.map(function(t,a){var i=a<r.length-1;return function(t,r,a,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var l=!1;t.on("close",function(){l=!0}),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:a},function(e){if(e)return i(e);l=!0,i()});var s=!1;return function(e){if(!l&&!s)return s=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void i(e||new o("pipe"))}}(t,i,a>0,function(e){u||(u=e),e&&d.forEach(s),i||(d.forEach(s),f(u))})});return r.reduce(c)}},{"../../../errors":102,"./end-of-stream":111}],114:[function(e,t,r){"use strict";var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,a){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(a?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},{"../../../errors":102}],115:[function(e,t,r){t.exports=e("events").EventEmitter},{events:27}],116:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,a=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===a||!a(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=s,this.end=c,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=u,this.end=f,t=3;break;default:return this.write=d,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var a=o(t[n]);if(a>=0)return a>0&&(e.lastNeed=a-1),a;if(--n<r||-2===a)return 0;if((a=o(t[n]))>=0)return a>0&&(e.lastNeed=a-2),a;if(--n<r||-2===a)return 0;if((a=o(t[n]))>=0)return a>0&&(2===a?a=0:e.lastNeed=a-3),a;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":100}],117:[function(e,t,r){(function(r,n){(function(){var r=e("assert"),a=e("debug")("stream-parser");t.exports=function(e){var t=e&&"function"==typeof e._transform,r=e&&"function"==typeof e._write;if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");a("extending Parser into stream"),e._bytes=u,e._skipBytes=f,t&&(e._passthrough=d);t?e._transform=h:e._write=p};var i=-1,o=0,l=1,s=2;function c(e){a("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=i,e._parserCallback=null,"function"==typeof e.push&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function u(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||c(this),a("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=o}function f(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||c(this),a("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=l}function d(e,t){r(!this._parserCallback,'There is already a "callback" set!'),r(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||c(this),a("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=s}function p(e,t,r){this._parserInit||c(this),a("write(%o bytes)",e.length),"function"==typeof t&&(r=t),y(this,e,null,r)}function h(e,t,r){this._parserInit||c(this),a("transform(%o bytes)",e.length),"function"!=typeof t&&(t=this._parserOutput),y(this,e,t,r)}function m(e,t,r,l){if(e._parserBytesLeft-=t.length,a("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===o?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===s&&r(t),0!==e._parserBytesLeft)return l;var c=e._parserCallback;if(c&&e._parserState===o&&e._parserBuffers.length>1&&(t=n.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==o&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=i,e._parserBuffers.splice(0),c){var u=[];t&&u.push(t),r&&u.push(r);var f=c.length>u.length;f&&u.push(g(l));var d=c.apply(e,u);if(!f||l===d)return l}}var y=g(function e(t,r,n,a){return t._parserBytesLeft<=0?a(new Error("got data but not currently parsing anything")):r.length<=t._parserBytesLeft?function(){return m(t,r,n,a)}:function(){var i=r.slice(0,t._parserBytesLeft);return m(t,i,n,function(o){return o?a(o):r.length>i.length?function(){return e(t,r.slice(i.length),n,a)}:void 0})}});function g(e){return function(){for(var t=e.apply(this,arguments);"function"==typeof t;)t=t();return t}}}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:99,assert:21,buffer:28,debug:118}],118:[function(e,t,r){(function(n){(function(){function a(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(r=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),!t)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var a=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(a++,"%c"===e&&(i=a))}),e.splice(i,0,n)},r.save=function(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}},r.load=a,r.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(a())}).call(this)}).call(this,e("_process"))},{"./debug":119,_process:99}],119:[function(e,t,r){var n;function a(e){function t(){if(t.enabled){var e=t,a=+new Date,i=a-(n||a);e.diff=i,e.prev=n,e.curr=a,n=a;for(var o=new Array(arguments.length),l=0;l<o.length;l++)o[l]=arguments[l];o[0]=r.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var s=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;s++;var a=r.formatters[n];if("function"==typeof a){var i=o[s];t=a.call(e,i),o.splice(s,1),s--}return t}),r.formatArgs.call(e,o),(t.log||r.log||console.log.bind(console)).apply(e,o)}}return t.namespace=e,t.enabled=r.enabled(e),t.useColors=r.useColors(),t.color=function(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}(e),"function"==typeof r.init&&r.init(t),t}(r=t.exports=a.debug=a.default=a).coerce=function(e){return e instanceof Error?e.stack||e.message:e},r.disable=function(){r.enable("")},r.enable=function(e){r.save(e),r.names=[],r.skips=[];for(var t=("string"==typeof e?e:"").split(/[\s,]+/),n=t.length,a=0;a<n;a++)t[a]&&("-"===(e=t[a].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.names=[],r.skips=[],r.formatters={}},{ms:120}],120:[function(e,t,r){var n=1e3,a=60*n,i=60*a,o=24*i,l=365.25*o;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}t.exports=function(e,t){t=t||{};var r,c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*l;case"days":case"day":case"d":return r*o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*a;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===c&&!1===isNaN(e))return t.long?s(r=e,o,"day")||s(r,i,"hour")||s(r,a,"minute")||s(r,n,"second")||r+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=a)return Math.round(e/a)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],121:[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":99,timers:121}],122:[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,f=!1,d=!1;"string"==typeof t&&(t=function(e){e=e.replace(r,"").replace(n,"").toLowerCase();var t,a=!1;if(S[e])e=S[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=B.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=B.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=B.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=B.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=B.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=B.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=B.hex8.exec(e))return{r:P(t[1]),g:P(t[2]),b:P(t[3]),a:I(t[4]),format:a?"name":"hex8"};if(t=B.hex6.exec(e))return{r:P(t[1]),g:P(t[2]),b:P(t[3]),format:a?"name":"hex"};if(t=B.hex4.exec(e))return{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),a:I(t[4]+""+t[4]),format:a?"name":"hex8"};if(t=B.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&&(H(t.r)&&H(t.g)&&H(t.b)?(p=t.r,h=t.g,m=t.b,a={r:255*D(p,255),g:255*D(h,255),b:255*D(m,255)},f=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):H(t.h)&&H(t.s)&&H(t.v)?(s=R(t.s),c=R(t.v),a=function(t,r,n){t=6*D(t,360),r=D(r,100),n=D(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),f=!0,d="hsv"):H(t.h)&&H(t.s)&&H(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=D(e,360),t=D(t,100),r=D(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),f=!0,d="hsl"),t.hasOwnProperty("a")&&(i=t.a));var p,h,m;return i=C(i),{ok:f,format:t.format||d,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=D(e,255),t=D(t,255),r=D(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 f(e,t,r){e=D(e,255),t=D(t,255),r=D(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 d(e,t,r,n){var a=[E(i(e).toString(16)),E(i(t).toString(16)),E(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[E(z(n)),E(i(e).toString(16)),E(i(t).toString(16)),E(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 y(e){return c(e).desaturate(100)}function g(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 v(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 k(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 T(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 M(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=C(e),this._roundA=i(100*this._a)/100,this},toHsv:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=f(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 d(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=[E(i(e).toString(16)),E(i(t).toString(16)),E(i(r).toString(16)),E(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*D(this._r,255))+"%",g:i(100*D(this._g,255))+"%",b:i(100*D(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*D(this._r,255))+"%, "+i(100*D(this._g,255))+"%, "+i(100*D(this._b,255))+"%)":"rgba("+i(100*D(this._r,255))+"%, "+i(100*D(this._g,255))+"%, "+i(100*D(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(L[d(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(g,arguments)},brighten:function(){return this._applyModification(v,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(y,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(e,t){if("object"==typeof e){var 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 S=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},L=c.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(S);function C(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function D(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 E(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 I(e){return P(e)/255}var N,F,j,B=(F="[\\s|\\(]+("+(N="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",j="[\\s|\\(]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",{CSS_UNIT:new RegExp(N),rgb:new RegExp("rgb"+F),rgba:new RegExp("rgba"+j),hsl:new RegExp("hsl"+F),hsla:new RegExp("hsla"+j),hsv:new RegExp("hsv"+F),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 H(e){return!!B.CSS_UNIT.exec(e)}void 0!==t&&t.exports?t.exports=c:window.tinycolor=c}(Math)},{}],123:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],124:[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=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+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=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].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),f[e-f[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=d[o-d[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 f=this.toJD(e,t,r)-a.toJD();return 1+Math.floor(f/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=f[e-f[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="number"==typeof e&&e>=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var c="number"==typeof t&&t>=1&&t<=12;if(!c)throw new Error("Lunar month outside range 1 - 12");var u,p="number"==typeof r&&r>=1&&r<=30;if(!p)throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(u=!1,i=n):(u=!!n,i=a||{}),o={year:e,month:t,day:r,isIntercalary:u}}l=o.day-1;var h,m=f[o.year-f[0]],y=m>>13;h=y?o.month>y?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var g=0;g<h;g++){var v=m&1<<12-g?30:29;l+=v}var x=d[o.year-d[0]],b=new Date(x>>9&4095,(x>>5&15)-1,(31&x)+l);return i.year=b.getFullYear(),i.month=1+b.getMonth(),i.day=b.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{var o="number"==typeof e&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var l="number"==typeof t&&t>=1&&t<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var s="number"==typeof r&&r>=1&&r<=31;if(!s)throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i=n||{}}var c=d[a.year-d[0]],u=a.year<<9|a.month<<5|a.day;i.year=u>=c?a.year:a.year-1,c=d[i.year-d[0]];var p,h=new Date(c>>9&4095,(c>>5&15)-1,31&c),m=new Date(a.year,a.month-1,a.day);p=Math.round((m-h)/864e5);var y,g=f[i.year-f[0]];for(y=0;y<13;y++){var v=g&1<<12-y?30:29;if(p<v)break;p-=v}var x=g>>13;!x||y<x?(i.isIntercalary=!1,i.month=1+y):y===x?(i.isIntercalary=!0,i.month=y):(i.isIntercalary=!1,i.month=y);return i.day=1+p,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(),f=this.isIntercalaryMonth(c,l),d=i&&f?this.toMonthIndex(c,l,!0):this.toMonthIndex(c,l,!1);d!==u&&s.month(d)}return s}});var l=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,s=/^\d?\d[iI]?/m,c=/^闰?十?[一二三四五六七八九]?月/m,u=/^闰?十?[一二三四五六七八九]?/m;n.calendars.chinese=o;var f=[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],d=[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":138,"object-assign":73}],125:[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":138,"object-assign":73}],126:[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":138,"object-assign":73}],127:[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":138,"object-assign":73}],128:[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)?30: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":138,"object-assign":73}],129:[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īs","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":138,"object-assign":73}],130:[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":138,"object-assign":73}],131:[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":138,"object-assign":73}],132:[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":138,"object-assign":73}],133:[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],2000:[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":138,"object-assign":73}],134:[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æharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","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),f=e-this.toJD(s,u,1)+1;return this.newDate(s,u,f)}}),n.calendars.persian=i,n.calendars.jalali=i},{"../main":138,"object-assign":73}],135:[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":138,"object-assign":73}],136:[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":138,"object-assign":73}],137:[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āthā","Yawm al-Arbaā","Yawm al-Khamīs","Yawm al-Juma","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":138,"object-assign":73}],138:[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":73}],139:[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,f=r.monthNamesShort||this.local.monthNamesShort,d=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,y=function(e){return"function"==typeof u?u.call(m,e,p("m")):x(h("m",e.month(),2))},g=function(e,t){return t?"function"==typeof d?d.call(m,e):d[e.month()-m.minMonth]:"function"==typeof f?f.call(m,e):f[e.month()-m.minMonth]},v=this.local.digits,x=function(e){return r.localNumbers&&v?v(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+=y(t);break;case"M":b+=g(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,f=-1,d=-1,p=-1,h=-1,m=-1,y=!1,g=!1,v=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=v(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(M).match(o);if(!l)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=l[0].length,parseInt(l[0],10)},b=this,_=function(){if("function"==typeof s){v("m");var e=s.call(b,t.substring(M));return M+=e.length,e}return x("m")},w=function(e,r,n,i){for(var o=v(e,i)?n:r,l=0;l<o.length;l++)if(t.substr(M,o[l].length).toLowerCase()===o[l].toLowerCase())return M+=o[l].length,l+b.minMonth;throw(a.local.unknownNameAt||a.regionalOptions[""].unknownNameAt).replace(/\{0\}/,M)},k=function(){if("function"==typeof u){var e=v("M")?u.call(b,t.substring(M)):c.call(b,t.substring(M));return M+=e.length,e}return w("M",c,u)},T=function(){if(t.charAt(M)!==e.charAt(A))throw(a.local.unexpectedLiteralAt||a.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,M);M++},M=0,A=0;A<e.length;A++)if(g)"'"!==e.charAt(A)||v("'")?T():g=!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=k();break;case"y":var S=A;y=!v("y",2),A=S,d=x("y",2);break;case"Y":d=x("Y",2);break;case"J":f=x("J")+.5,"."===t.charAt(M)&&(M++,x("J"));break;case"@":f=x("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":f=x("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":M=t.length;break;case"'":v("'")?T():g=!0;break;default:T()}if(M<t.length)throw a.local.unexpectedText||a.regionalOptions[""].unexpectedText;if(-1===d?d=this.today().year():d<100&&y&&(d+=-1===n?1900:this.today().year()-this.today().year()%100-(d<=n?0:100)),"string"==typeof p&&(p=l.call(this,d,p)),m>-1){p=1,h=m;for(var L=this.daysInMonth(d,p);h>L;L=this.daysInMonth(d,p))p++,h-=L}return f>-1?this.fromJD(f):this.newDate(d,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":138,"object-assign":73}],140:[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}]},{}],141:[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":275,"../../plot_api/plot_template":335,"../../plots/cartesian/constants":353,"../../plots/font_attributes":374,"./arrow_paths":140}],142:[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"],f=e["_"+i+"padminus"],d={x:1,y:-1}[i]*e[i+"shift"],p=3*e.arrowsize*e.arrowwidth||0,h=p+d,m=p-d,y=3*e.startarrowsize*e.arrowwidth||0,g=y+d,v=y-d;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,g),ppadminus:Math.max(f,v)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else g=l?g+l:g,v=l?v-l:v,r=a.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(u,h,g),ppadminus:Math.max(f,m,v)});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":299,"../../plots/cartesian/axes":346,"./draw":147}],143:[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,f=[],d=[],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?d:p:f).push(r);break}n===h&&a.visible&&"onout"===i&&d.push(r)}return{on:f,off:d,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),f={},d=e._fullLayout.annotations;if(!c.length&&!u.length)return;for(r=0;r<c.length;r++)(l=i(e.layout,"annotations",d[c[r]])).modifyItem("visible",!0),n.extendFlat(f,l.getUpdateObj());for(r=0;r<u.length;r++)(l=i(e.layout,"annotations",d[u[r]])).modifyItem("visible",!1),n.extendFlat(f,l.getUpdateObj());return a.call("update",e,{},f)}}},{"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387}],144:[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 f,d,p=i("arrowside");-1!==p.indexOf("end")&&(f=i("arrowhead"),d=i("arrowsize")),-1!==p.indexOf("start")&&(i("startarrowhead",f),i("startarrowsize",d)),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 y=i("hoverlabel.bgcolor",m.bgcolor||(a.opacity(o)?a.rgb(o):a.defaultLine)),g=i("hoverlabel.bordercolor",m.bordercolor||a.contrast(y));n.coerceFont(i,"hoverlabel.font",{family:m.font.family,size:m.font.size,color:m.font.color||g})}i("captureevents",!!h)}},{"../../lib":299,"../color":158}],145:[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,f=t._id.charAt(0),d=0;d<u.length;d++)s=u[d],c="annotations["+d+"].",s[f+"ref"]===t._id&&p(f),s["a"+f+"ref"]===t._id&&p("a"+f);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":324,"fast-isnumeric":33}],146:[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,f=["x","y"],d=[-10,-30],p={_fullLayout:r},h=0;h<2;h++){var m=f[h],y=a.coerceRef(e,t,p,m,"","paper");if("paper"!==y)a.getFromId(p,y)._annIndices.push(t._index);if(a.coercePosition(t,p,i,y,m,.5),u){var g="a"+m,v=a.coerceRef(e,t,p,g,"pixel",["pixel","paper"]);"pixel"!==v&&v!==y&&(v=t[g]="pixel");var x="pixel"===v?d[h]:.4;a.coercePosition(t,p,i,v,g,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":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"./attributes":141,"./common_defaults":144}],147:[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"),f=e("../fx"),d=e("../../lib/svg_text_utils"),p=e("../../lib/setcursor"),h=e("../dragelement"),m=e("../../plot_api/plot_template").arrayEditor,y=e("./draw_arrow_head");function g(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 v(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,g,x){var b,_,w=e._fullLayout,k=e._fullLayout._size,T=e._context.edits;i?(b="annotation-"+i,_=i+".annotations"):(b="annotation",_="annotations");var M=m(e.layout,_,t),A=M.modifyBase,S=M.modifyItem,L=M.getUpdateObj;w._infolayer.selectAll("."+b+'[data-index="'+r+'"]').remove();var C="clip"+w._uid+"_ann"+r;if(t._input&&!1!==t.visible){var D={x:{},y:{}},O=+t.textangle||0,P=w._infolayer.append("g").classed(b,!0).attr("data-index",String(r)).style("opacity",t.opacity),E=P.append("g").classed("annotation-text-g",!0),R=T[t.showarrow?"annotationTail":"annotationPosition"],z=t.captureevents||T.annotationText||R,I=E.append("g").style("pointer-events",z?"all":null).call(p,"pointer").on("click",function(){e._dragging=!1,e.emit("plotly_clickannotation",Z(n.event))});t.hovertext&&I.on("mouseover",function(){var r=t.hoverlabel,n=r.font,a=this.getBoundingClientRect(),i=e.getBoundingClientRect();f.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(){f.loneUnhover(w._hoverlayer.node())});var N=t.borderwidth,F=t.borderpad,j=N+F,B=I.append("rect").attr("class","bg").style("stroke-width",N+"px").call(c.stroke,t.bordercolor).call(c.fill,t.bgcolor),H=t.width||t.height,q=w._topclips.selectAll("#"+C).data(H?[0]:[]);q.enter().append("clipPath").classed("annclip",!0).attr("id",C).append("rect"),q.exit().remove();var U=t.font,Y=w._meta?o.templateString(t.text,w._meta):t.text,V=I.append("text").classed("annotation-text",!0).text(Y);T.annotationText?V.call(d.makeEditable,{delegate:I,gd:e}).call(G).on("edit",function(r){t.text=r,this.call(G),S("text",r),g&&g.autorange&&A(g._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0),a.call("_guiRelayout",e,L())}):V.call(G)}else n.selectAll("#"+C).remove();function Z(e){var n={index:r,annotation:t._input,fullAnnotation:t,event:e};return i&&(n.subplotId=i),n}function G(r){return r.call(u.font,U).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),d.convertToTspans(r,e,W),r}function W(){var r=V.selectAll("a");1===r.size()&&r.text()===V.text()&&I.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(B.node());var n=I.select(".annotation-text-math-group"),f=!n.empty(),m=u.bBox((f?n:V).node()),b=m.width,_=m.height,M=t.width||b,z=t.height||_,F=Math.round(M+2*j),U=Math.round(z+2*j);function Y(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 G=!1,W=["x","y"],J=0;J<W.length;J++){var X,K,Q,$,ee,te=W[J],re=t[te+"ref"]||te,ne=t["a"+te+"ref"],ae={x:g,y:x}[te],ie=(O+("x"===te?0:-90))*Math.PI/180,oe=F*Math.cos(ie),le=U*Math.sin(ie),se=Math.abs(oe)+Math.abs(le),ce=t[te+"anchor"],ue=t[te+"shift"]*("x"===te?1:-1),fe=D[te],de=s.getRefType(re);if(ae&&"domain"!==de){var pe=ae.r2fraction(t[te]);(pe<0||pe>1)&&(ne===re?((pe=ae.r2fraction(t["a"+te]))<0||pe>1)&&(G=!0):G=!0),X=ae._offset+ae.r2p(t[te]),$=.5}else{var he="domain"===de;"x"===te?(Q=t[te],X=he?ae._offset+ae._length*Q:X=k.l+k.w*Q):(Q=1-t[te],X=he?ae._offset+ae._length*Q:X=k.t+k.h*Q),$=t.showarrow?.5:Q}if(t.showarrow){fe.head=X;var me=t["a"+te];if(ee=oe*Y(.5,t.xanchor)-le*Y(.5,t.yanchor),ne===re){var ye=s.getRefType(ne);"domain"===ye?("y"===te&&(me=1-me),fe.tail=ae._offset+ae._length*me):"paper"===ye?"y"===te?(me=1-me,fe.tail=k.t+k.h*me):fe.tail=k.l+k.w*me:fe.tail=ae._offset+ae.r2p(me),K=ee}else fe.tail=X+me,K=ee+me;fe.text=fe.tail+ee;var ge=w["x"===te?"width":"height"];if("paper"===re&&(fe.head=o.constrain(fe.head,1,ge-1)),"pixel"===ne){var ve=-Math.max(fe.tail-3,fe.text),xe=Math.min(fe.tail+3,fe.text)-ge;ve>0?(fe.tail+=ve,fe.text+=ve):xe>0&&(fe.tail-=xe,fe.text-=xe)}fe.tail+=ue,fe.head+=ue}else K=ee=se*Y($,ce),fe.text=X+ee;fe.text+=ue,ee+=ue,K+=ue,t["_"+te+"padplus"]=se/2+K,t["_"+te+"padminus"]=se/2-K,t["_"+te+"size"]=se,t["_"+te+"shift"]=ee}if(G)I.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(M-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(z-_)*("middle"===t.valign?.5:1)),f)n.select("svg").attr({x:j+be-1,y:j+_e}).call(u.setClipUrl,H?C:null,e);else{var we=j+_e-m.top,ke=j+be-m.left;V.call(d.positionText,ke,we).call(u.setClipUrl,H?C:null,e)}q.select("rect").call(u.setRect,j,j,M,z),B.call(u.setRect,N/2,N/2,F-N,U-N),I.call(u.setTranslate,Math.round(D.x.text-F/2),Math.round(D.y.text-U/2)),E.attr({transform:"rotate("+O+","+D.x.text+","+D.y.text+")"});var Te,Me=function(r,n){P.selectAll(".annotation-arrow-g").remove();var s=D.x.head,f=D.y.head,d=D.x.tail+r,p=D.y.tail+n,m=D.x.text+r,b=D.y.text+n,_=o.rotationXYMatrix(O,m,b),w=o.apply2DTransform(_),M=o.apply2DTransform2(_),C=+B.attr("width"),R=+B.attr("height"),z=m-.5*C,N=z+C,F=b-.5*R,j=F+R,H=[[z,F,z,j],[z,j,N,j],[N,j,N,F],[N,F,z,F]].map(M);if(!H.reduce(function(e,t){return e^!!o.segmentsIntersect(s,f,s+1e6,f+1e6,t[0],t[1],t[2],t[3])},!1)){H.forEach(function(e){var t=o.segmentsIntersect(d,p,s,f,e[0],e[1],e[2],e[3]);t&&(d=t.x,p=t.y)});var q=t.arrowwidth,U=t.arrowcolor,Y=t.arrowside,V=P.append("g").style({opacity:c.opacity(U)}).classed("annotation-arrow-g",!0),Z=V.append("path").attr("d","M"+d+","+p+"L"+s+","+f).style("stroke-width",q+"px").call(c.stroke,c.rgb(U));if(y(Z,Y,t),T.annotationPosition&&Z.node().parentNode&&!i){var G=s,W=f;if(t.standoff){var J=Math.sqrt(Math.pow(s-d,2)+Math.pow(f-p,2));G+=t.standoff*(d-s)/J,W+=t.standoff*(p-f)/J}var X,K,Q=V.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(d-G)+","+(p-W),transform:l(G,W)}).style("stroke-width",q+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");h.init({element:Q.node(),gd:e,prepFn:function(){var e=u.getTranslate(I);X=e.x,K=e.y,g&&g.autorange&&A(g._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(e,r){var n=w(X,K),a=n[0]+e,i=n[1]+r;I.call(u.setTranslate,a,i),S("x",v(g,e,"x",k,t)),S("y",v(x,r,"y",k,t)),t.axref===t.xref&&S("ax",v(g,e,"ax",k,t)),t.ayref===t.yref&&S("ay",v(x,r,"ay",k,t)),V.attr("transform",l(e,r)),E.attr({transform:"rotate("+O+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",e,L());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};if(t.showarrow&&Me(0,0),R)h.init({element:I.node(),gd:e,prepFn:function(){Te=E.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?S("ax",v(g,e,"ax",k,t)):S("ax",t.ax+e),t.ayref===t.yref?S("ay",v(x,r,"ay",k.w,t)):S("ay",t.ay+r),Me(e,r);else{if(i)return;var a,o;if(g)a=v(g,e,"x",k,t);else{var s=t._xsize/k.w,c=t.x+(t._xshift-t.xshift)/k.w-s/2;a=h.align(c+e/k.w,s,0,1,t.xanchor)}if(x)o=v(x,r,"y",k,t);else{var u=t._ysize/k.h,f=t.y-(t._yshift+t.yshift)/k.h-u/2;o=h.align(f-r/k.h,u,0,1,t.yanchor)}S("x",a),S("y",o),g&&x||(n=h.getCursor(g?.5:a,x?.5:o,t.xanchor,t.yanchor))}E.attr({transform:l(e,r)+Te}),p(I,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",Z(n))},doneFn:function(){p(I),a.call("_guiRelayout",e,L());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&&g(e,r);return i.previousPromises(e)},drawOne:g,drawRaw:x}},{"../../lib":299,"../../lib/setcursor":319,"../../lib/svg_text_utils":322,"../../plot_api/plot_template":335,"../../plots/cartesian/axes":346,"../../plots/plots":380,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"../fx":198,"./draw_arrow_head":148,"@plotly/d3":20}],148:[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,f,d,p=e.node(),h=i[r.arrowhead||0],m=i[r.startarrowhead||0],y=(r.arrowwidth||1)*(r.arrowsize||1),g=(r.arrowwidth||1)*(r.startarrowsize||1),v=t.indexOf("start")>=0,x=t.indexOf("end")>=0,b=h.backoff*y+r.standoff,_=m.backoff*g+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,k=o.y-u.y;if(d=(f=Math.atan2(k,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+k*k))return void R();if(b){if(b*b>w*w+k*k)return void R();var T=b*Math.cos(f),M=b*Math.sin(f);u.x+=T,u.y+=M,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+k*k)return void R();var A=_*Math.cos(f),S=_*Math.sin(f);o.x-=A,o.y-=S,e.attr({x1:o.x,y1:o.y})}}else if("path"===p.nodeName){var L=p.getTotalLength(),C="";if(L<b+_)return void R();var D=p.getPointAtLength(0),O=p.getPointAtLength(.1);f=Math.atan2(D.y-O.y,D.x-O.x),o=p.getPointAtLength(Math.min(_,L)),C="0px,"+_+"px,";var P=p.getPointAtLength(L),E=p.getPointAtLength(L-.1);d=Math.atan2(P.y-E.y,P.x-E.x),u=p.getPointAtLength(Math.max(0,L-b)),C+=L-(C?_+b:b)+"px,"+L+"px",e.style("stroke-dasharray",C)}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}))}v&&z(m,o,f,g),x&&z(h,u,d,y)}},{"../../lib":299,"../color":158,"./arrow_paths":140,"@plotly/d3":20}],149:[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":357,"./attributes":141,"./calc_autorange":142,"./click":143,"./convert_coords":145,"./defaults":146,"./draw":147}],150:[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":328,"../../plot_api/plot_template":335,"../annotations/attributes":141}],151:[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":299,"../../plots/cartesian/axes":346}],152:[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":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"../annotations/common_defaults":144,"./attributes":150}],153:[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 f=i[u],d=s[f],p=t[f+"axis"].r2fraction(d);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":377,"../annotations/draw":147}],154:[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":299,"../../registry":387,"./attributes":150,"./convert":151,"./defaults":152,"./draw":153}],155:[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":124,"world-calendars/dist/calendars/coptic":125,"world-calendars/dist/calendars/discworld":126,"world-calendars/dist/calendars/ethiopian":127,"world-calendars/dist/calendars/hebrew":128,"world-calendars/dist/calendars/islamic":129,"world-calendars/dist/calendars/julian":130,"world-calendars/dist/calendars/mayan":131,"world-calendars/dist/calendars/nanakshahi":132,"world-calendars/dist/calendars/nepali":133,"world-calendars/dist/calendars/persian":134,"world-calendars/dist/calendars/taiwan":135,"world-calendars/dist/calendars/thai":136,"world-calendars/dist/calendars/ummalqura":137,"world-calendars/dist/main":138,"world-calendars/dist/plus":139}],156:[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="##",f={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:u,w:u,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};var d={};function p(e){var t=d[e];return t||(t=d[e]=n.instance(e))}function h(e){return a.extendFlat({},s,{description:e})}function m(e){return"Sets the calendar system to use with `"+e+"` date data."}var y={xcalendar:h(m("x"))},g=a.extendFlat({},y,{ycalendar:h(m("y"))}),v=a.extendFlat({},g,{zcalendar:h(m("z"))}),x=h(["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:y,candlestick:y},layout:{calendar:h(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:h(["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:h(["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:p,worldCalFmt:function(e,t,r){for(var n,a,i,s,c,d=Math.floor((t+.05)/l)+o,h=p(r).fromJD(d),m=0;-1!==(m=e.indexOf("%",m));)"0"===(n=e.charAt(m+1))||"-"===n||"_"===n?(i=3,a=e.charAt(m+2),"_"===n&&(n="-")):(a=n,n="0",i=2),(s=f[a])?(c=s===u?u:h.formatDate(s[n]),e=e.substr(0,m)+c+e.substr(m+i),m+=c.length):m+=i;return e}}},{"../../constants/numerical":279,"../../lib":299,"./calendars":155}],157:[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},{}],158:[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":285,"./attributes":157,"fast-isnumeric":33,tinycolor2:122}],159:[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({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},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",min:-2,max:3},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number",min:-2,max:3},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},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 left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,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"]}},_deprecated:{title:{valType:"string"},titlefont:a({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},{"../../lib/extend":293,"../../plot_api/edit_types":328,"../../plots/cartesian/layout_attributes":359,"../../plots/font_attributes":374}],160:[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"}}},{}],161:[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"),f=e.colorbar||{};function d(e,t){return n.coerce(f,u,c,e,t)}var p=r.margin||{t:0,b:0,l:0,r:0},h=r.width-p.l-p.r,m=r.height-p.t-p.b,y="v"===d("orientation"),g=d("thicknessmode");d("thickness","fraction"===g?30/(y?h:m):30);var v=d("lenmode");d("len","fraction"===v?1:y?m:h),d("x",y?1.02:.5),d("xanchor",y?"left":"center"),d("xpad"),d("y",y?.5:1.02),d("yanchor",y?"middle":"bottom"),d("ypad"),n.noneOrAll(f,u,["x","y"]),d("outlinecolor"),d("outlinewidth"),d("bordercolor"),d("borderwidth"),d("bgcolor");var x=n.coerce(f,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:y?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");d("ticklabeloverflow",-1!==x.indexOf("inside")?"hide past domain":"hide past div"),i(f,u,d,"linear");var b=r.font,_={outerTicks:!1,font:b};-1!==x.indexOf("inside")&&(_.bgColor="black"),s(f,u,d,"linear",_),l(f,u,d,"linear",_),o(f,u,d,"linear",_),d("title.text",r._dfltTitle.colorbar);var w=u.tickfont,k=n.extendFlat({},w,{color:b.color,size:n.bigFont(w.size)});n.coerceFont(d,"title.font",k),d("title.side",y?"top":"right")}},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/cartesian/prefix_suffix_defaults":363,"../../plots/cartesian/tick_label_defaults":367,"../../plots/cartesian/tick_mark_defaults":368,"../../plots/cartesian/tick_value_defaults":369,"./attributes":159}],162:[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,f=e("../../lib/extend").extendFlat,d=e("../../lib/setcursor"),p=e("../drawing"),h=e("../color"),m=e("../titles"),y=e("../../lib/svg_text_utils"),g=e("../colorscale/helpers").flipScale,v=e("../../plots/cartesian/axis_defaults"),x=e("../../plots/cartesian/position_defaults"),b=e("../../plots/cartesian/layout_attributes"),_=e("../../constants/alignment"),w=_.LINE_SPACING,k=_.FROM_TL,T=_.FROM_BR,M=e("./constants").cn;t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+M.colorbar).data(function(e){var t,r,n,a,i=e._fullLayout,o=e.calcdata,l=[];function s(e){return f(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?g(r.colorscale):r.colorscale,t._zrange=[r[a.min],r[a.max]])}for(var u=0;u<o.length;u++){var d=o[u],p=(n=d[0].trace)._module.colorbar;if(!0===n.visible&&p)for(var h=Array.isArray(p),m=h?p:[p],y=0;y<m.length;y++){var v=(a=m[y]).container;(r=v?n[v]:n)&&r.showscale&&((t=s(r.colorbar))._id="cb"+n.uid+(h&&v?"-"+v:""),t._traceIndex=n.index,t._propPrefix=(v?v+".":"")+"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(M.colorbar,!0),t.each(function(t){var r=n.select(this);c.ensureSingle(r,"rect",M.cbbg),c.ensureSingle(r,"g",M.cbfills),c.ensureSingle(r,"g",M.cblines),c.ensureSingle(r,"g",M.cbaxis,function(e){e.classed(M.crisp,!0)}),c.ensureSingle(r,"g",M.cbtitleunshift,function(e){e.append("g").classed(M.cbtitle,!0)}),c.ensureSingle(r,"rect",M.cboutline);var g=function(e,t,r){var o="v"===t.orientation,s=t.len,d=t.lenmode,g=t.thickness,_=t.thicknessmode,A=t.outlinewidth,S=t.borderwidth,L=t.bgcolor,C=t.xanchor,D=t.yanchor,O=t.xpad,P=t.ypad,E=t.x,R=o?t.y:1-t.y,z=r._fullLayout,I=z._size,N=t._fillcolor,F=t._line,j=t.title,B=j.side,H=t._zrange||n.extent(("function"==typeof N?N:F.color).domain()),q="function"==typeof F.color?F.color:function(){return F.color},U="function"==typeof N?N:function(){return N},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],f=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<f&&o.push(n);if(t._fillgradient)l=[0];else if("function"==typeof t._fillcolor){var d=t._filllevels;if(d)for(s=d.end+d.size/100,c=d.size,a=0;a<1e5&&(n=d.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]);return i.size<0&&(o.reverse(),l.reverse()),{line:o,fill:l}}(0,t,H),Z=V.fill,G=V.line,W=Math.round(g*("fraction"===_?o?I.w:I.h:1)),J=W/(o?I.w:I.h),X=Math.round(s*("fraction"===d?o?I.h:I.w:1)),K=X/(o?I.h:I.w),Q=Math.round(o?E*I.w+O:R*I.h+P),$={center:.5,right:1}[C]||0,ee={top:1,middle:.5}[D]||0,te=o?E-$*J:R-ee*J,re=o?R-ee*K:E-$*K,ne=Math.round(o?I.h*(1-re):I.w*re);t._lenFrac=K,t._thickFrac=J,t._uFrac=te,t._vFrac=re;var ae=t._axis=function(e,t,r){var n=e._fullLayout,a="v"===t.orientation,i={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,ticklabelstep:t.ticklabelstep,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:a?"right":"bottom",position:1},o=a?"y":"x",l={type:"linear",_id:o+t._id},s={letter:o,font:n.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:n.calendar};function u(e,t){return c.coerce(i,l,b,e,t)}return v(i,l,u,s,n),x(i,l,u,s),l}(r,t,H);ae.position=J+(o?E+O/I.w:R+P/I.h);var ie=-1!==["top","bottom"].indexOf(B);if(o&&ie&&(ae.title.side=B,ae.titlex=E+O/I.w,ae.titley=re+("top"===j.side?K-P/I.h:P/I.h)),o||ie||(ae.title.side=B,ae.titley=R+P/I.h,ae.titlex=re+O/I.w),F.color&&"auto"===t.tickmode){ae.tickmode="linear",ae.tick0=Y.start;var oe=Y.size,le=c.constrain(X/50,4,15)+1,se=(H[1]-H[0])/((t.nticks||le)*oe);if(se>1){var ce=Math.pow(10,Math.floor(Math.log(se)/Math.LN10));oe*=ce*c.roundUp(se/ce,[2,5,10]),(Math.abs(Y.start)/Y.size+1e-6)%1<2e-6&&(ae.tick0=0)}ae.dtick=oe}ae.domain=o?[re+P/I.h,re+K-P/I.h]:[re+O/I.w,re+K-O/I.w],ae.setScale(),e.attr("transform",u(Math.round(I.l),Math.round(I.t)));var ue,fe=e.select("."+M.cbtitleunshift).attr("transform",u(-Math.round(I.l),-Math.round(I.t))),de=ae.ticklabelposition,pe=ae.title.font.size,he=e.select("."+M.cbaxis),me=0,ye=0;function ge(n,a){var i={propContainer:ae,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:z._dfltTitle.colorbar,containerGroup:e.select("."+M.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(r,n,f(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){var e,t;(o&&ie||!o&&!ie)&&("top"===B&&(e=O+I.l+I.w*E,t=P+I.t+I.h*(1-re-K)+3+.75*pe),"bottom"===B&&(e=O+I.l+I.w*E,t=P+I.t+I.h*(1-re)-3-.25*pe),"right"===B&&(t=P+I.t+I.h*R+3+.75*pe,e=O+I.l+I.w*re),ge(ae._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ie||o&&ie){var i,s=e.select("."+M.cbtitle),f=s.select("text"),d=[-A/2,A/2],h=s.select(".h"+ae._id+"title-math-group").node(),m=15.6;if(f.node()&&(m=parseInt(f.node().style.fontSize,10)*w),h?(i=p.bBox(h),ye=i.width,(me=i.height)>m&&(d[1]-=(me-m)/2)):f.node()&&!f.classed(M.jsPlaceholder)&&(i=p.bBox(f.node()),ye=i.width,me=i.height),o){if(me){if(me+=5,"top"===B)ae.domain[1]-=me/I.h,d[1]*=-1;else{ae.domain[0]+=me/I.h;var g=y.lineCount(f);d[1]+=(1-g)*m}s.attr("transform",u(d[0],d[1])),ae.setScale()}}else ye&&("right"===B&&(ae.domain[0]+=(ye+pe/2)/I.w),s.attr("transform",u(d[0],d[1])),ae.setScale())}e.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",o?u(0,Math.round(I.h*(1-ae.domain[1]))):u(Math.round(I.w*ae.domain[0]),0)),he.attr("transform",o?u(0,Math.round(-I.t)):u(Math.round(-I.l),0));var v=e.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data(Z);v.enter().append("rect").classed(M.cbfill,!0).style("stroke","none"),v.exit().remove();var x=H.map(ae.c2p).map(Math.round).sort(function(e,t){return e-t});v.each(function(e,i){var l=[0===i?H[0]:(Z[i]+Z[i-1])/2,i===Z.length-1?H[1]:(Z[i]+Z[i+1])/2].map(ae.c2p).map(Math.round);o&&(l[1]=c.constrain(l[1]+(l[1]>l[0])?1:-1,x[0],x[1]));var s=n.select(this).attr(o?"x":"y",Q).attr(o?"y":"x",n.min(l)).attr(o?"width":"height",Math.max(W,2)).attr(o?"height":"width",Math.max(n.max(l)-n.min(l),2));if(t._fillgradient)p.gradient(s,r,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=U(e).replace("e-","");s.attr("fill",a(u).toHexString())}});var b=e.select("."+M.cblines).selectAll("path."+M.cbline).data(F.color&&F.width?G:[]);b.enter().append("path").classed(M.cbline,!0),b.exit().remove(),b.each(function(e){var t=Q,r=Math.round(ae.c2p(e))+F.width/2%1;n.select(this).attr("d","M"+(o?t+","+r:r+","+t)+(o?"h":"v")+W).call(p.lineGroupStyle,F.width,q(e),F.dash)}),he.selectAll("g."+ae._id+"tick,path").remove();var _=Q+W+(A||0)/2-("outside"===t.ticks?1:0),k=l.calcTicks(ae),T=l.getTickSigns(ae)[2];return l.drawTicks(r,ae,{vals:"inside"===ae.ticks?l.clipEnds(ae,k):k,layer:he,path:l.makeTickPath(ae,_,T),transFn:l.makeTransTickFn(ae)}),l.drawLabels(r,ae,{vals:k,layer:he,transFn:l.makeTransTickLabelFn(ae),labelFns:l.makeLabelFns(ae,_)})},function(){if(o&&!ie||!o&&ie){var e,a,i=ae.position||0,l=ae._offset+ae._length/2;if("right"===B)a=l,e=I.l+I.w*i+10+pe*(ae.showticklabels?1:.5);else if(e=l,"bottom"===B&&(a=I.t+I.h*i+10+(-1===de.indexOf("inside")?ae.tickfont.size:0)+("intside"!==ae.ticks&&t.ticklen||0)),"top"===B){var s=j.text.split("<br>").length;a=I.t+I.h*i+10-W-w*pe*s}ge((o?"h":"v")+ae._id+"title",{avoid:{selection:n.select(r).selectAll("g."+ae._id+"tick"),side:B,offsetTop:o?0:I.t,offsetLeft:o?I.l:0,maxShift:o?z.width:z.height},attributes:{x:e,y:a,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},i.previousPromises,function(){var n,l=W+A/2;-1===de.indexOf("inside")&&(n=p.bBox(he.node()),l+=o?n.width:n.height),ue=fe.select("text");var c=0,f=o&&"top"===B,m=!o&&"right"===B,y=0;if(ue.node()&&!ue.classed(M.jsPlaceholder)){var v,x=fe.select(".h"+ae._id+"title-math-group").node();x&&(o&&ie||!o&&!ie)?(n=p.bBox(x),c=n.width,v=n.height):(n=p.bBox(fe.node()),c=n.right-I.l-(o?Q:ne),v=n.bottom-I.t-(o?ne:Q),o||"top"!==B||(l+=n.height,y=n.height)),m&&(ue.attr("transform",u(c/2+pe/2,0)),c*=2),l=Math.max(l,o?c:v)}var b=2*(o?O:P)+l+S+A/2,w=0;!o&&j.text&&"bottom"===D&&R<=0&&(b+=w=b/2,y+=w),z._hColorbarMoveTitle=w,z._hColorbarMoveCBTitle=y;var N=S+A;e.select("."+M.cbbg).attr("x",(o?Q:ne)-N/2-(o?O:0)).attr("y",(o?ne:Q)-(o?X:P+y-w)).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(X+N,2)).call(h.fill,L).call(h.stroke,t.bordercolor).style("stroke-width",S);var F=m?Math.max(c-10,0):0;if(e.selectAll("."+M.cboutline).attr("x",(o?Q:ne+O)+F).attr("y",(o?ne+P-X:Q)+(f?me:0)).attr(o?"width":"height",Math.max(W,2)).attr(o?"height":"width",Math.max(X-(o?2*P+me:2*O+F),2)).call(h.stroke,t.outlinecolor).style({fill:"none","stroke-width":A}),e.attr("transform",u(I.l-(o?$*b:0),I.t-(o?0:(1-ee)*b-y))),!o&&(S||a(L).getAlpha()&&!a.equals(z.paper_bgcolor,L))){var H=he.selectAll("text"),q=H[0].length,U=e.select("."+M.cbbg).node(),Y=p.bBox(U),V=p.getTranslate(e);H.each(function(e,t){var r=q-1;if(0===t||t===r){var n,a=p.bBox(this),i=p.getTranslate(this);if(t===r){var o=a.right+i.x,l=Y.right+V.x+ne-S-2+E;(n=l-o)>0&&(n=0)}else if(0===t){var s=a.left+i.x,c=Y.left+V.x+ne+S+2;(n=c-s)<0&&(n=0)}n&&(q<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Z={},G=k[C],J=T[C],K=k[D],te=T[D],re=b-W;o?("pixels"===d?(Z.y=R,Z.t=X*K,Z.b=X*te):(Z.t=Z.b=0,Z.yt=R+s*K,Z.yb=R-s*te),"pixels"===_?(Z.x=E,Z.l=b*G,Z.r=b*J):(Z.l=re*G,Z.r=re*J,Z.xl=E-g*G,Z.xr=E+g*J)):("pixels"===d?(Z.x=E,Z.l=X*G,Z.r=X*J):(Z.l=Z.r=0,Z.xl=E+s*G,Z.xr=E-s*J),"pixels"===_?(Z.y=1-R,Z.t=b*K,Z.b=b*te):(Z.t=re*K,Z.b=re*te,Z.yt=R-g*K,Z.yb=R+g*te)),i.autoMargin(r,t._id,Z)}],r)}(r,t,e);g&&g.then&&(e._promises||[]).push(g),e._context.edits.colorbarPosition&&function(e,t,r){var n,a,i,l="v"===t.orientation,c=r._fullLayout._size;s.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),d(e)},moveFn:function(r,o){e.attr("transform",n+u(r,o)),a=s.align((l?t._uFrac:t._vFrac)+r/c.w,l?t._thickFrac:t._lenFrac,0,1,t.xanchor),i=s.align((l?t._vFrac:1-t._uFrac)-o/c.h,l?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=s.getCursor(a,i,t.xanchor,t.yanchor);d(e,f)},doneFn:function(){if(d(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":274,"../../lib":299,"../../lib/extend":293,"../../lib/setcursor":319,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../plots/cartesian/axis_defaults":348,"../../plots/cartesian/layout_attributes":359,"../../plots/cartesian/position_defaults":362,"../../plots/plots":380,"../../registry":387,"../color":158,"../colorscale/helpers":169,"../dragelement":177,"../drawing":180,"../titles":267,"./constants":160,"@plotly/d3":20,tinycolor2:122}],163:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e){return n.isPlainObject(e.colorbar)}},{"../../lib":299}],164:[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":159,"./defaults":161,"./draw":162,"./has_colorbar":163}],165:[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,f=t.editTypeOverride||"",d=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,t.colorAttr):l(d+(r={z:"z",c:"color"}[i]));var p=i+"auto",h=i+"min",m=i+"max",y=i+"mid",g=(l(d+p),l(d+h),l(d+m),{});g[h]=g[m]=void 0;var v={};v[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},t.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:g},x[h]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:v},x[m]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:v},x[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:g},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":315,"../../lib/sort_object_keys":320,"../colorbar/attributes":159,"./scales.js":173}],166:[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,f=i(u),d=!1!==f.auto,p=f.min,h=f.max,m=f.mid,y=function(){return a.aggNums(Math.min,null,s)},g=function(){return a.aggNums(Math.max,null,s)};(void 0===p?p=y():d&&(p=u._colorAx&&n(p)?Math.min(p,y()):y()),void 0===h?h=g():d&&(h=u._colorAx&&n(h)?Math.max(h,g()):g()),d&&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),f._sync("min",p),f._sync("max",h),f.autocolorscale)&&(o=p*h<0?l.colorscale.diverging:p>=0?l.colorscale.sequential:l.colorscale.sequentialminus,f._sync("colorscale",o))}},{"../../lib":299,"./helpers":169,"fast-isnumeric":33}],167:[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 f in t._colorAxes)o(t[f],{min:"cmin",max:"cmax"})}},{"../../lib":299,"./helpers":169}],168:[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,f,d){var p=d.prefix,h=d.cLetter,m="_module"in r,y=c(t,p),g=c(r,p),v=c(r._template||{},p)||{},x=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,u,f,d)};if(m){var b=u._colorAxes||{},_=f(p+"coloraxis");if(_){var w=s(r,"contour")&&a.nestedProperty(r,"contours.coloring").get()||"heatmap",k=b[_];return void(k?(k[2].push(x),k[0]!==w&&(k[0]=!1,a.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[_]=[w,r,[x]])}}var T=y[h+"min"],M=y[h+"max"],A=n(T)&&n(M)&&T<M;f(p+h+"auto",!A)?f(p+h+"mid"):(f(p+h+"min"),f(p+h+"max"));var S,L,C=y.colorscale,D=v.colorscale;(void 0!==C&&(S=!l(C)),void 0!==D&&(S=!l(D)),f(p+"autocolorscale",S),f(p+"colorscale"),f(p+"reversescale"),"marker.line."!==p)&&(p&&m&&(L=i(y)),f(p+"showscale",L)&&(p&&v&&(g._template=v),o(y,g,u)))}},{"../../lib":299,"../../registry":387,"../colorbar/defaults":161,"../colorbar/has_colorbar":163,"./scales":173,"fast-isnumeric":33}],169:[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 f(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?o[n]=i[l]:(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 d(e){for(var t=f(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 f=a(o[u]).toRgb();c[u]=[f.r,f.g,f.b,f.a]}var d,p=n.scale.linear().domain(r).range(c).clamp(!0),h=t.noNumericCheck,y=t.returnArray;return(d=h&&y?p:h?function(e){return m(p(e))}:y?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,d.range=function(){return o},d}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:f,extractScale:d,flipScale:p,makeColorScaleFunc:h,makeColorScaleFuncFromTrace:function(e,t){return h(d(e),t)}}},{"../../lib":299,"../color":158,"./scales":173,"@plotly/d3":20,"fast-isnumeric":33,tinycolor2:122}],170:[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":165,"./calc":166,"./cross_trace_defaults":167,"./defaults":168,"./helpers":169,"./layout_attributes":171,"./layout_defaults":172,"./scales":173}],171:[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":293,"./attributes":165,"./scales":173}],172:[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 f in c){var d=c[f];if(d[0])l=e[f]||{},(s=a.newContainer(t,f,"coloraxis"))._name=f,o(l,s,t,u,{prefix:"",cLetter:"c"});else{for(var p=0;p<d[2].length;p++)d[2][p]();delete t._colorAxes[f]}}}},{"../../lib":299,"../../plot_api/plot_template":335,"./defaults":168,"./layout_attributes":171}],173:[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:122}],174:[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}},{}],175:[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":299}],176:[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)}},{}],177:[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 f(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,d,p,h,m,y=e.gd,g=1,v=y._context.doubleClickDelay,x=e.element;y._mouseDownTime||(y._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){y._dragged=!1,y._dragging=!0;var o=f(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())-y._mouseDownTime<v?g+=1:(g=1,y._mouseDownTime=n),e.prepFn&&e.prepFn(i,t,r),a&&!m?(d=u()).style.cursor=window.getComputedStyle(x).cursor:a||(d=document,c=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(x).cursor),document.addEventListener("mouseup",k),document.addEventListener("touchend",k),!1!==e.dragmode&&(i.preventDefault(),document.addEventListener("mousemove",w),document.addEventListener("touchmove",w,{passive:!1}))}function w(n){n.preventDefault();var a=f(n),i=e.minDrag||l.MINDRAG,o=b(a[0]-t,a[1]-r,i),c=o[0],u=o[1];(c||u)&&(y._dragged=!0,s.unhover(y,n)),y._dragged&&e.moveFn&&!m&&(y._dragdata={element:x,dx:c,dy:u},e.moveFn(c,u))}function k(t){if(delete y._dragdata,!1!==e.dragmode&&(t.preventDefault(),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w)),document.removeEventListener("mouseup",k),document.removeEventListener("touchend",k),a?o(d):c&&(d.documentElement.style.cursor=c,c=null),y._dragging){if(y._dragging=!1,(new Date).getTime()-y._mouseDownTime>v&&(g=Math.max(g-1,1)),y._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(g,p),!m){var r;try{r=new MouseEvent("click",t)}catch(e){var n=f(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)}y._dragging=!1,y._dragged=!1}else y._dragged=!1}},s.coverSlip=u},{"../../lib":299,"../../plots/cartesian/constants":353,"./align":174,"./cursor":175,"./unhover":178,"has-hover":64,"has-passive-events":65,"mouse-event-offset":71}],178:[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":291,"../../lib/events":292,"../../lib/throttle":323,"../fx/constants":192}],179:[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"}},{}],180:[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"),f=a.strTranslate,d=e("../../lib/svg_text_utils"),p=e("../../constants/xmlns_namespaces"),h=e("../../constants/alignment").LINE_SPACING,m=e("../../constants/interactions").DESELECTDIM,y=e("../../traces/scatter/subtypes"),g=e("../../traces/scatter/make_bubble_size_func"),v=e("../../components/fx/helpers").appendArrayPointValue,x=t.exports={};function b(e,t,r){var n=t.fillpattern,a=n&&x.getPatternAttr(n.shape,0,"");if(a){var i=x.getPatternAttr(n.bgcolor,0,null),o=x.getPatternAttr(n.fgcolor,0,null),l=n.fgopacity,s=x.getPatternAttr(n.size,0,8),u=x.getPatternAttr(n.solidity,0,.3),f=t.uid;x.pattern(e,"point",r,f,a,s,u,void 0,n.fillmode,i,o,l)}else t.fillcolor&&e.call(c.fill,t.fillcolor)}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",f(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,t){var r=n.select(e.node());b(e,((r.data()[0]||[])[0]||{}).trace||{},t)},x.fillGroupStyle=function(e,t){e.style("stroke-width",0).each(function(e){var r=n.select(this);e[0].trace&&b(r,e[0].trace,t)})};var _=e("./symbol_defs");x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(_).forEach(function(e){var t=_[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,x.symbolBackOffs[r]=t.backoff||0,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 w=x.symbolNames.length,k="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";function T(e,t,r,n){var a=e%100;return x.symbolFuncs[a](t,r,n)+(e>=200?k:"")}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>=w||e>=400?0:Math.floor(Math.max(e,0))};var M={x1:1,x2:0,y1:0,y2:0},A={x1:0,x2:0,y1:1,y2:0},S=i("~f"),L={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:M},horizontalreversed:{node:"linearGradient",attrs:M,reversed:!0},vertical:{node:"linearGradient",attrs:A},verticalreversed:{node:"linearGradient",attrs:A,reversed:!0}};x.gradient=function(e,t,r,i,o,s){for(var u=o.length,f=L[i],d=new Array(u),p=0;p<u;p++)f.reversed?d[u-1-p]=[S(100*(1-o[p][0])),o[p][1]]:d[p]=[S(100*o[p][0]),o[p][1]];var h=t._fullLayout,m="g"+h._uid+"-"+r,y=h._defs.select(".gradients").selectAll("#"+m).data([i+d.join(";")],a.identity);y.exit().remove(),y.enter().append(f.node).each(function(){var e=n.select(this);f.attrs&&e.attr(f.attrs),e.attr("id",m);var t=e.selectAll("stop").data(d);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,Y(m,t)).style(s+"-opacity",null),e.classed("gradient_filled",!0)},x.pattern=function(e,t,r,i,o,s,u,f,d,p,h,m){var y="legend"===t;f&&("overlay"===d?(p=f,h=c.contrast(p)):(p=void 0,h=f));var g,v,x,b,_,w,k,T,M,A,S,L=r._fullLayout,C="p"+L._uid+"-"+i,D={},O=l(h),P=c.tinyRGB(O),E=m*O.getAlpha();switch(o){case"/":g=s*Math.sqrt(2),v=s*Math.sqrt(2),w="path",D={d:x="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:E,stroke:P,"stroke-width":(b=u*s)+"px"};break;case"\\":g=s*Math.sqrt(2),v=s*Math.sqrt(2),w="path",D={d:x="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:E,stroke:P,"stroke-width":(b=u*s)+"px"};break;case"x":g=s*Math.sqrt(2),v=s*Math.sqrt(2),x="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,b=s-s*Math.sqrt(1-u),w="path",D={d:x,opacity:E,stroke:P,"stroke-width":b+"px"};break;case"|":w="path",w="path",D={d:x="M"+(g=s)/2+",0L"+g/2+","+(v=s),opacity:E,stroke:P,"stroke-width":(b=u*s)+"px"};break;case"-":w="path",w="path",D={d:x="M0,"+(v=s)/2+"L"+(g=s)+","+v/2,opacity:E,stroke:P,"stroke-width":(b=u*s)+"px"};break;case"+":w="path",x="M"+(g=s)/2+",0L"+g/2+","+(v=s)+"M0,"+v/2+"L"+g+","+v/2,b=s-s*Math.sqrt(1-u),w="path",D={d:x,opacity:E,stroke:P,"stroke-width":b+"px"};break;case".":g=s,v=s,u<Math.PI/4?_=Math.sqrt(u*s*s/Math.PI):(k=u,T=Math.PI/4,M=1,A=s/2,S=s/Math.sqrt(2),_=A+(S-A)*(k-T)/(M-T)),w="circle",D={cx:g/2,cy:v/2,r:_,opacity:E,fill:P}}var R=[o||"noSh",p||"noBg",h||"noFg",s,u].join(";"),z=L._defs.select(".patterns").selectAll("#"+C).data([R],a.identity);z.exit().remove(),z.enter().append("pattern").each(function(){var e=n.select(this);if(e.attr({id:C,width:g+"px",height:v+"px",patternUnits:"userSpaceOnUse",patternTransform:y?"scale(0.8)":""}),p){var t=l(p),r=c.tinyRGB(t),a=t.getAlpha(),i=e.selectAll("rect").data([0]);i.exit().remove(),i.enter().append("rect").attr({width:g+"px",height:v+"px",fill:r,"fill-opacity":a})}var o=e.selectAll(w).data([0]);o.exit().remove(),o.enter().append(w).attr(D)}),e.style("fill",Y(C,r)).style("fill-opacity",null),e.classed("pattern_filled",!0)},x.initGradients=function(e){var t=e._fullLayout;a.ensureSingle(t._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),n.select(e).selectAll(".gradient_filled").classed("gradient_filled",!1)},x.initPatterns=function(e){var t=e._fullLayout;a.ensureSingle(t._defs,"g","patterns").selectAll("pattern").remove(),n.select(e).selectAll(".pattern_filled").classed("pattern_filled",!1)},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;var f=ae(e,r),d=G(e,r);t.attr("d",T(u,s,f,d))}var p,h,m,y=!1;if(e.so)m=l.outlierwidth,h=l.outliercolor,p=o.outliercolor;else{var g=(l||{}).width;m=(e.mlw+1||g+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,h="mlc"in e?e.mlcc=n.lineScale(e.mlc):a.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,a.isArrayOrTypedArray(o.color)&&(p=c.defaultLine,y=!0),p="mc"in e?e.mcc=n.markerScale(e.mc):o.color||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(e))}if(e.om)t.call(c.stroke,p).style({"stroke-width":(m||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:m)+"px");var v=o.gradient,b=e.mgt;b?y=!0:b=v&&v.type,a.isArrayOrTypedArray(b)&&(b=b[0],L[b]||(b=0));var _=o.pattern,w=_&&x.getPatternAttr(_.shape,e.i,"");if(b&&"none"!==b){var k=e.mgc;k?y=!0:k=v.color;var M=r.uid;y&&(M+="-"+e.i),x.gradient(t,i,M,b,[[0,k],[1,p]],"fill")}else if(w){var A=x.getPatternAttr(_.bgcolor,e.i,null),S=x.getPatternAttr(_.fgcolor,e.i,null),C=_.fgopacity,D=x.getPatternAttr(_.size,e.i,8),O=x.getPatternAttr(_.solidity,e.i,.3),P=e.mcc||a.isArrayOrTypedArray(_.shape)||a.isArrayOrTypedArray(_.bgcolor)||a.isArrayOrTypedArray(_.size)||a.isArrayOrTypedArray(_.solidity),E=r.uid;P&&(E+="-"+e.i),x.pattern(t,"point",i,E,w,D,O,e.mcc,_.fillmode,A,S,C)}else c.fill(t,p);m&&c.stroke(t,h)}},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=y.isBubble(e)?g(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,f=l.opacity,d=void 0!==u,p=void 0!==f;(a.isArrayOrTypedArray(c)||d||p)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?i.opacity:e.mo;return e.selected?d?u:t:p?f:m*t});var h=i.color,y=o.color,g=l.color;(y||g)&&(t.selectedColorFn=function(e){var t=e.mcc||h;return e.selected?y||t:g||t});var v=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||v/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,n){var i=n.mx||a.symbol||0,o=r.selectedSizeFn(n);e.attr("d",T(x.symbolNumber(i),o,ae(n,t),G(n,t))),n.mrc2=o}),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 C={start:1,end:-1,middle:0,bottom:1,top:-1};function D(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=(d.lineCount(e)-1)*h+1,p=C[s]*c,m=.75*r+C[l]*c+(C[l]-1)*u*r/2;e.attr("text-anchor",s),i||o.attr("transform",f(p,m))}function O(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,f=u?u(e,t,s):{},p={};v(p,t,e.i);var h=t._meta||{};c=a.texttemplateString(c,f,s._d3locale,p,e,h)}var m=e.tp||t.textposition,y=O(e,t),g=i?i(e):e.tc||t.textfont.color;o.call(x.font,e.tf||t.textfont.family,y,g).text(c).call(d.convertToTspans,r).call(D,m,y,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=O(e,t);c.fill(a,i);var u=s.traceIs(t,"bar-like");D(a,o,l,e.mrc2||e.mrc,u)})}};var P,E,R=.5;function z(e,t,r){return r&&(e=H(e)),t?N(e[1]):I(e[0])}function I(e){var t=n.round(e,2);return P=t,t}function N(e){var t=n.round(e,2);return E=t,t}function F(e,t,r,n){var a=e[0]-t[0],i=e[1]-t[1],o=r[0]-t[0],l=r[1]-t[1],s=Math.pow(a*a+i*i,R/2),c=Math.pow(o*o+l*l,R/2),u=(c*c*a-s*s*o)*n,f=(c*c*i-s*s*l)*n,d=3*c*(s+c),p=3*s*(s+c);return[[I(t[0]+(d&&u/d)),N(t[1]+(d&&f/d))],[I(t[0]-(p&&u/p)),N(t[1]-(p&&f/p))]]}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(F(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=[F(e[a],e[0],e[1],t)];for(r=1;r<a;r++)i.push(F(e[r-1],e[r],e[r+1],t));for(i.push(F(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 j={hv:function(e,t,r){return"H"+I(t[0])+"V"+z(t,1,r)},vh:function(e,t,r){return"V"+N(t[1])+"H"+z(t,0,r)},hvh:function(e,t,r){return"H"+I((e[0]+t[0])/2)+"V"+N(t[1])+"H"+z(t,0,r)},vhv:function(e,t,r){return"V"+N((e[1]+t[1])/2)+"H"+I(t[0])+"V"+z(t,1,r)}},B=function(e,t,r){return"L"+z(t,0,r)+","+z(t,1,r)};function H(e,t){var r=e.backoff,n=e.trace,i=e.d,o=e.i;if(r&&n&&n.marker&&n.marker.angle%360==0&&n.line&&"spline"!==n.line.shape){var l=a.isArrayOrTypedArray(r),s=e,c=t?t[0]:P||0,u=t?t[1]:E||0,f=s[0],d=s[1],p=f-c,h=d-u,m=Math.atan2(h,p),y=l?r[o]:r;if("auto"===y){var g=s.i;"scatter"===n.type&&g--;var v=s.marker;y=v?x.symbolBackOffs[x.symbolNumber(v.symbol)]*v.size:0,y+=x.getMarkerStandoff(i[g],n)||0}var b=f-y*Math.cos(m),_=d-y*Math.sin(m);(b<=f&&b>=c||b>=f&&b<=c)&&(_<=d&&_>=u||_>=d&&_<=u)&&(e=[b,_])}return e}x.steps=function(e){var t=j[e]||B;return function(e){for(var r="M"+I(e[0][0])+","+N(e[0][1]),n=e.length,a=1;a<n;a++)r+=t(e[a-1],e[a],a===n-1);return r}},x.applyBackoff=H,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 q=0;function U(e){var t=e.getAttribute("data-unformatted");if(null!==t)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}function Y(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=U(e)),r){if(i=x.savedBBoxes[r])return a.extendFlat({},i)}else if(1===e.childNodes.length){var s=e.childNodes[0];if(r=U(s)){var c=+s.getAttribute("x")||0,u=+s.getAttribute("y")||0,f=s.getAttribute("transform");if(!f){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+"~"+f,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(d.positionText,0,0);var h=o.getBoundingClientRect(),m=x.testref.node().getBoundingClientRect();t||l.removeChild(o);var y={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 q>=1e4&&(x.savedBBoxes={},q=0),r&&(x.savedBBoxes[r]=y),q++,a.extendFlat({},y)},x.setClipUrl=function(e,t,r){e.attr("clip-path",Y(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+=f(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 V=/\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(V,"");e=(e+=n).trim(),this.setAttribute("transform",e)})}};var Z=/translate\([^)]*\)\s*$/;function G(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}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(Z);e=1===t&&1===r?[]:[f(o,l),"scale("+t+","+r+")",f(-o,-l)],s&&e.push(s),a.attr("transform",e.join(""))}})},x.getMarkerStandoff=G;var W,J,X,K,Q,$,ee=Math.atan2,te=Math.cos,re=Math.sin;function ne(e,t){var r=t[0],n=t[1];return[r*te(e)-n*re(e),r*re(e)+n*te(e)]}function ae(e,t){var r,n,a=e.ma;void 0===a&&(a=t.marker.angle||0);var i=t.marker.angleref;if("previous"===i||"north"===i){if(t._geo){var l=t._geo.project(e.lonlat);r=l[0],n=l[1]}else{var s=t._xA,c=t._yA;if(!s||!c)return 90;r=s.c2p(e.x),n=c.c2p(e.y)}if(t._geo){var u,f=e.lonlat[0],d=e.lonlat[1],p=t._geo.project([f,d+1e-5]),h=t._geo.project([f+1e-5,d]),m=ee(h[1]-n,h[0]-r),y=ee(p[1]-n,p[0]-r);if("north"===i)u=a/180*Math.PI;else if("previous"===i){var g=f/180*Math.PI,v=d/180*Math.PI,x=W/180*Math.PI,b=J/180*Math.PI,_=x-g,w=te(b)*re(_),k=re(b)*te(v)-te(b)*re(v)*te(_);u=-ee(w,k)-Math.PI,W=f,J=d}var T=ne(m,[te(u),0]),M=ne(y,[re(u),0]);a=ee(T[1]+M[1],T[0]+M[0])/Math.PI*180,"previous"!==i||$===t.uid&&e.i===Q+1||(a=null)}if("previous"===i&&!t._geo)if($===t.uid&&e.i===Q+1&&o(r)&&o(n)){var A=r-X,S=n-K,L=t.line&&t.line.shape||"",C=L.slice(L.length-1);"h"===C&&(S=0),"v"===C&&(A=0),a+=ee(S,A)/Math.PI*180+90}else a=null}return X=r,K=n,Q=e.i,$=t.uid,a}x.getMarkerAngle=ae},{"../../components/fx/helpers":194,"../../constants/alignment":274,"../../constants/interactions":278,"../../constants/xmlns_namespaces":280,"../../lib":299,"../../lib/svg_text_utils":322,"../../registry":387,"../../traces/scatter/make_bubble_size_func":526,"../../traces/scatter/subtypes":534,"../color":158,"../colorscale":170,"./symbol_defs":181,"@plotly/d3":20,"fast-isnumeric":33,tinycolor2:122}],181:[function(e,t,r){"use strict";var n,a,i,o,l=e("parse-svg-path"),s=e("@plotly/d3").round,c=Math.sqrt(2),u=Math.sqrt(3),f=Math.PI,d=Math.cos,p=Math.sin;function h(e){return null===e}function m(e,t,r){if(!(e&&e%360!=0||t))return r;if(i===e&&o===t&&n===r)return a;function s(e,r){var n=d(e),a=p(e),i=r[0],o=r[1]+(t||0);return[i*n-o*a,i*a+o*n]}i=e,o=t,n=r;for(var c=e/180*f,u=0,h=0,m=l(r),y="",g=0;g<m.length;g++){var v=m[g],x=v[0],b=u,_=h;if("M"===x||"L"===x)u=+v[1],h=+v[2];else if("m"===x||"l"===x)u+=+v[1],h+=+v[2];else if("H"===x)u=+v[1];else if("h"===x)u+=+v[1];else if("V"===x)h=+v[1];else if("v"===x)h+=+v[1];else if("A"===x){u=+v[1],h=+v[2];var w=s(c,[+v[6],+v[7]]);v[6]=w[0],v[7]=w[1],v[3]=+v[3]+e}"H"!==x&&"V"!==x||(x="L"),"h"!==x&&"v"!==x||(x="l"),"m"!==x&&"l"!==x||(u-=b,h-=_);var k=s(c,[u,h]);"H"!==x&&"V"!==x||(x="L"),"M"!==x&&"L"!==x&&"m"!==x&&"l"!==x||(v[1]=k[0],v[2]=k[1]),v[0]=x,y+=v[0]+v.slice(1).join(",")}return a=y,y}t.exports={circle:{n:0,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?m(t,r,a):a}},square:{n:1,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.3*e,2);return m(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(.4*e,2),a=s(1.2*e,2);return m(t,r,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(.8*e/c,2),a="l"+n+","+n,i="l"+n+",-"+n,o="l-"+n+",-"+n,l="l-"+n+","+n;return m(t,r,"M0,"+n+a+i+o+i+o+l+o+l+a+l+a+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(2*e/u,2);return m(t,r,"M-"+n+","+s(e/2,2)+"H"+n+"L0,-"+s(e,2)+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(2*e/u,2);return m(t,r,"M-"+n+",-"+s(e/2,2)+"H"+n+"L0,"+s(e,2)+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(2*e/u,2);return m(t,r,"M"+s(e/2,2)+",-"+n+"V"+n+"L-"+s(e,2)+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(2*e/u,2);return m(t,r,"M-"+s(e/2,2)+",-"+n+"V"+n+"L"+s(e,2)+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(.6*e,2),a=s(1.2*e,2);return m(t,r,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(.6*e,2),a=s(1.2*e,2);return m(t,r,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(.6*e,2),a=s(1.2*e,2);return m(t,r,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(.6*e,2),a=s(1.2*e,2);return m(t,r,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(.951*e,2),a=s(.588*e,2),i=s(-e,2),o=s(-.309*e,2);return m(t,r,"M"+n+","+o+"L"+a+","+s(.809*e,2)+"H-"+a+"L-"+n+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2),a=s(e/2,2),i=s(e*u/2,2);return m(t,r,"M"+i+",-"+a+"V"+a+"L0,"+n+"L-"+i+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2),a=s(e/2,2),i=s(e*u/2,2);return m(t,r,"M-"+a+","+i+"H"+a+"L"+n+",0L"+a+",-"+i+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(.924*e,2),a=s(.383*e,2);return m(t,r,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,t,r){if(h(t))return"M0,0Z";var n=1.4*e,a=s(.225*n,2),i=s(.951*n,2),o=s(.363*n,2),l=s(.588*n,2),c=s(-n,2),u=s(-.309*n,2),f=s(.118*n,2),d=s(.809*n,2);return m(t,r,"M"+a+","+u+"H"+i+"L"+o+","+f+"L"+l+","+d+"L0,"+s(.382*n,2)+"L-"+l+","+d+"L-"+o+","+f+"L-"+i+","+u+"H-"+a+"L0,"+c+"Z")}},hexagram:{n:18,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(.66*e,2),a=s(.38*e,2),i=s(.76*e,2);return m(t,r,"M-"+i+",0l-"+a+",-"+n+"h"+i+"l"+a+",-"+n+"l"+a+","+n+"h"+i+"l-"+a+","+n+"l"+a+","+n+"h-"+i+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e*u*.8,2),a=s(.8*e,2),i=s(1.6*e,2),o=s(4*e,2),l="A "+o+","+o+" 0 0 1 ";return m(t,r,"M-"+n+","+a+l+n+","+a+l+"0,-"+i+l+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e*u*.8,2),a=s(.8*e,2),i=s(1.6*e,2),o=s(4*e,2),l="A "+o+","+o+" 0 0 1 ";return m(t,r,"M"+n+",-"+a+l+"-"+n+",-"+a+l+"0,"+i+l+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.1*e,2),a=s(2*e,2),i="A "+a+","+a+" 0 0 1 ";return m(t,r,"M-"+n+",-"+n+i+"-"+n+","+n+i+n+","+n+i+n+",-"+n+i+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.4*e,2),a=s(1.9*e,2),i="A "+a+","+a+" 0 0 1 ";return m(t,r,"M-"+n+",0"+i+"0,"+n+i+n+",0"+i+"0,-"+n+i+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(.7*e,2),a=s(1.4*e,2);return m(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.4*e,2),a=s(.7*e,2);return m(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2),a=s(e/c,2);return m(t,r,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.3*e,2);return m(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.3*e,2),a=s(.65*e,2);return m(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.4*e,2);return m(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.2*e,2),a=s(.85*e,2);return m(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e/2,2),a=s(e,2);return m(t,r,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.2*e,2),a=s(1.6*e,2),i=s(.8*e,2);return m(t,r,"M-"+n+","+i+"L0,0M"+n+","+i+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.2*e,2),a=s(1.6*e,2),i=s(.8*e,2);return m(t,r,"M-"+n+",-"+i+"L0,0M"+n+",-"+i+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.2*e,2),a=s(1.6*e,2),i=s(.8*e,2);return m(t,r,"M"+i+","+n+"L0,0M"+i+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.2*e,2),a=s(1.6*e,2),i=s(.8*e,2);return m(t,r,"M-"+i+","+n+"L0,0M-"+i+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.4*e,2);return m(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(1.4*e,2);return m(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M0,0L-"+n+","+s(2*e,2)+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M0,0L-"+n+",-"+s(2*e,2)+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(2*e,2),a=s(e,2);return m(t,r,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(2*e,2),a=s(e,2);return m(t,r,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+s(2*e,2)+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(e,2);return m(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+s(2*e,2)+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(2*e,2),a=s(e,2);return m(t,r,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(h(t))return"M0,0Z";var n=s(2*e,2),a=s(e,2);return m(t,r,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(h(t))return"M0,0Z";var n=f/2.5,a=2*e*d(n),i=2*e*p(n);return m(t,r,"M0,0L"+-a+","+i+"L"+a+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(h(t))return"M0,0Z";var n=f/4,a=2*e*d(n),i=2*e*p(n);return m(t,r,"M0,0L"+-a+","+i+"A "+2*e+","+2*e+" 0 0 1 "+a+","+i+"Z")},backoff:.4,noDot:!0}}},{"@plotly/d3":20,"parse-svg-path":74}],182:[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"}}}},{}],183:[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),f=0;f<e.length;f++){var d=e[f],p=d.i;if(void 0===p)p=f;else if(null===p)continue;var h=d[a];if(n(r.c2l(h))){var m=u(h,p);if(n(m[0])&&n(m[1])){var y=d[a+"s"]=h-m[0],g=d[a+"h"]=h+m[1];c.push(y,g)}}}var v=r._id,x=t._extremes[v],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":299,"../../plots/cartesian/axes":346,"../../registry":387,"./compute_error":184,"fast-isnumeric":33}],184:[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)]}}},{}],185:[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),f=e[c]||{};function d(e,t){return i.coerce(f,u,l,e,t)}if(!1!==d("visible",void 0!==f.array||void 0!==f.value||"sqrt"===f.type)){var p=d("type","array"in f?"data":"percent"),h=!0;"sqrt"!==p&&(h=d("symmetric",!(("data"===p?"arrayminus":"valueminus")in f))),"data"===p?(d("array"),d("traceref"),h||(d("arrayminus"),d("tracerefminus"))):"percent"!==p&&"constant"!==p||(d("value"),h||d("valueminus"));var m="copy_"+s.inherit+"style";if(s.inherit)(t["error_"+s.inherit]||{}).visible&&d(m,!(f.color||n(f.thickness)||n(f.width)));s.inherit&&u[m]||(d("color",r),d("thickness"),d("width",a.traceIs(t,"gl3d")?0:4))}}},{"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387,"./attributes":182,"fast-isnumeric":33}],186:[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":299,"../../plot_api/edit_types":328,"./attributes":182,"./calc":183,"./compute_error":184,"./defaults":185,"./plot":187,"./style":188}],187:[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 f,d=t[0].trace,p=d.error_x||{},h=d.error_y||{};d.ids&&(f=function(e){return e.id});var m=o.hasMarkers(d)&&d.marker.maxdisplayed>0;h.visible||p.visible||(t=[]);var y=n.select(this).selectAll("g.errorbar").data(t,f);if(y.exit().remove(),t.length){p.visible||y.selectAll("path.xerror").remove(),h.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var g=y.enter().append("g").classed("errorbar",!0);u&&g.style("opacity",0).transition().duration(l.duration).style("opacity",1),i.setClipUrl(y,r.layerClipId,e),y.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 f=h.width;i="M"+(r.x-f)+","+r.yh+"h"+2*f+"m-"+f+",0V"+r.ys,r.noYS||(i+="m-"+f+",0h"+2*f),!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 d=t.select("path.xerror");if(p.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var y=(p.copy_ystyle?h:p).width;i="M"+r.xh+","+(r.y-y)+"v"+2*y+"m0,-"+y+"H"+r.xs,r.noXS||(i+="m0,-"+y+"v"+2*y),!d.size()?d=t.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):u&&(d=d.transition().duration(l.duration).ease(l.easing)),d.attr("d",i)}else d.remove()}})}})}},{"../../traces/scatter/subtypes":534,"../drawing":180,"@plotly/d3":20,"fast-isnumeric":33}],188:[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":158,"@plotly/d3":20}],189:[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":293,"../../plots/font_attributes":374,"./layout_attributes":199}],190:[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":299,"../../registry":387}],191:[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":387,"./hover":195}],192:[function(e,t,r){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},{}],193:[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":299,"./attributes":189,"./hoverlabel_defaults":196}],194:[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(),f=new Array(r.length),d=0;d<r.length;d++)f[d]=o(u,r[d]);e[c]=f}}};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":299}],195:[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"),f=e("../../lib/override_cursor"),d=e("../drawing"),p=e("../color"),h=e("../dragelement"),m=e("../../plots/cartesian/axes"),y=e("../../registry"),g=e("./helpers"),v=e("./constants"),x=e("../legend/defaults"),b=e("../legend/draw"),_=v.YANGLE,w=Math.PI*_/180,k=1/Math.sin(w),T=Math.cos(w),M=Math.sin(w),A=v.HOVERARROWSIZE,S=v.HOVERTEXTPAD,L={box:!0,ohlc:!0,violin:!0,candlestick:!0},C={scatter:!0,scattergl:!0,splom:!0};function D(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+v.HOVERID,v.HOVERMINTIME,function(){!function(e,t,r,i,l){r||(r="xy");var s=Array.isArray(r)?r:[r],u=e._fullLayout,d=u._plots||[],m=d[r],v=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),T=!1,M=0;M<b;M++){var A=s[M];if(d[A])T=!0,_[M]=d[A].xaxis,w[M]=d[A].yaxis;else{if(!u[A]||!u[A]._subplot)return void o.warn("Unrecognized subplot: "+A);var S=u[A]._subplot;_[M]=S.xaxis,w[M]=S.yaxis}}var O=t.hovermode||u.hovermode;O&&!T&&(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 E=u.hoverdistance;-1===E&&(E=1/0);var F=u.spikedistance;-1===F&&(F=1/0);var q,U,Y,V,Z,G,W,J,X,K,Q,$,ee,te=[],re=[],ne={hLinePoint:null,vLinePoint:null},ae=!1;if(Array.isArray(t))for(O="array",Y=0;Y<t.length;Y++)(Z=e.calcdata[t[Y].curveNumber||0])&&(G=Z[0].trace,"skip"!==Z[0].trace.hoverinfo&&(re.push(Z),"h"===G.orientation&&(ae=!0)));else{for(V=0;V<e.calcdata.length;V++)Z=e.calcdata[V],"skip"!==(G=Z[0].trace).hoverinfo&&g.isTraceInSubplots(G,s)&&(re.push(Z),"h"===G.orientation&&(ae=!0));var ie,oe,le=!l;if(le)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 se=l.getBoundingClientRect();ie=t.clientX-se.left,oe=t.clientY-se.top,u._calcInverseTransform(e);var ce=o.apply3DTransform(u._invTransform)(ie,oe);if(ie=ce[0],oe=ce[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,q="xval"in t?g.flat(s,t.xval):g.p2c(_,ie),U="yval"in t?g.flat(s,t.yval):g.p2c(w,oe),!a(q[0])||!a(U[0]))return o.warn("Fx.hover failed",t,e),h.unhoverRaw(e,t)}var ue=1/0;function fe(e,r){for(V=0;V<re.length;V++)if((Z=re[V])&&Z[0]&&Z[0].trace&&!0===(G=Z[0].trace).visible&&0!==G._length&&-1===["carpet","contourcarpet"].indexOf(G._module.name)){if("splom"===G.type?W=s[J=0]:(W=g.getSubplot(G),J=s.indexOf(W)),X=O,g.isUnifiedHover(X)&&(X=X.charAt(0)),$={cd:Z,trace:G,xa:_[J],ya:w[J],maxHoverDistance:E,maxSpikeDistance:F,index:!1,distance:Math.min(ue,E),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:p.defaultLine,name:G.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[G.uid]&&($.scene=u._splomScenes[G.uid]),ee=te.length,"array"===X){var n=t[V];"pointNumber"in n?($.index=n.pointNumber,X="closest"):(X="","xval"in n&&(K=n.xval,X="x"),"yval"in n&&(Q=n.yval,X=X?"closest":"y"))}else void 0!==e&&void 0!==r?(K=e,Q=r):(K=q[J],Q=U[J]);if(0!==E)if(G._module&&G._module.hoverPoints){var i=G._module.hoverPoints($,K,Q,X,{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:",G);if("closest"===O&&te.length>ee&&(te.splice(0,ee),ue=te[0].distance),v&&0!==F&&0===te.length){$.distance=F,$.index=!1;var f=G._module.hoverPoints($,K,Q,"closest",{hoverLayer:u._hoverlayer});if(f&&(f=f.filter(function(e){return e.spikeDistance<=F})),f&&f.length){var d,h=f.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)&&(d=pe(m),(!ne.vLinePoint||ne.vLinePoint.spikeDistance>d.spikeDistance)&&(ne.vLinePoint=d))}var y=f.filter(function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap});if(y.length){var x=y[0];a(x.x0)&&a(x.y0)&&(d=pe(x),(!ne.hLinePoint||ne.hLinePoint.spikeDistance>d.spikeDistance)&&(ne.hLinePoint=d))}}}}}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 pe(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}fe();var he={fullLayout:u,container:u._hoverlayer,event:t},me=e._spikepoints,ye={vLinePoint:ne.vLinePoint,hLinePoint:ne.hLinePoint};e._spikepoints=ye;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];y.traceIs(l.trace,"bar-like")||y.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),xe=("x"===ve||"y"===ve)&&te[0]&&C[te[0].trace.type];if(v&&0!==F&&0!==te.length){var be=te.filter(function(e){return e.ya.showspikes}),_e=de(be,F,xe);ne.hLinePoint=pe(_e);var we=te.filter(function(e){return e.xa.showspikes}),ke=de(we,F,xe);ne.vLinePoint=pe(ke)}if(0===te.length){var Te=h.unhoverRaw(e,t);return!v||null===ne.hLinePoint&&null===ne.vLinePoint||N(me)&&I(e,ne,he),Te}v&&N(me)&&I(e,ne,he);if(g.isXYhover(X)&&0!==te[0].length&&"splom"!==te[0].trace.type){var Me=te[0],Ae=(te=L[Me.trace.type]?te.filter(function(e){return e.trace.index===Me.trace.index}):[Me]).length,Se=j("x",Me,u),Le=j("y",Me,u);fe(Se,Le);var Ce,De=[],Oe={},Pe=0,Ee=function(e){var t=L[e.trace.type]?D(e):e.trace.index;if(Oe[t]){var r=Oe[t]-1,n=De[r];r>0&&Math.abs(e.distance)<Math.abs(n.distance)&&(De[r]=e)}else Pe++,Oe[t]=Pe,De.push(e)};for(Ce=0;Ce<Ae;Ce++)Ee(te[Ce]);for(Ce=te.length-1;Ce>Ae-1;Ce--)Ee(te[Ce]);te=De,ge()}var Re=e._hoverdata,ze=[],Ie=B(e),Ne=H(e);for(Y=0;Y<te.length;Y++){var Fe=te[Y],je=g.makeEventData(Fe,Fe.trace,Fe.cd);if(!1!==Fe.hovertemplate){var Be=!1;Fe.cd[Fe.index]&&Fe.cd[Fe.index].ht&&(Be=Fe.cd[Fe.index].ht),Fe.hovertemplate=Be||Fe.trace.hovertemplate||!1}if(Fe.xa&&Fe.ya){var He=Fe.x0+Fe.xa._offset,qe=Fe.x1+Fe.xa._offset,Ue=Fe.y0+Fe.ya._offset,Ye=Fe.y1+Fe.ya._offset,Ve=Math.min(He,qe),Ze=Math.max(He,qe),Ge=Math.min(Ue,Ye),We=Math.max(Ue,Ye);je.bbox={x0:Ve+Ne,x1:Ze+Ne,y0:Ge+Ie,y1:We+Ie}}Fe.eventData=[je],ze.push(je)}e._hoverdata=ze;var Je="y"===O&&(re.length>1||te.length>1)||"closest"===O&&ae&&te.length>1,Xe=p.combine(u.plot_bgcolor||p.background,u.paper_bgcolor),Ke=P(te,{gd:e,hovermode:O,rotateLabels:Je,bgColor:Xe,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});g.isUnifiedHover(O)||(!function(e,t,r){var n,a,i,o,l,s,c,u=0,f=1,d=e.size(),p=new Array(d),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&&(f=-1),p[h++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?k:1)/2,pmin:0,pmax:a?r.width:r.height}]}),p.sort(function(e,t){return e[0].posref-t[0].posref||f*(t[0].traceIndex-e[0].traceIndex)});for(;!n&&u<=d;){for(u++,n=!0,o=0;o<p.length-1;){var y=p[o],g=p[o+1],v=y[y.length-1],x=g[0];if((a=v.pos+v.dp+v.size-x.pos-x.dp+x.size)>.01&&v.pmin===x.pmin&&v.pmax===x.pmax){for(l=g.length-1;l>=0;l--)g[l].dp+=a;for(y.push.apply(y,g),p.splice(o+1,1),c=0,l=y.length-1;l>=0;l--)c+=y[l].dp;for(i=c/y.length,l=y.length-1;l>=0;l--)y[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}}}(Ke,Je?"xa":"ya",u),R(Ke,Je,u._invScaleX,u._invScaleY));if(l&&l.tagName){var Qe=y.getComponentMethod("annotations","hasClickToShow")(e,ze);f(n.select(l),Qe?"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,Re))return;Re&&e.emit("plotly_unhover",{event:t,points:Re});e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:_,yaxes:w,xvals:q,yvals:U})}(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=B(a),o=H(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),f=Math.max(r,n),d=Math.min(l,s),h=Math.max(l,s),m=e.trace;if(y.traceIs(m,"gl3d")){var g=a._fullLayout[m.scene]._scene.container,v=g.offsetLeft,x=g.offsetTop;u+=v,f+=v,d+=x,h+=x}c.bbox={x0:u+o,x1:f+o,y0:d+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,f=t.bgColor,h=t.container,m=t.outerContainer,w=t.commonLabelOpts||{};if(0===e.length)return[[]];var k=t.fontFamily||v.HOVERFONT,T=t.fontSize||v.HOVERFONTSIZE,M=e[0],L=M.xa,C=M.ya,O=i.charAt(0),P=M[O+"Label"],R=q(r,m),z=R.top,I=R.width,N=R.height,F=void 0!==P&&M.distance<=t.hoverdistance&&("x"===i||"y"===i);if(F){var j,B,H=!0;for(j=0;j<e.length;j++)if(H&&void 0===e[j].zLabel&&(H=!1),B=e[j].hoverinfo||e[j].trace.hoverinfo){var U=Array.isArray(B)?B:B.split("+");if(-1===U.indexOf("all")&&-1===U.indexOf(i)){F=!1;break}}H&&(F=!1)}var Y=h.selectAll("g.axistext").data(F?[0]:[]);if(Y.enter().append("g").classed("axistext",!0),Y.exit().remove(),Y.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,f=w.bordercolor||p.contrast(c),h=p.contrast(c),m={family:w.font.family||k,size:w.font.size||T,color:w.font.color||h};t.style({fill:c,stroke:f}),s.text(P).call(d.font,m).call(u.positionText,0,0).call(u.convertToTspans,r),e.attr("transform","");var y,g,v=q(r,s.node());if("x"===i){var x="top"===L.side?"-":"";s.attr("text-anchor","middle").call(u.positionText,0,"top"===L.side?z-v.bottom-A-S:z-v.top+A+S),y=L._offset+(M.x0+M.x1)/2,g=C._offset+("top"===L.side?0:C._length);var b=v.width/2+S;y<b?(y=b,t.attr("d","M-"+(b-A)+",0L-"+(b-2*A)+","+x+A+"H"+(S+v.width/2)+"v"+x+(2*S+v.height)+"H-"+b+"V"+x+A+"Z")):y>a.width-b?(y=a.width-b,t.attr("d","M"+(b-A)+",0L"+b+","+x+A+"v"+x+(2*S+v.height)+"H-"+b+"V"+x+A+"H"+(b-2*A)+"Z")):t.attr("d","M0,0L"+A+","+x+A+"H"+(S+v.width/2)+"v"+x+(2*S+v.height)+"H-"+(S+v.width/2)+"V"+x+A+"H-"+A+"Z")}else{var _,D,O;"right"===C.side?(_="start",D=1,O="",y=L._offset+L._length):(_="end",D=-1,O="-",y=L._offset),g=C._offset+(M.y0+M.y1)/2,s.attr("text-anchor",_),t.attr("d","M0,0L"+O+A+","+A+"V"+(S+v.height/2)+"h"+O+(2*S+v.width)+"V-"+(S+v.height/2)+"H"+O+A+"V-"+A+"Z");var E,R=v.height/2,I=z-v.top-R,N="clip"+a._uid+"commonlabel"+C._id;if(y<v.width+2*S+A){E="M-"+(A+S)+"-"+R+"h-"+(v.width-S)+"V"+R+"h"+(v.width-S)+"Z";var F=v.width-y+S;u.positionText(s,F,I),"end"===_&&s.selectAll("tspan").each(function(){var e=n.select(this),t=d.tester.append("text").text(e.text()).call(d.font,m),a=q(r,t.node());Math.round(a.width)<Math.round(v.width)&&e.attr("x",F-a.width),t.remove()})}else u.positionText(s,D*(S+A),I),E=null;var j=a._topclips.selectAll("#"+N).data(E?[0]:[]);j.enter().append("clipPath").attr("id",N).append("path"),j.exit().remove(),j.select("path").attr("d",E),d.setClipUrl(s,E?N:null,r)}e.attr("transform",l(y,g))}),g.isUnifiedHover(i)){h.selectAll("g.hovertext").remove();var V=e.filter(function(e){return"none"!==e.hoverinfo});if(0===V.length)return;var Z=a.hoverlabel,G=Z.font,W={showlegend:!0,legend:{title:{text:P,font:G},font:G,bgcolor:Z.bgcolor,bordercolor:Z.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},J={font:G};x(W,J,r._fullData);var X=J.legend;X.entries=[];for(var K=0;K<V.length;K++){var Q=V[K];if("none"!==Q.hoverinfo){var $=E(Q,!0,i,a,P),ee=$[0],te=$[1];Q.name=te,Q.text=""!==te?te+" : "+ee:ee;var re=Q.cd[Q.index];re&&(re.mc&&(Q.mc=re.mc),re.mcc&&(Q.mc=re.mcc),re.mlc&&(Q.mlc=re.mlc),re.mlcc&&(Q.mlc=re.mlcc),re.mlw&&(Q.mlw=re.mlw),re.mrc&&(Q.mrc=re.mrc),re.dir&&(Q.dir=re.dir)),Q._distinct=!0,X.entries.push([Q])}}X.entries.sort(function(e,t){return e[0].trace.index-t[0].trace.index}),X.layer=h,X._inHover=!0,X._groupTitleFont=Z.grouptitlefont,b(r,X);var ne,ae,ie,oe,le=h.select("g.legend"),se=q(r,le.node()),ce=se.width+2*S,ue=se.height+2*S,fe=V[0],de=(fe.x0+fe.x1)/2,pe=(fe.y0+fe.y1)/2,he=!(y.traceIs(fe.trace,"bar-like")||y.traceIs(fe.trace,"box-violin"));"y"===O?he?(ae=pe-S,ne=pe+S):(ae=Math.min.apply(null,V.map(function(e){return Math.min(e.y0,e.y1)})),ne=Math.max.apply(null,V.map(function(e){return Math.max(e.y0,e.y1)}))):ae=ne=o.mean(V.map(function(e){return(e.y0+e.y1)/2}))-ue/2,"x"===O?he?(ie=de+S,oe=de-S):(ie=Math.max.apply(null,V.map(function(e){return Math.max(e.x0,e.x1)})),oe=Math.min.apply(null,V.map(function(e){return Math.min(e.x0,e.x1)}))):ie=oe=o.mean(V.map(function(e){return(e.x0+e.x1)/2}))-ce/2;var me,ye,ge=L._offset,ve=C._offset;return oe+=ge-ce,ae+=ve-ue,me=(ie+=ge)+ce<I&&ie>=0?ie:oe+ce<I&&oe>=0?oe:ge+ce<I?ge:ie-de<de-oe+ce?I-ce:0,me+=S,ye=(ne+=ve)+ue<N&&ne>=0?ne:ae+ue<N&&ae>=0?ae:ve+ue<N?ve:ne-pe<pe-ae+ue?N-ue:0,ye+=S,le.attr("transform",l(me-1,ye-1)),le}var xe=h.selectAll("g.hovertext").data(e,function(e){return D(e)});return xe.enter().append("g").classed("hovertext",!0).each(function(){var e=n.select(this);e.append("rect").call(p.fill,p.addOpacity(f,.8)),e.append("text").classed("name",!0),e.append("path").style("stroke-width","1px"),e.append("text").classed("nums",!0).call(d.font,k,T)}),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,f),y=p.combine(p.opacity(o)?o:p.defaultLine,f),g=e.borderColor||p.contrast(m),v=E(e,F,i,a,P,t),x=v[0],b=v[1],w=t.select("text.nums").call(d.font,e.fontFamily||k,e.fontSize||T,e.fontColor||g).text(x).attr("data-notex",1).call(u.positionText,0,0).call(u.convertToTspans,r),M=t.select("text.name"),L=0,C=0;if(b&&b!==x){M.call(d.font,e.fontFamily||k,e.fontSize||T,y).text(b).attr("data-notex",1).call(u.positionText,0,0).call(u.convertToTspans,r);var D=q(r,M.node());L=D.width+2*S,C=D.height+2*S}else M.remove(),t.select("rect").remove();t.select("path").style({fill:m,stroke:g});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),B=Math.abs(e.y1-e.y0),H=q(r,w.node()),U=H.width/a._invScaleX,Y=H.height/a._invScaleY;e.ty0=(z-H.top)/a._invScaleY,e.bx=U+2*S,e.by=Math.max(Y+2*S,C),e.anchor="start",e.txwidth=U,e.tx2width=L,e.offset=0;var V,Z,G=(U+A+S+L)*a._invScaleX;if(c)e.pos=O,V=R+B/2+G<=N,Z=R-B/2-G>=0,"top"!==e.idealAlign&&V||!Z?V?(R+=B/2,e.anchor="start"):e.anchor="middle":(R-=B/2,e.anchor="end");else if(e.pos=R,V=O+j/2+G<=I,Z=O-j/2-G>=0,"left"!==e.idealAlign&&V||!Z)if(V)O+=j/2,e.anchor="start";else{e.anchor="middle";var W=G/2,J=O+W-I,X=O-W;J>0&&(O-=J),X<0&&(O+=-X)}else O-=j/2,e.anchor="end";w.attr("text-anchor",e.anchor),L&&M.attr("text-anchor",e.anchor),t.attr("transform",l(O,R)+(c?s(_):""))}),xe}function E(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=F(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 f=e.hovertemplate||!1;if(f){var d=e.hovertemplateLabels||e;e[c+"Label"]!==a&&(d[c+"other"]=d[c+"Val"],d[c+"otherLabel"]=d[c+"Label"]),s=(s=o.hovertemplateString(f,d,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(O,function(t,r){return l=F(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],f=c*(A+S),p=f+c*(e.txwidth+S),h=0,m=e.offset,y="middle"===l;y&&(f-=e.tx2width/2,p+=e.txwidth/2+S),t&&(m*=-M,h=e.offset*T),r.select("path").attr("d",y?"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 g=h+f,v=m+e.ty0-e.by/2+S,x=e.textAlign||"auto";"auto"!==x&&("left"===x&&"start"!==l?(a.attr("text-anchor","start"),g=y?-e.bx/2-e.tx2width/2+S:-e.bx-S):"right"===x&&"end"!==l&&(a.attr("text-anchor","end"),g=y?e.bx/2-e.tx2width/2-S:e.bx+S)),a.call(u.positionText,i(g),o(v)),e.tx2width&&(r.select("text.name").call(u.positionText,i(p+c*S+h),o(m+e.ty0-e.by/2+S)),r.select("rect").call(d.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 f=m.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+f+" / -"+m.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+f,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var d=m.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+d+" / -"+m.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+d,"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 I(e,t,r){var n,a,o=r.container,l=r.fullLayout,s=l._size,c=r.event,u=!!t.hLinePoint,f=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),f||u){var h=p.combine(l.plot_bgcolor,l.paper_bgcolor);if(u){var y,g,v=t.hLinePoint;n=v&&v.xa,"cursor"===(a=v&&v.ya).spikesnap?(y=c.pointerX,g=c.pointerY):(y=n._offset+v.x,g=a._offset+v.y);var x,b,_=i.readability(v.color,h)<1.5?p.contrast(h):v.color,w=a.spikemode,k=a.spikethickness,T=a.spikecolor||_,M=m.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=M,b=y),-1!==w.indexOf("across")){var A=a._counterDomainMin,S=a._counterDomainMax;"free"===a.anchor&&(A=Math.min(A,a.position),S=Math.max(S,a.position)),x=s.l+A*s.w,b=s.l+S*s.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":k,stroke:T,"stroke-dasharray":d.dashStyle(a.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":k+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:M+("right"!==a.side?k:-k),cy:g,r:k,fill:T}).classed("spikeline",!0)}if(f){var L,C,D=t.vLinePoint;n=D&&D.xa,a=D&&D.ya,"cursor"===n.spikesnap?(L=c.pointerX,C=c.pointerY):(L=n._offset+D.x,C=a._offset+D.y);var O,P,E=i.readability(D.color,h)<1.5?p.contrast(h):D.color,R=n.spikemode,z=n.spikethickness,I=n.spikecolor||E,N=m.getPxPosition(e,n);if(-1!==R.indexOf("toaxis")||-1!==R.indexOf("across")){if(-1!==R.indexOf("toaxis")&&(O=N,P=C),-1!==R.indexOf("across")){var F=n._counterDomainMin,j=n._counterDomainMax;"free"===n.anchor&&(F=Math.min(F,n.position),j=Math.max(j,n.position)),O=s.t+(1-j)*s.h,P=s.t+(1-F)*s.h}o.insert("line",":first-child").attr({x1:L,x2:L,y1:O,y2:P,"stroke-width":z,stroke:I,"stroke-dasharray":d.dashStyle(n.spikedash,z)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:L,x2:L,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:L,cy:N-("top"!==n.side?z:-z),r:z,fill:I}).classed("spikeline",!0)}}}function N(e,t){return!t||(t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint)}function F(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 B(e){return e.offsetTop+e.clientTop}function H(e){return e.offsetLeft+e.clientLeft}function q(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),f=c[0],d=c[1],p=u[0],h=u[1];return{x:f,y:d,width:p-f,height:h-d,top:Math.min(d,h),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(d,h)}}},{"../../lib":299,"../../lib/events":292,"../../lib/override_cursor":310,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"../legend/defaults":210,"../legend/draw":211,"./constants":192,"./helpers":194,"@plotly/d3":20,"fast-isnumeric":33,tinycolor2:122}],196:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../color"),i=e("./helpers").isUnifiedHover;t.exports=function(e,t,r,o){o=o||{};var l=t.legend;function s(e){o.font[e]||(o.font[e]=l?t.legend.font[e]:t.font[e])}t&&i(t.hovermode)&&(o.font||(o.font={}),s("size"),s("family"),s("color"),l?(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":299,"../color":158,"./helpers":194}],197:[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":299,"./layout_attributes":199}],198:[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":299,"../dragelement":177,"./attributes":189,"./calc":190,"./click":191,"./constants":192,"./defaults":193,"./helpers":194,"./hover":195,"./layout_attributes":199,"./layout_defaults":200,"./layout_global_defaults":201,"@plotly/d3":20}],199:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../plots/font_attributes"),i=a({editType:"none"});i.family.dflt=n.HOVERFONT,i.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:i,grouptitlefont:a({editType:"none"}),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":374,"./constants":192}],200:[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),n.coerceFont(r,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},{"../../lib":299,"./hoverlabel_defaults":196,"./hovermode_defaults":197,"./layout_attributes":199}],201:[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":299,"./hoverlabel_defaults":196,"./layout_attributes":199}],202:[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),f=u*(1-o),d=0;d<a;d++){var p=c+u*d;s[i?a-1-d:d]=[p,p+f]}return s}function f(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,f,d=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;d?(o=r.subplots.length,f=r.subplots[0].length):(h&&(o=i.length),p&&(f=a.length));var y=l.newContainer(t,"grid"),g=T("rows",o),v=T("columns",f);if(g*v>1){d||p||h||"independent"===T("pattern")&&(d=!0),y._hasSubplotGrid=d;var x,b,_="top to bottom"===T("roworder"),w=d?.2:.1,k=d?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),y._domains={x:u("x",T,w,x,v),y:u("y",T,k,b,g,_)}}else delete t.grid}function T(e,t){return n.coerce(r,y,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,a,i,o,l,s,u,d=e.grid||{},p=t._subplots,h=r._hasSubplotGrid,m=r.rows,y=r.columns,g="independent"===r.pattern,v=r._axisMap={};if(h){var x=d.subplots||[];s=r.subplots=new Array(m);var b=1;for(n=0;n<m;n++){var _=s[n]=new Array(y),w=x[n]||[];for(a=0;a<y;a++)if(g?(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!==v[i]&&v[i]!==a||void 0!==v[o]&&v[o]!==n)continue;_[a]=l,v[i]=a,v[o]=n}}}else{var k=c(t,d,"x"),T=c(t,d,"y");r.xaxes=f(k,p.xaxis,y,v,"x"),r.yaxes=f(T,p.yaxis,m,v,"y")}var M=r._anchors={},A="top to bottom"===r.roworder;for(var S in v){var L,C,D,O=S.charAt(0),P=r[O+"side"];if(P.length<8)M[S]="free";else if("x"===O){if("t"===P.charAt(0)===A?(L=0,C=1,D=m):(L=m-1,C=-1,D=-1),h){var E=v[S];for(n=L;n!==D;n+=C)if((l=s[n][E])&&(u=l.indexOf("y"),l.slice(0,u)===S)){M[S]=l.slice(u);break}}else for(n=L;n!==D;n+=C)if(o=r.yaxes[n],-1!==p.cartesian.indexOf(S+o)){M[S]=o;break}}else if("l"===P.charAt(0)?(L=0,C=1,D=y):(L=y-1,C=-1,D=-1),h){var R=v[S];for(n=L;n!==D;n+=C)if((l=s[R][n])&&(u=l.indexOf("y"),l.slice(u)===S)){M[S]=l.slice(0,u);break}}else for(n=L;n!==D;n+=C)if(i=r.xaxes[n],-1!==p.cartesian.indexOf(i+S)){M[S]=i;break}}}}}},{"../../lib":299,"../../lib/regex":315,"../../plot_api/plot_template":335,"../../plots/cartesian/constants":353,"../../plots/domain":373}],203:[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":275,"../../plot_api/plot_template":335,"../../plots/cartesian/constants":353}],204:[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,f=t._id.charAt(0),d=0;d<u.length;d++)if(c="images["+d+"].",(s=u[d])[f+"ref"]===t._id){var p=s[f],h=s["size"+f],m=null,y=null;if(o){m=a(p,t.range);var g=h/Math.pow(10,m)/2;y=2*Math.log(g+Math.sqrt(1+g*g))/Math.LN10}else y=(m=Math.pow(10,p))*(Math.pow(10,h/2)-Math.pow(10,-h/2));n(m)?n(y)||(y=null):(m=null,y=null),i(c+f,m),i(c+"size"+f,y)}}},{"../../lib/to_log_range":324,"fast-isnumeric":33}],205:[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 f=c[u],d=a.coerceRef(e,t,s,f,"paper",void 0);if("paper"!==d)a.getFromId(s,d)._imgIndices.push(t._index);a.coercePosition(t,s,i,d,f,0)}return t}t.exports=function(e,t){i(e,t,{name:"images",handleItemDefaults:l})}},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"./attributes":203}],206:[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={},f=[];for(r=0;r<s.images.length;r++){var d=s.images[r];if(d.visible)if("below"===d.layer&&"paper"!==d.xref&&"paper"!==d.yref){t=o.ref2id(d.xref)+o.ref2id(d.yref);var p=s._plots[t];if(!p){f.push(d);continue}p.mainplot&&(t=p.mainplot.id),u[t]||(u[t]=[]),u[t].push(d)}else"above"===d.layer?c.push(d):f.push(d)}var h={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}}};function m(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",{willReadFrequently:!0}).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 y(t){var r,o,l=n.select(this),c=i.getFromId(e,t.xref),u=i.getFromId(e,t.yref),f="domain"===i.getRefType(t.xref),d="domain"===i.getRefType(t.yref),p=s._size;r=void 0!==c?"string"==typeof t.xref&&f?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&&d?u._length*t.sizey:Math.abs(u.l2p(t.sizey)-u.l2p(0)):t.sizey*p.h;var m,y,g=r*h.x[t.xanchor].offset,v=o*h.y[t.yanchor].offset,x=h.x[t.xanchor].sizing+h.y[t.yanchor].sizing;switch(m=void 0!==c?"string"==typeof t.xref&&f?c._length*t.x+c._offset:c.r2p(t.x)+c._offset:t.x*p.w+p.l,m+=g,y=void 0!==u?"string"==typeof t.yref&&d?u._length*(1-t.y)+u._offset:u.r2p(t.y)+u._offset:p.h-t.y*p.h+p.t,y+=v,t.sizing){case"fill":x+=" slice";break;case"stretch":x="none"}l.attr({x:m,y:y,width:r,height:o,preserveAspectRatio:x,opacity:t.opacity});var b=(c&&"domain"!==i.getRefType(t.xref)?c._id:"")+(u&&"domain"!==i.getRefType(t.yref)?u._id:"");a.setClipUrl(l,b?"clip"+s._uid+b:null,e)}var g=s._imageLowerLayer.selectAll("image").data(f),v=s._imageUpperLayer.selectAll("image").data(c);g.enter().append("image"),v.enter().append("image"),g.exit().remove(),v.exit().remove(),g.each(function(e){m.bind(this)(e),y.bind(this)(e)}),v.each(function(e){m.bind(this)(e),y.bind(this)(e)});var x=Object.keys(s._plots);for(r=0;r<x.length;r++){t=x[r];var b=s._plots[t];if(b.imagelayer){var _=b.imagelayer.selectAll("image").data(u[t]||[]);_.enter().append("image"),_.exit().remove(),_.each(function(e){m.bind(this)(e),y.bind(this)(e)})}}}},{"../../constants/xmlns_namespaces":280,"../../plots/cartesian/axes":346,"../../plots/cartesian/axis_ids":350,"../drawing":180,"@plotly/d3":20}],207:[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":357,"./attributes":203,"./convert_coords":204,"./defaults":205,"./draw":206}],208:[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"}),grouptitlefont: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"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",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":374,"../color/attributes":157}],209:[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}},{}],210:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../plot_api/plot_template"),o=e("../../plots/attributes"),l=e("./attributes"),s=e("../../plots/layout_attributes"),c=e("./helpers");t.exports=function(e,t,r){var u,f=e.legend||{},d=i.newContainer(t,"legend");function p(e,t){return a.coerce(f,d,l,e,t)}for(var h=function(e,t){var r=u._input,n=u;return a.coerce(r,n,o,e,t)},m=t.font||{},y=a.coerceFont(p,"grouptitlefont",a.extendFlat({},m,{size:Math.round(1.1*m.size)})),g=0,v=!1,x="normal",b=0;b<r.length;b++)(u=r[b]).visible&&((u.showlegend||u._dfltShowLegend&&!(u._module&&u._module.attributes&&u._module.attributes.showlegend&&!1===u._module.attributes.showlegend.dflt))&&(g++,u.showlegend&&(v=!0,(n.traceIs(u,"pie-like")||!0===u._input.showlegend)&&g++),a.coerceFont(h,"legendgrouptitle.font",y)),(n.traceIs(u,"bar")&&"stack"===t.barmode||-1!==["tonextx","tonexty"].indexOf(u.fill))&&(x=c.isGrouped({traceorder:x})?"grouped+reversed":"reversed"),void 0!==u.legendgroup&&""!==u.legendgroup&&(x=c.isReversed({traceorder:x})?"reversed+grouped":"grouped"));var _=a.coerce(e,t,s,"showlegend",v&&g>1);if(!1===_&&(t.legend=void 0),(!1!==_||f.uirevision)&&(p("uirevision",t.uirevision),!1!==_)){p("bgcolor",t.paper_bgcolor),p("bordercolor"),p("borderwidth");var w,k,T,M=a.coerceFont(p,"font",t.font),A="h"===p("orientation");if(A?(w=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(k=1.1,T="bottom"):(k=-.1,T="top")):(w=1.02,k=1,T="auto"),p("traceorder",x),c.isGrouped(t.legend)&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("x",w),p("xanchor"),p("y",k),p("yanchor",T),p("valign"),a.noneOrAll(f,d,["x","y"]),p("title.text")){p("title.side",A?"left":"top");var S=a.extendFlat({},M,{size:a.bigFont(M.size)});a.coerceFont(p,"title.font",S)}}}},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/attributes":342,"../../plots/layout_attributes":378,"../../registry":387,"./attributes":208,"./helpers":214}],211:[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"),f=e("../../lib/svg_text_utils"),d=e("./handle_click"),p=e("./constants"),h=e("../../constants/alignment"),m=h.LINE_SPACING,y=h.FROM_TL,g=h.FROM_BR,v=e("./get_legend_data"),x=e("./style"),b=e("./helpers"),_=1;function w(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===i?t._maxWidth*o:r+(o||a)}function k(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&&d(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)&&d(r,e,n)}}function T(e,t,r){var n,i,l=e.data()[0][0],s=l.trace,u=o.traceIs(s,"pie-like"),d=!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(d?M(n,h):n);var y=r.itemwidth+2*p.itemGap;f.positionText(m,y,0),d?m.call(f.makeEditable,{gd:t,text:n}).call(S,e,t,r).on("edit",function(n){this.text(M(n,h)).call(S,e,t,r);var i=l.trace._fullInput||{},c={};if(o.hasTransform(i,"groupby")){var u=o.getTransformIndices(i,"groupby"),f=u[u.length-1],d=a.keyedContainer(i,"transforms["+f+"].styles","target","value.name");d.set(l.trace._group,n),c=d.constructUpdate()}else c.name=n;return o.call("_guiRestyle",t,c,s.index)}):S(m,e,t,r)}function M(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 A(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)),k(t,r,e,o,n.event)}}))}function S(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),f.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=n===_?r.title.font:a.groupTitle?a.groupTitle.font:r.font;var u,d,h=l.size*m;if(o){var y=c.bBox(o);u=y.height,d=y.width,n===_?c.setTranslate(i,s,s+.75*u):c.setTranslate(i,0,.25*u)}else{var g=e.select(n===_?".legendtitletext":".legendtext"),v=f.lineCount(g),x=g.node();if(u=h*v,d=x?c.bBox(x).width:0,n===_)"left"===r.title.side&&(d+=2*p.itemGap),f.positionText(g,s+p.titlePad,s+h);else{var b=2*p.itemGap+r.itemwidth;a.groupTitle&&(b=p.itemGap,d-=r.itemwidth),f.positionText(g,b,-h*((v-1)/2-.3))}}n===_?(r._titleWidth=d,r._titleHeight=u):(a.lineHeight=h,a.height=Math.max(u,16)+3,a.width=d)}(t,r,n,a)})}function L(e){return a.isRightAnchor(e)?"right":a.isCenterAnchor(e)?"center":"left"}function C(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,f=e._fullLayout,d="legend"+f._uid,h=t._inHover;h?(r=t.layer,d+="-hover"):r=f._infolayer;if(!r)return;e._legendMouseDownTime||(e._legendMouseDownTime=0);if(h){if(!t.entries)return;l=v(t.entries,t)}else{if(!e.calcdata)return;l=f.showlegend&&v(e.calcdata,t)}var m=f.hiddenlabels||[];if(!(h||f.showlegend&&l.length))return r.selectAll(".legend").remove(),f._topdefs.select("#"+d).remove(),i.autoMargin(e,"legend");var M=a.ensureSingle(r,"g","legend",function(e){h||e.attr("pointer-events","all")}),D=a.ensureSingleById(f._topdefs,"clipPath",d,function(e){e.append("rect")}),O=a.ensureSingle(M,"rect","bg",function(e){e.attr("shape-rendering","crispEdges")});O.call(u.stroke,t.bordercolor).call(u.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var P=a.ensureSingle(M,"g","scrollbox"),E=t.title;if(t._titleWidth=0,t._titleHeight=0,E.text){var R=a.ensureSingle(P,"text","legendtitletext");R.attr("text-anchor","start").call(c.font,E.font).text(E.text),S(R,P,e,t,_)}else P.selectAll(".legendtitletext").remove();var z=a.ensureSingle(M,"rect","scrollbar",function(e){e.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)}),I=P.selectAll("g.groups").data(l);I.enter().append("g").attr("class","groups"),I.exit().remove();var N=I.selectAll("g.traces").data(a.identity);N.enter().append("g").attr("class","traces"),N.exit().remove(),N.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(T,e,t)}).call(x,e,t).each(function(){h||n.select(this).call(A,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="fraction"===a.entrywidthmode,f=a.borderwidth,d=2*f,h=p.itemGap,m=a.itemwidth+2*h,y=2*(f+h),g=C(a),v=a.y<0||0===a.y&&"top"===g,x=a.y>1||1===a.y&&"bottom"===g,_=a.tracegroupgap,k={};a._maxHeight=Math.max(v||x?i.height/2:o.h,30);var T=0;a._width=0,a._height=0;var M=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,f+M[0],f+M[1]+a._height+t/2+h),a._height+=t,a._width=Math.max(a._width,e[0].width)}),T=m+a._width,a._width+=h+m+d,a._height+=y,s&&(t.each(function(e,t){c.setTranslate(this,0,t*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var A=L(a),S=a.x<0||0===a.x&&"right"===A,D=a.x>1||1===a.x&&"left"===A,O=x||v,P=i.width/2;a._maxWidth=Math.max(S?O&&"left"===A?o.l+o.w:P:D?O&&"right"===A?o.r+o.w:P:o.w,2*m);var E=0,R=0;r.each(function(e){var t=w(e,a,m);E=Math.max(E,t),R+=t}),T=null;var z=0;if(s){var I=0,N=0,F=0;t.each(function(){var e=0,t=0;n.select(this).selectAll("g.traces").each(function(r){var n=w(r,a,m),i=r[0].height;c.setTranslate(this,M[0],M[1]+f+h+i/2+t),t+=i,e=Math.max(e,n),k[r[0].trace.legendgroup]=e});var r=e+h;N>0&&r+f+N>a._maxWidth?(z=Math.max(z,N),N=0,F+=I+_,I=t):I=Math.max(I,t),c.setTranslate(this,N,F),N+=r}),a._width=Math.max(z,N)+f,a._height=F+I+y}else{var j=r.size(),B=R+d+(j-1)*h<a._maxWidth,H=0,q=0,U=0,Y=0;r.each(function(e){var t=e[0].height,r=w(e,a,m),n=B?r:E;u||(n+=h),n+f+q-h>=a._maxWidth&&(z=Math.max(z,Y),q=0,U+=H,a._height+=H,H=0),c.setTranslate(this,M[0]+f+q,M[1]+f+U+t/2+h),Y=q+r+h,q+=n,H=Math.max(H,t)}),B?(a._width=q+d,a._height=H+y):(a._width=Math.max(z,Y)+d,a._height+=H+y)}}a._width=Math.ceil(Math.max(a._width+M[0],a._titleWidth+2*(f+p.titlePad))),a._height=Math.ceil(Math.max(a._height+M[1],a._titleHeight+2*(f+p.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var V=e._context.edits,Z=V.legendText||V.legendPosition;r.each(function(e){var t=n.select(this).select(".legendtoggle"),r=e[0].height,i=e[0].trace.legendgroup,o=w(e,a,m);s&&""!==i&&(o=k[i]);var f=Z?m:T||o;l||u||(f+=h/2),c.setRect(t,0,-r/2,f,r)})}(e,I,N,t)},function(){var l,u,m,v,x=f._size,b=t.borderwidth;if(!h){var _=function(e){var t=e._fullLayout.legend,r=L(t),n=C(t);return i.autoMargin(e,"legend",{x:t.x,y:t.y,l:t._width*y[r],r:t._width*g[r],b:t._effHeight*g[n],t:t._effHeight*y[n]})}(e);if(_)return;var w=x.l+x.w*t.x-y[L(t)]*t._width,T=x.t+x.h*(1-t.y)-y[C(t)]*t._effHeight;if(f.margin.autoexpand){var A=w,S=T;w=a.constrain(w,0,f.width-t._width),T=a.constrain(T,0,f.height-t._effHeight),w!==A&&a.log("Constrain legend.x to make legend fit inside graph"),T!==S&&a.log("Constrain legend.y to make legend fit inside graph")}c.setTranslate(M,w,T)}if(z.on(".drag",null),M.on("wheel",null),h||t._height<=t._maxHeight||e._context.staticPlot){var E=t._effHeight;h&&(E=t._height),O.attr({width:t._width-b,height:E-b,x:b/2,y:b/2}),c.setTranslate(P,0,0),D.select("rect").attr({width:t._width-2*b,height:E-2*b,x:b,y:b}),c.setClipUrl(P,d,e),c.setRect(z,0,0,0,0),delete t._scrollY}else{var R,I,N,F=Math.max(p.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),j=t._effHeight-F-2*p.scrollBarMargin,B=t._height-t._effHeight,H=j/B,q=Math.min(t._scrollY||0,B);O.attr({width:t._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:t._effHeight-b,x:b/2,y:b/2}),D.select("rect").attr({width:t._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:t._effHeight-2*b,x:b,y:b+q}),c.setClipUrl(P,d,e),V(q,F,H),M.on("wheel",function(){V(q=a.constrain(t._scrollY+n.event.deltaY/j*B,0,B),F,H),0!==q&&q!==B&&n.event.preventDefault()});var U=n.behavior.drag().on("dragstart",function(){var e=n.event.sourceEvent;R="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,N=q}).on("drag",function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(I="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,V(q=function(e,t,r){var n=(r-t)/H+e;return a.constrain(n,0,B)}(N,R,I),F,H))});z.call(U);var Y=n.behavior.drag().on("dragstart",function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(R=e.changedTouches[0].clientY,N=q)}).on("drag",function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(I=e.changedTouches[0].clientY,V(q=function(e,t,r){var n=(t-r)/H+e;return a.constrain(n,0,B)}(N,R,I),F,H))});P.call(Y)}function V(r,n,a){t._scrollY=e._fullLayout.legend._scrollY=r,c.setTranslate(P,0,-r),c.setRect(z,t._width,p.scrollBarMargin+r*a,p.scrollBarWidth,n),D.select("rect").attr("y",b+r)}e._context.edits.legendPosition&&(M.classed("cursor-move",!0),s.init({element:M.node(),gd:e,prepFn:function(){var e=c.getTranslate(M);m=e.x,v=e.y},moveFn:function(e,r){var n=m+e,a=v+r;c.setTranslate(M,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&&k(e,M,a,t,n)}}))}],e)}(e,t)}},{"../../constants/alignment":274,"../../lib":299,"../../lib/events":292,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"./constants":209,"./get_legend_data":212,"./handle_click":213,"./helpers":214,"./style":216,"@plotly/d3":20}],212:[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=[],f=!1,d={},p=0,h=0;function m(e,r){if(""!==e&&a.isGrouped(t))-1===u.indexOf(e)?(u.push(e),f=!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 y=e[r],g=y[0],v=g.trace,x=v.legendgroup;if(o||v.visible&&v.showlegend)if(n.traceIs(v,"pie-like"))for(d[x]||(d[x]={}),i=0;i<y.length;i++){var b=y[i].label;d[x][b]||(m(x,{label:b,color:y[i].color,i:y[i].i,trace:v,pts:y[i].pts}),d[x][b]=!0,h=Math.max(h,(b||"").length))}else m(x,g),h=Math.max(h,(v.name||"").length)}if(!u.length)return[];var _=!f||!l,w=[];for(r=0;r<u.length;r++){var k=c[u[r]];_?w.push(k[0]):w.push(k)}for(_&&(w=[w]),r=0;r<w.length;r++){var T=1/0;for(i=0;i<w[r].length;i++){var M=w[r][i].trace.legendrank;T>M&&(T=M)}w[r][0]._groupMinRank=T,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 S=w[r][0].trace,L=null;for(i=0;i<w[r].length;i++){var C=w[r][i].trace.legendgrouptitle;if(C&&C.text){L=C,o&&(C.font=t._groupTitleFont);break}}if(s&&w[r].reverse(),L){var D=!1;for(i=0;i<w[r].length;i++)if(n.traceIs(w[r][i].trace,"pie-like")){D=!0;break}w[r].unshift({i:-1,groupTitle:L,noClick:D,trace:{showlegend:S.showlegend,legendgroup:S.legendgroup,visible:"toggleitem"===t.groupclick||S.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":387,"./helpers":214}],213:[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 f="togglegroup"===u,d=o.hiddenlabels?o.hiddenlabels.slice():[],p=e.data()[0][0];if(!p.groupTitle||!p.noClick){var h,m,y,g,v,x=t._fullData,b=p.trace,_=b.legendgroup,w={},k=[],T=[],M=[];if(a.traceIs(b,"pie-like")){var A=p.label,S=d.indexOf(A);"toggle"===l?-1===S?d.push(A):d.splice(S,1):"toggleothers"===l&&(d=[],t.calcdata[0].forEach(function(e){A!==e.label&&d.push(e.label)}),t._fullLayout.hiddenlabels&&t._fullLayout.hiddenlabels.length===d.length&&-1===S&&(d=[])),a.call("_guiRelayout",t,"hiddenlabels",d)}else{var L,C=_&&_.length,D=[];if(C)for(h=0;h<x.length;h++)(L=x[h]).visible&&L.legendgroup===_&&D.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(C)if(f)for(h=0;h<x.length;h++)!1!==x[h].visible&&x[h].legendgroup===_&&B(x[h],O);else B(b,O);else B(b,O)}else if("toggleothers"===l){var P,E,R,z,I=!0;for(h=0;h<x.length;h++)if(P=x[h]===b,R=!0!==x[h].showlegend,!(P||R||(E=C&&x[h].legendgroup===_)||!0!==x[h].visible||a.traceIs(x[h],"notLegendIsolatable"))){I=!1;break}for(h=0;h<x.length;h++)if(!1!==x[h].visible&&!a.traceIs(x[h],"notLegendIsolatable"))switch(b.visible){case"legendonly":B(x[h],!0);break;case!0:z=!!I||"legendonly",P=x[h]===b,R=!0!==x[h].showlegend&&!x[h].legendgroup,E=P||C&&x[h].legendgroup===_,B(x[h],!(!E&&!R)||z)}}for(h=0;h<T.length;h++)if(y=T[h]){var N=y.constructUpdate(),F=Object.keys(N);for(m=0;m<F.length;m++)g=F[m],(w[g]=w[g]||[])[M[h]]=N[g]}for(v=Object.keys(w),h=0;h<v.length;h++)for(g=v[h],m=0;m<k.length;m++)w[g].hasOwnProperty(m)||(w[g][m]=void 0);a.call("_guiRestyle",t,w,k)}}}}function j(e,t,r){var n=k.indexOf(e),a=w[t];return a||(a=w[t]=[]),-1===k.indexOf(e)&&(k.push(e),n=k.length-1),a[n]=r,n}function B(e,t){if(!p.groupTitle||f){var r=e._fullInput;if(a.hasTransform(r,"groupby")){var i=T[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"),T[r.index]=i}var s=i.get(e._group);void 0===s&&(s=!0),!1!==s&&i.set(e._group,t),M[r.index]=j(r.index,"visible",!1!==r.visible)}else{var c=!1!==r.visible&&t;j(r.index,"visible",c)}}}}},{"../../lib":299,"../../registry":387}],214:[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")}},{}],215:[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":208,"./defaults":210,"./draw":211,"./style":216}],216:[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"),f=e("../../traces/pie/style_one"),d=e("../../traces/pie/helpers").castOption,p=e("./constants"),h=12,m=5,y=2,g=10,v=5;function x(e,t){return(t?"radial":"horizontal")+(e?"":"reversed")}function b(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 _(e,t,r){return e&&i.isArrayOrTypedArray(e)?t:e>r?r:e}t.exports=function(e,t,r){var w=t._fullLayout;r||(r=w.legend);var k="constant"===r.itemsizing,T=r.itemwidth,M=(T+2*p.itemGap)/2,A=o(M,0),S=function(e,t,r,n){var a;if(e+1)a=e;else{if(!(t&&t.width>0))return 0;a=t.width}return k?n:Math.min(a,r)};function L(e,i,o){var u=e[0].trace,f=u.marker||{},d=f.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",A),h.exit().remove(),h.each(function(e){var a=n.select(this),i=e[0],o=S(i.mlw,f.line,v,y);a.style("stroke-width",o+"px");var p=i.mcc;if(!r._inHover&&"mc"in i){var h=c(f),m=h.mid;void 0===m&&(m=(h.max+h.min)/2),p=l.tryColorscale(f,"")(m)}var g=p||i.mc||f.color,x=f.pattern,b=x&&l.getPatternAttr(x.shape,0,"");if(b){var w=l.getPatternAttr(x.bgcolor,0,null),k=l.getPatternAttr(x.fgcolor,0,null),T=x.fgopacity,M=_(x.size,8,10),A=_(x.solidity,.5,1),L="legend-"+u.uid;a.call(l.pattern,"legend",t,L,b,M,A,p,x.fillmode,w,k,T)}else a.call(s.fill,g);o&&s.stroke(a,i.mlc||d.color)})}function C(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",A),c.exit().remove(),c.size()){var u=(l.marker||{}).line,p=S(d(u.width,o.pts),u,v,y),h=i.minExtend(l,{marker:{line:{width:p}}});h.marker.line.color=u.color;var m=i.minExtend(o,{trace:h});f(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 f=a.selectAll("g.legendsymbols").data([e]);f.enter().append("g").classed("legendsymbols",!0),f.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",A).style("stroke-miterlimit",1),u.exit().remove(),u.each(function(e,o){var u,f=n.select(this),d=c(a),p=d.colorscale,h=d.reversescale;if(p){if(!r){var m=p.length;u=0===o?p[h?m-1:0][1]:1===o?p[h?0:m-1][1]:p[Math.floor((m-1)/2)][1]}}else{var y=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(y)?y[o]||y[0]:y}f.attr("d",e[0]),u?f.call(s.fill,u):f.call(function(e){if(e.size()){var n="legendfill-"+a.uid;l.gradient(e,t,n,x(h,"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,L(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",A).style("stroke-miterlimit",1),o.exit().remove(),o.each(function(e){var r=n.select(this),a=t[e[0]].marker,i=S(void 0,a.line,v,y);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){L(e,this,"funnel")}).each(function(e){L(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",A),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=S(void 0,r.line,v,y);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:k?h:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(l.pointStyle,c,t)}})}).each(function(e){C(e,this,"funnelarea")}).each(function(e){C(e,this,"pie")}).each(function(e){var r,a,o=b(e),s=o.showFill,f=o.showLine,d=o.showGradientLine,p=o.showGradientFill,h=o.anyFill,y=o.anyLine,v=e[0],_=v.trace,w=c(_),k=w.colorscale,M=w.reversescale,A=u.hasMarkers(_)||!h?"M5,0":y?"M5,-2":"M5,-3",L=n.select(this),C=L.select(".legendfill").selectAll("path").data(s||p?[e]:[]);if(C.enter().append("path").classed("js-fill",!0),C.exit().remove(),C.attr("d",A+"h"+T+"v6h-"+T+"z").call(function(e){if(e.size())if(s)l.fillGroupStyle(e,t);else{var r="legendfill-"+_.uid;l.gradient(e,t,r,x(M),k,"fill")}}),f||d){var D=S(void 0,_.line,g,m);a=i.minExtend(_,{line:{width:D}}),r=[i.minExtend(v,{trace:a})]}var O=L.select(".legendlines").selectAll("path").data(f||d?[r]:[]);O.enter().append("path").classed("js-line",!0),O.exit().remove(),O.attr("d",A+(d?"l"+T+",0.0001":"h"+T)).call(f?l.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+_.uid;l.lineGroupStyle(e),l.gradient(e,t,r,x(M),k,"stroke")}})}).each(function(e){var r,a,o=b(e),s=o.anyFill,c=o.anyLine,f=o.showLine,d=o.showMarker,p=e[0],g=p.trace,v=!d&&!c&&!s&&u.hasText(g);function x(e,t,r,n){var a=i.nestedProperty(g,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(k&&o&&void 0!==n&&(o=n),r){if(o<r[0])return r[0];if(o>r[1])return r[1]}return o}function _(e){return p._distinct&&p.index&&e[p.index]?e[p.index]:e[0]}if(d||v||f){var w={},T={};if(d){w.mc=x("marker.color",_),w.mx=x("marker.symbol",_),w.mo=x("marker.opacity",i.mean,[.2,1]),w.mlc=x("marker.line.color",_),w.mlw=x("marker.line.width",i.mean,[0,5],y),T.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var M=x("marker.size",i.mean,[2,16],h);w.ms=M,T.marker.size=M}f&&(T.line={width:x("line.width",_,[0,10],m)}),v&&(w.tx="Aa",w.tp=x("textposition",_),w.ts=10,w.tc=x("textfont.color",_),w.tf=x("textfont.family",_)),r=[i.minExtend(p,w)],(a=i.minExtend(g,T)).selectedpoints=null,a.texttemplate=null}var S=n.select(this).select("g.legendpoints"),L=S.selectAll("path.scatterpts").data(d?r:[]);L.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",A),L.exit().remove(),L.call(l.pointStyle,a,t),d&&(r[0].mrc=3);var C=S.selectAll("g.pointtext").data(v?r:[]);C.enter().append("g").classed("pointtext",!0).append("text").attr("transform",A),C.exit().remove(),C.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",A).style("stroke-miterlimit",1),r.exit().remove(),r.each(function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=S(void 0,i.line,v,y);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",A).style("stroke-miterlimit",1),r.exit().remove(),r.each(function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=S(void 0,i.line,v,y);a.style("fill","none").call(l.dashLine,i.line.dash,o),o&&s.stroke(a,i.line.color)})})}},{"../../lib":299,"../../registry":387,"../../traces/pie/helpers":501,"../../traces/pie/style_one":507,"../../traces/scatter/subtypes":534,"../color":158,"../colorscale/helpers":169,"../drawing":180,"./constants":209,"@plotly/d3":20}],217:[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":219}],218:[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 f(e,t){var r,a,o=t.currentTarget,l=o.getAttribute("data-attr"),s=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},f=i.list(e,null,!0),d=c._cartesianSpikesEnabled;if("zoom"===l){var p,h="in"===s?.5:2,m=(1+h)/2,y=(1-h)/2;for(a=0;a<f.length;a++)if(!(r=f[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 g=r._rangeInitial.slice();u[p+".range[0]"]=g[0],u[p+".range[1]"]=g[1]}void 0!==r._showSpikeInitial&&(u[p+".showspikes"]=r._showSpikeInitial,"on"!==d||r._showSpikeInitial||(d="off"))}else{var v=[r.r2l(r.range[0]),r.r2l(r.range[1])],x=[m*v[0]+y*v[1],m*v[1]+y*v[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=d,n.call("_guiRelayout",e,u)}function d(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,f=l[c],d=f+".camera",p=f+".aspectratio",h=f+".aspectmode",m=o[f]._scene;a?(s[d+".up"]=m.viewInitial.up,s[d+".eye"]=m.viewInitial.eye,s[d+".center"]=m.viewInitial.center,u=!0):i&&(s[d+".up"]=null,s[d+".eye"]=null,s[d+".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],f=a[u],d=u+".hovermode";l[d]=f.hovermode,s[d]=!1;for(var p=0;p<3;p++){var h=o[p],m=u+"."+h+".showspikes";s[m]=!1,l[m]=f[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 f=u.projection.scale,d="in"===i?2*f:.5*f;n.call("_guiRelayout",e,c+".projection.scale",d)}}"reset"===a&&x(e,"geo")}function y(e){var t=e._fullLayout;return!t.hovermode&&(t._has("cartesian")?t._isHoriz?"y":"x":"closest")}function g(e){var t=y(e);n.call("_guiRelayout",e,"hovermode",t)}function v(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 f=c[u];i[l+"."+f]=s[f]}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:f},u.pan2d={name:"pan2d",_cat:"pan",title:function(e){return c(e,"Pan")},attr:"dragmode",val:"pan",icon:o.pan,click:f},u.select2d={name:"select2d",_cat:"select",title:function(e){return c(e,"Box Select")},attr:"dragmode",val:"select",icon:o.selectbox,click:f},u.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return c(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:o.lasso,click:f},u.drawclosedpath={name:"drawclosedpath",title:function(e){return c(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:o.drawclosedpath,click:f},u.drawopenpath={name:"drawopenpath",title:function(e){return c(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:o.drawopenpath,click:f},u.drawline={name:"drawline",title:function(e){return c(e,"Draw line")},attr:"dragmode",val:"drawline",icon:o.drawline,click:f},u.drawrect={name:"drawrect",title:function(e){return c(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:o.drawrect,click:f},u.drawcircle={name:"drawcircle",title:function(e){return c(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:o.drawcircle,click:f},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:f},u.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:f},u.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return c(e,"Autoscale")},attr:"zoom",val:"auto",icon:o.autoscale,click:f},u.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return c(e,"Reset axes")},attr:"zoom",val:"reset",icon:o.home,click:f},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:f},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:f},u.zoom3d={name:"zoom3d",_cat:"zoom",title:function(e){return c(e,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:o.zoombox,click:d},u.pan3d={name:"pan3d",_cat:"pan",title:function(e){return c(e,"Pan")},attr:"scene.dragmode",val:"pan",icon:o.pan,click:d},u.orbitRotation={name:"orbitRotation",title:function(e){return c(e,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:o["3d_rotate"],click:d},u.tableRotation={name:"tableRotation",title:function(e){return c(e,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:o["z-axis"],click:d},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:g},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:g},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:g},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=y(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"),f(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:v},u.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:v}},{"../../fonts/ploticon":282,"../../lib":299,"../../plots/cartesian/axis_ids":350,"../../plots/plots":380,"../../registry":387,"../shapes/draw":253}],219:[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":218}],220:[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":299,"../../plot_api/plot_template":335,"../color":158,"./attributes":217}],221:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),manage:e("./manage")}},{"./attributes":217,"./defaults":220,"./manage":222}],222:[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,u=e("../../lib").extendDeep;t.exports=function(e){var t=e._fullLayout,r=e._context,f=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,p=r.modeBarButtons;d=Array.isArray(p)&&p.length?function(e){for(var t=u([],e),r=0;r<t.length;r++)for(var n=t[r],a=0;a<n.length;a++){var i=n[a];if("string"==typeof i){if(void 0===s[i])throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));t[r][a]=s[i]}}return t}(p):!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 f=t.modebar.add;"string"==typeof f&&(f=[f]);var d=t.modebar.remove;"string"==typeof d&&(d=[d]);var p=l.modeBarButtonsToAdd.concat(f.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(d.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"),y=t._has("gl3d"),g=t._has("geo"),v=t._has("pie"),x=t._has("funnelarea"),b=t._has("gl2d"),_=t._has("ternary"),w=t._has("mapbox"),k=t._has("polar"),T=t._has("smith"),M=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),S=o(t.hovermode),L=[];function C(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])}L.push(t)}}var D=["toImage"];l.showEditInChartStudio?D.push("editInChartStudio"):l.showSendToCloud&&D.push("sendDataToCloud");C(D);var O=[],P=[],E=[],R=[];(m||b||v||x||_)+g+y+w+k+T>1?(P=["toggleHover"],E=["resetViews"]):g?(O=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],E=["resetGeo"]):y?(P=["hoverClosest3d"],E=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(O=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],E=["resetViewMapbox"]):b?P=["hoverClosestGl2d"]:v?P=["hoverClosestPie"]:M?(P=["hoverClosestCartesian","hoverCompareCartesian"],E=["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)||S)&&(P=[]);!m&&!b||A||(O=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==E[0]&&(E=["resetScale2d"]));y?R=["zoom3d","pan3d","orbitRotation","tableRotation"]:(m||b)&&!A||_?R=["zoom2d","pan2d"]:w||g?R=["pan2d"]:k&&(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=[],I=function(e){-1===z.indexOf(e)&&-1!==P.indexOf(e)&&z.push(e)};if(Array.isArray(p)){for(var N=[],F=0;F<p.length;F++){var j=p[F];"string"==typeof j?(j=j.toLowerCase(),-1!==c.indexOf(j)?(t._has("mapbox")||t._has("cartesian"))&&R.push(j):"togglespikelines"===j?I("toggleSpikelines"):"togglehover"===j?I("toggleHover"):"hovercompare"===j?I("hoverCompareCartesian"):"hoverclosest"===j?(I("hoverClosestCartesian"),I("hoverClosestGeo"),I("hoverClosest3d"),I("hoverClosestGl2d"),I("hoverClosestPie")):"v1hovermode"===j&&(I("toggleHover"),I("hoverClosestCartesian"),I("hoverCompareCartesian"),I("hoverClosestGeo"),I("hoverClosest3d"),I("hoverClosestGl2d"),I("hoverClosestPie"))):N.push(j)}p=N}return C(R),C(O.concat(E)),C(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}(L,p)}(e),f?f.update(e,d):t._modeBar=l(e,d)}else f&&(f.destroy(),delete t._modeBar)}},{"../../lib":299,"../../plots/cartesian/axis_ids":350,"../../registry":387,"../../traces/scatter/subtypes":534,"../fx/helpers":194,"./buttons":218,"./constants":219,"./modebar":223}],223:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=e("../../fonts/ploticon"),l=e("../../version").version,s=new DOMParser;function c(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var u=c.prototype;u.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 f=this.getLogo();r.watermark&&(f.className=f.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()},u.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)})},u.createGroup=function(){var e=document.createElement("div");return e.className="modebar-group",e},u.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},u.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=s.parseFromString(e.svg,"application/xml").childNodes[0]);return t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},u.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)}})},u.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},u.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.js")+" (v"+l+")"),t.className="modebar-btn plotlyjsicon modebar-btn--logo",t.appendChild(this.createIcon(o.newplotlylogo)),e.appendChild(t),e},u.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},u.destroy=function(){i.removeElement(this.container.querySelector(".modebar")),i.deleteRelatedStyleRule(this._uid)},t.exports=function(e,t){var r=e._fullLayout,a=new c({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":282,"../../lib":299,"../../version":561,"@plotly/d3":20,"fast-isnumeric":33}],224:[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":335,"../../plots/font_attributes":374,"../color/attributes":157}],225:[function(e,t,r){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],226:[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,f){var d=e.rangeselector||{},p=i.newContainer(t,"rangeselector");function h(e,t){return n.coerce(d,p,l,e,t)}if(h("visible",o(d,p,{name:"buttons",handleItemDefaults:c,calendar:f}).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 y=h("bgcolor");h("activecolor",a.contrast(y,s.lightAmount,s.darkAmount)),h("bordercolor"),h("borderwidth")}}},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/array_container_defaults":341,"../color":158,"./attributes":224,"./constants":225}],227:[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"),f=e("../../plots/cartesian/axis_ids"),d=e("../../constants/alignment"),p=d.LINE_SPACING,h=d.FROM_TL,m=d.FROM_BR,y=e("./constants"),g=e("./get_update_object");function v(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:y.rx,ry:y.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=f.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),v);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,f=o.rangeselector,d=r.selectAll("g.button").data(s.filterVisible(f.buttons));d.enter().append("g").classed("button",!0),d.exit().remove(),d.each(function(t){var r=n.select(this),i=g(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,f,t),r.call(b,f,t,e),r.on("click",function(){e._dragged||a.call("_guiRelayout",e,i)}),r.on("mouseover",function(){t._isHovered=!0,r.call(x,f,t)}),r.on("mouseout",function(){t._isHovered=!1,r.call(x,f,t)})}),function(e,t,r,a,o){var f=0,d=0,g=r.borderwidth;t.each(function(){var e=n.select(this),t=e.select(".selector-text"),a=r.font.size*p,i=Math.max(a*u.lineCount(t),16)+3;d=Math.max(d,i)}),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,y.minButtonWidth);e.attr("transform",c(g+f,g)),t.attr({x:0,y:0,width:h,height:d}),u.positionText(a,h/2,d/2-(s-1)*o/2+3),f+=h+5});var v=e._fullLayout._size,x=v.l+v.w*r.x,b=v.t+v.h*(1-r.y),_="left";s.isRightAnchor(r)&&(x-=f,_="right");s.isCenterAnchor(r)&&(x-=f/2,_="center");var w="top";s.isBottomAnchor(r)&&(b-=d,w="bottom");s.isMiddleAnchor(r)&&(b-=d/2,w="middle");f=Math.ceil(f),d=Math.ceil(d),x=Math.round(x),b=Math.round(b),i.autoMargin(e,a+"-range-selector",{x:r.x,y:r.y,l:f*h[_],r:f*m[_],b:d*m[w],t:d*h[w]}),o.attr("transform",c(x,b))}(e,d,f,o._name,r)})}},{"../../constants/alignment":274,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axis_ids":350,"../../plots/plots":380,"../../registry":387,"../color":158,"../drawing":180,"./constants":225,"./get_update_object":228,"@plotly/d3":20}],228:[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 f=i[1];return[r,f]}(e,t);i[r+".range[0]"]=o[0],i[r+".range[1]"]=o[1]}return i}},{"../../lib":299,"d3-time":32}],229:[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":224,"./defaults":226,"./draw":227}],230:[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":157}],231:[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":345,"../../plots/cartesian/axis_ids":350,"./constants":232}],232:[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}},{}],233:[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,f,d=s.rangeslider,p=a.newContainer(c,"rangeslider");if(_("visible")){_("bgcolor",t.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),_("autorange",!c.isValidRange(d.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)}),y=n.simpleMap(m,i.id2name),g=0;g<y.length;g++){var v=y[g];u=d[v]||{},f=a.newContainer(p,v,"yaxis");var x,b=t[v];u.range&&b.isValidRange(u.range)&&(x="fixed"),"match"!==w("rangemode",x)&&w("range",b.range.slice())}p._input=d}}function _(e,t){return n.coerce(d,p,o,e,t)}function w(e,t){return n.coerce(u,f,l,e,t)}}},{"../../lib":299,"../../plot_api/plot_template":335,"../../plots/cartesian/axis_ids":350,"./attributes":230,"./oppaxis_attributes":237}],234:[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"),f=e("../../plots/cartesian"),d=e("../../plots/cartesian/axis_ids"),p=e("../dragelement"),h=e("../../lib/setcursor"),m=e("./constants");function y(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,u=-n._offsetShift,f=s.crispRound(t,n.borderwidth);a.attr({width:n._width+i,height:n._height+i,transform:l(u,u),"stroke-width":f}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function g(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 v(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=d.getFromId(t,e,"y"),h=p._name,m=a[h],y={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&&(y.layout.xaxis.rangebreaks=r.rangebreaks),y.layout[h]={type:p.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():p.range.slice(),calendar:p.calendar},p.rangebreaks&&(y.layout[h].rangebreaks=p.rangebreaks),i.supplyDefaults(y);var g=y._fullLayout.xaxis,v=y._fullLayout[h];g.clearCalc(),g.setScale(),v.clearCalc(),v.setScale();var x={id:e,plotgroup:s,xaxis:g,yaxis:v,isRangePlot:!0};u?l=x:(x.mainplot="xy",x.mainplotinfo=l),f.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[d.id2name(r.anchor)],f=s[d.id2name(r.anchor)];if(s.range){var w,k=o.simpleMap(s.range,r.r2l),T=o.simpleMap(r.range,r.r2l);w=T[0]<T[1]?[Math.min(k[0],T[0]),Math.max(k[1],T[1])]:[Math.max(k[0],T[0]),Math.min(k[1],T[1])],s.range=s._input.range=o.simpleMap(w,r.l2r)}r.cleanRange("rangeslider.range");var M=t._size,A=r.domain;s._width=M.w*(A[1]-A[0]);var S=Math.round(M.l+M.w*A[0]),L=Math.round(M.t+M.h*(1-r._counterDomainMin)+("bottom"===r.side?r._depth:0)+s._offsetShift+m.extraPad);i.attr("transform",l(S,L)),s._rl=o.simpleMap(s.range,r.r2l);var C=s._rl[0],D=s._rl[1],O=D-C;if(s.p2d=function(e){return e/s._width*O+C},s.d2p=function(e){return(e-C)/O*s._width},r.rangebreaks){var P=r.locateBreaks(C,D);if(P.length){var E,R,z=0;for(E=0;E<P.length;E++)z+=(R=P[E]).max-R.min;var I=s._width/(D-C-z),N=[-I*C];for(E=0;E<P.length;E++)R=P[E],N.push(N[N.length-1]-I*(R.max-R.min));for(s.d2p=function(e){for(var t=N[0],r=0;r<P.length;r++){var n=P[r];if(e>=n.max)t=N[r+1];else if(e<n.min)break}return t+I*e},E=0;E<P.length;E++)(R=P[E]).pmin=s.d2p(R.min),R.pmax=s.d2p(R.max);s.p2d=function(e){for(var t=N[0],r=0;r<P.length;r++){var n=P[r];if(e>=n.pmax)t=N[r+1];else if(e<n.pmin)break}return(e-t)/I}}}if("match"!==f.rangemode){var F=c.r2l(f.range[0]),j=c.r2l(f.range[1])-F;s.d2pOppAxis=function(e){return(e-F)/j*s._height}}i.call(y,e,r,s).call(g,e,r,s).call(v,e,r,s).call(x,e,r,s,f).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,f=u.target,d=u.clientX||u.touches[0].clientX,m=d-e.node().getBoundingClientRect().left,y=i.d2p(r._rl[0]),g=i.d2p(r._rl[1]),v=p.coverSlip();function x(e){var u,p,x,b=e.clientX||e.touches[0].clientX,_=+b-d;switch(f){case l:x="ew-resize",u=y+_,p=g+_;break;case s:x="col-resize",u=y+_,p=g;break;case c:x="col-resize",u=y,p=g+_;break;default:x="ew-resize",u=m,p=m+_}if(p<u){var w=p;p=u,u=w}i._pixelMin=u,i._pixelMax=p,h(n.select(v),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(){v.removeEventListener("mousemove",x),v.removeEventListener("mouseup",b),this.removeEventListener("touchmove",x),this.removeEventListener("touchend",b),o.removeElement(v)}this.addEventListener("touchmove",x),this.addEventListener("touchend",b),v.addEventListener("mousemove",x),v.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 f(e){return o.constrain(e,-s,n._width+s)}var d=c(n.d2p(r._rl[0])),p=c(n.d2p(r._rl[1]));if(e.select("rect."+m.slideBoxClassName).attr("x",d).attr("width",p-d),e.select("rect."+m.maskMinClassName).attr("width",d),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])),y=n._height-u(n.d2pOppAxis(a._rl[0]));e.select("rect."+m.maskMinOppAxisClassName).attr("x",d).attr("height",h).attr("width",p-d),e.select("rect."+m.maskMaxOppAxisClassName).attr("x",d).attr("y",y).attr("height",n._height-y).attr("width",p-d),e.select("rect."+m.slideBoxClassName).attr("y",h).attr("height",y-h)}var g=Math.round(f(d-s))-.5,v=Math.round(f(p-s))+.5;e.select("g."+m.grabberMinClassName).attr("transform",l(g,.5)),e.select("g."+m.grabberMaxClassName).attr("transform",l(v,.5))}(i,0,r,s,c,f),"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:L+s._height+s._offsetShift+10+1.5*r.title.font.size,"text-anchor":"middle"}})}))}},{"../../lib":299,"../../lib/setcursor":319,"../../plots/cartesian":358,"../../plots/cartesian/axis_ids":350,"../../plots/plots":380,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"../titles":267,"./constants":232,"@plotly/d3":20}],235:[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":274,"../../lib/svg_text_utils":322,"../../plots/cartesian/axis_ids":350,"./constants":232}],236:[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":299,"./attributes":230,"./calc_autorange":231,"./defaults":233,"./draw":234,"./helpers":235,"./oppaxis_attributes":237}],237:[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"}},{}],238:[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/edit_types").overrideAll,s=e("../../plot_api/plot_template").templatedArray;e("../../constants/axis_placeable_objects");t.exports=l(s("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:o({},n.xref,{}),yref:o({},n.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:a.color,width:o({},a.width,{min:1,dflt:1}),dash:o({},i,{dflt:"dot"})}}),"arraydraw","from-root")},{"../../constants/axis_placeable_objects":275,"../../lib/extend":293,"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../../traces/scatter/attributes":509,"../annotations/attributes":141,"../drawing/attributes":179}],239:[function(e,t,r){"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},{}],240:[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("../shapes/helpers");function s(e,t,r){function i(r,a){return n.coerce(e,t,o,r,a)}var s=i("path"),c="path"!==i("type",s?"path":"rect");c&&delete t.path,i("opacity"),i("line.color"),i("line.width"),i("line.dash");for(var u=["x","y"],f=0;f<2;f++){var d,p,h,m=u[f],y={_fullLayout:r},g=a.coerceRef(e,t,y,m);if((d=a.getFromId(y,g))._selectionIndices.push(t._index),h=l.rangeToShapePosition(d),p=l.shapePositionToRange(d),c){var v=m+"0",x=m+"1",b=e[v],_=e[x];e[v]=p(e[v],!0),e[x]=p(e[x],!0),a.coercePosition(t,y,i,g,v),a.coercePosition(t,y,i,g,x);var w=t[v],k=t[x];void 0!==w&&void 0!==k&&(t[v]=h(w),t[x]=h(k),e[v]=b,e[x]=_)}}c&&n.noneOrAll(e,t,["x0","x1","y0","y1"])}t.exports=function(e,t){i(e,t,{name:"selections",handleItemDefaults:s});for(var r=t.selections,n=0;n<r.length;n++){var a=r[n];a&&(void 0===a.path&&(void 0!==a.x0&&void 0!==a.x1&&void 0!==a.y0&&void 0!==a.y1||(t.selections[n]=null)))}}},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"../shapes/helpers":260,"./attributes":238}],241:[function(e,t,r){"use strict";var n=e("../shapes/draw_newshape/helpers").readPaths,a=e("../shapes/display_outlines"),i=e("../shapes/handle_outline").clearOutlineControllers,o=e("../color"),l=e("../drawing"),s=e("../../plot_api/plot_template").arrayEditor,c=e("../shapes/helpers"),u=c.getPathString;function f(e){var t=e._fullLayout;for(var r in i(e),t._selectionLayer.selectAll("path").remove(),t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a<t.selections.length;a++)p(e,a)}function d(e){return e._context.editSelection}function p(e,t){e._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+t+'"]').remove();var r=c.makeSelectionsOptionsAndPlotinfo(e,t),i=r.options,p=r.plotinfo;i._input&&function(r){var c=u(e,i),y={"data-index":t,"fill-rule":"evenodd",d:c},g=i.opacity,v="rgba(0,0,0,0)",x=i.line.color||o.contrast(e._fullLayout.plot_bgcolor),b=i.line.width,_=i.line.dash;b||(b=5,_="solid");var w=d(e)&&e._fullLayout._activeSelectionIndex===t;w&&(v=e._fullLayout.activeselection.fillcolor,g=e._fullLayout.activeselection.opacity);for(var k=[],T=1;T>=0;T--){var M=r.append("path").attr(y).style("opacity",T?.1:g).call(o.stroke,x).call(o.fill,v).call(l.dashLine,T?"solid":_,T?4+b:b);if(h(M,e,i),w){var A=s(e.layout,"selections",i);M.style({cursor:"move"});var S={element:M.node(),plotinfo:p,gd:e,editHelpers:A,isActiveSelection:!0},L=n(c,e);a(L,M,S)}else M.style("pointer-events",T?"all":"none");k[T]=M}var C=k[0];k[1].node().addEventListener("click",function(){return function(e,t){if(!d(e))return;var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeSelectionIndex)return void m(e);e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=m,f(e)}}(e,C)})}(e._fullLayout._selectionLayer)}function h(e,t,r){var n=r.xref+r.yref;l.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function m(e){d(e)&&(e._fullLayout._activeSelectionIndex>=0&&(i(e),delete e._fullLayout._activeSelectionIndex,f(e)))}t.exports={draw:f,drawOne:p,activateLastSelection:function(e){if(!d(e))return;var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=m,f(e)}}},{"../../plot_api/plot_template":335,"../color":158,"../drawing":180,"../shapes/display_outlines":252,"../shapes/draw_newshape/helpers":257,"../shapes/handle_outline":259,"../shapes/helpers":260}],242:[function(e,t,r){"use strict";var n=e("../../drawing/attributes").dash,a=e("../../../lib/extend").extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:a({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},{"../../../lib/extend":293,"../../drawing/attributes":179}],243:[function(e,t,r){"use strict";t.exports=function(e,t,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},{}],244:[function(e,t,r){"use strict";var n=e("../../dragelement/helpers").selectMode,a=e("../../shapes/handle_outline").clearOutline,i=e("../../shapes/draw_newshape/helpers"),o=i.readPaths,l=i.writePaths,s=i.fixDatesForPaths;t.exports=function(e,t){if(e.length){var r=e[0][0];if(r){var i=r.getAttribute("d"),c=t.gd,u=c._fullLayout.newselection,f=t.plotinfo,d=f.xaxis,p=f.yaxis,h=t.isActiveSelection,m=t.dragmode,y=(c.layout||{}).selections||[];if(!n(m)&&void 0!==h){var g=c._fullLayout._activeSelectionIndex;if(g<y.length)switch(c._fullLayout.selections[g].type){case"rect":m="select";break;case"path":m="lasso"}}var v,x=o(i,c,f,h),b={xref:d._id,yref:p._id,opacity:u.opacity,line:{color:u.line.color,width:u.line.width,dash:u.line.dash}};1===x.length&&(v=x[0]),v&&5===v.length&&"select"===m?(b.type="rect",b.x0=v[0][1],b.y0=v[0][2],b.x1=v[2][1],b.y1=v[2][2]):(b.type="path",d&&p&&s(x,d,p),b.path=l(x),v=null),a(c);for(var _=t.editHelpers,w=(_||{}).modifyItem,k=[],T=0;T<y.length;T++){var M=c._fullLayout.selections[T];if(M){if(k[T]=M._input,void 0!==h&&T===c._fullLayout._activeSelectionIndex){var A=b;switch(M.type){case"rect":w("x0",A.x0),w("x1",A.x1),w("y0",A.y0),w("y1",A.y1);break;case"path":w("path",A.path)}}}else k[T]=M}return void 0===h?(k.push(b),k):_?_.getUpdateObj():{}}}}},{"../../dragelement/helpers":176,"../../shapes/draw_newshape/helpers":257,"../../shapes/handle_outline":259}],245:[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":299}],246:[function(e,t,r){"use strict";var n=e("./draw"),a=e("./select");t.exports={moduleType:"component",name:"selections",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),supplyDrawNewSelectionDefaults:e("./draw_newselection/defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("selections"),draw:n.draw,drawOne:n.drawOne,reselect:a.reselect,prepSelect:a.prepSelect,clearOutline:a.clearOutline,clearSelectionsCache:a.clearSelectionsCache,selectOnClick:a.selectOnClick}},{"../../plots/cartesian/include_components":357,"./attributes":238,"./defaults":240,"./draw":241,"./draw_newselection/defaults":243,"./select":247}],247:[function(e,t,r){"use strict";var n=e("polybooljs"),a=e("point-in-polygon/nested"),i=e("../../registry"),o=e("../drawing").dashStyle,l=e("../color"),s=e("../fx"),c=e("../fx/helpers").makeEventData,u=e("../dragelement/helpers"),f=u.freeMode,d=u.rectMode,p=u.drawMode,h=u.openMode,m=u.selectMode,y=e("../shapes/helpers"),g=e("../shapes/constants"),v=e("../shapes/display_outlines"),x=e("../shapes/handle_outline").clearOutline,b=e("../shapes/draw_newshape/helpers"),_=b.handleEllipse,w=b.readPaths,k=e("../shapes/draw_newshape/newshapes"),T=e("./draw_newselection/newselections"),M=e("./draw").activateLastSelection,A=e("../../lib"),S=A.sorterAsc,L=e("../../lib/polygon"),C=e("../../lib/throttle"),D=e("../../plots/cartesian/axis_ids").getFromId,O=e("../../lib/clear_gl_canvases"),P=e("../../plot_api/subroutines").redrawReglTraces,E=e("./constants"),R=E.MINSELECT,z=L.filter,I=L.tester,N=e("./helpers"),F=N.p2r,j=N.axValue,B=N.getTransform;function H(e){return void 0!==e.subplot}function q(e,t,r,n,a,i,o){var l,s,c,u,f,d,p,m,y,g=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(g)){Z(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}}(g,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)&&(d=K(_))){for(o&&o.remove(),y=0;y<l.length;y++)(s=l[y])._module.selectPoints(s,!1);Q(t,l),G(i),x&&de(t)}else{for(p=e.shiftKey&&(void 0!==d?d:K(_)),c=function(e,t,r){return{pointNumber:e,searchInfo:t,subtract:!!r}}(_.pointNumber,_.searchInfo,p),u=V(i.selectionDefs.concat([c])),y=0;y<l.length;y++)if(f=ee(l[y]._module.selectPoints(l[y],u),l[y]),b.length)for(var w=0;w<f.length;w++)b.push(f[w]);else b=f;if(Q(t,l,m={points:b}),c&&i&&i.selectionDefs.push(c),o){var k=i.mergedPolygons,T=h(i.dragmode);v(te(k,T),o,i)}x&&fe(t,m)}}}function U(e){return"pointNumber"in e&&"searchInfo"in e}function Y(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 V(e){if(e.length){for(var t=[],r=U(e[0])?0:e[0][0][0],n=r,a=U(e[0])?0:e[0][0][1],i=a,o=0;o<e.length;o++)if(U(e[o]))t.push(Y(e[o]));else{var l=I(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=!t[o].subtract);return i},isRect:!1,degenerate:!1}}}function Z(e,t,r){var n=t._fullLayout,a=r.plotinfo,i=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===a.id,l=(e.shiftKey||e.altKey)&&!(p(i)&&h(i));o&&l&&a.selection&&a.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=a.selection.selectionDefs,r.mergedPolygons=a.selection.mergedPolygons):l&&a.selection||G(r),o||(x(t),n._lastSelectedSubplot=a.id)}function G(e,t){var r=e.dragmode,n=e.plotinfo,a=e.gd;(function(e){return e._fullLayout._activeShapeIndex>=0})(a)&&a._fullLayout._deactivateShape(a),function(e){return e._fullLayout._activeSelectionIndex>=0}(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,l=p(r),s=m(r);if(l||s){var c,u,f=o.selectAll(".select-outline-"+n.id);if(f&&a._fullLayout._outlining)l&&(c=k(f,e)),c&&i.call("_guiRelayout",a,{shapes:c}),s&&!H(e)&&(u=T(f,e)),u&&(a._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",a,{selections:u}).then(function(){t&&M(a)})),a._fullLayout._outlining=!1}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function W(e){return e._id}function J(e,t,r,n){if(!e.calcdata)return[];var a,i,o,l=[],s=t.map(W),c=r.map(W);for(o=0;o<e.calcdata.length;o++)if(!0===(i=(a=e.calcdata[o])[0].trace).visible&&i._module&&i._module.selectPoints)if(!H({subplot:n})||i.subplot!==n&&i.geo!==n)if("splom"===i.type){if(i._xaxes[s[0]]&&i._yaxes[c[0]]){var u=X(i._module,a,t[0],r[0]);u.scene=e._fullLayout._splomScenes[i.uid],l.push(u)}}else if("sankey"===i.type){var f=X(i._module,a,t[0],r[0]);l.push(f)}else{if(-1===s.indexOf(i.xaxis))continue;if(-1===c.indexOf(i.yaxis))continue;l.push(X(i._module,a,D(e,i.xaxis),D(e,i.yaxis)))}else l.push(X(i._module,a,t[0],r[0]));return l}function X(e,t,r,n){return{_module:e,cd:t,xaxis:r,yaxis:n}}function K(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 Q(e,t,r){var n,a;for(n=0;n<t.length;n++){var o=t[n].cd[0].trace._fullInput,l=e._fullLayout._tracePreGUI[o.uid]||{};void 0===l.selectedpoints&&(l.selectedpoints=o._input.selectedpoints||null)}if(r){var s=r.points||[];for(n=0;n<t.length;n++)(a=t[n].cd[0].trace)._input.selectedpoints=a._fullInput.selectedpoints=[],a._fullInput!==a&&(a.selectedpoints=[]);for(var c=0;c<s.length;c++){var u=s[c],f=u.data,d=u.fullData,p=u.pointIndex,h=u.pointIndices;h?([].push.apply(f.selectedpoints,h),a._fullInput!==a&&[].push.apply(d.selectedpoints,h)):(f.selectedpoints.push(p),a._fullInput!==a&&d.selectedpoints.push(p))}}else for(n=0;n<t.length;n++)delete(a=t[n].cd[0].trace).selectedpoints,delete a._input.selectedpoints,a._fullInput!==a&&delete a._fullInput.selectedpoints;!function(e,t){for(var r=!1,n=0;n<t.length;n++){var a=t[n],o=a.cd;i.traceIs(o[0].trace,"regl")&&(r=!0);var l=a._module,s=l.styleOnSelect||l.style;s&&(s(e,o,o[0].node3),o[0].nodeRangePlot3&&s(e,o,o[0].nodeRangePlot3))}r&&(O(e),P(e))}(e,t)}function $(e,t,r){for(var a=(r?n.difference:n.union)({regions:e},{regions:[t]}).regions.reverse(),i=0;i<a.length;i++){var o=a[i];o.subtract=le(o,a.slice(0,i))}return a}function ee(e,t){if(Array.isArray(e))for(var r=t.cd,n=t.cd[0].trace,a=0;a<e.length;a++)e[a]=c(e[a],n,r);return e}function te(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}function re(e,t){for(var r,n,a=[],i=[],o=0;o<t.length;o++){var l=t[o];n=l._module.selectPoints(l,e),i.push(n),r=ee(n,l),a=a.concat(r)}return a}function ne(e,t,r,n,a){var i,o,l,s=!!n;a&&(i=a.plotinfo,o=a.xaxes[0]._id,l=a.yaxes[0]._id);var c=[],u=[],f=oe(e),d=e._fullLayout;if(i){var h=d._zoomlayer,y=d.dragmode,g=p(y),v=m(y);if(g||v){var x=D(e,o,"x"),b=D(e,l,"y");if(x&&b){var _=h.selectAll(".select-outline-"+i.id);if(_&&e._fullLayout._outlining&&_.length){for(var k=_[0][0].getAttribute("d"),T=w(k,e,i),M=[],A=0;A<T.length;A++){for(var S=T[A],L=[],C=0;C<S.length;C++)L.push([se(x,S[C][1]),se(b,S[C][2])]);L.xref=o,L.yref=l,L.subtract=le(L,M),M.push(L)}f=f.concat(M)}}}}var O=o&&l?[o+l]:d._subplots.cartesian;!function(e){var t=e.calcdata;if(!t)return;for(var r=0;r<t.length;r++){var n=t[r][0],a=n.trace,i=e._fullLayout._splomScenes;if(i){var o=i[a.uid];o&&(o.selectBatch=[])}}}(e);for(var P={},E=0;E<O.length;E++){var R=O[E],z=R.indexOf("y"),I=R.slice(0,z),N=R.slice(z),F=o&&l?r:void 0;if(F=ie(f,I,N,F)){var j=n;if(!s){var B=D(e,I,"x"),H=D(e,N,"y");j=J(e,[B],[H],R);for(var q=0;q<j.length;q++){var U=j[q],Y=U.cd[0],V=Y.trace;if("scattergl"===U._module.name&&!Y.t.xpx){var Z=V.x,G=V.y,W=V._length;Y.t.xpx=[],Y.t.ypx=[];for(var X=0;X<W;X++)Y.t.xpx[X]=B.c2p(Z[X]),Y.t.ypx[X]=H.c2p(G[X])}"splom"===U._module.name&&(P[V.uid]||(P[V.uid]=!0))}}var K=re(F,j);c=c.concat(K),u=u.concat(j)}}var $={points:c};Q(e,u,$);var ee=d.clickmode.indexOf("event")>-1&&t;if(!i&&t){var te=oe(e,!0);if(te.length){var ne=te[0].xref,pe=te[0].yref;if(ne&&pe){var he=ce(te);ue([D(e,ne,"x"),D(e,pe,"y")])($,he)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&fe(e,$),d._reselect=!1}if(!i&&d._deselect){var me=d._deselect;(function(e,t,r){for(var n=0;n<r.length;n++){var a=r[n];if(a.xaxis&&a.xaxis._id===e&&a.yaxis&&a.yaxis._id===t)return!0}return!1})(o=me.xref,l=me.yref,u)||ae(e,o,l,n),ee&&($.points.length?fe(e,$):de(e)),d._deselect=!1}return{eventData:$,selectionTesters:r}}function ae(e,t,r,n){n=J(e,[D(e,t,"x")],[D(e,r,"y")],t+r);for(var a=0;a<n.length;a++){var i=n[a];i._module.selectPoints(i,!1)}Q(e,n)}function ie(e,t,r,n){for(var a,i=0;i<e.length;i++){var o=e[i];if(t===o.xref&&r===o.yref)if(a)n=V(a=$(a,o,!!o.subtract));else a=[o],n=I(o)}return n}function oe(e,t){for(var r=[],n=e._fullLayout,a=n.selections,i=a.length,o=0;o<i;o++)if(!t||o===n._activeSelectionIndex){var l=a[o];if(l){var s,c,u,f,d,p=l.xref,h=l.yref,m=D(e,p,"x"),v=D(e,h,"y");if("rect"===l.type){d=[];var x=se(m,l.x0),b=se(m,l.x1),_=se(v,l.y0),w=se(v,l.y1);d=[[x,_],[x,w],[b,w],[b,_]],s=Math.min(x,b),c=Math.max(x,b),u=Math.min(_,w),f=Math.max(_,w),d.xmin=s,d.xmax=c,d.ymin=u,d.ymax=f,d.xref=p,d.yref=h,d.subtract=!1,d.isRect=!0,r.push(d)}else if("path"===l.type)for(var k=l.path.split("Z"),T=[],M=0;M<k.length;M++){var A=k[M];if(A){A+="Z";var S=y.extractPathCoords(A,g.paramIsX,"raw"),L=y.extractPathCoords(A,g.paramIsY,"raw");s=1/0,c=-1/0,u=1/0,f=-1/0,d=[];for(var C=0;C<S.length;C++){var O=se(m,S[C]),P=se(v,L[C]);d.push([O,P]),s=Math.min(O,s),c=Math.max(O,c),u=Math.min(P,u),f=Math.max(P,f)}d.xmin=s,d.xmax=c,d.ymin=u,d.ymax=f,d.xref=p,d.yref=h,d.subtract=le(d,T),T.push(d),r.push(d)}}}}return r}function le(e,t){for(var r=!1,n=0;n<t.length;n++)for(var i=t[n],o=0;o<e.length;o++)if(a(e[o],i)){r=!r;break}return r}function se(e,t){return"date"===e.type&&(t=t.replace("_"," ")),"log"===e.type?e.c2p(t):e.r2p(t,null,e.calendar)}function ce(e){for(var t=e.length,r=[],n=0;n<t;n++){var a=e[n];r=(r=r.concat(a)).concat([a[0]])}return function(e){e.isRect=5===e.length&&e[0][0]===e[4][0]&&e[0][1]===e[4][1]&&e[0][0]===e[1][0]&&e[2][0]===e[3][0]&&e[0][1]===e[3][1]&&e[1][1]===e[2][1]||e[0][1]===e[1][1]&&e[2][1]===e[3][1]&&e[0][0]===e[3][0]&&e[1][0]===e[2][0],e.isRect&&(e.xmin=Math.min(e[0][0],e[2][0]),e.xmax=Math.max(e[0][0],e[2][0]),e.ymin=Math.min(e[0][1],e[2][1]),e.ymax=Math.max(e[0][1],e[2][1]));return e}(r)}function ue(e){return function(t,r){for(var n,a,i=0;i<e.length;i++){var o=e[i],l=o._id,s=l.charAt(0);if(r.isRect){n||(n={});var c=r[s+"min"],u=r[s+"max"];void 0!==c&&void 0!==u&&(n[l]=[F(o,c),F(o,u)].sort(S))}else a||(a={}),a[l]=r.map(j(o))}n&&(t.range=n),a&&(t.lassoPoints=a)}}function fe(e,t){t&&(t.selections=(e.layout||{}).selections||[]),e.emit("plotly_selected",t)}function de(e){e.emit("plotly_deselect",null)}t.exports={reselect:ne,prepSelect:function(e,t,r,n,a){var c=!H(n),u=f(a),y=d(a),g=h(a),x=p(a),b=m(a),w="drawcircle"===a,k="drawline"===a||w,T=n.gd,M=T._fullLayout,S=b&&"immediate"===M.newselection.mode&&c,L=M._zoomlayer,D=n.element.getBoundingClientRect(),O=n.plotinfo,P=B(O),N=t-D.left,F=r-D.top;M._calcInverseTransform(T);var j=A.apply3DTransform(M._invTransform)(N,F);N=j[0],F=j[1];var U,Y,W,X,K,ee,ie,oe=M._invScaleX,le=M._invScaleY,se=N,pe=F,he="M"+N+","+F,me=n.xaxes[0],ye=n.yaxes[0],ge=me._length,ve=ye._length,xe=e.altKey&&!(p(a)&&g);Z(e,T,n),u&&(U=z([[N,F]],E.BENDPX));var be=L.selectAll("path.select-outline-"+O.id).data([1]),_e=x?M.newshape:M.newselection,we=x&&!g?_e.fillcolor:"rgba(0,0,0,0)",ke=_e.line.color||(c?l.contrast(T._fullLayout.plot_bgcolor):"#7f7f7f");be.enter().append("path").attr("class","select-outline select-outline-"+O.id).style({opacity:x?_e.opacity/2:1,"stroke-dasharray":o(_e.line.dash,_e.line.width),"stroke-width":_e.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,ke).call(l.fill,we).attr("fill-rule","evenodd").classed("cursor-move",!!x).attr("transform",P).attr("d",he+"Z");var Te=L.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",P).attr("d","M0,0Z"),Me=M._uid+E.SELECTID,Ae=[],Se=J(T,n.xaxes,n.yaxes,n.subplot);S&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(c){var e=me._id,t=ye._id;ae(T,e,t,Se);for(var r=(T.layout||{}).selections||[],n=[],a=!1,o=0;o<r.length;o++){var l=M.selections[o];l.xref!==e||l.yref!==t?n.push(r[o]):a=!0}a&&(T._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",T,{selections:n}))}});var Le=function(e){return e.plotinfo.fillRangeItems||ue(e.xaxes.concat(e.yaxes))}(n);n.moveFn=function(e,t){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),se=Math.max(0,Math.min(ge,oe*e+N)),pe=Math.max(0,Math.min(ve,le*t+F));var r=Math.abs(se-N),a=Math.abs(pe-F);if(y){var i,o,l;if(b){var s=M.selectdirection;switch(i="any"===s?a<Math.min(.6*r,R)?"h":r<Math.min(.6*a,R)?"v":"d":s){case"h":o=w?ve/2:0,l=ve;break;case"v":o=w?ge/2:0,l=ge}}if(x)switch(M.newshape.drawdirection){case"vertical":i="h",o=w?ve/2:0,l=ve;break;case"horizontal":i="v",o=w?ge/2:0,l=ge;break;case"ortho":r<a?(i="h",o=F,l=pe):(i="v",o=N,l=se);break;default:i="d"}"h"===i?((X=k?_(w,[se,o],[se,l]):[[N,o],[N,l],[se,l],[se,o]]).xmin=k?se:Math.min(N,se),X.xmax=k?se:Math.max(N,se),X.ymin=Math.min(o,l),X.ymax=Math.max(o,l),Te.attr("d","M"+X.xmin+","+(F-R)+"h-4v"+2*R+"h4ZM"+(X.xmax-1)+","+(F-R)+"h4v"+2*R+"h-4Z")):"v"===i?((X=k?_(w,[o,pe],[l,pe]):[[o,F],[o,pe],[l,pe],[l,F]]).xmin=Math.min(o,l),X.xmax=Math.max(o,l),X.ymin=k?pe:Math.min(F,pe),X.ymax=k?pe:Math.max(F,pe),Te.attr("d","M"+(N-R)+","+X.ymin+"v-4h"+2*R+"v4ZM"+(N-R)+","+(X.ymax-1)+"v4h"+2*R+"v-4Z")):"d"===i&&((X=k?_(w,[N,F],[se,pe]):[[N,F],[N,pe],[se,pe],[se,F]]).xmin=Math.min(N,se),X.xmax=Math.max(N,se),X.ymin=Math.min(F,pe),X.ymax=Math.max(F,pe),Te.attr("d","M0,0Z"))}else u&&(U.addPt([se,pe]),X=U.filtered);if(n.selectionDefs&&n.selectionDefs.length?(W=$(n.mergedPolygons,X,xe),X.subtract=xe,Y=V(n.selectionDefs.concat([X]))):(W=[X],Y=I(X)),v(te(W,g),be,n),b){var c,f=ne(T,!1),d=f.eventData?f.eventData.points.slice():[];f=ne(T,!1,Y,Se,n),Y=f.selectionTesters,ie=f.eventData,c=U?U.filtered:ce(W),C.throttle(Me,E.SELECTDELAY,function(){for(var e=(Ae=re(Y,Se)).slice(),t=0;t<d.length;t++){for(var r=d[t],n=!1,a=0;a<e.length;a++)if(e[a].curveNumber===r.curveNumber&&e[a].pointNumber===r.pointNumber){n=!0;break}n||e.push(r)}e.length&&(ie||(ie={}),ie.points=e),Le(ie,c),function(e,t){e.emit("plotly_selecting",t)}(T,ie)})}},n.clickFn=function(e,t){if(Te.remove(),T._fullLayout._activeShapeIndex>=0)T._fullLayout._deactivateShape(T);else if(!x){var r=M.clickmode;C.done(Me).then(function(){if(C.clear(Me),2===e){for(be.remove(),K=0;K<Se.length;K++)(ee=Se[K])._module.selectPoints(ee,!1);if(Q(T,Se),G(n),de(T),Se.length){var a=Se[0].xaxis,o=Se[0].yaxis;if(a&&o){for(var l=[],c=T._fullLayout.selections,u=0;u<c.length;u++){var f=c[u];f&&(f.xref===a._id&&f.yref===o._id||l.push(f))}l.length<c.length&&(T._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",T,{selections:l}))}}}else r.indexOf("select")>-1&&q(t,T,n.xaxes,n.yaxes,n.subplot,n,be),"event"===r&&fe(T,void 0);s.click(T,t)}).catch(A.error)}},n.doneFn=function(){Te.remove(),C.done(Me).then(function(){C.clear(Me),!S&&X&&n.selectionDefs&&(X.subtract=xe,n.selectionDefs.push(X),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,W)),(S||x)&&G(n,S),n.doneFnCompleted&&n.doneFnCompleted(Ae),b&&fe(T,ie)}).catch(A.error)}},clearOutline:x,clearSelectionsCache:G,selectOnClick:q}},{"../../lib":299,"../../lib/clear_gl_canvases":287,"../../lib/polygon":311,"../../lib/throttle":323,"../../plot_api/subroutines":336,"../../plots/cartesian/axis_ids":350,"../../registry":387,"../color":158,"../dragelement/helpers":176,"../drawing":180,"../fx":198,"../fx/helpers":194,"../shapes/constants":250,"../shapes/display_outlines":252,"../shapes/draw_newshape/helpers":257,"../shapes/draw_newshape/newshapes":258,"../shapes/handle_outline":259,"../shapes/helpers":260,"./constants":239,"./draw":241,"./draw_newselection/newselections":244,"./helpers":245,"point-in-polygon/nested":75,polybooljs:76}],248:[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":275,"../../lib/extend":293,"../../plot_api/plot_template":335,"../../traces/scatter/attributes":509,"../annotations/attributes":141,"../drawing/attributes":179}],249:[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 f=l?o.extractPathCoords(l,s?i.paramIsY:i.paramIsX):[r,a],d=n.aggNums(Math.max,null,f),p=n.aggNums(Math.min,null,f),h=p<0?Math.abs(p)+c:c,m=d>0?d+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,f,d=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||((f=l(u[c]))<d&&(d=f),f>p&&(p=f)));return p>=d?[d,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,f,d=r[o];d._extremes={};var p=a.getRefType(d.xref),h=a.getRefType(d.yref);if("paper"!==d.xref&&"domain"!==p){var m="pixel"===d.xsizemode?d.xanchor:d.x0,y="pixel"===d.xsizemode?d.xanchor:d.x1;(f=u(c=a.getFromId(e,d.xref),m,y,d.path,i.paramIsX))&&(d._extremes[c._id]=a.findExtremes(c,f,l(d)))}if("paper"!==d.yref&&"domain"!==h){var g="pixel"===d.ysizemode?d.yanchor:d.y0,v="pixel"===d.ysizemode?d.yanchor:d.y1;(f=u(c=a.getFromId(e,d.yref),g,v,d.path,i.paramIsY))&&(d._extremes[c._id]=a.findExtremes(c,f,s(d)))}}}},{"../../lib":299,"../../plots/cartesian/axes":346,"./constants":250,"./helpers":260}],250:[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}}},{}],251:[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="path"!==i("type",s?"path":"rect");c&&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"),f=i("ysizemode"),d=["x","y"],p=0;p<2;p++){var h,m,y,g=d[p],v=g+"anchor",x="x"===g?u:f,b={_fullLayout:r},_=a.coerceRef(e,t,b,g,void 0,"paper");if("range"===a.getRefType(_)?((h=a.getFromId(b,_))._shapeIndices.push(t._index),y=l.rangeToShapePosition(h),m=l.shapePositionToRange(h)):m=y=n.identity,c){var w=g+"0",k=g+"1",T=e[w],M=e[k];e[w]=m(e[w],!0),e[k]=m(e[k],!0),"pixel"===x?(i(w,0),i(k,10)):(a.coercePosition(t,b,i,_,w,.25),a.coercePosition(t,b,i,_,k,.75)),t[w]=y(t[w]),t[k]=y(t[k]),e[w]=T,e[k]=M}if("pixel"===x){var A=e[v];e[v]=m(e[v],!0),a.coercePosition(t,b,i,_,v,.25),t[v]=y(t[v]),e[v]=A}}c&&n.noneOrAll(e,t,["x0","x1","y0","y1"])}}t.exports=function(e,t){i(e,t,{name:"shapes",handleItemDefaults:s})}},{"../../lib":299,"../../plots/array_container_defaults":341,"../../plots/cartesian/axes":346,"./attributes":248,"./helpers":260}],252:[function(e,t,r){"use strict";var n=e("../../lib").strTranslate,a=e("../dragelement"),i=e("../dragelement/helpers"),o=i.drawMode,l=i.selectMode,s=e("../../registry"),c=e("../color"),u=e("./draw_newshape/constants"),f=u.i000,d=u.i090,p=u.i180,h=u.i270,m=e("./handle_outline").clearOutlineControllers,y=e("./draw_newshape/helpers"),g=y.pointsOnRectangle,v=y.pointsOnEllipse,x=y.writePaths,b=e("./draw_newshape/newshapes"),_=e("../selections/draw_newselection/newselections");function w(e,t){var r,n,a,i=e[t][1],o=e[t][2],l=e.length;return n=e[r=(t+1)%l][1],a=e[r][2],n===i&&a===o&&(n=e[r=(t+2)%l][1],a=e[r][2]),[r,n,a]}t.exports=function e(t,r,i,u){u||(u=0);var y=i.gd;function k(){e(t,r,i,u++),v(t[0])&&T({redrawing:!0})}function T(e){var t={};void 0!==i.isActiveShape&&(i.isActiveShape=!1,t=b(r,i)),void 0!==i.isActiveSelection&&(i.isActiveSelection=!1,t=_(r,i),y._fullLayout._reselect=!0),Object.keys(t).length&&s.call((e||{}).redrawing?"relayout":"_guiRelayout",y,t)}var M,A,S,L,C,D=y._fullLayout._zoomlayer,O=i.dragmode,P=o(O),E=l(O);((P||E)&&(y._fullLayout._outlining=!0),m(y),r.attr("d",x(t)),u||!i.isActiveShape&&!i.isActiveSelection)||(C=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){M=[];for(var r=0;r<t.length;r++){var o=t[r],l=g(o),s=!l&&v(o);M[r]=[];for(var u=o.length,m=0;m<u;m++)if("Z"!==o[m][0]&&(!s||m===f||m===d||m===p||m===h)){var x,b=l&&i.isActiveSelection;b&&(x=w(o,m));var _=o[m][1],k=o[m][2],T=e.append(b?"rect":"circle").attr("data-i",r).attr("data-j",m).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(b){var A=x[1]-_,S=x[2]-k,L=S?5:Math.max(Math.min(25,Math.abs(A)-5),5),C=A?5:Math.max(Math.min(25,Math.abs(S)-5),5);T.classed(S?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",L).attr("height",C).attr("x",_-L/2).attr("y",k-C/2).attr("transform",n(A/2,S/2))}else T.classed("cursor-grab",!0).attr("r",5).attr("cx",_).attr("cy",k);M[r][m]={element:T.node(),gd:y,prepFn:R,doneFn:I,clickFn:N},a.init(M[r][m])}}}(D.append("g").attr("class","outline-controllers")),function(){if(A=[],!t.length)return;A[0]={element:r[0][0],gd:y,prepFn:j,doneFn:B,clickFn:H},a.init(A[0])}());function R(e){S=+e.srcElement.getAttribute("data-i"),L=+e.srcElement.getAttribute("data-j"),M[S][L].moveFn=z}function z(e,r){if(t.length){var n=C[S][L][1],a=C[S][L][2],o=t[S],l=o.length;if(g(o)){var s=e,c=r;if(i.isActiveSelection)w(o,L)[1]===o[L][1]?c=0:s=0;for(var u=0;u<l;u++)if(u!==L){var f=o[u];f[1]===o[L][1]&&(f[1]=n+s),f[2]===o[L][2]&&(f[2]=a+c)}if(o[L][1]=n+s,o[L][2]=a+c,!g(o))for(var d=0;d<l;d++)for(var p=0;p<o[d].length;p++)o[d][p]=C[S][d][p]}else o[L][1]=n+e,o[L][2]=a+r;k()}}function I(){T()}function N(e,r){if(2===e){S=+r.srcElement.getAttribute("data-i"),L=+r.srcElement.getAttribute("data-j");var n=t[S];g(n)||v(n)||function(){if(t.length&&t[S]&&t[S].length){for(var e=[],r=0;r<t[S].length;r++)r!==L&&e.push(t[S][r]);e.length>1&&(2!==e.length||"Z"!==e[1][0])&&(0===L&&(e[0][0]="M"),t[S]=e,k(),T())}}()}}function F(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]=C[n][a][i+1]+e,t[n][a][i+2]=C[n][a][i+2]+r}(e,r),k()}function j(e){(S=+e.srcElement.getAttribute("data-i"))||(S=0),A[S].moveFn=F}function B(){T()}function H(e){2===e&&function(e){if(!l(e._fullLayout.dragmode))return;m(e);var t=e._fullLayout._activeSelectionIndex,r=(e.layout||{}).selections||[];if(t<r.length){for(var n=[],a=0;a<r.length;a++)a!==t&&n.push(r[a]);delete e._fullLayout._activeSelectionIndex;var i=e._fullLayout.selections[t];e._fullLayout._deselect={xref:i.xref,yref:i.yref},s.call("_guiRelayout",e,{selections:n})}}(y)}}},{"../../lib":299,"../../registry":387,"../color":158,"../dragelement":177,"../dragelement/helpers":176,"../selections/draw_newselection/newselections":244,"./draw_newshape/constants":255,"./draw_newshape/helpers":257,"./draw_newshape/newshapes":258,"./handle_outline":259}],253:[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("./display_outlines"),s=e("./handle_outline").clearOutlineControllers,c=e("../color"),u=e("../drawing"),f=e("../../plot_api/plot_template").arrayEditor,d=e("../dragelement"),p=e("../../lib/setcursor"),h=e("./constants"),m=e("./helpers"),y=m.getPathString;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&&b(e,a)}function v(e){return!!e._fullLayout._outlining}function x(e){return!e._context.edits.shapePosition}function b(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+t+'"]').remove();var r=m.makeShapesOptionsAndPlotinfo(e,t),s=r.options,b=r.plotinfo;if(s._input&&!1!==s.visible)if("below"!==s.layer)T(e._fullLayout._shapeUpperLayer);else if("paper"===s.xref||"paper"===s.yref)T(e._fullLayout._shapeLowerLayer);else{if(b._hadPlotinfo)T((b.mainplotinfo||b).shapelayer);else T(e._fullLayout._shapeLowerLayer)}function T(r){var T=y(e,s),M={"data-index":t,"fill-rule":s.fillrule,d:T},A=s.opacity,S=s.fillcolor,L=s.line.width?s.line.color:"rgba(0,0,0,0)",C=s.line.width,D=s.line.dash;C||!0!==s.editable||(C=5,D="solid");var O="Z"!==T[T.length-1],P=x(e)&&s.editable&&e._fullLayout._activeShapeIndex===t;P&&(S=O?"rgba(0,0,0,0)":e._fullLayout.activeshape.fillcolor,A=e._fullLayout.activeshape.opacity);var E,R=r.append("path").attr(M).style("opacity",A).call(c.stroke,L).call(c.fill,S).call(u.dashLine,D,C);if(_(R,e,s),(P||e._context.edits.shapePosition)&&(E=f(e.layout,"shapes",s)),P){R.style({cursor:"move"});var z={element:R.node(),plotinfo:b,gd:e,editHelpers:E,isActiveShape:!0},I=o(T,e);l(I,R,z)}else e._context.edits.shapePosition?function(e,t,r,o,l,s){var c,f,g,x,b,k,T,M,A,S,L,C,D,O,P,E,R=10,z=10,I="pixel"===r.xsizemode,N="pixel"===r.ysizemode,F="line"===r.type,j="path"===r.type,B=s.modifyItem,H=i.getFromId(e,r.xref),q=i.getRefType(r.xref),U=i.getFromId(e,r.yref),Y=i.getRefType(r.yref),V=m.getDataToPixel(e,H,!1,q),Z=m.getDataToPixel(e,U,!0,Y),G=m.getPixelToData(e,H,!1,q),W=m.getPixelToData(e,U,!0,Y),J=F?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:I?V(r.xanchor)+r.x0:V(r.x0),cy:N?Z(r.yanchor)-r.y0:Z(r.y0),r:i}).style(a).classed("cursor-grab",!0),n.append("circle").attr({"data-line-point":"end-point",cx:I?V(r.xanchor)+r.x1:V(r.x1),cy:N?Z(r.yanchor)-r.y1:Z(r.y1),r:i}).style(a).classed("cursor-grab",!0),n}():t,X={element:J.node(),gd:e,prepFn:function(n){if(v(e))return;I&&(b=V(r.xanchor));N&&(k=Z(r.yanchor));"path"===r.type?P=r.path:(c=I?r.x0:V(r.x0),f=N?r.y0:Z(r.y0),g=I?r.x1:V(r.x1),x=N?r.y1:Z(r.y1));c<g?(A=c,D="x0",S=g,O="x1"):(A=g,D="x1",S=c,O="x0");!N&&f<x||N&&f>x?(T=f,L="y0",M=x,C="y1"):(T=x,L="y1",M=f,C="y0");K(n),ee(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),X.moveFn="move"===E?Q:$,X.altKey=n.altKey},doneFn:function(){if(v(e))return;p(t),te(l),_(t,e,r),n.call("_guiRelayout",e,s.getUpdateObj())},clickFn:function(){if(v(e))return;te(l)}};function K(r){if(v(e))E=null;else if(F)E="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=X.element.getBoundingClientRect(),a=n.right-n.left,i=n.bottom-n.top,o=r.clientX-n.left,l=r.clientY-n.top,s=!j&&a>R&&i>z&&!r.shiftKey?d.getCursor(o/a,1-l/i):"move";p(t,s),E=s.split("-")[0]}}function Q(n,a){if("path"===r.type){var i=function(e){return e},o=i,s=i;I?B("xanchor",r.xanchor=G(b+n)):(o=function(e){return G(V(e)+n)},H&&"date"===H.type&&(o=m.encodeDate(o))),N?B("yanchor",r.yanchor=W(k+a)):(s=function(e){return W(Z(e)+a)},U&&"date"===U.type&&(s=m.encodeDate(s))),B("path",r.path=w(P,o,s))}else I?B("xanchor",r.xanchor=G(b+n)):(B("x0",r.x0=G(c+n)),B("x1",r.x1=G(g+n))),N?B("yanchor",r.yanchor=W(k+a)):(B("y0",r.y0=W(f+a)),B("y1",r.y1=W(x+a)));t.attr("d",y(e,r)),ee(l,r)}function $(n,a){if(j){var i=function(e){return e},o=i,s=i;I?B("xanchor",r.xanchor=G(b+n)):(o=function(e){return G(V(e)+n)},H&&"date"===H.type&&(o=m.encodeDate(o))),N?B("yanchor",r.yanchor=W(k+a)):(s=function(e){return W(Z(e)+a)},U&&"date"===U.type&&(s=m.encodeDate(s))),B("path",r.path=w(P,o,s))}else if(F){if("resize-over-start-point"===E){var u=c+n,d=N?f-a:f+a;B("x0",r.x0=I?u:G(u)),B("y0",r.y0=N?d:W(d))}else if("resize-over-end-point"===E){var p=g+n,h=N?x-a:x+a;B("x1",r.x1=I?p:G(p)),B("y1",r.y1=N?h:W(h))}}else{var v=function(e){return-1!==E.indexOf(e)},_=v("n"),q=v("s"),Y=v("w"),J=v("e"),X=_?T+a:T,K=q?M+a:M,Q=Y?A+n:A,$=J?S+n:S;N&&(_&&(X=T-a),q&&(K=M-a)),(!N&&K-X>z||N&&X-K>z)&&(B(L,r[L]=N?X:W(X)),B(C,r[C]=N?K:W(K))),$-Q>R&&(B(D,r[D]=I?Q:G(Q)),B(O,r[O]=I?$:G($)))}t.attr("d",y(e,r)),ee(l,r)}function ee(e,t){(I||N)&&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(I?t.xanchor:a.midRange(r?[t.x0,t.x1]:m.extractPathCoords(t.path,h.paramIsX))),o=Z(N?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),I&&N){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(I){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 te(e){e.selectAll(".visual-cue").remove()}d.init(X),J.node().onmousemove=K}(e,R,s,t,r,E):!0===s.editable&&R.style("pointer-events",O||c.opacity(S)*A<=.5?"stroke":"all");R.node().addEventListener("click",function(){return function(e,t){if(!x(e))return;var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void k(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=k,g(e)}}(e,R)})}}function _(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 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?e:(i[n]?e=t(e):o[n]&&(e=r(e)),n++,e)})})}function k(e){x(e)&&(e._fullLayout._activeShapeIndex>=0&&(s(e),delete e._fullLayout._activeShapeIndex,g(e)))}t.exports={draw:g,drawOne:b,eraseActiveShape:function(e){if(!x(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":299,"../../lib/setcursor":319,"../../plot_api/plot_template":335,"../../plots/cartesian/axes":346,"../../registry":387,"../color":158,"../dragelement":177,"../drawing":180,"./constants":250,"./display_outlines":252,"./draw_newshape/helpers":257,"./handle_outline":259,"./helpers":260}],254:[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":293,"../../drawing/attributes":179}],255:[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)}},{}],256:[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":158}],257:[function(e,t,r){"use strict";var n=e("parse-svg-path"),a=e("./constants"),i=a.CIRCLE_SIDES,o=a.SQRT2,l=e("../../selections/helpers"),s=l.p2r,c=l.r2p,u=[0,3,4,5,6,1,2],f=[0,3,4,1,2];function d(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=f[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,f=n(e),d=[],p=-1,h=0,m=0,y=function(){l=h,u=m};y();for(var g=0;g<f.length;g++){var v,x,b,_,w=[],k=f[g][0],T=k;switch(k){case"M":d[++p]=[],h=+f[g][1],m=+f[g][2],w.push([T,h,m]),y();break;case"Q":case"S":v=+f[g][1],b=+f[g][2],h=+f[g][3],m=+f[g][4],w.push([T,h,m,v,b]);break;case"C":v=+f[g][1],b=+f[g][2],x=+f[g][3],_=+f[g][4],h=+f[g][5],m=+f[g][6],w.push([T,h,m,v,b,x,_]);break;case"T":case"L":h=+f[g][1],m=+f[g][2],w.push([T,h,m]);break;case"H":T="L",h=+f[g][1],w.push([T,h,m]);break;case"V":T="L",m=+f[g][1],w.push([T,h,m]);break;case"A":T="L";var M=+f[g][1],A=+f[g][2];+f[g][4]||(M=-M,A=-A);var S=h-M,L=m;for(o=1;o<=i/2;o++){var C=2*Math.PI*o/i;w.push([T,S+M*Math.cos(C),L+A*Math.sin(C)])}break;case"Z":h===l&&m===u||(h=l,m=u,w.push([T,h,m]))}for(var D=(r||{}).domain,O=t._fullLayout._size,P=r&&"pixel"===r.xsizemode,E=r&&"pixel"===r.ysizemode,R=!1===a,z=0;z<w.length;z++){for(o=0;o+2<7;o+=2){var I=w[z][o+1],N=w[z][o+2];void 0!==I&&void 0!==N&&(h=I,m=N,r&&(r.xaxis&&r.xaxis.p2r?(R&&(I-=r.xaxis._offset),I=P?c(r.xaxis,r.xanchor)+I:s(r.xaxis,I)):(R&&(I-=O.l),D?I=D.x[0]+I/O.w:I/=O.w),r.yaxis&&r.yaxis.p2r?(R&&(N-=r.yaxis._offset),N=E?c(r.yaxis,r.yanchor)-N:s(r.yaxis,N)):(R&&(N-=O.t),N=D?D.y[1]-N/O.h:1-N/O.h)),w[z][o+1]=I,w[z][o+2]=N)}d[p].push(w[z].slice())}}return d},r.pointsOnRectangle=function(e){if(5!==e.length)return!1;for(var t=1;t<3;t++){if(!d(e[0][t]-e[1][t],e[3][t]-e[2][t]))return!1;if(!d(e[0][t]-e[3][t],e[1][t]-e[2][t]))return!1}return!(!d(e[0][1],e[1][1])&&!d(e[0][1],e[3][1]))&&!!(p(e[0],e[1])*p(e[0],e[3]))},r.pointsOnEllipse=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(!d(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 f=[],d=0;d<i;d++){var p=2*d*Math.PI/i;f.push([l+c*Math.cos(p),s+u*Math.sin(p)])}return f},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}},r.fixDatesForPaths=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(" ","_"));return e}},{"../../selections/helpers":245,"./constants":255,"parse-svg-path":74}],258:[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,f=o.cos45,d=o.sin45,p=e("../../selections/helpers"),h=p.p2r,m=p.r2p,y=e(".././handle_outline").clearOutline,g=e("./helpers"),v=g.readPaths,x=g.writePaths,b=g.ellipseOver,_=g.fixDatesForPaths;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,g=t.plotinfo,w=g.xaxis,k=g.yaxis,T=!!g.domain||!g.xaxis,M=!!g.domain||!g.yaxis,A=t.isActiveShape,S=t.dragmode,L=(o.layout||{}).shapes||[];if(!a(S)&&void 0!==A){var C=o._fullLayout._activeShapeIndex;if(C<L.length)switch(o._fullLayout.shapes[C].type){case"rect":S="drawrect";break;case"circle":S="drawcircle";break;case"line":S="drawline";break;case"path":var D=L[C].path||"";S="Z"===D[D.length-1]?"drawclosedpath":"drawopenpath"}}var O,P=i(S),E=v(n,o,g,A),R={editable:!0,xref:T?"paper":w._id,yref:M?"paper":k._id,layer:p.layer,opacity:p.opacity,line:{color:p.line.color,width:p.line.width,dash:p.line.dash}};if(P||(R.fillcolor=p.fillcolor,R.fillrule=p.fillrule),1===E.length&&(O=E[0]),O&&5===O.length&&"drawrect"===S)R.type="rect",R.x0=O[0][1],R.y0=O[0][2],R.x1=O[2][1],R.y1=O[2][2];else if(O&&"drawline"===S)R.type="line",R.x0=O[0][1],R.y0=O[0][2],R.x1=O[1][1],R.y1=O[1][2];else if(O&&"drawcircle"===S){R.type="circle";var z=O[l][1],I=O[s][1],N=O[c][1],F=O[u][1],j=O[l][2],B=O[s][2],H=O[c][2],q=O[u][2],U=g.xaxis&&("date"===g.xaxis.type||"log"===g.xaxis.type),Y=g.yaxis&&("date"===g.yaxis.type||"log"===g.yaxis.type);U&&(z=m(g.xaxis,z),I=m(g.xaxis,I),N=m(g.xaxis,N),F=m(g.xaxis,F)),Y&&(j=m(g.yaxis,j),B=m(g.yaxis,B),H=m(g.yaxis,H),q=m(g.yaxis,q));var V=(I+F)/2,Z=(j+H)/2,G=b({x0:V,y0:Z,x1:V+(F-I+N-z)/2*f,y1:Z+(q-B+H-j)/2*d});U&&(G.x0=h(g.xaxis,G.x0),G.x1=h(g.xaxis,G.x1)),Y&&(G.y0=h(g.yaxis,G.y0),G.y1=h(g.yaxis,G.y1)),R.x0=G.x0,R.y0=G.y0,R.x1=G.x1,R.y1=G.y1}else R.type="path",w&&k&&_(E,w,k),R.path=x(E),O=null;y(o);for(var W=t.editHelpers,J=(W||{}).modifyItem,X=[],K=0;K<L.length;K++){var Q=o._fullLayout.shapes[K];if(X[K]=Q._input,void 0!==A&&K===o._fullLayout._activeShapeIndex){var $=R;switch(Q.type){case"line":case"rect":case"circle":J("x0",$.x0),J("x1",$.x1),J("y0",$.y0),J("y1",$.y1);break;case"path":J("path",$.path)}}}return void 0===A?(X.push(R),X):W?W.getUpdateObj():{}}}}},{"../../dragelement/helpers":176,"../../selections/helpers":245,".././handle_outline":259,"./constants":255,"./helpers":257}],259:[function(e,t,r){"use strict";t.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}},{}],260:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../lib"),i=e("../../plots/cartesian/axes");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,r){var i=[];return e.match(n.segmentRE).forEach(function(e){var o=t[e.charAt(0)].drawn;if(void 0!==o){var l=e.substr(1).match(n.paramRE);if(l&&!(l.length<o)){var s=l[o],c=r?s:a.cleanNumber(s);i.push(c)}}}),i},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.makeShapesOptionsAndPlotinfo=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}},r.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return!!n?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}},r.getPathString=function(e,t){var o,l,s,c,u,f,d,p,h=t.type,m=i.getRefType(t.xref),y=i.getRefType(t.yref),g=i.getFromId(e,t.xref),v=i.getFromId(e,t.yref),x=e._fullLayout._size;if(g?"domain"===m?l=function(e){return g._offset+g._length*e}:(o=r.shapePositionToRange(g),l=function(e){return g._offset+g.r2p(o(e,!0))}):l=function(e){return x.l+x.w*e},v?"domain"===y?c=function(e){return v._offset+v._length*(1-e)}:(s=r.shapePositionToRange(v),c=function(e){return v._offset+v.r2p(s(e,!0))}):c=function(e){return x.t+x.h*(1-e)},"path"===h)return g&&"date"===g.type&&(l=r.decodeDate(l)),v&&"date"===v.type&&(c=r.decodeDate(c)),function(e,t,r){var i=e.path,o=e.xsizemode,l=e.ysizemode,s=e.xanchor,c=e.yanchor;return i.replace(n.segmentRE,function(e){var i=0,u=e.charAt(0),f=n.paramIsX[u],d=n.paramIsY[u],p=n.numParams[u],h=e.substr(1).replace(n.paramRE,function(e){return f[i]?e="pixel"===o?t(s)+Number(e):t(e):d[i]&&(e="pixel"===l?r(c)-Number(e):r(e)),++i>p&&(e="X"),e});return i>p&&(h=h.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),u+h})}(t,l,c);if("pixel"===t.xsizemode){var b=l(t.xanchor);u=b+t.x0,f=b+t.x1}else u=l(t.x0),f=l(t.x1);if("pixel"===t.ysizemode){var _=c(t.yanchor);d=_-t.y0,p=_-t.y1}else d=c(t.y0),p=c(t.y1);if("line"===h)return"M"+u+","+d+"L"+f+","+p;if("rect"===h)return"M"+u+","+d+"H"+f+"V"+p+"H"+u+"Z";var w=(u+f)/2,k=(d+p)/2,T=Math.abs(w-u),M=Math.abs(k-d),A="A"+T+","+M,S=w+T+","+k;return"M"+S+A+" 0 1,1 "+(w+","+(k-M))+A+" 0 0,1 "+S+"Z"}},{"../../lib":299,"../../plots/cartesian/axes":346,"./constants":250}],261:[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":357,"./attributes":248,"./calc_autorange":249,"./defaults":251,"./draw":253,"./draw_newshape/defaults":256}],262:[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":293,"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../../plots/animation_attributes":340,"../../plots/font_attributes":374,"../../plots/pad_attributes":379,"./constants":263}],263:[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}},{}],264:[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 f=t._visibleSteps=n.filterVisible(l);(l[o("active")]||{}).visible||(t.active=f[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":299,"../../plots/array_container_defaults":341,"./attributes":262,"./constants":263}],265:[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,f=e("./constants"),d=e("../../constants/alignment"),p=d.LINE_SPACING,h=d.FROM_TL,m=d.FROM_BR;function y(e){return f.autoMarginIdRoot+e._index}function g(e){return e._index}function v(e,t){var r=o.tester.selectAll("g."+f.labelGroupClass).data(t._visibleSteps);r.enter().append("g").classed(f.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(f.railWidth,f.gripHeight);var d=e._fullLayout._size;u.lx=d.l+d.w*t.x,u.ly=d.t+d.h*(1-t.y),"fraction"===t.lenmode?u.outerLength=Math.round(d.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*f.stepInset)/(t._stepCount-1),g=i+f.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(g/p)),u.labelHeight=s,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,t.currentvalue.visible){var v=o.tester.append("g");r.each(function(e){var r=x(v,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,v.remove()}u.height=u.currentValueTotalHeight+f.tickOffset+t.ticklen+f.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 k={y:t.y,b:u.height*m[w],t:u.height*h[w]};"fraction"===t.lenmode?(k.l=0,k.xl=t.x-t.len*h[b],k.r=0,k.xr=t.x+t.len*m[b]):(k.x=t.x,k.l=u.outerLength*h[b],k.r=u.outerLength*m[b]),a.autoMargin(e,y(t),k)}function x(e,t,r){if(t.currentvalue.visible){var n,a,i=t._dims;switch(t.currentvalue.xanchor){case"right":n=i.inputAreaLength-f.currentValueInset-i.currentValueMaxWidth,a="left";break;case"center":n=.5*i.inputAreaLength,a="middle";break;default:n=f.currentValueInset,a="left"}var s=l.ensureSingle(e,"text",f.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 d=t.steps[t.active].label,h=t._gd._fullLayout._meta;h&&(d=l.templateString(d,h)),u+=d}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),y=(i.currentValueMaxLines+1-m)*t.currentvalue.font.size*p;return c.positionText(s,n,y),s}}function b(e,t,r){l.ensureSingle(e,"rect",f.gripRectClass,function(n){n.call(M,t,e,r).style("pointer-events","all")}).attr({width:f.gripWidth,height:f.gripHeight,rx:f.gripRadius,ry:f.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",f.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",f.labelsClass),a=t._dims,i=r.selectAll("g."+f.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(f.labelGroupClass,!0),i.exit().remove(),i.each(function(e){var r=n.select(this);r.call(_,e,t),o.setTranslate(r,L(t,e.fraction),f.tickOffset+t.ticklen+t.font.size*p+f.labelOffset+a.currentValueTotalHeight)})}function k(e,t,r,n,a){var i=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[i]._index;o!==r.active&&T(e,t,r,o,!0,a)}function T(e,t,r,n,i,o){var l=r.active;r.active=n,u(e.layout,f.name,r).applyUpdate("active",n);var s=r.steps[r.active];t.call(S,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 M(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("."+f.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),s.call(i.fill,e.activebgcolor);var c=C(e,n.mouse(a)[0]);function u(){var e=l(),i=C(e,n.mouse(a)[0]);k(t,r,e,i,!1)}function d(){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]})}k(t,r,e,c,!0),e._dragging=!0,o.on("mousemove",u),o.on("touchmove",u),o.on("mouseup",d),o.on("touchend",d)}e.on("mousedown",s),e.on("touchstart",s)}function A(e,t){var r=e.selectAll("rect."+f.tickRectClass).data(t._visibleSteps),a=t._dims;r.enter().append("rect").classed(f.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,L(t,r/(t._stepCount-1))-.5*t.tickwidth,(l?f.tickOffset:f.minorTickOffset)+a.currentValueTotalHeight)})}function S(e,t,r){for(var n=e.select("rect."+f.gripRectClass),a=0,i=0;i<t._stepCount;i++)if(t._visibleSteps[i]._index===t.active){a=i;break}var o=L(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*f.gripWidth,t._dims.currentValueTotalHeight))}}function L(e,t){var r=e._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,t))}function C(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function D(e,t,r){var n=r._dims,a=l.ensureSingle(e,"rect",f.railTouchRectClass,function(n){n.call(M,t,e,r).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.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*f.railInset,a=l.ensureSingle(e,"rect",f.railRectClass);a.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}t.exports=function(e){var t=e._fullLayout,r=function(e,t){for(var r=e[f.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."+f.containerClassName).data(r.length>0?[0]:[]);function l(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),a.autoMargin(e,y(t))}if(i.enter().append("g").classed(f.containerClassName,!0).style("cursor","ew-resize"),i.exit().each(function(){n.select(this).selectAll("g."+f.groupClassName).each(l)}).remove(),0!==r.length){var s=i.selectAll("g."+f.groupClassName).data(r,g);s.enter().append("g").classed(f.groupClassName,!0),s.exit().each(l).remove();for(var c=0;c<r.length;c++){var u=r[c];v(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||T(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(D,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(S,r,!1),t.call(x,r)}(e,n.select(this),t)})}}},{"../../constants/alignment":274,"../../lib":299,"../../lib/svg_text_utils":322,"../../plot_api/plot_template":335,"../../plots/plots":380,"../color":158,"../drawing":180,"./constants":263,"@plotly/d3":20}],266:[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":262,"./constants":263,"./defaults":264,"./draw":265}],267:[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"),f=e("../../lib/svg_text_utils"),d=e("../../constants/interactions"),p=e("../../constants/alignment").OPPOSITE_SIDE,h=/ [XY][0-9]* /;t.exports={draw:function(e,t,r){var m,y=r.propContainer,g=r.propName,v=r.placeholder,x=r.traceIndex,b=r.avoid||{},_=r.attributes,w=r.transform,k=r.containerGroup,T=e._fullLayout,M=1,A=!1,S=y.title,L=(S&&S.text?S.text:"").trim(),C=S&&S.font?S.font:{},D=C.family,O=C.size,P=C.color;"title.text"===g?m="titleText":-1!==g.indexOf("axis")?m="axisTitleText":g.indexOf(!0)&&(m="colorbarTitleText");var E=e._context.edits[m];""===L?M=0:L.replace(h," % ")===v.replace(h," % ")&&(M=.2,A=!0,E||(L="")),r._meta?L=l.templateString(L,r._meta):T._meta&&(L=l.templateString(L,T._meta));var R,z=L||E;k||(k=l.ensureSingle(T._infolayer,"g","g-"+t),R=T._hColorbarMoveTitle);var I=k.selectAll("text").data(z?[0]:[]);if(I.enter().append("text"),I.text(L).attr("class",t),I.exit().remove(),!z)return k;function N(e){l.syncOrAsync([F,j],e)}function F(t){var r;return!w&&R&&(w={}),w?(r="",w.rotate&&(r+="rotate("+[w.rotate,_.x,_.y]+")"),(w.offset||R)&&(r+=s(0,(w.offset||0)-(R||0)))):r=null,t.attr("transform",r),t.style({"font-family":D,"font-size":n.round(O,2)+"px",fill:u.rgb(P),opacity:M*u.opacity(P),"font-weight":i.fontWeight}).attr(_).call(f.convertToTspans,e),i.previousPromises(e)}function j(e){var t=n.select(e.node().parentNode);if(b&&b.selection&&b.side&&L){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()),f={left:0,top:0,right:T.width,bottom:T.height},d=b.maxShift||i*(f[b.side]-u[b.side]),h=0;if(d<0)h=d;else{var m=b.offsetLeft||0,y=b.offsetTop||0;u.left-=m,u.right-=m,u.top-=y,u.bottom-=y,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(d,h)}if(h>0||d<0){var g={left:[-h,0],right:[h,0],top:[0,-h],bottom:[0,h]}[b.side];t.attr("transform",s(g[0],g[1]))}}}return I.call(N),E&&(L?I.on(".opacity",null):(M=0,A=!0,I.text(v).on("mouseover.opacity",function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)})),I.call(f.makeEditable,{gd:e}).on("edit",function(t){void 0!==x?o.call("_guiRestyle",e,g,t,x):o.call("_guiRelayout",e,g,t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(N)}).on("input",function(e){this.text(e||" ").call(f.positionText,_.x,_.y)})),I.classed("js-placeholder",A),k}}},{"../../constants/alignment":274,"../../constants/interactions":278,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../../registry":387,"../color":158,"../drawing":180,"@plotly/d3":20,"fast-isnumeric":33}],268:[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":293,"../../plot_api/edit_types":328,"../../plot_api/plot_template":335,"../../plots/font_attributes":374,"../../plots/pad_attributes":379,"../color/attributes":157}],269:[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:"◄",right:"►",up:"▲",down:"▼"}}},{}],270:[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":299,"../../plots/array_container_defaults":341,"./attributes":268,"./constants":269}],271:[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,f=e("./constants"),d=e("./scrollbox");function p(e){return e._index}function h(e,t){return+e.attr(f.menuIndexAttrName)===t._index}function m(e,t,r,n,a,i,o,l){t.active=o,c(e.layout,f.name,t).applyUpdate("active",o),"buttons"===t.type?g(e,n,null,null,t):"dropdown"===t.type&&(a.attr(f.menuIndexAttrName,"-1"),y(e,n,a,i,t),l||g(e,n,a,i,t))}function y(e,t,r,n,a){var i=l.ensureSingle(t,"g",f.headerClassName,function(e){e.style("pointer-events","all")}),s=a._dims,c=a.active,u=a.buttons[c]||f.blankHeaderOpts,d={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},p={width:s.headerWidth,height:s.headerHeight};i.call(v,a,u,e).call(A,a,d,p),l.ensureSingle(t,"text",f.headerArrowClassName,function(e){e.attr("text-anchor","end").call(o.font,a.font).text(f.arrowSymbol[a.direction])}).attr({x:s.headerWidth-f.arrowOffsetX+a.pad.l,y:s.headerHeight/2+f.textOffsetY+a.pad.t}),i.on("click",function(){r.call(S,String(h(r,a)?-1:a._index)),g(e,t,r,n,a)}),i.on("mouseover",function(){i.call(w)}),i.on("mouseout",function(){i.call(k,a)}),o.setTranslate(t,s.lx,s.ly)}function g(e,t,r,i,o){r||(r=t).attr("pointer-events","all");var s=function(e){return-1==+e.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll("g."+c).data(l.filterVisible(s)),d=u.enter().append("g").classed(c,!0),p=u.exit();"dropdown"===o.type?(d.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var h=0,y=0,g=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?y=g.headerHeight+f.gapButtonHeader:h=g.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(y=-f.gapButtonHeader+f.gapButton-g.openHeight),"dropdown"===o.type&&"left"===o.direction&&(h=-f.gapButtonHeader+f.gapButton-g.openWidth);var b={x:g.lx+h+o.pad.l,y:g.ly+y+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},T={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each(function(l,s){var c=n.select(this);c.call(v,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(k,o),u.call(_,o)})}),u.call(_,o),x?(T.w=Math.max(g.openWidth,g.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(g.openHeight,g.headerHeight)),T.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,d=a._dims,p=a.active;if(u)for(l=0,s=0;s<p;s++)l+=d.heights[s]+f.gapButton;else for(o=0,s=0;s<p;s++)o+=d.widths[s]+f.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,T):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 v(e,t,r,n){e.call(x,t).call(b,t,r,n)}function x(e,t){l.ensureSingle(e,"rect",f.itemRectClassName,function(e){e.attr({rx:f.rx,ry:f.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",f.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."+f.itemRectClassName).call(i.fill,f.activeColor)})}function w(e){e.select("rect."+f.itemRectClassName).call(i.fill,f.hoverColor)}function k(e,t){e.select("rect."+f.itemRectClassName).call(i.fill,t.bgcolor)}function T(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."+f.dropdownButtonClassName).data(l.filterVisible(t.buttons));i.enter().append("g").classed(f.dropdownButtonClassName,!0);var c=-1!==["up","down"].indexOf(t.direction);i.each(function(a,i){var l=n.select(this);l.call(v,t,a,e);var d=l.select("."+f.itemTextClassName),p=d.node()&&o.bBox(d.node()).width,h=Math.max(p+f.textPadX,f.minWidth),m=t.font.size*u,y=s.lineCount(d),g=Math.max(m*y,f.minHeight)+f.textOffsetY;g=Math.ceil(g),h=Math.ceil(h),r.widths[i]=h,r.heights[i]=g,r.height1=Math.max(r.height1,g),r.width1=Math.max(r.width1,h),c?(r.totalWidth=Math.max(r.totalWidth,h),r.openWidth=r.totalWidth,r.totalHeight+=g+f.gapButton,r.openHeight+=g+f.gapButton):(r.totalWidth+=h+f.gapButton,r.openWidth+=h+f.gapButton,r.totalHeight=Math.max(r.totalHeight,g),r.openHeight=r.totalHeight)}),c?r.totalHeight-=f.gapButton:r.totalWidth-=f.gapButton,r.headerWidth=r.width1+f.arrowPadX,r.headerHeight=r.height1,"dropdown"===t.type&&(c?(r.width1+=f.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=f.arrowPadX),i.remove();var d=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-=d,m="right"),l.isCenterAnchor(t)&&(r.lx-=d/2,m="center");var y="top";l.isBottomAnchor(t)&&(r.ly-=p,y="bottom"),l.isMiddleAnchor(t)&&(r.ly-=p/2,y="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,M(t),{x:t.x,y:t.y,l:d*({right:1,center:.5}[m]||0),r:d*({left:1,center:.5}[m]||0),b:p*({top:1,middle:.5}[y]||0),t:p*({bottom:1,middle:.5}[y]||0)})}function M(e){return f.autoMarginIdRoot+e._index}function A(e,t,r,n){n=n||{};var a=e.select("."+f.itemRectClassName),i=e.select("."+f.itemTextClassName),l=t.borderwidth,c=r.index,d=t._dims;o.setTranslate(e,l+r.x,l+r.y);var p=-1!==["up","down"].indexOf(t.direction),h=n.height||(p?d.heights[c]:d.height1);a.attr({x:0,y:0,width:n.width||(p?d.width1:d.widths[c]),height:h});var m=t.font.size*u,y=(s.lineCount(i)-1)*m/2;s.positionText(i,f.textOffsetX,h/2-y+f.textOffsetY),p?r.y+=d.heights[c]+r.yPad:r.x+=d.widths[c]+r.xPad,r.index++}function S(e,t){e.attr(f.menuIndexAttrName,t||"-1").selectAll("g."+f.dropdownButtonClassName).remove()}t.exports=function(e){var t=e._fullLayout,r=l.filterVisible(t[f.name]);function i(t){a.autoMargin(e,M(t))}var o=t._menulayer.selectAll("g."+f.containerClassName).data(r.length>0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each(function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(i)}).remove(),0!==r.length){var s=o.selectAll("g."+f.headerGroupClassName).data(r,p);s.enter().append("g").classed(f.headerGroupClassName,!0);for(var c=l.ensureSingle(o,"g",f.dropdownButtonGroupClassName,function(e){e.style("pointer-events","all")}),u=0;u<r.length;u++){var v=r[u];T(e,v)}var x="updatemenus"+t._uid,b=new d(e,c,x);s.enter().size()&&(c.node().parentNode.appendChild(c.node()),c.call(S)),s.exit().each(function(e){c.call(S),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?(y(e,r,c,b,t),h(c,t)&&g(e,r,c,b,t)):g(e,r,null,null,t)})}}},{"../../constants/alignment":274,"../../lib":299,"../../lib/svg_text_utils":322,"../../plot_api/plot_template":335,"../../plots/plots":380,"../color":158,"../drawing":180,"./constants":269,"./scrollbox":273,"@plotly/d3":20}],272:[function(e,t,r){arguments[4][266][0].apply(r,arguments)},{"./attributes":268,"./constants":269,"./defaults":270,"./draw":271,dup:266}],273:[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,f,d,p,h=this.position.l,m=this.position.w,y=this.position.t,g=this.position.h,v=this.position.direction,x="down"===v,b="left"===v,_="up"===v,w=m,k=g;x||b||"right"===v||_||(this.position.direction="down",x=!0),x||_?(f=(u=h)+w,x?(d=y,k=(p=Math.min(d+k,c))-d):k=(p=y+k)-(d=Math.max(p-k,0))):(p=(d=y)+k,b?w=(f=h+w)-(u=Math.max(f-w,0)):(u=h,w=(f=Math.min(u+w,s))-u)),this._box={l:u,t:d,w:w,h:k};var T=m>w,M=l.barLength+2*l.barPad,A=l.barWidth+2*l.barPad,S=h,L=y+g;L+A>c&&(L=c-A);var C=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,l.barColor),T?(this.hbar=C.attr({rx:l.barRadius,ry:l.barRadius,x:S,y:L,width:M,height:A}),this._hbarXMin=S+M/2,this._hbarTranslateMax=w-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var D=g>k,O=l.barWidth+2*l.barPad,P=l.barLength+2*l.barPad,E=h+m,R=y;E+O>s&&(E=s-O);var z=this.container.selectAll("rect.scrollbar-vertical").data(D?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,l.barColor),D?(this.vbar=z.attr({rx:l.barRadius,ry:l.barRadius,x:E,y:R,width:O,height:P}),this._vbarYMin=R+P/2,this._vbarTranslateMax=k-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var I=this.id,N=u-.5,F=D?f+O+.5:f+.5,j=d-.5,B=T?p+A+.5:p+.5,H=o._topdefs.selectAll("#"+I).data(T||D?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",I).append("rect"),T||D?(this._clipRect=H.select("rect").attr({x:Math.floor(N),y:Math.floor(j),width:Math.ceil(F)-Math.floor(N),height:Math.ceil(B)-Math.floor(j)}),this.container.call(i.setClipUrl,I,this.gd),this.bg.attr({x:h,y:y,width:m,height:g})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),T||D){var q=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(q);var U=n.behavior.drag().on("dragstart",function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(U),D&&this.vbar.on(".drag",null).call(U)}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":299,"../color":158,"../drawing":180,"@plotly/d3":20}],274:[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"}}},{}],275:[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(" ")}}},{}],276:[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"}},{}],277:[function(e,t,r){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],278:[function(e,t,r){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],279:[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:1-1e-6,LOG_CLIP:10,MINUS_SIGN:""}},{}],280:[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}},{}],281:[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/selections"),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":149,"./components/annotations3d":154,"./components/colorbar":164,"./components/colorscale":170,"./components/errorbars":186,"./components/fx":198,"./components/grid":202,"./components/images":207,"./components/legend":215,"./components/modebar":221,"./components/rangeselector":229,"./components/rangeslider":236,"./components/selections":246,"./components/shapes":261,"./components/sliders":266,"./components/updatemenus":272,"./fonts/ploticon":282,"./locale-en":326,"./locale-en-us":325,"./plot_api":330,"./plot_api/plot_schema":334,"./plots/plots":380,"./registry":387,"./snapshot":392,"./traces/scatter":521,"./version":561,"native-promise-only":72}],282:[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-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' 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-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}},{}],283:[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}},{}],284:[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 f(e,t,r,n,a,i,c){a=a||0,i=i||0;var u,f,d,p,h,m=s([r,n]);function y(e,t){return[e*Math.cos(t)+a,i-e*Math.sin(t)]}m?(u=0,f=o,d=l):r<n?(u=r,d=n):(u=n,d=r),e<t?(p=e,h=t):(p=t,h=e);var g,v=Math.abs(d-u)<=o?0:1;function x(e,t,r){return"A"+[e,e]+" "+[0,v,r]+" "+y(e,t)}return m?g=null===p?"M"+y(h,u)+x(h,f,0)+x(h,d,0)+"Z":"M"+y(p,u)+x(p,f,0)+x(p,d,0)+"ZM"+y(h,u)+x(h,f,1)+x(h,d,1)+"Z":null===p?(g="M"+y(h,u)+x(h,d,0),c&&(g+="L0,0Z")):g="M"+y(p,u)+"L"+y(h,u)+x(h,d,0)+"L"+y(p,d)+x(p,u,1)+"Z",g}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 f(null,e,t,r,n,a,0)},pathSector:function(e,t,r,n,a){return f(null,e,t,r,n,a,1)},pathAnnulus:function(e,t,r,n,a,i){return f(e,t,r,n,a,i,1)}}},{"./mod":306}],285:[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,f=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,f?e!==a.constructor&&(e=!1):e=a.constructor),f+=o);if(!f)return[];if(!c.length)return t;if(u)return t.concat.apply(t,c);if(e){for((l=new e(f)).set(t),r=0;r<c.length;r++)a=c[r],l.set(a,i),i+=a.length;return l}for(l=new Array(f),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)}},{}],286:[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":279,"fast-isnumeric":33}],287:[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})})}},{}],288:[function(e,t,r){"use strict";t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},{}],289:[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,f=e("./mod").modHalf,d=e("./array").isArrayOrTypedArray;function p(e,t){var n=r.valObjectMeta[t.valType];if(t.arrayOk&&d(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){d(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(f(+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(-1===(n.extras||[]).indexOf(e))if("string"==typeof 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(r);else t.set(e)}},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,f,d,p=a.items,h=[],m=Array.isArray(p),y=m&&o&&Array.isArray(p[0]),g=o&&m&&!y,v=m&&!g?p.length:e.length;if(n=Array.isArray(n)?n:[],o)for(l=0;l<v;l++)for(h[l]=[],c=Array.isArray(e[l])?e[l]:[],f=g?p.length:m?p[l].length:c.length,s=0;s<f;s++)u=g?p[s]:m?p[l][s]:p,void 0!==(d=i(c[s],u,(n[l]||[])[s]))&&(h[l][s]=d);else for(l=0;l<v;l++)void 0!==(d=i(e[l],m?p[l]:p,n[l]))&&(h[l]=d);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(),f=t._template;if(void 0===u&&f&&(u=c(f,a).get(),f=0),void 0===i&&(i=o.dflt),o.arrayOk&&d(u))return s.set(u),u;var h=r.valObjectMeta[o.valType].coerceFunction;h(u,s,i,o);var m=s.get();return f&&m===i&&!p(u,o)&&(h(u=c(f,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)d(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":158,"../components/colorscale/scales":173,"../constants/interactions":278,"../plots/attributes":342,"./array":285,"./mod":306,"./nested_property":307,"./regex":315,"fast-isnumeric":33,tinycolor2:122}],290:[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,f=c.ONEDAY,d=c.ONEHOUR,p=c.ONEMIN,h=c.ONESEC,m=c.EPOCHJD,y=e("../registry"),g=e("d3-time-format").utcFormat,v=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,b=(new Date).getFullYear()-70;function _(e){return e&&y.componentsRegistry.calendars&&"string"==typeof e&&"gregorian"!==e}function w(e,t){return String(e+Math.pow(10,t)).substr(1)}r.dateTick0=function(e,t){var n=function(e,t){return _(e)?t?y.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:y.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}(e,!!t);if(t<2)return n;var a=r.dateTime2ms(n,e);return a+=f*(t-1),r.ms2DateTime(a,0,e)},r.dfltRange=function(e){return _(e)?y.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),g=e.charAt(0);!c||"G"!==g&&"g"!==g||(e=e.substr(1),t="");var w=c&&"chinese"===t.substr(0,7),k=e.match(w?x:v);if(!k)return u;var T=k[1],M=k[3]||"1",A=Number(k[5]||1),S=Number(k[7]||0),L=Number(k[9]||0),C=Number(k[11]||0);if(c){if(2===T.length)return u;var D;T=Number(T);try{var O=y.getComponentMethod("calendars","getCal")(t);if(w){var P="i"===M.charAt(M.length-1);M=parseInt(M,10),D=O.newDate(T,O.toMonthIndex(T,M,P),A)}else D=O.newDate(T,Number(M),A)}catch(e){return u}return D?(D.toJD()-m)*f+S*d+L*p+C*h:u}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),M-=1;var E=new Date(Date.UTC(2e3,M,A,S,L));return E.setUTCFullYear(T),E.getUTCMonth()!==M?u:E.getUTCDate()!==A?u:E.getTime()+C*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 k=90*f,T=3*d,M=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,v,x,b=Math.floor(10*s(e+.05,1)),w=Math.round(e-b/10);if(_(r)){var S=Math.floor(w/f)+m,L=Math.floor(s(e,f));try{i=y.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(e){i=g("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=t<k?Math.floor(L/d):0,l=t<k?Math.floor(L%d/p):0,c=t<T?Math.floor(L%p/h):0,v=t<M?L%h*10+b:0}else x=new Date(w),i=g("%Y-%m-%d")(x),o=t<k?x.getUTCHours():0,l=t<k?x.getUTCMinutes():0,c=t<T?x.getUTCSeconds():0,v=t<M?10*x.getUTCMilliseconds()+b:0;return A(i,o,l,c,v)},r.ms2DateTimeLocal=function(e){if(!(e>=n+f&&e<=a-f))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 S=/%\d?f/g,L=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function D(e,t,r,n){e=e.replace(S,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(L,function(){return C[r("%q")(a)]}),_(n))try{e=y.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,f),n=w(Math.floor(r/d),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"+D(i.dayMonthYear,e,n,a);t=i.dayMonth+"\n"+i.year}return D(t,e,n,a)};var P=3*f;r.incrementMonth=function(e,t,r){r=_(r)&&r;var n=s(e,f);if(e=Math.round(e-n),r)try{var a=Math.round(e/f)+m,i=y.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)*f+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)&&y.getComponentMethod("calendars","getCal")(t),u=0;u<e.length;u++)if(n=e[u],o(n)){if(!(n%f))if(c)try{1===(r=c.fromJD(n/f+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 d=e.length-s;return{exactYears:a/d,exactMonths:i/d,exactDays:l/d}}},{"../constants/numerical":279,"../registry":387,"./loggers":303,"./mod":306,"d3-time-format":30,"fast-isnumeric":33}],291:[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=[];f(e);)t.push(e),e=e.parentNode;return t}function f(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":303,"./matrix":305,"@plotly/d3":20,"gl-mat4":49}],292:[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:27}],293:[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,f,d,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)||(f=a(u)))?(f?(f=!1,d=c&&a(c)?c:[]):d=c&&n(c)?c:{},p[s]=i([d,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":300}],294:[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}},{}],295:[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}},{}],296:[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,f=n-t,d=i-t,p=l-i,h=s*p-u*f;if(0===h)return null;var m=(c*p-u*d)/h,y=(c*f-s*d)/h;return y<0||y>1||m<0||m>1?null:{x:e+s*m,y:t+f*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,f=n-t,d=o-a,p=c-i,h=u*u+f*f,m=d*d+p*p,y=Math.min(s(u,f,h,a-e,i-t),s(u,f,h,o-e,c-t),s(d,p,m,e-a,t-i),s(d,p,m,r-a,n-i));return Math.sqrt(y)},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)),f=e.getPointAtLength(o(r,t)),d={x:(4*f.x+s.x+c.x)/6,y:(4*f.y+s.y+c.y)/6,theta:u};return n[r]=d,d},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(),f=u;function d(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,f=r.y<l?l-r.y:r.y>s?r.y-s:0;return Math.sqrt(c*c+f*f)}for(var p=d(c);p;){if((c+=p+r)>f)return;p=d(c)}for(p=d(f);p;){if(c>(f-=p+r))return;p=d(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===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,f=0,d=0,p=l;f<c;){if(a=(d+p)/2,o=(i=e.getPointAtLength(a))[r]-t,Math.abs(o)<s)return i;u*o>0?p=a:d=a,f++}return i}},{"./mod":306}],297:[function(e,t,r){"use strict";t.exports=function(e){return e}},{}],298:[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}},{}],299:[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,f=t.exports={};f.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 d={};f.warnBadFormat=function(e){var t=String(e);d[t]||(d[t]=1,f.warn('encountered bad format: "'+t+'"'))},f.noFormat=function(e){return String(e)},f.numberFormat=function(e){var t;try{t=i(f.adjustFormat(e))}catch(t){return f.warnBadFormat(e),f.noFormat}return t},f.nestedProperty=e("./nested_property"),f.keyedContainer=e("./keyed_container"),f.relativeAttr=e("./relative_attr"),f.isPlainObject=e("./is_plain_object"),f.toLogRange=e("./to_log_range"),f.relinkPrivateKeys=e("./relink_private");var p=e("./array");f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var h=e("./mod");f.mod=h.mod,f.modHalf=h.modHalf;var m=e("./coerce");f.valObjectMeta=m.valObjectMeta,f.coerce=m.coerce,f.coerce2=m.coerce2,f.coerceFont=m.coerceFont,f.coercePattern=m.coercePattern,f.coerceHoverinfo=m.coerceHoverinfo,f.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,f.validate=m.validate;var y=e("./dates");f.dateTime2ms=y.dateTime2ms,f.isDateTime=y.isDateTime,f.ms2DateTime=y.ms2DateTime,f.ms2DateTimeLocal=y.ms2DateTimeLocal,f.cleanDate=y.cleanDate,f.isJSDate=y.isJSDate,f.formatDate=y.formatDate,f.incrementMonth=y.incrementMonth,f.dateTick0=y.dateTick0,f.dfltRange=y.dfltRange,f.findExactDates=y.findExactDates,f.MIN_MS=y.MIN_MS,f.MAX_MS=y.MAX_MS;var g=e("./search");f.findBin=g.findBin,f.sorterAsc=g.sorterAsc,f.sorterDes=g.sorterDes,f.distinctVals=g.distinctVals,f.roundUp=g.roundUp,f.sort=g.sort,f.findIndexOfMin=g.findIndexOfMin,f.sortObjectKeys=e("./sort_object_keys");var v=e("./stats");f.aggNums=v.aggNums,f.len=v.len,f.mean=v.mean,f.median=v.median,f.midRange=v.midRange,f.variance=v.variance,f.stdev=v.stdev,f.interp=v.interp;var x=e("./matrix");f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=e("./angles");f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=e("./anchor_utils");f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=e("./geometry2d");f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var k=e("./extend");f.extendFlat=k.extendFlat,f.extendDeep=k.extendDeep,f.extendDeepAll=k.extendDeepAll,f.extendDeepNoArrays=k.extendDeepNoArrays;var T=e("./loggers");f.log=T.log,f.warn=T.warn,f.error=T.error;var M=e("./regex");f.counterRegex=M.counter;var A=e("./throttle");f.throttle=A.throttle,f.throttleDone=A.done,f.clearThrottle=A.clear;var S=e("./dom");function L(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}f.getGraphDiv=S.getGraphDiv,f.isPlotDiv=S.isPlotDiv,f.removeElement=S.removeElement,f.addStyleRule=S.addStyleRule,f.addRelatedStyleRule=S.addRelatedStyleRule,f.deleteRelatedStyleRule=S.deleteRelatedStyleRule,f.getFullTransformMatrix=S.getFullTransformMatrix,f.getElementTransformMatrix=S.getElementTransformMatrix,f.getElementAndAncestors=S.getElementAndAncestors,f.equalDomRects=S.equalDomRects,f.clearResponsive=e("./clear_responsive"),f.preserveDrawingBuffer=e("./preserve_drawing_buffer"),f.makeTraceGroups=e("./make_trace_groups"),f._=e("./localize"),f.notifier=e("./notifier"),f.filterUnique=e("./filter_unique"),f.filterVisible=e("./filter_visible"),f.pushUnique=e("./push_unique"),f.increment=e("./increment"),f.cleanNumber=e("./clean_number"),f.ensureNumber=function(e){return o(e)?(e=Number(e))>s||e<c?u:e:u},f.isIndex=function(e,t){return!(void 0!==t&&e>=t)&&(o(e)&&e>=0&&e%1==0)},f.noop=e("./noop"),f.identity=e("./identity"),f.repeat=function(e,t){for(var r=new Array(t),n=0;n<t;n++)r[n]=e;return r},f.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=f.nestedProperty(e,i.replace("?",r)),l=f.nestedProperty(e,i.replace("?",n)),s=o.get();o.set(l.get()),l.set(s)}},f.raiseToTop=function(e){e.parentNode.appendChild(e)},f.cancelTransition=function(e){return e.transition().duration(0)},f.constrain=function(e,t,r){return t>r?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},f.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},f.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},f.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?(f.warn("randstr failed uniqueness"),s):e(t,r,n,(a||0)+1):s},f.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},f.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},f.syncOrAsync=function(e,t,r){var n;function a(){return f.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)},f.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},f.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]]}},f.mergeArray=function(e,t,r,n){var a="function"==typeof n;if(f.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}},f.mergeArrayCastPositive=function(e,t,r){return f.mergeArray(e,t,r,function(e){var t=+e;return isFinite(t)&&t>0?t:0})},f.fillArray=function(e,t,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(e))for(var a=0;a<t.length;a++)t[a][r]=n(e[a])},f.castOption=function(e,t,r,n){n=n||f.identity;var a=f.nestedProperty(e,r).get();return f.isArrayOrTypedArray(a)?Array.isArray(t)&&f.isArrayOrTypedArray(a[t[0]])?n(a[t[0]][t[1]]):n(a[t]):a},f.extractOption=function(e,t,r,n){if(r in e)return e[r];var a=f.nestedProperty(t,n).get();return Array.isArray(a)?void 0:a},f.tagSelected=function(e,t,r){var n,a,i=t.selectedpoints,o=t._indexToPoints;o&&(n=L(o));for(var l=0;l<i.length;l++){var s=i[l];if(f.isIndex(s)||f.isArrayOrTypedArray(s)&&f.isIndex(s[0])&&f.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)}}},f.selIndices2selPoints=function(e){var t=e.selectedpoints,r=e._indexToPoints;if(r){for(var n=L(r),a=[],i=0;i<t.length;i++){var o=t[i];if(f.isIndex(o)){var l=n[o];f.isIndex(l)&&a.push(l)}}return a}return t},f.getTargetArray=function(e,t){var r=t.target;if("string"==typeof r&&r){var n=f.nestedProperty(e,r).get();return!!Array.isArray(n)&&n}return!!Array.isArray(r)&&r},f.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):f.isTypedArray(i)?r[a]=i.subarray(0,3):r[a]=i&&"object"==typeof i?f.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},f.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},f.containsAny=function(e,t){for(var r=0;r<t.length;r++)if(-1!==e.indexOf(t[r]))return!0;return!1},f.isIE=function(){return void 0!==window.navigator.msSaveBlob};var C=/Version\/[\d\.]+.*Safari/;f.isSafari=function(){return C.test(window.navigator.userAgent)};var D=/iPad|iPhone|iPod/;f.isIOS=function(){return D.test(window.navigator.userAgent)};var O=/Firefox\/(\d+)\.\d+/;f.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},f.isD3Selection=function(e){return e instanceof n.selection},f.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},f.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},f.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=/^([^\[\.]+)\.(.+)?/,E=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;f.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]=f.extendDeepNoArrays(e[n]||{},f.objectFromPath(r,f.expandObjectPaths(a))[n])):(t=r.match(E))?(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]||{},f.extendDeepNoArrays(o,f.objectFromPath(l,f.expandObjectPaths(a)))):e[n][i]=f.expandObjectPaths(a)):e[r]=f.expandObjectPaths(e[r]));return e},f.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},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var R=/^\w*$/;f.templateString=function(e,t){var r={};return e.replace(f.TEMPLATE_STRING_REGEX,function(e,n){var a;return R.test(n)?a=t[n]:(r[n]=r[n]||f.nestedProperty(t,n).get,a=r[n]()),f.isValidTextValue(a)?a:""})};var z={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return F.apply(z,arguments)};var I={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return F.apply(I,arguments)};var N=/^[:|\|]/;function F(e,t,r){var n=this,i=arguments;t||(t={});var o={};return e.replace(f.TEMPLATE_STRING_REGEX,function(e,l,s){var c,u,d,p="_xother"===l||"_yother"===l,h="_xother_"===l||"_yother_"===l,m="xother_"===l||"yother_"===l,y="xother"===l||"yother"===l||p||m||h,g=l;if((p||h)&&(g=g.substring(1)),(m||h)&&(g=g.substring(0,g.length-1)),y){if(void 0===(c=t[g]))return""}else for(d=3;d<i.length;d++)if(u=i[d]){if(u.hasOwnProperty(g)){c=u[g];break}if(R.test(g)||(c=f.nestedProperty(u,g).get(),(c=o[g]||f.nestedProperty(u,g).get())&&(o[g]=c)),void 0!==c)break}if(void 0===c&&n)return n.count<n.max&&(f.warn("Variable '"+g+"' in "+n.name+" could not be found!"),c=e),n.count===n.max&&f.warn("Too many "+n.name+" warnings - additional warnings will be suppressed"),n.count++,e;if(s){var v;if(":"===s[0]&&(c=(v=r?r.numberFormat:f.numberFormat)(s.replace(N,""))(c)),"|"===s[0]){v=r?r.timeFormat:a;var x=f.dateTime2ms(c);c=f.formatDate(x,s.replace(N,""),!1,v)}}else{var b=g+"Label";t.hasOwnProperty(b)&&(c=t[b])}return y&&(c="("+c+")",(p||h)&&(c=" "+c),(m||h)&&(c+=" ")),c})}f.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;f.seedPseudoRandom=function(){j=2e9},f.pseudoRandom=function(){var e=j;return j=(69069*j+1)%4294967296,Math.abs(j-e)<429496729?f.pseudoRandom():j/4294967296},f.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},a=f.extractOption(e,t,"htx","hovertext");if(f.isValidTextValue(a))return n(a);var i=f.extractOption(e,t,"tx","text");return f.isValidTextValue(i)?n(i):void 0},f.isValidTextValue=function(e){return e||0===e},f.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},f.isHidden=function(e){var t=window.getComputedStyle(e).display;return!t||"none"===t},f.strTranslate=function(e,t){return e||t?"translate("+e+","+t+")":""},f.strRotate=function(e){return e?"rotate("+e+")":""},f.strScale=function(e){return 1!==e?"scale("+e+")":""},f.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,f.strTranslate(a-c*(r+o),i-c*(n+l))+f.strScale(c)+(s?"rotate("+s+(t?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(e,t){e.attr("transform",f.getTextTransform(t)),e.style("display",t.scale?null:"none")},f.ensureUniformFontSize=function(e,t){var r=f.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},f.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)},f.bigFont=function(e){return Math.round(1.2*e)};var B=f.getFirefoxVersion(),H=null!==B&&B<86;f.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{"../constants/numerical":279,"./anchor_utils":283,"./angles":284,"./array":285,"./clean_number":286,"./clear_responsive":288,"./coerce":289,"./dates":290,"./dom":291,"./extend":293,"./filter_unique":294,"./filter_visible":295,"./geometry2d":296,"./identity":297,"./increment":298,"./is_plain_object":300,"./keyed_container":301,"./localize":302,"./loggers":303,"./make_trace_groups":304,"./matrix":305,"./mod":306,"./nested_property":307,"./noop":308,"./notifier":309,"./preserve_drawing_buffer":312,"./push_unique":313,"./regex":315,"./relative_attr":316,"./relink_private":317,"./search":318,"./sort_object_keys":320,"./stats":321,"./throttle":323,"./to_log_range":324,"@plotly/d3":20,"d3-format":29,"d3-time-format":30,"fast-isnumeric":33}],300:[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")}},{}],301:[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 f=a.test(i),d={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!==(f?l[o][i]:n(l[o],i).get())&&(a|=2);var p=l[o]=l[o]||{};return p[r]=e,f?p[i]=t:n(p,i).set(t),null!==t&&(a&=-5),c[o]=c[o]|a,d},get:function(e){if(l){var t=u[e];return void 0===t?void 0:f?l[t][i]:n(l[t],i).get()}},rename:function(e,t){var n=u[e];return void 0===n?d:(c[n]=1|c[n],u[t]=n,delete u[e],l[n][r]=t,d)},remove:function(e){var t=u[e];if(void 0===t)return d;var a=l[t];if(Object.keys(a).length>2)return c[t]=2|c[t],d.set(e,null);if(f){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 d},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]=f?4&c[a]?null:l[a][i]:4&c[a]?null:n(l[a],i).get())):o[e]=null;return o}};return d}},{"./nested_property":307}],302:[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":387}],303:[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":333,"./notifier":309}],304:[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":20}],305:[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":49}],306:[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}}},{}],307:[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,d="",p=[[e,d]],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(!f(s,i,t[o+1],h))break;if("object"!=typeof(s=s[i])||null===s)throw"container is not an object";d=c(d,i),p.push([s,d])}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,d=n.replace("-1",0),p=!o&&l(r,d),h=t[0];for(i=0;i<e.length;i++)d=n.replace("-1",i),o&&(p=l(u=r[i%r.length],d)),p&&(c=!1),f(e,i,h,p)&&s(e[i],t,n.replace("-1",i))(u);return c}function f(e,t,r,n){if(void 0===e[t]){if(n)return!1;e[t]="number"==typeof r?[]:{}}return!0}},{"./array":285,"fast-isnumeric":33}],308:[function(e,t,r){"use strict";t.exports=function(){}},{}],309:[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("&times;").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":20,"fast-isnumeric":33}],310:[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":319}],311:[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[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||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,f=r[0];for(t=1;t<r.length;t++)if(f[0]!==r[t][0]||f[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,f,d,p,h,m=r.length,y=r[0][0],g=r[0][1],v=0;for(u=1;u<m;u++)if(f=y,d=g,y=r[u][0],g=r[u][1],!(s<(p=Math.min(f,y))||s>Math.max(f,y)||c>Math.max(d,g)))if(c<Math.min(d,g))s!==p&&v++;else{if(c===(h=y===f?c:d+(s-f)*(g-d)/(y-f)))return 1!==u||!t;c<=h&&s!==p&&v++}return v%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),f=Math.sqrt(u),d=[-c[1]/f,c[0]/f];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,d))>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":279,"./matrix":305}],312:[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":33,"is-mobile":69}],313:[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}},{}],314:[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":299,"../plot_api/plot_config":333}],315:[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)}},{}],316:[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}},{}],317:[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":285,"./is_plain_object":300}],318:[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,f=0,d=t.length,p=0,h=d>1?(t[d-1]-t[0])/(d-1):1;for(o=h>=0?r?l:s:r?u:c,e+=1e-9*h*(r?-1:1)*(h>=0?1:-1);f<d&&p++<100;)o(t[i=Math.floor((f+d)/2)],e)?f=i+1:d=i;return p>90&&a.log("Long binary search..."),f-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],f=u-a;void 0===a?(s.push(u),a=u):f>l&&(i=Math.min(i,f),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":279,"./identity":297,"./loggers":303,"fast-isnumeric":33}],319:[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)}},{}],320:[function(e,t,r){"use strict";t.exports=function(e){return Object.keys(e).sort()}},{}],321:[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":285,"fast-isnumeric":33}],322:[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,y){var S=e.text(),L=!e.attr("data-notex")&&t&&t._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(s),O=n.select(e.node().parentNode);if(!O.empty()){var P=e.attr("class")?e.attr("class").split(" ")[0]:"text";return P+="-math",O.selectAll("svg."+P).remove(),O.selectAll("g."+P+"-group").remove(),e.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),L?(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,d=parseInt((MathJax.version||"").split(".")[0]);if(2!==d&&3!==d)return void a.warn("No MathJax version:",MathJax.version);var p=function(){var r="math-output-"+a.randstr({},64),i=(s=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===d?MathJax.Hub.Typeset(i):MathJax.typeset([i])},h=function(){var t=s.select(2===d?".MathJax_SVG":".MathJax"),i=!t.empty()&&s.select("svg").node();if(i){var o,l=i.getBoundingClientRect();o=2===d?n.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),r(t,o,l)}else a.log("There was an error in the tex syntax.",e),r();s.remove()};2===d?MathJax.Hub.Queue(function(){o=a.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0);return MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:f},displayAlign:"left"})},function(){if("SVG"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},p,h,function(){if("SVG"!==i)return MathJax.Hub.setRenderer(i)},function(){void 0!==l&&(MathJax.Hub.processSectionDelay=l);return MathJax.Hub.Config(o)}):3===d&&(!function(){o=a.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={});MathJax.config.tex.inlineMath=f}(),"svg"!==(i=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){p(),h(),"svg"!==i&&(MathJax.config.startup.output=i),MathJax.config=o}))}(L[2],o,function(n,a,o){O.selectAll("svg."+P).remove(),O.selectAll("g."+P+"-group").remove();var l=n&&n.select("svg");if(!l||!l.node())return E(),void t();var s=O.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"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:P,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=e.node().style.fill||"black",d=l.select("g");d.attr({fill:f,stroke:f});var p=d.node().getBoundingClientRect(),h=p.width,m=p.height;(h>c||m>u)&&(l.style("overflow","hidden"),h=(p=l.node().getBoundingClientRect()).width,m=p.height);var g=+e.attr("x"),v=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===P[0])s.attr({transform:"rotate("+[-90,g,v]+")"+i(-h/2,x-m/2)});else if("l"===P[0])v=x-m/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))g=0,v=x;else{var b=e.attr("text-anchor");g-=h*("middle"===b?.5:"end"===b?1:0),v=v+x-m/2}l.attr({x:g,y:v}),y&&y.call(e,s),t(s)})})):E(),e}function E(){O.empty()||(P=e.attr("class")+"-math",O.select("svg."+P).remove()),e.text("").style("white-space","pre"),function(e,t){t=t.replace(g," ");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++)f(a[i])}function f(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 f=document.createElementNS(o.svg,t);if("sup"===a||"sub"===a){y(r,m),r.appendChild(f);var d=document.createElementNS(o.svg,"tspan");y(d,m),n.select(d).attr("dy",h[a]),i.dy=p[a],r.appendChild(f),r.appendChild(d)}else r.appendChild(f);n.select(f).attr(i),r=e.node=f,s.push(e)}function y(e,t){e.appendChild(document.createTextNode(t))}function S(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)}b.test(t)?u():(r=e,s=[{node:e}]);for(var L=t.split(v),O=0;O<L.length;O++){var P=L[O],E=P.match(x),R=E&&E[2].toLowerCase(),z=d[R];if("br"===R)u();else if(void 0===z)y(r,C(P));else if(E[1])S(R);else{var I=E[4],N={type:R},F=M(I,_);if(F?(F=F.replace(A,"$1 fill:"),z&&(F+=";"+z)):z&&(F=z),F&&(N.style=F),"a"===R){i=!0;var j=M(I,w);if(j){var B=D(j);B&&(N.href=B,N.target=M(I,k)||"_blank",N.popup=M(I,T))}}f(N)}}return i}(e.node(),S)&&e.style("pointer-events","all"),r.positionText(e),y&&y.call(e)}};var c=/(<|&lt;|&#60;)/g,u=/(>|&gt;|&#62;)/g;var f=[["$","$"],["\\(","\\)"]];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"},p={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},m="",y=["http:","https:","mailto:","",void 0,":"],g=r.NEWLINES=/(\r\n?|\n)/g,v=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=/<br(\s+.*)?>/i;r.BR_TAG_ALL=/<br(\s+.*)?>/gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&C(n)}var A=/(^|;)\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(v),o=[],l="",s=0,c=0;c<i.length;c++){var u=i[c],f=u.match(x),d=f&&f[2].toLowerCase();if(d)-1!==n.indexOf(d)&&(o.push(u),l=d);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 S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},L=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(e){return e.replace(L,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)):S[t])||e})}function D(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!==y.indexOf(a)&&-1!==y.indexOf(i)?t:""}function O(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=C,r.sanitizeHTML=function(e){e=e.replace(g," ");for(var t=document.createElement("p"),r=t,a=[],i=e.split(v),o=0;o<i.length;o++){var l=i[o],s=l.match(x),c=s&&s[2].toLowerCase();if(c in d)if(s[1])a.length&&(r=a.pop());else{var u=s[4],f=M(u,_),p=f?{style:f}:{};if("a"===c){var h=M(u,w);if(h){var m=D(h);if(m){p.href=m;var y=M(u,k);y&&(p.target=y)}}}var b=document.createElement(c);r.appendChild(b),n.select(b).attr(p),r=b,a.push(b)}else r.appendChild(document.createTextNode(C(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(O(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(O(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":274,"../constants/xmlns_namespaces":280,"../lib":299,"@plotly/d3":20}],323:[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)}},{}],324:[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":33}],325:[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"}}},{}],326:[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"}}},{}],327:[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":387}],328:[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 f(e,t,r){var n=a({},e);for(var o in n){var l=n[o];i(l)&&(n[o]=d(l,t,r,o))}return"from-root"===r&&(n.editType=t),n}function d(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]=d(e.items[o],t,"from-root")}return i}return f(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:f}},{"../lib":299}],329:[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,f=s.getFromTrace,d=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 y(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 g(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 v(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,f=(l.subplotsRegistry.ternary||{}).attrRegex,d=(l.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(e);for(t=0;t<m.length;t++){var y=m[t];if(i&&i.test(y)){var g=e[y];g.anchor&&"free"!==g.anchor&&(g.anchor=u(g.anchor)),g.overlaying&&(g.overlaying=u(g.overlaying)),g.type||(g.isdate?g.type="date":g.islog?g.type="log":!1===g.isdate&&!1===g.islog&&(g.type="linear")),"withzero"!==g.autorange&&"tozero"!==g.autorange||(g.autorange=!0,g.rangemode="tozero"),delete g.islog,delete g.isdate,delete g.categories,v(g,"domain")&&delete g.domain,void 0!==g.autotick&&(void 0===g.tickmode&&(g.tickmode=g.autotick?"auto":"linear"),delete g.autotick),h(g)}else if(s&&s.test(y)){h(e[y].radialaxis)}else if(f&&f.test(y)){var x=e[y];h(x.aaxis),h(x.baxis),h(x.caxis)}else if(d&&d.test(y)){var b=e[y],_=b.cameraposition;if(Array.isArray(_)&&4===_[0].length){var w=_[0],k=_[1],T=_[2],M=a([],w),A=[];for(n=0;n<3;++n)A[n]=k[n]+T*M[2+4*n];b.camera={eye:{x:A[0],y:A[1],z:A[2]},center:{x:k[0],y:k[1],z:k[2]},up:{x:0,y:0,z:1}},delete b.cameraposition}h(b.xaxis),h(b.yaxis),h(b.zaxis)}}var S=Array.isArray(e.annotations)?e.annotations.length:0;for(t=0;t<S;t++){var L=e.annotations[t];o.isPlainObject(L)&&(L.ref&&("paper"===L.ref?(L.xref="paper",L.yref="paper"):"data"===L.ref&&(L.xref="x",L.yref="y"),delete L.ref),p(L,"xref"),p(L,"yref"))}var C=Array.isArray(e.shapes)?e.shapes.length:0;for(t=0;t<C;t++){var D=e.shapes[t];o.isPlainObject(D)&&(p(D,"xref"),p(D,"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 E=e.legend;return E&&(E.x>3?(E.x=1.02,E.xanchor="left"):E.x<-2&&(E.x=-.02,E.xanchor="right"),E.y>3?(E.y=1.02,E.yanchor="bottom"):E.y<-2&&(E.y=-.02,E.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,f=a.error_y.color||(d(a,"bar")?c.defaultLine:s[t%s.length]);a.error_y.color=c.addOpacity(c.rgb(f),c.opacity(f)*a.error_y.opacity),delete a.error_y.opacity}if("bardir"in a&&("h"!==a.bardir||!d(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")),d(a,"gl3d")&&a.scene&&(a.scene=l.subplotsRegistry.gl3d.cleanId(a.scene)),!d(a,"pie-like")&&!d(a,"bar-like"))if(Array.isArray(a.textposition))for(n=0;n<a.textposition.length;n++)a.textposition[n]=g(a.textposition[n]);else a.textposition&&(a.textposition=g(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 k=!1!==(a.increasing||{}).showlegend,T=!1!==(a.decreasing||{}).showlegend,M=m(a.increasing),A=m(a.decreasing);if(!1!==M&&!1!==A){var S=y(M,A,k,T);S&&(a.name=S)}else!M&&!A||a.name||(a.name=M||A)}if(Array.isArray(a.transforms)){var L=a.transforms;for(n=0;n<L.length;n++){var C=L[n];if(o.isPlainObject(C))switch(C.type){case"filter":C.filtersrc&&(C.target=C.filtersrc,delete C.filtersrc),C.calendar&&(C.valuecalendar||(C.valuecalendar=C.calendar),delete C.calendar);break;case"groupby":if(C.styles=C.styles||C.style,C.styles&&!Array.isArray(C.styles)){var D=C.styles,O=Object.keys(D);C.styles=[];for(var P=0;P<O.length;P++)C.styles.push({target:O[P],value:D[O[P]]})}}}}v(a,"line")&&delete a.line,"marker"in a&&(v(a.marker,"line")&&delete a.marker.line,v(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=f(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":158,"../lib":299,"../plots/cartesian/axis_ids":350,"../plots/plots":380,"../registry":387,"fast-isnumeric":33,"gl-mat4/fromQuat":39}],330:[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":389,"./plot_api":332,"./template_api":337,"./to_image":338,"./validate":339}],331:[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 f=t.astr,d=l.getComponentMethod(f,"supplyLayoutDefaults"),p=l.getComponentMethod(f,"draw"),h=l.getComponentMethod(f,"drawOne"),m=n.replot||n.recalc||d===a||p===a,y=e.layout,g=e._fullLayout;if(r[""]){Object.keys(r).length>1&&i.warn("Full array edits are incompatible with other edits",f);var v=r[""][""];if(c(v))t.set(null);else{if(!Array.isArray(v))return i.warn("Unrecognized full array edit value",f,v),!0;t.set(v)}return!m&&(d(y,g),p(e),!0)}var x,b,_,w,k,T,M,A,S=Object.keys(r).map(Number).sort(o),L=t.get(),C=L||[],D=u(g,f).get(),O=[],P=-1,E=C.length;for(x=0;x<S.length;x++)if(w=r[_=S[x]],k=Object.keys(w),T=w[""],M=s(T),_<0||_>C.length-(M?0:1))i.warn("index out of range",f,_);else if(void 0!==T)k.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",f,_),c(T)?O.push(_):M?("add"===T&&(T={}),C.splice(_,0,T),D&&D.splice(_,0,{})):i.warn("Unrecognized full object edit value",f,_,T),-1===P&&(P=_);else for(b=0;b<k.length;b++)A=f+"["+_+"].",u(C[_],k[b],A).set(w[k[b]]);for(x=O.length-1;x>=0;x--)C.splice(O[x],1),D&&D.splice(O[x],1);if(C.length?L||t.set(C):t.set(null),m)return!1;if(d(y,g),h!==a){var R;if(-1===P)R=S;else{for(E=Math.max(C.length,E),R=[],x=0;x<S.length&&!((_=S[x])>=P);x++)R.push(_);for(x=P;x<E;x++)R.push(x)}for(x=0;x<R.length;x++)h(e,R[x])}else p(e);return!0}},{"../lib/is_plain_object":300,"../lib/loggers":303,"../lib/noop":308,"../lib/search":318,"../registry":387,"./container_array_match":327}],332:[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"),f=e("./plot_schema"),d=e("../plots/plots"),p=e("../plots/cartesian/axes"),h=e("../components/drawing"),m=e("../components/color"),y=e("../plots/cartesian/graph_interact").initInteractions,g=e("../constants/xmlns_namespaces"),v=e("../components/selections").clearOutline,x=e("./plot_config").dfltConfig,b=e("./manage_arrays"),_=e("./helpers"),w=e("./subroutines"),k=e("./edit_types"),T=e("../plots/cartesian/constants").AX_NAME_PATTERN,M=0,A=5;function S(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 C(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]=C: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 f=c.scrollZoom,d=c._scrollZoom={};if(!0===f)d.cartesian=1,d.gl3d=1,d.geo=1,d.mapbox=1;else if("string"==typeof f){var p=f.split("+");for(a=0;a<p.length;a++)d[p[a]]=1}else!1!==f&&(d.gl3d=1,d.geo=1,d.mapbox=1)}function O(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 P(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 E(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]),P(e,t,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(e,r,"newIndices"),void 0!==r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function R(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 P(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,f,d=o.isPlainObject(n),p=[];for(var h in Array.isArray(r)||(r=[r]),r=O(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);f=d?n[h][m]:n,a(f)||(f=-1),p.push({prop:c,target:s,insert:u,maxp:Math.floor(f)})}return p}(e,t,r,n),c={},u={},f=0;f<s.length;f++){var d=s[f].prop,p=s[f].maxp,h=i(s[f].target,s[f].insert,p);d.set(h[0]),Array.isArray(c[d.astr])||(c[d.astr]=[]),c[d.astr].push(h[1]),Array.isArray(u[d.astr])||(u[d.astr]=[]),u[d.astr].push(s[f].target.length)}return{update:c,maxPoints:u}}function z(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}function I(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=B(e,i,l),u=s.flags;u.calc&&(e.calcdata=void 0),u.clearAxisTypes&&_.clearAxisTypes(e,l,{});var f=[];u.fullReplot?f.push(r._doPlot):(f.push(d.previousPromises),d.supplyDefaults(e),u.markerSize&&(d.doCalcdata(e),Y(f)),u.style&&f.push(w.doTraceStyle),u.colorbars&&f.push(w.doColorBars),f.push(S)),f.push(d.rehover,d.redrag,d.reselect),c.add(e,I,[e,s.undoit,s.traces],I,[e,s.redoit,s.traces]);var p=o.syncOrAsync(f,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){j((n||"")+r,a.get(),t,e),i(t)},a}:l}function j(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++)j(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:{},f=o.extendFlat({},c,u);for(var d in f)j(e+"."+d,c[d],u[d],n)}else void 0===n[e]&&(n[e]=N(t))}function B(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 y,g=k.traceFlags(),v={},x={};function b(){return r.map(function(){})}function w(e){var t=p.id2name(e);-1===y.indexOf(t)&&y.push(t)}function T(e){return"LAYOUT"+e+".autorange"}function M(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 S(n,i,o){if(Array.isArray(n))n.forEach(function(e){S(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 L(e){return function(t){return i[t][e]}}function C(e){return function(t,n){return!1===t?i[r[n]][e]:null}}for(var D in t){if(_.hasParent(t,D))throw new Error("cannot set "+D+" and a parent attribute simultaneously");var O,P,E,R,z,I,j=t[D];if("autobinx"!==D&&"autobiny"!==D||(D=D.charAt(D.length-1)+"bins",j=Array.isArray(j)?j.map(C(D)):!1===j?r.map(L(D)):null),v[D]=j,"LAYOUT"!==D.substr(0,6)){for(x[D]=b(),n=0;n<r.length;n++){if(O=s[r[n]],P=A(r[n]),R=(E=F(a._tracePreGUI[P._fullInput.uid],c)(O,D)).get(),void 0!==(z=Array.isArray(j)?j[n%j.length]:j)){var B=E.parts[E.parts.length-1],q=D.substr(0,D.length-B.length-1),U=q?q+".":"",Y=q?l(P,q).get():P;if((I=f.getTraceValObject(P,E.parts))&&I.impliedEdits&&null!==z)for(var V in I.impliedEdits)S(o.relativeAttr(D,V),I.impliedEdits[V],n);else if("thicknessmode"!==B&&"lenmode"!==B||R===z||"fraction"!==z&&"pixels"!==z||!Y){if("type"===D&&("pie"===z!=("pie"===R)||"funnelarea"===z!=("funnelarea"===R))){var Z="x",G="y";"bar"!==z&&"bar"!==R||"h"!==O.orientation||(Z="y",G="x"),o.swapAttrs(O,["?","?src"],"labels",Z),o.swapAttrs(O,["d?","?0"],"label",Z),o.swapAttrs(O,["?","?src"],"values",G),"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,J=Y.orient,X="top"===J||"bottom"===J;if("thicknessmode"===B){var K=X?W.h:W.w;S(U+"thickness",Y.thickness*("fraction"===z?1/K:K),n)}else{var Q=X?W.w:W.h;S(U+"len",Y.len*("fraction"===z?1/Q:Q),n)}}x[D][n]=N(R);if(-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(D)){if("orientation"===D){E.set(z);var $=O.x&&!O.y?"h":"v";if((E.get()||$)===P.orientation)continue}else"orientationaxes"===D&&(O.orientation={v:"h",h:"v"}[P.orientation]);_.swapXYData(O),g.calc=g.clearAxisTypes=!0}else-1!==d.dataArrayContainers.indexOf(E.parts[0])?(_.manageArrayContainers(E,z,x),g.calc=!0):(I?I.arrayOk&&!u.traceIs(P,"regl")&&(o.isArrayOrTypedArray(z)||o.isArrayOrTypedArray(R))?g.calc=!0:k.update(g,I):g.calc=!0,E.set(z))}}if(-1!==["swapxyaxes","orientationaxes"].indexOf(D)&&p.swap(e,r),"orientationaxes"===D){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(D)){for(y=[],n=0;n<r.length;n++){var re=s[r[n]];u.traceIs(re,"cartesian")&&(w(re.xaxis||"x"),w(re.yaxis||"y"))}S(y.map(T),!0,0),S(y.map(M),[0,1],0)}}else E=h(e.layout,D.replace("LAYOUT","")),x[D]=[N(E.get())],E.set(Array.isArray(j)?j[0]:j),g.calc=!0}return(g.calc||g.plot)&&(g.fullReplot=!0),{flags:g,undoit:x,redoit:v,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&&-1===r.indexOf("grouptitlefont")?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 q(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=W(e,n),i=a.flags;i.calc&&(e.calcdata=void 0);var l=[d.previousPromises];i.layoutReplot?l.push(w.layoutReplot):Object.keys(n).length&&(U(e,i,a)||d.supplyDefaults(e),i.legend&&l.push(w.doLegend),i.layoutstyle&&l.push(w.layoutStyles),i.axrange&&Y(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(S)),l.push(d.rehover,d.redrag,d.reselect),c.add(e,q,[e,a.undoit],q,[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 U(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 Y(e,t){var r=t?function(e){var r=[];for(var n in t){var a=p.getFromId(e,n);if(r.push(n),-1!==(a.ticklabelposition||"").indexOf("inside")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var i in a._matchGroup)t[i]||r.push(i)}return p.draw(e,r,{skipTitle:!0})}:function(e){return p.draw(e,"redraw")};e.push(v,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var V=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Z=/^[xyz]axis[0-9]*\.autorange$/,G=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function W(e,t){var r,n,a,i=e.layout,s=e._fullLayout,c=s._guiEditing,d=F(s._preGUI,c),h=Object.keys(t),m=p.list(e),y=o.extendDeepAll({},t),g={};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 v=m[a]._id.substr(1),x=-1!==v.indexOf("scene")?v+".":"",w=h[n].replace("allaxes",x+m[a]._name);t[w]||(t[w]=t[h[n]])}delete t[h[n]]}var M=k.layoutFlags(),A={},S={};function L(e,r){if(Array.isArray(e))e.forEach(function(e){L(e,r)});else if(!(e in t||_.hasParent(t,e))){var n=d(i,e);e in S||(S[e]=N(n.get())),void 0!==r&&n.set(r)}}var C,D={};function O(e){var t=p.name2id(e.split(".")[0]);return D[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 E=d(i,P),R=t[P],z=E.parts.length-1;z>0&&"string"!=typeof E.parts[z];)z--;var I=E.parts[z],j=E.parts[z-1]+"."+I,B=E.parts.slice(0,z).join("."),q=l(e.layout,B).get(),U=l(s,B).get(),Y=E.get();if(void 0!==R){A[P]=R,S[P]="reverse"===I?R:N(Y);var W=f.getLayoutValObject(s,E.parts);if(W&&W.impliedEdits&&null!==R)for(var X in W.impliedEdits)L(o.relativeAttr(P,X),W.impliedEdits[X]);if(-1!==["width","height"].indexOf(P))if(R){L("autosize",null);var K="height"===P?"width":"height";L(K,s[K])}else s[P]=e._initialAutoSize[P];else if("autosize"===P)L("width",R?null:s.width),L("height",R?null:s.height);else if(j.match(V))O(j),l(s,B+"._inputRange").set(null);else if(j.match(Z)){O(j),l(s,B+"._inputRange").set(null);var Q=l(s,B).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else j.match(G)&&l(s,B+"._inputDomain").set(null);if("type"===I){C=q;var $="linear"===U.type&&"log"===R,ee="log"===U.type&&"linear"===R;if($||ee){if(C&&C.range)if(U.autorange)$&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var te=C.range[0],re=C.range[1];$?(te<=0&&re<=0&&L(B+".autorange",!0),te<=0?te=re/1e6:re<=0&&(re=te/1e6),L(B+".range[0]",Math.log(te)/Math.LN10),L(B+".range[1]",Math.log(re)/Math.LN10)):(L(B+".range[0]",Math.pow(10,te)),L(B+".range[1]",Math.pow(10,re)))}else L(B+".autorange",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[E.parts[0]]&&"radialaxis"===E.parts[1]&&delete s[E.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,U,R,L),u.getComponentMethod("images","convertCoords")(e,U,R,L)}else L(B+".autorange",!0),L(B+".range",null);l(s,B+"._inputRange").set(null)}else if(I.match(T)){var ne=l(s,P).get(),ae=(R||{}).type;ae&&"-"!==ae||(ae="linear"),u.getComponentMethod("annotations","convertCoords")(e,ne,ae,L),u.getComponentMethod("images","convertCoords")(e,ne,ae,L)}var ie=b.containerArrayMatch(P);if(ie){r=ie.array,n=ie.index;var oe=ie.property,le=W||{editType:"calc"};""!==n&&""===oe&&(b.isAddVal(R)?S[P]=null:b.isRemoveVal(R)?S[P]=(l(i,r).get()||[])[n]:o.warn("unrecognized full object value",t)),k.update(M,le),g[r]||(g[r]={});var se=g[r][n];se||(se=g[r][n]={}),se[oe]=R,delete t[P]}else"reverse"===I?(q.range?q.range.reverse():(L(B+".autorange",!0),q.range=[1,0]),U.autorange?M.calc=!0:M.plot=!0):("dragmode"===P&&(!1===R&&!1!==Y||!1!==R&&!1===Y)?M.plot=!0:s._has("scatter-like")&&s._has("regl")&&"dragmode"===P&&("lasso"===R||"select"===R)&&"lasso"!==Y&&"select"!==Y?M.plot=!0:s._has("gl2d")?M.plot=!0:W?k.update(M,W):M.calc=!0,E.set(R))}}for(r in g){b.applyContainerArrayChanges(e,d(i,r),g[r],M,d)||(M.plot=!0)}for(var ce in D){var ue=(C=p.getFromId(e,ce))&&C._constraintGroup;if(ue)for(var fe in M.calc=!0,ue)D[fe]||(p.getFromId(e,fe)._constraintShrinkable=!0)}return(J(e)||t.height||t.width)&&(M.plot=!0),(M.plot||M.calc)&&(M.layoutReplot=!0),{flags:M,rangesAltered:D,undoit:S,redoit:A,eventData:y}}function J(e){var t=e._fullLayout,r=t.width,n=t.height;return e.layout.autosize&&d.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=B(e,o.extendFlat({},t),i),s=l.flags,u=W(e,o.extendFlat({},n)),f=u.flags;(s.calc||f.calc)&&(e.calcdata=void 0),s.clearAxisTypes&&_.clearAxisTypes(e,i,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):s.fullReplot?p.push(r._doPlot):(p.push(d.previousPromises),U(e,f,u)||d.supplyDefaults(e),s.style&&p.push(w.doTraceStyle),(s.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&Y(p,u.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(S)),p.push(d.rehover,d.redrag,d.reselect),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 K(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"}],$=[{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 ee(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 te(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 re(e,t){for(var r=0;r<t.length;r++)if(t[r]._fullInput.uid===e)return r;return-1}function ne(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 ae(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 ie(e,t,r,n){var a,i,s,c=n.getValObject,u=n.flags,f=n.immutable,d=n.inArray,p=n.arrayIndex;function h(){var e=a.editType;d&&-1!==e.indexOf("arraydraw")?o.pushUnique(u.arrays[d],p):(k.update(u,a),"none"!==e&&u.nChanges++,n.transition&&a.anim&&u.nChangesAnim++,(V.test(s)||Z.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 y=e[i],g=t[i],v=r.concat(i);if(s=v.join("."),"_"!==i.charAt(0)&&"function"!=typeof y&&y!==g){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(v))&&(!a._compareAsJSON||JSON.stringify(y)!==JSON.stringify(g))){var b,_=a.valType,w=m(a),T=Array.isArray(y),M=Array.isArray(g);if(T&&M){var A="_input_"+i,S=e[A],L=t[A];if(Array.isArray(S)&&S===L)continue}if(void 0===g)w&&T?u.calc=!0:h();else if(a._isLinkedToArray){var C=[],D=!1;d||(u.arrays[i]=C);var O=Math.min(y.length,g.length),P=Math.max(y.length,g.length);if(O!==P){if("arraydraw"!==a.editType){h();continue}D=!0}for(b=0;b<O;b++)ie(y[b],g[b],v.concat(b),o.extendFlat({inArray:i,arrayIndex:b},n));if(D)for(b=O;b<P;b++)C.push(b)}else!_&&o.isPlainObject(y)?ie(y,g,v,n):w?T&&M?(f&&(u.calc=!0),(f||n.newDataRevision)&&h()):T!==M?u.calc=!0:h():T&&M&&y.length===g.length&&String(y)===String(g)||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 oe(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=d.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 f(){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,d.transition(e,t.frame.data,t.frame.layout,_.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then(function(){t.onComplete&&t.onComplete()}),e.emit("plotly_animatingframe",{name: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&&f()};t()}var h,m,y=0;function g(e){return Array.isArray(a)?y>=a.length?e.transitionOpts=a[y]:e.transitionOpts=a[0]:e.transitionOpts=a,y++,e}var v=[],x=null==t,b=Array.isArray(t);if(x||b||!o.isPlainObject(t)){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))&&v.push({type:"byname",name:String(m.name),data:g({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),v.push({type:"byname",name:w,data:g({name:w})})):o.isPlainObject(w)&&v.push({type:"object",data:g(o.extendFlat({},w))})}}else v.push({type:"object",data:g(o.extendFlat({},t))});for(h=0;h<v.length;h++)if("byname"===(m=v[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&&v.reverse();var k=e._fullLayout._currentFrame;if(k&&r.fromcurrent){var T=-1;for(h=0;h<v.length;h++)if("byname"===(m=v[h]).type&&m.name===k){T=h;break}if(T>0&&T<v.length-1){var M=[];for(h=0;h<v.length;h++)m=v[h],("byname"!==v[h].type||h>T)&&M.push(m);v=M}}v.length>0?function(t){if(0!==t.length){for(var a=0;a<t.length;a++){var o;o="byname"===t[a].type?d.computeFrame(e,t[a].name):t[a].data;var f=s(a),h=l(a);h.duration=Math.min(h.duration,f.duration);var m={frame:o,name:t[a].name,frameOpts:f,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()}}(v):(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 f=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,y=(u[m]||h[m]||{}).name,g=t[n].name,v=u[y]||h[y];y&&g&&"number"==typeof g&&v&&M<A&&(M++,o.warn('addFrames: overwriting frame "'+(u[y]||h[y]).name+'" with a frame whose name of type "number" also equates to "'+y+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),M===A&&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:d.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+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=d.modifyFrames,k=d.modifyFrames,T=[e,b],S=[e,x];return c&&c.add(e,w,T,k,S),d.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=d.modifyFrames,u=d.modifyFrames,f=[e,l],p=[e,i];return c&&c.add(e,s,f,u,p),d.modifyFrames(e,i)},r.addTraces=function e(t,n,a){t=o.getGraphDiv(t);var i,l,s=[],u=r.deleteTraces,f=e,d=[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,d,f,p),l;Array.isArray(a)||(a=[a]);try{E(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,d,f,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,f=[t,l,n],d=[t,n];if(void 0===n)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(n)||(n=[n]),P(t,n,"indices"),(n=O(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,f,u,d),p},r.extendTraces=function e(t,n,a,i){var l=R(t=o.getGraphDiv(t),n,a,i,function(e,t,r){var n,a;if(o.isTypedArray(e))if(r<0){var i=new e.constructor(0),l=z(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]}),s=r.redraw(t),u=[t,l.update,a,l.maxPoints];return c.add(t,r.prependTraces,u,e,arguments),s},r.moveTraces=function e(t,n,a){var i,l=[],s=[],u=e,f=e,d=[t=o.getGraphDiv(t),a,n],p=[t,n,a];if(E(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=O(n,t.data.length-1),a=O(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,d,f,p),h},r.prependTraces=function e(t,n,a,i){var l=R(t=o.getGraphDiv(t),n,a,i,function(e,t,r){var n,a;if(o.isTypedArray(e))if(r<=0){var i=new e.constructor(0),l=z(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]}),s=r.redraw(t),u=[t,l.update,a,l.maxPoints];return c.add(t,r.extendTraces,u,e,arguments),s},r.newPlot=function(e,t,n,a){return e=o.getGraphDiv(e),d.cleanPlot([],{},e._fullData||[],e._fullLayout||{}),d.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 f=0===(e.data||[]).length&&Array.isArray(t);Array.isArray(t)&&(_.cleanData(t),f?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),e.layout&&!f||(e.layout=_.cleanLayout(a)),d.supplyDefaults(e);var m=e._fullLayout,v=m._has("cartesian");m._replotting=!0,(f||m._shouldCreateBgLayer)&&(function(e){var t=n.select(e),r=e._fullLayout;if(r._calcInverseTransform=oe,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(g.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._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!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),f&&p.saveShowSpikeInitial(e);var x=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;x&&d.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)||d.resize(e)},window.addEventListener("resize",e._responsiveChartHandler)):o.clearResponsive(e);var k=o.extendFlat({},m._size),T=0;function M(){if(d.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&&d.allowAutoMargin(e,"pie."+n.uid+".automargin")}return d.doAutoMargin(e),d.previousPromises(e)}function A(){e._transitioning||(w.doAutoRangeAndConstraints(e),f&&p.saveRangeInitial(e),u.getComponentMethod("rangeslider","calcAutorange")(e))}var L=[d.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(!T)return o.log(l+" Clearing graph and plotting again."),d.cleanPlot([],{},e._fullData,m),d.supplyDefaults(e),m=e._fullLayout,d.doCalcdata(e),T++,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"),d.previousPromises(e)},M,function(){if(d.didMarginChange(k,m._size))return o.syncOrAsync([M,w.layoutStyles],e)}];v&&L.push(function(){if(x)return o.syncOrAsync([u.getComponentMethod("shapes","calcAutorange"),u.getComponentMethod("annotations","calcAutorange"),A],e);A()}),L.push(w.layoutStyles),v&&L.push(function(){return p.draw(e,f?"":"redraw")},function(e){e._fullLayout._insideTickLabelsAutorange&&q(e,e._fullLayout._insideTickLabelsAutorange).then(function(){e._fullLayout._insideTickLabelsAutorange=void 0})}),L.push(w.drawData,w.finalDraw,y,d.addLinks,d.rehover,d.redrag,d.reselect,d.doAutoMargin,function(e){e._fullLayout._insideTickLabelsAutorange&&f&&p.saveRangeInitial(e,!0)},d.previousPromises);var C=o.syncOrAsync(L,e);return C&&C.then||(C=Promise.resolve()),C.then(function(){return S(e),e})},r.purge=function(e){var t=(e=o.getGraphDiv(e))._fullLayout||{},r=e._fullData||[];return d.cleanPlot([],{},r,t),d.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 y=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}}}}(y,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,f,d,p,h,m,y=n._preGUI,g=[],v={},x={};for(a in y){if(u=ee(a,Q)){if(h=u.head,m=u.tail,i=u.attr||h+".uirevision",(c=(s=l(n,i).get())&&te(i,t))&&c===s){if(null===(f=y[a])&&(f=void 0),ae(p=(d=l(t,a)).get(),f)){void 0===p&&"autorange"===m&&g.push(h),d.set(N(l(n,a).get()));continue}if("autorange"===m||"range["===m.substr(0,6)){var b=y[h+".range[0]"],_=y[h+".range[1]"],w=y[h+".autorange"];if(w||null===w&&null===b&&null===_){if(!(h in v)){var k=l(t,h).get();v[h]=k&&(k.autorange||!1!==k.autorange&&(!k.range||2!==k.range.length))}if(v[h]){d.set(N(l(n,a).get()));continue}}}}}else o.warn("unrecognized GUI edit: "+a);delete y[a],u&&"range["===u.tail.substr(0,6)&&(x[u.head]=1)}for(var T=0;T<g.length;T++){var M=g[T];if(x[M]){var A=l(t,M).get();A&&delete A.autorange}}var S=n._tracePreGUI;for(var L in S){var C,D=S[L],O=null;for(a in D){if(!O){var P=re(L,r);if(P<0){delete S[L];break}var E=ne(L,e,(C=r[P]._fullInput).index);if(E<0){delete S[L];break}O=e[E]}if(u=ee(a,$)){if(u.attr?c=(s=l(n,u.attr).get())&&te(u.attr,t):(s=C.uirevision,void 0===(c=O.uirevision)&&(c=t.uirevision)),c&&c===s&&(null===(f=D[a])&&(f=void 0),ae(p=(d=l(O,a)).get(),f))){d.set(N(l(C,a).get()));continue}}else o.warn("unrecognized GUI edit: "+a+" in trace uid "+L);delete D[a]}}}(e.data,e.layout,c,p),d.supplyDefaults(e,{skipUpdateCalc:!0});var g=e._fullData,v=e._fullLayout,x=void 0===v.datarevision,b=v.transition,T=function(e,t,r,n,a){var i=k.layoutFlags();return i.arrays={},i.rangesAltered={},i.nChanges=0,i.nChangesAnim=0,ie(t,r,[],{getValObject:function(e){return f.getLayoutValObject(r,e)},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"),i}(e,p,v,x,b),M=T.newDataRevision,A=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=k.traceFlags();c.arrays={},c.nChanges=0,c.nChangesAnim=0;var u={getValObject:function(e){var t=f.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,d.hasMakesDataTransform(s)&&(s=r[l]),p[s.uid])continue;p[s.uid]=1,ie(t[l]._fullInput,s,[],u)}return(c.calc||c.plot)&&(c.fullReplot=!0),a&&c.nChanges&&c.nChangesAnim&&(c.anim=c.nChanges===c.nChangesAnim&&o?"all":"some"),c}(e,c,g,x,b,M);if(J(e)&&(T.layoutReplot=!0),A.calc||T.calc){e.calcdata=void 0;for(var L=Object.getOwnPropertyNames(v),C=0;C<L.length;C++){var O=L[C],P=O.substring(0,5);if("xaxis"===P||"yaxis"===P){var E=v[O]._emptyCategories;E&&E()}}}else d.supplyDefaultsUpdateCalc(e.calcdata,g);var R=[];if(i&&(e._transitionData={},d.createTransitionData(e),R.push(function(){return r.addFrames(e,i)})),v.transition&&!m&&(A.anim||T.anim))T.ticks&&R.push(w.doTicksRelayout),d.doCalcdata(e),w.doAutoRangeAndConstraints(e),R.push(function(){return d.transitionFromReact(e,A,T,p)});else if(A.fullReplot||T.layoutReplot||m)e._fullLayout._skipDefaults=!0,R.push(r._doPlot);else{for(var z in T.arrays){var I=T.arrays[z];if(I.length){var F=u.getComponentMethod(z,"drawOne");if(F!==o.noop)for(var j=0;j<I.length;j++)F(e,I[j]);else{var B=u.getComponentMethod(z,"draw");if(B===o.noop)throw new Error("cannot draw components: "+z);B(e)}}}R.push(d.previousPromises),A.style&&R.push(w.doTraceStyle),(A.colorbars||T.colorbars)&&R.push(w.doColorBars),T.legend&&R.push(w.doLegend),T.layoutstyle&&R.push(w.layoutStyles),T.axrange&&Y(R),T.ticks&&R.push(w.doTicksRelayout),T.modebar&&R.push(w.doModeBar),T.camera&&R.push(w.doCamera),R.push(S)}R.push(d.rehover,d.redrag,d.reselect),(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=q,r.restyle=I,r.setPlotConfig=function(e){return o.extendFlat(x,e)},r.update=X,r._guiRelayout=K(q),r._guiRestyle=K(I),r._guiUpdate=K(X),r._storeDirectGUIEdit=function(e,t,r){for(var n in r)j(n,l(e,n).get(),r[n],t)}},{"../components/color":158,"../components/drawing":180,"../components/selections":246,"../constants/xmlns_namespaces":280,"../lib":299,"../lib/events":292,"../lib/queue":314,"../plots/cartesian/axes":346,"../plots/cartesian/constants":353,"../plots/cartesian/graph_interact":356,"../plots/plots":380,"../registry":387,"./edit_types":328,"./helpers":329,"./manage_arrays":331,"./plot_config":333,"./plot_schema":334,"./subroutines":336,"@plotly/d3":20,"fast-isnumeric":33,"has-hover":64}],333:[function(e,t,r){"use strict";var n={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},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}},editSelection:{valType:"boolean",dflt:!0},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}},{}],334:[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"),f=a.extendDeepAll,d=a.isPlainObject,p=a.isArrayOrTypedArray,h=a.nestedProperty,m=a.valObjectMeta,y="_isSubplotObj",g="_isLinkedToArray",v=[y,g,"_arrayAttrRegexps","_deprecated"];function x(e,t,r){if(!e)return!1;if(e._isLinkedToArray)if(b(t[r]))r++;else if(r<t.length)return!1;for(;r<t.length;r++){var n=e[t[r]];if(!d(n))break;if(e=n,r===t.length-1)break;if(e._isLinkedToArray){if(!b(t[++r]))return!1}else if("info_array"===e.valType){var a=t[++r];if(!b(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(!b(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function b(e){return e===Math.round(e)&&e>=0}function _(){var e,t,r={};for(e in f(r,o),n.subplotsRegistry){if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a<t.attr.length;a++)T(r,t,t.attr[a]);else T(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?f(r,t.layoutAttributes):t.layoutAttributes&&M(r,t.layoutAttributes,t.name)}return{layoutAttributes:k(r)}}function w(){var e={frames:f({},l)};return k(e),e.frames}function k(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"}):d(e)&&(e.role="object")})}(e),function(e){r.crawl(e,function(e,t,r){if(!e)return;var n=e[g];if(!n)return;delete e[g],r[t]={items:{}},r[t].items[n]=e,r[t].role="object"})}(e),function(e){!function e(t){for(var r in t)if(d(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 T(e,t,r){var n=h(e,r),a=f({},t.layoutAttributes);a[y]=!0,n.set(a)}function M(e,t,r){var n=h(e,r);n.set(f(n.get()||{},t))}r.IS_SUBPLOT_OBJ=y,r.IS_LINKED_TO_ARRAY=g,r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=v,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=f({},i),s=f({},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)}),f(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;f(o,s),a.attributes&&f(o,a.attributes);o.type=e;var c={meta:t.meta||{},categories:t.categories||{},animatable:Boolean(t.animatable),type:e,attributes:k(o)};if(t.layoutAttributes){var u={};f(u,t.layoutAttributes),c.layoutAttributes=k(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=f({},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){M(r,a.schema.transforms[e][t],t)})}),{attributes:k(r)}}(e)}),{defs:{valObjects:m,metaKeys:v.concat(["description","role","editType","impliedEdits"]),editType:{traces:u.traces,layout:u.layout},impliedEdits:{}},traces:e,layout:_(),transforms:t,frames:w(),animation:k(s),config:k(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===v.indexOf(n)){var l=(a?a+".":"")+n;t(o,n,e,i,l),r.isValObject(o)||d(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]];var 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++)d(s[u])&&e(s[u],r+1,c+"["+u+"].")}else d(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 f=c[u],h=f._module;h&&(n="transforms["+u+"].",t=f,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(!b(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 f=u.basePlotModule;f&&f.attributes&&(a=f.attributes[o])}a||(a=i[o])}return x(a,t,l)},r.getLayoutValObject=function(e,t){return x(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 f=e._modules;if(f)for(r=0;r<f.length;r++)if((l=f[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":299,"../plots/animation_attributes":340,"../plots/attributes":342,"../plots/frame_attributes":375,"../plots/layout_attributes":378,"../registry":387,"./edit_types":328,"./plot_config":333}],335:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plots/attributes"),i="templateitemname",o={name:{valType:"string",editType:"none"}};function l(e){return e&&"string"==typeof e}function s(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"}o[i]={valType:"string",editType:"calc"},r.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=o.name,t[i]=o[i],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[s(t)],o=n&&n[t];Array.isArray(o)&&o.length||(o=[]);var c={};return{newItem:function(e){var t={name:e.name,_input:e},n=t[i]=e[i];if(!l(n))return t._template=a,t;for(var s=0;s<o.length;s++){var u=o[s];if(u.name===n)return c[n]=1,t._template=u,t}return t[r]=e[r]||!1,t._template=!1,t},defaultItems:function(){for(var e=[],t=0;t<o.length;t++){var r=o[t],n=r.name;if(l(n)&&!c[n]){var a={_template:r,name:n,_input:{_templateitemname:n}};a[i]=r[i],e.push(a),c[n]=1}}return e}}},r.arrayDefaultKey=s,r.arrayEditor=function(e,t,r){var a=(n.nestedProperty(e,t).get()||[]).length,o=r._index,l=o>=a&&(r._input||{})._templateitemname;l&&(o=a);var s,c=t+"["+o+"]";function u(){s={},l&&(s[c]={},s[c][i]=l)}function f(e,t){l?n.nestedProperty(s[c],e).set(t):s[c+"."+e]=t}function d(){var e=s;return u(),e}return u(),{modifyBase:function(e,t){s[e]=t},modifyItem:f,getUpdateObj:d,applyUpdate:function(t,r){t&&f(t,r);var a=d();for(var i in a)n.nestedProperty(e,i).set(a[i])}}}},{"../lib":299,"../plots/attributes":342}],336:[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"),f=e("../components/modebar"),d=e("../plots/cartesian/axes"),p=e("../constants/alignment"),h=e("../plots/cartesian/constraints"),m=h.enforce,y=h.clean,g=e("../plots/cartesian/autorange").doAutoRange,v="start",x="middle",b="end";function _(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 w(e){var t,a,l,u,h,m,y=e._fullLayout,g=y._size,v=g.p,x=d.list(e,"",!0);if(y._paperdiv.style({width:e._context.responsive&&y.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":y.width+"px",height:e._context.responsive&&y.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":y.height+"px"}).selectAll(".main-svg").call(c.setSize,y.width,y.height),e._context.setBackground(e,y.paper_bgcolor),r.drawMainTitle(e),f.manage(e),!y._has("cartesian"))return i.previousPromises(e);function b(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-v-n:t._offset+t._length+v+n:g.t+g.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+v+n:t._offset-v-n:g.l+g.w*(e.position||0)+n%1}for(t=0;t<x.length;t++){var w=(u=x[t])._anchorAxis;u._linepositions={},u._lw=c.crispRound(e,u.linewidth,1),u._mainLinePosition=b(u,w,u.side),u._mainMirrorPosition=u.mirror&&w?b(u,w,p.OPPOSITE_SIDE[u.side]):null}var T=[],A=[],S=[],L=1===s.opacity(y.paper_bgcolor)&&1===s.opacity(y.plot_bgcolor)&&y.paper_bgcolor===y.plot_bgcolor;for(a in y._plots)if((l=y._plots[a]).mainplot)l.bg&&l.bg.remove(),l.bg=void 0;else{var C=l.xaxis.domain,D=l.yaxis.domain,O=l.plotgroup;if(_(C,D,S)){var P=O.node(),E=l.bg=o.ensureSingle(O,"rect","bg");P.insertBefore(E.node(),P.childNodes[0]),A.push(a)}else O.select("rect.bg").remove(),S.push([C,D]),L||(T.push(a),A.push(a))}var R,z,I,N,F,j,B,H,q,U,Y,V,Z,G=y._bgLayer.selectAll(".bg").data(T);for(G.enter().append("rect").classed("bg",!0),G.exit().remove(),G.each(function(e){y._plots[e].bg=n.select(this)}),t=0;t<A.length;t++)l=y._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-v,m._offset-v,h._length+2*v,m._length+2*v).call(s.fill,y.plot_bgcolor).style("stroke-width",0);if(!y._hasOnlyLargeSploms)for(a in y._plots){l=y._plots[a],h=l.xaxis,m=l.yaxis;var W,J,X=l.clipId="clip"+y._uid+a+"plot",K=o.ensureSingleById(y._clips,"clipPath",X,function(e){e.classed("plotclip",!0).append("rect")});l.clipRect=K.select("rect").attr({width:h._length,height:m._length}),c.setTranslate(l.plot,h._offset,m._offset),l._hasClipOnAxisFalse?(W=null,J=X):(W=X,J=null),c.setClipUrl(l.plot,W,e),l.layerClipId=J}function Q(e){return"M"+R+","+e+"H"+z}function $(e){return"M"+h._offset+","+e+"h"+h._length}function ee(e){return"M"+e+","+H+"V"+B}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 y._plots){l=y._plots[a],h=l.xaxis,m=l.yaxis;var ne="M0,0";k(h,a)&&(F=M(h,"left",m,x),R=h._offset-(F?v+F:0),j=M(h,"right",m,x),z=h._offset+h._length+(j?v+j:0),I=b(h,m,"bottom"),N=b(h,m,"top"),!(Z=!h._anchorAxis||a!==h._mainSubplot)||"allticks"!==h.mirror&&"all"!==h.mirror||(h._linepositions[a]=[I,N]),ne=re(h,Q,$),Z&&h.showline&&("all"===h.mirror||"allticks"===h.mirror)&&(ne+=Q(I)+Q(N)),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";k(m,a)&&(Y=M(m,"bottom",h,x),B=m._offset+m._length+(Y?v:0),V=M(m,"top",h,x),H=m._offset-(V?v:0),q=b(m,h,"left"),U=b(m,h,"right"),!(Z=!m._anchorAxis||a!==m._mainSubplot)||"allticks"!==m.mirror&&"all"!==m.mirror||(m._linepositions[a]=[q,U]),ae=re(m,ee,te),Z&&m.showline&&("all"===m.mirror||"allticks"===m.mirror)&&(ae+=ee(q)+ee(U)),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 d.makeClipPaths(e),i.previousPromises(e)}function k(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||"all"===e.mirror||"allticks"===e.mirror)}function T(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 M(e,t,r,n){if(T(e,t,r))return r._lw;for(var a=0;a<n.length;a++){var i=n[a];if(i._mainAxis===r._mainAxis&&T(e,t,i))return i._lw}return 0}function A(e,t){var r=e.title,n=e._size,a=0;switch(t===v?a=r.pad.l:t===b&&(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 S(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,w],e)},r.drawMainTitle=function(e){var t=e._fullLayout,r=function(e){var t=e.title,r=x;o.isRightAnchor(t)?r=b:o.isLeftAnchor(t)&&(r=v);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:A(t,r),y:S(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||{},f=u._module||{},d=f.arraysToCalcdata;d&&d(s,u);var p=f.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 d.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;f.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("selections","draw")(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=d.list(e,"",!0),n={},a=0;a<r.length;a++)if(!n[(t=r[a])._id]){n[t._id]=1,y(e,t),g(e,t);var i=t._matchGroup;if(i)for(var o in i){var l=d.getFromId(e,o);g(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":158,"../components/drawing":180,"../components/modebar":221,"../components/titles":267,"../constants/alignment":274,"../lib":299,"../lib/clear_gl_canvases":287,"../plots/cartesian/autorange":345,"../plots/cartesian/axes":346,"../plots/cartesian/constraints":354,"../plots/plots":380,"../registry":387,"@plotly/d3":20}],337:[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 f=o.defaultItems();for(i=0;i<f.length;i++)r.push(f[i]._template);for(i=0;i<r.length;i++)delete r[i].templateitemname}}for(r=0;r<o.length;r++){var c=o[r],d=e[c];if(c in t?l(d,t[c],c):t[c]=d,f(c)===c)for(var p in t){var h=f(p);p===h||h!==c||p in e||l(d,t[p],c)}}}function f(e){return e.replace(/[0-9]+$/,"")}function d(e,t,r,i,o){var l=o&&r(o);for(var c in e){var u=e[c],h=p(e,c,i),m=p(e,c,o),y=r(m);if(!y){var g=f(c);g!==c&&(y=r(m=p(e,g,o)))}if((!l||l!==y)&&!(!y||y._noTemplating||"data_array"===y.valType||y.arrayOk&&Array.isArray(u)))if(!y.valType&&a(u))d(u,t,r,h,m);else if(y._isLinkedToArray&&Array.isArray(u))for(var v=!1,x=0,b={},_=0;_<u.length;_++){var w=u[_];if(a(w)){var k=w.name;if(k)b[k]||(d(w,t,r,p(u,x,h),p(u,x,m)),x++,b[k]=1);else if(!v){var T=p(e,s.arrayDefaultKey(c),i),M=p(u,x,h);d(w,t,r,M,p(u,x,m));var A=n.nestedProperty(t,M);n.nestedProperty(t,T).set(A.get()),A.set(null),v=!0}}}else{n.nestedProperty(t,h).set(u)}}}function p(e,t,r){return r?Array.isArray(e)?r+"["+t+"]":r+"."+t:t}function h(e){for(var t=0;t<e.length;t++)if(a(e[t]))return!0}function m(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 s={data:{},layout:{}};t.forEach(function(e){var t={};d(e,t,function(e,t){return i.getTraceValObject(e,n.nestedProperty({},t).parts)}.bind(null,e));var r=n.coerce(e,{},l,"type"),a=s.data[r];a||(a=s.data[r]=[]),a.push(t)}),d(r,s.layout,function(e,t){return i.getLayoutValObject(e,n.nestedProperty({},t).parts)}.bind(null,r)),delete s.layout.template;var f=r.template;if(a(f)){var p,h,m,y,g,v,x=f.layout;a(x)&&u(x,s.layout);var b=f.data;if(a(b)){for(h in s.data)if(m=b[h],Array.isArray(m)){for(v=(g=s.data[h]).length,y=m.length,p=0;p<v;p++)u(m[p%y],g[p]);for(p=v;p<y;p++)g.push(n.extendDeep({},m[p]))}for(h in b)h in s.data||(s.data[h]=n.extendDeep([],b[h]))}}return s},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 d=r._fullLayout,y=r._fullData,g={};if(a(l)?(!function e(t,r){for(var n in t)if("_"!==n.charAt(0)&&a(t[n])){var i,o=f(n),l=[];for(i=0;i<r.length;i++)l.push(p(t,n,r[i])),o!==n&&l.push(p(t,o,r[i]));for(i=0;i<l.length;i++)g[l[i]]=1;e(t[n],l)}}(d,["layout"]),function e(t,r){for(var n in t)if(-1===n.indexOf("defaults")&&a(t[n])){var i=p(t,n,r);g[i]?e(t[n],i):u.push({code:"unused",path:i})}}(l,"layout")):u.push({code:"layout"}),a(s)){for(var v,x={},b=0;b<y.length;b++){var _=y[b];x[v=_.type]=(x[v]||0)+1,_._fullInput._template||u.push({code:"missing",index:_._fullInput.index,traceType:v})}for(v in s){var w=s[v].length,k=x[v]||0;w>k?u.push({code:"unused",traceType:v,templateCount:w,dataCount:k}):k>w&&u.push({code:"reused",traceType:v,templateCount:w,dataCount:k})}}else u.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var i=t[n],o=p(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)&&h(i)&&e(i,o)}}({data:y,layout:d},""),u.length)return u.map(m)}},{"../lib":299,"../plots/attributes":342,"../plots/plots":380,"./plot_config":333,"./plot_schema":334,"./plot_template":335}],338:[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,f={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,d,p,h;function m(e){return!(e in t)||o.validate(t[e],f[e])}if(t=t||{},o.isPlainObject(e)?(r=e.data||[],d=e.layout||{},p=e.config||{},h={}):(e=o.getGraphDiv(e),r=o.extendDeep([],e.data),d=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(f.format.values,", "," or ")+".");var y={};function g(e,r){return o.coerce(t,y,f,e,r)}var v=g("format"),x=g("width"),b=g("height"),_=g("scale"),w=g("setBackground"),k=g("imageDataOnly"),T=document.createElement("div");T.style.position="absolute",T.style.left="-5000px",document.body.appendChild(T);var M=o.extendFlat({},d);x?M.width=x:null===t.width&&n(h.width)&&(M.width=h.width),b?M.height=b:null===t.height&&n(h.height)&&(M.height=h.height);var A=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=l.getRedrawFunc(T);function L(){return new Promise(function(e){setTimeout(e,l.getDelay(T._fullLayout))})}function C(){return new Promise(function(e,t){var r=s(T,v,_),n=T._fullLayout.width,f=T._fullLayout.height;function d(){a.purge(T),document.body.removeChild(T)}if("full-json"===v){var p=i.graphJson(T,!1,"keepdata","object",!0,!0);return p.version=u,p=JSON.stringify(p),d(),e(k?p:l.encodeJSON(p))}if(d(),"svg"===v)return e(k?r:l.encodeSVG(r));var h=document.createElement("canvas");h.id=o.randstr(),c({format:v,width:n,height:f,scale:_,canvas:h,svg:r,promise:!0}).then(e).catch(t)})}return new Promise(function(e,t){a.newPlot(T,r,M,A).then(S).then(L).then(C).then(function(t){e(function(e){return k?e.replace(l.IMAGE_URL_PREFIX,""):e}(t))}).catch(function(e){t(e)})})}},{"../lib":299,"../plots/plots":380,"../snapshot/helpers":391,"../snapshot/svgtoimg":393,"../snapshot/tosvg":395,"../version":561,"./plot_api":332,"fast-isnumeric":33}],339:[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 f=Object.keys(e),d=0;d<f.length;d++){var y=f[d];if("transforms"!==y){var g=o.slice();g.push(y);var v=e[y],x=t[y],b=m(r,y),_=(b||{}).valType,w="info_array"===_,k="colorscale"===_,T=(b||{}).items;if(h(r,y))if(l(v)&&l(x)&&"any"!==_)u(v,x,b,a,i,g);else if(w&&s(v)){v.length>x.length&&a.push(p("unused",i,g.concat(x.length)));var M,A,S,L,C,D=x.length,O=Array.isArray(T);if(O&&(D=Math.min(D,T.length)),2===b.dimensions)for(A=0;A<D;A++)if(s(v[A])){v[A].length>x[A].length&&a.push(p("unused",i,g.concat(A,x[A].length)));var P=x[A].length;for(M=0;M<(O?Math.min(P,T[A].length):P);M++)S=O?T[A][M]:T,L=v[A][M],C=x[A][M],n.validate(L,S)?C!==L&&C!==+L&&a.push(p("dynamic",i,g.concat(A,M),L,C)):a.push(p("value",i,g.concat(A,M),L))}else a.push(p("array",i,g.concat(A),v[A]));else for(A=0;A<D;A++)S=O?T[A]:T,L=v[A],C=x[A],n.validate(L,S)?C!==L&&C!==+L&&a.push(p("dynamic",i,g.concat(A),L,C)):a.push(p("value",i,g.concat(A),L))}else if(b.items&&!w&&s(v)){var E,R,z=T[Object.keys(T)[0]],I=[];for(E=0;E<x.length;E++){var N=x[E]._index||E;if((R=g.slice()).push(N),l(v[N])&&l(x[E])){I.push(N);var F=v[N],j=x[E];l(F)&&!1!==F.visible&&!1===j.visible?a.push(p("invisible",i,R)):u(F,j,z,a,i,R)}}for(E=0;E<v.length;E++)(R=g.slice()).push(E),l(v[E])?-1===I.indexOf(E)&&a.push(p("unused",i,R)):a.push(p("object",i,R,v[E]))}else!l(v)&&l(x)?a.push(p("object",i,g,v)):c(v)||!c(x)||w||k?y in t?n.validate(v,b)?"enumerated"===b.valType&&(b.coerceNumber&&v!==+x||v!==x)&&a.push(p("dynamic",i,g,v,x)):a.push(p("value",i,g,v)):a.push(p("unused",i,g,v)):a.push(p("array",i,g,v));else a.push(p("schema",i,g))}}return a}t.exports=function(e,t){void 0===e&&(e=[]),void 0===t&&(t={});var r,c,f=i.get(),d=[],h={_context:n.extendFlat({},o)};s(e)?(h.data=n.extendDeep([],e),r=e):(h.data=[],r=[],d.push(p("array","data"))),l(t)?(h.layout=n.extendDeep({},t),c=t):(h.layout={},c={},arguments.length>1&&d.push(p("object","layout"))),a.supplyDefaults(h);for(var m=h._fullData,y=r.length,g=0;g<y;g++){var v=r[g],x=["data",g];if(l(v)){var b=m[g],_=b.type,w=f.traces[_].attributes;w.type={valType:"enumerated",values:[_]},!1===b.visible&&!1!==v.visible&&d.push(p("invisible",x)),u(v,b,w,d,x);var k=v.transforms,T=b.transforms;if(k){s(k)||d.push(p("array",x,["transforms"])),x.push("transforms");for(var M=0;M<k.length;M++){var A=["transforms",M],S=k[M].type;if(l(k[M])){var L=f.transforms[S]?f.transforms[S].attributes:{};L.type={valType:"enumerated",values:Object.keys(f.transforms)},u(k[M],T[M],L,d,x,A)}else d.push(p("object",x,A))}}}else d.push(p("object",x))}return u(c,h._fullLayout,function(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}(f,m),d,"layout"),0===d.length?void 0:d};var f={object:function(e,t){return("layout"===e&&""===t?"The layout argument":"data"===e[0]&&""===t?"Trace "+e[1]+" in the data argument":d(e)+"key "+t)+" must be linked to an object container"},array:function(e,t){return("data"===e?"The data argument":d(e)+"key "+t)+" must be linked to an array container"},schema:function(e,t){return d(e)+"key "+t+" is not part of the schema"},unused:function(e,t,r){var n=l(r)?"container":"key";return d(e)+n+" "+t+" did not get coerced"},dynamic:function(e,t,r,n){return[d(e)+"key",t,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(e,t){return(t?d(e)+"item "+t:"Trace "+e[1])+" got defaulted to be not visible"},value:function(e,t,r){return[d(e)+"key "+t,"is set to an invalid value ("+r+")"].join(" ")}};function d(e){return s(e)?"In data trace "+e[1]+", ":"In "+e+", "}function p(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 h(e,t){var r=g(t),n=r.keyMinusId,a=r.id;return!!(n in e&&e[n]._isSubplotObj&&a)||t in e}function m(e,t){return t in e?e[t]:e[g(t).keyMinusId]}var y=n.counterRegex("([a-z]+)");function g(e){var t=e.match(y);return{keyMinusId:t&&t[1],id:t&&t[2]}}},{"../lib":299,"../plots/plots":380,"./plot_config":333,"./plot_schema":334}],340:[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"}}}},{}],341:[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]:[],f=t[l]=[],d=a.arrayTemplater(t,l,s);for(i=0;i<u.length;i++){var p=u[i];n.isPlainObject(p)?o=d.newItem(p):(o=d.newItem({}))[s]=!1,o._index=i,!1!==o[s]&&r.handleItemDefaults(p,o,t,r),f.push(o)}var h=d.defaultItems();for(i=0;i<h.length;i++)(o=h[i])._index=f.length,r.handleItemDefaults({},o,t,r,{}),f.push(o);if(n.isArrayOrTypedArray(c)){var m=Math.min(c.length,f.length);for(i=0;i<m;i++)n.relinkPrivateKeys(f[i],c[i])}return f}},{"../lib":299,"../plot_api/plot_template":335}],342:[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"},legendwidth:{valType:"number",min:0,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":189,"./font_attributes":374}],343:[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 f=+u.substring(1);if(!(f>0&&Math.round(f)===f))return{vals:a};c=f}for(var d=t.calendar,p="start"===s,h="end"===s,m=e[r+"period0"],y=i(m,d)||0,g=[],v=[],x=[],b=a.length,_=0;_<b;_++){var w,k,T,M=a[_];if(c){for(w=Math.round((M-y)/(c*l)),T=o(y,c*w,d);T>M;)T=o(T,-c,d);for(;T<=M;)T=o(T,c,d);k=o(T,-c,d)}else{for(T=y+(w=Math.round((M-y)/u))*u;T>M;)T-=u;for(;T<=M;)T+=u;k=T-u}g[_]=p?k:h?T:(k+T)/2,v[_]=k,x[_]=T}return{vals:g,starts:v,ends:x}}},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],344:[function(e,t,r){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],345:[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,f=c.isLinked;function d(e,t){var r,n,a=[],o=e._fullLayout,l=h(o,t,0),s=h(o,t,1),c=y(e,t),u=c.min,f=c.max;if(0===u.length||0===f.length)return i.simpleMap(t.range,t.r2l);var d=u[0].val,m=f[0].val;for(r=1;r<u.length&&d===m;r++)d=Math.min(d,u[r].val);for(r=1;r<f.length&&d===m;r++)m=Math.max(m,f[r].val);var g=!1;if(t.range){var v=i.simpleMap(t.range,t.r2l);g=v[1]<v[0]}"reversed"===t.autorange&&(g=!0,t.autorange=!0);var x,b,_,w,k,T,M=t.rangemode,A="tozero"===M,S="nonnegative"===M,L=t._length,C=L/10,D=0;for(r=0;r<u.length;r++)for(x=u[r],n=0;n<f.length;n++)(T=(b=f[n]).val-x.val-p(t,x.val,b.val))>0&&((k=L-l(x)-s(b))>C?T/k>D&&(_=x,w=b,D=T/k):T/L>D&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},D=T/L));if(d===m){var O=d-1,P=d+1;if(A)if(0===d)a=[0,1];else{var E=(d>0?f:u).reduce(function(e,t){return Math.max(e,s(t))},0),R=d/(1-Math.min(.5,E/L));a=d>0?[0,R]:[R,0]}else a=S?[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})):S&&(_.val-D*l(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),D=(w.val-_.val-p(t,x.val,b.val))/(L-l(_)-s(w)),a=[_.val-D*l(_),w.val+D*s(w)];return g&&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 f(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 f=i.deg2rad(u._tickAngles[u._id+"tick"]||0),d=Math.abs(Math.cos(f)),p=Math.abs(Math.sin(f));if(!u._vals[0].bb){var h=u._id+"tick",y=u._selections[h];y.each(function(e){var t=n.select(this),r=t.select(".text-math-group");r.empty()&&(e.bb=s.bBox(t.node()))})}for(var g=0;g<u._vals.length;g++){var v=u._vals[g],x=v.bb;if(x){var b=2*m+x.width,_=2*m+x.height;a=Math.max(a,o?Math.max(b*d,_*p):Math.max(_*d,b*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:d,makePadFn:h,doAutoRange:function(e,t,r){if(t.setScale(),t.autorange){t.range=r?r.slice():d(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=d(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,f,d,p,h=[],m=[],y=t.length,x=r.padded||!1,_=r.tozero&&("linear"===e.type||"-"===e.type),w="log"===e.type,k=!1,T=r.vpadLinearized||!1;function M(e){if(Array.isArray(e))return k=!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=M((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),S=M((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),L=M(r.vpadplus||r.vpad),C=M(r.vpadminus||r.vpad);if(!k){if(d=1/0,p=-1/0,w)for(n=0;n<y;n++)(i=t[n])<d&&i>0&&(d=i),i>p&&i<o&&(p=i);else for(n=0;n<y;n++)(i=t[n])<d&&i>-o&&(d=i),i>p&&i<o&&(p=i);t=[d,p],y=2}var D={tozero:_,extrapad:x};function O(r){l=t[r],a(l)&&(u=A(r),f=S(r),T?(s=e.c2l(l)-C(r),c=e.c2l(l)+L(r)):(d=l-C(r),p=l+L(r),w&&d<p/10&&(d=p/10),s=e.c2l(d),c=e.c2l(p)),_&&(s=Math.min(0,s),c=Math.max(0,c)),b(s)&&g(h,s,f,D),b(c)&&v(m,c,u,D))}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:y};var m=3;function y(e,t,r){var n,a,i,o=t._id,l=e._fullData,s=e._fullLayout,c=[],f=[];function d(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(f,i.val,i.pad,{extrapad:i.extrapad})}}}if(d(l,t._traceIndices),d(s.annotations||[],t._annIndices||[]),d(s.shapes||[],t._shapeIndices||[]),t._matchGroup&&!r)for(var p in t._matchGroup)if(p!==t._id){var h=u(e,p),m=y(e,h,!0),x=t._length/h._length;for(a=0;a<m.min.length;a++)i=m.min[a],g(c,i.val,i.pad*x,{extrapad:i.extrapad});for(a=0;a<m.max.length;a++)i=m.max[a],v(f,i.val,i.pad*x,{extrapad:i.extrapad})}return{min:c,max:f}}function g(e,t,r,n){x(e,t,r,n,_)}function v(e,t,r,n){x(e,t,r,n,w)}function x(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 b(e){return a(e)&&Math.abs(e)<o}function _(e,t){return e<=t}function w(e,t){return e>=t}},{"../../components/drawing":180,"../../constants/numerical":279,"../../lib":299,"../../registry":387,"./axis_ids":350,"@plotly/d3":20,"fast-isnumeric":33}],346:[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"),f=e("../../components/color"),d=e("../../components/drawing"),p=e("./layout_attributes"),h=e("./clean_ticks"),m=e("../../constants/numerical"),y=m.ONEMAXYEAR,g=m.ONEAVGYEAR,v=m.ONEMINYEAR,x=m.ONEMAXQUARTER,b=m.ONEAVGQUARTER,_=m.ONEMINQUARTER,w=m.ONEMAXMONTH,k=m.ONEAVGMONTH,T=m.ONEMINMONTH,M=m.ONEWEEK,A=m.ONEDAY,S=A/2,L=m.ONEHOUR,C=m.ONEMIN,D=m.ONESEC,O=m.MINUS_SIGN,P=m.BADNUM,E={K:"zeroline"},R={K:"gridline",L:"path"},z={K:"minor-gridline",L:"path"},I={K:"tick",L:"path"},N={K:"tick",L:"text"},F={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},j=e("../../constants/alignment"),B=j.MID_SHIFT,H=j.CAP_SHIFT,q=j.LINE_SPACING,U=j.OPPOSITE_SIDE,Y=3,V=t.exports={};V.setConvert=e("./set_convert");var Z=e("./axis_autotype"),G=e("./axis_ids"),W=G.idSort,J=G.isLinked;V.id2name=G.id2name,V.name2id=G.name2id,V.cleanId=G.cleanId,V.list=G.list,V.listIds=G.listIds,V.getFromId=G.getFromId,V.getFromTrace=G.getFromTrace;var X=e("./autorange");V.getAutoRange=X.getAutoRange,V.findExtremes=X.findExtremes;var K=1e-4;function Q(e){var t=(e[1]-e[0])*K;return[e[0]-t,e[1]+t]}V.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)},V.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},V.coercePosition=function(e,t,r,n,a,i){var o,s;if("range"!==V.getRefType(n))o=l.ensureNumber,s=r(a,i);else{var c=V.getFromId(t,n);s=r(a,i=c.fraction2r(i)),o=c.cleanPos}e[a]=o(s)},V.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?l.ensureNumber:V.getFromId(t,r).cleanPos)(e)},V.redrawComponents=function(e,t){t=t||V.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 f=r[V.id2name(t[u])][i],d=0;d<f.length;d++){var p=f[d];if(!c[p]&&(s(e,p),c[p]=1,l))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0),n("selections","drawOne","_selectionIndices")};var $=V.getDataConversions=function(e,t,r,n){var a,i="x"===r||"y"===r||"z"===r?r:n;if(Array.isArray(i)){if(a={type:Z(n,void 0,{autotypenumbers:e._fullLayout.autotypenumbers}),_categories:[]},V.setConvert(a),"category"===a.type)for(var o=0;o<n.length;o++)a.d2c(n[o])}else a=V.getFromTrace(e,t,i);return a?{d2c:a.d2c,c2d:a.c2d}:"ids"===i?{d2c:te,c2d:te}:{d2c:ee,c2d:ee}};function ee(e){return+e}function te(e){return String(e)}function re(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function ne(e,t){return Math.abs(e/t-1)<.001}function ae(e){return+e.substring(1)}function ie(e){var t=Q(l.simpleMap(e.range,e.r2l)),r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),a="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 i=[],o=0;o<=1;o++)if(!o||e.minor){var s=o?e.minor.tickvals:e.tickvals,c=o?[]:e.ticktext;if(s){Array.isArray(c)||(c=[]);for(var u=0;u<s.length;u++){var f=a(s[u]);if(f>r&&f<n){var d=void 0===c[u]?V.tickText(e,f):me(e,f,String(c[u]));o&&(d.minor=!0,d.text=""),i.push(d)}}}}return e.rangebreaks&&(i=i.filter(function(t){return e.maskBreaks(t.x)!==P})),i}V.getDataToCoordFunc=function(e,t,r,n){return $(e,t,r,n).d2c},V.counterLetter=function(e){var t=e.charAt(0);return"x"===t?"y":"y"===t?"x":void 0},V.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},V.saveRangeInitial=function(e,t){for(var r=V.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},V.saveShowSpikeInitial=function(e,t){for(var r=V.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},V.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},V.setConvert(s),o=o&&h.dtick(o,s.type))s.dtick=o,s.tick0=h.tick0(void 0,s.type,i);else{var f;if(r)f=(u-c)/r;else{var d=l.distinctVals(e),p=Math.pow(10,Math.floor(Math.log(d.minDiff)/Math.LN10)),m=p*l.roundUp(d.minDiff/p,[.9,1.9,4.9,9.9],!0);f=Math.max(m,2*l.stdev(e)/Math.pow(e.length,n?.25:.4)),a(f)||(f=1)}V.autoTicks(s,f)}var y,g=s.dtick,v=V.tickIncrement(V.tickFirst(s),g,"reverse",i);if("number"==typeof g)y=(v=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 f=0;f<t.length;f++)t[f]%1==0?s++:a(t[f])||c++,u(t[f])&&o++,u(t[f]+r.dtick/2)&&l++;var d=t.length-c;if(s===d&&"date"!==r.type)r.dtick<1?e=n-.5*r.dtick:(e-=.5)+r.dtick<n&&(e+=r.dtick);else if(l<.1*d&&(o>.3*d||u(n)||u(i))){var p=r.dtick/2;e+=e+p<n?p:-p}return e}(v,e,s,c,u))+(1+Math.floor((u-v)/g))*g;else for("M"===s.dtick.charAt(0)&&(v=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=V.tickIncrement(e,"M6","reverse")+1.5*A:i.exactMonths>.8?e=V.tickIncrement(e,"M1","reverse")+15.5*A:e-=S;var s=V.tickIncrement(e,r);if(s<=n)return s}return e}(v,e,g,c,i)),y=v,0;y<=u;)y=V.tickIncrement(y,g,!1,i),0;return{start:t.c2r(v,0,i),end:t.c2r(y,0,i),size:g,_dataSpan:u-c}},V.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n,i=t.dtick&&a(t._tmin);if(i){var o=V.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,.99*o+.01*t._tmin]}else{var s=l.simpleMap(t.range,t.r2l);n=[s[0],.8*s[0]+.2*s[1]]}if(e.range=l.simpleMap(n,t.l2r),e._isMinor=!0,V.prepTicks(e,r),i){var c=a(t.dtick),u=a(e.dtick),f=c?t.dtick:+t.dtick.substring(1),d=u?e.dtick:+e.dtick.substring(1);c&&u?re(f,d)?f===2*M&&d===2*A&&(e.dtick=M):f===2*M&&d===3*A?e.dtick=M:f!==M||(t._input.minor||{}).nticks?ne(f/d,2.5)?e.dtick=f/2:e.dtick=f:e.dtick=A:"M"===String(t.dtick).charAt(0)?u?e.dtick="M1":re(f,d)?f>=12&&2===d&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?re(f,d)||(e.dtick=ne(f/d,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},V.prepTicks=function(e,t){var r=l.simpleMap(e.range,e.r2l,void 0,void 0,t);if("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)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,V.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=V.getTickFormat(e);if(i){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=L,o&&!n&&e.dtick<L&&(e.dtick=L)):/%p/.test(i)?(t=S,o&&!n&&e.dtick<S&&(e.dtick=S)):/%[Aadejuwx]/.test(i)?(t=A,o&&!n&&e.dtick<A&&(e.dtick=A)):/%[UVW]/.test(i)?(t=M,o&&!n&&e.dtick<M&&(e.dtick=M)):/%[Bbm]/.test(i)?(t=k,o&&(n?ae(e.dtick)<1:e.dtick<T)&&(e.dtick="M1")):/%[q]/.test(i)?(t=b,o&&(n?ae(e.dtick)<3:e.dtick<_)&&(e.dtick="M3")):/%[Yy]/.test(i)&&(t=g,o&&(n?ae(e.dtick)<12:e.dtick<v)&&(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),he(e)},V.calcTicks=function(e,t){for(var r,n,i=e.type,o=e.calendar,s=e.ticklabelstep,c="period"===e.ticklabelmode,u=l.simpleMap(e.range,e.r2l,void 0,void 0,t),f=u[1]<u[0],d=Math.min(u[0],u[1]),p=Math.max(u[0],u[1]),h=Math.max(1e3,e._length||0),m=[],C=[],D=[],O=[],E=e.minor&&(e.minor.ticks||e.minor.showgrid),R=1;R>=(E?0:1);R--){var z=!R;R?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var I=R?e:l.extendFlat({},e,e.minor);if(z?V.prepMinorTicks(I,e,t):V.prepTicks(I,t),"array"!==I.tickmode){var N=Q(u),F=N[0],j=N[1],B=a(I.dtick),H="log"===i&&!(B||"L"===I.dtick.charAt(0)),q=V.tickFirst(I,t);if(R){if(e._tmin=q,q<F!==f)break;"category"!==i&&"multicategory"!==i||(j=f?Math.max(-.5,j):Math.min(e._categories.length-.5,j))}var U,Y,Z=null,G=q;if(R)B?Y=e.dtick:"date"===i?"string"==typeof e.dtick&&"M"===e.dtick.charAt(0)&&(Y=k*e.dtick.substring(1)):Y=e._roughDTick,U=Math.round((e.r2l(G)-e.r2l(e.tick0))/Y)-1;var W=I.dtick;for(I.rangebreaks&&I._tick0Init!==I.tick0&&(G=Re(G,e),f||(G=V.tickIncrement(G,W,!f,o))),R&&c&&(G=V.tickIncrement(G,W,!f,o),U--);f?G>=j:G<=j;G=V.tickIncrement(G,W,f,o)){if(R&&U++,I.rangebreaks&&!f){if(G<F)continue;if(I.maskBreaks(G)===P&&Re(G,I)>=p)break}if(D.length>h||G===Z)break;Z=G;var J={value:G};R?(H&&G!==(0|G)&&(J.simpleLabel=!0),s>1&&U%s&&(J.skipLabel=!0),D.push(J)):(J.minor=!0,O.push(J))}}else R?(D=[],m=ie(e)):(O=[],C=ie(e))}if(E&&!("inside"===e.minor.ticks&&"outside"===e.ticks||"outside"===e.minor.ticks&&"inside"===e.ticks)){for(var X=D.map(function(e){return e.value}),K=[],$=0;$<O.length;$++){var ee=O[$],te=ee.value;if(-1===X.indexOf(te)){for(var re=!1,ne=0;!re&&ne<D.length;ne++)1e7+D[ne].value===1e7+te&&(re=!0);re||K.push(ee)}}O=K}if(c&&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),f=r||u,d=0;f>=v?d=u>=v&&u<=y?u:g:r===b&&f>=_?d=u>=_&&u<=x?u:b:f>=T?d=u>=T&&u<=w?u:k:r===M&&f>=M?d=M:f>=A?d=A:r===S&&f>=S?d=S:r===L&&f>=L&&(d=L),d>=u&&(d=u,l=!0);var p=a+d;if(t.rangebreaks&&d>0){for(var h=0,m=0;m<84;m++){var C=(m+.5)/84;t.maskBreaks(a*(1-C)+C*p)!==P&&h++}(d*=h/84)||(e[n].drop=!0),l&&u>M&&(d=u)}(d>0||0===n)&&(e[n].periodX=a+d/2)}}(D,e,e._definedDelta),e.rangebreaks){var ae="y"===e._id.charAt(0),oe=1;"auto"===e.tickmode&&(oe=e.tickfont?e.tickfont.size:12);var le=NaN;for(r=D.length-1;r>-1;r--)if(D[r].drop)D.splice(r,1);else{D[r].value=Re(D[r].value,e);var se=e.c2p(D[r].value);(ae?le>se-oe:le<se+oe)?D.splice(f?r+1:r,1):le=se}}Ee(e)&&360===Math.abs(u[1]-u[0])&&D.pop(),e._tmax=(D[D.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var ce,ue,fe=function(t){t.text="",e._prevDateHead=n};for(D=D.concat(O),r=0;r<D.length;r++){var de=D[r].minor,pe=D[r].value;de?C.push({x:pe,minor:!0}):(n=e._prevDateHead,ce=V.tickText(e,pe,!1,D[r].simpleLabel),void 0!==(ue=D[r].periodX)&&(ce.periodX=ue,(ue>p||ue<d)&&(ue>p&&(ce.periodX=p),ue<d&&(ce.periodX=d),fe(ce))),D[r].skipLabel&&fe(ce),m.push(ce))}return m=m.concat(C),e._inCalcTicks=!1,c&&m.length&&(m[0].noTick=!0),m};var oe=[2,5,10],le=[1,2,3,6,12],se=[1,2,5,10,15,30],ce=[1,2,3,7,14],ue=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],fe=[-.301,0,.301,.699,1],de=[15,30,45,90,180];function pe(e,t,r){return t*l.roundUp(e/t,r)}function he(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>=C&&i<=16||t>=L)e._tickround="M";else if(t>=D&&i<=19||t>=C)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&&(ge(e.exponentformat)&&!ve(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function me(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}}V.autoTicks=function(e,t,r){var n;function i(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=l.dateTick0(e.calendar,0);var o=2*t;if(o>g)t/=g,n=i(10),e.dtick="M"+12*pe(t,n,oe);else if(o>k)t/=k,e.dtick="M"+pe(t,1,le);else if(o>A){if(e.dtick=pe(t,A,e._hasDayOfWeekBreaks?[1,2,7,14]:ce),!r){var s=V.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(s)?e.tick0=l.dateTick0(e.calendar,2):e.tick0=l.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else o>L?e.dtick=pe(t,L,le):o>C?e.dtick=pe(t,C,se):o>D?e.dtick=pe(t,D,se):(n=i(10),e.dtick=pe(t,n,oe))}else if("log"===e.type){e.tick0=0;var u=l.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var f=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/f,n=i(10),e.dtick="L"+pe(t,n,oe)}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))):Ee(e)?(e.tick0=0,n=1,e.dtick=pe(t,n,de)):(e.tick0=0,n=i(10),e.dtick=pe(t,n,oe));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)}},V.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?fe:ue,f=e+.01*o,d=l.roundUp(l.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(t)},V.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=Q(i)[0],u=e.dtick,f=r(e.tick0);if(a(u)){var d=s((c-f)/u)*u+f;return"category"!==e.type&&"multicategory"!==e.type||(d=l.constrain(d,0,e._categories.length-1)),d}var p=u.charAt(0),h=Number(u.substr(1));if("M"===p){for(var m,y,g,v=0,x=f;v<10;){if(((m=V.tickIncrement(x,u,o,e.calendar))-c)*(x-c)<=0)return o?Math.min(x,m):Math.max(x,m);y=(c-(x+m)/2)/(m-x),g=p+(Math.abs(Math.round(y))||1)*h,x=V.tickIncrement(x,g,y<0?!o:o,e.calendar),v++}return l.error("tickFirst did not converge",e),x}if("L"===p)return Math.log(s((Math.pow(10,c)-f)/h)*h+f)/Math.LN10;if("D"===p){var b="D2"===u?fe:ue,_=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)},V.tickText=function(e,t,r,n){var i,o=me(e,t),s="array"===e.tickmode,c=r||s,u=e.type,f="category"===u?e.d2l_noadd:e.d2l;if(s&&Array.isArray(e.ticktext)){var d=l.simpleMap(e.range,e.r2l),p=(Math.abs(d[1]-d[0])-(e._lBreaks||0))/1e4;for(i=0;i<e.ticktext.length&&!(Math.abs(t-f(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||V.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 f=ze(e),d=e._trueSide||e.side;(!f&&"top"===d||f&&"bottom"===d)&&(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=xe(Math.pow(10,s),e,i,n);else if(a(o)||"D"===u&&l.mod(s+.01,1)<.1){var f=Math.round(s),d=Math.abs(f),p=e.exponentformat;"power"===p||ge(p)&&ve(f)?(t.text=0===f?1:1===f?"10":"10<sup>"+(f>1?"":O)+d+"</sup>",t.fontSize*=1.25):("e"===p||"E"===p)&&d>2?t.text="1"+p+(f>0?"+":O)+d:(t.text=xe(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):Ee(e)?function(e,t,r,n,a){if("radians"!==e.thetaunit||r)t.text=xe(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){var r=1;for(;!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=xe(l.deg2rad(t.x),e,a,n);else{var s=t.x<0;1===o[1]?1===o[0]?t.text="π":t.text=o[0]+"π":t.text=["<sup>",o[0],"</sup>","","<sub>",o[1],"</sub>","π"].join(""),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=xe(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 y=function(t){var r=e.l2p(t);return r>=0&&r<=e._length?t:null};o.xbnd=[y(o.x-.5),y(o.x+e.dtick-.5)]}return o},V.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 V.hoverLabelText(e,n,r)+" - "+V.hoverLabelText(e,a,r);var i="log"===e.type&&n<=0,o=V.tickText(e,e.c2l(i?-n:n),"hover").text;return i?0===n?"0":O+o:o};var ye=["f","p","n","μ","m","","k","M","G","T"];function ge(e){return"SI"===e||"B"===e}function ve(e){return e>14||e<-15}function xe(e,t,r,n){var i=e<0,o=t._tickround,s=r||t.exponentformat||"B",c=t._tickexponent,u=V.getTickFormat(t),f=t.separatethousands;if(n){var d={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]};he(d),o=(Number(d._tickround)||0)+4,c=d._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 y=(e=String(e)).indexOf(".")+1;y&&(e=e.substr(0,y+o).replace(/\.?0+$/,""))}e=l.numSeparate(e,t._separators,f)}c&&"hide"!==s&&(ge(s)&&ve(c)&&(s="power"),p=c<0?O+-c:"power"!==s?"+"+c:String(c),"e"===s||"E"===s?e+=s+p:"power"===s?e+="×10<sup>"+p+"</sup>":"B"===s&&9===c?e+="B":ge(s)&&(e+=ye[c/3+5]));return i?O+e:e}function be(e,t){if(e){var r=Object.keys(F).reduce(function(e,r){return-1!==t.indexOf(r)&&F[r].forEach(function(t){e[t]=1}),e},{});Object.keys(e).forEach(function(t){r[t]||(1===t.length?e[t]=0:delete e[t])})}}function _e(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(me(e,l.interp(n[o],.5),o));return r}function we(e){return void 0!==e.periodX?e.periodX:e.x}function ke(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}function Te(e){var t=e.title.font.size,r=(e.title.text.match(c.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r?t*(H+r*q):t*H:r?t*(r+1)*q:t}function Me(e,t){var r=e.l2p(t);return r>1&&r<e._length-1}function Ae(e){var t=n.select(e),r=t.select(".text-math-group");return r.empty()?t.select("text"):r}function Se(e){return e._id+".automargin"}function Le(e){return Se(e)+".mirror"}function Ce(e){return e._id+".rangeslider"}function De(e,t){for(var r=0;r<t.length;r++)-1===e.indexOf(t[r])&&e.push(t[r])}function Oe(e,t,r){var n,a,i=[],o=[],s=e.layout;for(n=0;n<t.length;n++)i.push(V.getFromId(e,t[n]));for(n=0;n<r.length;n++)o.push(V.getFromId(e,r[n]));var c=Object.keys(p),u=["anchor","domain","overlaying","position","side","tickangle","editType"],f=["linear","log"];for(n=0;n<c.length;n++){var d=c[n],h=i[0][d],m=o[0][d],y=!0,g=!1,v=!1;if("_"!==d.charAt(0)&&"function"!=typeof h&&-1===u.indexOf(d)){for(a=1;a<i.length&&y;a++){var x=i[a][d];"type"===d&&-1!==f.indexOf(h)&&-1!==f.indexOf(x)&&h!==x?g=!0:x!==h&&(y=!1)}for(a=1;a<o.length&&y;a++){var b=o[a][d];"type"===d&&-1!==f.indexOf(m)&&-1!==f.indexOf(b)&&m!==b?v=!0:o[a][d]!==m&&(y=!1)}y&&(g&&(s[i[0]._name].type="linear"),v&&(s[o[0]._name].type="linear"),Pe(s,d,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 Pe(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 Ee(e){return"angularaxis"===e._id}function Re(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 ze(e){return-1!==(e.ticklabelposition||"").indexOf("inside")}function Ie(e,t){ze(e._anchorAxis||{})&&e._hideCounterAxisInsideTickLabels&&e._hideCounterAxisInsideTickLabels(t)}V.getTickFormat=function(e){var t,r,n,a,i,o,l,s;function c(e){return"string"!=typeof e?e:Number(e.replace("M",""))*k}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 f(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&&f(e.dtick,n.dtickrange)){r=n;break}}return r?r.value:e.tickformat},V.getSubplots=function(e,t){var r=e._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),a=t?V.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},V.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},V.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=V.list(e,"x",!0),s=V.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})})}},V.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.minorGridlayer&&r.minorGridlayer.selectAll("path").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:V.listIds(e);return l.syncOrAsync(a.map(function(t){return function(){if(t){var n=V.getFromId(e,t),a=V.drawOne(e,n,r);return n._r=n.range.slice(),n._rl=l.simpleMap(n._r,n.r2l),a}}}))},V.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=V.counterLetter(p),y=c._plots[t._mainSubplot];if(y){var g=y[h+"axislayer"],v=t._mainLinePosition,x=t._mainMirrorPosition,b=t._vals=V.calcTicks(t),_=[t.mirror,v,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 k,T,M=V.makeTransTickFn(t),A=V.makeTransTickLabelFn(t),S="inside"===t.ticks,L="outside"===t.ticks;if("boundaries"===t.tickson){var C=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);T=V.clipEnds(t,C),k=S?T:C}else T=V.clipEnds(t,b),k=S&&"period"!==t.ticklabelmode?T:b;var D,O=t._gridVals=T,P=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 E=t._subplotsWith,R={};for(n=0;n<E.length;n++){a=E[n];var z=(s=c._plots[a])[m+"axis"],I=z._mainAxis._id;if(!R[I]){R[I]=1;var N="x"===h?"M0,"+z._offset+"v"+z._length:"M"+z._offset+",0h"+z._length;V.drawGrid(e,t,{vals:O,counterAxis:z,layer:s.gridlayer.select("."+p),minorLayer:s.minorGridlayer.select("."+p),path:N,transFn:M}),V.drawZeroLine(e,t,{counterAxis:z,layer:s.zerolinelayer,path:N,transFn:M})}}}var F=V.getTickSigns(t),j=V.getTickSigns(t,"minor");if(t.ticks||t.minor&&t.minor.ticks){var B,H,Y,Z,G=V.makeTickPath(t,v,F[2]),W=V.makeTickPath(t,v,j[2],{minor:!0});if(t._anchorAxis&&t.mirror&&!0!==t.mirror?(B=V.makeTickPath(t,x,F[3]),H=V.makeTickPath(t,x,j[3],{minor:!0}),Y=G+B,Z=W+H):(B="",H="",Y=G,Z=W),t.showdividers&&L&&"boundaries"===t.tickson){var J={};for(n=0;n<P.length;n++)J[P[n].x]=1;D=function(e){return J[e.x]?B:Y}}else D=function(e){return e.minor?Z:Y}}if(V.drawTicks(e,t,{vals:k,layer:g,path:D,transFn:M}),"allticks"===t.mirror){var X=Object.keys(t._linepositions||{});for(n=0;n<X.length;n++){a=X[n],s=c._plots[a];var K=t._linepositions[a]||[],Q=K[0],$=K[1],ee=K[2],te=V.makeTickPath(t,Q,ee?F[0]:j[0],{minor:ee})+V.makeTickPath(t,$,ee?F[1]:j[1],{minor:ee});V.drawTicks(e,t,{vals:k,layer:s[h+"axislayer"],path:te,transFn:M})}}var re=[];if(re.push(function(){return V.drawLabels(e,t,{vals:b,layer:g,plotinfo:s,transFn:A,labelFns:V.makeLabelFns(t,v)})}),"multicategory"===t.type){var ne={x:2,y:10}[h];re.push(function(){var r={x:"height",y:"width"}[h],n=ie()[r]+ne+(t._tickAngles[p+"tick"]?t.tickfont.size*q:0);return V.drawLabels(e,t,{vals:_e(t,b),layer:g,cls:p+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:M,labelFns:V.makeLabelFns(t,v+n*F[4])})}),re.push(function(){return t._depth=F[4]*(ie("tick2")[t.side]-v),function(e,t,r){var n=t._id+"divider",a=r.vals,i=r.layer.selectAll("path."+n).data(a,ke);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(f.stroke,t.dividercolor).style("stroke-width",d.crispRound(e,t.dividerwidth,1)+"px"),i.attr("transform",r.transFn).attr("d",r.path)}(e,t,{vals:P,layer:g,path:V.makeTickPath(t,v,F[4],{len:t._depth}),transFn:M})})}else t.title.hasOwnProperty("standoff")&&re.push(function(){t._depth=F[4]*(ie()[t.side]-v)});var ae=o.getComponentMethod("rangeslider","isVisible")(t);return re.push(function(){var r,n,a,l,s=t.side.charAt(0),u=U[t.side].charAt(0),f=V.getPxPosition(e,t),d=L?t.ticklen:0;if((t.automargin||ae)&&("multicategory"===t.type?r=ie("tick2"):(r=ie(),"x"===h&&"b"===s&&(t._depth=Math.max(r.width>0?r.bottom-f:0,d)))),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?f-r.top:0,d),p.reverse()),r.width>0){var y=r.right-(t._offset+t._length);y>0&&(n.xr=1,n.r=y);var g=t._offset-r.left;g>0&&(n.xl=0,n.l=g)}}else if("l"===s?n[s]=t._depth=Math.max(r.height>0?f-r.left:0,d):(n[s]=t._depth=Math.max(r.height>0?r.right-f:0,d),p.reverse()),r.height>0){var v=r.bottom-(t._offset+t._length);v>0&&(n.yb=0,n.b=v);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]+=Te(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]+=d),!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]]))}ae&&(l=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(be(n,t.automargin),be(a,t.automargin)),i.autoMargin(e,Se(t),n),i.autoMargin(e,Le(t),a),i.autoMargin(e,Ce(t),l)}),r.skipTitle||ae&&"bottom"===t.side||re.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+Te(t);else{var l=ze(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,f,p,h,m=V.getPxPosition(e,t);"x"===i?(f=t._offset+t._length/2,p="top"===t.side?m-r:m+r):(p=t._offset+t._length/2,f="right"===t.side?m+r:m-r,c={rotate:"-90",offset:0});if("multicategory"!==t.type){var y=t._selections[t._id+"tick"];if(h={selection:y,side:t.side},y&&y.node()&&y.node().parentNode){var g=d.getTranslate(y.node().parentNode);h.offsetLeft=g.x,h.offsetTop=g.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:f,y:p,"text-anchor":"middle"}})}(e,t)}),l.syncOrAsync(re)}}function ie(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=Ae(this),t=d.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]}},V.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],a=e.side===n?1:-1,i=[-1,1,a,-a];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(i=i.map(function(e){return-e})),e.side&&i.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),i},V.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))}},V.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,f=Y,d=e.tickfont?e.tickfont.size:12;(o||n)&&(u+=d*H,f+=(e.linewidth||0)/2);(a||i)&&(u+=(e.linewidth||0)/2,f+=Y);l&&"top"===c&&(f-=d*(1-H));(a||n)&&(u=-u);"bottom"!==c&&"right"!==c||(f=-f);return[s?u:0,l?f:0]}(e),r=t[0],n=t[1];return"x"===e._id.charAt(0)?function(t){return s(r+e._offset+e.l2p(we(t)),n)}:function(t){return s(n,r+e._offset+e.l2p(we(t)))}},V.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=void 0!==n.len?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+l*r)+"v"+i*r:"M"+(t+l*r)+",0h"+i*r},V.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,f=i("inside"),d="inside"===n&&"inside"===e.ticks||!f&&"outside"===e.ticks&&"boundaries"!==e.tickson,p=0,h=0,m=d?e.ticklen:0;if(f?m*=-1:u&&(m=0),d&&(p+=m,r)){var y=l.deg2rad(r);p=m*Math.cos(y)+1,h=m*Math.sin(y)}e.showticklabels&&(d||e.showline)&&(p+=.2*e.tickfont.size);var g,v,x,b,_,w={labelStandoff:p+=(e.linewidth||1)/2*(f?-1:1),labelShift:h},k=0,T=e.side,M=e._id.charAt(0),A=e.tickangle;if("x"===M)b=(_=!f&&"bottom"===T||f&&"top"===T)?1:-1,f&&(b*=-1),g=h*b,v=t+p*b,x=_?1:-.2,90===Math.abs(A)&&(f?x+=B:x=-90===A&&"bottom"===T?H:90===A&&"top"===T?B:.5,k=B/2*(A/90)),w.xFn=function(e){return e.dx+g+k*e.fontSize},w.yFn=function(e){return e.dy+v+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!==f?"end":"start":"middle"},w.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==f?-n:0};else if("y"===M){if(b=(_=!f&&"left"===T||f&&"right"===T)?1:-1,f&&(b*=-1),g=p,v=h*b,x=0,f||90!==Math.abs(A)||(x=-90===A&&"left"===T||90===A&&"right"===T?H:.5),f){var S=a(A)?+A:0;if(0!==S){var L=l.deg2rad(S);k=Math.abs(Math.sin(L))*H*b,x=0}}w.xFn=function(e){return e.dx+t-(g+e.fontSize*x)*b+k*e.fontSize},w.yFn=function(e){return e.dy+v+e.fontSize*B},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},V.drawTicks=function(e,t,r){r=r||{};var a=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(e){return e.minor&&!e.noTick}):[]).concat(t.ticks?r.vals.filter(function(e){return!e.minor&&!e.noTick}):[]),o=r.layer.selectAll("path."+a).data(i,ke);o.exit().remove(),o.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each(function(e){return f.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(r){return d.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Ie(t,[I]),o.attr("transform",r.transFn)},V.drawGrid=function(e,t,r){r=r||{};var a=t._id+"grid",i=t.minor&&t.minor.showgrid,o=i?r.vals.filter(function(e){return e.minor}):[],l=t.showgrid?r.vals.filter(function(e){return!e.minor}):[],s=r.counterAxis;if(s&&V.shouldShowZeroLine(e,t,s))for(var c="array"===t.tickmode,u=0;u<l.length;u++){var p=l[u].x;if(c?!p:Math.abs(p)<t.dtick/100){if(l=l.slice(0,u).concat(l.slice(u+1)),!c)break;u--}}t._gw=d.crispRound(e,t.gridwidth,1);for(var h=i?d.crispRound(e,t.minor.gridwidth,1):0,m=r.layer,y=r.minorLayer,g=1;g>=0;g--){var v=g?m:y;if(v){var x=v.selectAll("path."+a).data(g?l:o,ke);x.exit().remove(),x.enter().append("path").classed(a,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each(function(e){return f.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(e){return d.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(e){return(e.minor?h:t._gw)+"px"}).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}Ie(t,[R,z])},V.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=V.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 W(e.id,t.id)})}),i.attr("transform",r.transFn).attr("d",r.path).call(f.stroke,t.zerolinecolor||f.defaultLine).style("stroke-width",d.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Ie(t,[E])},V.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,o=t._id,u=o.charAt(0),f=r.cls||o+"tick",p=r.vals.filter(function(e){return e.text}),h=r.labelFns,m=r.secondary?0:t.tickangle,y=(t._prevTickAngles||{})[f],g=r.layer.selectAll("g."+f).data(t.showticklabels?p:[],ke),v=[];function x(e,i){e.each(function(e){var o=n.select(this),l=o.select(".text-math-group"),u=h.anchorFn(e,i),f=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=q*e.fontSize,y=h.heightFn(e,a(i)?+i:0,(p-1)*m);if(y&&(f+=s(0,y)),l.empty()){var g=o.select("text");g.attr({transform:f,"text-anchor":u}),g.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var v=d.bBox(l.node()).width*{end:-.5,start:.5}[u];l.attr("transform",f+s(v,0))}})}g.enter().append("g").classed(f,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(d.font,t.font,t.fontSize,t.fontColor).text(t.text).call(c.convertToTspans,e),e._promises[a]?v.push(e._promises.pop().then(function(){x(r,m)})):x(r,m)}),Ie(t,[N]),g.exit().remove(),r.repositionOnUpdate&&g.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 f=Math.min(s,c),p=Math.max(s,c),h=t.side,m=1/0,y=-1/0;for(var v in g.each(function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var i=d.bBox(r.node()),l=0;o?i.right>p?l=1:i.left<f&&(l=1):i.bottom>p?l=1:i.top+(t.tickangle?0:e.fontSize/4)<f&&(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,y="top"===h||"left"===h?Math.max(y,o?i.bottom:i.right):1/0)}}),i._plots){var x=i._plots[v];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]=y)}}}},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&&ze(r)&&(e||[E,z,R,I,N]).forEach(function(e){var o="tick"===e.K&&"text"===e.L&&"period"===t.ticklabelmode,l=i._plots[t._mainSubplot];(e.K===E.K?l.zerolinelayer.selectAll("."+t._id+"zl"):e.K===z.K?l.minorGridlayer.selectAll("."+t._id):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?we(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(g,y+1?y:m);var b=null;t._selections&&(t._selections[f]=g);var _=[function(){return v.length&&Promise.all(v)}];t.automargin&&i._redrawFromAutoMarginCount&&90===y?(b=90,_.push(function(){x(g,y)})):_.push(function(){if(x(g,m),p.length&&"x"===u&&!a(m)&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=0;var e,n=0,i=[];if(g.each(function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),a=Ae(this),o=d.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||"",f=function(e){return-1!==c.indexOf(e)},h=f("top"),y=f("left"),v=f("right"),_=f("bottom")||y||h||v?(t.tickwidth||0)+2*Y: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 k=2;for(t.ticks&&(k+=t.tickwidth/2),e=0;e<i.length;e++){var T=p[e].xbnd,M=i[e];if(null!==T[0]&&M.left-t.l2p(T[0])<k||null!==T[1]&&t.l2p(T[1])-M.right<k){b=90;break}}}b&&x(g,b)}}),t._tickAngles&&_.push(function(){t._tickAngles[f]=null===b?a(m)?m:0:b});var w=t._anchorAxis;w&&w.autorange&&ze(t)&&!J(i,t._id)&&(i._insideTickLabelsAutorange||(i._insideTickLabelsAutorange={}),i._insideTickLabelsAutorange[w._name+".autorange"]=w.autorange,_.push(function(){g.each(function(e,r){var n=Ae(this);n.select(".text-math-group").empty()&&(t._vals[r].bb=d.bBox(n.node()))})}));var k=l.syncOrAsync(_);return k&&k.then&&e._promises.push(k),k},V.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},V.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)&&(Me(t,0)||!function(e,t,r,n){var a=r._mainAxis;if(!a)return;var i=e._fullLayout,o=t._id.charAt(0),l=V.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 f=V.list(e,l),d=0;d<f.length;d++){var p=f[d];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))},V.clipEnds=function(e,t){return t.filter(function(t){return Me(e,t.x)})},V.allowAutoMargin=function(e){for(var t=V.list(e,"",!0),r=0;r<t.length;r++){var n=t[r];n.automargin&&(i.allowAutoMargin(e,Se(n)),n.mirror&&i.allowAutoMargin(e,Le(n))),o.getComponentMethod("rangeslider","isVisible")(n)&&i.allowAutoMargin(e,Ce(n))}},V.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]],De(c.x,s.x),De(c.y,s.y);De(c.x,[o]),De(c.y,[l])}else a.push({x:[o],y:[l]})}}return a}(e,t),n=0;n<r.length;n++)Oe(e,r[n].x,r[n].y)}},{"../../components/color":158,"../../components/drawing":180,"../../components/titles":267,"../../constants/alignment":274,"../../constants/numerical":279,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../../registry":387,"./autorange":345,"./axis_autotype":347,"./axis_ids":350,"./clean_ticks":352,"./layout_attributes":359,"./set_convert":365,"@plotly/d3":20,"fast-isnumeric":33}],347:[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 f(e){return Math.max(1,(e-1)/1e3)}t.exports=function(e,t,r){var a=e,d=r.noMultiCategory;if(o(a)&&!a.length)return"-";if(!d&&function(e){return o(e[0])&&o(e[1])}(a))return"multicategory";if(d&&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=f(r),i=0,o=0,s={},u=0;u<r;u+=a){var d=c(u),p=e[d],h=String(p);s[h]||(s[h]=1,l(p,t)&&i++,n(p)&&o++)}return i>2*o}(a,t))return"date";var y="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=f(r),a=0,o=0,l={},u=0;u<r;u+=n){var d=c(u),p=e[d],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,y)?"category":function(e,t){for(var r=e.length,n=0;n<r;n++)if(u(e[n],t))return!0;return!1}(a,y)?"linear":"-"}},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],348:[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("../array_container_defaults"),s=e("./layout_attributes"),c=e("./tick_value_defaults"),u=e("./tick_mark_defaults"),f=e("./tick_label_defaults"),d=e("./prefix_suffix_defaults"),p=e("./category_order_defaults"),h=e("./line_grid_defaults"),m=e("./set_convert"),y=e("./constants").WEEKDAY_PATTERN,g=e("./constants").HOUR_PATTERN;function v(e,t,r){function a(r,n){return i.coerce(e,t,s.rangebreaks,r,n)}if(a("enabled")){var o=a("bounds");if(o&&o.length>=2){var l,c,u="";if(2===o.length)for(l=0;l<2;l++)if(c=b(o[l])){u=y;break}var f=a("pattern",u);if(f===y)for(l=0;l<2;l++)(c=b(o[l]))&&(t.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case y: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[l]=o[l]=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[l]=o[l]=c}if(!1===r.autorange){var d=r.range;if(d[0]<d[1]){if(o[0]<d[0]&&o[1]>d[1])return void(t.enabled=!1)}else if(o[0]>d[0]&&o[1]<d[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 x,b=n.letter,_=n.font||{},w=n.splomStash||{},k=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||(x=r("ticklabelmode")));var A="";n.noTicklabelposition&&"multicategory"!==M||(A=i.coerce(e,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===x?["outside","inside"]:"x"===b?["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!==A.indexOf("inside")?"hide past domain":"category"===M||"multicategory"===M?"allow":"hide past div"),m(t,g);var S=!t.isValidRange(e.range);S&&n.reverseDflt&&(S="reversed"),!r("autorange",S)||"linear"!==M&&"-"!==M||r("rangemode"),r("range"),t.cleanRange(),p(e,t,r,n),"category"===M||n.noHover||r("hoverformat");var L=r("color"),C=L!==s.color.dflt?L:_.color,D=w.label||g._dfltTitle[b];if(d(e,t,r,M,n),!k)return t;r("title.text",D),i.coerceFont(r,"title.font",{family:_.family,size:i.bigFont(_.size),color:C}),c(e,t,r,M);var O=n.hasMinor;if(O&&(o.newContainer(t,"minor"),c(e,t,r,M,{isMinor:!0})),f(e,t,r,M,n),u(e,t,r,n),O){var P=n.isMinor;n.isMinor=!0,u(e,t,r,n),n.isMinor=P}h(e,t,r,{dfltColor:L,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:O,attributes:s}),!O||t.minor.ticks||t.minor.showgrid||delete t.minor,(t.showline||t.ticks)&&r("mirror"),n.automargin&&r("automargin");var E,R="multicategory"===M;n.noTickson||"category"!==M&&!R||!t.ticks&&!t.showgrid||(R&&(E="boundaries"),"boundaries"===r("tickson",E)&&delete t.ticklabelposition);R&&(r("showdividers")&&(r("dividercolor"),r("dividerwidth")));if("date"===M)if(l(e,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:v}),t.rangebreaks.length){for(var z=0;z<t.rangebreaks.length;z++)if(t.rangebreaks[z].pattern===y){t._hasDayOfWeekBreaks=!0;break}if(m(t,g),g._has("scattergl")||g._has("splom"))for(var I=0;I<n.data.length;I++){var N=n.data[I];"scattergl"!==N.type&&"splom"!==N.type||(N.visible=!1,i.warn(N.type+" traces do not work on axes with rangebreaks. Setting trace "+N.index+" to `visible: false`."))}}else delete t.rangebreaks;return t};var x={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function b(e){if("string"==typeof e)return x[e.substr(0,3).toLowerCase()]}},{"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387,"../array_container_defaults":341,"./category_order_defaults":351,"./constants":353,"./layout_attributes":359,"./line_grid_defaults":361,"./prefix_suffix_defaults":363,"./set_convert":365,"./tick_label_defaults":367,"./tick_mark_defaults":368,"./tick_value_defaults":369,"fast-isnumeric":33}],349:[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":276}],350:[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":387,"./constants":353}],351:[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()))}}},{}],352:[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":279,"../../lib":299,"fast-isnumeric":33}],353:[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,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,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":315}],354:[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 f(e,t,r){var a=r.axIds,l=r.layoutOut,s=r.hasImage,c=l._axisConstraintGroups,u=l._axisMatchGroups,f=t._id,m=f.charAt(0),y=((l._splomAxes||{})[m]||{})[f]||{},g=t._id,v="x"===g.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:v?["left","center","right"]:["bottom","middle","top"],dflt:v?"center":"middle"}},"constraintoward");var b,_,w=t.type,k=[];for(b=0;b<a.length;b++){if((_=a[b])!==g)l[i(_)].type===w&&k.push(_)}var T=p(c,g);if(T){var M=[];for(b=0;b<k.length;b++)T[_=k[b]]||M.push(_);k=M}var A,S,L=k.length;L&&(e.matches||y.matches)&&(A=n.coerce(e,t,{matches:{valType:"enumerated",values:k,dflt:-1!==k.indexOf(y.matches)?y.matches:void 0}},"matches"));var C=s&&!v?t.anchor:void 0;if(L&&!A&&(e.scaleanchor||C)&&(S=n.coerce(e,t,{scaleanchor:{valType:"enumerated",values:k}},"scaleanchor",C)),A){t._matchGroup=h(u,g,A,1);var D=l[i(A)],O=d(l,t)/d(l,D);v!==("x"===A.charAt(0))&&(O=(v?"x":"y")+O),h(c,g,A,O)}else e.matches&&-1!==a.indexOf(e.matches)&&n.warn("ignored "+t._name+'.matches: "'+e.matches+'" to avoid an infinite loop');if(S){var P=x("scaleratio");P||(P=t.scaleratio=1),h(c,g,S,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 d(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 f=o[r];for(i=0;i<u.length;i++)o[l=u[i]]=m(f,m(n,c[l]));return void e.splice(s,1)}if(1!==n)for(i=0;i<u.length;i++){var d=u[i];c[d]=m(n,c[d])}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 y(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 f="y"===c.charAt(0)?n:1/n,d=0;d<u;d++)s*=f}a[l]=s}return a}function g(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,d,p,h,m=r.axIds,y=r.axHasImage,g=t._axisConstraintGroups=[],v=t._axisMatchGroups=[];for(a=0;a<m.length;a++)f(u=e[c=i(m[a])],d=t[c],{axIds:m,layoutOut:t,hasImage:y[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(v,"_matchGroup"),a=0;a<g.length;a++)for(l in o=g[a])if((d=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<g.length;){for(l in o=g[a]){(d=t[i(l)])._matchGroup&&Object.keys(d._matchGroup).length===Object.keys(o).length&&(g.splice(a,1),a--);break}a++}x(g,"_constraintGroup");var w=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],k=!1,T=!1;function M(){h=d[p],"rangebreaks"===p&&(T=d._hasDayOfWeekBreaks)}for(a=0;a<v.length;a++){o=v[a];for(var A=0;A<w.length;A++){var S;for(l in p=w[A],h=null,o)if(u=e[c=i(l)],d=t[c],p in d){if(!d.matches&&(S=d,p in u)){M();break}null===h&&p in u&&M()}if("range"===p&&h&&(k=!0),"autorange"===p&&null===h&&k&&(h=!1),null===h&&p in S&&(h=S[p]),null!==h)for(l in o)(d=t[i(l)])[p]="range"===p?h.slice():h,"rangebreaks"===p&&(d._hasDayOfWeekBreaks=T,s(d,t))}}},r.enforce=function(e){var t,r,n,o,s,u,f,d,p=e._fullLayout,h=p._axisConstraintGroups||[];for(t=0;t<h.length;t++){n=y(h[t],p);var m=Object.keys(n),v=1/0,x=0,b=1/0,_={},w={},k=!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],v=Math.min(v,u),"domain"!==s.constrain&&s._constraintShrinkable||(b=Math.min(b,u)),delete s._constraintShrinkable,x=Math.max(x,u),"domain"===s.constrain&&(k=!0);if(!(v>c*x)||k)for(r=0;r<m.length;r++)if(u=_[o=m[r]],f=(s=w[o]).constrain,u!==b||"domain"===f)if(d=u/b,"range"===f)l(s,d);else{var T=s._inputDomain,M=(s.domain[1]-s.domain[0])/(T[1]-T[0]),A=(s.r2l(s.range[1])-s.r2l(s.range[0]))/(s.r2l(s._inputRange[1])-s.r2l(s._inputRange[0]));if((d/=M)*A<1){s.domain=s._input.domain=T.slice(),l(s,d);continue}if(A<1&&(s.range=s._input.range=s._inputRange.slice(),d*=A),s.autorange){var S=s.r2l(s.range[0]),L=s.r2l(s.range[1]),C=(S+L)/2,D=C,O=C,P=Math.abs(L-C),E=C-P*d*1.0001,R=C+P*d*1.0001,z=a.makePadFn(p,s,0),I=a.makePadFn(p,s,1);g(s,d);var N,F,j=Math.abs(s._m),B=a.concatExtremes(e,s),H=B.min,q=B.max;for(F=0;F<H.length;F++)(N=H[F].val-z(H[F])/j)>E&&N<D&&(D=N);for(F=0;F<q.length;F++)(N=q[F].val+I(q[F])/j)<R&&N>O&&(O=N);d/=(O-D)/(2*P),D=s.l2r(D),O=s.l2r(O),s.range=s._input.range=S<L?[D,O]:[O,D]}g(s,d)}}},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":274,"../../constants/numerical":279,"../../lib":299,"./autorange":345,"./axis_ids":350,"./layout_attributes":359,"./scale_zoom":364,"./set_convert":365}],355:[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"),f=e("../../components/color"),d=e("../../components/drawing"),p=e("../../components/fx"),h=e("./axes"),m=e("../../lib/setcursor"),y=e("../../components/dragelement"),g=e("../../components/dragelement/helpers"),v=g.selectingOrDrawing,x=g.freeMode,b=e("../../constants/alignment").FROM_TL,_=e("../../lib/clear_gl_canvases"),w=e("../../plot_api/subroutines").redrawReglTraces,k=e("../plots"),T=e("./axis_ids").getFromId,M=e("../../components/selections").prepSelect,A=e("../../components/selections").clearOutline,S=e("../../components/selections").selectOnClick,L=e("./scale_zoom"),C=e("./constants"),D=C.MINDRAG,O=C.MINZOOM,P=!0;function E(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=E(e,"rect",t,r);return n.select(s).call(d.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 I(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],f=o._rl[1]-u;n[o._name+".range[0]"]=o.l2r(u+f*t),n[o._name+".range[1]"]=o.l2r(u+f*r)}}if(a&&a.length){var d=(t+(1-r))/2;I(a,d,1-d,n,[])}}function N(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 F(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 B(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(t,r)).attr("d","M0,0Z")}function H(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"),q(e,t,a,i)}function q(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 U(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Y(e){P&&e.data&&e._context.showTips&&(a.notifier(a._(e,"Double-click to zoom back out"),"long"),P=!1)}function V(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 Z(e,t,r,n,i){for(var o,l,s,c,u=!1,f={},d={},p=(i||{}).xaHash,h=(i||{}).yaHash,m=0;m<t.length;m++){var y=t[m];for(o in r)if(y[o]){for(s in y)i&&(p[s]||h[s])||("x"===s.charAt(0)?r:n)[s]||(f[s]=o);for(l in n)i&&(p[l]||h[l])||!y[l]||(u=!0)}for(l in n)if(y[l])for(c in y)i&&(p[c]||h[c])||("x"===c.charAt(0)?r:n)[c]||(d[c]=l)}u&&(a.extendFlat(f,d),d={});var g={},v=[];for(s in f){var x=T(e,s);v.push(x),g[x._id]=x}var b={},_=[];for(c in d){var w=T(e,c);_.push(w),b[w._id]=w}return{xaHash:g,yaHash:b,xaxes:v,yaxes:_,xLinks:f,yLinks:d,isSubplotConstrained:u}}function G(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,f,m,g){var P,E,q,J,X,K,Q,$,ee,te,re,ne,ae,ie,oe,le,se,ce,ue,fe,de,pe,he,me=e._fullLayout._zoomlayer,ye=m+g==="nsew",ge=1===(m+g).length;function ve(){if(P=t.xaxis,E=t.yaxis,ee=P._length,te=E._length,Q=P._offset,$=E._offset,(q={})[P._id]=P,(J={})[E._id]=E,m&&g)for(var r=t.overlays,n=0;n<r.length;n++){var a=r[n].xaxis;q[a._id]=a;var i=r[n].yaxis;J[i._id]=i}X=W(q),K=W(J),ae=z(X,g),ie=z(K,m),oe=!ie&&!ae,ne=Z(e,e._fullLayout._axisMatchGroups,q,J);var o=(re=Z(e,e._fullLayout._axisConstraintGroups,q,J,ne)).isSubplotConstrained||ne.isSubplotConstrained;le=g||o,se=m||o;var l=e._fullLayout;ce=l._has("scattergl"),ue=l._has("splom"),fe=l._has("svg")}ve();var xe=function(e,t,r){return e?"nsew"===e?r?"":"pan"===t?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}(ie+ae,e._fullLayout.dragmode,ye),be=R(t,m+g+"drag",xe,r,l,c,f);if(oe&&!ye)return be.onmousedown=null,be.style.pointerEvents="none",be;var _e,we,ke,Te,Me,Ae,Se,Le,Ce,De,Oe={element:be,gd:e,plotinfo:t};function Pe(){Oe.plotinfo.selection=!1,A(e)}function Ee(e,r){var a=Oe.gd;if(a._fullLayout._activeShapeIndex>=0)a._fullLayout._deactivateShape(a);else{var o=a._fullLayout.clickmode;if(U(a),2!==e||ge||Ye(),ye)o.indexOf("select")>-1&&S(r,a,X,K,t.id,Oe),o.indexOf("event")>-1&&p.click(a,r,t.id);else if(1===e&&ge){var l=m?E:P,c="s"===m||"w"===g?0:1,f=l._name+".range["+c+"]",d=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",y="middle";if(l.fixedrange)return;m?(y="n"===m?"top":"bottom","right"===l.side&&(h="right")):"e"===g&&(h="right"),a._context.showAxisRangeEntryBoxes&&n.select(be).call(u.makeEditable,{gd:a,immediate:!0,background:a._fullLayout.paper_bgcolor,text:String(d),fill:l.tickfont?l.tickfont.color:"#444",horizontalAlign:h,verticalAlign:y}).on("edit",function(e){var t=l.d2r(e);void 0!==t&&s.call("_guiRelayout",a,f,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(){Se="",ke.r=ke.l,ke.t=ke.b,Ce.attr("d","M0,0Z")}if(ke.l=Math.min(_e,n),ke.r=Math.max(_e,n),ke.t=Math.min(we,a),ke.b=Math.max(we,a),re.isSubplotConstrained)i>O||o>O?(Se="xy",i/ee>o/te?(o=i*te/ee,we>a?ke.t=we-o:ke.b=we+o):(i=o*ee/te,_e>n?ke.l=_e-i:ke.r=_e+i),Ce.attr("d",V(ke))):l();else if(ne.isSubplotConstrained)if(i>O||o>O){Se="xy";var s=Math.min(ke.l/ee,(te-ke.b)/te),c=Math.max(ke.r/ee,(te-ke.t)/te);ke.l=s*ee,ke.r=c*ee,ke.b=(1-s)*te,ke.t=(1-c)*te,Ce.attr("d",V(ke))}else l();else!ie||o<Math.min(Math.max(.6*i,D),O)?i<D||!ae?l():(ke.t=0,ke.b=te,Se="x",Ce.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"}(ke,we))):!ae||i<Math.min(.6*o,O)?(ke.l=0,ke.r=ee,Se="y",Ce.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"}(ke,_e))):(Se="xy",Ce.attr("d",V(ke)));ke.w=ke.r-ke.l,ke.h=ke.b-ke.t,Se&&(De=!0),e._dragged=De,H(Le,Ce,ke,Me,Ae,Te),ze(),e.emit("plotly_relayouting",de),Ae=!0}function ze(){de={},"xy"!==Se&&"x"!==Se||(I(X,ke.l/ee,ke.r/ee,de,re.xaxes),qe("x",de)),"xy"!==Se&&"y"!==Se||(I(K,(te-ke.b)/te,(te-ke.t)/te,de,re.yaxes),qe("y",de))}function Ie(){ze(),U(e),Ve(),Y(e)}Oe.prepFn=function(t,r,n){var i=Oe.dragmode,l=e._fullLayout.dragmode;l!==i&&(Oe.dragmode=l),ve(),pe=e._fullLayout._invScaleX,he=e._fullLayout._invScaleY,oe||(ye?t.shiftKey?"pan"===l?l="zoom":v(l)||(l="pan"):t.ctrlKey&&(l="pan"):l="pan"),x(l)?Oe.minDrag=1:Oe.minDrag=void 0,v(l)?(Oe.xaxes=X,Oe.yaxes=K,M(t,r,n,Oe,l)):(Oe.clickFn=Ee,v(i)&&Pe(),oe||("zoom"===l?(Oe.moveFn=Re,Oe.doneFn=Ie,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],ke={l:_e,r:_e,w:0,t:we,b:we,h:0},Te=e._hmpixcount?e._hmlumcount/e._hmpixcount:o(e._fullLayout.plot_bgcolor).getLuminance(),Ae=!1,Se="xy",De=!1,Le=j(me,Te,Q,$,Me="M0,0H"+ee+"V"+te+"H0V0"),Ce=B(me,Q,$)}(0,r,n)):"pan"===l&&(Oe.moveFn=He,Oe.doneFn=Ve))),e._fullLayout._redrag=function(){var t=e._dragdata;if(t&&t.element===be){var r=e._fullLayout.dragmode;v(r)||(ve(),Ze([0,0,ee,te]),Oe.moveFn(t.dx,t.dy))}}},y.init(Oe);var Ne=[0,0,ee,te],Fe=null,je=C.REDRAWDELAY,Be=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function He(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&&(N(X,t),qe("x")),ie&&(N(K,r),qe("y")),Ze([n,a,ee,te]),Ue(),void e.emit("plotly_relayouting",de)}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(X,0,t):"e"===ae?t=p(X,1,-t):ae||(t=0),"n"===ie?r=p(K,1,r):"s"===ie?r=p(K,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<X.length;u++)X[u].range=X[u]._r.slice(),L(X[u],1-r/te);o=(t=r*ee/te)/2}if(ne.isSubplotConstrained||!ie&&1===ae.length){for(u=0;u<K.length;u++)K[u].range=K[u]._r.slice(),L(K[u],1-t/ee);l=(r=t*te/ee)/2}}ne.isSubplotConstrained&&ie||qe("x"),ne.isSubplotConstrained&&ae||qe("y");var f=ee-t,d=te-r;!ne.isSubplotConstrained||ae&&ie||(ae?(l=o?0:t*te/ee,d=f*te/ee):(o=l?0:r*ee/te,f=d*ee/te)),Ze([o,l,f,d]),Ue(),e.emit("plotly_relayouting",de)}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])/F(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 qe(e,t){for(var r=ne.isSubplotConstrained?{x:K,y:X}[e]:ne[e+"axes"],n=ne.isSubplotConstrained?{x:X,y:K}[e]:[],a=0;a<r.length;a++){var i=r[a],o=i._id,l=ne.xLinks[o]||ne.yLinks[o],s=n[0]||q[l]||J[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 Ue(){var t,r=[];function n(e){for(t=0;t<e.length;t++)e[t].fixedrange||r.push(e[t]._id)}for(le&&(n(X),n(re.xaxes),n(ne.xaxes)),se&&(n(K),n(re.yaxes),n(ne.yaxes)),de={},t=0;t<r.length;t++){var a=r[t],i=T(e,a);h.drawOne(e,i,{skipTitle:!0}),de[i._name+".range[0]"]=i.range[0],de[i._name+".range[1]"]=i.range[1]}h.redrawComponents(e,r)}function Ye(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];ae&&(r=r.concat(X)),ie&&(r=r.concat(K)),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(K)):r=r.concat(X)),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 Ve(){Ze([0,0,ee,te]),a.syncOrAsync([k.previousPromises,function(){e._fullLayout._replotting=!1,s.call("_guiRelayout",e,de)}],e)}function Ze(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 f=a.simpleMap(i.range,i.r2l),p=a.simpleMap(o.range,o.r2l);n._scene.update({range:[f[0],p[0],f[1],p[1]]})}if((ue||ce)&&(_(e),w(e)),fe){var h=t[2]/P._length,y=t[3]/E._length;for(r=0;r<u.length;r++){i=(n=c[u[r]]).xaxis,o=n.yaxis;var v,x,b,k,T=(le||ne.isSubplotConstrained)&&!i.fixedrange&&q[i._id],M=(se||ne.isSubplotConstrained)&&!o.fixedrange&&J[o._id];if(T?(v=h,b=g||ne.isSubplotConstrained?t[0]:Je(i,v)):ne.xaHash[i._id]?(v=h,b=t[0]*i._length/P._length):ne.yaHash[i._id]?(v=y,b="ns"===ie?-t[1]*i._length/E._length:Je(i,v,{n:"top",s:"bottom"}[ie])):b=We(i,v=Ge(i,h,y)),M?(x=y,k=m||ne.isSubplotConstrained?t[1]:Je(o,x)):ne.yaHash[o._id]?(x=y,k=t[1]*o._length/E._length):ne.xaHash[o._id]?(x=h,k="ew"===ae?-t[0]*o._length/P._length:Je(o,x,{e:"right",w:"left"}[ae])):k=We(o,x=Ge(o,h,y)),v||x){v||(v=1),x||(x=1);var A=i._offset-b/v,S=o._offset-k/x;n.clipRect.call(d.setTranslate,b,k).call(d.setScale,v,x),n.plot.call(d.setTranslate,A,S).call(d.setScale,1/v,1/x),v===n.xScaleFactor&&x===n.yScaleFactor||(d.setPointGroupScale(n.zoomScalePts,v,x),d.setTextPointsScale(n.zoomScaleTxt,v,x)),d.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),n.xScaleFactor=v,n.yScaleFactor=x}}}}function Ge(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(),L(e,t),Je(e,t)):0}function Je(e,t,r){return e._length*(1-t)*b[r||e.constraintoward||"middle"]}return m.length*g.length!=1&&G(be,function(t){if(e._context._scrollZoom.cartesian||e._fullLayout._enablescrollzoom){if(Pe(),e._transitioningWithDuration)return t.preventDefault(),void t.stopPropagation();ve(),clearTimeout(Fe);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=Be.draglayer.select(".nsewdrag").node().getBoundingClientRect(),l=(t.clientX-o.left)/o.width,s=(o.bottom-t.clientY)/o.height;if(le){for(g||(l=.5),n=0;n<X.length;n++)c(X[n],l,i);qe("x"),Ne[2]*=i,Ne[0]+=Ne[2]*l*(1/i-1)}if(se){for(m||(s=.5),n=0;n<K.length;n++)c(K[n],s,i);qe("y"),Ne[3]*=i,Ne[1]+=Ne[3]*(1-s)*(1/i-1)}Ze(Ne),Ue(),e.emit("plotly_relayouting",de),Fe=setTimeout(function(){e._fullLayout&&(Ne=[0,0,ee,te],Ve())},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:E,makeRectDragger:R,makeZoombox:j,makeCorners:B,updateZoombox:H,xyCorners:V,transitionZoombox:q,removeZoombox:U,showDoubleClickNotifier:Y,attachWheelEventHandler:G}},{"../../components/color":158,"../../components/dragelement":177,"../../components/dragelement/helpers":176,"../../components/drawing":180,"../../components/fx":198,"../../components/selections":246,"../../constants/alignment":274,"../../lib":299,"../../lib/clear_gl_canvases":287,"../../lib/setcursor":319,"../../lib/svg_text_utils":322,"../../plot_api/subroutines":336,"../../registry":387,"../plots":380,"./axes":346,"./axis_ids":350,"./constants":353,"./scale_zoom":364,"@plotly/d3":20,"has-passive-events":65,tinycolor2:122}],356:[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 f=o._mainLinePosition;"top"===o.side&&(f-=s),l(e,n,o._offset+.1*o._length,f,.8*o._length,s,"","ew"),l(e,n,o._offset,f,.1*o._length,s,"","w"),l(e,n,o._offset+.9*o._length,f,.1*o._length,s,"","e")}if(r===c._mainSubplot){var d=c._mainLinePosition;"right"!==c.side&&(d-=s),l(e,n,d,c._offset+.1*c._length,s,.8*c._length,"ns",""),l(e,n,d,c._offset+.9*c._length,s,.1*c._length,"s",""),l(e,n,d,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":177,"../../components/fx":198,"../../lib/setcursor":319,"./constants":353,"./dragbox":355,"@plotly/d3":20}],357:[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,f=c.yaxis,d=c.cartesian,p=r._has("cartesian")||r._has("gl2d"),h=0;h<o.length;h++){var m=o[h];if(a.isPlainObject(m)){var y=i.cleanId(m.xref,"x",!1),g=i.cleanId(m.yref,"y",!1),v=s.x.test(y),x=s.y.test(g);if(v||x){p||a.pushUnique(r._basePlotModules,l);var b=!1;v&&-1===u.indexOf(y)&&(u.push(y),b=!0),x&&-1===f.indexOf(g)&&(f.push(g),b=!0),b&&v&&x&&d.push(y+g)}}}}}},{"../../lib":299,"../../registry":387,"./axis_ids":350}],358:[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"),f=e("../../constants/xmlns_namespaces"),d=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,f,d,p=u.traceLayerClasses,h=e._fullLayout,m=h._modules,y=[],g=[],v=0;v<m.length;v++){var x=(c=m[v]).name,b=a.modules[x].categories;if(b.svg){var _=c.layerName||x+"layer",w=c.plot;d=(f=s(r,w))[0],r=f[1],d.length&&y.push({i:p.indexOf(_),className:_,plotMethod:w,cdModule:d}),b.zoomScale&&g.push("."+_)}}y.sort(function(e,t){return e.i-t.i});var k=t.plot.selectAll("g.mlayer").data(y,function(e){return e.className});if(k.enter().append("g").attr("class",function(e){return e.className}).classed("mlayer",!0).classed("rangeplot",t.isRangePlot),k.exit().remove(),k.order(),k.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"),d=s(r,c)[0],c.plot(e,t,d)),!e._context.staticPlot&&(t._hasClipOnAxisFalse&&(t.clipOnAxisFalseTraces=t.plot.selectAll(u.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),g.length)){var T=t.plot.selectAll(g.join(",")).selectAll(".trace");t.zoomScalePts=T.selectAll("path.point"),t.zoomScaleTxt=T.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,f=n+"-x",h=n+"-y";t.minorGridlayer=l.minorGridlayer,t.gridlayer=l.gridlayer,t.zerolinelayer=l.zerolinelayer,d(l.overlinesBelow,"path",f),d(l.overlinesBelow,"path",h),d(l.overaxesBelow,"g",f),d(l.overaxesBelow,"g",h),t.plot=d(l.overplot,"g",n),d(l.overlinesAbove,"path",f),d(l.overlinesAbove,"path",h),d(l.overaxesAbove,"g",f),d(l.overaxesAbove,"g",h),t.xlines=s.select(".overlines-"+a).select("."+f),t.ylines=s.select(".overlines-"+i).select("."+h),t.xaxislayer=s.select(".overaxes-"+a).select("."+f),t.yaxislayer=s.select(".overaxes-"+i).select("."+h)}else if(o)t.xlines=d(r,"path","xlines-above"),t.ylines=d(r,"path","ylines-above"),t.xaxislayer=d(r,"g","xaxislayer-above"),t.yaxislayer=d(r,"g","yaxislayer-above");else{var m=d(r,"g","layer-subplot");t.shapelayer=d(m,"g","shapelayer"),t.imagelayer=d(m,"g","imagelayer"),t.minorGridlayer=d(r,"g","minor-gridlayer"),t.gridlayer=d(r,"g","gridlayer"),t.zerolinelayer=d(r,"g","zerolinelayer"),d(r,"path","xlines-below"),d(r,"path","ylines-below"),t.overlinesBelow=d(r,"g","overlines-below"),d(r,"g","xaxislayer-below"),d(r,"g","yaxislayer-below"),t.overaxesBelow=d(r,"g","overaxes-below"),t.plot=d(r,"g","plot"),t.overplot=d(r,"g","overplot"),t.xlines=d(r,"path","xlines-above"),t.ylines=d(r,"path","ylines-above"),t.overlinesAbove=d(r,"g","overlines-above"),d(r,"g","xaxislayer-above"),d(r,"g","yaxislayer-above"),t.overaxesAbove=d(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.minorGridlayer,"g",t.xaxis._id),p(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(e){return e[0]}).sort(c.idSort),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 y(e,t){if(e){var r={};for(var a in e.each(function(e){var a=e[0];n.select(this).remove(),g(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 g(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,f=o.cartesian,d=f.concat(o.gl2d||[]),p={},h={};for(r=0;r<d.length;r++){var m=d[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"),f.push(n+a),d.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"),f.push(n+a),d.push(n+a),p[n]||(p[n]=1,i.pushUnique(l,n)));if(!d.length){for(var y in n="",a="",e){if(u.attrRegex.test(y))"x"===y.charAt(0)?(!n||+y.substr(5)<+n.substr(5))&&(n=y):(!a||+y.substr(5)<+a.substr(5))&&(a=y)}n=n?c.name2id(n):"x",a=a?c.name2id(a):"y",l.push(n),s.push(a),f.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],f=[],d=0;d<l.length;d++){var p=l[d],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===f.indexOf(s)&&f.push(s),f.push(p)),s=p)}h(e,u,f,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 f=n._has&&n._has("gl"),d=t._has&&t._has("gl");if(f&&!d)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"),v=t._has&&t._has("cartesian");if(m&&!v)y(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(),g(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=[],f=[];for(t=0;t<c;t++){n=s[t],a=l._plots[n],i=a.xaxis,o=a.yaxis;var d=i._mainAxis,p=o._mainAxis,h=d._id+p._id,m=l._plots[h];a.overlays=[],h!==n&&m?(a.mainplot=h,a.mainplotinfo=m,f.push(n)):(a.mainplot=void 0,a.mainplotinfo=void 0,u.push(n))}for(t=0;t<f.length;t++)n=f[t],(a=l._plots[n]).mainplotinfo.overlays.push(a);var y=u.concat(f),g=new Array(c);for(t=0;t<c;t++){n=y[t],a=l._plots[n],i=a.xaxis,o=a.yaxis;var v=[n,i.layer,o.layer,i.overlaying||"",o.overlaying||""];for(r=0;r<a.overlays.length;r++)v.push(a.overlays[r].id);g[t]=v}return g}(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(y,t),a.each(function(r){var a=r[0],i=t._plots[a];i.plotgroup=n.select(this),m(e,i),i.draglayer=d(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:f.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":180,"../../constants/xmlns_namespaces":280,"../../lib":299,"../../registry":387,"../get_data":376,"../plots":380,"./attributes":344,"./axis_ids":350,"./constants":353,"./graph_interact":356,"./layout_attributes":359,"./layout_defaults":360,"./transition_axes":370,"@plotly/d3":20}],359:[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"),f=u.HOUR_PATTERN,d=u.WEEKDAY_PATTERN,p={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}};function h(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var m={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},g={valType:"data_array",editType:"ticks"},v={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function x(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function b(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var _={valType:"color",dflt:a.defaultLine,editType:"ticks"},w={valType:"color",dflt:a.lightLine,editType:"ticks"};function k(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var T=o({},i,{editType:"ticks"}),M={valType:"boolean",editType:"ticks"};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:[d,f,""],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:p,nticks:h(),tick0:m,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:g,ticktext:{valType:"data_array",editType:"ticks"},ticks:v,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:x(),tickwidth:b(),tickcolor:_,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],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:M,gridcolor:w,gridwidth:k(),griddash:T,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"},minor:{tickmode:p,nticks:h("minor"),tick0:m,dtick:y,tickvals:g,ticks:v,ticklen:x("minor"),tickwidth:b("minor"),tickcolor:_,gridcolor:w,gridwidth:k("minor"),griddash:T,showgrid:M,editType:"ticks"},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":157,"../../components/drawing/attributes":179,"../../constants/numerical":279,"../../lib/extend":293,"../../plot_api/plot_template":335,"../../plots/cartesian/axis_format_attributes":349,"../font_attributes":374,"./constants":353}],360:[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"),f=e("./axis_defaults"),d=e("./constraints"),p=e("./position_defaults"),h=e("./axis_ids"),m=h.id2name,y=h.name2id,g=e("./constants").AX_ID_PATTERN,v=e("../../registry"),x=v.traceIs,b=v.getComponentMethod;function _(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}t.exports=function(e,t,r){var v,w,k=t.autotypenumbers,T={},M={},A={},S={},L={},C={},D={},O={},P={},E={};for(v=0;v<r.length;v++){var R=r[v];if(x(R,"cartesian")||x(R,"gl2d")){var z,I;if(R.xaxis)z=m(R.xaxis),_(T,z,R);else if(R.xaxes)for(w=0;w<R.xaxes.length;w++)_(T,m(R.xaxes[w]),R);if(R.yaxis)I=m(R.yaxis),_(T,I,R);else if(R.yaxes)for(w=0;w<R.yaxes.length;w++)_(T,m(R.yaxes[w]),R);if("funnel"===R.type?"h"===R.orientation?(z&&(M[z]=!0),I&&(D[I]=!0)):I&&(A[I]=!0):"image"===R.type?(I&&(O[I]=!0),z&&(O[z]=!0)):(I&&(L[I]=!0,C[I]=!0),x(R,"carpet")&&("carpet"!==R.type||R._cheater)||z&&(S[z]=!0)),"carpet"===R.type&&R._cheater&&z&&(M[z]=!0),x(R,"2dMap")&&(P[z]=!0,P[I]=!0),x(R,"oriented"))E["h"===R.orientation?I:z]=!0}}var N=t._subplots,F=N.xaxis,j=N.yaxis,B=n.simpleMap(F,m),H=n.simpleMap(j,m),q=B.concat(H),U=a.background;F.length&&j.length&&(U=n.coerce(e,t,s,"plot_bgcolor"));var Y,V,Z,G,W,J=a.combine(U,t.paper_bgcolor);function X(){var e=T[Y]||[];W._traceIndices=e.map(function(e){return e._expandedIndex}),W._annIndices=[],W._shapeIndices=[],W._selectionIndices=[],W._imgIndices=[],W._subplotsWith=[],W._counterAxes=[],W._name=W._attr=Y,W._id=V}function K(e,t){return n.coerce(G,W,c,e,t)}function Q(e,t){return n.coerce2(G,W,c,e,t)}function $(e){return"x"===e?j:F}function ee(t,r){for(var n="x"===t?B:H,a=[],i=0;i<n.length;i++){var o=n[i];o===r||(e[o]||{}).overlaying||a.push(y(o))}return a}var te={x:$("x"),y:$("y")},re=te.x.concat(te.y),ne={},ae=[];function ie(){var e=G.matches;g.test(e)&&-1===re.indexOf(e)&&(ne[e]=G.type,ae=Object.keys(ne))}var oe=o(e,t),le=i(oe);for(v=0;v<q.length;v++){Y=q[v],V=y(Y),Z=Y.charAt(0),n.isPlainObject(e[Y])||(e[Y]={}),G=e[Y],W=l.newContainer(t,Y,Z+"axis"),X();var se="x"===Z&&!S[Y]&&M[Y]||"y"===Z&&!L[Y]&&A[Y],ce="y"===Z&&(!C[Y]&&D[Y]||O[Y]),ue={hasMinor:!0,letter:Z,font:t.font,outerTicks:P[Y],showGrid:!E[Y],data:T[Y]||[],bgColor:J,calendar:t.calendar,automargin:!0,visibleDflt:se,reverseDflt:ce,autotypenumbersDflt:k,splomStash:((t._splomAxes||{})[Z]||{})[V]};K("uirevision",t.uirevision),u(G,W,K,ue),f(G,W,K,ue,t);var fe=le&&Z===oe.charAt(0),de=Q("spikecolor",le?W.color:void 0),pe=Q("spikethickness",le?1.5:void 0),he=Q("spikedash",le?"dot":void 0),me=Q("spikemode",le?"across":void 0),ye=Q("spikesnap");K("showspikes",!!(fe||de||pe||he||me||ye))||(delete W.spikecolor,delete W.spikethickness,delete W.spikedash,delete W.spikemode,delete W.spikesnap),p(G,W,K,{letter:Z,counterAxes:te[Z],overlayableAxes:ee(Z,Y),grid:t.grid}),K("title.standoff"),ie(),W._input=G}for(v=0;v<ae.length;){V=ae[v++],Z=(Y=m(V)).charAt(0),n.isPlainObject(e[Y])||(e[Y]={}),G=e[Y],W=l.newContainer(t,Y,Z+"axis"),X();var ge={letter:Z,font:t.font,outerTicks:P[Y],showGrid:!E[Y],data:[],bgColor:J,calendar:t.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:k,splomStash:((t._splomAxes||{})[Z]||{})[V]};K("uirevision",t.uirevision),W.type=ne[V]||"linear",f(G,W,K,ge,t),p(G,W,K,{letter:Z,counterAxes:te[Z],overlayableAxes:ee(Z,Y),grid:t.grid}),K("fixedrange"),ie(),W._input=G}var ve=b("rangeslider","handleDefaults"),xe=b("rangeselector","handleDefaults");for(v=0;v<B.length;v++)Y=B[v],G=e[Y],W=t[Y],ve(e,t,Y),"date"===W.type&&xe(G,W,t,H,W.calendar),K("fixedrange");for(v=0;v<H.length;v++){Y=H[v],G=e[Y],W=t[Y];var be=t[m(W.anchor)];K("fixedrange",b("rangeslider","isVisible")(be))}d.handleDefaults(e,t,{axIds:re.concat(ae).sort(h.idSort),axHasImage:O})}},{"../../components/color":158,"../../components/fx/helpers":194,"../../components/fx/hovermode_defaults":197,"../../lib":299,"../../plot_api/plot_template":335,"../../registry":387,"../layout_attributes":378,"./axis_defaults":348,"./axis_ids":350,"./constants":353,"./constraints":354,"./layout_attributes":359,"./position_defaults":362,"./type_defaults":371}],361:[function(e,t,r){"use strict";var n=e("tinycolor2").mix,a=e("../../components/color/attributes"),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 f=s("gridcolor",n(l,o.bgColor,o.blend||a.lightFraction).toRgbString()),d=s("gridwidth"),p=s("griddash");if(r("showgrid",o.showGrid||!!f||!!d||!!p)||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var h=s("minor.gridcolor",n(t.gridcolor,o.bgColor,67).toRgbString()),m=s("minor.gridwidth",t.gridwidth||1),y=s("minor.griddash",t.griddash||"solid");r("minor.showgrid",!!h||!!m||!!y)||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var g=s("zerolinecolor",l),v=s("zerolinewidth");r("zeroline",o.showGrid||!!g||!!v)||(delete t.zerolinecolor,delete t.zerolinewidth)}}},{"../../components/color/attributes":157,"../../lib":299,tinycolor2:122}],362:[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||[],f=i.overlayableAxes||[],d=i.letter,p=i.grid;p&&(l=p._domains[d][p._axisMap[t._id]],o=p._anchors[t._id],l&&(s=p[d+"side"].split(" ")[0],c=p.domain[d]["right"===s||"top"===s?1:0])),l=l||[0,1],o=o||(n(e.position)?"free":u[0]||"free"),s=s||("x"===d?"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"===d?["bottom","top"]:["left","right"],dflt:s}},"side");var h=!1;if(f.length&&(h=a.coerce(e,t,{overlaying:{valType:"enumerated",values:[!1].concat(f),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":299,"fast-isnumeric":33}],363:[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":366}],364:[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":274}],365:[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,f=i.ensureNumber,d=i.isArrayOrTypedArray,p=e("../../constants/numerical"),h=p.FP_SAFE,m=p.BADNUM,y=p.LOG_CLIP,g=p.ONEWEEK,v=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=e("./axis_ids"),k=e("./constants"),T=k.HOUR_PATTERN,M=k.WEEKDAY_PATTERN;function A(e){return Math.pow(10,e)}function S(e){return null!=e}t.exports=function(e,t){t=t||{};var r=e._id||"x",p=r.charAt(0);function L(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*y*Math.abs(n-a))}return m}function C(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 D(t,r,n){return c(t,r,n||e.calendar)}function O(t){return e._categories[Math.round(t)]}function P(t){if(S(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 E(t){if(e._categoriesMap)return e._categoriesMap[t]}function R(e){var t=E(e);return void 0!==t?t:l(e)?+e:void 0}function z(e){return l(e)?+e:E(e)}function I(e,t,r){return n.round(r+t*e,2)}function N(e,t,r){return(e-r)/t}var F=function(t){return l(t)?I(t,e._m,e._b):m},j=function(t){return N(t,e._m,e._b)};if(e.rangebreaks){var B="y"===p;F=function(t){if(!l(t))return m;var r=e._rangebreaks.length;if(!r)return I(t,e._m,e._b);var n=B;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 f=e._B[o]||0;return isFinite(f)?I(t,e._m2,f):0},j=function(t){var r=e._rangebreaks.length;if(!r)return N(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 N(t,e._m2,e._B[n])}}e.c2l="log"===e.type?L:f,e.l2c="log"===e.type?A:f,e.l2p=F,e.p2l=j,e.c2p="log"===e.type?function(e,t){return F(L(e,t))}:F,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=f,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=j,e.cleanPos=f):"log"===e.type?(e.d2r=e.d2l=function(e,t){return L(s(e),t)},e.r2d=e.r2c=function(e){return A(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=f,e.c2r=L,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=f):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=C,e.c2d=e.c2r=e.l2d=e.l2r=D,e.d2p=e.r2p=function(t,r,n){return e.l2p(C(t,0,n))},e.p2d=e.p2r=function(e,t,r){return D(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=f,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:f(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=E,e.l2r=e.c2r=f,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:f(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 f=[[0,{}],[0,{}]],h=[];for(a=0;a<l.length;a++){var m=n[l[a]];if(p in m){var y=m[p],g=m._length||i.minRowLength(y);if(d(y[0])&&d(y[1]))for(o=0;o<g;o++){var v=y[0][o],x=y[1][o];S(v)&&S(x)&&(h.push([v,x]),v in f[0][1]||(f[0][1][v]=f[0][0]++),x in f[1][1]||(f[1][1][x]=f[1][0]++))}}}for(h.sort(function(e,t){var r=f[0][1],n=r[e[0]]-r[t[0]];if(n)return n;var a=f[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?k.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||k.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),f="y"===p;if((f?(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 d=f;c>u&&(d=!d),d&&e._rangebreaks.reverse();var h=d?-1:1;for(e._m2=h*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(f?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=F(s.min),s.pmax=F(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 f=c[u];if(f.enabled)if(f.bounds){var d=f.pattern;switch(n=(r=c._cachedPatterns[u])[0],a=r[1],d){case M:o=(l=new Date(t)).getUTCDay(),n>a&&(a+=7,o<n&&(o+=7));break;case T: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])+f.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===M&&t.pattern===T?-1:t.pattern===M&&e.pattern===T?1:0}),f=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 d=u[n];if(d.enabled)if(d.bounds){var p=t,h=r;d.pattern&&(p=Math.floor(p)),o=(a=i.simpleMap(d.bounds,d.pattern?s:e.r2l))[0],l=a[1];var m,y,w=new Date(p);switch(d.pattern){case M:y=g,m=(l-o+(l<o?7:0))*v,p+=o*v-(w.getUTCDay()*v+w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;case T:y=v,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=y=(h=Math.max(a[0],a[1]))-p}for(var k=p;k<h;k+=y)f(k,k+m)}else for(var A=i.simpleMap(d.values,e.d2c),S=0;S<A.length;S++)f(o=A[S],l=o+d.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]=E([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 f=r+"0"in t?e.d2c(t[r+"0"],0,u):0,d=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]=f+l*d}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 H=t._d3locale;"date"===e.type&&(e._dateFormat=H?H.timeFormat:a,e._extraFormat=t._extraFormat),e._separators=t.separators,e._numFormat=H?H.numberFormat:o,delete e._minDtick,delete e._forceTick0}},{"../../constants/numerical":279,"../../lib":299,"./axis_ids":350,"./constants":353,"@plotly/d3":20,"d3-time-format":30,"fast-isnumeric":33}],366:[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]]}},{}],367:[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 f=o(e);if(r("showticklabels")){var d=u.font||{},p=t.color,h=-1!==(t.ticklabelposition||"").indexOf("inside")?a(u.bgColor):p&&p!==i.color.dflt?p:d.color;if(n.coerceFont(r,"tickfont",{family:d.family,size:d.size,color:h}),u.noTicklabelstep||"multicategory"===c||"log"===c||r("ticklabelstep"),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",f),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},{"../../components/color":158,"../../lib":299,"../array_container_defaults":341,"./layout_attributes":359,"./show_dflt":366}],368:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r,i){var o=i.isMinor,l=o?e.minor||{}:e,s=o?t.minor:t,c=o?a.minor:a,u=o?"minor.":"",f=n.coerce2(l,s,c,"ticklen",o?.6*(t.ticklen||5):void 0),d=n.coerce2(l,s,c,"tickwidth",o?t.tickwidth||1:void 0),p=n.coerce2(l,s,c,"tickcolor",(o?t.tickcolor:void 0)||s.color);r(u+"ticks",!o&&i.outerTicks||f||d||p?"outside":"")||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}},{"../../lib":299,"./layout_attributes":359}],369:[function(e,t,r){"use strict";var n=e("./clean_ticks"),a=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,r,i,o){o||(o={});var l=o.isMinor,s=l?e.minor||{}:e,c=l?t.minor:t,u=l?"minor.":"";function f(e){var t=s[e];return void 0!==t?t:(c._template||{})[e]}var d=f("tick0"),p=f("dtick"),h=f("tickvals"),m=r(u+"tickmode",a(h)?"array":p?"linear":"auto");if("auto"===m)r(u+"nticks");else if("linear"===m){var y=c.dtick=n.dtick(p,i);c.tick0=n.tick0(d,i,t.calendar,y)}else if("multicategory"!==i){void 0===r(u+"tickvals")?c.tickmode="auto":l||r("ticktext")}}},{"../../lib":299,"./clean_ticks":352}],370:[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,f,d,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)})}()}),f=Date.now(),p=window.requestAnimationFrame(function n(){d=Date.now();for(var i=Math.min(1,(d-f)/r.duration),o=h(i),l=0;l<t.length;l++)y(t[l],o);d-f>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 y(t,r){var n=t.plotinfo,a=n.xaxis,s=n.yaxis,c=a._length,u=s._length,f=!!t.xr1,d=!!t.yr1,p=[];if(f){var h=i.simpleMap(t.xr0,a.r2l),m=i.simpleMap(t.xr1,a.r2l),y=h[1]-h[0],g=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*g/y),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(d){var v=i.simpleMap(t.yr0,s.r2l),x=i.simpleMap(t.yr1,s.r2l),b=v[1]-v[0],_=x[1]-x[0];p[1]=(v[1]*(1-r)+r*x[1]-v[1])/(v[0]-v[1])*u,p[3]=u*(1-r+r*_/b),s.range[0]=a.l2r(v[0]*(1-r)+r*x[0]),s.range[1]=s.l2r(v[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=f?c/p[2]:1,k=d?u/p[3]:1,T=f?p[0]:0,M=d?p[1]:0,A=f?p[0]/p[2]*c:0,S=d?p[1]/p[3]*u:0,L=a._offset-A,C=s._offset-S;n.clipRect.call(o.setTranslate,T,M).call(o.setScale,1/w,1/k),n.plot.call(o.setTranslate,L,C).call(o.setScale,w,k),o.setPointGroupScale(n.zoomScalePts,1/w,1/k),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}l.redrawComponents(e)}},{"../../components/drawing":180,"../../lib":299,"../../registry":387,"./axes":346,"@plotly/d3":20}],371:[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",f=c[u],d={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};"box"===c.type&&c._hasPreCompStats&&s==={h:"x",v:"y"}[c.orientation||"v"]&&(d.noMultiCategory=!0);if(d.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]!==f&&(f=void 0))}e.type=a(h,f,d)}else if("splom"===c.type){var y=c.dimensions,g=y[c._axesDim[l]];g.visible&&(e.type=a(g.values,f,d))}else e.type=a(c[s]||[c[s+"0"]],f,d)}(t,l.data),"-"===t.type?t.type="linear":e.type=t.type)}},{"../../registry":387,"./axis_autotype":347}],372:[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 f=0;f<i.length;f++)o[f]=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"],f=0;f<u.length;f++)e._internalOn(u[f],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 f=r.computeAPICommandBindings(e,c,u);if(1!==f.length)return!1;if(i){if((l=f[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 d=0;d<i.traces.length;d++)if(i.traces[d]!==l.traces[d])return!1}else if(l.prop!==i.prop)return!1}else i=f[0],Array.isArray(i.traces)&&i.traces.sort();var p=(l=f[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":299,"../registry":387}],373:[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":293}],374:[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.autoSize&&(n.size.dflt="auto"),e.autoColor&&(n.color.dflt="auto"),e.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},{}],375:[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"}}},{}],376:[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 f=0;f<e.length;f++)i=e[f],"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":387,"./cartesian/constants":353}],377:[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])))}},{}],378:[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("../components/selections/draw_newselection/attributes"),s=e("./pad_attributes"),c=e("../lib/extend").extendFlat,u=n({editType:"calc"});u.family.dflt='"Open Sans", verdana, arial, sans-serif',u.size.dflt=12,u.color.dflt=i.defaultLine,t.exports={font:u,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:c(s({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"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,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,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:c({},a.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:n({editType:"layoutstyle"})}}},{"../components/color/attributes":157,"../components/selections/draw_newselection/attributes":242,"../components/shapes/draw_newshape/attributes":254,"../lib/extend":293,"./animation_attributes":340,"./font_attributes":374,"./pad_attributes":379}],379:[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}}},{}],380:[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"),f=e("../components/color"),d=e("../constants/numerical").BADNUM,p=e("./cartesian/axis_ids"),h=e("../components/shapes/handle_outline").clearOutline,m=e("./animation_attributes"),y=e("./frame_attributes"),g=e("../plots/get_data").getModuleCalcData,v=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:f.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 k=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];function M(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 f=r.split("-")[0];if(n||f===r)break;r=f}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],f=n?e._id+u:u+e._id;o||(o=f);var d=p.getFromId(r,u);if(l&&d.overlaying===l){i=f;break}}}return i||o}function S(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 L(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 C(e){return"string"==typeof e&&"px"===e.substr(e.length-2)&&parseFloat(e)}function D(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||{},f=e._fullData||[],d=e._fullData=[],p=e.data||[],m=e.calcdata||[],y=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 g=M(e,k);if(s._mapboxAccessToken=y.mapboxAccessToken,n._initialAutoSizeIsDone){var _=n.width,w=n.height;b.supplyLayoutGlobalDefaults(c,s,g),c.width||(s.width=_),c.height||(s.height=w),b.sanitizeMargins(s)}else{b.supplyLayoutGlobalDefaults(c,s,g);var A=!c.width||!c.height,S=s.autosize,L=y.autosizable;A&&(S||L)?b.plotAutoSize(e,c,s):A&&b.sanitizeMargins(s),!S&&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}}(g,s.separators),s._extraFormat=M(e,T),s._initialAutoSizeIsDone=!0,s._dataLength=p.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var C=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],s=o.attr;if(s&&(r.push(i),Array.isArray(s)))for(t=0;t<s.length;t++)u.pushUnique(r,s[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 f(e,t){s[t]=e,c[e]=1}function d(e,t){if(e&&"string"==typeof e&&!c[e])return f(e,t),!0}for(r=0;r<a;r++){var p=t[r].uid;"number"==typeof p&&(p=String(p)),d(p,r)||(r<l&&d(i[r].uid,r)||f(u.randstr(c),r))}return s}(f,p),s._globalTransforms=(e._context||{}).globalTransforms,b.supplyDataDefaults(p,d,c,s);var E=Object.keys(O.x),R=Object.keys(O.y);if(E.length>1&&R.length>1){for(l.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o<E.length;o++)u.pushUnique(C.xaxis,E[o]);for(o=0;o<R.length;o++)u.pushUnique(C.yaxis,R[o]);for(var z in P)u.pushUnique(C.cartesian,z)}if(s._has=b._hasPlotType.bind(s),f.length===d.length)for(o=0;o<d.length;o++)v(d[o],f[o]);b.supplyLayoutModuleDefaults(c,s,d,e._transitionData);var I=s._visibleModules,N=[];for(o=0;o<I.length;o++){var F=I[o].crossTraceDefaults;F&&u.pushUnique(N,F)}for(o=0;o<N.length;o++)N[o](d,s);s._hasOnlyLargeSploms=1===s._basePlotModules.length&&"splom"===s._basePlotModules[0].name&&E.length>15&&R.length>15&&0===s.shapes.length&&0===s.images.length,b.linkSubplots(d,s,f,n),b.cleanPlot(d,s,f,n);var j=!(!n._has||!n._has("gl2d")),B=!(!s._has||!s._has("gl2d")),H=!(!n._has||!n._has("cartesian"))||j,q=!(!s._has||!s._has("cartesian"))||B;H&&!q?n._bgLayer.remove():q&&!H&&(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)}(d,s),v(s,n),l.getComponentMethod("colorscale","crossTraceDefaults")(d,s),s._preGUI||(s._preGUI={}),s._tracePreGUI||(s._tracePreGUI={});var U,Y=s._tracePreGUI,V={};for(U in Y)V[U]="old";for(o=0;o<d.length;o++)V[U=d[o]._fullInput.uid]||(Y[U]={}),V[U]="new";for(U in V)"old"===V[U]&&delete Y[U];D(s),l.getComponentMethod("rangeslider","makeData")(s),r||m.length!==d.length||b.supplyDefaultsUpdateCalc(m,d)}},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 f=r[a].uid;for(i=0;i<e.length;i++){if(f===e[i].uid)continue e}u&&n._infolayer.select(".cb"+f).remove()}},b.linkSubplots=function(e,t,r,n){var a,i,o=n._plots||{},s=t._plots={},c=t._subplots,f={_fullData:e,_fullLayout:t},d=c.cartesian.concat(c.gl2d||[]);for(a=0;a<d.length;a++){var h,m=d[a],y=o[m],g=p.getFromId(f,m,"x"),v=p.getFromId(f,m,"y");for(y?h=s[m]=y:(h=s[m]={}).id=m,g._counterAxes.push(v._id),v._counterAxes.push(g._id),g._subplotsWith.push(m),v._subplotsWith.push(m),h.xaxis=g,h.yaxis=v,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(f,null,!0);for(a=0;a<_.length;a++){var w=null;(b=_[a]).overlaying&&(w=p.getFromId(f,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(f,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 k=1,T=0;for(i=0;i<b._counterAxes.length;i++){var M=p.getFromId(f,b._counterAxes[i]);k=Math.min(k,M.domain[0]),T=Math.max(T,M.domain[1])}k<T&&(b._counterDomainMin=k,b._counterDomainMax=T)}},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,f=n._visibleModules,d=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(f,r),u.pushUnique(d,e._module.basePlotModule),p++,!1!==e._input.visible&&h++)}n._transformModules=[];var y={},g=[],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,k=L(i,t,r,n),T=0;T<k.length;T++){var M=k[T],A={_template:i._template,type:i.type,uid:i.uid+T};w&&!1===M.visible&&delete M.visible,b.supplyTraceDefaults(M,A,p,n,a),v(A,M),A.index=a,A._input=o,A._fullInput=i,A._expandedIndex=p,A._expandedInput=M,m(A)}else i._fullInput=i,i._expandedInput=i,m(i);l.traceIs(i,"carpetAxis")&&(y[i.carpet]=i),l.traceIs(i,"carpetDependent")&&g.push(a)}for(a=0;a<g.length;a++)if((i=t[g[a]]).visible){var S=y[i.carpet];i._carpet=S,S&&S.visible?(i.xaxis=S.xaxis,i.yaxis=S.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,y,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||f.defaults,s=o[r%o.length];function c(r,n){return u.coerce(e,t,b.attributes,r,n)}var d=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,y=h.attributes;if(m&&y){var g=n._subplots,v="";if(d||"gl2d"!==h.name){if(Array.isArray(m))for(i=0;i<m.length;i++){var x=m[i],_=u.coerce(e,t,y,x);g[x]&&u.pushUnique(g[x],_),v+=_}else v=u.coerce(e,t,y,m);g[h.name]&&u.pushUnique(g[h.name],v)}}}return d&&(c("customdata"),c("ids"),c("meta"),l.traceIs(t,"showLegend")?(u.coerce(e,t,p.attributes.showlegend?p.attributes:b.attributes,"showlegend"),c("legendwidth"),c("legendgroup"),c("legendgrouptitle.text"),c("legendrank"),t._dfltShowLegend=!0):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)),t},b.hasMakesDataTransform=S,b.supplyTransformDefaults=function(e,t,r){if(t._length||S(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,f=o[s],d=f.type,p=_[d],h=!(f._module&&f._module===p),m=p&&"function"==typeof p.transform;p||u.warn("Unrecognized transform type "+d+"."),p&&p.supplyDefaults&&(h||m)?((c=p.supplyDefaults(f,t,r,e)).type=d,c._module=p,u.pushUnique(a,p)):c=u.extendFlat({},f),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"),o=i.size;u.coerceFont(n,"title.font",u.extendFlat({},i,{size:Math.round(1.4*o)})),n("title.text",t._dfltTitle.plot),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("minreducedwidth"),n("minreducedheight"),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 s=n("uirevision");n("editrevision",s),n("selectionrevision",s),l.getComponentMethod("modebar","supplyLayoutDefaults")(e,t),l.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(e,t,n),l.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(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=C(c.width)||C(c.maxWidth)||r.width,a=C(c.height)||C(c.maxHeight)||r.height,o(l)&&l>0){var f=1-2*l;n=Math.round(f*n),a=Math.round(f*a)}}var d=b.layoutAttributes.width.min,p=b.layoutAttributes.height.min;n<d&&(n=d),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,f=l.subplotsRegistry.cartesian;for(a in s)(o=s[a]).includeBasePlot&&o.includeBasePlot(e,t);for(var d in c.length||c.push(f),t._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(e,t),f.finalizeSubplots(e,t)),t._subplots)t._subplots[d].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=n.minreducedwidth,s=n.minreducedheight,c=u.constrain(a-o.l-o.r,2,l),f=u.constrain(i-o.t-o.b,2,s),d=Math.max(0,a-c),p=Math.max(0,i-f),h=n._pushmargin,m=n._pushmarginIds;if(!1!==o.autoexpand){if(r){var y=r.pad;if(void 0===y&&(y=Math.min(12,o.l,o.r,o.t,o.b)),d){var g=(r.l+r.r)/d;g>1&&(r.l/=g,r.r/=g)}if(p){var v=(r.t+r.b)/p;v>1&&(r.t/=v,r.b/=v)}var x=void 0!==r.xl?r.xl:r.x,_=void 0!==r.xr?r.xr:r.x,w=void 0!==r.yt?r.yt:r.y,k=void 0!==r.yb?r.yb:r.y;h[t]={l:{val:x,size:r.l+y},r:{val:_,size:r.r+y},b:{val:k,size:r.b+y},t:{val:w,size:r.t+y}},m[t]=1}else delete h[t],delete m[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={}),D(t);var a=t._size,i=t.margin,s=u.extendFlat({},a),c=i.l,f=i.r,d=i.t,h=i.b,m=t._pushmargin,y=t._pushmarginIds,g=t.minreducedwidth,v=t.minreducedheight;if(!1!==t.margin.autoexpand){for(var x in m)y[x]||delete m[x];for(var _ in m.base={l:{val:0,size:c},r:{val:1,size:f},t:{val:1,size:d},b:{val:0,size:h}},m){var w=m[_].l||{},k=m[_].b||{},T=w.val,M=w.size,A=k.val,S=k.size;for(var L in m){if(o(M)&&m[L].r){var C=m[L].r.val,O=m[L].r.size;if(C>T){var P=(M*C+(O-r)*T)/(C-T),E=(O*(1-T)+(M-r)*(1-C))/(C-T);P+E>c+f&&(c=P,f=E)}}if(o(S)&&m[L].t){var R=m[L].t.val,z=m[L].t.size;if(R>A){var I=(S*R+(z-n)*A)/(R-A),N=(z*(1-A)+(S-n)*(1-R))/(R-A);I+N>h+d&&(h=I,d=N)}}}}}var F=u.constrain(r-i.l-i.r,2,g),j=u.constrain(n-i.t-i.b,2,v),B=Math.max(0,r-F),H=Math.max(0,n-j);if(B){var q=(c+f)/B;q>1&&(c/=q,f/=q)}if(H){var U=(h+d)/H;U>1&&(h/=U,d/=U)}if(a.l=Math.round(c),a.r=Math.round(f),a.t=Math.round(d),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(y).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,b.reselect,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(){var t;o++,n||o!==i||(t=a,e._transitionData&&(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)))}}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 f={data:(o||[]).map(function(e){var r=c(e);return t&&delete r.fit,r})};if(!t&&(f.layout=c(l),a)){var d=l._size;f.layout.computed={margin:{b:d.b,l:d.l,r:d.r,t:d.t}}}return s&&(f.frames=c(s)),i&&(f.config=c(e._context,!0)),"object"===n?f:JSON.stringify(f)},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,f=u.extendDeepNoArrays({},t||{}),d=u.expandObjectPaths(f),p={};if(r&&r.length)for(i=0;i<r.length;i++)void 0===(a=(n=u.nestedProperty(d,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||{},d),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],f=e._fullData[c]._module;if(f){if(f.animatable){var d=f.basePlotModule.name;l[d]||(l[d]=[]),l[d].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 y=u.expandObjectPaths(r);if(y){var g=e._fullLayout._plots;for(var v in g){var x=g[v],_=x.xaxis,w=x.yaxis,k=_.range.slice(),T=w.range.slice(),M=null,A=null,S=null,L=null;Array.isArray(y[_._name+".range"])?M=y[_._name+".range"].slice():Array.isArray((y[_._name]||{}).range)&&(M=y[_._name].range.slice()),Array.isArray(y[w._name+".range"])?A=y[w._name+".range"].slice():Array.isArray((y[w._name]||{}).range)&&(A=y[w._name].range.slice()),k&&M&&(_.r2l(k[0])!==_.r2l(M[0])||_.r2l(k[1])!==_.r2l(M[1]))&&(S={xr0:k,xr1:M}),T&&A&&(w.r2l(T[0])!==w.r2l(A[0])||w.r2l(T[1])!==w.r2l(A[1]))&&(L={yr0:T,yr1:A}),(S||L)&&s.push(u.extendFlat({plotinfo:x},S,L))}}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 f in c?((n=u.extendFlat({},i)).duration=0,delete l.cartesian):n=i,l){var d=l[f];e._fullData[d[0]]._module.basePlotModule.plot(e,d,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,f=s.yaxis,d=n[c._name].range.slice(),p=n[f._name].range.slice(),h=c.range.slice(),m=f.range.slice();c.setScale(),f.setScale();var y=null,g=null;c.r2l(d[0])===c.r2l(h[0])&&c.r2l(d[1])===c.r2l(h[1])||(y={xr0:d,xr1:h}),f.r2l(p[0])===f.r2l(m[0])&&f.r2l(p[1])===f.r2l(m[1])||(g={yr0:p,yr1:m}),(y||g)&&l.push(u.extendFlat({plotinfo:s},y,g))}return Promise.resolve()},o.runFn=function(r){for(var n,a,o,s=e._fullData,c=e._fullLayout._basePlotModules,f=[],d=0;d<s.length;d++)f.push(d);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=f,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=f,a=i,h())},P(e,i,o)},b.doCalcdata=function(e,t){var r,n,a,i,o=p.list(e),c=e._fullData,f=e._fullLayout,h=new Array(c.length),m=(e.calcdata||[]).slice();for(e.calcdata=h,f._numBoxes=0,f._numViolins=0,f._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,f._piecolormap={},f._sunburstcolormap={},f._treemapcolormap={},f._iciclecolormap={},f._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 y=f._subplots.polar||[];for(a=0;a<y.length;a++)o.push(f[y[a]].radialaxis,f[y[a]].angularaxis);for(var g in f._colorAxes){var v=f[g];!1!==v.cauto&&(delete v.cmin,delete v.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:d,y:d}]),o[0].t||(o[0].t={}),o[0].trace=r,h[t]=o}}for(R(o,c,f),a=0;a<c.length;a++)w(a,!0);for(a=0;a<c.length;a++)b(a);for(x&&R(o,c,f),a=0;a<c.length;a++)w(a,!0);for(a=0;a<c.length;a++)w(a,!1);z(e);var k=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?-1:l&&e===n[t].length-1?-1:s&&t===n.length-1?-1:("y"===a?t:e)-1}}return function(e,t){return"y"===a?t:e}}var f={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 d=e[r];if("category"===d.type){var h=d.categoryorder.match(E);if(h){var m=h[1],y=h[2],g=d._id.charAt(0),v="x"===g,x=[];for(n=0;n<d._categories.length;n++)x.push([d._categories[n],[]]);for(n=0;n<d._traceIndices.length;n++){var b=d._traceIndices[n],_=t._fullData[b];if(!0===_.visible){var w=_.type;l.traceIs(_,"histogram")&&(delete _._xautoBinFinished,delete _._yautoBinFinished);var k="splom"===w,T="scattergl"===w,M=t.calcdata[b];for(a=0;a<M.length;a++){var A,S,L=M[a];if(k){var C=_._axesDim[d._id];if(!v){var D=_._diag[C][0];D&&(d=t._fullLayout[p.id2name(D)])}var O=L.trace.dimensions[C].values;for(i=0;i<O.length;i++)for(A=d._categoriesMap[O[i]],o=0;o<L.trace.dimensions.length;o++)if(o!==C){var P=L.trace.dimensions[o];x[A][1].push(P.values[i])}}else if(T){for(i=0;i<L.t.x.length;i++)v?(A=L.t.x[i],S=L.t.y[i]):(A=L.t.y[i],S=L.t.x[i]),x[A][1].push(S);L.t&&L.t._scene&&delete L.t._scene.dirty}else if(L.hasOwnProperty("z")){S=L.z;var R=c(_.type,d,S);for(i=0;i<S.length;i++)for(o=0;o<S[i].length;o++)(A=R(o,i))+1&&x[A][1].push(S[i][o])}else for(void 0===(A=L.p)&&(A=L[g]),void 0===(S=L.s)&&(S=L.v),void 0===S&&(S=v?L.y:L.x),Array.isArray(S)||(S=void 0===S?[]:[S]),i=0;i<S.length;i++)x[A][1].push(S[i])}}}d._categoriesValue=x;var z=[];for(n=0;n<x.length;n++)z.push([x[n][0],f[m](x[n][1])]);z.sort(function(e,t){return e[1]-t[1]}),d._categoriesAggregatedValue=z,d._initialCategories=z.map(function(e){return e[0]}),"descending"===y&&d._initialCategories.reverse(),s=s.concat(d.sortByInitialCategories())}}}return s}(o,e);if(k.length){for(f._numBoxes=0,f._numViolins=0,a=0;a<k.length;a++)w(k[a],!0);for(a=0;a<k.length;a++)w(k[a],!1);z(e)}l.getComponentMethod("fx","calc")(e),l.getComponentMethod("errorbars","calc")(e)};var E=/(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 f=o[n],d=a._subplots[n];if(Array.isArray(d))for(t=0;t<d.length;t++){var p=d[t],h="cartesian"===n?a._plots[p]:a[p];for(r=0;r<f.length;r++)f[r](e,h,p)}else for(r=0;r<f.length;r++)f[r](e)}}b.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()},b.redrag=function(e){e._fullLayout._redrag&&e._fullLayout._redrag()},b.reselect=function(e){var t=e._fullLayout,r=(e.layout||{}).selections,n=t._previousSelections;t._previousSelections=r;var a=t._reselect||JSON.stringify(r)!==JSON.stringify(n);l.getComponentMethod("selections","reselect")(e,a)},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 f=i[c][0];f[0].trace.visible=!1,o[c]=[f]}for(var d in o){var p=o[d];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=g(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":158,"../components/shapes/handle_outline":259,"../constants/numerical":279,"../lib":299,"../plot_api/plot_schema":334,"../plot_api/plot_template":335,"../plots/get_data":376,"../registry":387,"./animation_attributes":340,"./attributes":342,"./cartesian/axis_ids":350,"./command":372,"./font_attributes":374,"./frame_attributes":375,"./layout_attributes":378,"@plotly/d3":20,"d3-format":29,"d3-time-format":30,"fast-isnumeric":33}],381:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plot_api/plot_template"),i=e("./domain").defaults;t.exports=function(e,t,r,o){var l,s,c=o.type,u=o.attributes,f=o.handleDefaults,d=o.partition||"x",p=t._subplots[c],h=p.length,m=h&&p[0].replace(/\d+$/,"");function y(e,t){return n.coerce(l,s,u,e,t)}for(var g=0;g<h;g++){var v=p[g];l=e[v]?e[v]:e[v]={},s=a.newContainer(t,v,m),o.noUirevision||y("uirevision",t.uirevision);var x={};x[d]=[g/h,(g+1)/h],i(s,t,y,x),o.id=v,f(l,s,y,o)}}},{"../lib":299,"../plot_api/plot_template":335,"./domain":373}],382:[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":276}],383:[function(e,t,r){"use strict";var n=e("./ternary"),a=e("../../plots/get_data").getSubplotCalcData,i=e("../../lib").counterRegex;r.name="ternary";var o=r.attr="subplot";r.idRoot="ternary",r.idRegex=r.attrRegex=i("ternary"),(r.attributes={})[o]={valType:"subplotid",dflt:"ternary",editType:"calc"},r.layoutAttributes=e("./layout_attributes"),r.supplyLayoutDefaults=e("./layout_defaults"),r.plot=function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots.ternary,o=0;o<i.length;o++){var l=i[o],s=a(r,"ternary",l),c=t[l]._subplot;c||(c=new n({id:l,graphDiv:e,container:t._ternarylayer.node()},t),t[l]._subplot=c),c.plot(s,t,e._promises)}},r.clean=function(e,t,r,n){for(var a=n._subplots.ternary||[],i=0;i<a.length;i++){var o=a[i],l=n[o]._subplot;!t[o]&&l&&(l.plotContainer.remove(),l.clipDef.remove(),l.clipDefRelative.remove(),l.layers["a-title"].remove(),l.layers["b-title"].remove(),l.layers["c-title"].remove())}}},{"../../lib":299,"../../plots/get_data":376,"./layout_attributes":384,"./layout_defaults":385,"./ternary":386}],384:[function(e,t,r){"use strict";var n=e("../../components/color/attributes"),a=e("../domain").attributes,i=e("../cartesian/layout_attributes"),o=e("../../plot_api/edit_types").overrideAll,l=e("../../lib/extend").extendFlat,s={title:{text:i.title.text,font:i.title.font},color:i.color,tickmode:i.tickmode,nticks:l({},i.nticks,{dflt:6,min:1}),tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:l({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:l({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash,layer:i.layer,min:{valType:"number",dflt:0,min:0},_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},c=t.exports=o({domain:a({name:"ternary"}),bgcolor:{valType:"color",dflt:n.background},sum:{valType:"number",dflt:1,min:0},aaxis:s,baxis:s,caxis:s},"plot","from-root");c.uirevision={valType:"any",editType:"none"},c.aaxis.uirevision=c.baxis.uirevision=c.caxis.uirevision={valType:"any",editType:"none"}},{"../../components/color/attributes":157,"../../lib/extend":293,"../../plot_api/edit_types":328,"../cartesian/layout_attributes":359,"../domain":373}],385:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../plot_api/plot_template"),i=e("../../lib"),o=e("../subplot_defaults"),l=e("../cartesian/tick_label_defaults"),s=e("../cartesian/prefix_suffix_defaults"),c=e("../cartesian/tick_mark_defaults"),u=e("../cartesian/tick_value_defaults"),f=e("../cartesian/line_grid_defaults"),d=e("./layout_attributes"),p=["aaxis","baxis","caxis"];function h(e,t,r,i){var o,l,s,c=r("bgcolor"),u=r("sum");i.bgColor=n.combine(c,i.paper_bgcolor);for(var f=0;f<p.length;f++)l=e[o=p[f]]||{},(s=a.newContainer(t,o))._name=o,m(l,s,i,t);var d=t.aaxis,h=t.baxis,y=t.caxis;d.min+h.min+y.min>=u&&(d.min=0,h.min=0,y.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function m(e,t,r,n){var a=d[t._name];function o(r,n){return i.coerce(e,t,a,r,n)}o("uirevision",n.uirevision),t.type="linear";var p=o("color"),h=p!==a.color.dflt?p:r.font.color,m=t._name.charAt(0).toUpperCase(),y="Component "+m,g=o("title.text",y);t._hovertitle=g===y?g:m,i.coerceFont(o,"title.font",{family:r.font.family,size:i.bigFont(r.font.size),color:h}),o("min"),u(e,t,o,"linear"),s(e,t,o,"linear"),l(e,t,o,"linear"),c(e,t,o,{outerTicks:!0}),o("showticklabels")&&(i.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:h}),o("tickangle"),o("tickformat")),f(e,t,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),o("hoverformat"),o("layer")}t.exports=function(e,t,r){o(e,t,r,{type:"ternary",attributes:d,handleDefaults:h,font:t.font,paper_bgcolor:t.paper_bgcolor})}},{"../../components/color":158,"../../lib":299,"../../plot_api/plot_template":335,"../cartesian/line_grid_defaults":361,"../cartesian/prefix_suffix_defaults":363,"../cartesian/tick_label_defaults":367,"../cartesian/tick_mark_defaults":368,"../cartesian/tick_value_defaults":369,"../subplot_defaults":381,"./layout_attributes":384}],386:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("tinycolor2"),i=e("../../registry"),o=e("../../lib"),l=o.strTranslate,s=o._,c=e("../../components/color"),u=e("../../components/drawing"),f=e("../cartesian/set_convert"),d=e("../../lib/extend").extendFlat,p=e("../plots"),h=e("../cartesian/axes"),m=e("../../components/dragelement"),y=e("../../components/fx"),g=e("../../components/dragelement/helpers"),v=g.freeMode,x=g.rectMode,b=e("../../components/titles"),_=e("../../components/selections").prepSelect,w=e("../../components/selections").selectOnClick,k=e("../../components/selections").clearOutline,T=e("../../components/selections").clearSelectionsCache,M=e("../cartesian/constants");function A(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=A;var S=A.prototype;S.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},S.plot=function(e,t){var r=t[this.id],n=t._size;this._hasClipOnAxisFalse=!1;for(var a=0;a<e.length;a++){if(!1===e[a][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(r),this.adjustLayout(r,n),p.generalUpdatePerTraceModule(this.graphDiv,this,e,r),this.layers.plotbg.select("path").call(c.fill,r.bgcolor)},S.makeFramework=function(e){var t=this.graphDiv,r=e[this.id],n=this.clipId="clip"+this.layoutId+this.id,a=this.clipIdRelative="clip-relative"+this.layoutId+this.id;this.clipDef=o.ensureSingleById(e._clips,"clipPath",n,function(e){e.append("path").attr("d","M0,0Z")}),this.clipDefRelative=o.ensureSingleById(e._clips,"clipPath",a,function(e){e.append("path").attr("d","M0,0Z")}),this.plotContainer=o.ensureSingle(this.container,"g",this.id),this.updateLayers(r),u.setClipUrl(this.layers.backplot,n,t),u.setClipUrl(this.layers.grids,n,t)},S.updateLayers=function(e){var t=this.layers,r=["draglayer","plotbg","backplot","grids"];"below traces"===e.aaxis.layer&&r.push("aaxis","aline"),"below traces"===e.baxis.layer&&r.push("baxis","bline"),"below traces"===e.caxis.layer&&r.push("caxis","cline"),r.push("frontplot"),"above traces"===e.aaxis.layer&&r.push("aaxis","aline"),"above traces"===e.baxis.layer&&r.push("baxis","bline"),"above traces"===e.caxis.layer&&r.push("caxis","cline");var a=this.plotContainer.selectAll("g.toplevel").data(r,String),i=["agrid","bgrid","cgrid"];a.enter().append("g").attr("class",function(e){return"toplevel "+e}).each(function(e){var r=n.select(this);t[e]=r,"frontplot"===e?r.append("g").classed("scatterlayer",!0):"backplot"===e?r.append("g").classed("maplayer",!0):"plotbg"===e?r.append("path").attr("d","M0,0Z"):"aline"===e||"bline"===e||"cline"===e?r.append("path"):"grids"===e&&i.forEach(function(e){t[e]=r.append("g").classed("grid "+e,!0)})}),a.order()};var L=Math.sqrt(4/3);S.adjustLayout=function(e,t){var r,n,a,i,o,s,p=this,h=e.domain,m=(h.x[0]+h.x[1])/2,y=(h.y[0]+h.y[1])/2,g=h.x[1]-h.x[0],v=h.y[1]-h.y[0],x=g*t.w,b=v*t.h,_=e.sum,w=e.aaxis.min,k=e.baxis.min,T=e.caxis.min;x>L*b?a=(i=b)*L:i=(a=x)/L,o=g*a/x,s=v*i/b,r=t.l+t.w*m-a/2,n=t.t+t.h*(1-y)-i/2,p.x0=r,p.y0=n,p.w=a,p.h=i,p.sum=_,p.xaxis={type:"linear",range:[w+2*T-_,_-w-2*k],domain:[m-o/2,m+o/2],_id:"x"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(e){return e.a>=p.aaxis.range[0]&&e.a<=p.aaxis.range[1]&&e.b>=p.baxis.range[1]&&e.b<=p.baxis.range[0]&&e.c>=p.caxis.range[1]&&e.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[w,_-k-T],domain:[y-s/2,y+s/2],_id:"y"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var M=p.yaxis.domain[0],A=p.aaxis=d({},e.aaxis,{range:[w,_-k-T],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[M,M+s*L],anchor:"free",position:0,_id:"y",_length:a});f(A,p.graphDiv._fullLayout),A.setScale();var S=p.baxis=d({},e.baxis,{range:[_-w-T,k],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:a});f(S,p.graphDiv._fullLayout),S.setScale();var C=p.caxis=d({},e.caxis,{range:[_-w-k,T],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[M,M+s*L],anchor:"free",position:0,_id:"y",_length:a});f(C,p.graphDiv._fullLayout),C.setScale();var D="M"+r+","+(n+i)+"h"+a+"l-"+a/2+",-"+i+"Z";p.clipDef.select("path").attr("d",D),p.layers.plotbg.select("path").attr("d",D);var O="M0,"+i+"h"+a+"l-"+a/2+",-"+i+"Z";p.clipDefRelative.select("path").attr("d",O);var P=l(r,n);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),p.clipDefRelative.select("path").attr("transform",null);var E=l(r-S._offset,n+i);p.layers.baxis.attr("transform",E),p.layers.bgrid.attr("transform",E);var R=l(r+a/2,n)+"rotate(30)"+l(0,-A._offset);p.layers.aaxis.attr("transform",R),p.layers.agrid.attr("transform",R);var z=l(r+a/2,n)+"rotate(-30)"+l(0,-C._offset);p.layers.caxis.attr("transform",z),p.layers.cgrid.attr("transform",z),p.drawAxes(!0),p.layers.aline.select("path").attr("d",A.showline?"M"+r+","+(n+i)+"l"+a/2+",-"+i:"M0,0").call(c.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+i)+"h"+a:"M0,0").call(c.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",C.showline?"M"+(r+a/2)+","+n+"l"+a/2+","+i:"M0,0").call(c.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(e){var t=this.graphDiv,r=this.id.substr(7)+"title",n=this.layers,a=this.aaxis,i=this.baxis,o=this.caxis;if(this.drawAx(a),this.drawAx(i),this.drawAx(o),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0)),c=(i.showticklabels?i.tickfont.size:0)+("outside"===i.ticks?i.ticklen:0)+3;n["a-title"]=b.draw(t,"a"+r,{propContainer:a,propName:this.id+".aaxis.title",placeholder:s(t,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),n["b-title"]=b.draw(t,"b"+r,{propContainer:i,propName:this.id+".baxis.title",placeholder:s(t,"Click to enter Component B title"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*i.title.font.size+c,"text-anchor":"middle"}}),n["c-title"]=b.draw(t,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:s(t,"Click to enter Component C title"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,"text-anchor":"middle"}})}},S.drawAx=function(e){var t,r=this.graphDiv,n=e._name,a=n.charAt(0),i=e._id,l=this.layers[n],s=a+"tickLayout",c=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);this[s]!==c&&(l.selectAll("."+i+"tick").remove(),this[s]=c),e.setScale();var u=h.calcTicks(e),f=h.clipEnds(e,u),d=h.makeTransTickFn(e),p=h.getTickSigns(e)[2],m=o.deg2rad(30),y=p*(e.linewidth||1)/2,g=p*e.ticklen,v=this.w,x=this.h,b="b"===a?"M0,"+y+"l"+Math.sin(m)*g+","+Math.cos(m)*g:"M"+y+",0l"+Math.cos(m)*g+","+-Math.sin(m)*g,_={a:"M0,0l"+x+",-"+v/2,b:"M0,0l-"+v/2+",-"+x,c:"M0,0l-"+x+","+v/2}[a];h.drawTicks(r,e,{vals:"inside"===e.ticks?f:u,layer:l,path:b,transFn:d,crisp:!1}),h.drawGrid(r,e,{vals:f,layer:this.layers[a+"grid"],path:_,transFn:d,crisp:!1}),h.drawLabels(r,e,{vals:u,layer:l,transFn:d,labelFns:h.makeLabelFns(e,0,30)})};var C=M.MINZOOM/2+.87,D="m-0.87,.5h"+C+"v3h-"+(C+5.2)+"l"+(C/2+2.6)+",-"+(.87*C+4.5)+"l2.6,1.5l-"+C/2+","+.87*C+"Z",O="m0.87,.5h-"+C+"v3h"+(C+5.2)+"l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-2.6,1.5l"+C/2+","+.87*C+"Z",P="m0,1l"+C/2+","+.87*C+"l2.6,-1.5l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-"+(C/2+2.6)+","+(.87*C+4.5)+"l2.6,1.5l"+C/2+",-"+.87*C+"Z",E="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",R=!0;function z(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearOutline=function(){T(this.dragOptions),k(this.dragOptions.gd)},S.initInteractions=function(){var e,t,r,n,f,d,p,h,g,b,k,T,A=this,S=A.layers.plotbg.select("path").node(),C=A.graphDiv,I=C._fullLayout._zoomlayer;function N(e){var t={};return t[A.id+".aaxis.min"]=e.a,t[A.id+".baxis.min"]=e.b,t[A.id+".caxis.min"]=e.c,t}function F(e,t){var r=C._fullLayout.clickmode;z(C),2===e&&(C.emit("plotly_doubleclick",null),i.call("_guiRelayout",C,N({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&w(t,C,[A.xaxis],[A.yaxis],A.id,A.dragOptions),r.indexOf("event")>-1&&y.click(C,t,A.id)}function j(e,t){return 1-t/A.h}function B(e,t){return 1-(e+(A.h-t)/Math.sqrt(3))/A.w}function H(e,t){return(e-(A.h-t)/Math.sqrt(3))/A.w}function q(a,i){var o=r+a*e,l=n+i*t,s=Math.max(0,Math.min(1,j(0,n),j(0,l))),c=Math.max(0,Math.min(1,B(r,n),B(o,l))),u=Math.max(0,Math.min(1,H(r,n),H(o,l))),m=(s/2+u)*A.w,y=(1-s/2-c)*A.w,v=(m+y)/2,x=y-m,_=(1-s)*A.h,w=_-x/L;x<M.MINZOOM?(p=f,k.attr("d",g),T.attr("d","M0,0Z")):(p={a:f.a+s*d,b:f.b+c*d,c:f.c+u*d},k.attr("d",g+"M"+m+","+_+"H"+y+"L"+v+","+w+"L"+m+","+_+"Z"),T.attr("d","M"+r+","+n+E+"M"+m+","+_+D+"M"+y+","+_+O+"M"+v+","+w+P)),b||(k.transition().style("fill",h>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),T.transition().style("opacity",1).duration(200),b=!0),C.emit("plotly_relayouting",N(p))}function U(){z(C),p!==f&&(i.call("_guiRelayout",C,N(p)),R&&C.data&&C._context.showTips&&(o.notifier(s(C,"Double-click to zoom back out"),"long"),R=!1))}function Y(e,t){var r=e/A.xaxis._m,n=t/A.yaxis._m,a=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),i=a.indexOf(p.a),s=a.indexOf(p.b),c=a.indexOf(p.c);a[0]<0&&(a[1]+a[0]/2<0?(a[2]+=a[0]+a[1],a[0]=a[1]=0):(a[2]+=a[0]/2,a[1]+=a[0]/2,a[0]=0),p={a:a[i],b:a[s],c:a[c]},t=(f.a-p.a)*A.yaxis._m,e=(f.c-p.c-f.b+p.b)*A.xaxis._m);var d=l(A.x0+e,A.y0+t);A.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",d);var h=l(-e,-t);A.clipDefRelative.select("path").attr("transform",h),A.aaxis.range=[p.a,A.sum-p.b-p.c],A.baxis.range=[A.sum-p.a-p.c,p.b],A.caxis.range=[A.sum-p.a-p.b,p.c],A.drawAxes(!1),A._hasClipOnAxisFalse&&A.plotContainer.select(".scatterlayer").selectAll(".trace").call(u.hideOutsideRangePoints,A),C.emit("plotly_relayouting",N(p))}function V(){i.call("_guiRelayout",C,N(p))}this.dragOptions={element:S,gd:C,plotinfo:{id:A.id,domain:C._fullLayout[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis},subplot:A.id,prepFn:function(i,s,u){A.dragOptions.xaxes=[A.xaxis],A.dragOptions.yaxes=[A.yaxis],e=C._fullLayout._invScaleX,t=C._fullLayout._invScaleY;var m=A.dragOptions.dragmode=C._fullLayout.dragmode;v(m)?A.dragOptions.minDrag=1:A.dragOptions.minDrag=void 0,"zoom"===m?(A.dragOptions.moveFn=q,A.dragOptions.clickFn=F,A.dragOptions.doneFn=U,function(e,t,i){var s=S.getBoundingClientRect();r=t-s.left,n=i-s.top,C._fullLayout._calcInverseTransform(C);var u=C._fullLayout._invTransform,m=o.apply3DTransform(u)(r,n);r=m[0],n=m[1],f={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=f,d=A.aaxis.range[1]-f.a,h=a(A.graphDiv._fullLayout[A.id].bgcolor).getLuminance(),g="M0,"+A.h+"L"+A.w/2+", 0L"+A.w+","+A.h+"Z",b=!1,k=I.append("path").attr("class","zoombox").attr("transform",l(A.x0,A.y0)).style({fill:h>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",g),T=I.append("path").attr("class","zoombox-corners").attr("transform",l(A.x0,A.y0)).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),A.clearOutline(C)}(0,s,u)):"pan"===m?(A.dragOptions.moveFn=Y,A.dragOptions.clickFn=F,A.dragOptions.doneFn=V,f={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=f,A.clearOutline(C)):(x(m)||v(m))&&_(i,s,u,A.dragOptions,m)}},S.onmousemove=function(e){y.hover(C,e,A.id),C._fullLayout._lasthover=S,C._fullLayout._hoversubplot=A.id},S.onmouseout=function(e){C._dragging||m.unhover(C,e)},m.init(this.dragOptions)}},{"../../components/color":158,"../../components/dragelement":177,"../../components/dragelement/helpers":176,"../../components/drawing":180,"../../components/fx":198,"../../components/selections":246,"../../components/titles":267,"../../lib":299,"../../lib/extend":293,"../../registry":387,"../cartesian/axes":346,"../cartesian/constants":353,"../cartesian/set_convert":365,"../plots":380,"@plotly/d3":20,tinycolor2:122}],387:[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"),f=s.extendFlat,d=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 g(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)v(c,t);e.layoutAttributes&&f(r.traceLayoutAttributes,e.layoutAttributes);var u=e.basePlotModule,d=u.name;if("mapbox"===d){var p=u.constants.styleRules;for(var h in p)l(".js-plotly-plot .plotly .mapboxgl-"+h,p[h])}"geo"!==d&&"mapbox"!==d||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),g(e)),r.modules)v(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&&d(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 y(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 g(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 v(e,t){var n=r.componentsRegistry[e].schema;if(n&&n.traces){var a=n.traces[t];a&&d(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&&d(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&&d(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":y(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":291,"./lib/extend":293,"./lib/is_plain_object":300,"./lib/loggers":303,"./lib/noop":308,"./lib/push_unique":313,"./plots/attributes":342,"./plots/layout_attributes":378}],388:[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),f=o({},c,l(t.tileClass)),d=e._context||{};if(t.width&&(f.width=t.width),t.height&&(f.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){f.annotations=[];var p=Object.keys(f);for(r=0;r<p.length;r++)a=p[r],["xaxis","yaxis","zaxis"].indexOf(a.slice(0,5))>-1&&(f[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++)f.annotations.push(t.annotations[r]);var m=Object.keys(f).filter(function(e){return e.match(/^scene\d*$/)});if(m.length){var y={};for("thumbnail"===t.tileClass&&(y={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<m.length;r++){var g=f[m[r]];g.xaxis||(g.xaxis={}),g.yaxis||(g.yaxis={}),g.zaxis||(g.zaxis={}),i(g.xaxis,y),i(g.yaxis,y),i(g.zaxis,y),g._scene=null}}var v=document.createElement("div");t.tileClass&&(v.className=t.tileClass);var x={gd:v,td:v,layout:f,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:d.mapboxAccessToken}};return"transparent"!==t.setBackground&&(x.config.setBackground=t.setBackground||"opaque"),x.gd.defaultLayout=l(t.tileClass),x}},{"../lib":299,"../registry":387}],389:[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":299,"../plot_api/to_image":338,"./filesaver":390,"./helpers":391}],390:[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 f="svg"===r?",":";base64,";return a.octetStream(f+encodeURIComponent(e)),l(t)}s(new Error("download error"))})}},{"../lib":299,"./helpers":391}],391:[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":387}],392:[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":388,"./download":389,"./helpers":391,"./svgtoimg":393,"./toimage":394,"./tosvg":395}],393:[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 f,d,p=e.canvas,h=e.scale||1,m=e.width||300,y=e.height||150,g=h*m,v=h*y,x=p.getContext("2d",{willReadFrequently:!0}),b=new l;"svg"===c||n.isSafari()?d=i.encodeSVG(s):(f=i.createBlob(s,"svg"),d=i.createObjectURL(f)),p.width=g,p.height=v,b.onload=function(){var r;switch(f=null,i.revokeObjectURL(d),"svg"!==c&&x.drawImage(b,0,0,g,v),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=d;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(f=null,i.revokeObjectURL(d),o(r),!e.promise)return t.emit("error",r)},b.src=d});return e.promise?r:t}},{"../lib":299,"./helpers":391,events:27}],394:[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"}),f=u.gd;f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);var d=o.getRedrawFunc(f);return a.call("_doPlot",f,u.data,u.layout,u.config).then(d).then(function(){var e=o.getDelay(f._fullLayout);setTimeout(function(){var e=s(f),n=document.createElement("canvas");n.id=i.randstr(),(r=c({format:t.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:e})).clean=function(){f&&document.body.removeChild(f)}},e)}).catch(function(e){r.emit("error",e)}),r}},{"../lib":299,"../registry":387,"./cloneplot":388,"./helpers":391,"./svgtoimg":393,"./tosvg":395,events:27}],395:[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,f=e._fullLayout,d=f._paper,p=f._toppaper,h=f.width,m=f.height;d.insert("rect",":first-child").call(i.setRect,0,0,h,m).call(o.fill,f.paper_bgcolor);var y=f._basePlotModules||[];for(u=0;u<y.length;u++){var g=y[u];g.toSVG&&g.toSVG(e)}if(p){var v=p.node().childNodes,x=Array.prototype.slice.call(v);for(u=0;u<x.length;u++){var b=x[u];b.childNodes.length&&d.node().appendChild(b)}}f._draggers&&f._draggers.remove(),d.node().style.background="",d.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()}),d.selectAll(".gradient_filled,.pattern_filled").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||d.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),d.node().setAttributeNS(l.xmlns,"xmlns",l.svg),d.node().setAttributeNS(l.xmlns,"xmlns:xlink",l.xlink),"svg"===t&&r&&(d.attr("width",r*h),d.attr("height",r*m),d.attr("viewBox","0 0 "+h+" "+m));var _=(new window.XMLSerializer).serializeToString(d.node());return _=function(e){var t=n.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,function(e){return"&lt;"===e?"&#60;":"&rt;"===e?"&#62;":-1!==e.indexOf("<")||-1!==e.indexOf(">")?"":t.html(e).text()});return t.remove(),r}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")).replace(c,"'"),a.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},{"../components/color":158,"../components/drawing":180,"../constants/xmlns_namespaces":280,"../lib":299,"@plotly/d3":20}],396:[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":299}],397:[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,f=e("../../lib/extend").extendFlat,d=s({editType:"calc",arrayOk:!0,colorEditType:"style"}),p=f({},n.marker.line.width,{dflt:0}),h=f({width:p,editType:"calc"},l("marker.line")),m=f({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:f({},d,{}),insidetextfont:f({},d,{}),outsidetextfont:f({},d,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:f({},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":165,"../../components/drawing/attributes":179,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"../scatter/attributes":509,"./constants":399}],398:[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,f,d,p,h=n.getFromId(e,t.xaxis||"x"),m=n.getFromId(e,t.yaxis||"y"),y={msUTC:!(!t.base&&0!==t.base)};"h"===t.orientation?(r=h.makeCalcdata(t,"x",y),u=m.makeCalcdata(t,"y"),f=a(t,m,"y",u),d=!!t.yperiodalignment,p="y"):(r=m.makeCalcdata(t,"y",y),u=h.makeCalcdata(t,"x"),f=a(t,h,"x",u),d=!!t.xperiodalignment,p="x"),c=f.vals;for(var g=Math.min(c.length,r.length),v=new Array(g),x=0;x<g;x++)v[x]={p:c[x],s:r[x]},d&&(v[x].orig_p=u[x],v[x][p+"End"]=f.ends[x],v[x][p+"Start"]=f.starts[x]),t.ids&&(v[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(v,t),s(v,t),v}},{"../../components/colorscale/calc":166,"../../components/colorscale/helpers":169,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"../scatter/calc_selection":511,"./arrays_to_calcdata":396}],399:[function(e,t,r){"use strict";t.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},{}],400:[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,k;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,f="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=f(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=f(c,0,u);var d=n(o);for(o=d?o:0,i=0;i<l.length;i++)l[i].b=o,d&&(l[i].hasB=1)}}}(r,o),u.mode){case"overlay":f(t,r,o,u);break;case"group":for(b=[],_=[],w=0;w<o.length;w++)void 0===(k=o[w])[0].trace.offset?_.push(k):b.push(k);_.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,f=i.length!==o.length,d=l*(1-n.gap),y=s(a,t._id)+c[0][0].trace.orientation,g=a._alignmentOpts[y]||{},v=0;v<u;v++){var x,b,_=c[v],w=_[0].trace,k=g[w.alignmentgroup]||{},T=Object.keys(k.offsetGroups||{}).length,M=(x=T?d/T:f?d/u:d)*(1-(n.groupgap||0));b=T?((2*w._offsetIndex+1-T)*x-M)/2:f?((2*v+1-u)*x-M)/2:-M/2;var A=_[0].t;A.barwidth=M,A.poffset=b,A.bargroupwidth=d,A.bardelta=l}r.binWidth=c[0][0].t.barwidth/100,p(r),h(t,r),m(t,r,f)})(e,t,o,a),function(e,t){for(var r=e.traces,n=0;n<r.length;n++){var a=r[n],o=a[0].trace;if(void 0===o.base)for(var l=new c([a],{posAxis:t,sepNegVal:!0,overlapNoMerge:!0}),s=0;s<a.length;s++){var u=a[s];if(u.p!==i){var f=l.put(u.p,u.b+u.s);f&&(u.b=f)}}}}(o,t),a.norm?(g(o),v(r,o,a)):y(r,o)}(e,t,r,_,u),b.length&&f(t,r,b,u);break;case"stack":case"relative":for(b=[],_=[],w=0;w<o.length;w++)void 0===(k=o[w])[0].trace.base?_.push(k):b.push(k);_.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)});d(t,o,a),function(e,t,r){var n,a,o,s,c,u,f=x(e),d=t.traces;for(s=0;s<d.length;s++)if(n=d[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<d.length;s++){n=d[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),y=m+h;u.b=m,u[f]=y,r.norm||(p.push(y),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],f=0;f<u.length;f++){var p=u[f];if(p.s!==i){var h=p.b+p.s===o.get(p.p,p.s);h&&(p._outmost=!0)}}a.norm&&v(r,o,a)}(0,t,r,_,u),b.length&&f(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 f=1e4/(c-s),d=l.round=function(e){return String(Math.round(f*(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],y=m[o]-m.w/2;if(n(y)){var g=m[o]+m.w/2,v=d(m.p);l[v]?l[v]=[Math.min(y,l[v][0]),Math.max(g,l[v][1])]:l[v]=[y,g]}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 f(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});d(e,o,n),n.norm?(g(o),v(t,o,n)):y(t,o)}}function d(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,f=c._offset||c.offset,d=u.poffset;if(a(f)){for(o=Array.prototype.slice.call(f,0,l.length),r=0;r<o.length;r++)n(o[r])||(o[r]=d);for(r=o.length;r<l.length;r++)o.push(d);u.poffset=o}else void 0!==f&&(u.poffset=f);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===f){for(o=[],r=0;r<l.length;r++)o.push(d+(h-m[r])/2);u.poffset=o}}else void 0!==p&&(u.barwidth=p,void 0===f&&(u.poffset=d+(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),f=0;f<i.length;f++){var d=i[f],p=d.w=u?c[f]:c;d[n]=d.p+(s?l[f]: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,f=n[i],d=f[0],p=d.trace,h=[];for(u=0;u<f.length;u++)s=(o=f[u]).p-a,c=o.p+a,h.push(s,c);if(p.width||p.offset){var m=d.t,y=m.poffset,g=m.barwidth,v=Array.isArray(y),x=Array.isArray(g);for(u=0;u<f.length;u++){o=f[u];var b=v?y[u]:y,_=x?g[u]:g;c=(s=o.p+b)+_,h.push(s,c)}}p._extremes[e._id]=l.findExtremes(e,h,{padded:!1})}}function y(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 f=i[u],d=f.b,p=d+f.s;f[n]=p,s.push(p),f.hasB&&s.push(d),f.hasB&&f.b||(c=!0)}o._extremes[e._id]=l.findExtremes(e,s,{tozero:c,padded:!0})}}function g(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 v(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)),f="stack"===r.mode?s:u;function d(t){return n(e.c2l(t))&&(t<u-c||t>f+c||!n(u))}for(var p=0;p<a.length;p++){for(var h=a[p],m=h[0].trace,y=[],g=!1,v=!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 k=_.b,T=k+_.s;_[o]=T,y.push(T),v=v||d(T),_.hasB&&(y.push(k),v=v||d(k)),_.hasB&&_.b||(g=!0)}}m._extremes[e._id]=l.findExtremes(e,y,{tozero:g,padded:v})}}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=[],f=0;f<i.length;f++){var d=i[f];if(!0===d.visible&&o.traceIs(d,"bar")&&d.xaxis===r._id&&d.yaxis===n._id&&("h"===d.orientation?s.push(l[f]):c.push(l[f]),d._computePh))for(var p=e.calcdata[f],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":279,"../../lib":299,"../../plots/cartesian/axes":346,"../../plots/cartesian/constraints":354,"../../registry":387,"./sieve.js":410,"fast-isnumeric":33}],401:[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"),f=n.coerceFont;function d(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 f=u[s];f?f.traces.push(t):f=u[s]={traces:[t],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var d=n("offsetgroup"),p=f.offsetGroups,h=p[d];d&&(h||(h=p[d]={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),d=!(!1===o.moduleHasTextangle),p=!(!1===o.moduleHasInsideanchor),h=!!o.hasPathbar,m=Array.isArray(i)||"auto"===i,y=m||"inside"===i,g=m||"outside"===i;if(y||g){var v=f(a,"textfont",r.font),x=n.extendFlat({},v),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,f(a,"insidetextfont",x),h){var _=n.extendFlat({},v);b&&delete _.color,f(a,"pathbar.textfont",_)}g&&f(a,"outsidetextfont",v),l&&a("selected.textfont.color"),s&&a("unselected.textfont.color"),c&&a("constraintext"),u&&a("cliponaxis"),d&&a("textangle"),a("texttemplate")}y&&p&&a("insidetextanchor")}t.exports={supplyDefaults:function(e,t,r,c){function f(r,a){return n.coerce(e,t,u,r,a)}if(o(e,t,c,f)){l(e,t,c,f),f("xhoverformat"),f("yhoverformat"),f("orientation",t.x&&!t.y?"h":"v"),f("base"),f("offset"),f("width"),f("text"),f("hovertext"),f("hovertemplate");var d=f("textposition");p(e,0,c,f,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s(e,t,f,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,f)}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,d(0,r,t,a))},handleGroupingDefaults:d,handleText:p}},{"../../components/color":158,"../../lib":299,"../../plots/cartesian/constraints":354,"../../registry":387,"../scatter/period_defaults":529,"../scatter/xy_defaults":536,"./attributes":397,"./style_defaults":412}],402:[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}},{}],403:[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":299,"fast-isnumeric":33,tinycolor2:122}],404:[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,f,d,p,h,m,y=e.cd,g=y[0].trace,v=y[0].t,x="closest"===a,b="waterfall"===g.type,_=e.maxHoverDistance,w=e.maxSpikeDistance;"h"===g.orientation?(l=r,u=t,f="y",d="x",p=R,h=P):(l=t,u=r,f="x",d="y",h=R,p=P);var k=g[f+"period"],T=x||k;function M(e){return S(e,-1)}function A(e){return S(e,1)}function S(e,t){var r=e.w;return e[f]+t*r/2}function L(e){return e[f+"End"]-e[f+"Start"]}var C=x?M:k?function(e){return e.p-L(e)/2}:function(e){return Math.min(M(e),e.p-v.bardelta/2)},D=x?A:k?function(e){return e.p+L(e)/2}:function(e){return Math.max(A(e),e.p+v.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(C(e),D(e),_)}function E(e){var t=e[d];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=E(e);return n.inbox(r-t,a-t,_+(a-t)/(a-r)-1)}var z=e[f+"a"],I=e[d+"a"];m=Math.abs(z.r2c(z.range[1])-z.r2c(z.range[0]));var N=n.getDistanceFunction(a,p,h,function(e){return(p(e)+h(e))/2});if(n.getClosest(y,N,e),!1!==e.index&&y[e.index].p!==c){T||(C=function(e){return Math.min(M(e),e.p-v.bargroupwidth/2)},D=function(e){return Math.max(A(e),e.p+v.bargroupwidth/2)});var F=y[e.index],j=g.base?F.b+F.s:F.s;e[d+"0"]=e[d+"1"]=I.c2p(F[d],!0),e[d+"LabelVal"]=j;var B=v.extents[v.extents.round(F.p)];e[f+"0"]=z.c2p(x?C(F):B[0],!0),e[f+"1"]=z.c2p(x?D(F):B[1],!0);var H=void 0!==F.orig_p;return e[f+"LabelVal"]=H?F.orig_p:F.p,e.labelLabel=s(z,e[f+"LabelVal"],g[f+"hoverformat"]),e.valueLabel=s(I,e[d+"LabelVal"],g[d+"hoverformat"]),e.baseLabel=s(I,F.b,g[d+"hoverformat"]),e.spikeDistance=(function(e){var t=u,r=e.b,a=E(e);return n.inbox(r-t,a-t,w+(a-t)/(a-r)-1)}(F)+function(e){return O(M(e),A(e),w)}(F))/2,e[f+"Spike"]=z.c2p(F.p,!0),o(F,g,e),e.hovertemplate=g.hovertemplate,e}}function f(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=f(s,c),a.getComponentMethod("errorbars","hoverInfo")(c,s,o),[o]}},hoverOnBars:u,getTraceColor:f}},{"../../components/color":158,"../../components/fx":198,"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"./helpers":403}],405:[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":358,"../scatter/marker_colorbar":527,"./arrays_to_calcdata":396,"./attributes":397,"./calc":398,"./cross_trace_calc":400,"./defaults":401,"./event_data":402,"./hover":404,"./layout_attributes":406,"./layout_defaults":407,"./plot":408,"./select":409,"./style":411}],406:[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"}}},{}],407:[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,f={},d=l("barmode"),p=0;p<r.length;p++){var h=r[p];if(n.traceIs(h,"bar")&&h.visible){if(s=!0,"group"===d){var m=h.xaxis+h.yaxis;f[m]&&(u=!0),f[m]=!0}if(h.visible&&"histogram"===h.type)"category"!==a.getFromId({_fullLayout:t},h["v"===h.orientation?"xaxis":"yaxis"]).type&&(c=!0)}}s?("overlay"!==d&&l("barnorm"),l("bargap",c&&!u?0:.2),l("bargroupgap")):delete t.barmode}},{"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"./layout_attributes":406}],408:[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,f=e("./uniform_text"),d=f.recordMinTextSize,p=f.clearMinTextSize,h=e("./style"),m=e("./helpers"),y=e("./constants"),g=e("./attributes"),v=g.text,x=g.textposition,b=e("../../components/fx/helpers").appendArrayPointValue,_=y.TEXTPAD;function w(e){return e.id}function k(e){if(e.ids)return w}function T(e,t){return e<t?1:-1}function M(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 S(e){return"auto"===e?0:e}function L(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 C(e,t,r,n,a,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,c=i.anchor||"end",u="end"===c,f="start"===c,d=((i.leftToRight||0)+1)/2,p=1-d,h=a.width,m=a.height,y=Math.abs(t-e),g=Math.abs(n-r),v=y>2*_&&g>2*_?_:0;y-=2*v,g-=2*v;var x=S(s);"auto"!==s||h<=y&&m<=g||!(h>y||m>g)||(h>g||m>y)&&h<m==y<g||(x+=90);var b=L(a,x),w=1;l&&(w=Math.min(1,y/b.x,g/b.y));var k=a.left*p+a.right*d,M=(a.top+a.bottom)/2,A=(e+_)*p+(t-_)*d,C=(r+n)/2,D=0,O=0;if(f||u){var P=(o?b.x:b.y)/2,E=o?T(e,t):T(r,n);o?f?(A=e+E*v,D=-E*P):(A=t-E*v,D=E*P):f?(C=r+E*v,O=-E*P):(C=n-E*v,O=E*P)}return{textX:k,textY:M,targetX:A,targetY:C,anchorX:D,anchorY:O,scale:w,rotate:x}}t.exports={plot:function(e,t,r,f,y,g){var w=t.xaxis,D=t.yaxis,O=e._fullLayout;y||(y={mode:O.barmode,norm:O.barmode,gap:O.bargap,groupgap:O.bargroupgap},p("bar",O));var P=i.makeTraceGroups(f,r,"trace bars").each(function(r){var c=n.select(this),f=r[0].trace,p="waterfall"===f.type,P="funnel"===f.type,E="bar"===f.type||P,R=0;p&&f.connector.visible&&"between"===f.connector.mode&&(R=f.connector.line.width/2);var z="h"===f.orientation,I=A(y),N=i.ensureSingle(c,"g","points"),F=k(f),j=N.selectAll("g.point").data(i.identity,F);j.enter().append("g").classed("point",!0),j.exit().remove(),j.each(function(c,p){var k,A,P=n.select(this),N=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,D,z),F=N[0][0],j=N[0][1],B=N[1][0],H=N[1][1],q=0==(z?j-F:H-B);if(q&&E&&m.getLineWidth(f,c)&&(q=!1),q||(q=!(a(F)&&a(j)&&a(B)&&a(H))),c.isBlank=q,q&&(z?j=F:H=B),R&&!q&&(z?(F-=T(F,j)*R,j+=T(F,j)*R):(B-=T(B,H)*R,H+=T(B,H)*R)),"waterfall"===f.type){if(!q){var U=f[c.dir].marker;k=U.line.width,A=U.color}}else k=m.getLineWidth(f,c),A=c.mc||f.marker.color;function Y(e){var t=n.round(k/2%1,2);return 0===y.gap&&0===y.groupgap?n.round(Math.round(e)-t,2):e}if(!e._context.staticPlot){var V=l.opacity(A)<1||k>.01?Y:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?Y(e):e>t?Math.ceil(e):Math.floor(e)};F=V(F,j,z),j=V(j,F,z),B=V(B,H,!z),H=V(H,B,!z)}var Z=M(i.ensureSingle(P,"path"),O,y,g);if(Z.style("vector-effect","non-scaling-stroke").attr("d",isNaN((j-F)*(H-B))||q&&e._context.staticPlot?"M0,0Z":"M"+F+","+B+"V"+H+"H"+j+"V"+B+"Z").call(s.setClipUrl,t.layerClipId,e),!O.uniformtext.mode&&I){var G=s.makePointStyleFns(f);s.singlePointStyle(c,Z,f,G,e)}!function(e,t,r,n,a,l,c,f,p,y,g){var w,k=t.xaxis,A=t.yaxis,D=e._fullLayout;function O(t,r,n){var a=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);return a}var P=n[0].trace,E="h"===P.orientation,R=function(e,t,r,n,a){var o,l=t[0].trace;return 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,f,d,p="histogram"===o.type,h="waterfall"===o.type,m="funnel"===o.type,y="h"===o.orientation;function g(e){return u(d,d.c2l(e),!0).text}y?(s="y",c=a,f="x",d=n):(s="x",c=n,f="y",d=a);var v,x=t[r],_={};_.label=x.p,_.labelLabel=_[s+"Label"]=(v=x.p,u(c,c.c2l(v),!0).text);var w=i.castOption(o,x.i,"text");(0===w||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[f+"Label"]=g(x.s);var k={};b(k,o,x.i),(p||void 0===k.x)&&(k.x=y?_.value:_.label),(p||void 0===k.y)&&(k.y=y?_.label:_.value),(p||void 0===k.xLabel)&&(k.xLabel=y?_.valueLabel:_.labelLabel),(p||void 0===k.yLabel)&&(k.yLabel=y?_.labelLabel:_.valueLabel),h&&(_.delta=+x.rawS||x.s,_.deltaLabel=g(_.delta),_.final=x.v,_.finalLabel=g(_.final),_.initial=_.final-_.delta,_.initialLabel=g(_.initial)),m&&(_.value=x.s,_.valueLabel=g(_.value),_.percentInitial=x.begR,_.percentInitialLabel=i.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=i.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=i.formatPercent(x.sumR));var T=i.castOption(o,x.i,"customdata");return T&&(_.customdata=T),i.texttemplateString(l,_,e._d3locale,k,_,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){var t=o?r:n;return u(t,+e,!0).text}var f,d,p=a.textinfo,h=e[t],m=p.split("+"),y=[],g=function(e){return-1!==m.indexOf(e)};if(g("label")&&y.push((d=e[t].p,u(o?n:r,d,!0).text)),g("text")&&(0===(f=i.castOption(a,h.i,"text"))||f)&&y.push(f),l){var v=+h.rawS||h.s,x=h.v,b=x-v;g("initial")&&y.push(c(b)),g("delta")&&y.push(c(v)),g("final")&&y.push(c(x))}if(s){g("value")&&y.push(c(h.s));var _=0;g("percent initial")&&_++,g("percent previous")&&_++,g("percent total")&&_++;var w=_>1;g("percent initial")&&(f=i.formatPercent(h.begR),w&&(f+=" of initial"),y.push(f)),g("percent previous")&&(f=i.formatPercent(h.difR),w&&(f+=" of previous"),y.push(f)),g("percent total")&&(f=i.formatPercent(h.sumR),w&&(f+=" of total"),y.push(f))}return y.join("<br>")}(t,r,n,a):m.getValue(l.text,r),m.coerceString(v,o)}(D,n,a,k,A);w=function(e,t){var r=m.getValue(e.textposition,t);return m.coerceEnumerated(x,r)}(P,a);var z="stack"===y.mode||"relative"===y.mode,I=n[a],N=!z||I._outmost;if(R&&"none"!==w&&(!I.isBlank&&l!==c&&f!==p||"auto"!==w&&"inside"!==w)){var F=D.font,j=h.getBarColor(n[a],P),B=h.getInsideTextFont(P,a,F,j),H=h.getOutsideTextFont(P,a,F),q=r.datum();E?"log"===k.type&&q.s0<=0&&(l=k.range[0]<k.range[1]?0:k._length):"log"===A.type&&q.s0<=0&&(f=A.range[0]<A.range[1]?A._length:0);var U,Y,V,Z,G,W=Math.abs(c-l)-2*_,J=Math.abs(p-f)-2*_;if("outside"===w&&(N||I.hasB||(w="inside")),"auto"===w)if(N){w="inside",G=i.ensureUniformFontSize(e,B),U=O(r,R,G),Y=s.bBox(U.node()),V=Y.width,Z=Y.height;var X=V>0&&Z>0,K=V<=W&&Z<=J,Q=V<=J&&Z<=W,$=E?W>=V*(J/Z):J>=Z*(W/V);X&&(K||Q||$)?w="inside":(w="outside",U.remove(),U=null)}else w="inside";if(!U){G=i.ensureUniformFontSize(e,"outside"===w?H:B);var ee=(U=O(r,R,G)).attr("transform");if(U.attr("transform",""),Y=s.bBox(U.node()),V=Y.width,Z=Y.height,U.attr("transform",ee),V<=0||Z<=0)return void U.remove()}var te,re,ne=P.textangle;"outside"===w?(re="both"===P.constraintext||"outside"===P.constraintext,te=function(e,t,r,n,a,i){var o,l=!!i.isHorizontal,s=!!i.constrained,c=i.angle||0,u=a.width,f=a.height,d=Math.abs(t-e),p=Math.abs(n-r);o=l?p>2*_?_:0:d>2*_?_:0;var h=1;s&&(h=l?Math.min(1,p/f):Math.min(1,d/u));var m=S(c),y=L(a,m),g=(l?y.x:y.y)/2,v=(a.left+a.right)/2,x=(a.top+a.bottom)/2,b=(e+t)/2,w=(r+n)/2,k=0,M=0,A=l?T(t,e):T(r,n);return l?(b=t-A*o,k=A*g):(w=n+A*o,M=-A*g),{textX:v,textY:x,targetX:b,targetY:w,anchorX:k,anchorY:M,scale:h,rotate:m}}(l,c,f,p,Y,{isHorizontal:E,constrained:re,angle:ne})):(re="both"===P.constraintext||"inside"===P.constraintext,te=C(l,c,f,p,Y,{isHorizontal:E,constrained:re,angle:ne,anchor:P.insidetextanchor})),te.fontSize=G.size,d("histogram"===P.type?"bar":P.type,te,D),I.transform=te;var ae=M(U,D,y,g);i.setTransormAndDisplay(ae,te)}else r.select("text").remove()}(e,t,P,r,p,F,j,B,H,y,g),t.layerClipId&&s.hideOutsideRangePoint(c,P.select("text"),w,D,f.xcalendar,f.ycalendar)});var B=!1===f.cliponaxis;s.setClipUrl(c,B?null:t.layerClipId,e)});c.getComponentMethod("errorbars","plot")(e,P,t,y)},toMoveInsideBar:C}},{"../../components/color":158,"../../components/drawing":180,"../../components/fx/helpers":194,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../registry":387,"./attributes":397,"./constants":399,"./helpers":403,"./style":411,"./uniform_text":413,"@plotly/d3":20,"fast-isnumeric":33}],409:[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 f=a[r],d="ct"in f?f.ct:n(f,i,o,c,s);t.contains(d,!1,r,e)?(u.push({pointNumber:r,x:i.c2d(f.x),y:o.c2d(f.y)}),f.selected=1):f.selected=0}return u}},{}],410:[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 f=(t.posAxis||{}).type;"category"!==f&&"multicategory"!==f||(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":279,"../../lib":299}],411:[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,f=c.insidetextfont,d=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,y(a,e,t,r));i.font(a,l)})}function y(e,t,r,n){var a=n._fullLayout.font,i=r.textfont;if(e.classed("bartext-inside")){var o=_(t,r);i=v(r,t.i,a,o)}else e.classed("bartext-outside")&&(i=x(r,t.i,a));return i}function g(e,t,r){return b(u,e.textfont,t,r)}function v(e,t,r,n){var i=g(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(f,e.insidetextfont,t,i)}function x(e,t,r){var n=g(e,t,r);return b(d,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,y(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:v,getOutsideTextFont:x,getBarColor:_,resizeText:s}},{"../../components/color":158,"../../components/drawing":180,"../../lib":299,"../../registry":387,"./attributes":397,"./helpers":403,"./uniform_text":413,"@plotly/d3":20}],412:[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":158,"../../components/colorscale/defaults":168,"../../components/colorscale/helpers":169,"../../lib":299}],413:[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;if(t){t.scale=s&&t.hide?0:o/t.fontSize;var r=n.select(this).select("text");a.setTransormAndDisplay(r,t)}})}}}},{"../../lib":299,"@plotly/d3":20}],414:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../bar/attributes"),i=e("../../components/color/attributes"),o=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,l=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../lib/extend").extendFlat,c=n.marker,u=c.line;t.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o("x"),yhoverformat:o("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:s({},c.symbol,{arrayOk:!1,editType:"plot"}),opacity:s({},c.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:s({},c.angle,{arrayOk:!1,editType:"calc"}),size:s({},c.size,{arrayOk:!1,editType:"calc"}),color:s({},c.color,{arrayOk:!1,editType:"style"}),line:{color:s({},u.color,{arrayOk:!1,dflt:i.defaultLine,editType:"style"}),width:s({},u.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:l({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":157,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/template_attributes":382,"../bar/attributes":397,"../scatter/attributes":509}],415:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../plots/cartesian/axes"),i=e("../../plots/cartesian/align_period"),o=e("../../lib"),l=e("../../constants/numerical").BADNUM,s=o._;t.exports=function(e,t){var r,c,v,x,b,_,w,k=e._fullLayout,T=a.getFromId(e,t.xaxis||"x"),M=a.getFromId(e,t.yaxis||"y"),A=[],S="violin"===t.type?"_numViolins":"_numBoxes";"h"===t.orientation?(v=T,x="x",b=M,_="y",w=!!t.yperiodalignment):(v=M,x="y",b=T,_="x",w=!!t.xperiodalignment);var L,C,D,O,P,E,R=function(e,t,r,a){var l,s=t+"0"in e,c="d"+t in e;if(t in e||s&&c){var u=r.makeCalcdata(e,t),f=i(e,r,t,u).vals;return[f,u]}l=s?e[t+"0"]:"name"in e&&("category"===r.type||n(e.name)&&-1!==["linear","log"].indexOf(r.type)||o.isDateTime(e.name)&&"date"===r.type)?e.name:a;for(var d="multicategory"===r.type?r.r2c_just_indices(l):r.d2c(l,0,e[t+"calendar"]),p=e._length,h=new Array(p),m=0;m<p;m++)h[m]=d;return[h]}(t,_,b,k[S]),z=R[0],I=R[1],N=o.distinctVals(z,b),F=N.vals,j=N.minDiff/2,B="all"===(t.boxpoints||t.points)?o.identity:function(e){return e.v<L.lf||e.v>L.uf};if(t._hasPreCompStats){var H=t[x],q=function(e){return v.d2c((t[e]||[])[r])},U=1/0,Y=-1/0;for(r=0;r<t._length;r++){var V=z[r];if(n(V)){if((L={}).pos=L[_]=V,w&&I&&(L.orig_p=I[r]),L.q1=q("q1"),L.med=q("median"),L.q3=q("q3"),C=[],H&&o.isArrayOrTypedArray(H[r]))for(c=0;c<H[r].length;c++)(E=v.d2c(H[r][c]))!==l&&(u(P={v:E,i:[r,c]},t,[r,c]),C.push(P));if(L.pts=C.sort(f),O=(D=L[x]=C.map(d)).length,L.med!==l&&L.q1!==l&&L.q3!==l&&L.med>=L.q1&&L.q3>=L.med){var Z=q("lowerfence");L.lf=Z!==l&&Z<=L.q1?Z:p(L,D,O);var G=q("upperfence");L.uf=G!==l&&G>=L.q3?G:h(L,D,O);var W=q("mean");L.mean=W!==l?W:O?o.mean(D,O):(L.q1+L.q3)/2;var J=q("sd");L.sd=W!==l&&J>=0?J:O?o.stdev(D,O,L.mean):L.q3-L.q1,L.lo=m(L),L.uo=y(L);var X=q("notchspan");X=X!==l&&X>0?X:g(L,O),L.ln=L.med-X,L.un=L.med+X;var K=L.lf,Q=L.uf;t.boxpoints&&D.length&&(K=Math.min(K,D[0]),Q=Math.max(Q,D[O-1])),t.notched&&(K=Math.min(K,L.ln),Q=Math.max(Q,L.un)),L.min=K,L.max=Q}else{var $;o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join("\n")),$=L.med!==l?L.med:L.q1!==l?L.q3!==l?(L.q1+L.q3)/2:L.q1:L.q3!==l?L.q3:0,L.med=$,L.q1=L.q3=$,L.lf=L.uf=$,L.mean=L.sd=$,L.ln=L.un=$,L.min=L.max=$}U=Math.min(U,L.min),Y=Math.max(Y,L.max),L.pts2=C.filter(B),A.push(L)}}t._extremes[v._id]=a.findExtremes(v,[U,Y],{padded:!0})}else{var ee=v.makeCalcdata(t,x),te=function(e,t){for(var r=e.length,n=new Array(r+1),a=0;a<r;a++)n[a]=e[a]-t;return n[r]=e[r-1]+t,n}(F,j),re=F.length,ne=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}(re);for(r=0;r<t._length;r++)if(E=ee[r],n(E)){var ae=o.findBin(z[r],te);ae>=0&&ae<re&&(u(P={v:E,i:r},t,r),ne[ae].push(P))}var ie=1/0,oe=-1/0,le=t.quartilemethod,se="exclusive"===le,ce="inclusive"===le;for(r=0;r<re;r++)if(ne[r].length>0){var ue,fe;if((L={}).pos=L[_]=F[r],C=L.pts=ne[r].sort(f),O=(D=L[x]=C.map(d)).length,L.min=D[0],L.max=D[O-1],L.mean=o.mean(D,O),L.sd=o.stdev(D,O,L.mean),L.med=o.interp(D,.5),O%2&&(se||ce))se?(ue=D.slice(0,O/2),fe=D.slice(O/2+1)):ce&&(ue=D.slice(0,O/2+1),fe=D.slice(O/2)),L.q1=o.interp(ue,.5),L.q3=o.interp(fe,.5);else L.q1=o.interp(D,.25),L.q3=o.interp(D,.75);L.lf=p(L,D,O),L.uf=h(L,D,O),L.lo=m(L),L.uo=y(L);var de=g(L,O);L.ln=L.med-de,L.un=L.med+de,ie=Math.min(ie,L.ln),oe=Math.max(oe,L.un),L.pts2=C.filter(B),A.push(L)}t._extremes[v._id]=a.findExtremes(v,t.notched?ee.concat([ie,oe]):ee,{padded:!0})}return function(e,t){if(o.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r<e.length;r++){for(var n=e[r].pts||[],a={},i=0;i<n.length;i++)a[n[i].i]=i;o.tagSelected(n,t,a)}}(A,t),A.length>0?(A[0].t={num:k[S],dPos:j,posLetter:_,valLetter:x,labels:{med:s(e,"median:"),min:s(e,"min:"),q1:s(e,"q1:"),q3:s(e,"q3:"),max:s(e,"max:"),mean:"sd"===t.boxmean?s(e,"mean ± σ:"):s(e,"mean:"),lf:s(e,"lower fence:"),uf:s(e,"upper fence:")}},k[S]++,A):[{t:{empty:!0}}]};var c={text:"tx",hovertext:"htx"};function u(e,t,r){for(var n in c)o.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(t[n][r[0]])&&(e[c[n]]=t[n][r[0]][r[1]]):e[c[n]]=t[n][r])}function f(e,t){return e.v-t.v}function d(e){return e.v}function p(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(o.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function h(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(o.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function m(e){return 4*e.q1-3*e.q3}function y(e){return 4*e.q3-3*e.q1}function g(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"fast-isnumeric":33}],416:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib"),i=e("../../plots/cartesian/constraints").getAxisGroup,o=["v","h"];function l(e,t,r,o){var l,s,c,u=t.calcdata,f=t._fullLayout,d=o._id,p=d.charAt(0),h=[],m=0;for(l=0;l<r.length;l++)for(c=u[r[l]],s=0;s<c.length;s++)h.push(o.c2l(c[s].pos,!0)),m+=(c[s].pts2||[]).length;if(h.length){var y=a.distinctVals(h);"category"!==o.type&&"multicategory"!==o.type||(y.minDiff=1);var g=y.minDiff/2;n.minDtick(o,y.minDiff,y.vals[0],!0);var v=f["violin"===e?"_numViolins":"_numBoxes"],x="group"===f[e+"mode"]&&v>1,b=1-f[e+"gap"],_=1-f[e+"groupgap"];for(l=0;l<r.length;l++){var w,k,T,M,A,S,L=(c=u[r[l]])[0].trace,C=c[0].t,D=L.width,O=L.side;if(D)w=k=M=D/2,T=0;else if(w=g,x){var P=i(f,o._id)+L.orientation,E=(f._alignmentOpts[P]||{})[L.alignmentgroup]||{},R=Object.keys(E.offsetGroups||{}).length,z=R||v;k=w*b*_/z,T=2*w*(((R?L._offsetIndex:C.num)+.5)/z-.5)*b,M=w*b/z}else k=w*b*_,T=0,M=w;C.dPos=w,C.bPos=T,C.bdPos=k,C.wHover=M;var I,N,F,j,B,H,q=T+k,U=Boolean(D);if("positive"===O?(A=w*(D?1:.5),I=q,S=I=T):"negative"===O?(A=I=T,S=w*(D?1:.5),N=q):(A=S=w,I=N=q),(L.boxpoints||L.points)&&m>0){var Y=L.pointpos,V=L.jitter,Z=L.marker.size/2,G=0;Y+V>=0&&((G=q*(Y+V))>A?(U=!0,B=Z,F=G):G>I&&(B=Z,F=A)),G<=A&&(F=A);var W=0;Y-V<=0&&((W=-q*(Y-V))>S?(U=!0,H=Z,j=W):W>N&&(H=Z,j=S)),W<=S&&(j=S)}else F=A,j=S;var J=new Array(c.length);for(s=0;s<c.length;s++)J[s]=c[s].pos;L._extremes[d]=n.findExtremes(o,J,{padded:U,vpadminus:j,vpadplus:F,vpadLinearized:!0,ppadminus:{x:H,y:B}[p],ppadplus:{x:B,y:H}[p]})}}}t.exports={crossTraceCalc:function(e,t){for(var r=e.calcdata,n=t.xaxis,a=t.yaxis,i=0;i<o.length;i++){for(var s=o[i],c="h"===s?a:n,u=[],f=0;f<r.length;f++){var d=r[f],p=d[0].t,h=d[0].trace;!0!==h.visible||"box"!==h.type&&"candlestick"!==h.type||p.empty||(h.orientation||"v")!==s||h.xaxis!==n._id||h.yaxis!==a._id||u.push(f)}l("box",e,u,c)}},setPositionOffset:l}},{"../../lib":299,"../../plots/cartesian/axes":346,"../../plots/cartesian/constraints":354}],417:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("../../components/color"),o=e("../scatter/period_defaults"),l=e("../bar/defaults").handleGroupingDefaults,s=e("../../plots/cartesian/axis_autotype"),c=e("./attributes");function u(e,t,r,i){function o(e){var t=0;return e&&e.length&&(t+=1,n.isArrayOrTypedArray(e[0])&&e[0].length&&(t+=1)),t}function l(t){return n.validate(e[t],c[t])}var u,f=r("y"),d=r("x");if("box"===t.type){var p=r("q1"),h=r("median"),m=r("q3");t._hasPreCompStats=p&&p.length&&h&&h.length&&m&&m.length,u=Math.min(n.minRowLength(p),n.minRowLength(h),n.minRowLength(m))}var y,g,v=o(f),x=o(d),b=v&&n.minRowLength(f),_=x&&n.minRowLength(d),w=i.calendar,k={autotypenumbers:i.autotypenumbers};if(t._hasPreCompStats)switch(String(x)+String(v)){case"00":var T=l("x0")||l("dx");y=(l("y0")||l("dy"))&&!T?"h":"v",g=u;break;case"10":y="v",g=Math.min(u,_);break;case"20":y="h",g=Math.min(u,d.length);break;case"01":y="h",g=Math.min(u,b);break;case"02":y="v",g=Math.min(u,f.length);break;case"12":y="v",g=Math.min(u,_,f.length);break;case"21":y="h",g=Math.min(u,d.length,b);break;case"11":g=0;break;case"22":var M,A=!1;for(M=0;M<d.length;M++)if("category"===s(d[M],w,k)){A=!0;break}if(A)y="v",g=Math.min(u,_,f.length);else{for(M=0;M<f.length;M++)if("category"===s(f[M],w,k)){A=!0;break}A?(y="h",g=Math.min(u,d.length,b)):(y="v",g=Math.min(u,_,f.length))}}else v>0?(y="v",g=x>0?Math.min(_,b):Math.min(b)):x>0?(y="h",g=Math.min(_)):g=0;if(g){t._length=g;var S=r("orientation",y);t._hasPreCompStats?"v"===S&&0===x?(r("x0",0),r("dx",1)):"h"===S&&0===v&&(r("y0",0),r("dy",1)):"v"===S&&0===x?r("x0"):"h"===S&&0===v&&r("y0"),a.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],i)}else t.visible=!1}function f(e,t,r,a){var i=a.prefix,o=n.coerce2(e,t,c,"marker.outliercolor"),l=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(o||l)&&(s="suspectedoutliers");var u=r(i+"points",s);u?(r("jitter","all"===u?.3:0),r("pointpos","all"===u?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===u&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var f=r("hoveron");"all"!==f&&-1===f.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(t,r)}t.exports={supplyDefaults:function(e,t,r,a){function l(r,a){return n.coerce(e,t,c,r,a)}if(u(e,t,l,a),!1!==t.visible){o(e,t,a,l),l("xhoverformat"),l("yhoverformat");var s=t._hasPreCompStats;s&&(l("lowerfence"),l("upperfence")),l("line.color",(e.marker||{}).color||r),l("line.width"),l("fillcolor",i.addOpacity(t.line.color,.5));var d=!1;if(s){var p=l("mean"),h=l("sd");p&&p.length&&(d=!0,h&&h.length&&(d="sd"))}l("boxmean",d),l("whiskerwidth"),l("width"),l("quartilemethod");var m=!1;if(s){var y=l("notchspan");y&&y.length&&(m=!0)}else n.validate(e.notchwidth,c.notchwidth)&&(m=!0);l("notched",m)&&l("notchwidth"),f(e,t,l,{prefix:"box"})}},crossTraceDefaults:function(e,t){var r,a;function i(e){return n.coerce(a._input,a,c,e)}for(var o=0;o<e.length;o++){var s=(a=e[o]).type;"box"!==s&&"violin"!==s||(r=a._input,"group"===t[s+"mode"]&&l(r,a,t,i))}},handleSampleDefaults:u,handlePointsDefaults:f}},{"../../components/color":158,"../../lib":299,"../../plots/cartesian/axis_autotype":347,"../../registry":387,"../bar/defaults":401,"../scatter/period_defaults":529,"./attributes":414}],418:[function(e,t,r){"use strict";t.exports=function(e,t){return t.hoverOnBox&&(e.hoverOnBox=t.hoverOnBox),"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},{}],419:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib"),i=e("../../components/fx"),o=e("../../components/color"),l=a.fillText;function s(e,t,r,l){var s,c,u,f,d,p,h,m,y,g,v,x,b,_,w=e.cd,k=e.xa,T=e.ya,M=w[0].trace,A=w[0].t,S="violin"===M.type,L=A.bdPos,C=A.wHover,D=function(e){return u.c2l(e.pos)+A.bPos-u.c2l(p)};S&&"both"!==M.side?("positive"===M.side&&(y=function(e){var t=D(e);return i.inbox(t,t+C,g)},x=L,b=0),"negative"===M.side&&(y=function(e){var t=D(e);return i.inbox(t-C,t,g)},x=0,b=L)):(y=function(e){var t=D(e);return i.inbox(t-C,t+C,g)},x=b=L),_=S?function(e){return i.inbox(e.span[0]-d,e.span[1]-d,g)}:function(e){return i.inbox(e.min-d,e.max-d,g)},"h"===M.orientation?(d=t,p=r,h=_,m=y,s="y",u=T,c="x",f=k):(d=r,p=t,h=y,m=_,s="x",u=k,c="y",f=T);var O=Math.min(1,L/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function P(e){return(h(e)+m(e))/2}g=e.maxHoverDistance-O,v=e.maxSpikeDistance-O;var E=i.getDistanceFunction(l,h,m,P);if(i.getClosest(w,E,e),!1===e.index)return[];var R=w[e.index],z=M.line.color,I=(M.marker||{}).color;o.opacity(z)&&M.line.width?e.color=z:o.opacity(I)&&M.boxpoints?e.color=I:e.color=M.fillcolor,e[s+"0"]=u.c2p(R.pos+A.bPos-b,!0),e[s+"1"]=u.c2p(R.pos+A.bPos+x,!0),e[s+"LabelVal"]=void 0!==R.orig_p?R.orig_p:R.pos;var N=s+"Spike";e.spikeDistance=P(R)*v/g,e[N]=u.c2p(R.pos,!0);var F=M.boxmean||(M.meanline||{}).visible,j=M.boxpoints||M.points,B=j&&F?["max","uf","q3","med","mean","q1","lf","min"]:j&&!F?["max","uf","q3","med","q1","lf","min"]:!j&&F?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],H=f.range[1]<f.range[0];M.orientation===(H?"v":"h")&&B.reverse();for(var q=e.spikeDistance,U=e[N],Y=[],V=0;V<B.length;V++){var Z=B[V];if(Z in R){var G=R[Z],W=f.c2p(G,!0),J=a.extendFlat({},e);J.attr=Z,J[c+"0"]=J[c+"1"]=W,J[c+"LabelVal"]=G,J[c+"Label"]=(A.labels?A.labels[Z]+" ":"")+n.hoverLabelText(f,G,M[c+"hoverformat"]),J.hoverOnBox=!0,"mean"===Z&&"sd"in R&&"sd"===M.boxmean&&(J[c+"err"]=R.sd),J.hovertemplate=!1,Y.push(J)}}e.name="",e.spikeDistance=void 0,e[N]=void 0;for(var X=0;X<Y.length;X++)"med"!==Y[X].attr?(Y[X].name="",Y[X].spikeDistance=void 0,Y[X][N]=void 0):(Y[X].spikeDistance=q,Y[X][N]=U);return Y}function c(e,t,r){for(var n,o,s,c=e.cd,u=e.xa,f=e.ya,d=c[0].trace,p=u.c2p(t),h=f.c2p(r),m=i.quadrature(function(e){var t=Math.max(3,e.mrc||0);return Math.max(Math.abs(u.c2p(e.x)-p)-t,1-3/t)},function(e){var t=Math.max(3,e.mrc||0);return Math.max(Math.abs(f.c2p(e.y)-h)-t,1-3/t)}),y=!1,g=0;g<c.length;g++){o=c[g];for(var v=0;v<(o.pts||[]).length;v++){var x=m(s=o.pts[v]);x<=e.distance&&(e.distance=x,y=[g,v])}}if(!y)return!1;s=(o=c[y[0]]).pts[y[1]];var b=u.c2p(s.x,!0),_=f.c2p(s.y,!0),w=s.mrc||1;n=a.extendFlat({},e,{index:s.i,color:(d.marker||{}).color,name:d.name,x0:b-w,x1:b+w,y0:_-w,y1:_+w,spikeDistance:e.distance,hovertemplate:d.hovertemplate});var k,T=o.orig_p,M=void 0!==T?T:o.pos;return"h"===d.orientation?(k=f,n.xLabelVal=s.x,n.yLabelVal=M):(k=u,n.xLabelVal=M,n.yLabelVal=s.y),n[k._id.charAt(0)+"Spike"]=k.c2p(o.pos,!0),l(s,d,n),n}t.exports={hoverPoints:function(e,t,r,n){var a,i=e.cd[0].trace.hoveron,o=[];return-1!==i.indexOf("boxes")&&(o=o.concat(s(e,t,r,n))),-1!==i.indexOf("points")&&(a=c(e,t,r)),"closest"===n?a?[a]:o:a?(o.push(a),o):o},hoverOnBoxes:s,hoverOnPoints:c}},{"../../components/color":158,"../../components/fx":198,"../../lib":299,"../../plots/cartesian/axes":346}],420:[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").supplyLayoutDefaults,calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc").crossTraceCalc,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:"box",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":358,"./attributes":414,"./calc":415,"./cross_trace_calc":416,"./defaults":417,"./event_data":418,"./hover":419,"./layout_attributes":421,"./layout_defaults":422,"./plot":423,"./select":424,"./style":425}],421:[function(e,t,r){"use strict";t.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}},{}],422:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("./layout_attributes");function o(e,t,r,a,i){for(var o=i+"Layout",l=!1,s=0;s<r.length;s++){var c=r[s];if(n.traceIs(c,o)){l=!0;break}}l&&(a(i+"mode"),a(i+"gap"),a(i+"groupgap"))}t.exports={supplyLayoutDefaults:function(e,t,r){o(0,0,r,function(r,n){return a.coerce(e,t,i,r,n)},"box")},_supply:o}},{"../../lib":299,"../../registry":387,"./layout_attributes":421}],423:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib"),i=e("../../components/drawing"),o=5,l=.01;function s(e,t,r,i){var o,l,s="h"===r.orientation,c=t.val,u=t.pos,f=!!u.rangebreaks,d=i.bPos,p=i.wdPos||0,h=i.bPosPxOffset||0,m=r.whiskerwidth||0,y=r.notched||!1,g=y?1-2*r.notchwidth:1;Array.isArray(i.bdPos)?(o=i.bdPos[0],l=i.bdPos[1]):(o=i.bdPos,l=i.bdPos);var v=e.selectAll("path.box").data("violin"!==r.type||r.box.visible?a.identity:[]);v.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","box"),v.exit().remove(),v.each(function(e){if(e.empty)return"M0,0Z";var t=u.c2l(e.pos+d,!0),i=u.l2p(t-o)+h,v=u.l2p(t+l)+h,x=f?(i+v)/2:u.l2p(t)+h,b=r.whiskerwidth,_=f?i*b+(1-b)*x:u.l2p(t-p)+h,w=f?v*b+(1-b)*x:u.l2p(t+p)+h,k=u.l2p(t-o*g)+h,T=u.l2p(t+l*g)+h,M=c.c2p(e.q1,!0),A=c.c2p(e.q3,!0),S=a.constrain(c.c2p(e.med,!0),Math.min(M,A)+1,Math.max(M,A)-1),L=void 0===e.lf||!1===r.boxpoints,C=c.c2p(L?e.min:e.lf,!0),D=c.c2p(L?e.max:e.uf,!0),O=c.c2p(e.ln,!0),P=c.c2p(e.un,!0);s?n.select(this).attr("d","M"+S+","+k+"V"+T+"M"+M+","+i+"V"+v+(y?"H"+O+"L"+S+","+T+"L"+P+","+v:"")+"H"+A+"V"+i+(y?"H"+P+"L"+S+","+k+"L"+O+","+i:"")+"ZM"+M+","+x+"H"+C+"M"+A+","+x+"H"+D+(0===m?"":"M"+C+","+_+"V"+w+"M"+D+","+_+"V"+w)):n.select(this).attr("d","M"+k+","+S+"H"+T+"M"+i+","+M+"H"+v+(y?"V"+O+"L"+T+","+S+"L"+v+","+P:"")+"V"+A+"H"+i+(y?"V"+P+"L"+k+","+S+"L"+i+","+O:"")+"ZM"+x+","+M+"V"+C+"M"+x+","+A+"V"+D+(0===m?"":"M"+_+","+C+"H"+w+"M"+_+","+D+"H"+w))})}function c(e,t,r,n){var s=t.x,c=t.y,u=n.bdPos,f=n.bPos,d=r.boxpoints||r.points;a.seedPseudoRandom();var p=e.selectAll("g.points").data(d?function(e){return e.forEach(function(e){e.t=n,e.trace=r}),e}:[]);p.enter().append("g").attr("class","points"),p.exit().remove();var h=p.selectAll("path").data(function(e){var t,n,i=e.pts2,s=Math.max((e.max-e.min)/10,e.q3-e.q1),c=1e-9*s,p=s*l,h=[],m=0;if(r.jitter){if(0===s)for(m=1,h=new Array(i.length),t=0;t<i.length;t++)h[t]=1;else for(t=0;t<i.length;t++){var y=Math.max(0,t-o),g=i[y].v,v=Math.min(i.length-1,t+o),x=i[v].v;"all"!==d&&(i[t].v<e.lf?x=Math.min(x,e.lf):g=Math.max(g,e.uf));var b=Math.sqrt(p*(v-y)/(x-g+c))||0;b=a.constrain(Math.abs(b),0,1),h.push(b),m=Math.max(b,m)}n=2*r.jitter/(m||1)}for(t=0;t<i.length;t++){var _=i[t],w=_.v,k=r.jitter?n*h[t]*(a.pseudoRandom()-.5):0,T=e.pos+f+u*(r.pointpos+k);"h"===r.orientation?(_.y=T,_.x=w):(_.x=T,_.y=w),"suspectedoutliers"===d&&w<e.uo&&w>e.lo&&(_.so=!0)}return i});h.enter().append("path").classed("point",!0),h.exit().remove(),h.call(i.translatePoints,s,c)}function u(e,t,r,i){var o,l,s=t.val,c=t.pos,u=!!c.rangebreaks,f=i.bPos,d=i.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(i.bdPos)?(o=i.bdPos[0],l=i.bdPos[1]):(o=i.bdPos,l=i.bdPos);var h=e.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?a.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(e){var t=c.c2l(e.pos+f,!0),a=c.l2p(t-o)+d,i=c.l2p(t+l)+d,h=u?(a+i)/2:c.l2p(t)+d,m=s.c2p(e.mean,!0),y=s.c2p(e.mean-e.sd,!0),g=s.c2p(e.mean+e.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+m+","+a+"V"+i+("sd"===p?"m0,0L"+y+","+h+"L"+m+","+a+"L"+g+","+h+"Z":"")):n.select(this).attr("d","M"+a+","+m+"H"+i+("sd"===p?"m0,0L"+h+","+y+"L"+a+","+m+"L"+h+","+g+"Z":""))})}t.exports={plot:function(e,t,r,i){var o=t.xaxis,l=t.yaxis;a.makeTraceGroups(i,r,"trace boxes").each(function(e){var t,r,a=n.select(this),i=e[0],f=i.t,d=i.trace;f.wdPos=f.bdPos*d.whiskerwidth,!0!==d.visible||f.empty?a.remove():("h"===d.orientation?(t=l,r=o):(t=o,r=l),s(a,{pos:t,val:r},d,f),c(a,{x:o,y:l},d,f),u(a,{pos:t,val:r},d,f))})},plotBoxAndWhiskers:s,plotPoints:c,plotBoxMean:u}},{"../../components/drawing":180,"../../lib":299,"@plotly/d3":20}],424:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,a=e.cd,i=e.xaxis,o=e.yaxis,l=[];if(!1===t)for(r=0;r<a.length;r++)for(n=0;n<(a[r].pts||[]).length;n++)a[r].pts[n].selected=0;else for(r=0;r<a.length;r++)for(n=0;n<(a[r].pts||[]).length;n++){var s=a[r].pts[n],c=i.c2p(s.x),u=o.c2p(s.y);t.contains([c,u],null,s.i,e)?(l.push({pointNumber:s.i,x:i.c2d(s.x),y:o.c2d(s.y)}),s.selected=1):s.selected=0}return l}},{}],425:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../components/color"),i=e("../../components/drawing");t.exports={style:function(e,t,r){var o=r||n.select(e).selectAll("g.trace.boxes");o.style("opacity",function(e){return e[0].trace.opacity}),o.each(function(t){var r=n.select(this),o=t[0].trace,l=o.line.width;function s(e,t,r,n){e.style("stroke-width",t+"px").call(a.stroke,r).call(a.fill,n)}var c=r.selectAll("path.box");if("candlestick"===o.type)c.each(function(e){if(!e.empty){var t=n.select(this),r=o[e.dir];s(t,r.line.width,r.line.color,r.fillcolor),t.style("opacity",o.selectedpoints&&!e.selected?.3:1)}});else{s(c,l,o.line.color,o.fillcolor),r.selectAll("path.mean").style({"stroke-width":l,"stroke-dasharray":2*l+"px,"+l+"px"}).call(a.stroke,o.line.color);var u=r.selectAll("path.point");i.pointStyle(u,o,e)}})},styleOnSelect:function(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?i.selectedPointStyle(a,n):i.pointStyle(a,n,e)}}},{"../../components/color":158,"../../components/drawing":180,"@plotly/d3":20}],426:[function(e,t,r){"use strict";var n=e("../heatmap/attributes"),a=e("../scatter/attributes"),i=e("../../plots/cartesian/axis_format_attributes"),o=i.axisHoverFormat,l=i.descriptionOnlyNumbers,s=e("../../components/colorscale/attributes"),c=e("../../components/drawing/attributes").dash,u=e("../../plots/font_attributes"),f=e("../../lib/extend").extendFlat,d=e("../../constants/filter_ops"),p=d.COMPARISON_OPS2,h=d.INTERVAL_OPS,m=a.line;t.exports=f({z:n.z,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:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,text:n.text,hovertext:n.hovertext,transpose:n.transpose,xtype:n.xtype,ytype:n.ytype,xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:n.hovertemplate,texttemplate:f({},n.texttemplate,{}),textfont:f({},n.textfont,{}),hoverongaps:n.hoverongaps,connectgaps:f({},n.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:u({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(p).concat(h),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:f({},m.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:c,smoothing:f({},m.smoothing,{}),editType:"plot"}},s("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":165,"../../components/drawing/attributes":179,"../../constants/filter_ops":277,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../heatmap/attributes":448,"../scatter/attributes":509}],427:[function(e,t,r){"use strict";var n=e("../../components/colorscale"),a=e("../heatmap/calc"),i=e("./set_contours"),o=e("./end_plus");t.exports=function(e,t){var r=a(e,t),l=r[0].z;i(t,l);var s,c=t.contours,u=n.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var f=c.start,d=o(c),p=c.size||1,h=Math.floor((d-f)/p)+1;isFinite(p)||(p=1,h=1);var m=f-p/2;s=[m,m+h*p]}else s=l;return n.calc(e,t,{vals:s,cLetter:"z"}),r}},{"../../components/colorscale":170,"../heatmap/calc":449,"./end_plus":437,"./set_contours":445}],428:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n=e[0],a=n.z;switch(t.type){case"levels":var i=Math.min(a[0][0],a[0][1]);for(r=0;r<e.length;r++){var o=e[r];o.prefixBoundary=!o.edgepaths.length&&(i>o.level||o.starts.length&&i===o.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var l=n.x.length,s=n.y.length,c=-1/0,u=1/0;for(r=0;r<s;r++)u=Math.min(u,a[r][0]),u=Math.min(u,a[r][l-1]),c=Math.max(c,a[r][0]),c=Math.max(c,a[r][l-1]);for(r=1;r<l-1;r++)u=Math.min(u,a[0][r]),u=Math.min(u,a[s-1][r]),c=Math.max(c,a[0][r]),c=Math.max(c,a[s-1][r]);var f,d,p=t.value;switch(t._operation){case">":p>c&&(n.prefixBoundary=!0);break;case"<":(p<u||n.starts.length&&p===u)&&(n.prefixBoundary=!0);break;case"[]":f=Math.min(p[0],p[1]),((d=Math.max(p[0],p[1]))<u||f>c||n.starts.length&&d===u)&&(n.prefixBoundary=!0);break;case"][":f=Math.min(p[0],p[1]),d=Math.max(p[0],p[1]),f<u&&d>c&&(n.prefixBoundary=!0)}}}},{}],429:[function(e,t,r){"use strict";var n=e("../../components/colorscale"),a=e("./make_color_map"),i=e("./end_plus");t.exports={min:"zmin",max:"zmax",calc:function(e,t,r){var o=t.contours,l=t.line,s=o.size||1,c=o.coloring,u=a(t,{isColorbar:!0});if("heatmap"===c){var f=n.extractOpts(t);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else"fill"===c&&(r._fillcolor=u);r._line={color:"lines"===c?u:l.color,width:!1!==o.showlines?l.width:0,dash:l.dash},r._levels={start:o.start,end:i(o),size:s}}}},{"../../components/colorscale":170,"./end_plus":437,"./make_color_map":442}],430:[function(e,t,r){"use strict";t.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],431:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./label_defaults"),i=e("../../components/color"),o=i.addOpacity,l=i.opacity,s=e("../../constants/filter_ops"),c=s.CONSTRAINT_REDUCTION,u=s.COMPARISON_OPS2;t.exports=function(e,t,r,i,s,f){var d,p,h,m=t.contours,y=r("contours.operation");(m._operation=c[y],function(e,t){var r;-1===u.indexOf(t.operation)?(e("contours.value",[0,1]),Array.isArray(t.value)?t.value.length>2?t.value=t.value.slice(2):0===t.length?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:n(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),n(t.value)||(Array.isArray(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}(r,m),"="===y?d=m.showlines=!0:(d=r("contours.showlines"),h=r("fillcolor",o((e.line||{}).color||s,.5))),d)&&(p=r("line.color",h&&l(h)?o(t.fillcolor,1):s),r("line.width",2),r("line.dash"));r("line.smoothing"),a(r,i,p,f)}},{"../../components/color":158,"../../constants/filter_ops":277,"./label_defaults":441,"fast-isnumeric":33}],432:[function(e,t,r){"use strict";var n=e("../../constants/filter_ops"),a=e("fast-isnumeric");function i(e,t){var r,i=Array.isArray(t);function o(e){return a(e)?+e:null}return-1!==n.COMPARISON_OPS2.indexOf(e)?r=o(i?t[0]:t):-1!==n.INTERVAL_OPS.indexOf(e)?r=i?[o(t[0]),o(t[1])]:[o(t),o(t)]:-1!==n.SET_OPS.indexOf(e)&&(r=i?t.map(o):[o(t)]),r}function o(e){return function(t){t=i(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function l(e){return function(t){return{start:t=i(e,t),end:1/0,size:1/0}}}t.exports={"[]":o("[]"),"][":o("]["),">":l(">"),"<":l("<"),"=":l("=")}},{"../../constants/filter_ops":277,"fast-isnumeric":33}],433:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var a=n("contours.start"),i=n("contours.end"),o=!1===a||!1===i,l=r("contours.size");!(o?t.autocontour=!0:r("autocontour",!1))&&l||r("ncontours")}},{}],434:[function(e,t,r){"use strict";var n=e("../../lib");function a(e){return n.extendFlat({},e,{edgepaths:n.extendDeep([],e.edgepaths),paths:n.extendDeep([],e.paths),starts:n.extendDeep([],e.starts)})}t.exports=function(e,t){var r,i,o,l=function(e){return e.reverse()},s=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&n.warn("Contour data invalid for the specified inequality operation."),i=e[0],r=0;r<i.edgepaths.length;r++)i.edgepaths[r]=l(i.edgepaths[r]);for(r=0;r<i.paths.length;r++)i.paths[r]=l(i.paths[r]);for(r=0;r<i.starts.length;r++)i.starts[r]=l(i.starts[r]);return e;case"][":var c=l;l=s,s=c;case"[]":for(2!==e.length&&n.warn("Contour data invalid for the specified inequality range operation."),i=a(e[0]),o=a(e[1]),r=0;r<i.edgepaths.length;r++)i.edgepaths[r]=l(i.edgepaths[r]);for(r=0;r<i.paths.length;r++)i.paths[r]=l(i.paths[r]);for(r=0;r<i.starts.length;r++)i.starts[r]=l(i.starts[r]);for(;o.edgepaths.length;)i.edgepaths.push(s(o.edgepaths.shift()));for(;o.paths.length;)i.paths.push(s(o.paths.shift()));for(;o.starts.length;)i.starts.push(s(o.starts.shift()));return[i]}}},{"../../lib":299}],435:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../heatmap/xyz_defaults"),i=e("../scatter/period_defaults"),o=e("./constraint_defaults"),l=e("./contours_defaults"),s=e("./style_defaults"),c=e("../heatmap/label_defaults"),u=e("./attributes");t.exports=function(e,t,r,f){function d(r,a){return n.coerce(e,t,u,r,a)}if(a(e,t,d,f)){i(e,t,f,d),d("xhoverformat"),d("yhoverformat"),d("text"),d("hovertext"),d("hoverongaps"),d("hovertemplate");var p="constraint"===d("contours.type");d("connectgaps",n.isArray1D(t.z)),p?o(e,t,d,f,r):(l(e,t,d,function(r){return n.coerce2(e,t,u,r)}),s(e,t,d,f)),t.contours&&"heatmap"===t.contours.coloring&&c(d,f)}else t.visible=!1}},{"../../lib":299,"../heatmap/label_defaults":458,"../heatmap/xyz_defaults":463,"../scatter/period_defaults":529,"./attributes":426,"./constraint_defaults":431,"./contours_defaults":433,"./style_defaults":447}],436:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./constraint_mapping"),i=e("./end_plus");t.exports=function(e,t,r){for(var o="constraint"===e.type?a[e._operation](e.value):e,l=o.size,s=[],c=i(o),u=r.trace._carpetTrace,f=u?{xaxis:u.aaxis,yaxis:u.baxis,x:r.a,y:r.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:r.x,y:r.y},d=o.start;d<c;d+=l)if(s.push(n.extendFlat({level:d,crossings:{},starts:[],edgepaths:[],paths:[],z:r.z,smoothing:r.trace.line.smoothing},f)),s.length>1e3){n.warn("Too many contours, clipping at 1000",e);break}return s}},{"../../lib":299,"./constraint_mapping":432,"./end_plus":437}],437:[function(e,t,r){"use strict";t.exports=function(e){return e.end+e.size/1e6}},{}],438:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./constants");function i(e,t,r,n){return Math.abs(e[0]-t[0])<r&&Math.abs(e[1]-t[1])<n}function o(e,t,r,o,s){var c,u=t.join(","),f=e.crossings[u],d=function(e,t,r){var n=0,i=0;e>20&&t?208===e||1114===e?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==a.BOTTOMSTART.indexOf(e)?i=1:-1!==a.LEFTSTART.indexOf(e)?n=1:-1!==a.TOPSTART.indexOf(e)?i=-1:n=-1;return[n,i]}(f,r,t),p=[l(e,t,[-d[0],-d[1]])],h=e.z.length,m=e.z[0].length,y=t.slice(),g=d.slice();for(c=0;c<1e4;c++){if(f>20?(f=a.CHOOSESADDLE[f][(d[0]||d[1])<0?0:1],e.crossings[u]=a.SADDLEREMAINDER[f]):delete e.crossings[u],!(d=a.NEWDELTA[f])){n.log("Found bad marching index:",f,t,e.level);break}p.push(l(e,t,d)),t[0]+=d[0],t[1]+=d[1],u=t.join(","),i(p[p.length-1],p[p.length-2],o,s)&&p.pop();var v=d[0]&&(t[0]<0||t[0]>m-2)||d[1]&&(t[1]<0||t[1]>h-2);if(t[0]===y[0]&&t[1]===y[1]&&d[0]===g[0]&&d[1]===g[1]||r&&v)break;f=e.crossings[u]}1e4===c&&n.log("Infinite loop in contour?");var x,b,_,w,k,T,M,A,S,L,C,D,O,P,E,R=i(p[0],p[p.length-1],o,s),z=0,I=.2*e.smoothing,N=[],F=0;for(c=1;c<p.length;c++)D=p[c],O=p[c-1],P=void 0,E=void 0,P=D[2]-O[2],E=D[3]-O[3],z+=M=Math.sqrt(P*P+E*E),N.push(M);var j=z/N.length*I;function B(e){return p[e%p.length]}for(c=p.length-2;c>=F;c--)if((x=N[c])<j){for(_=0,b=c-1;b>=F&&x+N[b]<j;b--)x+=N[b];if(R&&c===p.length-2)for(_=0;_<b&&x+N[_]<j;_++)x+=N[_];k=c-b+_+1,T=Math.floor((c+b+_+2)/2),w=R||c!==p.length-2?R||-1!==b?k%2?B(T):[(B(T)[0]+B(T+1)[0])/2,(B(T)[1]+B(T+1)[1])/2]:p[0]:p[p.length-1],p.splice(b+1,c-b+1,w),c=b+1,_&&(F=_),R&&(c===p.length-2?p[_]=p[p.length-1]:0===c&&(p[p.length-1]=p[0]))}for(p.splice(0,F),c=0;c<p.length;c++)p[c].length=2;if(!(p.length<2))if(R)p.pop(),e.paths.push(p);else{r||n.log("Unclosed interior contour?",e.level,y.join(","),p.join("L"));var H=!1;for(A=0;A<e.edgepaths.length;A++)if(L=e.edgepaths[A],!H&&i(L[0],p[p.length-1],o,s)){p.pop(),H=!0;var q=!1;for(S=0;S<e.edgepaths.length;S++)if(i((C=e.edgepaths[S])[C.length-1],p[0],o,s)){q=!0,p.shift(),e.edgepaths.splice(A,1),S===A?e.paths.push(p.concat(C)):(S>A&&S--,e.edgepaths[S]=C.concat(p,L));break}q||(e.edgepaths[A]=p.concat(L))}for(A=0;A<e.edgepaths.length&&!H;A++)i((L=e.edgepaths[A])[L.length-1],p[0],o,s)&&(p.shift(),e.edgepaths[A]=L.concat(p),H=!0);H||e.edgepaths.push(p)}}function l(e,t,r){var n=t[0]+Math.max(r[0],0),a=t[1]+Math.max(r[1],0),i=e.z[a][n],o=e.xaxis,l=e.yaxis;if(r[1]){var s=(e.level-i)/(e.z[a][n+1]-i),c=(1!==s?(1-s)*o.c2l(e.x[n]):0)+(0!==s?s*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(c),!0),l.c2p(e.y[a],!0),n+s,a]}var u=(e.level-i)/(e.z[a+1][n]-i),f=(1!==u?(1-u)*l.c2l(e.y[a]):0)+(0!==u?u*l.c2l(e.y[a+1]):0);return[o.c2p(e.x[n],!0),l.c2p(l.l2c(f),!0),n,a+u]}t.exports=function(e,t,r){var a,i,l,s;for(t=t||.01,r=r||.01,i=0;i<e.length;i++){for(l=e[i],s=0;s<l.starts.length;s++)o(l,l.starts[s],"edge",t,r);for(a=0;Object.keys(l.crossings).length&&a<1e4;)a++,o(l,Object.keys(l.crossings)[0].split(",").map(Number),void 0,t,r);1e4===a&&n.log("Infinite loop in contour?")}}},{"../../lib":299,"./constants":430}],439:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../heatmap/hover");t.exports=function(e,t,r,i,o){o||(o={}),o.isContour=!0;var l=a(e,t,r,i,o);return l&&l.forEach(function(e){var t=e.trace;"constraint"===t.contours.type&&(t.fillcolor&&n.opacity(t.fillcolor)?e.color=n.addOpacity(t.fillcolor,1):t.contours.showlines&&n.opacity(t.line.color)&&(e.color=n.addOpacity(t.line.color,1)))}),l}},{"../../components/color":158,"../heatmap/hover":455}],440:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot").plot,style:e("./style"),colorbar:e("./colorbar"),hoverPoints:e("./hover"),moduleType:"trace",name:"contour",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},{"../../plots/cartesian":358,"./attributes":426,"./calc":427,"./colorbar":429,"./defaults":435,"./hover":439,"./plot":444,"./style":446}],441:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t,r,a){if(a||(a={}),e("contours.showlabels")){var i=t.font;n.coerceFont(e,"contours.labelfont",{family:i.family,size:i.size,color:r}),e("contours.labelformat")}!1!==a.hasHover&&e("zhoverformat")}},{"../../lib":299}],442:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../components/colorscale"),i=e("./end_plus");t.exports=function(e){var t=e.contours,r=t.start,o=i(t),l=t.size||1,s=Math.floor((o-r)/l)+1,c="lines"===t.coloring?0:1,u=a.extractOpts(e);isFinite(l)||(l=1,s=1);var f,d,p=u.reversescale?a.flipScale(u.colorscale):u.colorscale,h=p.length,m=new Array(h),y=new Array(h);if("heatmap"===t.coloring){var g=u.min,v=u.max;for(d=0;d<h;d++)f=p[d],m[d]=f[0]*(v-g)+g,y[d]=f[1];var x=n.extent([g,v,t.start,t.start+l*(s-1)]),b=x[g<v?0:1],_=x[g<v?1:0];b!==g&&(m.splice(0,0,b),y.splice(0,0,y[0])),_!==v&&(m.push(_),y.push(y[y.length-1]))}else for(d=0;d<h;d++)f=p[d],m[d]=(f[0]*(s+c-1)-c/2)*l+r,y[d]=f[1];return a.makeColorScaleFunc({domain:m,range:y},{noNumericCheck:!0})}},{"../../components/colorscale":170,"./end_plus":437,"@plotly/d3":20}],443:[function(e,t,r){"use strict";var n=e("./constants");function a(e,t){var r=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}t.exports=function(e){var t,r,i,o,l,s,c,u,f,d=e[0].z,p=d.length,h=d[0].length,m=2===p||2===h;for(r=0;r<p-1;r++)for(o=[],0===r&&(o=o.concat(n.BOTTOMSTART)),r===p-2&&(o=o.concat(n.TOPSTART)),t=0;t<h-1;t++)for(i=o.slice(),0===t&&(i=i.concat(n.LEFTSTART)),t===h-2&&(i=i.concat(n.RIGHTSTART)),l=t+","+r,s=[[d[r][t],d[r][t+1]],[d[r+1][t],d[r+1][t+1]]],f=0;f<e.length;f++)(c=a((u=e[f]).level,s))&&(u.crossings[l]=c,-1!==i.indexOf(c)&&(u.starts.push([t,r]),m&&-1!==i.indexOf(c,i.indexOf(c)+1)&&u.starts.push([t,r])))}},{"./constants":430}],444:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../../components/colorscale"),l=e("../../lib/svg_text_utils"),s=e("../../plots/cartesian/axes"),c=e("../../plots/cartesian/set_convert"),u=e("../heatmap/plot"),f=e("./make_crossings"),d=e("./find_all_paths"),p=e("./empty_pathinfo"),h=e("./convert_to_constraints"),m=e("./close_boundaries"),y=e("./constants"),g=y.LABELOPTIMIZER;function v(e,t){var r,n,o,l,s,c,u,f="",d=0,p=e.edgepaths.map(function(e,t){return t}),h=!0;function m(e){return Math.abs(e[1]-t[2][1])<.01}function y(e){return Math.abs(e[0]-t[0][0])<.01}function g(e){return Math.abs(e[0]-t[2][0])<.01}for(;p.length;){for(c=i.smoothopen(e.edgepaths[d],e.smoothing),f+=h?c:c.replace(/^M/,"L"),p.splice(p.indexOf(d),1),r=e.edgepaths[d][e.edgepaths[d].length-1],l=-1,o=0;o<4;o++){if(!r){a.log("Missing end?",d,e);break}for(u=r,Math.abs(u[1]-t[0][1])<.01&&!g(r)?n=t[1]:y(r)?n=t[0]:m(r)?n=t[3]:g(r)&&(n=t[2]),s=0;s<e.edgepaths.length;s++){var v=e.edgepaths[s][0];Math.abs(r[0]-n[0])<.01?Math.abs(r[0]-v[0])<.01&&(v[1]-r[1])*(n[1]-v[1])>=0&&(n=v,l=s):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-v[1])<.01&&(v[0]-r[0])*(n[0]-v[0])>=0&&(n=v,l=s):a.log("endpt to newendpt is not vert. or horz.",r,n,v)}if(r=n,l>=0)break;f+="L"+n}if(l===e.edgepaths.length){a.log("unclosed perimeter path");break}d=l,(h=-1===p.indexOf(d))&&(d=p[0],f+="Z")}for(d=0;d<e.paths.length;d++)f+=i.smoothclosed(e.paths[d],e.smoothing);return f}function x(e,t,r,n){var i=t.width/2,o=t.height/2,l=e.x,s=e.y,c=e.theta,u=Math.cos(c)*i,f=Math.sin(c)*i,d=(l>n.center?n.right-l:l-n.left)/(u+Math.abs(Math.sin(c)*o)),p=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(f)+Math.cos(c)*o);if(d<1||p<1)return 1/0;var h=g.EDGECOST*(1/(d-1)+1/(p-1));h+=g.ANGLECOST*c*c;for(var m=l-u,y=s-f,v=l+u,x=s+f,b=0;b<r.length;b++){var _=r[b],w=Math.cos(_.theta)*_.width/2,k=Math.sin(_.theta)*_.width/2,T=2*a.segmentDistance(m,y,v,x,_.x-w,_.y-k,_.x+w,_.y+k)/(t.height+_.height),M=_.level===t.level,A=M?g.SAMELEVELDISTANCE:1;if(T<=A)return 1/0;h+=g.NEIGHBORCOST*(M?g.SAMELEVELFACTOR:1)/(T-A)}return h}function b(e){var t,r,n=e.trace._emptypoints,a=[],i=e.z.length,o=e.z[0].length,l=[];for(t=0;t<o;t++)l.push(1);for(t=0;t<i;t++)a.push(l.slice());for(t=0;t<n.length;t++)a[(r=n[t])[0]][r[1]]=0;return e.zmask=a,a}r.plot=function(e,t,o,l){var s=t.xaxis,c=t.yaxis;a.makeTraceGroups(l,o,"contour").each(function(o){var l=n.select(this),g=o[0],x=g.trace,_=g.x,w=g.y,k=x.contours,T=p(k,t,g),M=a.ensureSingle(l,"g","heatmapcoloring"),A=[];"heatmap"===k.coloring&&(A=[o]),u(e,t,A,M),f(T),d(T);var S=s.c2p(_[0],!0),L=s.c2p(_[_.length-1],!0),C=c.c2p(w[0],!0),D=c.c2p(w[w.length-1],!0),O=[[S,D],[L,D],[L,C],[S,C]],P=T;"constraint"===k.type&&(P=h(T,k._operation)),function(e,t,r){var n=a.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"===r.coloring?[0]:[]);n.enter().append("path"),n.exit().remove(),n.attr("d","M"+t.join("L")+"Z").style("stroke","none")}(l,O,k),function(e,t,r,i){var o="fill"===i.coloring||"constraint"===i.type&&"="!==i._operation,l="M"+r.join("L")+"Z";o&&m(t,i);var s=a.ensureSingle(e,"g","contourfill").selectAll("path").data(o?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(e){var t=(e.prefixBoundary?l:"")+v(e,r);t?n.select(this).attr("d",t).style("stroke","none"):n.select(this).remove()})}(l,P,O,k),function(e,t,o,l,s){var c=a.ensureSingle(e,"g","contourlines"),u=!1!==s.showlines,f=s.showlabels,d=u&&f,p=r.createLines(c,u||f,t),h=r.createLineClip(c,d,o,l.trace.uid),m=e.selectAll("g.contourlabels").data(f?[0]:[]);if(m.exit().remove(),m.enter().append("g").classed("contourlabels",!0),f){var g=[],v=[];a.clearLocationCache();var x=r.labelFormatter(o,l),b=i.tester.append("text").attr("data-notex",1).call(i.font,s.labelfont),_=t[0].xaxis,w=t[0].yaxis,k=_._length,T=w._length,M=_.range,A=w.range,S=a.aggNums(Math.min,null,l.x),L=a.aggNums(Math.max,null,l.x),C=a.aggNums(Math.min,null,l.y),D=a.aggNums(Math.max,null,l.y),O=Math.max(_.c2p(S,!0),0),P=Math.min(_.c2p(L,!0),k),E=Math.max(w.c2p(D,!0),0),R=Math.min(w.c2p(C,!0),T),z={};M[0]<M[1]?(z.left=O,z.right=P):(z.left=P,z.right=O),A[0]<A[1]?(z.top=E,z.bottom=R):(z.top=R,z.bottom=E),z.middle=(z.top+z.bottom)/2,z.center=(z.left+z.right)/2,g.push([[z.left,z.top],[z.right,z.top],[z.right,z.bottom],[z.left,z.bottom]]);var I=Math.sqrt(k*k+T*T),N=y.LABELDISTANCE*I/Math.max(1,t.length/y.LABELINCREASE);p.each(function(e){var t=r.calcTextOpts(e.level,x,b,o);n.select(this).selectAll("path").each(function(){var e=a.getVisibleSegment(this,z,t.height/2);if(e&&!(e.len<(t.width+t.height)*y.LABELMIN))for(var n=Math.min(Math.ceil(e.len/N),y.LABELMAX),i=0;i<n;i++){var o=r.findBestTextLocation(this,e,t,v,z);if(!o)break;r.addLabelData(o,t,v,g)}})}),b.remove(),r.drawLabels(m,v,o,h,d?g:null)}f&&!u&&p.remove()}(l,T,e,g,k),function(e,t,r,n,o){var l=n.trace,s=r._fullLayout._clips,c="clip"+l.uid,u=s.selectAll("#"+c).data(l.connectgaps?[]:[0]);if(u.enter().append("clipPath").classed("contourclip",!0).attr("id",c),u.exit().remove(),!1===l.connectgaps){var p={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:t.xaxis,yaxis:t.yaxis,x:n.x,y:n.y,z:b(n),smoothing:0};f([p]),d([p]),m([p],{type:"levels"});var h=a.ensureSingle(u,"path","");h.attr("d",(p.prefixBoundary?"M"+o.join("L")+"Z":"")+v(p,o))}else c=null;i.setClipUrl(e,c,r)}(l,t,e,g,O)})},r.createLines=function(e,t,r){var n=r[0].smoothing,a=e.selectAll("g.contourlevel").data(t?r:[]);if(a.exit().remove(),a.enter().append("g").classed("contourlevel",!0),t){var o=a.selectAll("path.openline").data(function(e){return e.pedgepaths||e.edgepaths});o.exit().remove(),o.enter().append("path").classed("openline",!0),o.attr("d",function(e){return i.smoothopen(e,n)}).style("stroke-miterlimit",1).style("vector-effect","non-scaling-stroke");var l=a.selectAll("path.closedline").data(function(e){return e.ppaths||e.paths});l.exit().remove(),l.enter().append("path").classed("closedline",!0),l.attr("d",function(e){return i.smoothclosed(e,n)}).style("stroke-miterlimit",1).style("vector-effect","non-scaling-stroke")}return a},r.createLineClip=function(e,t,r,n){var a=t?"clipline"+n:null,o=r._fullLayout._clips.selectAll("#"+a).data(t?[0]:[]);return o.exit().remove(),o.enter().append("clipPath").classed("contourlineclip",!0).attr("id",a),i.setClipUrl(e,a,r),o},r.labelFormatter=function(e,t){var r=e._fullLayout,n=t.trace,a=n.contours,i={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(a.labelformat)i.tickformat=a.labelformat,c(i,r);else{var l=o.extractOpts(n);if(l&&l.colorbar&&l.colorbar._axis)i=l.colorbar._axis;else{if("constraint"===a.type){var u=a.value;Array.isArray(u)?i.range=[u[0],u[u.length-1]]:i.range=[u,u]}else i.range=[a.start,a.end],i.nticks=(a.end-a.start)/a.size;i.range[0]===i.range[1]&&(i.range[1]+=i.range[0]||1),i.nticks||(i.nticks=1e3),c(i,r),s.prepTicks(i),i._tmin=null,i._tmax=null}}return function(e){return s.tickText(i,e).text}},r.calcTextOpts=function(e,t,r,n){var a=t(e);r.text(a).call(l.convertToTspans,n);var o=r.node(),s=i.bBox(o,!0);return{text:a,width:s.width,height:s.height,fontSize:+o.style["font-size"].replace("px",""),level:e,dy:(s.top+s.bottom)/2}},r.findBestTextLocation=function(e,t,r,n,i){var o,l,s,c,u,f=r.width;t.isClosed?(l=t.len/g.INITIALSEARCHPOINTS,o=t.min+l/2,s=t.max):(l=(t.len-f)/(g.INITIALSEARCHPOINTS+1),o=t.min+l+f/2,s=t.max-(l+f)/2);for(var d=1/0,p=0;p<g.ITERATIONS;p++){for(var h=o;h<s;h+=l){var m=a.getTextLocation(e,t.total,h,f),y=x(m,r,n,i);y<d&&(d=y,u=m,c=h)}if(d>2*g.MAXCOST)break;p&&(l/=2),s=(o=c-l/2)+1.5*l}if(d<=g.MAXCOST)return u},r.addLabelData=function(e,t,r,n){var a=t.fontSize,i=t.width+a/3,o=Math.max(0,t.height-a/3),l=e.x,s=e.y,c=e.theta,u=Math.sin(c),f=Math.cos(c),d=function(e,t){return[l+e*f-t*u,s+e*u+t*f]},p=[d(-i/2,-o/2),d(-i/2,o/2),d(i/2,o/2),d(i/2,-o/2)];r.push({text:t.text,x:l,y:s,dy:t.dy,theta:c,level:t.level,width:i,height:o}),n.push(p)},r.drawLabels=function(e,t,r,i,o){var s=e.selectAll("text").data(t,function(e){return e.text+","+e.x+","+e.y+","+e.theta});if(s.exit().remove(),s.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(e){var t=e.x+Math.sin(e.theta)*e.dy,a=e.y-Math.cos(e.theta)*e.dy;n.select(this).text(e.text).attr({x:t,y:a,transform:"rotate("+180*e.theta/Math.PI+" "+t+" "+a+")"}).call(l.convertToTspans,r)}),o){for(var c="",u=0;u<o.length;u++)c+="M"+o[u].join("L")+"Z";a.ensureSingle(i,"path","").attr("d",c)}}},{"../../components/colorscale":170,"../../components/drawing":180,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../plots/cartesian/set_convert":365,"../heatmap/plot":460,"./close_boundaries":428,"./constants":430,"./convert_to_constraints":434,"./empty_pathinfo":436,"./find_all_paths":438,"./make_crossings":443,"@plotly/d3":20}],445:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib");function i(e,t,r){var a={type:"linear",range:[e,t]};return n.autoTicks(a,(t-e)/(r||15)),a}t.exports=function(e,t){var r=e.contours;if(e.autocontour){var o=e.zmin,l=e.zmax;(e.zauto||void 0===o)&&(o=a.aggNums(Math.min,null,t)),(e.zauto||void 0===l)&&(l=a.aggNums(Math.max,null,t));var s=i(o,l,e.ncontours);r.size=s.dtick,r.start=n.tickFirst(s),s.range.reverse(),r.end=n.tickFirst(s),r.start===o&&(r.start+=r.size),r.end===l&&(r.end-=r.size),r.start>r.end&&(r.start=r.end=(r.start+r.end)/2),e._input.contours||(e._input.contours={}),a.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if("constraint"!==r.type){var c,u=r.start,f=r.end,d=e._input.contours;if(u>f&&(r.start=d.start=f,f=r.end=d.end=u,u=r.start),!(r.size>0))c=u===f?1:i(u,f,e.ncontours).dtick,d.size=r.size=c}}},{"../../lib":299,"../../plots/cartesian/axes":346}],446:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../components/drawing"),i=e("../heatmap/style"),o=e("./make_color_map");t.exports=function(e){var t=n.select(e).selectAll("g.contour");t.style("opacity",function(e){return e[0].trace.opacity}),t.each(function(e){var t=n.select(this),r=e[0].trace,i=r.contours,l=r.line,s=i.size||1,c=i.start,u="constraint"===i.type,f=!u&&"lines"===i.coloring,d=!u&&"fill"===i.coloring,p=f||d?o(r):null;t.selectAll("g.contourlevel").each(function(e){n.select(this).selectAll("path").call(a.lineGroupStyle,l.width,f?p(e.level):l.color,l.dash)});var h=i.labelfont;if(t.selectAll("g.contourlabels text").each(function(e){a.font(n.select(this),{family:h.family,size:h.size,color:h.color||(f?p(e.level):l.color)})}),u)t.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(d){var m;t.selectAll("g.contourfill path").style("fill",function(e){return void 0===m&&(m=e.level),p(e.level+.5*s)}),void 0===m&&(m=c),t.selectAll("g.contourbg path").style("fill",p(m-.5*s))}}),i(e)}},{"../../components/drawing":180,"../heatmap/style":461,"./make_color_map":442,"@plotly/d3":20}],447:[function(e,t,r){"use strict";var n=e("../../components/colorscale/defaults"),a=e("./label_defaults");t.exports=function(e,t,r,i,o){var l,s=r("contours.coloring"),c="";"fill"===s&&(l=r("contours.showlines")),!1!==l&&("lines"!==s&&(c=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==s&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,n(e,t,i,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),a(r,i,c,o)}},{"../../components/colorscale/defaults":168,"./label_defaults":441}],448:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../../plots/attributes"),i=e("../../plots/font_attributes"),o=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,l=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,c=e("../../components/colorscale/attributes"),u=e("../../lib/extend").extendFlat;t.exports=u({z:{valType:"data_array",editType:"calc"},x:u({},n.x,{impliedEdits:{xtype:"array"}}),x0:u({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:u({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:u({},n.y,{impliedEdits:{ytype:"array"}}),y0:u({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:u({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:u({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:u({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:u({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:u({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:u({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:u({},n.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:l(),texttemplate:s({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:i({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:u({},a.showlegend,{dflt:!1})},{transforms:void 0},c("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":165,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"../scatter/attributes":509}],449:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../plots/cartesian/align_period"),l=e("../histogram2d/calc"),s=e("../../components/colorscale/calc"),c=e("./convert_column_xyz"),u=e("./clean_2d_array"),f=e("./interp2d"),d=e("./find_empties"),p=e("./make_bound_array"),h=e("../../constants/numerical").BADNUM;function m(e){for(var t=[],r=e.length,n=0;n<r;n++){var a=e[n];a!==h&&t.push(a)}return t}t.exports=function(e,t){var r,y,g,v,x,b,_,w,k,T,M,A=i.getFromId(e,t.xaxis||"x"),S=i.getFromId(e,t.yaxis||"y"),L=n.traceIs(t,"contour"),C=n.traceIs(t,"histogram"),D=n.traceIs(t,"gl2d"),O=L?"best":t.zsmooth;if(A._minDtick=0,S._minDtick=0,C)v=(M=l(e,t)).orig_x,r=M.x,y=M.x0,g=M.dx,w=M.orig_y,x=M.y,b=M.y0,_=M.dy,k=M.z;else{var P=t.z;a.isArray1D(P)?(c(t,A,S,"x","y",["z"]),r=t._x,x=t._y,P=t._z):(v=t.x?A.makeCalcdata(t,"x"):[],w=t.y?S.makeCalcdata(t,"y"):[],r=o(t,A,"x",v).vals,x=o(t,S,"y",w).vals,t._x=r,t._y=x),y=t.x0,g=t.dx,b=t.y0,_=t.dy,k=u(P,t,A,S)}function E(e){O=t._input.zsmooth=t.zsmooth=!1,a.warn('cannot use zsmooth: "fast": '+e)}if((A.rangebreaks||S.rangebreaks)&&(k=function(e,t,r){for(var n=[],a=-1,i=0;i<r.length;i++)if(t[i]!==h){n[++a]=[];for(var o=0;o<r[i].length;o++)e[o]!==h&&n[a].push(r[i][o])}return n}(r,x,k),C||(r=m(r),x=m(x),t._x=r,t._y=x)),C||!L&&!t.connectgaps||(t._emptypoints=d(k),f(k,t._emptypoints)),"fast"===O)if("log"===A.type||"log"===S.type)E("log axis found");else if(!C){if(r.length){var R=(r[r.length-1]-r[0])/(r.length-1),z=Math.abs(R/100);for(T=0;T<r.length-1;T++)if(Math.abs(r[T+1]-r[T]-R)>z){E("x scale is not linear");break}}if(x.length&&"fast"===O){var I=(x[x.length-1]-x[0])/(x.length-1),N=Math.abs(I/100);for(T=0;T<x.length-1;T++)if(Math.abs(x[T+1]-x[T]-I)>N){E("y scale is not linear");break}}}var F=a.maxRowLength(k),j="scaled"===t.xtype?"":r,B=p(t,j,y,g,F,A),H="scaled"===t.ytype?"":x,q=p(t,H,b,_,k.length,S);D||(t._extremes[A._id]=i.findExtremes(A,B),t._extremes[S._id]=i.findExtremes(S,q));var U={x:B,y:q,z:k,text:t._text||t.text,hovertext:t._hovertext||t.hovertext};if(t.xperiodalignment&&v&&(U.orig_x=v),t.yperiodalignment&&w&&(U.orig_y=w),j&&j.length===B.length-1&&(U.xCenter=j),H&&H.length===q.length-1&&(U.yCenter=H),C&&(U.xRanges=M.xRanges,U.yRanges=M.yRanges,U.pts=M.pts),L||s(e,t,{vals:k,cLetter:"z"}),L&&t.contours&&"heatmap"===t.contours.coloring){var Y={type:"contour"===t.type?"heatmap":"histogram2d",xcalendar:t.xcalendar,ycalendar:t.ycalendar};U.xfill=p(Y,j,y,g,F,A),U.yfill=p(Y,H,b,_,k.length,S)}return[U]}},{"../../components/colorscale/calc":166,"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"../../registry":387,"../histogram2d/calc":478,"./clean_2d_array":450,"./convert_column_xyz":452,"./find_empties":454,"./interp2d":457,"./make_bound_array":459}],450:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").BADNUM;t.exports=function(e,t,r,o){var l,s,c,u,f,d;function p(e){if(n(e))return+e}if(t&&t.transpose){for(l=0,f=0;f<e.length;f++)l=Math.max(l,e[f].length);if(0===l)return!1;c=function(e){return e.length},u=function(e,t,r){return(e[r]||[])[t]}}else l=e.length,c=function(e,t){return e[t].length},u=function(e,t,r){return(e[t]||[])[r]};var h=function(e,t,r){return t===i||r===i?i:u(e,t,r)};function m(e){if(t&&"carpet"!==t.type&&"contourcarpet"!==t.type&&e&&"category"===e.type&&t["_"+e._id.charAt(0)].length){var r=e._id.charAt(0),n={},o=t["_"+r+"CategoryMap"]||t[r];for(f=0;f<o.length;f++)n[o[f]]=f;return function(t){var r=n[e._categories[t]];return r+1?r:i}}return a.identity}var y=m(r),g=m(o);o&&"category"===o.type&&(l=o._categories.length);var v=new Array(l);for(f=0;f<l;f++)for(s=r&&"category"===r.type?r._categories.length:c(e,f),v[f]=new Array(s),d=0;d<s;d++)v[f][d]=p(h(e,g(f),y(d)));return v}},{"../../constants/numerical":279,"../../lib":299,"fast-isnumeric":33}],451:[function(e,t,r){"use strict";t.exports={min:"zmin",max:"zmax"}},{}],452:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../constants/numerical").BADNUM,i=e("../../plots/cartesian/align_period");t.exports=function(e,t,r,o,l,s){var c=e._length,u=t.makeCalcdata(e,o),f=r.makeCalcdata(e,l);u=i(e,t,o,u).vals,f=i(e,r,l,f).vals;var d,p,h,m,y=e.text,g=void 0!==y&&n.isArray1D(y),v=e.hovertext,x=void 0!==v&&n.isArray1D(v),b=n.distinctVals(u),_=b.vals,w=n.distinctVals(f),k=w.vals,T=[],M=k.length,A=_.length;for(d=0;d<s.length;d++)T[d]=n.init2dArray(M,A);g&&(h=n.init2dArray(M,A)),x&&(m=n.init2dArray(M,A));var S=n.init2dArray(M,A);for(d=0;d<c;d++)if(u[d]!==a&&f[d]!==a){var L=n.findBin(u[d]+b.minDiff/2,_),C=n.findBin(f[d]+w.minDiff/2,k);for(p=0;p<s.length;p++){var D=e[s[p]];T[p][C][L]=D[d],S[C][L]=d}g&&(h[C][L]=y[d]),x&&(m[C][L]=v[d])}for(e["_"+o]=_,e["_"+l]=k,p=0;p<s.length;p++)e["_"+s[p]]=T[p];g&&(e._text=h),x&&(e._hovertext=m),t&&"category"===t.type&&(e["_"+o+"CategoryMap"]=_.map(function(e){return t._categories[e]})),r&&"category"===r.type&&(e["_"+l+"CategoryMap"]=k.map(function(e){return r._categories[e]})),e._after2before=S}},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343}],453:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./xyz_defaults"),i=e("./label_defaults"),o=e("../scatter/period_defaults"),l=e("./style_defaults"),s=e("../../components/colorscale/defaults"),c=e("./attributes");t.exports=function(e,t,r,u){function f(r,a){return n.coerce(e,t,c,r,a)}a(e,t,f,u)?(o(e,t,u,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hovertemplate"),i(f,u),l(e,t,f,u),f("hoverongaps"),f("connectgaps",n.isArray1D(t.z)&&!1!==t.zsmooth),s(e,t,u,f,{prefix:"",cLetter:"z"})):t.visible=!1}},{"../../components/colorscale/defaults":168,"../../lib":299,"../scatter/period_defaults":529,"./attributes":448,"./label_defaults":458,"./style_defaults":462,"./xyz_defaults":463}],454:[function(e,t,r){"use strict";var n=e("../../lib").maxRowLength;t.exports=function(e){var t,r,a,i,o,l,s,c,u=[],f={},d=[],p=e[0],h=[],m=[0,0,0],y=n(e);for(r=0;r<e.length;r++)for(t=h,h=p,p=e[r+1]||[],a=0;a<y;a++)void 0===h[a]&&((l=(void 0!==h[a-1]?1:0)+(void 0!==h[a+1]?1:0)+(void 0!==t[a]?1:0)+(void 0!==p[a]?1:0))?(0===r&&l++,0===a&&l++,r===e.length-1&&l++,a===h.length-1&&l++,l<4&&(f[[r,a]]=[r,a,l]),u.push([r,a,l])):d.push([r,a]));for(;d.length;){for(s={},c=!1,o=d.length-1;o>=0;o--)(l=((f[[(r=(i=d[o])[0])-1,a=i[1]]]||m)[2]+(f[[r+1,a]]||m)[2]+(f[[r,a-1]]||m)[2]+(f[[r,a+1]]||m)[2])/20)&&(s[i]=[r,a,l],d.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(i in s)f[i]=s[i],u.push(s[i])}return u.sort(function(e,t){return t[2]-e[2]})}},{"../../lib":299}],455:[function(e,t,r){"use strict";var n=e("../../components/fx"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../components/colorscale").extractOpts;t.exports=function(e,t,r,l,s){s||(s={});var c,u,f,d,p=s.isContour,h=e.cd[0],m=h.trace,y=e.xa,g=e.ya,v=h.x,x=h.y,b=h.z,_=h.xCenter,w=h.yCenter,k=h.zmask,T=m.zhoverformat,M=v,A=x;if(!1!==e.index){try{f=Math.round(e.index[1]),d=Math.round(e.index[0])}catch(t){return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index)}if(f<0||f>=b[0].length||d<0||d>b.length)return}else{if(n.inbox(t-v[0],t-v[v.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(p){var S;for(M=[2*v[0]-v[1]],S=1;S<v.length;S++)M.push((v[S]+v[S-1])/2);for(M.push([2*v[v.length-1]-v[v.length-2]]),A=[2*x[0]-x[1]],S=1;S<x.length;S++)A.push((x[S]+x[S-1])/2);A.push([2*x[x.length-1]-x[x.length-2]])}f=Math.max(0,Math.min(M.length-2,a.findBin(t,M))),d=Math.max(0,Math.min(A.length-2,a.findBin(r,A)))}var L,C,D=y.c2p(v[f]),O=y.c2p(v[f+1]),P=g.c2p(x[d]),E=g.c2p(x[d+1]);p?(L=h.orig_x||v,C=h.orig_y||x,O=D,c=L[f],E=P,u=C[d]):(L=h.orig_x||_||v,C=h.orig_y||w||x,c=_?L[f]:(L[f]+L[f+1])/2,u=w?C[d]:(C[d]+C[d+1])/2,y&&"category"===y.type&&(c=v[f]),g&&"category"===g.type&&(u=x[d]),m.zsmooth&&(D=O=y.c2p(c),P=E=g.c2p(u)));var R=b[d][f];if(k&&!k[d][f]&&(R=void 0),void 0!==R||m.hoverongaps){var z;Array.isArray(h.hovertext)&&Array.isArray(h.hovertext[d])?z=h.hovertext[d][f]:Array.isArray(h.text)&&Array.isArray(h.text[d])&&(z=h.text[d][f]);var I=o(m),N={type:"linear",range:[I.min,I.max],hoverformat:T,_separators:y._separators,_numFormat:y._numFormat},F=i.tickText(N,R,"hover").text;return[a.extendFlat(e,{index:m._after2before?m._after2before[d][f]:[d,f],distance:e.maxHoverDistance,spikeDistance:e.maxSpikeDistance,x0:D,x1:O,y0:P,y1:E,xLabelVal:c,yLabelVal:u,zLabelVal:R,zLabel:F,text:z})]}}},{"../../components/colorscale":170,"../../components/fx":198,"../../lib":299,"../../plots/cartesian/axes":346}],456:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:e("./colorbar"),style:e("./style"),hoverPoints:e("./hover"),moduleType:"trace",name:"heatmap",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}},{"../../plots/cartesian":358,"./attributes":448,"./calc":449,"./colorbar":451,"./defaults":453,"./hover":455,"./plot":460,"./style":461}],457:[function(e,t,r){"use strict";var n=e("../../lib"),a=[[-1,0],[1,0],[0,-1],[0,1]];function i(e){return.5-.25*Math.min(1,.5*e)}function o(e,t,r){var n,i,o,l,s,c,u,f,d,p,h,m,y,g=0;for(l=0;l<t.length;l++){for(i=(n=t[l])[0],o=n[1],h=e[i][o],p=0,d=0,s=0;s<4;s++)(u=e[i+(c=a[s])[0]])&&void 0!==(f=u[o+c[1]])&&(0===p?m=y=f:(m=Math.min(m,f),y=Math.max(y,f)),d++,p+=f);if(0===d)throw"iterateInterp2d order is wrong: no defined neighbors";e[i][o]=p/d,void 0===h?d<4&&(g=1):(e[i][o]=(1+r)*e[i][o]-r*h,y>m&&(g=Math.max(g,Math.abs(e[i][o]-h)/(y-m))))}return g}t.exports=function(e,t){var r,a=1;for(o(e,t),r=0;r<t.length&&!(t[r][2]<4);r++);for(t=t.slice(r),r=0;r<100&&a>.01;r++)a=o(e,t,i(a));return a>.01&&n.log("interp2d didn't converge quickly",a),e}},{"../../lib":299}],458:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){e("texttemplate");var r=n.extendFlat({},t.font,{color:"auto",size:"auto"});n.coerceFont(e,"textfont",r)}},{"../../lib":299}],459:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,r,i,o,l){var s,c,u,f=[],d=n.traceIs(e,"contour"),p=n.traceIs(e,"histogram"),h=n.traceIs(e,"gl2d");if(a(t)&&t.length>1&&!p&&"category"!==l.type){var m=t.length;if(!(m<=o))return d?t.slice(0,o):t.slice(0,o+1);if(d||h)f=t.slice(0,o);else if(1===o)f=[t[0]-.5,t[0]+.5];else{for(f=[1.5*t[0]-.5*t[1]],u=1;u<m;u++)f.push(.5*(t[u-1]+t[u]));f.push(1.5*t[m-1]-.5*t[m-2])}if(m<o){var y=f[f.length-1],g=y-f[f.length-2];for(u=m;u<o;u++)y+=g,f.push(y)}}else{var v=e[l._id.charAt(0)+"calendar"];if(p)s=l.r2c(r,0,v);else if(a(t)&&1===t.length)s=t[0];else if(void 0===r)s=0;else{s=("log"===l.type?l.d2c:l.r2c)(r,0,v)}for(c=i||1,u=d||h?0:-.5;u<o;u++)f.push(s+c*u)}return f}},{"../../lib":299,"../../registry":387}],460:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("tinycolor2"),i=e("../../registry"),o=e("../../components/drawing"),l=e("../../plots/cartesian/axes"),s=e("../../lib"),c=e("../../lib/svg_text_utils"),u=e("../scatter/format_labels"),f=e("../../components/color"),d=e("../../components/colorscale").extractOpts,p=e("../../components/colorscale").makeColorScaleFuncFromTrace,h=e("../../constants/xmlns_namespaces"),m=e("../../constants/alignment").LINE_SPACING,y="heatmap-label";function g(e){return e.selectAll("g."+y)}function v(e){g(e).remove()}function x(e,t){var r=t.length-2,n=s.constrain(s.findBin(e,t),0,r),a=t[n],i=t[n+1],o=s.constrain(n+(e-a)/(i-a)-.5,0,r),l=Math.round(o),c=Math.abs(o-l);return o&&o!==r&&c?{bin0:l,frac:c,bin1:Math.round(l+c/(o-l))}:{bin0:l,bin1:l,frac:0}}function b(e,t){var r=t.length-1,n=s.constrain(s.findBin(e,t),0,r),a=t[n],i=(e-a)/(t[n+1]-a)||0;return i<=0?{bin0:n,bin1:n,frac:0}:i<.5?{bin0:n,bin1:n+1,frac:i}:{bin0:n+1,bin1:n,frac:1-i}}function _(e,t,r){e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=Math.round(255*r[3])}t.exports=function(e,t,r,w){var k=t.xaxis,T=t.yaxis;s.makeTraceGroups(w,r,"hm").each(function(t){var r,w,M,A,S,L,C,D,O=n.select(this),P=t[0],E=P.trace,R=E.xgap||0,z=E.ygap||0,I=P.z,N=P.x,F=P.y,j=P.xCenter,B=P.yCenter,H=i.traceIs(E,"contour"),q=H?"best":E.zsmooth,U=I.length,Y=s.maxRowLength(I),V=!1,Z=!1;for(L=0;void 0===r&&L<N.length-1;)r=k.c2p(N[L]),L++;for(L=N.length-1;void 0===w&&L>0;)w=k.c2p(N[L]),L--;for(w<r&&(M=w,w=r,r=M,V=!0),L=0;void 0===A&&L<F.length-1;)A=T.c2p(F[L]),L++;for(L=F.length-1;void 0===S&&L>0;)S=T.c2p(F[L]),L--;if(S<A&&(M=A,A=S,S=M,Z=!0),H&&(j=N,B=F,N=P.xfill,F=P.yfill),"fast"!==q){var G="best"===q?0:.5;r=Math.max(-G*k._length,r),w=Math.min((1+G)*k._length,w),A=Math.max(-G*T._length,A),S=Math.min((1+G)*T._length,S)}var W,J,X=Math.round(w-r),K=Math.round(S-A);if(X<=0||K<=0)return O.selectAll("image").data([]).exit().remove(),void v(O);"fast"===q?(W=Y,J=U):(W=X,J=K);var Q=document.createElement("canvas");Q.width=W,Q.height=J;var $,ee,te=Q.getContext("2d"),re=p(E,{noNumericCheck:!0,returnArray:!0});"fast"===q?($=V?function(e){return Y-1-e}:s.identity,ee=Z?function(e){return U-1-e}:s.identity):($=function(e){return s.constrain(Math.round(k.c2p(N[e])-r),0,X)},ee=function(e){return s.constrain(Math.round(T.c2p(F[e])-A),0,K)});var ne,ae,ie,oe,le=ee(0),se=[le,le],ce=V?0:1,ue=Z?0:1,fe=0,de=0,pe=0,he=0;function me(e,t){if(void 0!==e){var r=re(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),fe+=t,de+=r[0]*t,pe+=r[1]*t,he+=r[2]*t,r}return[0,0,0,0]}function ye(e,t,r,n){var a=e[r.bin0];if(void 0===a)return me(void 0,1);var i,o=e[r.bin1],l=t[r.bin0],s=t[r.bin1],c=o-a||0,u=l-a||0;return i=void 0===o?void 0===s?0:void 0===l?2*(s-a):2*(2*s-l-a)/3:void 0===s?void 0===l?0:2*(2*a-o-l)/3:void 0===l?2*(2*s-o-a)/3:s+a-o-l,me(a+r.frac*c+n.frac*(u+r.frac*i))}if(q){var ge,ve=0;try{ge=new Uint8Array(X*K*4)}catch(e){ge=new Array(X*K*4)}if("best"===q){var xe,be,_e,we=j||N,ke=B||F,Te=new Array(we.length),Me=new Array(ke.length),Ae=new Array(X),Se=j?b:x,Le=B?b:x;for(L=0;L<we.length;L++)Te[L]=Math.round(k.c2p(we[L])-r);for(L=0;L<ke.length;L++)Me[L]=Math.round(T.c2p(ke[L])-A);for(L=0;L<X;L++)Ae[L]=Se(L,Te);for(C=0;C<K;C++)for(be=I[(xe=Le(C,Me)).bin0],_e=I[xe.bin1],L=0;L<X;L++,ve+=4)_(ge,ve,oe=ye(be,_e,Ae[L],xe))}else for(C=0;C<U;C++)for(ie=I[C],se=ee(C),L=0;L<X;L++)oe=me(ie[L],1),_(ge,ve=4*(se*X+$(L)),oe);var Ce=te.createImageData(X,K);try{Ce.data.set(ge)}catch(e){var De=Ce.data,Oe=De.length;for(C=0;C<Oe;C++)De[C]=ge[C]}te.putImageData(Ce,0,0)}else{var Pe=Math.floor(R/2),Ee=Math.floor(z/2);for(C=0;C<U;C++)if(ie=I[C],se.reverse(),se[ue]=ee(C+1),se[0]!==se[1]&&void 0!==se[0]&&void 0!==se[1])for(ne=[ae=$(0),ae],L=0;L<Y;L++)ne.reverse(),ne[ce]=$(L+1),ne[0]!==ne[1]&&void 0!==ne[0]&&void 0!==ne[1]&&(oe=me(ie[L],(ne[1]-ne[0])*(se[1]-se[0])),te.fillStyle="rgba("+oe.join(",")+")",te.fillRect(ne[0]+Pe,se[0]+Ee,ne[1]-ne[0]-R,se[1]-se[0]-z))}de=Math.round(de/fe),pe=Math.round(pe/fe),he=Math.round(he/fe);var Re=a("rgb("+de+","+pe+","+he+")");e._hmpixcount=(e._hmpixcount||0)+fe,e._hmlumcount=(e._hmlumcount||0)+fe*Re.getLuminance();var ze=O.selectAll("image").data(t);ze.enter().append("svg:image").attr({xmlns:h.svg,preserveAspectRatio:"none"}),ze.attr({height:K,width:X,x:r,y:A,"xlink:href":Q.toDataURL("image/png")}),v(O);var Ie=E.texttemplate;if(Ie){var Ne=d(E),Fe={type:"linear",range:[Ne.min,Ne.max],_separators:k._separators,_numFormat:k._numFormat},je="histogram2dcontour"===E.type,Be="contour"===E.type,He=Be?U-1:U,qe=Be?1:0,Ue=Be?Y-1:Y,Ye=[];for(L=Be?1:0;L<He;L++){var Ve;if(Be)Ve=P.y[L];else if(je){if(0===L||L===U-1)continue;Ve=P.y[L]}else if(P.yCenter)Ve=P.yCenter[L];else{if(L+1===U&&void 0===P.y[L+1])continue;Ve=(P.y[L]+P.y[L+1])/2}var Ze=Math.round(T.c2p(Ve));if(!(0>Ze||Ze>T._length))for(C=qe;C<Ue;C++){var Ge;if(Be)Ge=P.x[C];else if(je){if(0===C||C===Y-1)continue;Ge=P.x[C]}else if(P.xCenter)Ge=P.xCenter[C];else{if(C+1===Y&&void 0===P.x[C+1])continue;Ge=(P.x[C]+P.x[C+1])/2}var We=Math.round(k.c2p(Ge));if(!(0>We||We>k._length)){var Je=u({x:Ge,y:Ve},E,e._fullLayout);Je.x=Ge,Je.y=Ve;var Xe=P.z[L][C];void 0===Xe?(Je.z="",Je.zLabel=""):(Je.z=Xe,Je.zLabel=l.tickText(Fe,Xe,"hover").text);var Ke=P.text&&P.text[L]&&P.text[L][C];void 0!==Ke&&!1!==Ke||(Ke=""),Je.text=Ke;var Qe=s.texttemplateString(Ie,Je,e._fullLayout._d3locale,Je,E._meta||{});if(Qe){var $e=Qe.split("<br>"),et=$e.length,tt=0;for(D=0;D<et;D++)tt=Math.max(tt,$e[D].length);Ye.push({l:et,c:tt,t:Qe,x:We,y:Ze,z:Xe})}}}}var rt=E.textfont,nt=rt.family,at=rt.size,it=e._fullLayout.font.size;if(!at||"auto"===at){var ot=1/0,lt=1/0,st=0,ct=0;for(D=0;D<Ye.length;D++){var ut=Ye[D];if(st=Math.max(st,ut.l),ct=Math.max(ct,ut.c),D<Ye.length-1){var ft=Ye[D+1],dt=Math.abs(ft.x-ut.x),pt=Math.abs(ft.y-ut.y);dt&&(ot=Math.min(ot,dt)),pt&&(lt=Math.min(lt,pt))}}isFinite(ot)&&isFinite(lt)?(ot-=R,lt-=z,ot/=ct,lt/=st,ot/=m/2,lt/=m,at=Math.min(Math.floor(ot),Math.floor(lt),it)):at=it}if(at<=0||!isFinite(at))return;g(O).data(Ye).enter().append("g").classed(y,1).append("text").attr("text-anchor","middle").each(function(t){var r=n.select(this),a=rt.color;a&&"auto"!==a||(a=f.contrast("rgba("+re(t.z).join()+")")),r.attr("data-notex",1).call(c.positionText,function(e){return e.x}(t),function(e){return e.y-at*(e.l*m/2-1)}(t)).call(o.font,nt,at,a).text(t.t).call(c.convertToTspans,e)})}})}},{"../../components/color":158,"../../components/colorscale":170,"../../components/drawing":180,"../../constants/alignment":274,"../../constants/xmlns_namespaces":280,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/cartesian/axes":346,"../../registry":387,"../scatter/format_labels":518,"@plotly/d3":20,tinycolor2:122}],461:[function(e,t,r){"use strict";var n=e("@plotly/d3");t.exports=function(e){n.select(e).selectAll(".hm image").style("opacity",function(e){return e.trace.opacity})}},{"@plotly/d3":20}],462:[function(e,t,r){"use strict";t.exports=function(e,t,r){!1===r("zsmooth")&&(r("xgap"),r("ygap")),r("zhoverformat")}},{}],463:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../registry");function o(e,t){var r=t(e);return"scaled"===(r?t(e+"type","array"):"scaled")&&(t(e+"0"),t("d"+e)),r}t.exports=function(e,t,r,l,s,c){var u,f,d=r("z");if(s=s||"x",c=c||"y",void 0===d||!d.length)return 0;if(a.isArray1D(e.z)){u=r(s),f=r(c);var p=a.minRowLength(u),h=a.minRowLength(f);if(0===p||0===h)return 0;t._length=Math.min(p,h,d.length)}else{if(u=o(s,r),f=o(c,r),!function(e){for(var t,r=!0,i=!1,o=!1,l=0;l<e.length;l++){if(t=e[l],!a.isArrayOrTypedArray(t)){r=!1;break}t.length>0&&(i=!0);for(var s=0;s<t.length;s++)if(n(t[s])){o=!0;break}}return r&&i&&o}(d))return 0;r("transpose"),t._length=null}return"heatmapgl"===e.type||(i.getComponentMethod("calendars","handleTraceDefaults")(e,t,[s,c],l),!0)}},{"../../lib":299,"../../registry":387,"fast-isnumeric":33}],464:[function(e,t,r){"use strict";var n=e("../bar/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../plots/template_attributes").texttemplateAttrs,l=e("../../plots/font_attributes"),s=e("./bin_attributes"),c=e("./constants"),u=e("../../lib/extend").extendFlat;t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:a("x"),yhoverformat:a("y"),text:u({},n.text,{}),hovertext:u({},n.hovertext,{}),orientation:n.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:s("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:s("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:i({},{keys:c.eventDataKeys}),texttemplate:o({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:u({},n.textposition,{arrayOk:!1}),textfont:l({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:l({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:l({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:n.insidetextanchor,textangle:n.textangle,cliponaxis:n.cliponaxis,constraintext:n.constraintext,marker:n.marker,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:n.selected,unselected:n.unselected,_deprecated:{bardir:n._deprecated.bardir}}},{"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"../bar/attributes":397,"./bin_attributes":466,"./constants":470}],465:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r=e.length,n=0,a=0;a<r;a++)t[a]?(e[a]/=t[a],n+=e[a]):e[a]=null;return n}},{}],466:[function(e,t,r){"use strict";t.exports=function(e,t){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}},{}],467:[function(e,t,r){"use strict";var n=e("fast-isnumeric");t.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,a){var i=a[t];return n(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,a,i){var o=a[t];return n(o)&&(o=Number(o),r[e]+=o,i[e]++),0},min:function(e,t,r,a){var i=a[t];if(n(i)){if(i=Number(i),!n(r[e]))return r[e]=i,i;if(r[e]>i){var o=i-r[e];return r[e]=i,o}}return 0},max:function(e,t,r,a){var i=a[t];if(n(i)){if(i=Number(i),!n(r[e]))return r[e]=i,i;if(r[e]<i){var o=i-r[e];return r[e]=i,o}}return 0}}},{"fast-isnumeric":33}],468:[function(e,t,r){"use strict";var n=e("../../constants/numerical"),a=n.ONEAVGYEAR,i=n.ONEAVGMONTH,o=n.ONEDAY,l=n.ONEHOUR,s=n.ONEMIN,c=n.ONESEC,u=e("../../plots/cartesian/axes").tickIncrement;function f(e,t,r,n){if(e*t<=0)return 1/0;for(var a=Math.abs(t-e),i="date"===r.type,o=d(a,i),l=0;l<10;l++){var s=d(80*o,i);if(o===s)break;if(!p(s,e,t,i,r,n))break;o=s}return o}function d(e,t){return t&&e>c?e>o?e>1.1*a?a:e>1.1*i?i:o:e>l?l:e>s?s:c:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function p(e,t,r,n,i,l){if(n&&e>o){var s=h(t,i,l),c=h(r,i,l),u=e===a?0:1;return s[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}function h(e,t,r){var n=t.c2d(e,a,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}t.exports=function(e,t,r,n,i){var l,s,c=-1.1*t,d=-.1*t,p=e-d,h=r[0],m=r[1],y=Math.min(f(h+d,h+p,n,i),f(m+d,m+p,n,i)),g=Math.min(f(h+c,h+d,n,i),f(m+c,m+d,n,i));if(y>g&&g<Math.abs(m-h)/4e3?(l=y,s=!1):(l=Math.min(y,g),s=!0),"date"===n.type&&l>o){var v=l===a?1:6,x=l===a?"M12":"M1";return function(t,r){var o=n.c2d(t,a,i),l=o.indexOf("-",v);l>0&&(o=o.substr(0,l));var c=n.d2c(o,0,i);if(c<t){var f=u(c,x,!1,i);(c+f)/2<t+e&&(c=f)}return r&&s?u(c,x,!0,i):c}}return function(t,r){var n=l*Math.round(t/l);return n+l/10<t&&n+.9*l<t+e&&(n+=l),r&&s&&(n-=l),n}}},{"../../constants/numerical":279,"../../plots/cartesian/axes":346}],469:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../registry"),o=e("../../plots/cartesian/axes"),l=e("../bar/arrays_to_calcdata"),s=e("./bin_functions"),c=e("./norm_functions"),u=e("./average"),f=e("./bin_label_vals");function d(e,t,r,l,s){var c,u,f,p,h,m,y,g=l+"bins",v=e._fullLayout,x=t["_"+l+"bingroup"],b=v._histogramBinOpts[x],_="overlay"===v.barmode,w=function(e){return r.r2c(e,0,p)},k=function(e){return r.c2r(e,0,p)},T="date"===r.type?function(e){return e||0===e?a.cleanDate(e,null,p):null}:function(e){return n(e)?Number(e):null};function M(e,t,r){t[e+"Found"]?(t[e]=T(t[e]),null===t[e]&&(t[e]=r[e])):(m[e]=t[e]=r[e],a.nestedProperty(u[0],g+"."+e).set(r[e]))}if(t["_"+l+"autoBinFinished"])delete t["_"+l+"autoBinFinished"];else{u=b.traces;var A=[],S=!0,L=!1,C=!1;for(c=0;c<u.length;c++)if((f=u[c]).visible){var D=b.dirs[c];h=f["_"+D+"pos0"]=r.makeCalcdata(f,D),A=a.concat(A,h),delete f["_"+l+"autoBinFinished"],!0===t.visible&&(S?S=!1:(delete f._autoBin,f["_"+l+"autoBinFinished"]=1),i.traceIs(f,"2dMap")&&(L=!0),"histogram2dcontour"===f.type&&(C=!0))}p=u[0][l+"calendar"];var O=o.autoBin(A,r,b.nbins,L,p,b.sizeFound&&b.size),P=u[0]._autoBin={};if(m=P[b.dirs[0]]={},C&&(b.size||(O.start=k(o.tickIncrement(w(O.start),O.size,!0,p))),void 0===b.end&&(O.end=k(o.tickIncrement(w(O.end),O.size,!1,p)))),_&&!i.traceIs(t,"2dMap")&&0===O._dataSpan&&"category"!==r.type&&"multicategory"!==r.type){if(s)return[O,h,!0];O=function(e,t,r,n,i){var o,l,s,c=e._fullLayout,u=function(e,t){for(var r=t.xaxis,n=t.yaxis,a=t.orientation,i=[],o=e._fullData,l=0;l<o.length;l++){var s=o[l];"histogram"===s.type&&!0===s.visible&&s.orientation===a&&s.xaxis===r&&s.yaxis===n&&i.push(s)}return i}(e,t),f=!1,p=1/0,h=[t];for(o=0;o<u.length;o++)if((l=u[o])===t)f=!0;else if(f){var m=d(e,l,r,n,!0),y=m[0],g=m[2];l["_"+n+"autoBinFinished"]=1,l["_"+n+"pos0"]=m[1],g?h.push(l):p=Math.min(p,y.size)}else s=c._histogramBinOpts[l["_"+n+"bingroup"]],p=Math.min(p,s.size||l[i].size);var v=new Array(h.length);for(o=0;o<h.length;o++)for(var x=h[o]["_"+n+"pos0"],b=0;b<x.length;b++)if(void 0!==x[b]){v[o]=x[b];break}isFinite(p)||(p=a.distinctVals(v).minDiff);for(o=0;o<h.length;o++){var _=(l=h[o])[n+"calendar"],w={start:r.c2r(v[o]-p/2,0,_),end:r.c2r(v[o]+p/2,0,_),size:p};l._input[i]=l[i]=w,(s=c._histogramBinOpts[l["_"+n+"bingroup"]])&&a.extendFlat(s,w)}return t[i]}(e,t,r,l,g)}(y=f.cumulative||{}).enabled&&"include"!==y.currentbin&&("decreasing"===y.direction?O.start=k(o.tickIncrement(w(O.start),O.size,!0,p)):O.end=k(o.tickIncrement(w(O.end),O.size,!1,p))),b.size=O.size,b.sizeFound||(m.size=O.size,a.nestedProperty(u[0],g+".size").set(O.size)),M("start",b,O),M("end",b,O)}h=t["_"+l+"pos0"],delete t["_"+l+"pos0"];var E=t._input[g]||{},R=a.extendFlat({},b),z=b.start,I=r.r2l(E.start),N=void 0!==I;if((b.startFound||N)&&I!==r.r2l(z)){var F=N?I:a.aggNums(Math.min,null,h),j={type:"category"===r.type||"multicategory"===r.type?"linear":r.type,r2l:r.r2l,dtick:b.size,tick0:z,calendar:p,range:[F,o.tickIncrement(F,b.size,!1,p)].map(r.l2r)},B=o.tickFirst(j);B>r.r2l(F)&&(B=o.tickIncrement(B,b.size,!0,p)),R.start=r.l2r(B),N||a.nestedProperty(t,g+".start").set(R.start)}var H=b.end,q=r.r2l(E.end),U=void 0!==q;if((b.endFound||U)&&q!==r.r2l(H)){var Y=U?q:a.aggNums(Math.max,null,h);R.end=r.l2r(Y),U||a.nestedProperty(t,g+".start").set(R.end)}var V="autobin"+l;return!1===t._input[V]&&(t._input[g]=a.extendFlat({},t[g]||{}),delete t._input[V],delete t[V]),[R,h]}t.exports={calc:function(e,t){var r,i,p,h,m=[],y=[],g="h"===t.orientation,v=o.getFromId(e,g?t.yaxis:t.xaxis),x=g?"y":"x",b={x:"y",y:"x"}[x],_=t[x+"calendar"],w=t.cumulative,k=d(e,t,v,x),T=k[0],M=k[1],A="string"==typeof T.size,S=[],L=A?S:T,C=[],D=[],O=[],P=0,E=t.histnorm,R=t.histfunc,z=-1!==E.indexOf("density");w.enabled&&z&&(E=E.replace(/ ?density$/,""),z=!1);var I,N="max"===R||"min"===R?null:0,F=s.count,j=c[E],B=!1,H=function(e){return v.r2c(e,0,_)};for(a.isArrayOrTypedArray(t[b])&&"count"!==R&&(I=t[b],B="avg"===R,F=s[R]),r=H(T.start),p=H(T.end)+(r-o.tickIncrement(r,T.size,!1,_))/1e6;r<p&&m.length<1e6&&(i=o.tickIncrement(r,T.size,!1,_),m.push((r+i)/2),y.push(N),O.push([]),S.push(r),z&&C.push(1/(i-r)),B&&D.push(0),!(i<=r));)r=i;S.push(r),A||"date"!==v.type||(L={start:H(L.start),end:H(L.end),size:L.size}),e._fullLayout._roundFnOpts||(e._fullLayout._roundFnOpts={});var q=t["_"+x+"bingroup"],U={leftGap:1/0,rightGap:1/0};q&&(e._fullLayout._roundFnOpts[q]||(e._fullLayout._roundFnOpts[q]=U),U=e._fullLayout._roundFnOpts[q]);var Y,V=y.length,Z=!0,G=U.leftGap,W=U.rightGap,J={};for(r=0;r<M.length;r++){var X=M[r];(h=a.findBin(X,L))>=0&&h<V&&(P+=F(h,r,y,I,D),Z&&O[h].length&&X!==M[O[h][0]]&&(Z=!1),O[h].push(r),J[r]=h,G=Math.min(G,X-S[h]),W=Math.min(W,S[h+1]-X))}U.leftGap=G,U.rightGap=W,Z||(Y=function(t,r){return function(){var n=e._fullLayout._roundFnOpts[q];return f(n.leftGap,n.rightGap,S,v,_)(t,r)}}),B&&(P=u(y,D)),j&&j(y,P,C),w.enabled&&function(e,t,r){var n,a,i;function o(t){i=e[t],e[t]/=2}function l(t){a=e[t],e[t]=i+a/2,i+=a}if("half"===r)if("increasing"===t)for(o(0),n=1;n<e.length;n++)l(n);else for(o(e.length-1),n=e.length-2;n>=0;n--)l(n);else if("increasing"===t){for(n=1;n<e.length;n++)e[n]+=e[n-1];"exclude"===r&&(e.unshift(0),e.pop())}else{for(n=e.length-2;n>=0;n--)e[n]+=e[n+1];"exclude"===r&&(e.push(0),e.shift())}}(y,w.direction,w.currentbin);var K=Math.min(m.length,y.length),Q=[],$=0,ee=K-1;for(r=0;r<K;r++)if(y[r]){$=r;break}for(r=K-1;r>=$;r--)if(y[r]){ee=r;break}for(r=$;r<=ee;r++)if(n(m[r])&&n(y[r])){var te={p:m[r],s:y[r],b:0};w.enabled||(te.pts=O[r],Z?te.ph0=te.ph1=O[r].length?M[O[r][0]]:m[r]:(t._computePh=!0,te.ph0=Y(S[r]),te.ph1=Y(S[r+1],!0))),Q.push(te)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,T.size,!1,_)-Q[0].p),l(Q,t),a.isArrayOrTypedArray(t.selectedpoints)&&a.tagSelected(Q,t,J),Q},calcAllAutoBins:d}},{"../../lib":299,"../../plots/cartesian/axes":346,"../../registry":387,"../bar/arrays_to_calcdata":396,"./average":465,"./bin_functions":467,"./bin_label_vals":468,"./norm_functions":476,"fast-isnumeric":33}],470:[function(e,t,r){"use strict";t.exports={eventDataKeys:["binNumber"]}},{}],471:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axis_ids"),i=e("../../registry").traceIs,o=e("../bar/defaults").handleGroupingDefaults,l=n.nestedProperty,s=e("../../plots/cartesian/constraints").getAxisGroup,c=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],u=["x","y"];t.exports=function(e,t){var r,f,d,p,h,m,y,g=t._histogramBinOpts={},v=[],x={},b=[];function _(e,t){return n.coerce(r._input,r,r._module.attributes,e,t)}function w(e){return"v"===e.orientation?"x":"y"}function k(e,r,i){var o=e.uid+"__"+i;r||(r=o);var l=function(e,r){return a.getFromTrace({_fullLayout:t},e,r).type}(e,i),s=e[i+"calendar"]||"",c=g[r],u=!0;c&&(l===c.axType&&s===c.calendar?(u=!1,c.traces.push(e),c.dirs.push(i)):(r=o,l!==c.axType&&n.warn(["Attempted to group the bins of trace",e.index,"set on a","type:"+l,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),s!==c.calendar&&n.warn(["Attempted to group the bins of trace",e.index,"set with a",s,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),u&&(g[r]={traces:[e],dirs:[i],axType:l,calendar:e[i+"calendar"]||""}),e["_"+i+"bingroup"]=r}for(h=0;h<e.length;h++)r=e[h],i(r,"histogram")&&(v.push(r),delete r._xautoBinFinished,delete r._yautoBinFinished,i(r,"2dMap")||o(r._input,r,t,_));var T=t._alignmentOpts||{};for(h=0;h<v.length;h++){if(r=v[h],d="",!i(r,"2dMap")){if(p=w(r),"group"===t.barmode&&r.alignmentgroup){var M=r[p+"axis"],A=s(t,M)+r.orientation;(T[A]||{})[r.alignmentgroup]&&(d=A)}d||"overlay"===t.barmode||(d=s(t,r.xaxis)+s(t,r.yaxis)+w(r))}d?(x[d]||(x[d]=[]),x[d].push(r)):b.push(r)}for(d in x)if(1!==(f=x[d]).length){var S=!1;for(f.length&&(r=f[0],S=_("bingroup")),d=S||d,h=0;h<f.length;h++){var L=(r=f[h])._input.bingroup;L&&L!==d&&n.warn(["Trace",r.index,"must match","within bingroup",d+".","Ignoring its bingroup:",L,"setting."].join(" ")),r.bingroup=d,k(r,d,w(r))}}else b.push(f[0]);for(h=0;h<b.length;h++){r=b[h];var C=_("bingroup");if(i(r,"2dMap"))for(y=0;y<2;y++){var D=_((p=u[y])+"bingroup",C?C+"__"+p:null);k(r,D,p)}else k(r,C,w(r))}for(d in g){var O=g[d];for(f=O.traces,m=0;m<c.length;m++){var P,E,R=c[m],z=R.name;if("nbins"!==z||!O.sizeFound){for(h=0;h<f.length;h++){if(r=f[h],p=O.dirs[h],P=R.aStr[p],void 0!==l(r._input,P).get()){O[z]=_(P),O[z+"Found"]=!0;break}(E=(r._autoBin||{})[p]||{})[z]&&l(r,P).set(E[z])}if("start"===z||"end"===z)for(;h<f.length;h++)(r=f[h])["_"+p+"bingroup"]&&_(P,(E=(r._autoBin||{})[p]||{})[z]);"nbins"!==z||O.sizeFound||O.nbinsFound||(r=f[0],O[z]=_(P))}}}}},{"../../lib":299,"../../plots/cartesian/axis_ids":350,"../../plots/cartesian/constraints":354,"../../registry":387,"../bar/defaults":401}],472:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../components/color"),o=e("../bar/defaults").handleText,l=e("../bar/style_defaults"),s=e("./attributes");t.exports=function(e,t,r,c){function u(r,n){return a.coerce(e,t,s,r,n)}var f=u("x"),d=u("y");u("cumulative.enabled")&&(u("cumulative.direction"),u("cumulative.currentbin")),u("text");var p=u("textposition");o(e,t,c,u,p,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat");var h=u("orientation",d&&!f?"h":"v"),m="v"===h?"x":"y",y="v"===h?"y":"x",g=f&&d?Math.min(a.minRowLength(f)&&a.minRowLength(d)):a.minRowLength(t[m]||[]);if(g){t._length=g,n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],c),t[y]&&u("histfunc"),u("histnorm"),u("autobin"+m),l(e,t,u,r,c),a.coerceSelectionMarkerOpacity(t,u);var v=(t.marker.line||{}).color,x=n.getComponentMethod("errorbars","supplyDefaults");x(e,t,v||i.defaultLine,{axis:"y"}),x(e,t,v||i.defaultLine,{axis:"x",inherit:"y"})}else t.visible=!1}},{"../../components/color":158,"../../lib":299,"../../registry":387,"../bar/defaults":401,"../bar/style_defaults":412,"./attributes":464}],473:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a){if(e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"zLabelVal"in t&&(e.z=t.zLabelVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),!(r.cumulative||{}).enabled){var i,o=Array.isArray(a)?n[0].pts[a[0]][a[1]]:n[a].pts;if(e.pointNumbers=o,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex,r._indexToPoints){i=[];for(var l=0;l<o.length;l++)i=i.concat(r._indexToPoints[o[l]])}else i=o;e.pointIndices=i}return e}},{}],474:[function(e,t,r){"use strict";var n=e("../bar/hover").hoverPoints,a=e("../../plots/cartesian/axes").hoverLabelText;t.exports=function(e,t,r,i,o){var l=n(e,t,r,i,o);if(l){var s=(e=l[0]).cd[e.index],c=e.cd[0].trace;if(!c.cumulative.enabled){var u="h"===c.orientation?"y":"x";e[u+"Label"]=a(e[u+"a"],[s.ph0,s.ph1],c[u+"hoverformat"])}return l}}},{"../../plots/cartesian/axes":346,"../bar/hover":404}],475:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("../bar/layout_attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),supplyLayoutDefaults:e("../bar/layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("../bar/cross_trace_calc").crossTraceCalc,plot:e("../bar/plot").plot,layerName:"barlayer",style:e("../bar/style").style,styleOnSelect:e("../bar/style").styleOnSelect,colorbar:e("../scatter/marker_colorbar"),hoverPoints:e("./hover"),selectPoints:e("../bar/select"),eventData:e("./event_data"),moduleType:"trace",name:"histogram",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}},{"../../plots/cartesian":358,"../bar/cross_trace_calc":400,"../bar/layout_attributes":406,"../bar/layout_defaults":407,"../bar/plot":408,"../bar/select":409,"../bar/style":411,"../scatter/marker_colorbar":527,"./attributes":464,"./calc":469,"./cross_trace_defaults":471,"./defaults":472,"./event_data":473,"./hover":474}],476:[function(e,t,r){"use strict";t.exports={percent:function(e,t){for(var r=e.length,n=100/t,a=0;a<r;a++)e[a]*=n},probability:function(e,t){for(var r=e.length,n=0;n<r;n++)e[n]/=t},density:function(e,t,r,n){var a=e.length;n=n||1;for(var i=0;i<a;i++)e[i]*=r[i]*n},"probability density":function(e,t,r,n){var a=e.length;n&&(t/=n);for(var i=0;i<a;i++)e[i]*=r[i]/t}}},{}],477:[function(e,t,r){"use strict";var n=e("../histogram/attributes"),a=e("../histogram/bin_attributes"),i=e("../heatmap/attributes"),o=e("../../plots/attributes"),l=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,s=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../../plots/template_attributes").texttemplateAttrs,u=e("../../components/colorscale/attributes"),f=e("../../lib/extend").extendFlat;t.exports=f({x:n.x,y:n.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:a("x"),nbinsy:n.nbinsy,ybins:a("y"),autobinx:n.autobinx,autobiny:n.autobiny,bingroup:f({},n.bingroup,{}),xbingroup:f({},n.bingroup,{}),ybingroup:f({},n.bingroup,{}),xgap:i.xgap,ygap:i.ygap,zsmooth:i.zsmooth,xhoverformat:l("x"),yhoverformat:l("y"),zhoverformat:l("z",1),hovertemplate:s({},{keys:"z"}),texttemplate:c({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:i.textfont,showlegend:f({},o.showlegend,{dflt:!1})},u("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":165,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/cartesian/axis_format_attributes":349,"../../plots/template_attributes":382,"../heatmap/attributes":448,"../histogram/attributes":464,"../histogram/bin_attributes":466}],478:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../histogram/bin_functions"),o=e("../histogram/norm_functions"),l=e("../histogram/average"),s=e("../histogram/bin_label_vals"),c=e("../histogram/calc").calcAllAutoBins;function u(e,t,r,n){var a,i=new Array(e);if(n)for(a=0;a<e;a++)i[a]=1/(t[a+1]-t[a]);else{var o=1/r;for(a=0;a<e;a++)i[a]=o}return i}function f(e,t){return{start:e(t.start),end:e(t.end),size:t.size}}function d(e,t,r,n,a,i){var o,l=e.length-1,c=new Array(l),u=s(r,n,e,a,i);for(o=0;o<l;o++){var f=(t||[])[o];c[o]=void 0===f?[u(e[o]),u(e[o+1],!0)]:[f,f]}return c}t.exports=function(e,t){var r,s,p,h,m=a.getFromId(e,t.xaxis),y=a.getFromId(e,t.yaxis),g=t.xcalendar,v=t.ycalendar,x=function(e){return m.r2c(e,0,g)},b=function(e){return y.r2c(e,0,v)},_=c(e,t,m,"x"),w=_[0],k=_[1],T=c(e,t,y,"y"),M=T[0],A=T[1],S=t._length;k.length>S&&k.splice(S,k.length-S),A.length>S&&A.splice(S,A.length-S);var L=[],C=[],D=[],O="string"==typeof w.size,P="string"==typeof M.size,E=[],R=[],z=O?E:w,I=P?R:M,N=0,F=[],j=[],B=t.histnorm,H=t.histfunc,q=-1!==B.indexOf("density"),U="max"===H||"min"===H?null:0,Y=i.count,V=o[B],Z=!1,G=[],W=[],J="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";J&&"count"!==H&&(Z="avg"===H,Y=i[H]);var X=w.size,K=x(w.start),Q=x(w.end)+(K-a.tickIncrement(K,X,!1,g))/1e6;for(r=K;r<Q;r=a.tickIncrement(r,X,!1,g))C.push(U),E.push(r),Z&&D.push(0);E.push(r);var $,ee=C.length,te=(r-K)/ee,re=($=K+te/2,m.c2r($,0,g)),ne=M.size,ae=b(M.start),ie=b(M.end)+(ae-a.tickIncrement(ae,ne,!1,v))/1e6;for(r=ae;r<ie;r=a.tickIncrement(r,ne,!1,v)){L.push(C.slice()),R.push(r);var oe=new Array(ee);for(s=0;s<ee;s++)oe[s]=[];j.push(oe),Z&&F.push(D.slice())}R.push(r);var le=L.length,se=(r-ae)/le,ce=function(e){return y.c2r(e,0,v)}(ae+se/2);q&&(G=u(C.length,z,te,O),W=u(L.length,I,se,P)),O||"date"!==m.type||(z=f(x,z)),P||"date"!==y.type||(I=f(b,I));var ue=!0,fe=!0,de=new Array(ee),pe=new Array(le),he=1/0,me=1/0,ye=1/0,ge=1/0;for(r=0;r<S;r++){var ve=k[r],xe=A[r];p=n.findBin(ve,z),h=n.findBin(xe,I),p>=0&&p<ee&&h>=0&&h<le&&(N+=Y(p,r,L[h],J,F[h]),j[h][p].push(r),ue&&(void 0===de[p]?de[p]=ve:de[p]!==ve&&(ue=!1)),fe&&(void 0===pe[h]?pe[h]=xe:pe[h]!==xe&&(fe=!1)),he=Math.min(he,ve-E[p]),me=Math.min(me,E[p+1]-ve),ye=Math.min(ye,xe-R[h]),ge=Math.min(ge,R[h+1]-xe))}if(Z)for(h=0;h<le;h++)N+=l(L[h],F[h]);if(V)for(h=0;h<le;h++)V(L[h],N,G,W[h]);return{x:k,xRanges:d(E,ue&&de,he,me,m,g),x0:re,dx:te,y:A,yRanges:d(R,fe&&pe,ye,ge,y,v),y0:ce,dy:se,z:L,pts:j}}},{"../../lib":299,"../../plots/cartesian/axes":346,"../histogram/average":465,"../histogram/bin_functions":467,"../histogram/bin_label_vals":468,"../histogram/calc":469,"../histogram/norm_functions":476}],479:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./sample_defaults"),i=e("../heatmap/style_defaults"),o=e("../../components/colorscale/defaults"),l=e("../heatmap/label_defaults"),s=e("./attributes");t.exports=function(e,t,r,c){function u(r,a){return n.coerce(e,t,s,r,a)}a(e,t,u,c),!1!==t.visible&&(i(e,t,u,c),o(e,t,c,u,{prefix:"",cLetter:"z"}),u("hovertemplate"),l(u,c),u("xhoverformat"),u("yhoverformat"))}},{"../../components/colorscale/defaults":168,"../../lib":299,"../heatmap/label_defaults":458,"../heatmap/style_defaults":462,"./attributes":477,"./sample_defaults":482}],480:[function(e,t,r){"use strict";var n=e("../heatmap/hover"),a=e("../../plots/cartesian/axes").hoverLabelText;t.exports=function(e,t,r,i,o){var l=n(e,t,r,i,o);if(l){var s=(e=l[0]).index,c=s[0],u=s[1],f=e.cd[0],d=f.trace,p=f.xRanges[u],h=f.yRanges[c];return e.xLabel=a(e.xa,[p[0],p[1]],d.xhoverformat),e.yLabel=a(e.ya,[h[0],h[1]],d.yhoverformat),l}}},{"../../plots/cartesian/axes":346,"../heatmap/hover":455}],481:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../histogram/cross_trace_defaults"),calc:e("../heatmap/calc"),plot:e("../heatmap/plot"),layerName:"heatmaplayer",colorbar:e("../heatmap/colorbar"),style:e("../heatmap/style"),hoverPoints:e("./hover"),eventData:e("../histogram/event_data"),moduleType:"trace",name:"histogram2d",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}},{"../../plots/cartesian":358,"../heatmap/calc":449,"../heatmap/colorbar":451,"../heatmap/plot":460,"../heatmap/style":461,"../histogram/cross_trace_defaults":471,"../histogram/event_data":473,"./attributes":477,"./defaults":479,"./hover":480}],482:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib");t.exports=function(e,t,r,i){var o=r("x"),l=r("y"),s=a.minRowLength(o),c=a.minRowLength(l);s&&c?(t._length=Math.min(s,c),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],i),(r("z")||r("marker.color"))&&r("histfunc"),r("histnorm"),r("autobinx"),r("autobiny")):t.visible=!1}},{"../../lib":299,"../../registry":387}],483:[function(e,t,r){"use strict";var n=e("../histogram2d/attributes"),a=e("../contour/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,l=e("../../lib/extend").extendFlat;t.exports=l({x:n.x,y:n.y,z:n.z,marker:n.marker,histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:n.xbins,nbinsy:n.nbinsy,ybins:n.ybins,autobinx:n.autobinx,autobiny:n.autobiny,bingroup:n.bingroup,xbingroup:n.xbingroup,ybingroup:n.ybingroup,autocontour:a.autocontour,ncontours:a.ncontours,contours:a.contours,line:{color:a.line.color,width:l({},a.line.width,{dflt:.5}),dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:n.hovertemplate,texttemplate:a.texttemplate,textfont:a.textfont},i("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":165,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../contour/attributes":426,"../histogram2d/attributes":477}],484:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../histogram2d/sample_defaults"),i=e("../contour/contours_defaults"),o=e("../contour/style_defaults"),l=e("../heatmap/label_defaults"),s=e("./attributes");t.exports=function(e,t,r,c){function u(r,a){return n.coerce(e,t,s,r,a)}a(e,t,u,c),!1!==t.visible&&(i(e,t,u,function(r){return n.coerce2(e,t,s,r)}),o(e,t,u,c),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),t.contours&&"heatmap"===t.contours.coloring&&l(u,c))}},{"../../lib":299,"../contour/contours_defaults":433,"../contour/style_defaults":447,"../heatmap/label_defaults":458,"../histogram2d/sample_defaults":482,"./attributes":483}],485:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../histogram/cross_trace_defaults"),calc:e("../contour/calc"),plot:e("../contour/plot").plot,layerName:"contourlayer",style:e("../contour/style"),colorbar:e("../contour/colorbar"),hoverPoints:e("../contour/hover"),moduleType:"trace",name:"histogram2dcontour",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}},{"../../plots/cartesian":358,"../contour/calc":427,"../contour/colorbar":429,"../contour/hover":439,"../contour/plot":444,"../contour/style":446,"../histogram/cross_trace_defaults":471,"./attributes":483,"./defaults":484}],486:[function(e,t,r){"use strict";for(var n=e("../../plots/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../lib/extend").extendFlat,o=e("./constants").colormodel,l=["rgb","rgba","rgba256","hsl","hsla"],s=[],c=[],u=0;u<l.length;u++){var f=o[l[u]];s.push("For the `"+l[u]+"` colormodel, it is ["+(f.zminDflt||f.min).join(", ")+"]."),c.push("For the `"+l[u]+"` colormodel, it is ["+(f.zmaxDflt||f.max).join(", ")+"].")}t.exports=i({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:l,editType:"calc"},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dx:{valType:"number",dflt:1,editType:"calc"},dy:{valType:"number",dflt:1,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:i({},n.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:a({},{keys:["z","color","colormodel"]}),transforms:void 0})},{"../../lib/extend":293,"../../plots/attributes":342,"../../plots/template_attributes":382,"./constants":488}],487:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./constants"),i=e("fast-isnumeric"),o=e("../../plots/cartesian/axes"),l=e("../../lib").maxRowLength,s=e("./helpers").getImageSize;function c(e,t,r,a){return function(i){return n.constrain((i-e)*t,r,a)}}function u(e,t){return function(r){return n.constrain(r,e,t)}}t.exports=function(e,t){var r,n;if(t._hasZ)r=t.z.length,n=l(t.z);else if(t._hasSource){var f=s(t.source);r=f.height,n=f.width}var d,p=o.getFromId(e,t.xaxis||"x"),h=o.getFromId(e,t.yaxis||"y"),m=p.d2c(t.x0)-t.dx/2,y=h.d2c(t.y0)-t.dy/2,g=[m,m+n*t.dx],v=[y,y+r*t.dy];if(p&&"log"===p.type)for(d=0;d<n;d++)g.push(m+d*t.dx);if(h&&"log"===h.type)for(d=0;d<r;d++)v.push(y+d*t.dy);return t._extremes[p._id]=o.findExtremes(p,g),t._extremes[h._id]=o.findExtremes(h,v),t._scaler=function(e){var t=a.colormodel[e.colormodel],r=(t.colormodel||e.colormodel).length;e._sArray=[];for(var n=0;n<r;n++)t.min[n]!==e.zmin[n]||t.max[n]!==e.zmax[n]?e._sArray.push(c(e.zmin[n],(t.max[n]-t.min[n])/(e.zmax[n]-e.zmin[n]),t.min[n],t.max[n])):e._sArray.push(u(t.min[n],t.max[n]));return function(t){for(var n=t.slice(0,r),a=0;a<r;a++){var o=n[a];if(!i(o))return!1;n[a]=e._sArray[a](o)}return n}}(t),[{x0:m,y0:y,z:t.z,w:n,h:r}]}},{"../../lib":299,"../../plots/cartesian/axes":346,"./constants":488,"./helpers":491,"fast-isnumeric":33}],488:[function(e,t,r){"use strict";t.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["°","%","%",""]}},pixelatedStyle:["image-rendering: optimizeSpeed","image-rendering: -moz-crisp-edges","image-rendering: -o-crisp-edges","image-rendering: -webkit-optimize-contrast","image-rendering: optimize-contrast","image-rendering: crisp-edges","image-rendering: pixelated",""].join("; ")}},{}],489:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("./constants"),o=e("../../snapshot/helpers").IMAGE_URL_PREFIX;t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("source"),t.source&&!t.source.match(o)&&delete t.source,t._hasSource=!!t.source;var l,s=r("z");(t._hasZ=!(void 0===s||!s.length||!s[0]||!s[0].length),t._hasZ||t._hasSource)?(r("x0"),r("y0"),r("dx"),r("dy"),t._hasZ?(r("colormodel","rgb"),r("zmin",(l=i.colormodel[t.colormodel]).zminDflt||l.min),r("zmax",l.zmaxDflt||l.max)):t._hasSource&&(t.colormodel="rgba256",l=i.colormodel[t.colormodel],t.zmin=l.zminDflt,t.zmax=l.zmaxDflt),r("zsmooth"),r("text"),r("hovertext"),r("hovertemplate"),t._length=null):t.visible=!1}},{"../../lib":299,"../../snapshot/helpers":391,"./attributes":486,"./constants":488}],490:[function(e,t,r){"use strict";t.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||(e.z=t.color),e}},{}],491:[function(e,t,r){"use strict";var n=e("probe-image-size/sync"),a=e("../../snapshot/helpers").IMAGE_URL_PREFIX,i=e("buffer/").Buffer;r.getImageSize=function(e){var t=e.replace(a,""),r=new i(t,"base64");return n(r)}},{"../../snapshot/helpers":391,"buffer/":28,"probe-image-size/sync":98}],492:[function(e,t,r){"use strict";var n=e("../../components/fx"),a=e("../../lib"),i=e("./constants");t.exports=function(e,t,r){var o=e.cd[0],l=o.trace,s=e.xa,c=e.ya;if(!(n.inbox(t-o.x0,t-(o.x0+o.w*l.dx),0)>0||n.inbox(r-o.y0,r-(o.y0+o.h*l.dy),0)>0)){var u,f=Math.floor((t-o.x0)/l.dx),d=Math.floor(Math.abs(r-o.y0)/l.dy);if(l._hasZ?u=o.z[d][f]:l._hasSource&&(u=l._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(f,d,1,1).data),u){var p,h=o.hi||l.hoverinfo;if(h){var m=h.split("+");-1!==m.indexOf("all")&&(m=["color"]),-1!==m.indexOf("color")&&(p=!0)}var y,g=i.colormodel[l.colormodel],v=g.colormodel||l.colormodel,x=v.length,b=l._scaler(u),_=g.suffix,w=[];(l.hovertemplate||p)&&(w.push("["+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(", ")),4===x&&w.push(", "+b[3]+_[3]),w.push("]"),w=w.join(""),e.extraText=v.toUpperCase()+": "+w),Array.isArray(l.hovertext)&&Array.isArray(l.hovertext[d])?y=l.hovertext[d][f]:Array.isArray(l.text)&&Array.isArray(l.text[d])&&(y=l.text[d][f]);var k=c.c2p(o.y0+(d+.5)*l.dy),T=o.x0+(f+.5)*l.dx,M=o.y0+(d+.5)*l.dy,A="["+u.slice(0,l.colormodel.length).join(", ")+"]";return[a.extendFlat(e,{index:[d,f],x0:s.c2p(o.x0+f*l.dx),x1:s.c2p(o.x0+(f+1)*l.dx),y0:k,y1:k,color:b,xVal:T,xLabelVal:T,yVal:M,yLabelVal:M,zLabelVal:A,text:y,hovertemplateLabels:{zLabel:A,colorLabel:w,"color[0]Label":b[0]+_[0],"color[1]Label":b[1]+_[1],"color[2]Label":b[2]+_[2],"color[3]Label":b[3]+_[3]}})]}}}},{"../../components/fx":198,"../../lib":299,"./constants":488}],493:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover"),eventData:e("./event_data"),moduleType:"trace",name:"image",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":358,"./attributes":486,"./calc":487,"./defaults":489,"./event_data":490,"./hover":492,"./plot":494,"./style":495}],494:[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"),s=a.isIOS()||a.isSafari()||a.isIE();t.exports=function(e,t,r,c){var u=t.xaxis,f=t.yaxis,d=!(s||e._context._exportedPlot);a.makeTraceGroups(c,r,"im").each(function(t){var r=n.select(this),s=t[0],c=s.trace,p=("fast"===c.zsmooth||!1===c.zsmooth&&d)&&!c._hasZ&&c._hasSource&&"linear"===u.type&&"linear"===f.type;c._realImage=p;var h,m,y,g,v,x,b=s.z,_=s.x0,w=s.y0,k=s.w,T=s.h,M=c.dx,A=c.dy;for(x=0;void 0===h&&x<k;)h=u.c2p(_+x*M),x++;for(x=k;void 0===m&&x>0;)m=u.c2p(_+x*M),x--;for(x=0;void 0===g&&x<T;)g=f.c2p(w+x*A),x++;for(x=T;void 0===v&&x>0;)v=f.c2p(w+x*A),x--;if(m<h&&(y=m,m=h,h=y),v<g&&(y=g,g=v,v=y),!p){h=Math.max(-.5*u._length,h),m=Math.min(1.5*u._length,m),g=Math.max(-.5*f._length,g),v=Math.min(1.5*f._length,v)}var S=Math.round(m-h),L=Math.round(v-g);if(S<=0||L<=0){r.selectAll("image").data([]).exit().remove()}else{var C=r.selectAll("image").data([t]);C.enter().append("svg:image").attr({xmlns:o.svg,preserveAspectRatio:"none"}),C.exit().remove();var D=!1===c.zsmooth?l.pixelatedStyle:"";if(p){var O=a.simpleMap(u.range,u.r2l),P=a.simpleMap(f.range,f.r2l),E=O[1]<O[0],R=P[1]>P[0];if(E||R){var z=h+S/2,I=g+L/2;D+="transform:"+i(z+"px",I+"px")+"scale("+(E?-1:1)+","+(R?-1:1)+")"+i(-z+"px",-I+"px")+";"}}C.attr("style",D);var N=new Promise(function(e){if(c._hasZ)e();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===k&&c._canvas.el.height===T&&c._canvas.source===c.source)e();else{var t=document.createElement("canvas");t.width=k,t.height=T;var r=t.getContext("2d",{willReadFrequently:!0});c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:t,source:c.source},e()},n.setAttribute("src",c.source)}}).then(function(){var e;if(c._hasZ)e=F(function(e,t){return b[t][e]}).toDataURL("image/png");else if(c._hasSource)if(p)e=c.source;else{var t=c._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,k,T).data;e=F(function(e,r){var n=4*(r*k+e);return[t[n],t[n+1],t[n+2],t[n+3]]}).toDataURL("image/png")}C.attr({"xlink:href":e,height:L,width:S,x:h,y:g})});e._promises.push(N)}function F(e){var t=document.createElement("canvas");t.width=S,t.height=L;var r,n=t.getContext("2d",{willReadFrequently:!0}),i=function(e){return a.constrain(Math.round(u.c2p(_+e*M)-h),0,S)},o=function(e){return a.constrain(Math.round(f.c2p(w+e*A)-g),0,L)},d=l.colormodel[c.colormodel],p=d.colormodel||c.colormodel,m=d.fmt;for(x=0;x<s.w;x++){var y=i(x),v=i(x+1);if(v!==y&&!isNaN(v)&&!isNaN(y))for(var b=0;b<s.h;b++){var k=o(b),T=o(b+1);T===k||isNaN(T)||isNaN(k)||!e(x,b)||(r=c._scaler(e(x,b)),n.fillStyle=r?p+"("+m(r).join(",")+")":"rgba(0,0,0,0)",n.fillRect(y,k,v-y,T-k))}}return t}})}},{"../../constants/xmlns_namespaces":280,"../../lib":299,"./constants":488,"@plotly/d3":20}],495:[function(e,t,r){"use strict";var n=e("@plotly/d3");t.exports=function(e){n.select(e).selectAll(".im image").style("opacity",function(e){return e[0].trace.opacity})}},{"@plotly/d3":20}],496:[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:"angle",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":157,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/domain":373,"../../plots/font_attributes":374,"../../plots/template_attributes":382}],497:[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":380}],498:[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||[],f=t.values,d=t._length,p=t._hasValues&&d;if(t.dlabel)for(c=new Array(d),r=0;r<d;r++)c[r]=String(t.label0+r*t.dlabel);var h={},m=l(o["_"+t.type+"colormap"]),y=0,g=!1;for(r=0;r<d;r++){var v,x,b;if(p){if(v=f[r],!n(v))continue;v=+v}else v=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))||(y+=v),i.push({v:v,label:x,color:m(u[r],x),i:r,pts:[r],hidden:b})):(g=!0,(a=i[_]).v+=v,a.pts.push(r),a.hidden||(y+=v),!1===a.color&&u[r]&&(a.color=m(u[r],x)))}return i=i.filter(function(e){return e.v>=0}),("funnelarea"===t.type?g:t.sort)&&i.sort(function(e,t){return t.v-e.v}),i[0]&&(i[0].vTotal=y),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 f=a[u];if(f[0].trace.type===r)for(var d=0;d<f.length;d++){var p=f[d];!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":158,"fast-isnumeric":33,tinycolor2:122}],499:[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")),f=u.len;if(t._hasLabels=u.hasLabels,t._hasValues=u.hasValues,!t._hasLabels&&t._hasValues&&(c("label0"),c("dlabel")),f){t._length=f,c("marker.line.width")&&c("marker.line.color"),c("marker.colors"),c("scalegroup");var d,p=c("text"),h=c("texttemplate");if(h||(d=c("textinfo",Array.isArray(p)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),h||d&&"none"!==d){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 y=c("hole");if(c("title.text")){var g=c("title.position",y?"middle center":"top center");y||"middle center"!==g||(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":299,"../../plots/domain":373,"../bar/defaults":401,"./attributes":496,"fast-isnumeric":33}],500:[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":194}],501:[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":299}],502:[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":496,"./base_plot":497,"./calc":498,"./defaults":499,"./layout_attributes":503,"./layout_defaults":504,"./plot":505,"./style":506,"./style_one":507}],503:[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"}}},{}],504:[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":299,"./layout_attributes":503}],505:[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,f=e("../../lib/svg_text_utils"),d=e("../bar/uniform_text"),p=d.recordMinTextSize,h=d.clearMinTextSize,m=e("../bar/constants").TEXTPAD,y=e("./helpers"),g=e("./event_data"),v=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,f=t._fullData[c.index];if(!t._dragging&&!1!==r.hovermode){var d=f.hoverinfo;if(Array.isArray(d)&&(d=i.castHoverinfo({hoverinfo:[y.castOption(d,e.pts)],_module:c._module},r,0)),"all"===d&&(d="label+text+value+percent+name"),f.hovertemplate||"none"!==d&&"skip"!==d&&d){var p=e.rInscribed||0,h=o+e.pxmid[0]*(1-p),m=l+e.pxmid[1]*(1-p),v=r.separators,x=[];if(d&&-1!==d.indexOf("label")&&x.push(e.label),e.text=y.castOption(f.hovertext||f.text,e.pts),d&&-1!==d.indexOf("text")){var b=e.text;s.isValidTextValue(b)&&x.push(b)}e.value=e.v,e.valueLabel=y.formatPieValue(e.v,v),d&&-1!==d.indexOf("value")&&x.push(e.valueLabel),e.percent=e.v/a.vTotal,e.percentLabel=y.formatPiePercent(e.percent,v),d&&-1!==d.indexOf("percent")&&x.push(e.percentLabel);var _=f.hoverlabel,w=_.font,k=[];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:f.hovertemplate||-1!==d.indexOf("name")?f.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:y.castOption(_.bgcolor,e.pts)||e.color,borderColor:y.castOption(_.bordercolor,e.pts),fontFamily:y.castOption(w.family,e.pts),fontSize:y.castOption(w.size,e.pts),fontColor:y.castOption(w.color,e.pts),nameLength:y.castOption(_.namelength,e.pts),textAlign:y.castOption(_.align,e.pts),hovertemplate:y.castOption(f.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[g(e,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t,inOut_bbox:k}),e.bbox=k[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[g(e,f)],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:[g(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=[g(e,a)],i.click(t,n.event))})}function b(e,t,r){var n=y.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=y.castOption(e._input.textfont.color,t.pts));var a=y.castOption(e.insidetextfont.family,t.pts)||y.castOption(e.textfont.family,t.pts)||r.family,i=y.castOption(e.insidetextfont.size,t.pts)||y.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(f.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,f="horizontal"===u,d="tangential"===u,p="radial"===u,h="auto"===u,m=[];if(!h){var y,g=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?T(e,n,o,c,0):k(e,n,o,c,Math.PI/2)).textPosAngle=r,m.push(i)}};if(f||d){for(y=4;y>=-4;y-=2)g(Math.PI*y,"tan");for(y=4;y>=-4;y-=2)g(Math.PI*(y+1),"tan")}if(f||p){for(y=4;y>=-4;y-=2)g(Math.PI*(y+1.5),"rad");for(y=4;y>=-4;y-=2)g(Math.PI*(y+.5),"rad")}}if(l||h||f){var v=Math.sqrt(e.width*e.width+e.height*e.height);if((i={scale:a*n*2/v,rCenter:1-a,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,i.scale>=1)return i;m.push(i)}(h||p)&&((i=k(e,n,o,s,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(i)),(h||d)&&((i=T(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 k(e,t,r,n,a){t=Math.max(0,t-2*m);var i=e.width/e.height,o=S(i,n,t,r);return{scale:2*o/e.height,rCenter:M(i,o/t),rotate:A(a)}}function T(e,t,r,n,a){t=Math.max(0,t-2*m);var i=e.height/e.width,o=S(i,n,t,r);return{scale:2*o/e.width,rCenter:M(i,o/t),rotate:A(a+Math.PI/2)}}function M(e,t){return Math.cos(t)-e*t}function A(e){return(180/Math.PI*e+720)%180-90}function S(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 L(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function C(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 D(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)),f=t.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(f+=u,o.x-=(1+a)*u,l.tx+=e.titleBox.width/2):-1!==i.title.position.indexOf("center")?f*=2:-1!==i.title.position.indexOf("right")&&(f+=u,o.x+=(1+a)*u,l.tx-=e.titleBox.width/2),r=f/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 E(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 f=o*r.vTotal;"funnelarea"===a.type&&(f/=(1+a.baseratio)/2,f/=a.aspectratio),r.r=Math.sqrt(f)}}}(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)},f=u("label"),d=u("text"),p=u("value"),h=u("percent"),m=n.separators;if(l=f?[t.label]:[],d){var g=y.getFirstFilled(a.text,t.pts);v(g)&&l.push(g)}p&&l.push(y.formatPieValue(t.v,m)),h&&l.push(y.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:y.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:y.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:s.castOption(a,e.i,"customdata")}}(t),_=y.getFirstFilled(a.text,t.pts);(v(_)||""===_)&&(b.text=_),t.text=s.texttemplateString(x,b,e._fullLayout._d3locale,b,a._meta||{})}else t.text=""}}function I(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._context.staticPlot,i=e._fullLayout,d=i._size;h("pie",i),_(t,e),E(t,d);var m=s.makeTraceGroups(i._pielayer,t,"trace").each(function(t){var h=n.select(this),m=t[0],g=m.trace;!function(e){var t,r,n,a=e[0],i=a.r,o=a.trace,l=y.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=L(r,a))}(t),h.attr("stroke-linejoin","round"),h.each(function(){var v=n.select(this).selectAll("g.slice").data(t);v.enter().append("g").classed("slice",!0),v.exit().remove();var _=[[[],[]],[[],[]]],k=!1;v.each(function(a,o){if(a.hidden)n.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=g.index,_[a.pxmid[1]<0?0:1][a.pxmid[0]<0?0:1].push(a);var c=m.cx,u=m.cy,d=n.select(this),h=d.selectAll("path.surface").data([a]);if(h.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),d.call(x,e,t),g.pull){var v=+y.castOption(g.pull,a.pts)||0;v>0&&(c+=v*a.pxmid[0],u+=v*a.pxmid[1])}a.cxFinal=c,a.cyFinal=u;var T=g.hole;if(a.v===m.vTotal){var M="M"+(c+a.px0[0])+","+(u+a.px0[1])+O(a.px0,a.pxmid,!0,1)+O(a.pxmid,a.px0,!0,1)+"Z";T?h.attr("d","M"+(c+T*a.px0[0])+","+(u+T*a.px0[1])+O(a.px0,a.pxmid,!1,T)+O(a.pxmid,a.px0,!1,T)+"Z"+M):h.attr("d",M)}else{var A=O(a.px0,a.px1,!0,1);if(T){var S=1-T;h.attr("d","M"+(c+T*a.px1[0])+","+(u+T*a.px1[1])+O(a.px1,a.px0,!1,T)+"l"+S*a.px0[0]+","+S*a.px0[1]+A+"Z")}else h.attr("d","M"+c+","+u+"l"+a.px0[0]+","+a.px0[1]+A+"Z")}z(e,a,m);var L=y.castOption(g.textposition,a.pts),D=d.selectAll("g.slicetext").data(a.text&&"none"!==L?[0]:[]);D.enter().append("g").classed("slicetext",!0),D.exit().remove(),D.each(function(){var r=s.ensureSingle(n.select(this),"text","",function(e){e.attr("data-notex",1)}),d=s.ensureUniformFontSize(e,"outside"===L?function(e,t,r){var n=y.castOption(e.outsidetextfont.color,t.pts)||y.castOption(e.textfont.color,t.pts)||r.color,a=y.castOption(e.outsidetextfont.family,t.pts)||y.castOption(e.textfont.family,t.pts)||r.family,i=y.castOption(e.outsidetextfont.size,t.pts)||y.castOption(e.textfont.size,t.pts)||r.size;return{color:n,family:a,size:i}}(g,a,i.font):b(g,a,i.font));r.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,d).call(f.convertToTspans,e);var h,v=l.bBox(r.node());if("outside"===L)h=C(v,a);else if(h=w(v,a,m),"auto"===L&&h.scale<1){var x=s.ensureUniformFontSize(e,g.outsidetextfont);r.call(l.font,x),h=C(v=l.bBox(r.node()),a)}var _=h.textPosAngle,T=void 0===_?a.pxmid:R(m.r,_);if(h.targetX=c+T[0]*h.rCenter+(h.x||0),h.targetY=u+T[1]*h.rCenter+(h.y||0),I(h,v),h.outside){var M=h.targetY;a.yLabelMin=M-v.height/2,a.yLabelMid=M,a.yLabelMax=M+v.height/2,a.labelExtraX=0,a.labelExtraY=0,k=!0}h.fontSize=d.size,p(g.type,h,i),t[o].transform=h,s.setTransormAndDisplay(r,h)})}function O(e,t,r,n){var i=n*(t[0]-e[0]),o=n*(t[1]-e[1]);return"a"+n*m.r+","+n*m.r+" 0 "+a.largeArc+(r?" 1 ":" 0 ")+i+","+o}});var T=n.select(this).selectAll("g.titletext").data(g.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=g.title.text;g._meta&&(a=s.templateString(a,g._meta)),r.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,g.title.font).call(f.convertToTspans,e),t="middle center"===g.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}}(m):D(m,d),r.attr("transform",u(t.x,t.y)+c(Math.min(1,t.scale))+u(t.tx,t.ty))}),k&&function(e,t){var r,n,a,i,o,l,s,c,u,f,d,p,h;function m(e,t){return e.pxmid[1]-t.pxmid[1]}function g(e,t){return t.pxmid[1]-e.pxmid[1]}function v(e,r){r||(r={});var a,c,u,d,p,h,m=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),g=n?e.yLabelMin:e.yLabelMax,v=n?e.yLabelMax:e.yLabelMin,x=e.cyFinal+o(e.px0[1],e.px1[1]),b=m-g;if(b*s>0&&(e.labelExtraY=b),Array.isArray(t.pull))for(c=0;c<f.length;c++)(u=f[c])===e||(y.castOption(t.pull,e.pts)||0)>=(y.castOption(t.pull,u.pts)||0)||((e.pxmid[1]-u.pxmid[1])*s>0?(d=u.cyFinal+o(u.px0[1],u.px1[1]),(b=d-g-e.labelExtraY)*s>0&&(e.labelExtraY+=b)):(v+e.labelExtraY-x)*s>0&&(a=3*l*Math.abs(c-f.indexOf(e)),p=u.cxFinal+i(u.px0[0],u.px1[0]),(h=p+a-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=h)))}for(n=0;n<2;n++)for(a=n?m:g,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],f=u.concat(c),p=[],d=0;d<c.length;d++)void 0!==c[d].yLabelMid&&p.push(c[d]);for(h=!1,d=0;n&&d<u.length;d++)if(void 0!==u[d].yLabelMid){h=u[d];break}for(d=0;d<p.length;d++){var x=d&&p[d-1];h&&!d&&(x=h),v(p[d],x)}}}(_,g),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,s.setTransormAndDisplay(a,e.transform);var i=e.cxFinal+e.pxmid[0],l=e.cyFinal+e.pxmid[1],c="M"+i+","+l,u=(e.yLabelMax-e.yLabelMin)*(e.pxmid[0]<0?-1:1)/4;if(e.labelExtraX){var f=e.labelExtraX*e.pxmid[1]/e.pxmid[0],d=e.yLabelMid+e.labelExtraY-(e.cyFinal+e.pxmid[1]);Math.abs(f)>Math.abs(d)?c+="l"+d*e.pxmid[0]/e.pxmid[1]+","+d+"H"+(i+e.labelExtraX+u):c+="l"+e.labelExtraX+","+f+"v"+(d-f)+"h"+u}else c+="V"+(e.yLabelMid+e.labelExtraY)+"h"+u;s.ensureSingle(r,"path","textline").call(o.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:c,fill:"none"})}else r.select("path.textline").remove()})}(v,g),k&&g.automargin){var M=l.bBox(h.node()),A=g.domain,S=d.w*(A.x[1]-A.x[0]),L=d.h*(A.y[1]-A.y[0]),O=(.5*S-m.r)/d.w,P=(.5*L-m.r)/d.h;a.autoMargin(e,"pie."+g.uid+".automargin",{xl:A.x[0]-O,xr:A.x[1]+O,yb:A.y[0]-P,yt:A.y[1]+P,l:Math.max(m.cx-m.r-M.left,0),r:Math.max(M.right-(m.cx+m.r),0),b:Math.max(M.bottom-(m.cy+m.r),0),t:Math.max(m.cy-m.r-M.top,0),pad:5})}})});setTimeout(function(){m.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:D,prerenderTitles:_,layoutAreas:E,attachFxHandlers:x,computeTransform:I}},{"../../components/color":158,"../../components/drawing":180,"../../components/fx":198,"../../lib":299,"../../lib/svg_text_utils":322,"../../plots/plots":380,"../bar/constants":399,"../bar/uniform_text":413,"./event_data":500,"./helpers":501,"@plotly/d3":20}],506:[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":413,"./style_one":507,"@plotly/d3":20}],507:[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":158,"./helpers":501}],508:[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.angle,e,"ma"),n.mergeArray(a.standoff,e,"mf"),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":299}],509:[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/attributes").pattern,u=e("../../components/drawing"),f=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:f.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"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},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},fillpattern:c,marker:d({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",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":165,"../../components/drawing":180,"../../components/drawing/attributes":179,"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../../plots/font_attributes":374,"../../plots/template_attributes":382,"./constants":513}],510:[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"),f=e("./calc_selection");function d(e,t,r,n,a,o,l){var c=t._length,u=e._fullLayout,f=r._id,d=n._id,p=u._firstScatter[m(t)]===t.uid,h=(y(t,u,r,n)||{}).orientation,g=t.fill;r._minDtick=0,n._minDtick=0;var v={padded:!0},x={padded:!0};l&&(v.ppad=x.ppad=l);var b=c<2||a[0]!==a[c-1]||o[0]!==o[c-1];b&&("tozerox"===g||"tonextx"===g&&(p||"h"===h))?v.tozero=!0:(t.error_y||{}).visible||"tonexty"!==g&&"tozeroy"!==g&&(s.hasMarkers(t)||s.hasText(t))||(v.padded=!1,v.ppad=0),b&&("tozeroy"===g||"tonexty"===g&&(p||"v"===h))?x.tozero=!0:"tonextx"!==g&&"tozerox"!==g||(x.padded=!1),f&&(t._extremes[f]=i.findExtremes(r,a,v)),d&&(t._extremes[d]=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),f=0;f<t;f++)u[f]=r(c[f]);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 y(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,g,v,x,b=e._fullLayout,_=t._xA=i.getFromId(e,t.xaxis||"x","x"),w=t._yA=i.getFromId(e,t.yaxis||"y","y"),k=_.makeCalcdata(t,"x"),T=w.makeCalcdata(t,"y"),M=o(t,_,"x",k),A=o(t,w,"y",T),S=M.vals,L=A.vals,C=t._length,D=new Array(C),O=t.ids,P=y(t,b,_,w),E=!1;h(b,t);var R,z="x",I="y";P?(a.pushUnique(P.traceIndices,t._expandedIndex),(r="v"===P.orientation)?(I="s",R="x"):(z="s",R="y"),v="interpolate"===P.stackgaps):d(e,t,_,w,S,L,p(t,C));var N=!!t.xperiodalignment,F=!!t.yperiodalignment;for(s=0;s<C;s++){var j=D[s]={},B=n(S[s]),H=n(L[s]);B&&H?(j[z]=S[s],j[I]=L[s],N&&(j.orig_x=k[s],j.xEnd=M.ends[s],j.xStart=M.starts[s]),F&&(j.orig_y=T[s],j.yEnd=A.ends[s],j.yStart=A.starts[s])):P&&(r?B:H)?(j[R]=r?S[s]:L[s],j.gap=!0,v?(j.s=l,E=!0):j.s=0):j[z]=j[I]=l,O&&(j.id=String(O[s]))}if(u(D,t),c(e,t),f(D,t),P){for(s=0;s<D.length;)D[s][R]===l?D.splice(s,1):s++;if(a.sort(D,function(e,t){return e[R]-t[R]||e.i-t.i}),E){for(s=0;s<D.length-1&&D[s].gap;)s++;for((x=D[s].s)||(x=D[s].s=0),m=0;m<s;m++)D[m].s=x;for(g=D.length-1;g>s&&D[g].gap;)g--;for(x=D[g].s,m=D.length-1;m>g;m--)D[m].s=x;for(;s<g;)if(D[++s].gap){for(m=s+1;D[m].gap;)m++;for(var q=D[s-1][R],U=D[s-1].s,Y=(D[m].s-U)/(D[m][R]-q);s<m;)D[s].s=U+(D[s][R]-q)*Y,s++}}}return D},calcMarkerSize:p,calcAxisExpansion:d,setFirstScatter:h,getStackOpts:y}},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/align_period":343,"../../plots/cartesian/axes":346,"./arrays_to_calcdata":508,"./calc_selection":511,"./colorscale_calc":512,"./subtypes":534,"fast-isnumeric":33}],511:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(e,t)}},{"../../lib":299}],512:[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":166,"../../components/colorscale/helpers":169,"./subtypes":534}],513:[function(e,t,r){"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},{}],514:[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,f,d,p,h,m,y,g,v,x,b,_,w,k=e.calcdata;for(var T in l){var M=(g=l[T]).traceIndices;if(M.length){for(v="interpolate"===g.stackgaps,x=g.groupnorm,"v"===g.orientation?(b="x",_="y"):(b="y",_="x"),w=new Array(M.length),s=0;s<w.length;s++)w[s]=!1;p=k[M[0]];var A=new Array(p.length);for(s=0;s<p.length;s++)A[s]=p[s][b];for(s=1;s<M.length;s++){for(d=k[M[s]],c=u=0;c<d.length;c++){for(h=d[c][b];h>A[u]&&u<A.length;u++)a(d,c,A[u],s,w,v,b),c++;if(h!==A[u]){for(f=0;f<s;f++)a(k[M[f]],u,h,f,w,v,b);A.splice(u,0,h)}u++}for(;u<A.length;u++)a(d,c,A[u],s,w,v,b),c++}var S=A.length;for(c=0;c<p.length;c++){for(m=p[c][_]=p[c].s,s=1;s<M.length;s++)(d=k[M[s]])[0].trace._rawLength=d[0].trace._length,d[0].trace._length=S,m+=d[c].s,d[c][_]=m;if(x)for(y=("fraction"===x?m:m/100)||1,s=0;s<M.length;s++){var L=k[M[s]][c];L[_]/=y,L.sNorm=L.s/y}}for(s=0;s<M.length;s++){var C=(d=k[M[s]])[0].trace,D=n.calcMarkerSize(C,C._rawLength),O=Array.isArray(D);if(D&&w[s]||O){var P=D;for(D=new Array(S),c=0;c<S;c++)D[c]=d[c].gap?0:O?P[d[c].i]:P}var E=new Array(S),R=new Array(S);for(c=0;c<S;c++)E[c]=d[c].x,R[c]=d[c].y;n.calcAxisExpansion(e,C,r,i,E,R,D),d[0].t.orientation=g.orientation}}}}}},{"./calc":510}],515:[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}}}}}},{}],516:[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"),f=e("./marker_defaults"),d=e("./line_defaults"),p=e("./line_shape_defaults"),h=e("./text_defaults"),m=e("./fillcolor_defaults"),y=e("../../lib").coercePattern;t.exports=function(e,t,r,g){function v(r,a){return n.coerce(e,t,i,r,a)}var x=s(e,t,g,v);if(x||(t.visible=!1),t.visible){c(e,t,g,v),v("xhoverformat"),v("yhoverformat");var b=u(e,t,g,v),_=!b&&x<o.PTS_LINESONLY?"lines+markers":"lines";v("text"),v("hovertext"),v("mode",_),l.hasLines(t)&&(d(e,t,r,g,v,{backoff:!0}),p(e,t,v),v("connectgaps"),v("line.simplify")),l.hasMarkers(t)&&f(e,t,r,g,v,{gradient:!0}),l.hasText(t)&&(v("texttemplate"),h(e,t,g,v));var w=[];(l.hasMarkers(t)||l.hasText(t))&&(v("cliponaxis"),v("marker.maxdisplayed"),w.push("points")),v("fill",b?b.fillDflt:"none"),"none"!==t.fill&&(m(e,t,r,v),l.hasLines(t)||p(e,t,v),y(v,"fillpattern",t.fillcolor,!1));var k=(t.line||{}).color,T=(t.marker||{}).color;"tonext"!==t.fill&&"toself"!==t.fill||w.push("fills"),v("hoveron",w.join("+")||"points"),"fills"!==t.hoveron&&v("hovertemplate");var M=a.getComponentMethod("errorbars","supplyDefaults");M(e,t,k||T||r,{axis:"y"}),M(e,t,k||T||r,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,v)}}},{"../../lib":299,"../../registry":387,"./attributes":509,"./constants":513,"./fillcolor_defaults":517,"./line_defaults":522,"./line_shape_defaults":524,"./marker_defaults":528,"./period_defaults":529,"./stack_defaults":532,"./subtypes":534,"./text_defaults":535,"./xy_defaults":536}],517:[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":158,"../../lib":299}],518:[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":346}],519:[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":158,"./subtypes":534}],520:[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,f=u[0].trace,d=e.xa,p=e.ya,h=d.c2p(t),m=p.c2p(r),y=[h,m],g=f.hoveron||"",v=-1!==f.mode.indexOf("markers")?3:.5,x=!!f.xperiodalignment,b=!!f.yperiodalignment;if(-1!==g.indexOf("points")){var _=function(e){var t=Math.max(v,e.mrc||0),r=d.c2p(e.x)-h,n=p.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+n*n)-t,1-v/t)},w=a.getDistanceFunction(c,function(e){if(x){var t=d.c2p(e.xStart),r=d.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(d.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 k=u[e.index],T=d.c2p(k.x,!0),M=p.c2p(k.y,!0),A=k.mrc||1;e.index=k.i;var S=u[0].t.orientation,L=S&&(k.sNorm||k.s),C="h"===S?L:void 0!==k.orig_x?k.orig_x:k.x,D="v"===S?L:void 0!==k.orig_y?k.orig_y:k.y;return n.extendFlat(e,{color:o(f,k),x0:T-A,x1:T+A,xLabelVal:C,y0:M-A,y1:M+A,yLabelVal:D,spikeDistance:_(k),hovertemplate:f.hovertemplate}),s(k,f,e),i.getComponentMethod("errorbars","hoverInfo")(k,f,e),[e]}}if(-1!==g.indexOf("fills")&&f._polygons){var O,P,E,R,z,I,N,F,j,B=f._polygons,H=[],q=!1,U=1/0,Y=-1/0,V=1/0,Z=-1/0;for(O=0;O<B.length;O++)(E=B[O]).contains(y)&&(q=!q,H.push(E),V=Math.min(V,E.ymin),Z=Math.max(Z,E.ymax));if(q){var G=((V=Math.max(V,0))+(Z=Math.min(Z,p._length)))/2;for(O=0;O<H.length;O++)for(R=H[O].pts,P=1;P<R.length;P++)(F=R[P-1][1])>G!=(j=R[P][1])>=G&&(I=R[P-1][0],N=R[P][0],j-F&&(z=I+(N-I)*(G-F)/(j-F),U=Math.min(U,z),Y=Math.max(Y,z)));U=Math.max(U,0),Y=Math.min(Y,d._length);var W=l.defaultLine;return l.opacity(f.fillcolor)?W=f.fillcolor:l.opacity((f.line||{}).color)&&(W=f.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:U,x1:Y,y0:G,y1:G,color:W,hovertemplate:!1}),delete e.index,f.text&&!Array.isArray(f.text)?e.text=String(f.text):e.text=f.name,[e]}}}},{"../../components/color":158,"../../components/fx":198,"../../lib":299,"../../registry":387,"./get_trace_color":519}],521:[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":358,"./arrays_to_calcdata":508,"./attributes":509,"./calc":510,"./cross_trace_calc":514,"./cross_trace_defaults":515,"./defaults":516,"./format_labels":518,"./hover":520,"./marker_colorbar":527,"./plot":530,"./select":531,"./style":533,"./subtypes":534}],522:[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){s||(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"),s.backoff&&l("line.backoff")}},{"../../components/colorscale/defaults":168,"../../components/colorscale/helpers":169,"../../lib":299}],523:[function(e,t,r){"use strict";var n=e("../../components/drawing"),a=e("../../constants/numerical"),i=a.BADNUM,o=a.LOG_CLIP,l=o+.5,s=o-.5,c=e("../../lib"),u=c.segmentsIntersect,f=c.constrain,d=e("./constants");t.exports=function(e,t){var r,a,o,p,h,m,y,g,v,x,b,_,w,k,T,M,A,S,L=t.trace||{},C=t.xaxis,D=t.yaxis,O="log"===C.type,P="log"===D.type,E=C._length,R=D._length,z=t.backoff,I=L.marker,N=t.connectGaps,F=t.baseTolerance,j=t.shape,B="linear"===j,H=L.fill&&"none"!==L.fill,q=[],U=d.minTolerance,Y=e.length,V=new Array(Y),Z=0;function G(r){var n=e[r];if(!n)return!1;var a=t.linearized?C.l2p(n.x):C.c2p(n.x),o=t.linearized?D.l2p(n.y):D.c2p(n.y);if(a===i){if(O&&(a=C.c2p(n.x,!0)),a===i)return!1;P&&o===i&&(a*=Math.abs(C._m*R*(C._m>0?l:s)/(D._m*E*(D._m>0?l:s)))),a*=1e3}if(o===i){if(P&&(o=D.c2p(n.y,!0)),o===i)return!1;o*=1e3}return[a,o]}function W(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 J(e,t){var r=e[0]/E,n=e[1]/R,a=Math.max(0,-r,r-1,-n,n-1);return a&&void 0!==A&&W(r,n,A,S)&&(a=0),a&&t&&W(r,n,t[0]/E,t[1]/R)&&(a=0),(1+d.toleranceGrowth*a)*F}function X(e,t){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)}var K,Q,$,ee,te,re,ne,ae=d.maxScreensAway,ie=-E*ae,oe=E*(1+ae),le=-R*ae,se=R*(1+ae),ce=[[ie,le,oe,le],[oe,le,oe,se],[oe,se,ie,se],[ie,se,ie,le]];function ue(e){if(e[0]<ie||e[0]>oe||e[1]<le||e[1]>se)return[f(e[0],ie,oe),f(e[1],le,se)]}function fe(e,t){return e[0]===t[0]&&(e[0]===ie||e[0]===oe)||(e[1]===t[1]&&(e[1]===le||e[1]===se)||void 0)}function de(e,t,r){return function(n,a){var i=ue(n),o=ue(a),l=[];if(i&&o&&fe(i,o))return l;i&&l.push(i),o&&l.push(o);var s=2*c.constrain((n[e]+a[e])/2,t,r)-((i||n)[e]+(o||a)[e]);s&&((i&&o?s>0==i[e]>o[e]?i:o:i||o)[e]+=s);return l}}function pe(e){var t=e[0],r=e[1],n=t===V[Z-1][0],a=r===V[Z-1][1];if(!n||!a)if(Z>1){var i=t===V[Z-2][0],o=r===V[Z-2][1];n&&(t===ie||t===oe)&&i?o?Z--:V[Z-1]=e:a&&(r===le||r===se)&&o?i?Z--:V[Z-1]=e:V[Z++]=e}else V[Z++]=e}function he(e){V[Z-1][0]!==e[0]&&V[Z-1][1]!==e[1]&&pe([$,ee]),pe(e),te=null,$=ee=0}"linear"===j||"spline"===j?ne=function(e,t){for(var r=[],n=0,a=0;a<4;a++){var i=ce[a],o=u(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&&X(o,e)<X(r[0],e)?r.unshift(o):r.push(o),n++)}return r}:"hv"===j||"vh"===j?ne=function(e,t){var r=[],n=ue(e),a=ue(t);return n&&a&&fe(n,a)?r:(n&&r.push(n),a&&r.push(a),r)}:"hvh"===j?ne=de(0,ie,oe):"vhv"===j&&(ne=de(1,le,se));var me=c.isArrayOrTypedArray(I);function ye(t){if(t&&z&&(t.i=r,t.d=e,t.trace=L,t.marker=me?I[t.i]:I,t.backoff=z),A=t[0]/E,S=t[1]/R,K=t[0]<ie?ie:t[0]>oe?oe:0,Q=t[1]<le?le:t[1]>se?se:0,K||Q){if(Z)if(te){var n=ne(te,t);n.length>1&&(he(n[0]),V[Z++]=n[1])}else re=ne(V[Z-1],t)[0],V[Z++]=re;else V[Z++]=[K||t[0],Q||t[1]];var a=V[Z-1];K&&Q&&(a[0]!==K||a[1]!==Q)?(te&&($!==K&&ee!==Q?pe($&&ee?(i=te,l=(o=t)[0]-i[0],s=(o[1]-i[1])/l,(i[1]*o[0]-o[1]*i[0])/l>0?[s>0?ie:oe,se]:[s>0?oe:ie,le]):[$||K,ee||Q]):$&&ee&&pe([$,ee])),pe([K,Q])):$-K&&ee-Q&&pe([K||$,Q||ee]),te=t,$=K,ee=Q}else te&&he(ne(te,t)[0]),V[Z++]=t;var i,o,l,s}for(r=0;r<Y;r++)if(a=G(r)){for(Z=0,te=null,ye(a),r++;r<Y;r++){if(!(p=G(r))){if(N)continue;break}if(B&&t.simplify){var ge=G(r+1);if(x=X(p,a),H&&(0===Z||Z===Y-1)||!(x<J(p,ge)*U)){for(g=[(p[0]-a[0])/x,(p[1]-a[1])/x],h=a,b=x,_=k=T=0,y=!1,o=p,r++;r<e.length;r++){if(m=ge,ge=G(r+1),!m){if(N)continue;break}if(M=(v=[m[0]-a[0],m[1]-a[1]])[0]*g[1]-v[1]*g[0],k=Math.min(k,M),(T=Math.max(T,M))-k>J(m,ge))break;o=m,(w=v[0]*g[0]+v[1]*g[1])>b?(b=w,p=m,y=!1):w<_&&(_=w,h=m,y=!0)}if(y?(ye(p),o!==h&&ye(h)):(h!==a&&ye(h),o!==p&&ye(p)),ye(o),r>=e.length||!m)break;ye(m),a=m}}else ye(p)}te&&pe([$||te[0],ee||te[1]]),q.push(V.slice(0,Z))}var ve=j.slice(j.length-1);if(z&&"h"!==ve&&"v"!==ve){for(var xe=!1,be=-1,_e=[],we=0;we<q.length;we++)for(var ke=0;ke<q[we].length-1;ke++){var Te=q[we][ke],Me=q[we][ke+1],Ae=n.applyBackoff(Me,Te);Ae[0]===Me[0]&&Ae[1]===Me[1]||(xe=!0),_e[be+1]||(_e[++be]=[Te,[Ae[0],Ae[1]]])}return xe?_e:q}return q}},{"../../components/drawing":180,"../../constants/numerical":279,"../../lib":299,"./constants":513}],524:[function(e,t,r){"use strict";t.exports=function(e,t,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],525:[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,f=-1,d=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]=d,d++):a.fill in n&&p>=0?s=p:(s=p=d,d++),s<f&&(u=!0),a._groupIndex=f=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}},{}],526:[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":33}],527:[function(e,t,r){"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},{}],528:[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),f=(e.line||{}).color;(c=c||{},f&&(r=f),s("marker.symbol"),s("marker.opacity",u?.7:1),s("marker.size"),c.noAngle||(s("marker.angle"),c.noAngleRef||s("marker.angleref"),c.noStandOff||s("marker.standoff")),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",f&&!Array.isArray(f)&&t.marker.color!==f?f: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":158,"../../components/colorscale/defaults":168,"../../components/colorscale/helpers":169,"./subtypes":534}],529:[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":279,"../../lib":299}],530:[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"),f=e("./link_traces"),d=e("../../lib/polygon").tester;function p(e,t,r,f,p,h,m){var y;!function(e,t,r,a,o){var l=r.xaxis,s=r.yaxis,u=n.extent(i.simpleMap(l.range,l.r2c)),f=n.extent(i.simpleMap(s.range,s.r2c)),d=a[0].trace;if(!c.hasMarkers(d))return;var p=d.marker.maxdisplayed;if(0===p)return;var h=a.filter(function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=f[0]&&e.y<=f[1]}),m=Math.ceil(h.length/p),y=0;o.forEach(function(e,r){var n=e[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<t&&y++});var g=Math.round(y*m/3+Math.floor(y/3)*m/7.1);a.forEach(function(e){delete e.vis}),h.forEach(function(e,t){0===Math.round((t+g)%m)&&(e.vis=!0)})}(0,t,r,f,p);var g=!!m&&m.duration>0;function v(e){return g?e.transition():e}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,k=n.select(h),T=o(k,"g","errorbars"),M=o(k,"g","lines"),A=o(k,"g","points"),S=o(k,"g","text");if(a.getComponentMethod("errorbars","plot")(e,T,r,m),!0===_.visible){var L,C;v(k).style("opacity",_.opacity);var D=_.fill.charAt(_.fill.length-1);"x"!==D&&"y"!==D&&(D=""),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=k;var O,P,E="",R=[],z=_._prevtrace;z&&(E=z._prevRevpath||"",C=z._nextFill,R=z._polygons);var I,N,F,j,B,H,q,U="",Y="",V=[],Z=i.noop;if(L=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(C&&C.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(I=s.steps(w.shape),N=s.steps(w.shape.split("").reverse().join(""))):I=N="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")},F=function(e){return N(e.reverse())},V=u(f,{xaxis:x,yaxis:b,trace:_,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:_.fill}),q=_._polygons=new Array(V.length),y=0;y<V.length;y++)_._polygons[y]=d(V[y]);V.length&&(j=V[0][0],H=(B=V[V.length-1])[B.length-1]),Z=function(e){return function(t){if(O=I(t),P=F(t),U?D?(U+="L"+O.substr(1),Y=P+"L"+Y.substr(1)):(U+="Z"+O,Y=P+"Z"+Y):(U=O,Y=P),c.hasLines(_)&&t.length>1){var r=n.select(this);if(r.datum(f),e)v(r.style("opacity",0).attr("d",O).call(s.lineGroupStyle)).style("opacity",1);else{var a=v(r);a.attr("d",O),s.singleLineStyle(f,a)}}}}}var G=M.selectAll(".js-line").data(V);v(G.exit()).style("opacity",0).remove(),G.each(Z(!1)),G.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(s.lineGroupStyle).each(Z(!0)),s.setClipUrl(G,r.layerClipId,e),V.length?(L?(L.datum(f),j&&H&&(D?("y"===D?j[1]=H[1]=b.c2p(0,!0):"x"===D&&(j[0]=H[0]=x.c2p(0,!0)),v(L).attr("d","M"+H+"L"+j+"L"+U.substr(1)).call(s.singleFillStyle,e)):v(L).attr("d",U+"Z").call(s.singleFillStyle,e))):C&&("tonext"===_.fill.substr(0,6)&&U&&E?("tonext"===_.fill?v(C).attr("d",U+"Z"+E+"Z").call(s.singleFillStyle,e):v(C).attr("d",U+"L"+E.substr(1)+"Z").call(s.singleFillStyle,e),_._polygons=_._polygons.concat(R)):(J(C),_._polygons=null)),_._prevRevpath=Y,_._prevPolygons=q):(L?J(L):C&&J(C),_._polygons=_._prevRevpath=_._prevPolygons=null),A.datum(f),S.datum(f),function(t,a,i){var o,u=i[0].trace,f=c.hasMarkers(u),d=c.hasText(u),p=ee(u),h=te,m=te;if(f||d){var y=l,_=u.stackgroup,w=_&&"infer zero"===e._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?y=w?K:X:_&&!w&&(y=Q),f&&(h=y),d&&(m=y)}var k,T=(o=t.selectAll("path.point").data(h,p)).enter().append("path").classed("point",!0);g&&T.call(s.pointStyle,u,e).call(s.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),f&&(k=s.makePointStyleFns(u)),o.each(function(t){var a=n.select(this),i=v(a);s.translatePoint(t,i,x,b)?(s.singlePointStyle(t,i,u,k,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()}),g?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=v(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(){v(n.select(this)).attr({x:t,y:r})})}),o.exit().remove()}(A,S,f);var W=!1===_.cliponaxis?null:r.layerClipId;s.setClipUrl(A,W,e),s.setClipUrl(S,W,e)}function J(e){v(e).attr("d","M0,0Z")}function X(e){return e.filter(function(e){return!e.gap&&e.vis})}function K(e){return e.filter(function(e){return e.vis})}function Q(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,d,h=!i,m=!!i&&i.duration>0,y=f(e,t,r);((u=a.selectAll("g.trace").data(y,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&&(d=c()),n.transition().duration(i.duration).ease(i.easing).each("end",function(){d&&d()}).each("interrupt",function(){d&&d()}).each(function(){a.selectAll("g.trace").each(function(r,n){p(e,n,t,r,y,this,i)})})):u.each(function(r,n){p(e,n,t,r,y,this,i)});h&&u.exit().remove(),a.selectAll("path:not([d])").remove()}},{"../../components/drawing":180,"../../lib":299,"../../lib/polygon":311,"../../registry":387,"./line_points":523,"./link_traces":525,"./subtypes":534,"@plotly/d3":20}],531:[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=[],f=l[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))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":534}],532:[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 f={orientation:t.x&&!t.y?"h":"v"},d=0;d<n.length;d++){var p=n[d],h=p+"Found";if(!c[h]){var m=void 0!==e[p],y="orientation"===p;if((m||u)&&(c[p]=a(p,f[p]),y&&(c.fillDflt="h"===c[p]?"tonextx":"tonexty"),m&&(c[h]=!0,!u&&(delete c.traces[0][p],y))))for(var g=0;g<c.traces.length-1;g++){var v=c.traces[g];v._input.fill!==v.fill&&(v.fill=c.fillDflt)}}}return c}}},{}],533:[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,e),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":180,"../../registry":387,"@plotly/d3":20}],534:[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":299}],535:[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":299}],536:[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":299,"../../registry":387}],537:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,i=e("../scatter/attributes"),o=e("../../plots/attributes"),l=e("../../components/colorscale/attributes"),s=e("../../components/drawing/attributes").dash,c=e("../../lib/extend").extendFlat,u=i.marker,f=i.line,d=u.line;t.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:c({},i.mode,{dflt:"markers"}),text:c({},i.text,{}),texttemplate:a({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:c({},i.hovertext,{}),line:{color:f.color,width:f.width,dash:s,backoff:f.backoff,shape:c({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:i.connectgaps,cliponaxis:i.cliponaxis,fill:c({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,angle:u.angle,angleref:u.angleref,standoff:u.standoff,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:d.width,editType:"calc"},l("marker.line")),gradient:u.gradient,editType:"calc"},l("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:c({},o.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:i.hoveron,hovertemplate:n()}},{"../../components/colorscale/attributes":165,"../../components/drawing/attributes":179,"../../lib/extend":293,"../../plots/attributes":342,"../../plots/template_attributes":382,"../scatter/attributes":509}],538:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../scatter/colorscale_calc"),i=e("../scatter/arrays_to_calcdata"),o=e("../scatter/calc_selection"),l=e("../scatter/calc").calcMarkerSize,s=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};t.exports=function(e,t){var r,u,f,d,p,h,m=e._fullLayout[t.subplot].sum,y=t.sum||m,g={a:t.a,b:t.b,c:t.c};for(r=0;r<s.length;r++)if(!g[f=s[r]]){for(p=g[c[f][0]],h=g[c[f][1]],d=new Array(p.length),u=0;u<p.length;u++)d[u]=y-p[u]-h[u];g[f]=d}var v,x,b,_,w,k,T=t._length,M=new Array(T);for(r=0;r<T;r++)v=g.a[r],x=g.b[r],b=g.c[r],n(v)&&n(x)&&n(b)?(1!==(_=m/((v=+v)+(x=+x)+(b=+b)))&&(v*=_,x*=_,b*=_),k=v,w=b-x,M[r]={x:w,y:k,a:v,b:x,c:b}):M[r]={x:!1,y:!1};return l(t,T),a(e,t),i(M,t),o(M,t),M}},{"../scatter/arrays_to_calcdata":508,"../scatter/calc":510,"../scatter/calc_selection":511,"../scatter/colorscale_calc":512,"fast-isnumeric":33}],539:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatter/constants"),i=e("../scatter/subtypes"),o=e("../scatter/marker_defaults"),l=e("../scatter/line_defaults"),s=e("../scatter/line_shape_defaults"),c=e("../scatter/text_defaults"),u=e("../scatter/fillcolor_defaults"),f=e("./attributes");t.exports=function(e,t,r,d){function p(r,a){return n.coerce(e,t,f,r,a)}var h,m=p("a"),y=p("b"),g=p("c");if(m?(h=m.length,y?(h=Math.min(h,y.length),g&&(h=Math.min(h,g.length))):h=g?Math.min(h,g.length):0):y&&g&&(h=Math.min(y.length,g.length)),h){t._length=h,p("sum"),p("text"),p("hovertext"),"fills"!==t.hoveron&&p("hovertemplate"),p("mode",h<a.PTS_LINESONLY?"lines+markers":"lines"),i.hasLines(t)&&(l(e,t,r,d,p,{backoff:!0}),s(e,t,p),p("connectgaps")),i.hasMarkers(t)&&o(e,t,r,d,p,{gradient:!0}),i.hasText(t)&&(p("texttemplate"),c(e,t,d,p));var v=[];(i.hasMarkers(t)||i.hasText(t))&&(p("cliponaxis"),p("marker.maxdisplayed"),v.push("points")),p("fill"),"none"!==t.fill&&(u(e,t,r,p),i.hasLines(t)||s(e,t,p)),"tonext"!==t.fill&&"toself"!==t.fill||v.push("fills"),p("hoveron",v.join("+")||"points"),n.coerceSelectionMarkerOpacity(t,p)}else t.visible=!1}},{"../../lib":299,"../scatter/constants":513,"../scatter/fillcolor_defaults":517,"../scatter/line_defaults":522,"../scatter/line_shape_defaults":524,"../scatter/marker_defaults":528,"../scatter/subtypes":534,"../scatter/text_defaults":535,"./attributes":537}],540:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),n[a]){var i=n[a];e.a=i.a,e.b=i.b,e.c=i.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}},{}],541:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes");t.exports=function(e,t,r){var a={},i=r[t.subplot]._subplot;return a.aLabel=n.tickText(i.aaxis,e.a,!0).text,a.bLabel=n.tickText(i.baxis,e.b,!0).text,a.cLabel=n.tickText(i.caxis,e.c,!0).text,a}},{"../../plots/cartesian/axes":346}],542:[function(e,t,r){"use strict";var n=e("../scatter/hover");t.exports=function(e,t,r,a){var i=n(e,t,r,a);if(i&&!1!==i[0].index){var o=i[0];if(void 0===o.index){var l=1-o.y0/e.ya._length,s=e.xa._length,c=s*l/2,u=s-c;return o.x0=Math.max(Math.min(o.x0,u),c),o.x1=Math.max(Math.min(o.x1,u),c),i}var f=o.cd[o.index],d=o.trace,p=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var h={};h[d.subplot]={_subplot:p};var m=d._module.formatLabels(f,d,h);o.aLabel=m.aLabel,o.bLabel=m.bLabel,o.cLabel=m.cLabel;var y=f.hi||d.hoverinfo,g=[];if(!d.hovertemplate){var v=y.split("+");-1!==v.indexOf("all")&&(v=["a","b","c"]),-1!==v.indexOf("a")&&x(p.aaxis,o.aLabel),-1!==v.indexOf("b")&&x(p.baxis,o.bLabel),-1!==v.indexOf("c")&&x(p.caxis,o.cLabel)}return o.extraText=g.join("<br>"),o.hovertemplate=d.hovertemplate,i}function x(e,t){g.push(e._hovertitle+": "+t)}}},{"../scatter/hover":520}],543:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:e("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":383,"../scatter/marker_colorbar":527,"../scatter/select":531,"../scatter/style":533,"./attributes":537,"./calc":538,"./defaults":539,"./event_data":540,"./format_labels":541,"./hover":542,"./plot":544}],544:[function(e,t,r){"use strict";var n=e("../scatter/plot");t.exports=function(e,t,r){var a=t.plotContainer;a.select(".scatterlayer").selectAll("*").remove();for(var i=t.xaxis,o=t.yaxis,l={xaxis:i,yaxis:o,plot:a,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},s=t.layers.frontplot.select("g.scatterlayer"),c=0;c<r.length;c++){var u=r[c];u.length&&(u[0].trace._xA=i,u[0].trace._yA=o)}n(e,l,r,s)}},{"../scatter/plot":530}],545:[function(e,t,r){"use strict";var n=e("../box/attributes"),a=e("../../lib/extend").extendFlat,i=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat;t.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,xhoverformat:i("x"),yhoverformat:i("y"),name:a({},n.name,{}),orientation:a({},n.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n.fillcolor,points:a({},n.boxpoints,{}),jitter:a({},n.jitter,{}),pointpos:a({},n.pointpos,{}),width:a({},n.width,{}),marker:n.marker,text:n.text,hovertext:n.hovertext,hovertemplate:n.hovertemplate,quartilemethod:n.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:n.selected,unselected:n.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}},{"../../lib/extend":293,"../../plots/cartesian/axis_format_attributes":349,"../box/attributes":414}],546:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../box/calc"),o=e("./helpers"),l=e("../../constants/numerical").BADNUM;function s(e,t,r){var a=t.max-t.min;if(!a)return e.bandwidth?e.bandwidth:0;if(e.bandwidth)return Math.max(e.bandwidth,a/1e4);var i=r.length,o=n.stdev(r,i-1,t.mean);return Math.max(function(e,t,r){return 1.059*Math.min(t,r/1.349)*Math.pow(e,-.2)}(i,o,t.q3-t.q1),a/100)}function c(e,t,r,n){var i,o=e.spanmode,s=e.span||[],c=[t.min,t.max],u=[t.min-2*n,t.max+2*n];function f(n){var a=s[n],i="multicategory"===r.type?r.r2c(a):r.d2c(a,0,e[t.valLetter+"calendar"]);return i===l?u[n]:i}var d={type:"linear",range:i="soft"===o?u:"hard"===o?c:[f(0),f(1)]};return a.setConvert(d),d.cleanRange(),i}t.exports=function(e,t){var r=i(e,t);if(r[0].t.empty)return r;for(var l=e._fullLayout,u=a.getFromId(e,t["h"===t.orientation?"xaxis":"yaxis"]),f=1/0,d=-1/0,p=0,h=0,m=0;m<r.length;m++){var y=r[m],g=y.pts.map(o.extractVal),v=y.bandwidth=s(t,y,g),x=y.span=c(t,y,u,v);if(y.min===y.max&&0===v)x=y.span=[y.min,y.max],y.density=[{v:1,t:x[0]}],y.bandwidth=v,p=Math.max(p,1);else{var b=x[1]-x[0],_=Math.ceil(b/(v/3)),w=b/_;if(!isFinite(w)||!isFinite(_))return n.error("Something went wrong with computing the violin span"),r[0].t.empty=!0,r;var k=o.makeKDE(y,t,g);y.density=new Array(_);for(var T=0,M=x[0];M<x[1]+w/2;T++,M+=w){var A=k(M);y.density[T]={v:A,t:M},p=Math.max(p,A)}}h=Math.max(h,g.length),f=Math.min(f,x[0]),d=Math.max(d,x[1])}var S=a.findExtremes(u,[f,d],{padded:!0});if(t._extremes[u._id]=S,t.width)r[0].t.maxKDE=p;else{var L=l._violinScaleGroupStats,C=t.scalegroup,D=L[C];D?(D.maxKDE=Math.max(D.maxKDE,p),D.maxCount=Math.max(D.maxCount,h)):L[C]={maxKDE:p,maxCount:h}}return r[0].t.labels.kde=n._(e,"kde:"),r}},{"../../constants/numerical":279,"../../lib":299,"../../plots/cartesian/axes":346,"../box/calc":415,"./helpers":549}],547:[function(e,t,r){"use strict";var n=e("../box/cross_trace_calc").setPositionOffset,a=["v","h"];t.exports=function(e,t){for(var r=e.calcdata,i=t.xaxis,o=t.yaxis,l=0;l<a.length;l++){for(var s=a[l],c="h"===s?o:i,u=[],f=0;f<r.length;f++){var d=r[f],p=d[0].t,h=d[0].trace;!0!==h.visible||"violin"!==h.type||p.empty||h.orientation!==s||h.xaxis!==i._id||h.yaxis!==o._id||u.push(f)}n("violin",e,u,c)}}},{"../box/cross_trace_calc":416}],548:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../box/defaults"),o=e("./attributes");t.exports=function(e,t,r,l){function s(r,a){return n.coerce(e,t,o,r,a)}function c(r,a){return n.coerce2(e,t,o,r,a)}if(i.handleSampleDefaults(e,t,s,l),!1!==t.visible){s("bandwidth"),s("side"),s("width")||(s("scalegroup",t.name),s("scalemode"));var u,f=s("span");Array.isArray(f)&&(u="manual"),s("spanmode",u);var d=s("line.color",(e.marker||{}).color||r),p=s("line.width"),h=s("fillcolor",a.addOpacity(t.line.color,.5));i.handlePointsDefaults(e,t,s,{prefix:""});var m=c("box.width"),y=c("box.fillcolor",h),g=c("box.line.color",d),v=c("box.line.width",p);s("box.visible",Boolean(m||y||g||v))||(t.box={visible:!1});var x=c("meanline.color",d),b=c("meanline.width",p);s("meanline.visible",Boolean(x||b))||(t.meanline={visible:!1}),s("quartilemethod")}}},{"../../components/color":158,"../../lib":299,"../box/defaults":417,"./attributes":545}],549:[function(e,t,r){"use strict";var n=e("../../lib"),a=function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)};r.makeKDE=function(e,t,r){var n=r.length,i=a,o=e.bandwidth,l=1/(n*o);return function(e){for(var t=0,a=0;a<n;a++)t+=i((e-r[a])/o);return l*t}},r.getPositionOnKdePath=function(e,t,r){var a,i;"h"===t.orientation?(a="y",i="x"):(a="x",i="y");var o=n.findPointOnPath(e.path,r,i,{pathLength:e.pathLength}),l=e.posCenterPx,s=o[a];return[s,"both"===t.side?2*l-s:l]},r.getKdeValue=function(e,t,n){var a=e.pts.map(r.extractVal);return r.makeKDE(e,t,a)(n)/e.posDensityScale},r.extractVal=function(e){return e.v}},{"../../lib":299}],550:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../box/hover"),l=e("./helpers");t.exports=function(e,t,r,s,c){c||(c={});var u,f,d=c.hoverLayer,p=e.cd,h=p[0].trace,m=h.hoveron,y=-1!==m.indexOf("violins"),g=-1!==m.indexOf("kde"),v=[];if(y||g){var x=o.hoverOnBoxes(e,t,r,s);if(g&&x.length>0){var b,_,w,k,T,M=e.xa,A=e.ya;"h"===h.orientation?(T=t,b="y",w=A,_="x",k=M):(T=r,b="x",w=M,_="y",k=A);var S=p[e.index];if(T>=S.span[0]&&T<=S.span[1]){var L=a.extendFlat({},e),C=k.c2p(T,!0),D=l.getKdeValue(S,h,T),O=l.getPositionOnKdePath(S,h,C),P=w._offset,E=w._length;L[b+"0"]=O[0],L[b+"1"]=O[1],L[_+"0"]=L[_+"1"]=C,L[_+"Label"]=_+": "+i.hoverLabelText(k,T,h[_+"hoverformat"])+", "+p[0].t.labels.kde+" "+D.toFixed(3);for(var R=0,z=0;z<x.length;z++)if("med"===x[z].attr){R=z;break}L.spikeDistance=x[R].spikeDistance;var I=b+"Spike";L[I]=x[R][I],x[R].spikeDistance=void 0,x[R][I]=void 0,L.hovertemplate=!1,v.push(L),(f={})[b+"1"]=a.constrain(P+O[0],P,P+E),f[b+"2"]=a.constrain(P+O[1],P,P+E),f[_+"1"]=f[_+"2"]=k._offset+C}}y&&(v=v.concat(x))}-1!==m.indexOf("points")&&(u=o.hoverOnPoints(e,t,r));var N=d.selectAll(".violinline-"+h.uid).data(f?[0]:[]);return N.enter().append("line").classed("violinline-"+h.uid,!0).attr("stroke-width",1.5),N.exit().remove(),N.attr(f).call(n.stroke,e.color),"closest"===s?u?[u]:v:u?(v.push(u),v):v}},{"../../components/color":158,"../../lib":299,"../../plots/cartesian/axes":346,"../box/hover":419,"./helpers":549}],551:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../box/select"),moduleType:"trace",name:"violin",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":358,"../box/defaults":417,"../box/select":424,"../scatter/style":533,"./attributes":545,"./calc":546,"./cross_trace_calc":547,"./defaults":548,"./hover":550,"./layout_attributes":552,"./layout_defaults":553,"./plot":554,"./style":555}],552:[function(e,t,r){"use strict";var n=e("../box/layout_attributes"),a=e("../../lib").extendFlat;t.exports={violinmode:a({},n.boxmode,{}),violingap:a({},n.boxgap,{}),violingroupgap:a({},n.boxgroupgap,{})}},{"../../lib":299,"../box/layout_attributes":421}],553:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes"),i=e("../box/layout_defaults");t.exports=function(e,t,r){i._supply(e,t,r,function(r,i){return n.coerce(e,t,a,r,i)},"violin")}},{"../../lib":299,"../box/layout_defaults":422,"./layout_attributes":552}],554:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../box/plot"),l=e("../scatter/line_points"),s=e("./helpers");t.exports=function(e,t,r,c){var u=e._fullLayout,f=t.xaxis,d=t.yaxis;function p(e,t){var r=l(e,{xaxis:f,yaxis:d,trace:t,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return i.smoothopen(r[0],1)}a.makeTraceGroups(c,r,"trace violins").each(function(e){var r=n.select(this),i=e[0],l=i.t,c=i.trace;if(!0!==c.visible||l.empty)r.remove();else{var h=l.bPos,m=l.bdPos,y=t[l.valLetter+"axis"],g=t[l.posLetter+"axis"],v="both"===c.side,x=v||"positive"===c.side,b=v||"negative"===c.side,_=r.selectAll("path.violin").data(a.identity);_.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each(function(e){var t,r,a,i,o,s,f,d,_=n.select(this),w=e.density,k=w.length,T=g.c2l(e.pos+h,!0),M=g.l2p(T);if(c.width)t=l.maxKDE/m;else{var A=u._violinScaleGroupStats[c.scalegroup];t="count"===c.scalemode?A.maxKDE/m*(A.maxCount/e.pts.length):A.maxKDE/m}if(x){for(f=new Array(k),o=0;o<k;o++)(d=f[o]={})[l.posLetter]=T+w[o].v/t,d[l.valLetter]=y.c2l(w[o].t,!0);r=p(f,c)}if(b){for(f=new Array(k),s=0,o=k-1;s<k;s++,o--)(d=f[s]={})[l.posLetter]=T-w[o].v/t,d[l.valLetter]=y.c2l(w[o].t,!0);a=p(f,c)}if(v)i=r+"L"+a.substr(1)+"Z";else{var S=[M,y.c2p(w[0].t)],L=[M,y.c2p(w[k-1].t)];"h"===c.orientation&&(S.reverse(),L.reverse()),i=x?"M"+S+"L"+r.substr(1)+"L"+L:"M"+L+"L"+a.substr(1)+"L"+S}_.attr("d",i),e.posCenterPx=M,e.posDensityScale=t*m,e.path=_.node(),e.pathLength=e.path.getTotalLength()/(v?2:1)});var w,k,T,M=c.box,A=M.width,S=(M.line||{}).width;v?(w=m*A,k=0):x?(w=[0,m*A/2],k=S*{x:1,y:-1}[l.posLetter]):(w=[m*A/2,0],k=S*{x:-1,y:1}[l.posLetter]),o.plotBoxAndWhiskers(r,{pos:g,val:y},c,{bPos:h,bdPos:w,bPosPxOffset:k}),o.plotBoxMean(r,{pos:g,val:y},c,{bPos:h,bdPos:w,bPosPxOffset:k}),!c.box.visible&&c.meanline.visible&&(T=a.identity);var L=r.selectAll("path.meanline").data(T||[]);L.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect","non-scaling-stroke"),L.exit().remove(),L.each(function(e){var t=y.c2p(e.mean,!0),r=s.getPositionOnKdePath(e,c,t);n.select(this).attr("d","h"===c.orientation?"M"+t+","+r[0]+"V"+r[1]:"M"+r[0]+","+t+"H"+r[1])}),o.plotPoints(r,{x:f,y:d},c,l)}})}},{"../../components/drawing":180,"../../lib":299,"../box/plot":423,"../scatter/line_points":523,"./helpers":549,"@plotly/d3":20}],555:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../components/color"),i=e("../scatter/style").stylePoints;t.exports=function(e){var t=n.select(e).selectAll("g.trace.violins");t.style("opacity",function(e){return e[0].trace.opacity}),t.each(function(t){var r=t[0].trace,o=n.select(this),l=r.box||{},s=l.line||{},c=r.meanline||{},u=c.width;o.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(a.stroke,r.line.color).call(a.fill,r.fillcolor),o.selectAll("path.box").style("stroke-width",s.width+"px").call(a.stroke,s.color).call(a.fill,l.fillcolor);var f={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};o.selectAll("path.mean").style(f).call(a.stroke,c.color),o.selectAll("path.meanline").style(f).call(a.stroke,c.color),i(o,r,e)})}},{"../../components/color":158,"../scatter/style":533,"@plotly/d3":20}],556:[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 f;case"first":return d;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 f=u-c;i+=f,o+=f*f,s++}}var d="sample"===e.funcmode?s-1:s;return d?Math.sqrt((o-i*i/s)/d):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 f(e,t){return t.length}function d(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 f=o("groups");if(!Array.isArray(f)){if(!u[f])return n.enabled=!1,n;u[f]=0}var d,p=e.aggregations||[],h=n.aggregations=new Array(p.length);function m(e,t){return a.coerce(p[r],d,c,e,t)}for(r=0;r<p.length;r++){d={_index:r};var y=m("target"),g=m("func");m("enabled")&&y&&(u[y]||"count"===g&&void 0===u[y])?("stddev"===g&&m("funcmode"),u[y]=0,h[r]=d):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,f,d={},p={},h=[],m=o(t.transforms,r),y=i.length;for(t._length&&(y=Math.min(y,t._length)),l=0;l<y;l++)void 0===(c=d[s=i[l]])?(d[s]=h.length,f=[l],h.push(f),p[d[s]]=m(l)):(h[c].push(l),p[d[s]]=(p[d[s]]||[]).concat(m(l)));r._indexToPoints=p;var g=r.aggregations;for(l=0;l<g.length;l++)u(e,t,h,g[l]);"string"==typeof n&&u(e,t,h,{target:n,func:"first",enabled:!0}),t._length=h.length}}}},{"../constants/numerical":279,"../lib":299,"../plot_api/plot_schema":334,"../plots/cartesian/axes":346,"./helpers":559}],557:[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,f=a.length;t._length&&(f=Math.min(f,t._length));var d=r.targetcalendar,p=t._arrayAttrs,h=r.preservegaps;if("string"==typeof l){var m=n.nestedProperty(t,l+"calendar").get();m&&(d=m)}var y,g,v=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,f=function(r){return t(r,0,e.valuecalendar)},d=function(e){return t(e,0,r)};o(s)?l=f(i?a[0]:a):o(c)?l=i?[f(a[0]),f(a[1])]:[f(a),f(a)]:o(u)&&(l=i?a.map(f):[f(a)]);switch(n){case"=":return function(e){return d(e)===l};case"!=":return function(e){return d(e)!==l};case"<":return function(e){return d(e)<l};case"<=":return function(e){return d(e)<=l};case">":return function(e){return d(e)>l};case">=":return function(e){return d(e)>=l};case"[]":return function(e){var t=d(e);return t>=l[0]&&t<=l[1]};case"()":return function(e){var t=d(e);return t>l[0]&&t<l[1]};case"[)":return function(e){var t=d(e);return t>=l[0]&&t<l[1]};case"(]":return function(e){var t=d(e);return t>l[0]&&t<=l[1]};case"][":return function(e){var t=d(e);return t<=l[0]||t>=l[1]};case")(":return function(e){var t=d(e);return t<l[0]||t>l[1]};case"](":return function(e){var t=d(e);return t<=l[0]||t>l[1]};case")[":return function(e){var t=d(e);return t<l[0]||t>=l[1]};case"{}":return function(e){return-1!==l.indexOf(d(e))};case"}{":return function(e){return-1===l.indexOf(d(e))}}}(r,i.getDataToCoordFunc(e,t,l,a),d),x={},b={},_=0;h?(y=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set(new Array(f))},g=function(e,t){var r=x[e.astr][t];e.get()[t]=r}):(y=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set([])},g=function(e,t){var r=x[e.astr][t];e.get().push(r)}),T(y);for(var w=o(t.transforms,r),k=0;k<f;k++){v(a[k])?(T(g,k),b[_++]=w(k)):h&&_++}r._indexToPoints=b,t._length=_}}function T(e,r){for(var a=0;a<p.length;a++){e(n.nestedProperty(t,p[a]),r)}}}},{"../constants/filter_ops":277,"../lib":299,"../plots/cartesian/axes":346,"../registry":387,"./helpers":559}],558:[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,f,d,p,h,m,y=t.transform,g=t.transformIndex,v=e.transforms[g].groups,x=o(e.transforms,y);if(!n.isArrayOrTypedArray(v)||0===v.length)return[e];var b=n.filterUnique(v),_=new Array(b.length),w=v.length,k=a.findArrayAttributes(e),T=y.styles||[],M={};for(r=0;r<T.length;r++)M[T[r].target]=T[r].value;y.styles&&(m=n.keyedContainer(y,"styles","target","value.name"));var A={},S={};for(r=0;r<b.length;r++){A[f=b[r]]=r,S[f]=0,(d=_[r]=n.extendDeepNoArrays({},e))._group=f,d.transforms[g]._indexToPoints={};var L=null;for(m&&(L=m.get(f)),d.name=L||""===L?L:n.templateString(y.nameformat,{trace:e.name,group:f}),p=d.transforms,d.transforms=[],l=0;l<p.length;l++)d.transforms[l]=n.extendDeepNoArrays({},p[l]);for(l=0;l<k.length;l++)n.nestedProperty(d,k[l]).set([])}for(s=0;s<k.length;s++){for(c=k[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[v[l]]].push(u[l])}for(l=0;l<w;l++){(d=_[A[v[l]]]).transforms[g]._indexToPoints[S[v[l]]]=x(l),S[v[l]]++}for(r=0;r<b.length;r++)f=b[r],d=_[r],i.clearExpandedTraceDefaultColors(d),d=n.extendDeepNoArrays(d,M[f]||{});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 f=n.coerce(s[i],c[i],r.attributes.styles,"value");n.isPlainObject(f)?u.value=n.extendDeep({},f):f&&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":299,"../plot_api/plot_schema":334,"../plots/plots":380,"./helpers":559}],559:[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]}}},{}],560:[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,f,d=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<d.length;u++){var y=n.nestedProperty(t,d[u]),g=y.get(),v=new Array(c);for(f=0;f<c;f++)v[f]=g[p[f]];y.set(v)}for(f=0;f<c;f++)m[f]=h(p[f]);r._indexToPoints=m,t._length=c}}}},{"../constants/numerical":279,"../lib":299,"../plots/cartesian/axes":346,"./helpers":559}],561:[function(e,t,r){"use strict";r.version="2.16.0"},{}]},{},[15])(15)});var locale={moduleType:"locale",name:"ca",dictionary:{},format:{days:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"],shortDays:["Dug","Dln","Dmt","Dmc","Djs","Dvn","Dsb"],months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],shortMonths:["Gen","Feb","Mar","Abr","Mai","Jun","Jul","Ago","Set","Oct","Nov","Des"],date:"%d/%m/%Y"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"de",dictionary:{Autoscale:"Automatische Skalierung","Box Select":"Rechteckauswahl","Click to enter Colorscale title":"Klicken, um den Farbskalatitel einzugeben","Click to enter Component A title":"Klicken, um den Titel der Komponente A einzugeben","Click to enter Component B title":"Klicken, um den Titel der Komponente B einzugeben","Click to enter Component C title":"Klicken, um den Titel der Komponente C einzugeben","Click to enter Plot title":"Klicken, um den Titel des Graphen einzugeben","Click to enter X axis title":"Klicken, um den Titel der X-Achse einzugeben","Click to enter Y axis title":"Klicken, um den Titel der Y-Achse einzugeben","Compare data on hover":"Über die Daten fahren, um sie zu vergleichen","Double-click on legend to isolate one trace":"Daten isolieren durch Doppelklick in der Legende","Double-click to zoom back out":"Herauszoomen durch Doppelklick","Download plot as a png":"Graphen als PNG herunterladen","Download plot":"Graphen herunterladen","Edit in Chart Studio":"Im Chart Studio bearbeiten","IE only supports svg. Changing format to svg.":"IE unterstützt nur SVG-Dateien. Format wird zu SVG gewechselt.","Lasso Select":"Lassoauswahl","Orbital rotation":"Orbitalrotation",Pan:"Verschieben","Produced with Plotly.js":"Erstellt mit Plotly.js",Reset:"Zurücksetzen","Reset axes":"Achsen zurücksetzen","Reset camera to default":"Kamera auf Standard zurücksetzen","Reset camera to last save":"Kamera auf letzte Speicherung zurücksetzen","Reset view":"Ansicht zurücksetzen","Reset views":"Ansichten zurücksetzen","Show closest data on hover":"Zeige näheste Daten beim Überfahren","Snapshot succeeded":"Snapshot erfolgreich","Sorry, there was a problem downloading your snapshot!":"Es gab ein Problem beim Herunterladen des Snapshots","Taking snapshot - this may take a few seconds":"Erstelle einen Snapshot - dies kann einige Sekunden dauern",Zoom:"Zoom","Zoom in":"Hineinzoomen","Zoom out":"Herauszoomen","close:":"Schluss:",trace:"Datenspur","lat:":"Lat.:","lon:":"Lon.:","q1:":"q1:","q3:":"q3:","source:":"Quelle:","target:":"Ziel:","lower fence:":"Untere Schranke:","upper fence:":"Obere Schranke:","max:":"Max.:","mean ± σ:":"Mittelwert ± σ:","mean:":"Mittelwert:","median:":"Median:","min:":"Min.:","Turntable rotation":"Drehscheibenorbit","Toggle Spike Lines":"Bezugslinien an-/abschalten","open:":"Eröffnung:","high:":"Höchstkurs:","low:":"Tiefstkurs:","Toggle show closest data on hover":"Anzeige der nähesten Daten an-/abschalten","incoming flow count:":"Anzahl eingehender Verbindungen:","outgoing flow count:":"Anzahl ausgehender Verbindungen:","kde:":"Dichte:"},format:{days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],date:"%d.%m.%Y",decimal:",",thousands:"."}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"es",dictionary:{Autoscale:"Autoescalar","Box Select":"Seleccionar Caja","Click to enter Colorscale title":"Introducir el título de la Escala de Color","Click to enter Component A title":"Introducir el título del Componente A","Click to enter Component B title":"Introducir el título del Componente B","Click to enter Component C title":"Introducir el título del Componente C","Click to enter Plot title":"Introducir el título de la Gráfica","Click to enter X axis title":"Introducir el título del eje X","Click to enter Y axis title":"Introducir el título del eje Y","Click to enter radial axis title":"Introducir el título del eje radial","Compare data on hover":"Comparar datos al pasar por encima","Double-click on legend to isolate one trace":"Haga doble-clic en la leyenda para aislar una traza","Double-click to zoom back out":"Haga doble-clic para restaurar la escala","Download plot as a png":"Descargar gráfica como png","Download plot":"Descargar gráfica","Edit in Chart Studio":"Editar en Chart Studio","IE only supports svg. Changing format to svg.":"IE solo soporta svg. Cambiando formato a svg.","Lasso Select":"Seleccionar con lazo","Orbital rotation":"Rotación esférica",Pan:"Modo Panorámica","Produced with Plotly.js":"Hecho con Plotly.js",Reset:"Reiniciar","Reset axes":"Reiniciar ejes","Reset camera to default":"Restaurar cámara predeterminada","Reset camera to last save":"Restaurar anterior cámara","Reset view":"Restaurar vista","Reset views":"Restaurar vistas","Show closest data on hover":"Mostrar el dato más cercano al pasar por encima","Snapshot succeeded":"La captura de la instantánea finalizó correctamente","Sorry, there was a problem downloading your snapshot!":"¡La descarga de la instantánea falló!","Taking snapshot - this may take a few seconds":"Capturando una instantánea - podría tardar unos segundos","Toggle Spike Lines":"Mostrar/Ocultar Guías","Toggle show closest data on hover":"Activar/Desactivar mostrar el dato más cercano al pasar por encima","Turntable rotation":"Rotación plana",Zoom:"Modo Ampliar/Reducir","Zoom in":"Ampliar","Zoom out":"Reducir","close:":"cierre:","high:":"alza:","incoming flow count:":"flujo de entrada:","kde:":"edp:","lat:":"lat:","lon:":"lon:","low:":"baja:","lower fence:":"límite inferior:","max:":"máx:","mean ± σ:":"media ± σ:","mean:":"media:","median:":"mediana:","min:":"mín:","new text":"nuevo texto","open:":"apertura:","outgoing flow count:":"flujo de salida:","q1:":"q1:","q3:":"q3:","source:":"fuente:","target:":"destino:",trace:"traza","upper fence:":"límite superior:"},format:{days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],shortDays:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],shortMonths:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],date:"%d/%m/%Y",decimal:",",thousands:" "}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"fi",dictionary:{Autoscale:"Autoskaalaa","Box Select":"Laatikkovalinta","Click to enter Colorscale title":"Klikkaa antaaksesi väriskaalan otsikko","Click to enter Component A title":"Klikkaa antaaksesi komponentin A otsikko","Click to enter Component B title":"Klikkaa antaaksesi komponentin B otsikko","Click to enter Component C title":"Klikkaa antaaksesi komponentin C otsikko","Click to enter Plot title":"Klikkaa antaaksesi kuvion otsikko","Click to enter X axis title":"Klikkaa antaaksesi x-akselin otsikko","Click to enter Y axis title":"Klikkaa antaaksesi y-akselin otsikko","Click to enter radial axis title":"Klikkaa antaaksesi radiaalisen akselin otsikko","Compare data on hover":"Vertaa dataa kursorilla","Double-click on legend to isolate one trace":"Kaksoisklikkaa selitettä eristääksesi yksi sarja","Double-click to zoom back out":"Kaksoisklikkaa zoomataksesi ulos","Download plot":"Lataa kuvio","Download plot as png":"Lataa kuvio png-muodossa","Edit in Chart Studio":"Muokkaa Chart Studiossa","IE only supports svg. Changing format to svg.":"Formaatiksi vaihdetaan IE:n tukema svg.","Lasso Select":"Lassovalinta","Orbital rotation":"Orbitaalikierto",Pan:"Panorointi","Produced with Plotly.js":"Tuotettu Plotly.jsllä",Reset:"Palauta oletusasetukset","Reset axes":"Palauta akselien oletusasetukset","Reset camera to default":"Palauta kameran oletusasetukset","Reset camera to last save":"Palauta kameran viimeksi tallennetut asetukset","Reset view":"Palauta näkymän oletusasetukset","Reset views":"Palauta näkymien oletusasetukset","Show closest data on hover":"Näytä kursoria lähin data","Snapshot succeeded":"Tilannekuvan ottaminen onnistui","Sorry, there was a problem downloading your snapshot!":"Pahoittelut, tilannekuvan lataaminen epäonnistui!","Taking snapshot - this may take a few seconds":"Otetaan tilannekuvaa - odota hetki","Toggle Spike Lines":"Näytä huiput","Toggle show closest data on hover":"Näytä kursoria lähin data","Turntable rotation":"Tasokierto",Zoom:"Zoomaus","Zoom in":"Zoomaa sisään","Zoom out":"Zoomaa ulos","close:":"loppu:","high:":"korkein:","incoming flow count:":"saapuva virtaus:","kde:":"ydinestimointi:","lat:":"lat.:","lon:":"lon.:","low:":"matalin:","lower fence:":"alempi raja:","max:":"maks.:","mean ± σ:":"keskiarvo ± σ:","mean:":"keskiarvo:","median:":"mediaani:","min:":"min.:","new text":"uusi teksti","open:":"alku:","outgoing flow count:":"lähtevä virtaus:","q1:":"q1:","q3:":"q3:","source:":"lähde:","target:":"kohde:",trace:"sarja","upper fence:":"ylempi raja:"},format:{days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],shortDays:["su","ma","ti","ke","to","pe","la"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],shortMonths:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu"],date:"%d.%m.%Y"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"fr",dictionary:{Autoscale:"Échelle automatique","Box Select":"Sélection rectangulaire","Click to enter Colorscale title":"Ajouter un titre à l'échelle de couleurs","Click to enter Component A title":"Ajouter un titre à la composante A","Click to enter Component B title":"Ajouter un titre à la composante B","Click to enter Component C title":"Ajouter un titre à la composante C","Click to enter Plot title":"Ajouter un titre au graphique","Click to enter X axis title":"Ajouter un titre à l'axe des x","Click to enter Y axis title":"Ajouter un titre à l'axe des y","Click to enter radial axis title":"Ajouter un titre à l'axe radial","Compare data on hover":"Comparaison entre données en survol","Double-click on legend to isolate one trace":"Double-cliquer sur la légende pour isoler une série","Double-click to zoom back out":"Double-cliquer pour dézoomer","Download plot as a png":"Télécharger le graphique en fichier PNG","Download plot":"Télécharger le graphique","Edit in Chart Studio":"Éditer le graphique sur Chart Studio","IE only supports svg. Changing format to svg.":"IE ne permet que les conversions en SVG. Conversion en SVG en cours.","Lasso Select":"Sélection lasso","Orbital rotation":"Rotation orbitale",Pan:"Translation","Produced with Plotly.js":"Généré avec Plotly.js",Reset:"Réinitialiser","Reset axes":"Réinitialiser les axes","Reset camera to default":"Régler la caméra à sa valeur défaut","Reset camera to last save":"Régler la caméra à sa valeur sauvegardée","Reset view":"Réinitialiser","Reset views":"Réinitialiser","Show closest data on hover":"Données les plus proches en survol","Snapshot succeeded":"Conversion réussie","Sorry, there was a problem downloading your snapshot!":"Désolé, un problème est survenu lors du téléchargement de votre graphique","Taking snapshot - this may take a few seconds":"Conversion en cours, ceci peut prendre quelques secondes",Zoom:"Zoom","Zoom in":"Zoom intérieur","Zoom out":"Zoom extérieur","close:":"fermeture :",trace:"série","lat:":"lat. :","lon:":"lon. :","q1:":"q1 :","q3:":"q3 :","source:":"source :","target:":"embouchure :","lower fence:":"clôture supérieure :","upper fence:":"clôture inférieure :","max:":"max. :","mean ± σ:":"moyenne ± σ :","mean:":"moyenne :","median:":"médiane :","min:":"min. :","new text":"nouveau texte","Turntable rotation":"Rotation planaire","Toggle Spike Lines":"Activer/désactiver les pics","open:":"ouverture :","high:":"haut :","low:":"bas :","Toggle show closest data on hover":"Activer/désactiver le survol","incoming flow count:":"flux entrant :","outgoing flow count:":"flux sortant :","kde:":"est. par noyau :"},format:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],shortDays:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],shortMonths:["Jan","Fév","Mar","Avr","Mai","Jun","Jul","Aoû","Sep","Oct","Nov","Déc"],date:"%d/%m/%Y",decimal:",",thousands:" ",year:"%Y",month:"%b %Y",dayMonth:"%-d %b",dayMonthYear:"%-d %b %Y"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"it",dictionary:{Autoscale:"Scala automaticamente","Box Select":"Selezione box","Click to enter Colorscale title":"Clicca per inserire un titolo alla scala di colori","Click to enter Component A title":"Clicca per inserire un titolo al componente A","Click to enter Component B title":"Clicca per inserire un titolo al componente B","Click to enter Component C title":"Clicca per inserire un titolo al componente C","Click to enter Plot title":"Clicca per inserire un titolo al grafico","Click to enter X axis title":"Clicca per inserire un titolo all'asse X","Click to enter Y axis title":"Clicca per inserire un titolo all'asse Y","Click to enter radial axis title":"Clicca per inserire un titolo per l' asse radiale","Compare data on hover":"Paragona i dati al passaggio del mouse","Double-click on legend to isolate one trace":"Doppio click per isolare i dati di una traccia","Double-click to zoom back out":"Doppio click per tornare allo zoom iniziale","Download plot as a png":"Scarica il grafico come immagine png","Download plot":"Scarica il grafico","Edit in Chart Studio":"Modifica in Chart Studio","IE only supports svg. Changing format to svg.":"IE supporta solo svg. Modifica formato in svg.","Lasso Select":"Selezione lazo","Orbital rotation":"Rotazione orbitale",Pan:"Sposta","Produced with Plotly.js":"Creato con Plotly.js",Reset:"Reset","Reset axes":"Resetta gli assi","Reset camera to default":"Reimposta la camera ai valori predefiniti","Reset camera to last save":"Reimposta la camera all' ultimo salvataggio","Reset view":"Reimposta la vista","Reset views":"Reimposta le viste","Show closest data on hover":"Mostra i dati più vicini al passaggio del mouse","Snapshot succeeded":"Screenshot creato con successo","Sorry, there was a problem downloading your snapshot!":"Si è verificato un errore durante la creazione dello screenshot","Taking snapshot - this may take a few seconds":"Creazione screenshot - potrebbe richiedere qualche secondo",Zoom:"Zoom","Zoom in":"Ingrandisci","Zoom out":"Rimpicciolisci","close:":"chiudi:",trace:"traccia","lat:":"lat.:","lon:":"lon.:","q1:":"q1:","q3:":"q3:","source:":"sorgente:","target:":"target:","max:":"max.:","mean ± σ:":"media ± σ:","mean:":"media:","median:":"mediana:","min:":"min.:","new text:":"Nuovo testo:","upper fence:":"limite superiore:","lower fence:":"limite inferiore:","Turntable rotation":"Rotazione piattaforma","Toggle Spike Lines":"Abilita linee di identificazione","open:":"apri:","high:":"alto:","kde:":"kde:","low:":"basso:","incoming flow count:":"Flusso in entrata:","outgoing flow count:":"Flusso in uscita:","Toggle show closest data on hover":"Abilita mostra i dati più vicini al passaggio del mouse"},format:{days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],shortDays:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],shortMonths:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],date:"%d/%m/%Y",decimal:",",thousands:"."}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"nl",dictionary:{Autoscale:"Automatische schaal","Click to enter Colorscale title":"Klik om kleurenschaal titel in te vullen","Click to enter Component A title":"Klik om Component A titel in te vullen","Click to enter Component B title":"Klik om Component B titel in te vullen","Click to enter Component C title":"Klik om Component C titel in te vullen","Click to enter Plot title":"Klik om Plot titel in te vullen","Click to enter X axis title":"Klik om x-as titel in te vullen","Click to enter Y axis title":"Klik om y-as titel in te vullen","Click to enter radial axis title":"Klik om radiaal-as titel in te vullen","Double-click to zoom back out":"Zoom uit door te dubbel klikken","Download plot as a png":"Dowload de plot als een png-bestand","Download plot":"Download de plot","Draw circle":"Teken cirkel","Draw closed freeform":"Teken gesloten vorm","Draw line":"Teken lijn","Draw open freeform":"Teken open vorm","Draw rectangle":"Teken rechthoek","Edit in Chart Studio":"In Chart Studio wijzigen","Erase active shape":"Wis huidige vorm","IE only supports svg. Changing format to svg.":"IE ondersteunt alleen svg bestanden. Formaat gewijzigd naar svg.","Lasso Select":"Lasso selectie","Produced with Plotly.js":"Gemaakt met Plotly.js",Zoom:"Inzoomen","max:":"maximum:","mean ± σ:":"gemiddelde ± σ:","mean:":"gemiddelde:","min:":"minimum:","new text":"nieuwe tekst","open:":"openen:","high:":"hoog:","low:":"laag:","source:":"bron:","target:":"doel:"},format:{days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],shortDays:["zon","maa","din","woe","don","vri","zat"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],shortMonths:["jan","feb","maa","apr","mei","jun","jul","aug","sep","okt","nov","dec"],date:"%d-%m-%Y",decimal:",",thousands:".",year:"%Y",month:"%b %Y",dayMonth:"%-d %b",dayMonthYear:"%-d %b %Y"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"pl",dictionary:{},format:{days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],shortDays:["Nie","Pn","Wt","Śr","Czw","Pt","So"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],shortMonths:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],date:"%Y-%m-%d"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"pt-BR",dictionary:{Autoscale:"Escala automática","Box Select":"Seleção retangular","Click to enter Colorscale title":"Clique para editar o título da escala de cor","Click to enter Component A title":"Clique para editar o título do Componente A","Click to enter Component B title":"Clique para editar o título do Componente B","Click to enter Component C title":"Clique para editar o título do Componente C","Click to enter Plot title":"Clique para editar o título do Gráfico","Click to enter X axis title":"Clique para editar o título do eixo X","Click to enter Y axis title":"Clique para editar o título do eixo Y","Click to enter radial axis title":"Clique para editar o título do eixo radial","Compare data on hover":"Comparar dados ao pairar","Double-click on legend to isolate one trace":"Duplo clique na legenda para isolar uma série","Double-click to zoom back out":"Duplo clique para reverter zoom","Download plot as a png":"Fazer download do gráfico como imagem (png)","Download plot":"Fazer download do gráfico","Edit in Chart Studio":"Editar no Chart Studio","IE only supports svg. Changing format to svg.":"IE suporta apenas svg. Alterando formato para svg","Lasso Select":"Seleção de laço","Orbital rotation":"Rotação orbital",Pan:"Mover","Produced with Plotly.js":"Criado com o Plotly.js",Reset:"Restaurar","Reset axes":"Restaurar eixos","Reset camera to default":"Restaurar câmera para padrão","Reset camera to last save":"Restaurar câmera para última salva","Reset view":"Restaurar visão","Reset views":"Restaurar visões","Show closest data on hover":"Exibir dado mais próximo ao pairar","Snapshot succeeded":"Captura instantânea completa","Sorry, there was a problem downloading your snapshot!":"Desculpe, houve um problema no download de sua captura instantânea!","Taking snapshot - this may take a few seconds":"Efetuando captura instantânea - isso pode levar alguns instantes","Toggle Spike Lines":"Habilitar/desabilitar triangulação de linhas","Toggle show closest data on hover":"Habilitar/desabilitar exibição de dado mais próximo ao pairar","Turntable rotation":"Rotação de mesa",Zoom:"Zoom","Zoom in":"Ampliar zoom","Zoom out":"Reduzir zoom",close:"fechamento",high:"alta","incoming flow count":"contagem de fluxo de entrada",kde:"kde",lat:"latitude",lon:"longitude",low:"baixa","lower fence":"limite inferior",max:"máximo","mean ± σ":"média ± σ",mean:"média",median:"mediana",min:"mínimo","new text":"novo texto",open:"abertura","outgoing flow count":"contagem de fluxo de saída",q1:"q1",q3:"q3",source:"origem",target:"destino",trace:"série","upper fence":"limite superior"},format:{days:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],date:"%d/%m/%Y"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"pt-PT",dictionary:{Autoscale:"Escala automática","Box Select":"Seleção retangular","Click to enter Colorscale title":"Clique para editar o título da escala de cor","Click to enter Component A title":"Clique para editar o título do Componente A","Click to enter Component B title":"Clique para editar o título do Componente B","Click to enter Component C title":"Clique para editar o título do Componente C","Click to enter Plot title":"Clique para editar o título do Gráfico","Click to enter X axis title":"Clique para editar o título do eixo X","Click to enter Y axis title":"Clique para editar o título do eixo Y","Click to enter radial axis title":"Clique para editar o título do eixo radial","Compare data on hover":"Comparar dados ao pairar","Double-click on legend to isolate one trace":"Duplo clique na legenda para isolar uma série","Double-click to zoom back out":"Duplo clique para reverter ampliação","Download plot as a png":"Baixar gráfico como imagem (png)","Download plot":"Baixar gráfico","Edit in Chart Studio":"Editar no Chart Studio","IE only supports svg. Changing format to svg.":"IE suporta apenas svg. Alterando formato para svg","Lasso Select":"Seleção de laço","Orbital rotation":"Rotação orbital",Pan:"Mover","Produced with Plotly.js":"Criado com Plotly.js",Reset:"Restaurar","Reset axes":"Restaurar eixos","Reset camera to default":"Restaurar câmera para padrão","Reset camera to last save":"Restaurar câmera para última gravação","Reset view":"Restaurar vista","Reset views":"Restaurar vistas","Show closest data on hover":"Exibir dado mais próximo ao pairar","Snapshot succeeded":"Captura instantânea com sucesso","Sorry, there was a problem downloading your snapshot!":"Desculpe, houve um problema no download de sua captura instantânea!","Taking snapshot - this may take a few seconds":"Efetuando captura instantânea - isso pode demorar alguns segundos","Toggle Spike Lines":"Habilitar/desabilitar triangulação de linhas","Toggle show closest data on hover":"Habilitar/desabilitar exibição de dado mais próximo ao pairar","Turntable rotation":"Rodar",Zoom:"Ampliar","Zoom in":"Aumentar Ampliação","Zoom out":"Reduzir Ampliação",close:"fechar",high:"alta","incoming flow count":"contagem de fluxo de entrada",kde:"kde",lat:"latitude",lon:"longitude",low:"baixa","lower fence":"limite inferior",max:"máximo","mean ± σ":"média ± σ",mean:"média",median:"mediana",min:"mínimo","new text":"novo texto",open:"abrir","outgoing flow count":"contagem de fluxo de saída",q1:"q1",q3:"q3",source:"origem",target:"destino",trace:"série","upper fence":"limite superior"},format:{days:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],date:"%d/%m/%Y"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"sv",dictionary:{Autoscale:"Autoskala","Box Select":"Välj rektangel","Click to enter Colorscale title":"Klicka för att ange titel på färgskala","Click to enter Component A title":"Klicka för att ange titel på komponent A","Click to enter Component B title":"Klicka för att ange titel på komponent B","Click to enter Component C title":"Klicka för att ange titel på komponent C","Click to enter Plot title":"Klicka för att ange titel på diagram","Click to enter X axis title":"Klicka för att ange titel på x-axel","Click to enter Y axis title":"Klicka för att ange titel på y-axel","Click to enter radial axis title":"Klicka för att ange titel på radiell axel","Compare data on hover":"Jämför data när muspekaren hålls över","Double-click on legend to isolate one trace":"Dubbelklicka på förklaringen för att visa endast en serie","Double-click to zoom back out":"Dubbelklicka för att zooma ut igen","Download plot":"Ladda ner diagram","Download plot as a png":"Ladda ner diagram som png","Edit in Chart Studio":"Editera i Chart Studio","IE only supports svg. Changing format to svg.":"IE stöder enbart svg. Byter format till svg.","Lasso Select":"Välj lasso","Orbital rotation":"Orbital rotation",Pan:"Panorera","Produced with Plotly.js":"Skapad med Plotly.js",Reset:"Återställ","Reset axes":"Återställ axlar","Reset camera to default":"Återställ kamera till standard","Reset camera to last save":"Återställ kamera till senast sparad","Reset view":"Återställ vy","Reset views":"Återställ vyer","Show closest data on hover":"Visa närmaste värde när muspekaren hålls över","Snapshot succeeded":"Bild skapad","Sorry, there was a problem downloading your snapshot!":"Tyvärr gick något fel vid nedladdning av bild","Taking snapshot - this may take a few seconds":"Skapar bild - detta kan ta några sekunder","Toggle Spike Lines":"Aktivera/Inaktivera topplinjer","Toggle show closest data on hover":"Aktivera/Inaktivera visa närmaste värde när muspekaren hålls över","Turntable rotation":"Platt rotation",Zoom:"Zooma","Zoom in":"Zooma in","Zoom out":"Zooma ut","close:":"stängning:","concentration:":"koncentration:","high:":"hög:","incoming flow count:":"inkommande flöde summering:","kde:":"kde:","lat:":"lat:","lon:":"lon:","low:":"låg:","lower fence:":"undre gräns:","max:":"max:","mean ± σ:":"medel ± σ:","mean:":"medel:","median:":"median:","min:":"min:","new text":"ny text","open:":"öppning:","outgoing flow count:":"utgående flöde summering:","q1:":"q1:","q3:":"q3:","source:":"källa:","target:":"mål:",trace:"serie","upper fence:":"övre gräns:"},format:{days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],shortDays:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],shortMonths:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],date:"%Y-%m-%d"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"tr",dictionary:{},format:{days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],shortDays:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],shortMonths:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],date:"%d.%m.%Y"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"uk",dictionary:{Autoscale:"Автоматичне шкалювання","Box Select":"Виділення прямокутної області","Click to enter Colorscale title":"Натисніть для введення назви шкали кольору","Click to enter Component A title":"Натисніть для введення назви компоненту A","Click to enter Component B title":"Натисніть для введення назви компоненту B","Click to enter Component C title":"Натисніть для введення назви компоненту C","Click to enter Plot title":"Натисніть для введення назви графіка","Click to enter X axis title":"Натисніть для введення назви осі X","Click to enter Y axis title":"Натисніть для введення назви осі Y","Click to enter radial axis title":"Натисніть для введення назви полярної осі","Compare data on hover":"При наведенні показувати всі дані","Double-click on legend to isolate one trace":"Двічі клацніть по легенді для виділення окремих даних","Double-click to zoom back out":"Для встановлення масштабу значення за замовчуванням двічі клацніть мишею","Download plot":"Зберегти графік","Download plot as a png":"Зберегти у форматі PNG","Edit in Chart Studio":"Редагувати у Chart Studio","IE only supports svg. Changing format to svg.":"IE підтримує лише svg. Формат змінюється на svg.","Lasso Select":"Ласо","Orbital rotation":"Рух по орбіті",Pan:"Зсув","Produced with Plotly.js":"Створено за допомогою Plotly.js",Reset:"Встановити значення за замовчуванням","Reset axes":"Встановити осям значення за замовчуванням","Reset camera to default":"Встановити камері значення за замовчуванням","Reset camera to last save":"Повернути камеру в останній збережений стан","Reset view":"Встановити відображенню значення за замовчуванням","Reset views":"Встановити відображенням значення за замовчуванням","Show closest data on hover":"При наведенні показувати найближчі дані","Snapshot succeeded":"Знімок успішно створений","Sorry, there was a problem downloading your snapshot!":"На жаль, виникла проблема при збереженні знімку","Taking snapshot - this may take a few seconds":"Створюється знімок - це може зайняти кілька секунд","Toggle Spike Lines":"Увімкнути/вимкнути відображення ліній проекцій точок","Toggle show closest data on hover":"Увімкнути/вимкнути відображення найближчих даних при наведенні","Turntable rotation":"Обертання на поворотному столі",Zoom:"Зум","Zoom in":"Збільшити","Zoom out":"Зменшити","close:":"Закриття:","concentration:":"Концентрація:","high:":"Максимум:","incoming flow count:":"Кількість вхідних зв'язків:","kde:":"Ядрова оцінка густини розподілу:","lat:":"Широта:","lon:":"Довгота:","low:":"Мінімум:","lower fence:":"Нижня границя:","max:":"Макс.:","mean ± σ:":"Середнє ± σ:","mean:":"Середнє:","median:":"Медіана:","min:":"Мін.:","new text":"Новий текст","open:":"Відкриття:","outgoing flow count:":"Кількість вихідних зв'язків:","q1:":"q1:","q3:":"q3:","source:":"Джерело:","target:":"Ціль:",trace:"Ряд","upper fence:":"Верхня границя:"},format:{days:["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"],shortDays:["нд","пн","вт","ср","чт","пт","сб"],months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],shortMonths:["Січ.","Лют.","Берез.","Квіт.","Трав.","Черв.","Лип.","Серп.","Верес.","Жовт.","Листоп.","Груд."],date:"%d.%m.%Y",decimal:",",thousands:" "}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);locale={moduleType:"locale",name:"zh-CN",dictionary:{Autoscale:"自动缩放","Box Select":"矩形框选","Click to enter Colorscale title":"点击输入色阶的标题","Click to enter Component A title":"点击输入组件A的标题","Click to enter Component B title":"点击输入组件B的标题","Click to enter Component C title":"点击输入组件C的标题","Click to enter Plot title":"点击输入图表的标题","Click to enter X axis title":"点击输入X轴的标题","Click to enter Y axis title":"点击输入Y轴的标题","Compare data on hover":"悬停时比较数据","Double-click on legend to isolate one trace":"双击图例来突显对应轨迹","Double-click to zoom back out":"双击返回缩小显示","Download plot as a png":"下载图表为PNG格式","Download plot":"下载图表","Edit in Chart Studio":"在Chart Studio中编辑","IE only supports svg. Changing format to svg.":"IE只支持SVG。转换格式为SVG。","Lasso Select":"套索选择","Orbital rotation":"轨道旋转",Pan:"平移","Produced with Plotly.js":"由Plotly.js生成",Reset:"重置","Reset axes":"重置轴","Reset camera to default":"重置镜头视角为默认状态","Reset camera to last save":"重置镜头视角为上次保存状态","Reset view":"重置视图","Reset views":"重置视图","Show closest data on hover":"悬停时显示最近的数据","Snapshot succeeded":"生成快照成功","Sorry, there was a problem downloading your snapshot!":"抱歉,下载快照出现问题!","Taking snapshot - this may take a few seconds":"正在生成快照 - 可能需要几秒钟",Zoom:"缩放","Zoom in":"放大","Zoom out":"缩小","close:":"关闭:",trace:"踪迹:","lat:":"纬度:","lon:":"经度:","q1:":"第一四分位数:","q3:":"第三四分位数:","source:":"源:","target:":"目标:","lower fence:":"内侧栏(lower fence):","upper fence:":"外侧栏(upper fence):","max:":"最大值:","mean ± σ:":"平均数 ± 标准差σ:","mean:":"平均数:","median:":"中位数:","min:":"最小值:","Turntable rotation":"旋转转盘:","Toggle Spike Lines":"切换显示数据点辅助线(Spike Lines)","open:":"打开:","high:":"高:","low:":"低:","Toggle show closest data on hover":"切换悬停时显示最近的数据点","incoming flow count:":"流入数量:","outgoing flow count:":"流出数量:","kde:":"kde:","Click to enter radial axis title":"点击输入径向轴标题","new text":"新建文本"},format:{days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortDays:["周日","周一","周二","周三","周四","周五","周六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortMonths:["一","二","三","四","五","六","七","八","九","十","十一","十二"],date:"%Y-%m-%d"}};"undefined"==typeof Plotly?(window.PlotlyLocales=window.PlotlyLocales||[],window.PlotlyLocales.push(locale)):Plotly.register(locale);